Classic Computer Magazine Archive PROGRAM LISTING: 84-02/DRAWFILL.ASM


02 ;GRAPHICS, DRAWTO AND FILL
04 ;PAGE #'S FROM 1982 TECH. REF. NOTES
06 ;PROGRAM BY JT.
08 ;ASSEMBLE AND TYPE "BUG"; "G0602"
10 ;
12 ;SET UP PLAYFIELD COLOR REGISTERS
14 ;pg. 62
16 COLPF0 = $2C4
18 COLPF1 = $2C5
20 COLPF2 = $2C6 ;TEXT WINDOW
22 COLPF3 = $2C7
24 COLPF4 = $2C8 ;BACKGROUND
26 ;SOME COLORS YOU CAN USE pg. 190
28 GOLD = $18
30 REDOR = $34
32 BLUE = $78
34 GREEN = $C4
36 ;
38 ;CURSOR REGISTERS pg. 61,212-225
40 ROWCRS = $54
42 COLCRS = $55
44 NEWROW = $60
46 NEWCOL = $61
48 CRSINH = $02F0
50 OLDROW = $5A
52 OLDCOL = $5B
54 FILDAT = $2FD ;FOR FILL COLOR
56 ATACHR = $2FB ;FOR DRAW COLOR
58  *=$0600 ;STARTING ADRESS
60 DEV .BYTE "S:" :SCREEN
62  LDX #$60 ;IOCB #6
64  LDA #$3 ;OPEN
66  STA $342,X ;ICCOM COMMAND CODE
68  LDA #DEV&$00FF ;MASK OFF HI BYTE
70  STA $344,X ;ICBAL BUFFER ADR. LO BYTE
72  LDA #DEV/256 ;HI BYTE
74  STA $345,X ;ICBAH
76  LDA #$0C ;READ/WRITE. SPLIT SCREEN
78  STA $34A,X ;ICAX1
80  LDA #3 ;GR. 3
82  STA $34B,X ;ICAX2
84  JSR $E456 ;LET CIOV HANDLER DO IT
86  LDA #REDOR ;RED-ORANGE FOR PF1
88  STA COLPF1
90  LDA #2
92 ;IN GR.3 DATA VALUE FOR PF1 = 2
94 ;SEE TECH. NOTES APPENDIX H, 60-62, 188-189
96  STA ATACHR
98  LDA #0 ;PLOT AND
0100  STA OLDCOL
0102  LDA #12
0104  STA OLDROW
0106  STA COLCRS ;DRAWTO POSITIONS
0108  STA ROWCRS
0110  LDX #$60 ;IOCB #6
0112  LDA #$11 ;DRAW COMMAND pg. 60,218
0114  STA $342,X ;ICCOM
0116  JSR $E456 ;CIOV
0118  LDA #0 ;DRAW NEW POSITIONS
0120  STA ROWCRS
0122  JSR $E456
0124  LDA #0
0126  STA COLCRS
0128  JSR $E456
0130  LDA #12
0132  STA ROWCRS
0134  JSR $E456
0136  LDA #0
0138  STA ROWCRS
0140  LDA #1 ;PF0 COLOR DATA
0142  STA FILDAT ;FILL WITH PF0 COLOR
0144  LDX #$60
0146  LDA #$12 ;FILL CODE
0148  STA $342,X
0150  JSR $E456
0152 STOP JMP STOP ;HOLD ON SCREEN
0154 ;NOW MAKE YOUR OWN PLAYFIELDS

Back to previous page