Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
17
Task/Draw-a-pixel/Commodore-BASIC/draw-a-pixel-2.basic
Normal file
17
Task/Draw-a-pixel/Commodore-BASIC/draw-a-pixel-2.basic
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
10 REM PLOT A RED PIXEL AT 100,100
|
||||
20 REM INITIALIZE BITMAP MODE
|
||||
21 POKE 53280,0:PRINT CHR$(147);"CLEARING BITMAP... PLEASE WAIT..."
|
||||
22 BASE=8192:FOR I=BASE TO BASE+7999:POKE I,0:NEXT
|
||||
23 PRINT CHR$(147);
|
||||
24 POKE 53272,PEEK(53272) OR 8:REM SET BITMAP MEMORY AT 8192 ($2000)
|
||||
25 POKE 53265,PEEK(53265) OR 32:REM ENTER BITMAP MODE
|
||||
26 REM PLOT PIXEL
|
||||
30 X=100:Y=100
|
||||
40 MEM=BASE+INT(Y/8)*320+INT(X/8)*8+(Y AND 7)
|
||||
50 PX=7-(X AND 7)
|
||||
60 POKE MEM,PEEK(MEM) OR 2^PX
|
||||
65 REM WAIT FOR KEYPRESS
|
||||
70 GET K$:IF K$="" THEN 70
|
||||
75 REM CLEAR PIXEL, RETURN TO TEXT MODE
|
||||
80 POKE MEM,0:POKE 53265,PEEK(53265) AND 223:POKE 53272,PEEK(53272) AND 247
|
||||
90 POKE 53280,14:POKE 53281,6:POKE 646,14:END
|
||||
Loading…
Add table
Add a link
Reference in a new issue