Skip to content

Instantly share code, notes, and snippets.

@chengsun
Created April 10, 2012 21:55
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 chengsun/2354882 to your computer and use it in GitHub Desktop.
Save chengsun/2354882 to your computer and use it in GitHub Desktop.
DCPU-16 munching squares
:loop
set j, 0
:loopn
set y, 0
set i, 0x8000
:loopy
set x, 0
:loopx
xor x, y
set [i], [charoff]
ifg x, j
set [i], [charon]
xor x, y
add x, 1
add i, 1
ifn x, 32
set PC, loopx
add y, 1
ifn y, 16
set PC, loopy
add j, 1
ifn j, 32
set PC, loopn
set PC, loop
:charon dat "X"
:charoff dat " "
@lindenr
Copy link

lindenr commented Apr 11, 2012

Haha, nice. When I ran it I could see some flickering in squares which looked like they should be staying still. Might be a bug in http://0x10co.de or something (that was what I used to run it). Can you see the same thing?

Cool program anyway :)

@chengsun
Copy link
Author

chengsun commented Apr 11, 2012 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment