Tny

asteroid

Name asteroid
Author m15o
Instructions Use up and down arrows to move the ship. Avoid asteroids!
Size
Source
2 @ctrl
LIT player: 81 FRM LIT a MOD LIT 9 LTH SET
FRM LIT 6 MOD LIT 0 NEQ LIT @end JCN
LIT @player LDA LDB LIT @hit JCN
CLS
LIT 0 LIT 10 PSH PSH do: RSI LIT 40 SFT
  LIT 0 LIT f PSH PSH while:
    DUP RSI ADD OVR RSI ADD LDB SET
    DUP RSI ADD INC LDB OVR RSI ADD STB
    PUL INC PSH
    RSI RSJ NEQ LIT @while JCN
    PUL PUL POP POP POP
  PUL INC PSH
  RSI RSJ NEQ LIT @do JCN 
  PUL PUL POP POP
RND LIT f0 AND LIT 0f ADD
DUP LIT 1 SET
LIT 1 SWP DEC STB
end: BRK
ctrl: 
  KEY LIT 1 EQU LIT @up JCN
  KEY LIT 2 EQU LIT @dn JCN
BRK
up: LIT f0 LIT @move JMP
dn: LIT 10 LIT @move JMP
move: LIT @player LDA ADD LIT @player STA BRK
hit: LIT 0 LIT 0 STA BRK