0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

インタープリタを作る その26

Posted at

#概要

インタープリタを作ってみた。
avrインタープリター書いてみた。
剰余modを実現する。

#サンプルコード

avr.ldi(16, 0x00)
avr.ldi(17, 0x05)
avr.ldi(18, 0x00)
avr.inc(18)
avr.mov(16, 18)
avr.cpi(16, 0x04)
avr.brcs(4)
avr.out(1, 16)
avr.cpi(18, 0x22)
avr.brne(-7)
avr.jmp(14)
avr.sub(16, 17)
avr.jmp(5)


#結果

1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 

#成果物

以上。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?