Mercurial > hg > Members > kono > nitros9-code
annotate level2/modules/vdgint.asm @ 1631:ec6fb5543b22
Robert Gault's modifications for correcting timing errors
author | boisy |
---|---|
date | Mon, 12 Jul 2004 01:38:08 +0000 |
parents | ad9f45622a19 |
children |
rev | line source |
---|---|
508
02a8ba2b9092
Added headers to most source files, added clock2_bb.asm
boisy
parents:
0
diff
changeset
|
1 ******************************************************************** |
02a8ba2b9092
Added headers to most source files, added clock2_bb.asm
boisy
parents:
0
diff
changeset
|
2 * VDGInt - CoCo 3 VDG I/O module |
02a8ba2b9092
Added headers to most source files, added clock2_bb.asm
boisy
parents:
0
diff
changeset
|
3 * |
02a8ba2b9092
Added headers to most source files, added clock2_bb.asm
boisy
parents:
0
diff
changeset
|
4 * $Id$ |
02a8ba2b9092
Added headers to most source files, added clock2_bb.asm
boisy
parents:
0
diff
changeset
|
5 * |
1342
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
6 * |
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
7 * Edt/Rev YYYY/MM/DD Modified by |
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
8 * Comment |
508
02a8ba2b9092
Added headers to most source files, added clock2_bb.asm
boisy
parents:
0
diff
changeset
|
9 * ------------------------------------------------------------------ |
1342
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
10 * 4 2003/01/09 Boisy G. Pitre |
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
11 * Quite a few changes: |
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
12 * - Merged in CoCo 2 gfx code from original OS-9 Level 2 code. |
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
13 * - Incorporated code tweaks for 6809 and 6309 code from the vdgint_small |
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
14 * and vdgint_tiny source files. |
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
15 * - Fixed long-standing cursor color bug. |
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
16 * - Fixed long-standing F$SRtMem bug in CoCo 2 "graphics end" code $12 |
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
17 * (see comments) |
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
18 * |
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
19 * 4r1 2003/09/16 Robert Gault |
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
20 * Added patch to work 1MB and 2MB CoCo 3s. |
508
02a8ba2b9092
Added headers to most source files, added clock2_bb.asm
boisy
parents:
0
diff
changeset
|
21 |
0 | 22 nam VDGInt |
23 ttl CoCo 3 VDG I/O module | |
24 | |
25 * Disassembled 98/09/31 12:15:57 by Disasm v1.6 (C) 1988 by RML | |
26 | |
27 ifp1 | |
28 use defsfile | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
29 use vdgdefs |
0 | 30 endc |
31 | |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
32 FFStSz equ 512 flood fill stack size in bytes |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
33 |
0 | 34 tylg set Systm+Objct |
35 atrv set ReEnt+rev | |
1342
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
36 rev set $01 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
37 edition set 4 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
38 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
39 skip2 equ $8C cmpx instruction |
0 | 40 |
41 mod eom,name,tylg,atrv,start,size | |
42 | |
43 u0000 rmb 0 | |
44 size equ . | |
45 | |
46 fcb $07 | |
47 | |
48 name fcs /VDGInt/ | |
49 fcb edition | |
50 | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
51 start lbra Read actually more like INIZ... |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
52 lbra Write |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
53 lbra GetStat |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
54 lbra SetStat |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
55 lbra Term |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
56 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
57 * Update Window |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
58 * Called from CC3IO |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
59 * Entry: A = function code |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
60 * 0 = select new window to be active |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
61 * 1 = update mouse packet |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
62 * >1 = only used by GRFINT/WINDINT |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
63 * U = device memory pointer |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
64 * X = path descriptor pointer |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
65 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
66 tsta zero? |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
67 bne L0035 branch if not |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
68 ldb <VD.DGBuf,u get number of currently displayed buffer |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
69 lbne ShowS branch if not zero |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
70 ldd <VD.TFlg1,u |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
71 lbra DispAlfa |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
72 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
73 L0035 deca set x,y size of window? |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
74 beq L003B branch if so |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
75 clrb no errors |
0 | 76 rts |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
77 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
78 L003B ldx <D.CCMem pointer to start of CC memory |
1268 | 79 leax <G.Mouse+Pt.AcX,x to X,Y coor, X,Y window |
80 * leax <$54,x to X,Y coor, X,Y window | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
81 IFNE H6309 |
1268 | 82 ldq ,x get X,Y coordinate |
83 stq $04,x copy to window relative X,Y | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
84 ELSE |
0 | 85 ldd ,x |
86 std $04,x | |
87 ldd $02,x | |
88 std $06,x | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
89 ENDC |
0 | 90 clrb |
91 rts | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
92 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
93 * Terminate device |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
94 Term pshs u,y,x |
0 | 95 ldb #$03 |
96 L004E pshs b | |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
97 lbsr GetScrn get screen table entry into X |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
98 lbsr FreeBlks free blocks used by screen |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
99 puls b get count |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
100 decb decrement |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
101 bne L004E branch until zero |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
102 clr <VD.Start,u no screens in use |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
103 ldd #512 size of alpha screen |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
104 ldu <VD.ScrnA,u get pointer to alpha screen |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
105 beq ClrStat branch if none |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
106 os9 F$SRtMem else return memory |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
107 ClrStat ldb #$E1 size of 1 page -$1D (SCF memory requirements) |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
108 leax <VD.Strt1,u point to start of VDG statics |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
109 L006F clr ,x+ set stored byte to zero |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
110 decb decrement |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
111 bne L006F until zero |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
112 bra L00D5 and exit |
0 | 113 |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
114 * Read bytes from IN |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
115 * Actually, this is more like an INIZ of the device. |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
116 Read pshs u,y,x save regs |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
117 bsr SetupPal set up palettes |
0 | 118 lda #$AF |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
119 sta <VD.CColr,u default color cursor |
0 | 120 pshs u |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
121 ldd #768 gets 1 page on an odd page boundary |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
122 os9 F$SRqMem request from top of sys ram |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
123 bcs L00D6 error out of no system mem |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
124 tfr u,d U = addr of memory |
0 | 125 tfr u,x |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
126 bita #$01 test to see if on even page |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
127 beq IsEven branch if even |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
128 leax >256,x else point 100 bytes into mem |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
129 bra IsOdd and free |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
130 IsEven leau >512,u we only need 2 pages for the screen memory |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
131 IsOdd ldd #256 1 page return |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
132 os9 F$SRtMem return system memory |
0 | 133 puls u |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
134 stx <VD.ScrnA,u save start address of the screen |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
135 stx <VD.CrsrA,u and start cursor position |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
136 leax >512,x point to end of screen |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
137 stx <VD.ScrnE,u save it |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
138 lda #$60 get default character |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
139 sta <VD.CChar,u put character under the cursor |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
140 sta <VD.Chr1,u only referenced here ?? |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
141 lbsr ClrScrn clear the screen |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
142 inc <VD.Start,u increment VDG screen in use |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
143 ldd <VD.Strt1,u seemling useless?? |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
144 lbsr L054C set to true lowercase, screen size |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
145 leax <VD.NChar,u |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
146 stx <VD.EPlt1,u where to get next character from |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
147 stx <VD.EPlt2,u |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
148 ldu <D.CCMem |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
149 IFNE H6309 |
1268 | 150 oim #$02,<G.BCFFlg,u set to VDGINT found |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
151 ELSE |
1268 | 152 ldb <G.BCFFlg,u |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
153 orb #$02 set to VDGINT found |
1268 | 154 stb <G.BCFFlg,u |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
155 ENDC |
0 | 156 L00D5 clrb |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
157 L00D6 puls pc,u,y,x |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
158 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
159 SetupPal pshs u,y,x,b,a |
0 | 160 lda #$08 |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
161 sta <VD.PlFlg,u |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
162 leax >L011A,pcr default palette |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
163 leay <VD.Palet,u |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
164 L00E6 leau >L00F8,pcr CMP to RGB conversion |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
165 IFNE H6309 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
166 L00EA tfr u,w |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
167 ELSE |
0 | 168 L00EA pshs u |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
169 ENDC |
0 | 170 leau >L012A,pcr |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
171 ldb #16 |
0 | 172 L00F2 lda ,x+ |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
173 IFNE H6309 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
174 jmp ,w |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
175 ELSE |
0 | 176 jmp [,s] |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
177 ENDC |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
178 L00F6 lda a,u remap to CMP values |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
179 L00F8 sta ,y+ and save RGB data |
0 | 180 decb |
181 bne L00F2 | |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
182 IFEQ H6309 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
183 leas $02,s clean up stack |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
184 ENDC |
0 | 185 L00FF puls pc,u,y,x,b,a |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
186 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
187 SetPals pshs u,y,x,b,a puts palette data in. |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
188 lda >WGlobal+G.CrDvFl is this screen active? |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
189 beq L00FF 0 = not active |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
190 leax <VD.Palet,u point X to palette table |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
191 ldy #$FFB0 point Y to palette register |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
192 lda >WGlobal+G.MonTyp universal RGB/CMP 0 = CMP, 1 = RGB, 2 = MONO |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
193 bne L00E6 if not 0 (CMP) don't re-map colors |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
194 leau >L00F6,pcr else do re-map colors |
0 | 195 bra L00EA |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
196 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
197 L011A fcb $12,$36,$09,$24 default palette data |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
198 fcb $3f,$1b,$2d,$26 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
199 fcb $00,$12,$00,$3f |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
200 fcb $00,$12,$00,$26 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
201 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
202 * converts CMP to RGB |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
203 L012A fdb $000c,$020e,$0709,$0510 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
204 fdb $1c2c,$0d1d,$0b1b,$0a2b |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
205 fdb $2211,$1221,$0301,$1332 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
206 fdb $1e2d,$1f2e,$0f3c,$2f3d |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
207 fdb $1708,$1506,$2716,$2636 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
208 fdb $192a,$1a3a,$1829,$2838 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
209 fdb $1404,$2333,$2535,$2434 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
210 fdb $203B,$313E,$3739,$3F30 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
211 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
212 * Entry: A = char to write |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
213 * Y = path desc ptr |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
214 Write equ * |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
215 IFNE COCO2 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
216 cmpa #$0F |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
217 ELSE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
218 cmpa #$0E |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
219 ENDC |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
220 bls Dispatch |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
221 cmpa #$1B escape code? |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
222 lbeq Escape yes, do escape immediately |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
223 IFNE COCO2 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
224 cmpa #$1E |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
225 bcs Do1E |
0 | 226 cmpa #$1F |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
227 bls Dispatch |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
228 ELSE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
229 cmpa #$1F |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
230 lbls NoOp ignore gfx codes if not CoCo 2 compatible |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
231 ENDC |
0 | 232 tsta |
233 bmi L01BA | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
234 ldb <VD.CFlag,u |
0 | 235 beq L019A |
236 cmpa #$5E | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
237 bne L018A re-map characters from ASCII-VDG |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
238 clra |
0 | 239 bra L01BA |
240 L018A cmpa #$5F | |
241 bne L0192 | |
242 lda #$1F | |
243 bra L01BA | |
244 L0192 cmpa #$60 | |
245 bne L01AA | |
246 lda #$67 | |
247 bra L01BA | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
248 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
249 L019A cmpa #$7C true lowercase |
0 | 250 bne L01A2 |
251 lda #$21 | |
252 bra L01BA | |
253 L01A2 cmpa #$7E | |
254 bne L01AA | |
255 lda #$2D | |
256 bra L01BA | |
257 L01AA cmpa #$60 | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
258 bcs L01B2 re-map ASCII |
0 | 259 suba #$60 |
260 bra L01BA | |
261 L01B2 cmpa #$40 | |
262 bcs L01B8 | |
263 suba #$40 | |
264 L01B8 eora #$40 | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
265 L01BA ldx <VD.CrsrA,u |
0 | 266 sta ,x+ |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
267 stx <VD.CrsrA,u |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
268 cmpx <VD.ScrnE,u |
0 | 269 bcs L01CA |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
270 lbsr SScrl if at end of screen, scroll it |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
271 L01CA lbsr ShowCrsr ends with a CLRB/RTS anyhow |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
272 NoOp clrb |
0 | 273 rts |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
274 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
275 IFNE COCO2 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
276 Do1E lbsr ChkDvRdy |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
277 bcc Dispatch |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
278 rts |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
279 ENDC |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
280 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
281 Dispatch leax >DCodeTbl,pcr |
0 | 282 lsla |
283 ldd a,x | |
284 jmp d,x | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
285 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
286 DCodeTbl fdb NoOp-DCodeTbl $00 - No Operation |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
287 fdb CurHome-DCodeTbl $01 - Home Cursor |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
288 fdb CurXY-DCodeTbl $02 - Move Cursor |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
289 fdb DelLine-DCodeTbl $03 - Delete Line |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
290 fdb ErEOLine-DCodeTbl $04 - Erase to End Of Line |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
291 fdb CrsrSw-DCodeTbl $05 - Switch Cursor Color |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
292 fdb CurRght-DCodeTbl $06 - Move Cursor Right |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
293 fdb NoOp-DCodeTbl $07 - Bell (Handled by CC3IO) |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
294 fdb CurLeft-DCodeTbl $08 - Move Cursor Left |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
295 fdb CurUp-DCodeTbl $09 - Move Cursor Up |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
296 fdb CurDown-DCodeTbl $0A - Move Cursor Down |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
297 fdb ErEOScrn-DCodeTbl $0B - Erase to End Of Screen |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
298 fdb ClrScrn-DCodeTbl $0C - Clear Screen |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
299 fdb Retrn-DCodeTbl $0D - Carriage Return |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
300 fdb Do0E-DCodeTbl $0E - Display Alpha Screen |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
301 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
302 IFNE COCO2 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
303 fdb Do0F-DCodeTbl $0F - Display Graphics |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
304 fdb Do10-DCodeTbl $10 - Preset Screen |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
305 fdb Do11-DCodeTbl $11 - Set Color |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
306 fdb Do12-DCodeTbl $12 - End Graphics |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
307 fdb Do13-DCodeTbl $13 - Erase Graphics |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
308 fdb Do14-DCodeTbl $14 - Home Graphics Cursor |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
309 fdb Do15-DCodeTbl $15 - Set Graphics Cursor |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
310 fdb Do16-DCodeTbl $16 - Draw Line |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
311 fdb Do17-DCodeTbl $17 - Erase Line |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
312 fdb Do18-DCodeTbl $18 - Set Point |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
313 fdb Do19-DCodeTbl $19 - Erase Point |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
314 fdb Do1A-DCodeTbl $1A - Draw Circle |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
315 fdb Escape-DCodeTbl $1B - Escape |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
316 fdb Do1C-DCodeTbl $1C - Erase Circle |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
317 fdb Do1D-DCodeTbl $1D - Flood Fill |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
318 fdb NoOp-DCodeTbl $1E - No Operation |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
319 fdb NoOp-DCodeTbl $1F - No Operation |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
320 ENDC |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
321 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
322 * Code fragment from original CoCo 3 VDGInt by Tandy - not referenced |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
323 * comb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
324 * ldb #E$Write |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
325 * rts |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
326 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
327 * $1B does palette changes |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
328 Escape ldx <VD.EPlt1,u now X points to VD.NChar |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
329 lda ,x get char following |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
330 cmpa #$30 default color? |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
331 bne L0209 branch if not |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
332 lbsr SetupPal do default palette |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
333 lbra L026E put palette and exit |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
334 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
335 L0209 cmpa #$31 change palette? |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
336 IFNE COCO2 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
337 lbeq PalProc branch if so |
0 | 338 cmpa #$21 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
339 lbne NoOp return without error |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
340 ldx PD.RGS,y get registers |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
341 lda R$A,x get path |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
342 ldx <D.Proc get current proc |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
343 cmpa >P$SelP,x compare against selected path |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
344 beq L0249 branch if empty |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
345 ldb >P$SelP,x else load selected path from process descriptor |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
346 sta >P$SelP,x and store passed path |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
347 pshs y save our path desc ptr |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
348 bsr L024A get device table entry for path |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
349 ldy V$STAT,y get driver statics |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
350 ldx <D.CCMem get CoCo memory |
1268 | 351 cmpy <G.CurDev,x |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
352 puls y restore our path desc ptr |
0 | 353 bne L0248 |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
354 inc <VD.DFlag,u |
1268 | 355 ldy <G.CurDev,x get current static mem |
356 sty <G.PrWMPt,x copy to previous | |
357 stu <G.CurDev,x and save new static mem ptr | |
0 | 358 L0248 clrb |
359 L0249 rts | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
360 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
361 * Entry: A = path to process |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
362 L024A leax <P$Path,x point to path table in process descriptor |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
363 lda b,x get system path number |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
364 ldx <D.PthDBT point to path descriptor base table |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
365 os9 F$Find64 put found path descriptor in Y |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
366 ldy PD.DEV,y load Y with device table entry |
0 | 367 rts |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
368 ELSE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
369 bne NoOp |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
370 ENDC |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
371 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
372 PalProc leax <DoPals,pcr |
0 | 373 ldb #$02 |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
374 lbra GChar |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
375 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
376 DoPals ldx <VD.EPlt1,u |
0 | 377 ldd ,x |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
378 cmpa #16 max 16 palettes |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
379 lbhi IllArg |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
380 cmpb #63 color has max. 63 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
381 lbhi IllArg |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
382 leax <VD.Palet,u to palette buffer |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
383 stb a,x save it |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
384 L026E lbsr SetPals |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
385 clrb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
386 rts |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
387 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
388 * anda #$0F |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
389 * andb #$3F |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
390 * leax <VD.Palet,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
391 * stb a,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
392 *L026E inc <VD.DFlag,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
393 * clrb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
394 * rts |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
395 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
396 * Screen scroll |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
397 SScrl ldx <VD.ScrnA,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
398 IFNE H6309 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
399 ldd #$2060 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
400 leay a,x down one line |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
401 ldw #512-32 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
402 tfm y+,x+ scroll screen up |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
403 stx <VD.CrsrA,u save new cursor address |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
404 ELSE |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
405 leax <32,x |
0 | 406 L0279 ldd ,x++ |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
407 std <-34,x |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
408 cmpx <VD.ScrnE,u |
0 | 409 bcs L0279 |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
410 leax <-32,x |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
411 stx <VD.CrsrA,u |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
412 lda #32 |
0 | 413 ldb #$60 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
414 ENDC |
0 | 415 L028D stb ,x+ |
416 deca | |
417 bne L028D | |
418 rts | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
419 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
420 * $0D - carriage return |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
421 Retrn bsr HideCrsr hide cursor |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
422 IFNE H6309 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
423 aim #$E0,<VD.CrsAL,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
424 ELSE |
0 | 425 tfr x,d |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
426 andb #$E0 strip out bits 0-4 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
427 stb <VD.CrsAL,u save updated cursor address |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
428 ENDC |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
429 ShowCrsr ldx <VD.CrsrA,u get cursor address |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
430 lda ,x get char at cursor position |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
431 sta <VD.CChar,u save it |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
432 lda <VD.CColr,u get cusor character |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
433 beq RtsOk branch if none |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
434 L02A9 sta ,x else turn on cursor |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
435 RtsOk clrb |
0 | 436 rts |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
437 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
438 * $0A - moves cursor down |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
439 CurDown bsr HideCrsr hide cursor |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
440 leax <32,x move X down one line |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
441 cmpx <VD.SCrnE,u at the end of the screen? |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
442 bcs L02C1 branch if not |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
443 leax <-32,x else go back up one line |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
444 pshs x save X |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
445 lbsr SScrl and scroll the screen |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
446 puls x and restore pointer |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
447 L02C1 stx <VD.CrsrA,u save cursor pointer |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
448 bra ShowCrsr show cursor |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
449 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
450 * $08 - moves cursor left one |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
451 CurLeft bsr HideCrsr hide cursor |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
452 cmpx <VD.ScrnA,u compare against start of screen |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
453 bls ShowCrsr ignore it if at the screen start |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
454 leax -$01,x else back up one |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
455 stx <VD.CrsrA,u save updated pointer |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
456 bra ShowCrsr and show cur |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
457 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
458 * $06 - moves cursor right one |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
459 CurRght bsr HideCrsr hide cursor |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
460 leax 1,x move to the right |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
461 cmpx <VD.SCrnE,u compare against start of screen |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
462 bcc ShowCrsr if past end, ignore it |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
463 stx <VD.CrsrA,u else save updated pointer |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
464 bra ShowCrsr and show cursor |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
465 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
466 * $0B - erase from current char to end of screen |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
467 ErEOScrn bsr HideCrsr kill the cursor |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
468 * bra L02E8 and clear the rest of the screen |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
469 fcb skip2 |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
470 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
471 * $0C - clear screen & home cursor |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
472 ClrScrn bsr CurHome home cursor (returns X pointing to start of screen) |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
473 lda #$60 get default char |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
474 ClrSLoop sta ,x+ save at location |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
475 cmpx <VD.SCrnE,u end of screen? |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
476 bcs ClrSLoop branch if not |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
477 bra ShowCrsr now show cursor |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
478 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
479 * $01 - Homes the cursor |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
480 CurHome bsr HideCrsr hide cursor |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
481 ldx <VD.ScrnA,u get pointer to screen |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
482 stx <VD.CrsrA,u save as new cursor position |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
483 bra ShowCrsr and show it |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
484 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
485 * Hides the cursor from the screen |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
486 * Exit: X = address of cursor |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
487 HideCrsr ldx <VD.CrsrA,u get address of cursor in X |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
488 lda <VD.CChar,u get value of char under cursor |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
489 sta ,x put char in place of cursor |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
490 clrb must be here, in general, for [...] BRA HideCrsr |
0 | 491 rts |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
492 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
493 * $05 - turns cursor on/off, color |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
494 CrsrSw lda <VD.NChar,u get next char |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
495 suba #C$SPAC take out ASCII space |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
496 bne L0313 branch if not zero |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
497 sta <VD.CColr,u else save cursor color zero (no cursor) |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
498 bra HideCrsr and hide cursor |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
499 L0313 cmpa #$0B greater than $0B? |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
500 bge RtsOk yep, just ignore byte |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
501 cmpa #$01 is it one? |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
502 bgt L031F branch if greater |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
503 lda #$AF else get default blue cursor color |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
504 bra L032F and save cursor color |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
505 L031F cmpa #$02 is it two? |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
506 bgt L0327 branch if larger |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
507 lda #$A0 else get black cursor color |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
508 bra L032F and save it |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
509 ** BUG ** BUG ** BUG ** BUG |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
510 L0327 suba #$03 ** BUG FIXED ! ** !!! Was SUBB |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
511 lsla shift into upper nibble |
0 | 512 lsla |
513 lsla | |
514 lsla | |
515 ora #$8F | |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
516 L032F sta <VD.CColr,u save new cursor |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
517 ldx <VD.CrsrA,u get cursor address |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
518 lbra L02A9 branch to save cursor in X |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
519 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
520 * $02 - moves cursor to X,Y |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
521 CurXY ldb #$02 we want to claim the next two chars |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
522 leax <DoCurXY,pcr point to processing routine |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
523 lbra GChar get two chars |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
524 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
525 DoCurXY bsr HideCrsr hide cursor |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
526 ldb <VD.NChr2,u get ASCII Y-pos |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
527 subb #C$SPAC take out ASCII space |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
528 lda #32 go down |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
529 mul multiply it |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
530 addb <VD.NChar,u add in X-pos |
0 | 531 adca #$00 |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
532 subd #C$SPAC take out another ASCII space |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
533 addd <VD.ScrnA,u add top of screen address |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
534 cmpd <VD.ScrnE,u at end of the screen? |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
535 lbcc RtsOk exit if off the screen |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
536 std <VD.CrsrA,u otherwise save new cursor address |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
537 lbra ShowCrsr and show cursor |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
538 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
539 * $04 - clear characters to end of line |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
540 ErEOLine bsr HideCrsr hide cursor |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
541 tfr x,d move current cursor position to D |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
542 andb #$1F number of characters put on this line |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
543 negb negative |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
544 bra L0374 and clear one line |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
545 * pshs b |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
546 * ldb #32 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
547 * subb ,s+ |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
548 * bra L0376 and clear one line |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
549 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
550 * $03 - erase line cursor is on |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
551 DelLine lbsr Retrn do a carriage return |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
552 * ldb #32 B = $00 from Retrn |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
553 L0374 addb #32 B = $00 from Retrn |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
554 L0376 lda #$60 get default char |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
555 ldx <VD.CrsrA,u get cursor address |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
556 L037B sta ,x+ save default char |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
557 decb decrement |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
558 bne L037B and branch if not end |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
559 lbra ShowCrsr else show cursor |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
560 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
561 * $09 - moves cursor up one line |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
562 CurUp lbsr HideCrsr hide cursor |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
563 leax <-32,x move X up one line |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
564 cmpx <VD.ScrnA,u compare against start of screen |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
565 lbcs ShowCrsr branch if we went beyond |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
566 stx <VD.CrsrA,u else store updated X |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
567 L0391 lbra ShowCrsr and show cursor |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
568 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
569 * $0E - switches from graphics to alpha mode |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
570 Do0E equ * |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
571 IFNE H6309 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
572 clrd |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
573 ELSE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
574 clra |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
575 clrb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
576 ENDC |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
577 DispAlfa pshs x,y,a |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
578 IFNE COCO2 |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
579 stb <VD.Alpha,u |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
580 ENDC |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
581 clr <VD.DGBuf,u |
0 | 582 lda >PIA1Base+2 |
583 anda #$07 | |
584 ora ,s+ | |
585 tstb | |
586 bne L03AD | |
587 anda #$EF | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
588 ora <VD.CFlag,u lowercase flag |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
589 L03AD sta <VD.TFlg1,u save VDG info |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
590 tst >WGlobal+G.CrDvFl is this screen currently showing? |
0 | 591 lbeq L0440 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
592 sta >PIA1Base+2 set lowercase in hardware |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
593 ldy #$FFC6 Ok, now set up via old CoCo 2 mode |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
594 IFNE COCO2 |
0 | 595 tstb |
596 bne L03CB | |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
597 ENDC |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
598 * Set up VDG screen for text |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
599 stb -6,y $FFC0 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
600 stb -4,y $FFC2 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
601 stb -2,y $FFC4 |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
602 lda <VD.ScrnA,u |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
603 IFNE COCO2 |
0 | 604 bra L03D7 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
605 * Set up VDG screen for graphics |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
606 L03CB stb -6,y $FFC0 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
607 stb -3,y $FFC3 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
608 stb -1,y $FFC5 |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
609 lda <VD.SBAdd,u |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
610 ENDC |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
611 L03D7 lbsr SetPals |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
612 ldb <D.HINIT |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
613 orb #$80 set CoCo 2 compatible mode |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
614 stb <D.HINIT |
0 | 615 stb >$FF90 |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
616 ldb <D.VIDMD |
0 | 617 andb #$78 |
618 stb >$FF98 | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
619 stb <D.VIDMD |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
620 pshs a |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
621 IFNE H6309 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
622 clrd |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
623 ELSE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
624 clra |
0 | 625 clrb |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
626 ENDC |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
627 std >$FF99 set resolution AND border color |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
628 std <D.VIDRS |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
629 puls a |
0 | 630 tfr a,b |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
631 anda #$1F |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
632 pshs a |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
633 andb #$E0 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
634 lsrb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
635 lsrb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
636 lsrb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
637 lsrb |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
638 ldx <D.SysDAT |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
639 * leax a,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
640 abx |
1342
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
641 * lda $01,x get block number to use |
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
642 * pshs a |
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
643 * anda #$F8 keep high bits only |
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
644 * lsla |
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
645 * lsla |
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
646 * clrb |
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
647 * PATCH START: Mod for >512K systems, Robert Gault |
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
648 ldb 1,x get block number to use |
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
649 pshs b |
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
650 andb #$F8 keep high bits only |
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
651 clra |
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
652 lslb |
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
653 rola |
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
654 lslb |
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
655 rola |
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
656 sta >$FF9B |
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
657 tfr b,a |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
658 clrb |
1342
d358f0c1df3d
Added patch by Robert Gault to work with >512K systems
boisy
parents:
1289
diff
changeset
|
659 * PATCH END: Mod for >512K systems, Robert Gault |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
660 std <D.VOFF1 display it |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
661 std >$FF9D |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
662 ldd #$0F07 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
663 sta <D.VOFF2 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
664 sta >$FF9C |
0 | 665 puls a |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
666 asla |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
667 asla |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
668 asla |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
669 asla |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
670 asla |
0 | 671 ora ,s+ |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
672 * Y now holds $FFC6, so we don't need to work with X here |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
673 * ldx #$FFC6 |
0 | 674 lsra |
675 L0430 lsra | |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
676 bcc L041A |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
677 leay 1,y |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
678 sta ,y+ |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
679 fcb skip2 skip 2 bytes |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
680 L041A sta ,y++ rather than additional leax 1,x on next line |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
681 decb |
0 | 682 bne L0430 |
683 L0440 clrb | |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
684 puls pc,y,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
685 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
686 GChar1 ldb #$01 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
687 GChar stb <VD.NGChr,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
688 stx <VD.RTAdd,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
689 clrb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
690 rts |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
691 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
692 IFNE COCO2 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
693 * $0F - display graphics |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
694 Do0F leax <DispGfx,pcr |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
695 ldb #$02 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
696 bra GChar |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
697 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
698 DispGfx ldb <VD.Rdy,u memory already alloced? |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
699 bne L0468 branch if so |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
700 lbsr Get8KHi else get an 8k block from high ram |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
701 bcs L0486 branch if error |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
702 stb <VD.GBuff,u save starting block number |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
703 stb <VD.Blk,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
704 tfr d,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
705 ldd <D.Proc |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
706 pshs u,b,a |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
707 ldd <D.SysPrc get system proc desc |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
708 std <D.Proc make current |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
709 ldb #$01 one block |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
710 os9 F$MapBlk map it in to our space |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
711 tfr u,x get address into x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
712 puls u,b,a restore other regs |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
713 std <D.Proc restore process pointer |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
714 bcs L0486 branch if error occurred |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
715 stx <VD.SBAdd,u else store address of gfx mem |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
716 inc <VD.Rdy,u we're ready |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
717 lda #$01 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
718 ldb #$20 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
719 bsr L04D9 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
720 lbsr Do13 erase gfx screen |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
721 L0468 lda <VD.NChr2,u get character after next |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
722 sta <VD.PMask,u store color set (0-3) |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
723 anda #$03 mask off pertinent bytes |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
724 leax >Mode1Clr,pcr point to mask byte table |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
725 lda a,x get byte |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
726 sta <VD.Msk1,u save mask byte here |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
727 sta <VD.Msk2,u and here |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
728 lda <VD.NChar,u get next char, mode byte (0-1) |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
729 cmpa #$01 compare against max |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
730 bls L0487 branch if valid |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
731 comb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
732 ldb #E$BMode else invalid mode specified, send error |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
733 L0486 rts |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
734 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
735 L0487 tsta test user supplied mode byte |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
736 beq L04A7 branch if 256x192 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
737 ldd #$C003 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
738 std <VD.MCol,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
739 lda #$01 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
740 sta <VD.Mode,u 128x192 mode |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
741 lda #$E0 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
742 ldb <VD.NChr2,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
743 andb #$08 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
744 beq L04A0 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
745 lda #$F0 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
746 L04A0 ldb #$03 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
747 leax <L04EB,pcr |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
748 bra L04C4 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
749 L04A7 ldd #$8001 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
750 std <VD.MCol,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
751 lda #$FF |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
752 tst <VD.Msk1,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
753 beq L04BA |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
754 sta <VD.Msk1,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
755 sta <VD.Msk2,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
756 L04BA sta <VD.Mode,u 256x192 mode |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
757 lda #$F0 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
758 ldb #$07 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
759 leax <L04EF,pcr |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
760 L04C4 stb <VD.PixBt,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
761 stx <VD.MTabl,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
762 ldb <VD.NChr2,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
763 andb #$04 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
764 lslb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
765 pshs b |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
766 ora ,s+ |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
767 ldb #$01 |
1395 | 768 * Indicate screen is current; next line is critical for >512K - Robert Gault |
769 stb >WGlobal+G.CrDvFl is this screen currently showing? | |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
770 lbra DispAlfa |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
771 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
772 L04D9 pshs x,b,a |
0 | 773 clra |
774 ldb $02,s | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
775 ldx <D.SysMem |
0 | 776 leax d,x |
777 puls b,a | |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
778 L04E4 sta ,x+ |
0 | 779 decb |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
780 bne L04E4 |
0 | 781 puls pc,x |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
782 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
783 L04EB fdb $C030,$0C03 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
784 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
785 L04EF fcb $80,$40,$20,$10,$08,$04,$02,$01 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
786 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
787 * $11 - set color |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
788 Do11 leax <SetColor,pcr |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
789 lbra GChar1 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
790 SetColor lda <VD.NChar,u get next char |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
791 sta <VD.NChr2,u save in next after |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
792 L0503 clr <VD.NChar,u and clear next |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
793 lda <VD.Mode,u which mode? |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
794 bmi L050E branch if 256x192 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
795 inc <VD.NChar,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
796 L050E lbra L0468 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
797 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
798 * $12 - end graphics |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
799 Do12 ldx <VD.SBAdd,u get screen address |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
800 beq L051B branch if empty |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
801 clra |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
802 ldb #$20 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
803 bsr L04D9 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
804 L051B leay <VD.GBuff,u point Y to graphics buffer block numbers |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
805 ldb #$03 number of blocks starting at VD.GBuff |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
806 pshs u,b save our static pointer, and counter (3) |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
807 L0522 lda ,y+ get next block |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
808 beq L052D if empty, continue |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
809 clrb else clear B |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
810 tfr d,x transfer D to X |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
811 incb 1 block to deallocate |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
812 os9 F$DelRAM deallocate it |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
813 L052D dec ,s dec counter |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
814 bgt L0522 if not zero, get more |
1070 | 815 * Note: this seems to be a bug. Here, Y is pointing to VD.HiRes ($4D), which |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
816 * is the block number of any CoCo 3 Hi-Res screen. This $0E command just |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
817 * deals with CoCo 2 graphics modes. What I think should happen here is |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
818 * that the byte flood fill buffer should be checked for non-zero, |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
819 * then freed. It looks as though this code would work IF the Hi-Res |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
820 * variables from $4D-$5B, which are CoCo 3 specific, didn't exist. So |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
821 * this bug was introduced when the CoCo 3 specific static vars were added |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
822 * between VD.AGBuf and VD.FFMem |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
823 ldu VD.FFMem-VD.HiRes,y get flood fill stack memory ptr |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
824 beq L053B |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
825 ldd #FFStSz get flood fill stack size |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
826 os9 F$SRtMem |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
827 L053B puls u,b |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
828 clr <VD.Rdy,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
829 lbra Do0E |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
830 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
831 * $10 - preset screen to a specific color |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
832 Do10 leax <PrstScrn,pcr |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
833 lbra GChar1 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
834 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
835 PrstScrn lda <VD.NChar,u get next char |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
836 tst <VD.Mode,u which mode? |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
837 bpl L0559 branch if 128x192 4 color |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
838 ldb #$FF assume we will clear with $FF |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
839 anda #$01 mask out all but 1 bit (2 colors) |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
840 beq Do13 erase graphic screen with color $00 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
841 bra L0564 else erase with color $FF |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
842 L0559 anda #$03 mask out all but 2 bits (4 colors) |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
843 leax >Mode1Clr,pcr point to color table |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
844 ldb a,x get appropriate byte |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
845 bra L0564 and start the clearing |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
846 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
847 * $13 - erase graphics |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
848 Do13 clrb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
849 L0564 ldx <VD.SBAdd,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
850 IFNE H6309 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
851 * Note: 6309 version clears from top to bottom |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
852 * 6809 version clears from bottom to top |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
853 ldw #$1800 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
854 pshs b |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
855 tfm s,x+ |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
856 puls b |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
857 ELSE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
858 leax >$1801,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
859 L056B stb ,-x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
860 cmpx <VD.SBAdd,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
861 bhi L056B |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
862 ENDC |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
863 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
864 * $14 - home graphics cursor |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
865 Do14 equ * |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
866 IFNE H6309 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
867 clrd |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
868 ELSE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
869 clra |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
870 clrb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
871 ENDC |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
872 std <VD.GCrsX,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
873 rts |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
874 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
875 * 128x192 4 color pixel table |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
876 Mode1Clr fcb $00,$55,$aa,$ff |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
877 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
878 * Fix X/Y coords: |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
879 * - if Y > 191 then cap it at 191 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
880 * - adjust X coord if in 128x192 mode |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
881 FixXY ldd <VD.NChar,u get next 2 chars |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
882 cmpb #192 Y greater than max? |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
883 bcs L0585 branch if lower than |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
884 ldb #191 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
885 L0585 tst <VD.Mode,u which mode? |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
886 bmi L058B branch if 256x192 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
887 lsra else divide X by 2 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
888 L058B std <VD.NChar,u and save |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
889 rts |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
890 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
891 * $15 - set graphics cursor |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
892 Do15 leax <SetGC,pcr |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
893 GChar2 ldb #$02 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
894 lbra GChar |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
895 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
896 SetGC bsr FixXY fix coords |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
897 std <VD.GCrsX,u and save new gfx cursor pos |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
898 clrb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
899 rts |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
900 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
901 * $19 - erase point |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
902 Do19 clr <VD.Msk1,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
903 * $18 - set point |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
904 Do18 leax <DrawPnt,pcr |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
905 bra GChar2 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
906 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
907 DrawPnt bsr FixXY fix coords |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
908 std <VD.GCrsX,u save as new gfx cursor pos |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
909 bsr DrwPt2 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
910 lbra L067C |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
911 DrwPt2 lbsr XY2Addr |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
912 L05B3 tfr a,b |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
913 comb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
914 andb ,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
915 stb ,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
916 anda <VD.Msk1,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
917 ora ,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
918 sta ,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
919 rts |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
920 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
921 * $17 - erase line |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
922 Do17 clr <VD.Msk1,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
923 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
924 * $16 - draw line |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
925 Do16 leax <DrawLine,pcr |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
926 bra GChar2 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
927 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
928 DrawLine bsr FixXY fix up coords |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
929 leas -$0E,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
930 std $0C,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
931 lbsr XY2Addr |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
932 stx $02,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
933 sta $01,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
934 ldd <VD.GCrsX,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
935 lbsr XY2Addr |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
936 sta ,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
937 IFNE H6309 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
938 clrd |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
939 ELSE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
940 clra |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
941 clrb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
942 ENDC |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
943 std $04,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
944 lda #$BF |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
945 suba <VD.GCrsY,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
946 sta <VD.GCrsY,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
947 lda #$BF |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
948 suba <VD.NChr2,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
949 sta <VD.NChr2,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
950 lda #$FF |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
951 sta $06,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
952 clra |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
953 ldb <VD.GCrsX,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
954 subb <VD.NChar,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
955 sbca #$00 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
956 bpl L0608 |
1262 | 957 IFNE H6309 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
958 negd |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
959 ELSE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
960 nega |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
961 negb |
1262 | 962 sbca #$00 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
963 ENDC |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
964 neg $06,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
965 L0608 std $08,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
966 bne L0611 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
967 ldd #$FFFF |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
968 std $04,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
969 L0611 lda #$E0 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
970 sta $07,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
971 clra |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
972 ldb <VD.GCrsY,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
973 subb <VD.NChr2,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
974 sbca #$00 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
975 bpl L0626 |
1262 | 976 IFNE H6309 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
977 negd |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
978 ELSE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
979 nega |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
980 negb |
1262 | 981 sbca #$00 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
982 ENDC |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
983 neg $07,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
984 L0626 std $0A,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
985 bra L0632 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
986 L062A sta ,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
987 ldd $04,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
988 subd $0A,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
989 std $04,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
990 L0632 lda ,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
991 lbsr L05B3 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
992 cmpx $02,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
993 bne L0641 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
994 lda ,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
995 cmpa $01,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
996 beq L0675 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
997 L0641 ldd $04,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
998 bpl L064F |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
999 addd $08,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1000 std $04,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1001 lda $07,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1002 leax a,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1003 bra L0632 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1004 L064F lda ,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1005 ldb $06,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1006 bpl L0665 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1007 lsla |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1008 ldb <VD.Mode,u which mode? |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1009 bmi L065C branch if 256x192 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1010 lsla |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1011 L065C bcc L062A |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1012 lda <VD.MCol2,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1013 leax -$01,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1014 bra L062A |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1015 L0665 lsra |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1016 ldb <VD.Mode,u which mode? |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1017 bmi L066C branch if 256x192 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1018 lsra |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1019 L066C bcc L062A |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1020 lda <VD.MCol,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1021 leax $01,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1022 bra L062A |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1023 L0675 ldd $0C,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1024 std <VD.GCrsX,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1025 leas $0E,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1026 L067C lda <VD.Msk2,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1027 sta <VD.Msk1,u |
0 | 1028 clrb |
1029 rts | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1030 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1031 * $1C - erase circle |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1032 Do1C clr <VD.Msk1,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1033 * $1A - draw circle |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1034 Do1A leax <Circle,pcr |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1035 lbra GChar1 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1036 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1037 Circle leas -$04,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1038 ldb <VD.NChar,u get radius |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1039 stb $01,s store on stack |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1040 clra |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1041 sta ,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1042 addb $01,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1043 adca #$00 |
1262 | 1044 IFNE H6309 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1045 negd |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1046 ELSE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1047 nega |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1048 negb |
1262 | 1049 sbca #$00 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1050 ENDC |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1051 addd #$0003 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1052 std $02,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1053 L06AB lda ,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1054 cmpa $01,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1055 bcc L06DD |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1056 ldb $01,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1057 bsr L06EB |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1058 clra |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1059 ldb $02,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1060 bpl L06C5 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1061 ldb ,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1062 IFNE H6309X |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1063 lsld |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1064 lsld |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1065 ELSE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1066 lslb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1067 rola |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1068 lslb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1069 rola |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1070 ENDC |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1071 addd #$0006 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1072 bra L06D5 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1073 L06C5 dec $01,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1074 clra |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1075 ldb ,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1076 subb $01,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1077 sbca #$00 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1078 IFNE H6309X |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1079 lsld |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1080 lsld |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1081 ELSE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1082 lslb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1083 rola |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1084 lslb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1085 rola |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1086 ENDC |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1087 addd #$000A |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1088 L06D5 addd $02,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1089 std $02,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1090 inc ,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1091 bra L06AB |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1092 L06DD lda ,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1093 cmpa $01,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1094 bne L06E7 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1095 ldb $01,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1096 bsr L06EB |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1097 L06E7 leas $04,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1098 bra L067C |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1099 L06EB leas -$08,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1100 sta ,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1101 clra |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1102 std $02,s |
1262 | 1103 IFNE H6309 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1104 negd |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1105 ELSE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1106 nega |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1107 negb |
1262 | 1108 sbca #$00 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1109 ENDC |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1110 std $06,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1111 ldb ,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1112 clra |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1113 std ,s |
1262 | 1114 IFNE H6309 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1115 negd |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1116 ELSE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1117 nega |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1118 negb |
1262 | 1119 sbca #$00 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1120 ENDC |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1121 std $04,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1122 ldx $06,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1123 bsr L0734 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1124 ldd $04,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1125 ldx $02,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1126 bsr L0734 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1127 ldd ,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1128 ldx $02,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1129 bsr L0734 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1130 ldd ,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1131 ldx $06,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1132 bsr L0734 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1133 ldd $02,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1134 ldx ,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1135 bsr L0734 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1136 ldd $02,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1137 ldx $04,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1138 bsr L0734 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1139 ldd $06,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1140 ldx $04,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1141 bsr L0734 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1142 ldd $06,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1143 ldx ,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1144 bsr L0734 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1145 leas $08,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1146 rts |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1147 L0734 pshs b,a |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1148 ldb <VD.GCrsY,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1149 clra |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1150 leax d,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1151 cmpx #$0000 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1152 bmi L0746 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1153 cmpx #$00BF |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1154 ble L0748 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1155 L0746 puls pc,b,a |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1156 L0748 ldb <VD.GCrsX,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1157 clra |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1158 tst <VD.Mode,u which mode? |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1159 bmi L0753 branch if 256x192 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1160 IFNE H6309X |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1161 lsld |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1162 ELSE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1163 lslb else multiply D by 2 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1164 rola |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1165 ENDC |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1166 L0753 addd ,s++ |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1167 tsta |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1168 beq L0759 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1169 rts |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1170 L0759 pshs b |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1171 tfr x,d |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1172 puls a |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1173 tst <VD.Mode,u which mode? |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1174 lbmi DrwPt2 branch if 256x192 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1175 lsra else divide a by 2 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1176 lbra DrwPt2 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1177 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1178 * $1D - flood fill |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1179 Do1D clr <VD.FF6,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1180 leas -$07,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1181 lbsr L08DD |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1182 lbcs L0878 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1183 lda #$FF |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1184 sta <VD.FFFlg,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1185 ldd <VD.GCrsX,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1186 lbsr L0883 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1187 lda <VD.FF1,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1188 sta <VD.FF2,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1189 tst <VD.Mode,u which mode? |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1190 bpl L0793 branch if 128x192 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1191 tsta |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1192 beq L0799 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1193 lda #$FF |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1194 bra L0799 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1195 L0793 leax >Mode1Clr,pcr |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1196 lda a,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1197 L0799 sta <VD.FFMsk,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1198 cmpa <VD.Msk1,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1199 lbeq L0878 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1200 ldd <VD.GCrsX,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1201 L07A6 suba #$01 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1202 bcs L07B1 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1203 lbsr L0883 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1204 bcs L07B1 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1205 beq L07A6 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1206 L07B1 inca |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1207 std $01,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1208 L07B4 lbsr L08B6 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1209 adda #$01 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1210 bcs L07C2 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1211 lbsr L0883 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1212 bcs L07C2 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1213 beq L07B4 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1214 L07C2 deca |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1215 ldx $01,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1216 lbsr L0905 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1217 neg <VD.FFFlg,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1218 lbsr L0905 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1219 L07CE lbsr L092B |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1220 lbcs L0878 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1221 tst <VD.FFFlg,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1222 bpl L07E5 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1223 subb #$01 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1224 bcs L07CE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1225 std $03,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1226 tfr x,d |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1227 decb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1228 bra L07EF |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1229 L07E5 incb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1230 cmpb #$BF |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1231 bhi L07CE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1232 std $03,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1233 tfr x,d |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1234 incb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1235 L07EF std $01,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1236 lbsr L0883 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1237 bcs L07CE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1238 L07F6 bne L0804 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1239 suba #$01 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1240 bcc L07FF |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1241 inca |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1242 bra L0808 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1243 L07FF lbsr L0883 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1244 bcc L07F6 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1245 L0804 adda #$01 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1246 bcs L07CE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1247 L0808 cmpd $03,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1248 bhi L07CE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1249 bsr L0883 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1250 bcs L07CE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1251 bne L0804 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1252 std $05,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1253 cmpd $01,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1254 bcc L082D |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1255 ldd $01,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1256 decb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1257 cmpd $05,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1258 beq L082D |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1259 neg <VD.FFFlg,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1260 ldx $05,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1261 lbsr L0905 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1262 neg <VD.FFFlg,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1263 L082D ldd $05,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1264 L082F std $01,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1265 L0831 bsr L0883 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1266 bcs L083D |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1267 bne L083D |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1268 bsr L08B6 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1269 adda #$01 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1270 bcc L0831 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1271 L083D deca |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1272 ldx $01,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1273 lbsr L0905 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1274 std $05,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1275 adda #$01 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1276 bcs L0858 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1277 L0849 cmpd $03,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1278 bcc L0858 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1279 adda #$01 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1280 bsr L0883 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1281 bcs L0858 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1282 bne L0849 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1283 bra L082F |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1284 L0858 inc $03,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1285 inc $03,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1286 ldd $03,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1287 cmpa #$02 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1288 lbcs L07CE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1289 ldd $05,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1290 cmpd $03,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1291 lbcs L07CE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1292 neg <VD.FFFlg,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1293 ldx $03,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1294 lbsr L0905 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1295 lbra L07CE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1296 L0878 leas $07,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1297 clrb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1298 ldb <VD.FF6,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1299 beq L0882 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1300 L0880 orcc #$01 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1301 L0882 rts |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1302 L0883 pshs b,a |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1303 cmpb #191 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1304 bhi L08B2 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1305 tst <VD.Mode,u which mode? |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1306 bmi L0892 branch if 256x192 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1307 cmpa #$7F |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1308 bhi L08B2 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1309 L0892 lbsr XY2Addr |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1310 tfr a,b |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1311 andb ,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1312 L0899 bita #$01 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1313 bne L08A8 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1314 lsra |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1315 lsrb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1316 tst <VD.Mode,u which mode? |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1317 bmi L0899 branch if 256x192 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1318 lsra |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1319 lsrb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1320 bra L0899 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1321 L08A8 stb <VD.FF1,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1322 cmpb <VD.FF2,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1323 andcc #^Carry |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1324 puls pc,b,a |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1325 L08B2 orcc #Carry |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1326 puls pc,b,a |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1327 L08B6 pshs b,a |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1328 lbsr XY2Addr |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1329 bita #$80 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1330 beq L08D8 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1331 ldb <VD.FFMsk,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1332 cmpb ,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1333 bne L08D8 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1334 ldb <VD.Msk1,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1335 stb ,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1336 puls b,a |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1337 tst <VD.Mode,u which mode? |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1338 bmi L08D5 branch if 256x192 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1339 adda #$03 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1340 rts |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1341 L08D5 adda #$07 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1342 rts |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1343 L08D8 lbsr L05B3 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1344 puls pc,b,a |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1345 L08DD ldx <VD.FFSTp,u get top of flood fill stack |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1346 beq AlcFFStk if zero, we need to allocate stack |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1347 stx <VD.FFSPt,u else reset flood fill stack ptr |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1348 L08E5 clrb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1349 rts |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1350 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1351 * Allocate Flood Fill Stack |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1352 AlcFFStk pshs u save U for now |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1353 ldd #FFStSz get 512 bytes |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1354 os9 F$SRqMem from system |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1355 bcc AllocOk branch if ok |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1356 puls pc,u else pull out with error |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1357 AllocOk tfr u,d move pointer to alloced mem to D |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1358 puls u get stat pointer we saved earlier |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1359 std <VD.FFMem,u save pointer to alloc'ed mem |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1360 addd #FFStSz point D to end of alloc'ed mem |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1361 std <VD.FFSTp,u and save here as top of fill stack |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1362 std <VD.FFSPt,u and here |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1363 bra L08E5 do a clean return |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1364 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1365 L0905 pshs b,a |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1366 ldd <VD.FFSPt,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1367 subd #$0004 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1368 cmpd <VD.FFMem,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1369 bcs L0924 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1370 std <VD.FFSPt,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1371 tfr d,y |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1372 lda <VD.FFFlg,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1373 sta ,y |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1374 stx $01,y |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1375 puls b,a |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1376 sta $03,y |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1377 rts |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1378 L0924 ldb #$F5 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1379 stb <VD.FF6,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1380 puls pc,b,a |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1381 L092B ldd <VD.FFSPt,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1382 cmpd <VD.FFSTp,u top of flood fill stack? |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1383 lbcc L0880 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1384 tfr d,y |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1385 addd #$0004 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1386 std <VD.FFSPt,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1387 lda ,y |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1388 sta <VD.FFFlg,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1389 ldd $01,y |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1390 tfr d,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1391 lda $03,y |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1392 andcc #^Carry |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1393 rts |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1394 ENDC |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1395 |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1396 GetStat ldx PD.RGS,y |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1397 cmpa #SS.AlfaS |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1398 beq Rt.AlfaS |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1399 cmpa #SS.ScSiz |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1400 beq Rt.ScSiz |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1401 cmpa #SS.Cursr |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1402 beq Rt.Cursr |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1403 IFNE COCO2 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1404 cmpa #SS.DSTAT |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1405 lbeq Rt.DSTAT |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1406 ENDC |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1407 cmpa #SS.Palet |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1408 lbeq Rt.Palet |
0 | 1409 comb |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1410 ldb #E$UnkSvc |
0 | 1411 rts |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1412 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1413 * Returns window or screen size |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1414 Rt.ScSiz equ * |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1415 IFNE H6309 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1416 ldq #$00200010 a fast cheat |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1417 stq R$X,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1418 ELSE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1419 * ldb <VD.Col,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1420 ldd #$0020 |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1421 std R$X,x |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1422 * ldb <VD.Row,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1423 ldb #$10 |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1424 std R$Y,x |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1425 ENDC |
0 | 1426 clrb |
1427 rts | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1428 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1429 * Get palette information |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1430 Rt.Palet pshs u,y,x |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1431 leay <VD.Palet,u point to palette data in proc desc |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1432 ldu R$X,x pointer to 16 byte palette buffer |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1433 ldx <D.Proc current proc desc |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1434 ldb P$Task,x destination task number |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1435 clra from task 0 |
0 | 1436 tfr y,x |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1437 ldy #16 move 16 bytes |
0 | 1438 os9 F$Move |
1439 puls pc,u,y,x | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1440 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1441 * Return VDG alpha screen memory info |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1442 Rt.AlfaS ldd <VD.ScrnA,u |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1443 anda #$E0 keep bits 4-6 |
0 | 1444 lsra |
1445 lsra | |
1446 lsra | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1447 lsra move to bits 0-2 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1448 ldy <D.SysDAT |
0 | 1449 ldd a,y |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1450 lbsr L06E1 map it in the process' memory area |
0 | 1451 bcs L0521 |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1452 pshs b,a offset to block address |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1453 ldd <VD.ScrnA,u |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1454 anda #$1F make sure it's within the block |
0 | 1455 addd ,s |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1456 std R$X,x memory address of the buffer |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1457 ldd <VD.CrsrA,u |
0 | 1458 anda #$1F |
1459 addd ,s++ | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1460 std R$Y,x memory address of the cursor |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1461 lda <VD.Caps,u save caps lock status in A and exit |
0 | 1462 bra L051E |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1463 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1464 * Returns VDG alpha screen cursor info |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1465 Rt.Cursr ldd <VD.CrsrA,u |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1466 subd <VD.ScrnA,u |
0 | 1467 pshs b,a |
1468 clra | |
1469 andb #$1F | |
1470 addb #$20 | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1471 std R$X,x save column position in ASCII |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1472 puls b,a then divide by 32 |
0 | 1473 lsra |
1474 rolb | |
1475 rolb | |
1476 rolb | |
1477 rolb | |
1478 clra | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1479 andb #$0F only 16 lines to a screen |
0 | 1480 addb #$20 |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1481 std R$Y,x |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1482 ldb <VD.CFlag,u |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1483 lda <VD.CChar,u |
0 | 1484 bmi L051E |
1485 cmpa #$60 | |
1486 bcc L0509 | |
1487 cmpa #$20 | |
1488 bcc L050D | |
1489 tstb | |
1490 beq L0507 | |
1491 cmpa #$00 | |
1492 bne L04FF | |
1493 lda #$5E | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1494 bra L051E save it and exit |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1495 |
0 | 1496 L04FF cmpa #$1F |
1497 bne L0507 | |
1498 lda #$5F | |
1499 bra L051E | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1500 L0507 ora #$20 turn it into ASCII from VDG codes |
0 | 1501 L0509 eora #$40 |
1502 bra L051E | |
1503 L050D tstb | |
1504 bne L051E | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1505 cmpa #$21 remap specific codes |
0 | 1506 bne L0518 |
1507 lda #$7C | |
1508 bra L051E | |
1509 L0518 cmpa #$2D | |
1510 bne L051E | |
1511 lda #$7E | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1512 L051E sta R$A,x |
0 | 1513 clrb |
1514 L0521 rts | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1515 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1516 IFNE COCO2 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1517 Rt.DSTAT bsr ChkDvRdy |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1518 bcs L0A4F |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1519 ldd <VD.GCrsX,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1520 lbsr XY2Addr |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1521 tfr a,b |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1522 andb ,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1523 L0A23 bita #$01 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1524 bne L0A32 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1525 lsra |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1526 lsrb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1527 tst <VD.Mode,u which mode? |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1528 bmi L0A23 branch if 256x192 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1529 lsra |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1530 lsrb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1531 bra L0A23 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1532 L0A32 pshs b |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1533 ldb <VD.PMask,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1534 andb #$FC |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1535 orb ,s+ |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1536 ldx PD.RGS,y |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1537 stb R$A,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1538 ldd <VD.GCrsX,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1539 std R$Y,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1540 ldb <VD.Blk,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1541 lbsr L06E1 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1542 bcs L0A4F |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1543 std R$X,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1544 L0A4E clrb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1545 L0A4F rts |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1546 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1547 ChkDvRdy ldb <VD.Rdy,u is device ready? |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1548 bne L0A4E branch if so |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1549 lbra NotReady else return error |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1550 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1551 * Entry: A = X coor, B = Y coor |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1552 XY2Addr pshs y,b,a save off |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1553 ldb <VD.Mode,u get video mode |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1554 bpl L0A60 branch if 128x192 (divide A by 4) |
1592 | 1555 lsra else divide A by 8 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1556 L0A60 lsra |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1557 lsra |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1558 pshs a save on stack |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1559 ldb #191 get max Y |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1560 subb $02,s subtract from Y on stack |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1561 lda #32 bytes per line |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1562 mul |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1563 addb ,s+ add offset on stack |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1564 adca #$00 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1565 ldy <VD.SBAdd,u get base address |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1566 leay d,y move D bytes into address |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1567 lda ,s pick up original X coor |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1568 sty ,s put offset addr on stack |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1569 anda <VD.PixBt,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1570 ldx <VD.MTabl,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1571 lda a,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1572 puls pc,y,x X = offset address, Y = base |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1573 ENDC |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1574 |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1575 SetStat ldx PD.RGS,y |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1576 cmpa #SS.ComSt |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1577 beq Rt.ComSt |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1578 IFNE COCO2 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1579 cmpa #SS.AAGBf |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1580 beq Rt.AAGBf |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1581 cmpa #SS.SLGBf |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1582 beq Rt.SLGBf |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1583 ENDC |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1584 cmpa #SS.ScInf new NitrOS-9 call |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1585 lbeq Rt.ScInf |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1586 cmpa #SS.DScrn |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1587 lbeq Rt.DScrn |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1588 cmpa #SS.PScrn |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1589 lbeq Rt.PScrn |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1590 cmpa #SS.AScrn |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1591 lbeq Rt.AScrn |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1592 cmpa #SS.FScrn |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1593 lbeq Rt.FScrn |
0 | 1594 comb |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1595 ldb #E$UnkSvc |
0 | 1596 rts |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1597 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1598 * Allow switch between true/fake lowercase |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1599 Rt.ComSt ldd R$Y,x |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1600 L054C ldb #$10 sets screen to lowercase |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1601 bita #$01 Y = 0 = true lowercase, Y = 1 = fake lower |
0 | 1602 bne L0553 |
1603 clrb | |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1604 L0553 stb <VD.CFlag,u |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1605 ldd #$2010 32x16 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1606 inc <VD.DFlag,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1607 std <VD.Col,u |
0 | 1608 rts |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1609 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1610 IFNE COCO2 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1611 Rt.AAGBf ldb <VD.Rdy,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1612 beq NotReady |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1613 ldd #$0201 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1614 leay <VD.AGBuf,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1615 lbsr L06C7 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1616 bcs L0AEB |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1617 pshs a |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1618 lbsr Get8KHi |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1619 bcs L0AEC |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1620 stb ,y |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1621 lbsr L06E1 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1622 bcs L0AEC |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1623 std R$X,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1624 puls b |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1625 clra |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1626 std R$Y,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1627 L0AEB rts |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1628 L0AEC puls pc,a |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1629 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1630 NotReady comb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1631 ldb #E$NotRdy |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1632 rts |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1633 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1634 Rt.SLGBf ldb <VD.Rdy,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1635 beq NotReady |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1636 ldd R$Y,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1637 cmpd #$0002 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1638 lbhi IllArg |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1639 leay <VD.GBuff,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1640 ldb b,y |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1641 lbeq IllArg |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1642 pshs x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1643 stb <VD.Blk,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1644 lda <VD.SBAdd,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1645 anda #$E0 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1646 lsra |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1647 lsra |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1648 lsra |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1649 lsra |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1650 ldx <D.SysPrc |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1651 leax <P$DATImg,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1652 leax a,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1653 clra |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1654 std ,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1655 ldx <D.SysPrc |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1656 os9 F$SetTsk |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1657 puls x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1658 ldd R$X,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1659 beq L0B2B |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1660 ldb #$01 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1661 L0B2B stb <VD.DFlag,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1662 clrb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1663 rts |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1664 ENDC |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1665 |
1344 | 1666 * Display Table |
1667 * 1st entry = display code | |
1668 * 2nd entry = # of 8K blocks | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1669 DTabl fcb $14 0: 640x192, 2 color |
1344 | 1670 fcb $02 16K |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1671 fcb $15 1: 320x192, 4 color |
1344 | 1672 fcb $02 16K |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1673 fcb $16 2: 160x192, 16 color |
1344 | 1674 fcb $02 16K |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1675 fcb $1D 3: 640x192, 4 color |
1344 | 1676 fcb $04 32K |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1677 fcb $1E 4: 320x192, 16 color |
1344 | 1678 fcb $04 32K |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1679 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1680 * Allocates and maps a hires screen into process address |
1344 | 1681 Rt.AScrn ldd R$X,x get screen type from caller's X |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1682 cmpd #$0004 screen type 0-4 |
1344 | 1683 lbhi IllArg if higher than legal limit, return error |
1684 pshs y,x,b,a else save off regs | |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1685 ldd #$0303 |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1686 leay <VD.HiRes,u pointer to screen descriptor |
1344 | 1687 lbsr L06C7 gets next free screen descriptor |
1688 bcs L05AF branch if none found | |
1689 sta ,s save screen descriptor on stack | |
1690 ldb $01,s get screen type | |
1691 * stb $02,y and store in VD.SType | |
1692 stb (VD.SType-VD.HiRes),y and store in VD.SType | |
1693 leax >DTabl,pcr point to display table | |
1694 lslb multiply index by 2 (word entries) | |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1695 abx point to display code, #blocks |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1696 ldb $01,x get number of blocks |
1344 | 1697 * stb $01,y VD.NBlk |
1698 stb (VD.NBlk-VD.HiRes),y VD.NBlk | |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1699 lda #$FF start off with zero screens allocated |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1700 BA010 inca count up by one |
1344 | 1701 ldb (VD.NBlk-VD.HiRes),y get number of blocks |
1346
31463a4ca9bf
Added fix to previous attempt to get >512K support working by Robert Gault
boisy
parents:
1344
diff
changeset
|
1702 pshs a needed to protect regA; RG. |
1347 | 1703 os9 F$AlHRAM allocate a screen |
1346
31463a4ca9bf
Added fix to previous attempt to get >512K support working by Robert Gault
boisy
parents:
1344
diff
changeset
|
1704 puls a |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1705 bcs DeAll de-allocate ALL allocated blocks on error |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1706 pshs b save starting block number of the screen |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1707 andb #$3F keep block BL= block MOD 63 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1708 pshs b |
1347 | 1709 addb (VD.NBlk-VD.HiRes),y add in the block size of the screen |
1346
31463a4ca9bf
Added fix to previous attempt to get >512K support working by Robert Gault
boisy
parents:
1344
diff
changeset
|
1710 decb in case last block is $3F,$7F,$BF,$FF; RG. |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1711 andb #$3F (BL+S) mod 63 < BL? (overlap 512k bank) |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1712 cmpb ,s+ is all of it in this bank? |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1713 blo BA010 if not, allocate another screen |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1714 puls b restore the block number for this screen |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1715 stb ,y VD.HiRes - save starting block number |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1716 bsr DeMost deallocate all of the other screens |
1346
31463a4ca9bf
Added fix to previous attempt to get >512K support working by Robert Gault
boisy
parents:
1344
diff
changeset
|
1717 leas a,s move from within DeMost; RG. |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1718 ldb ,y restore the starting block number again |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1719 |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1720 lda $01,x number of blocks |
0 | 1721 lbsr L06E3 |
1722 bcs L05AF | |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1723 ldx $02,s |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1724 std R$X,x |
0 | 1725 ldb ,s |
1726 clra | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1727 std R$Y,x |
0 | 1728 L05AF leas $02,s |
1729 puls pc,y,x | |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1730 L05B3X leas $02,s |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1731 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1732 IllArg comb |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1733 ldb #E$IllArg |
0 | 1734 rts |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1735 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1736 * De-allocate the screens |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1737 DeAll bsr DeMost de-allocate all of the screens |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1738 bra L05AF restore stack and exit |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1739 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1740 DeMost tsta |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1741 beq DA020 quick exit if zero additional screens |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1742 |
1344 | 1743 ldb (VD.NBlk-VD.HiRes),y get # blocks of screen to de-allocate |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1744 pshs a save count of blocks for later |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1745 pshs d,y,x save rest of regs |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1746 leay 9,s account for d,y,x,a,calling PC |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1747 clra |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1748 DA010 ldb ,y+ get starting block number |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1749 tfr d,x in X |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1750 ldb 1,s get size of the screen to de-allocate |
1346
31463a4ca9bf
Added fix to previous attempt to get >512K support working by Robert Gault
boisy
parents:
1344
diff
changeset
|
1751 pshs a needed to protect regA; RG. |
31463a4ca9bf
Added fix to previous attempt to get >512K support working by Robert Gault
boisy
parents:
1344
diff
changeset
|
1752 os9 F$DelRAM de-allocate the blocks *** IGNORING ERRORS *** |
31463a4ca9bf
Added fix to previous attempt to get >512K support working by Robert Gault
boisy
parents:
1344
diff
changeset
|
1753 puls a |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1754 dec ,s count down |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1755 bne DA010 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1756 puls d,y,x restore registers |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1757 puls a and count of extra bytes on the stack |
1346
31463a4ca9bf
Added fix to previous attempt to get >512K support working by Robert Gault
boisy
parents:
1344
diff
changeset
|
1758 * leas a,s removed because it yanks wrong data; RG. |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1759 DA020 rts and exit |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1760 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1761 * Get current screen info for direct writes - added in NitrOS-9 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1762 Rt.ScInf pshs x save caller's regs ptr |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1763 ldd R$Y,x get screen |
0 | 1764 bmi L05C8 |
1765 bsr L05DE | |
1766 bcs L05DC | |
1767 lbsr L06FF | |
1768 bcs L05DC | |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1769 L05C8 ldx ,s get caller's regs ptr from stack |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1770 ldb R$Y+1,x |
0 | 1771 bmi L05DB |
1772 bsr L05DE | |
1773 bcs L05DC | |
1774 lbsr L06E3 | |
1775 bcs L05DC | |
1776 ldx ,s | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1777 std R$X,x |
0 | 1778 L05DB clrb |
1779 L05DC puls pc,x | |
1780 L05DE beq L05F1 | |
1781 cmpb #$03 | |
1782 bhi L05F1 | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1783 bsr GetScrn |
0 | 1784 beq L05F1 |
1785 ldb ,x | |
1786 beq L05F1 | |
1787 lda $01,x | |
1788 andcc #^Carry | |
1789 rts | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1790 L05F1 bra IllArg |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1791 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1792 * Convert screen to a different type |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1793 Rt.PScrn ldd R$X,x |
0 | 1794 cmpd #$0004 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1795 bhi IllArg |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1796 pshs b,a save screen type, and a zero |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1797 leax >DTabl,pcr |
0 | 1798 lslb |
1799 incb | |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1800 lda b,x get number of blocks the screen requires |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1801 sta ,s kill 'A' on the stack |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1802 ldx PD.RGS,y |
0 | 1803 bsr L061B |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1804 bcs L05B3X |
0 | 1805 lda ,s |
1806 cmpa $01,x | |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1807 lbhi L05B3X if new one takes more blocks than old |
0 | 1808 lda $01,s |
1809 sta $02,x | |
1810 leas $02,s | |
1811 bra L0633 | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1812 L061B ldd R$Y,x |
0 | 1813 beq L0633 |
1814 cmpd #$0003 | |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1815 lbgt IllArg |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1816 bsr GetScrn point X to 3 byte screen descriptor |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1817 lbeq IllArg |
0 | 1818 clra |
1819 rts | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1820 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1821 * Displays screen |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1822 Rt.DScrn bsr L061B |
0 | 1823 bcs L063A |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1824 L0633 stb <VD.DGBuf,u |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1825 inc <VD.DFlag,u |
0 | 1826 clrb |
1827 L063A rts | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1828 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1829 * Entry: B = screen 1-3 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1830 * Exit: X = ptr to screen entry |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1831 *GetScrn pshs b,a |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1832 * leax <VD.GBuff,u |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1833 * lda #$03 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1834 * mul |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1835 * leax b,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1836 * puls pc,b,a |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1837 GetScrn leax <VD.GBuff,U point X to screen descriptor table |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1838 abx |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1839 abx |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1840 abx |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1841 tst ,x is this screen valid? (0 = not) |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1842 rts |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1843 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1844 * Frees memory of screen allocated by SS.AScrn |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1845 Rt.FScrn ldd R$Y,x |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1846 lbeq IllArg |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1847 cmpd #$03 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1848 lbhi IllArg |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1849 cmpb <VD.DGBuf,u |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1850 lbeq IllArg illegal arg if screen is being displayed |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1851 bsr GetScrn point to buffer |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1852 lbeq IllArg error if screen unallocated |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1853 * Entry: X = pointer to screen table entry |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1854 FreeBlks lda $01,x get number of blocks |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1855 ldb ,x get starting block |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1856 beq L066D branch if none |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1857 pshs a else save count |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1858 clra clear A |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1859 sta ,x clear block # in entry |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1860 tfr d,x put starting block # in X |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1861 puls b get block numbers |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1862 os9 F$DelRAM delete |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1863 L066D rts and return |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1864 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1865 ShowS cmpb #$03 no more than 3 graphics buffers |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1866 bhi L066D |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1867 bsr GetScrn point X to appropriate screen descriptor |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1868 beq L066D branch if not allocated |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1869 ldb $02,x VD.SType - screen type 0-4 |
0 | 1870 cmpb #$04 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1871 bhi L066D |
0 | 1872 lslb |
1873 pshs x | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1874 leax >DTabl,pcr |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1875 lda b,x get proper display code |
0 | 1876 puls x |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1877 clrb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1878 std >$FF99 set border color, too |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1879 std >D.VIDRS |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1880 lda >D.HINIT |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1881 anda #$7F make coco 3 only mode |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1882 sta >D.HINIT |
0 | 1883 sta >$FF90 |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1884 lda >D.VIDMD |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1885 ora #$80 graphics mode |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1886 anda #$F8 1 line/character row |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1887 sta >D.VIDMD |
0 | 1888 sta >$FF98 |
1353 | 1889 * lda ,x get block # |
1890 * lsla | |
1891 * lsla | |
1892 *** start of 2MB patch by RG | |
1893 ldb ,x get block # (2Meg patch) | |
1894 clra | |
1895 lslb | |
1896 rola | |
1897 lslb | |
1898 rola | |
1899 sta >$FF9B | |
1900 tfr b,a | |
1901 *** end of 2MB patch by RG | |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1902 clrb |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1903 std <D.VOFF1 display it |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1904 std >$FF9D |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1905 clr >D.VOFF2 |
0 | 1906 clr >$FF9C |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1907 lbra SetPals |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1908 |
1344 | 1909 * Get next free screen descriptor |
1910 L06C7 clr ,-s clear an area on the stack | |
1911 inc ,s set to 1 | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1912 L06CB tst ,y check block # |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1913 beq L06D9 if not used yet |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1914 leay b,y go to next screen descriptor |
1344 | 1915 inc ,s increment count on stack |
1916 deca decrement A | |
0 | 1917 bne L06CB |
1918 comb | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1919 ldb #E$BMode |
0 | 1920 L06D9 puls pc,a |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1921 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1922 * Get B 8K blocks from high RAM |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1923 Get8KHi ldb #$01 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1924 L06DDX os9 F$AlHRAM allocate a screen |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1925 rts |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1926 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1927 L06E1 lda #$01 map screen into memory |
0 | 1928 L06E3 pshs u,x,b,a |
1929 bsr L0710 | |
1930 bcc L06F9 | |
1931 clra | |
1932 ldb $01,s | |
1933 tfr d,x | |
1934 ldb ,s | |
1935 os9 F$MapBlk | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1936 stb $01,s save error code if any |
0 | 1937 tfr u,d |
1938 bcs L06FD | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1939 L06F9 leas $02,s destroy D on no error |
0 | 1940 puls pc,u,x |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1941 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1942 L06FD puls pc,u,x,b,a if error, then restore D |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1943 |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1944 L06FF pshs y,x,a deallocate screen |
0 | 1945 bsr L0710 |
1946 bcs L070E | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1947 ldd #DAT.Free set memory to unused |
0 | 1948 L0708 std ,x++ |
1949 dec ,s | |
1950 bne L0708 | |
1951 L070E puls pc,y,x,a | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1952 |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1953 L0710 equ * |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1954 IFNE H6309 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1955 pshs a |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1956 lde #$08 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1957 ELSE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1958 pshs b,a |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1959 lda #$08 number of blocks to check |
0 | 1960 sta $01,s |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1961 ENDC |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1962 ldx <D.Proc |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1963 leax <P$DATImg+$10,x to end of CoCo's DAT image map |
0 | 1964 clra |
1965 addb ,s | |
1966 decb | |
1967 L071F cmpd ,--x | |
1968 beq L072A | |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1969 IFNE H6309 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1970 dece |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1971 ELSE |
0 | 1972 dec $01,s |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1973 ENDC |
0 | 1974 bne L071F |
1975 bra L0743 | |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1976 L072A equ * |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1977 IFNE H6309 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1978 dece |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1979 ELSE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1980 dec $01,s |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1981 ENDC |
0 | 1982 dec ,s |
1983 beq L0738 | |
1984 decb | |
1985 cmpd ,--x | |
1986 beq L072A | |
1987 bra L0743 | |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1988 L0738 equ * |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1989 IFNE H6309 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1990 tfr e,a |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1991 ELSE |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1992 lda $01,s get lowest block number found |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
1993 ENDC |
0 | 1994 lsla |
1995 lsla | |
1996 lsla | |
1997 lsla | |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1998 lsla multiply by 32 (convert to address) |
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
1999 clrb clear carry |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
2000 IFNE H6309 |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
2001 puls b,pc |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
2002 L0743 puls a |
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
2003 ELSE |
0 | 2004 leas $02,s |
2005 rts | |
2006 L0743 puls b,a | |
767
f8ac18a97b69
Integration of CoCo 2 code, major changes and 6309 optimizations included
boisy
parents:
754
diff
changeset
|
2007 ENDC |
0 | 2008 comb |
754
c81bad35f02f
Worked on commenting source and using proper symbolics, assembles to same
boisy
parents:
508
diff
changeset
|
2009 ldb #E$BPAddr bad page address |
0 | 2010 rts |
2011 | |
2012 emod | |
2013 eom equ * | |
2014 end |