Skip to content

Instantly share code, notes, and snippets.

@torpedo87
Last active January 28, 2020 15:03
Show Gist options
  • Save torpedo87/b147daae413ba467bc643937ed94f35c to your computer and use it in GitHub Desktop.
Save torpedo87/b147daae413ba467bc643937ed94f35c to your computer and use it in GitHub Desktop.
@R2
M=0
(LOOP)
@R0
D=M
// R0 <= 0 이면 end
@END
D;JLE
@R1
D=M
@R2
M=M+D
@R0
D=M
M=M-1
//R0 > 0 이면 loop로 점프
@LOOP
D;JGT
(END)
@END
0;JMP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment