Skip to content

Commit

Permalink
Added draw.bas
Browse files Browse the repository at this point in the history
  • Loading branch information
visrealm committed Jun 15, 2024
1 parent 5b83903 commit 573da96
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions code/6502/basic/programs/draw.bas
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
10 DISPLAY 2
20 X=128: Y=96: C=$41
30 COLOR C: CLS
40 N1 = NOT PEEK($7F82)
50 IF NOT N1 AND $80 THEN UNPLOT X,Y
60 IF N1 AND $10 THEN CLS
70 IF N1 AND $20 THEN 150
80 IF N1 AND $01 AND X < 255 THEN X=X+1
90 IF N1 AND $02 AND X > 0 THEN X=X-1
100 IF N1 AND $04 AND Y < 191 THEN Y=Y+1
110 IF N1 AND $08 AND Y > 0 THEN Y=Y-1
120 PLOT X,Y
130 IF N1 AND $40 THEN 170
140 GOTO 40
150 C=(C+16) AND $FF:IF C<32 THEN 150
160 COLOR C:WAIT $7F82,$20: GOTO 40
170 FOR I=0 TO 500 :NEXT: GOTO 40

0 comments on commit 573da96

Please sign in to comment.