Skip to content

Instantly share code, notes, and snippets.

@aarcro
Created December 11, 2016 05:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aarcro/20fdeb855f9718bdec0b6144ed3d5581 to your computer and use it in GitHub Desktop.
Save aarcro/20fdeb855f9718bdec0b6144ed3d5581 to your computer and use it in GitHub Desktop.
@0
@1
LOOP:
MOV UP ACC
MOV ACC RIGHT
MOV ACC DOWN
@2
L: MOV LEFT ACC
JEZ DUMP
MOV 3 DOWN
MOV ACC DOWN
MOV 7 DOWN
SUB DOWN
JGZ SWP #NEWBIGR
JMP L
SWP: MOV 5 DOWN
JMP L
DUMP: MOV 13 DOWN
@3
@4
@5
L: MOV UP ACC
JEZ DUMP
MOV 3 DOWN
MOV ACC DOWN
MOV 7 DOWN
SUB DOWN
JLZ SWP #NEWLESR
JMP L
SWP: MOV 5 DOWN
JMP L
DUMP: MOV 13 DOWN
@6
TOP: JRO UP
S1-1: MOV UP ACC
JMP TOP
S2-3: SWP
MOV UP ACC
SWP-5: SWP
JMP TOP
R1-7: MOV ACC UP
JMP TOP
R2-9: SWP
MOV ACC UP
SWP
JMP TOP
D-13: MOV ACC DOWN
MOV 0 ACC
@7
@8
MOV 999 ACC
TOP: JRO UP
S1-1: MOV UP ACC
JMP TOP
S2-3: SWP
MOV UP ACC
SWP-5: SWP
JMP TOP
R1-7: MOV ACC UP
JMP TOP
R2-9: SWP
MOV ACC UP
SWP
JMP TOP
D-13: MOV ACC DOWN
@9
MOV UP DOWN
@10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment