LoginSignup
0
0

More than 5 years have passed since last update.

俺言語 その12

Last updated at Posted at 2018-03-02

概要

俺言語をやってみた。
avrにアセンブラで実装してみた。
Lチカやってみた。

拡張

DDRB PORTB PINBをそれぞれ、r,o,pに割り当てた。
PB2を出力は、r=4
PB2に、highを出力は、0=4、lowは、o=0

delayを@に割り当てた。

delay:
    clr     r0
    clr     r1
    dec     r0
    brne    PC - 1
    dec     r1
    brne    PC - 3
    dec     r17
    brne    PC - 5
    ret

写真

MVC-005F.JPG

回路図

image

環境

avr studio 4
attiny85 1mhz
tera term
usb-serial

サンプルコード

Lチカ

10 r=6
20 a=0
30 a=a+1
40 @=10
50 o=2
60 @=10
70 o=6
80 #=a<10*30

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0