LoginSignup
0
0

More than 5 years have passed since last update.

俺言語 その13

Last updated at Posted at 2018-03-02

概要

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

環境

avr studio 4
attiny85 1mhz
tera term
usb-serial

バグ

論理演算の>の件
<は、<ですが、>は、=>です。仕様です。

拡張

delayを、@に割り当てた。
@=1で、おおよそ、1秒待つ。

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

右辺に、?で、キー入力待ち
a=?
0キーなら、aに、48が入る。

サンプルコード

 >を表示して、キー入力待ち。
0キーで、led消灯。
1キーで、led点灯。
スペースキーでループを抜ける。

10 r=6
20 o=2
30 ?=">"
40 a=?
50 #=a>49*20
60 #=a=32*100
70 o=6
80 #=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