Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- get a
- ldi b 0x2d
- ldi d 0x1
- ldi h 0x1e
- dec a h
- main_loop:
- inc c
- tst c a
- jc exit
- mov e c
- and e d
- tst e z
- jc 4etnoe
- jmp ne4etnoe
- jmp main_loop
- exit:
- halt
- 4etnoe:
- mov g c
- inc g
- ldi f 0
- 4etnoe_loop:
- inc f
- mov k f
- add k h
- put k
- tst f g
- jnc 4etnoe_loop
- jmp main_loop
- ne4etnoe
- mov g c
- ne4etnoe_loop:
- mov k g
- add k h
- put k
- dec g
- tst g z
- jnc ne4etnoe_loop
- jmp main_loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement