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 5 years have passed since last update.

#概要

jsdoでchip8やってみた。
アセンブラ練習問題、解いてみた。
お題は、0から255まで表示。

#解答例

start  load  v0  0
  load  v1  0
  load  v2  0
  load  v3  5
  load  v4  5
  load  v5  5
  load  v6  0
  load  v7  1
  load  v8  3  
loop6  load  I  100
  load  v3  5
  load  B  v6  
  load  v2  I
  load  I  0
loop0  sub  v0  v7
  eq  v15  0
  goto  loop1
  disp  v3  v4  5
  add  v3  v5
  load  I  0  
loop2  sub  v1  v7
  eq  v15  0
  goto  loop3
  disp  v3  v4  5
  add  v3  v5
  load  I  0  
loop4  sub  v2  v7
  eq  v15  0
  goto  loop5
  disp  v3  v4  5   
  scroll
  add  v6  v7
  goto  loop6
loop1  add  I  v5
  goto  loop0
loop3  add  I  v5
  goto  loop2
loop5  add  I  v5
  goto  loop4    

#成果物

以上。

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?