*= $1000 ; will draw a line from one edge of the screen ; to the other when you press the Triangle button INT #$13 LDA #$FF STA $AFE03 LDA #0 STA $AFE04 STA $AFE05 GAME INT #$15 ; virtual interupt $15 INT #$14 ; virtual interupt $14 ; test for keys LDY #0 INT #$19 CPY #1 BEQ KEYDOWN OLDSPOT JSR DRAWSCREEN ; jump to draw screen subroutine JMP GAME DRAWRECT LDX $AFE04 LDY $AFE05 DX INX LDY #0 DY INY ; plot the pixel LDA $AFE03 ADC #1 STA $AFE03 INT #$16 CPY #25 ; compare with Y+25 BNE DY LDA $AFE04 ADC #25 CPX A BNE DX RTS DRAWSCREEN JSR DRAWRECT RTS KEYDOWN LDA $AFE04 ADC #1 STA $AFE04 INT #$103 ; fast memory fill JMP OLDSPOT