Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
EXAPUNKS
GRAB 300
REPL AZIMUTH
SEEK 1
COPY F M
COPY M T
REPL ELEVATION
SEEK 1
COPY F M
COPY M T
REPL FREQUENCY
SEEK 1
COPY F M
COPY M T
DROP
GRAB 301
REPL READ_KEY
SEEK 1
MARK READ_VIDEO
COPY F M
TEST EOF
FJMP READ_VIDEO
MARK DONE
COPY -1 M
HALT
MARK AZIMUTH
LINK 800
LINK 799
LINK 800
COPY M X
MARK SET_AZIMUTH
TEST #AZIM = X
TJMP DONE
TEST #AZIM > X
TJMP AZIMUTH_DOWN
TEST #AZIM < X
TJMP AZIMUTH_UP
JUMP SET_AZIMUTH
MARK AZIMUTH_UP
COPY 1 #MOTR
JUMP SET_AZIMUTH
MARK AZIMUTH_DOWN
COPY -1 #MOTR
JUMP SET_AZIMUTH
MARK ELEVATION
LINK 800
LINK 799
LINK 801
COPY M X
MARK SET_ELEVATION
TEST #ELEV = X
TJMP DONE
TEST #ELEV > X
TJMP ELEVATION_DOWN
TEST #ELEV < X
TJMP ELEVATION_UP
JUMP SET_ELEVATION
MARK ELEVATION_UP
COPY 1 #MOTR
JUMP SET_ELEVATION
MARK ELEVATION_DOWN
COPY -1 #MOTR
JUMP SET_ELEVATION
MARK FREQUENCY
LINK 800
LINK 799
COPY M #FREQ
JUMP DONE
MARK READ_KEY
LINK 800
GRAB 199
NOTE LOCAL
MODE
REPL ENCRYPT_VIDEO
MARK READ_KEY_FILE
COPY F M
TEST EOF
FJMP READ_KEY_FILE
SEEK -9999
JUMP READ_KEY_FILE
MARK ENCRYPT_VIDEO
MAKE
MARK WRITE_FILE
NOTE GLOBAL
MODE
COPY M X
TEST X = -1
TJMP DONE_WRITING
SUBI X 5000 X
SUBI X 5000 X
NOTE LOCAL
MODE
COPY M T
ADDI T X X
TEST X < 0
TJMP WRAP
MARK WRITE
COPY X F
JUMP WRITE_FILE
MARK WRAP
ADDI X 5000 X
ADDI X 5000 X
JUMP WRITE
MARK DONE_WRITING
KILL
LINK 799
SEEK -9999
MARK TRANSMIT
COPY F #DATA
TEST EOF
TJMP SELF_DESTRUCT
JUMP TRANSMIT
MARK SELF_DESTRUCT
WIPE
HALT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment