Skip to content

Instantly share code, notes, and snippets.

@fusspawn
Created June 18, 2015 22:58
Show Gist options
  • Select an option

  • Save fusspawn/64df8b9bdcca45c15a9f to your computer and use it in GitHub Desktop.

Select an option

Save fusspawn/64df8b9bdcca45c15a9f to your computer and use it in GitHub Desktop.
VAR $W
VAR $H
VAR $X
VAR $Y
VAR $R
MOV 128 $W
MOV 128 $H
MOV 0 $X
MOV 0 $Y
LABEL MAIN
RAND 0 255
MOV @r0 $R
MOV $X @r0
MOV $Y @r1
MOV $R @r2
MOV $R @r3
MOV $R @r4
INT 97
MOV 1 @r1
ADD
MOV @r0 $X
MOV $W @r1
SUB
JGZ MAIN
MOV 0 $X
MOV $Y @r0
MOV 1 @r1
ADD
MOV @r0 $Y
MOV $H @r1
SUB
JGZ MAIN
MOV 0 $Y
JMP MAIN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment