annotate level2/modules/vdgint.asm @ 754:c81bad35f02f

Worked on commenting source and using proper symbolics, assembles to same module as prior
author boisy
date Wed, 08 Jan 2003 17:33:48 +0000
parents 02a8ba2b9092
children f8ac18a97b69
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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 *
02a8ba2b9092 Added headers to most source files, added clock2_bb.asm
boisy
parents: 0
diff changeset
6 * Ed. Comments Who YY/MM/DD
02a8ba2b9092 Added headers to most source files, added clock2_bb.asm
boisy
parents: 0
diff changeset
7 * ------------------------------------------------------------------
02a8ba2b9092 Added headers to most source files, added clock2_bb.asm
boisy
parents: 0
diff changeset
8
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
9 nam VDGInt
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
10 ttl CoCo 3 VDG I/O module
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
11
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
12 * Disassembled 98/09/31 12:15:57 by Disasm v1.6 (C) 1988 by RML
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
13
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
14 ifp1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
15 use defsfile
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
16 use vdgdefs
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
17 endc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
18
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
19 tylg set Systm+Objct
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
20 atrv set ReEnt+rev
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
21 rev set $01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
22 edition set 3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
23
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
24 mod eom,name,tylg,atrv,start,size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
25
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
26 u0000 rmb 0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
27 size equ .
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
28
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
29 fcb $07
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
30
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
31 name fcs /VDGInt/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
32 fcb edition
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
33
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
34 start lbra Read actually more like INIZ...
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
35 lbra Write
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
36 lbra GetStat
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
37 lbra SetStat
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
38 lbra Term
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
39
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
40 cmpa #$00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
41 bne L0035
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
42 ldb <VD.DGBuf,u get number of currently displayed bufs
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
43 lbne ShowS
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
44 ldd <VD.TFlg1,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
45 lbra DAlfa2
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
46
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
47 L0035 cmpa #$01 set x,y size of window?
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
48 beq L003B
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
49 clrb no errors
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
50 rts
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
51
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
52 L003B ldx <D.CCMem pointer to start of CC memory
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
53 leax <$54,x to X,Y coor, X,Y window
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
54 IFNE H6309
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
55 ldq ,x
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
56 stq $04,x get X,Y coordinate
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
57 ELSE
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
58 ldd ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
59 std $04,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
60 ldd $02,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
61 std $06,x
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
62 ENDC
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
63 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
64 rts
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
65
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
66 * Terminate device
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
67 Term pshs u,y,x
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
68 ldb #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
69 L004E pshs b
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
70 lbsr GetScrn
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
71 lbsr L065B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
72 puls b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
73 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
74 bne L004E
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
75 clr <VD.Start,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
76 ldd #$0200
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
77 ldu <VD.SCrnA,u return VDG text screen memory
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
78 beq L0069
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
79 os9 F$SRtMem
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
80 L0069 ldb #$E1 size of 1 page -$1D (SCF memory requirements)
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
81 leax <VD.Strt1,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
82 clra
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
83 L006F sta ,x+ set stored byte to zero
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
84 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
85 bne L006F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
86 bra L00D5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
87
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
88 * Read bytes from IN
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
89 * Actually, this is more like an INIZ of the device.
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
90 Read pshs u,y,x
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
91 bsr L00D8 set up palettes
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
92 lda #$AF
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
93 sta <VD.CColr,u default color cursor
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
94 pshs u
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
95 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
96 os9 F$SRqMem request from top of sys ram
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
97 tfr u,d
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
98 tfr u,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
99 bita #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
100 beq L0095
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
101 leax >$0100,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
102 bra L0099
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
103 L0095 leau >$0200,u we only need 2 pages for the screen memory
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
104 L0099 ldd #256 1 page return
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
105 os9 F$SRtMem return system memory
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
106 puls u
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
107 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
108 stx <VD.CrsrA,u and start cursor position
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
109 leax >$0200,x
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
110 stx <VD.ScrnE,u point to the end of the screen
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
111 lda #$60
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
112 sta <VD.CChar,u character under the cursor
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
113 sta <VD.Chr1,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
114 lbsr ClrScn
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
115 inc <VD.Start,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
116 ldd <VD.Strt1,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
117 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
118 leax <VD.NChar,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
119 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
120 stx <VD.EPlt2,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
121 ldu <D.CCMem
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
122 ldb <$24,u
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
123 orb #$02 set to VDGINT found
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
124 stb <$24,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
125 L00D5 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
126 puls pc,u,y,x
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
127
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
128 L00D8 pshs u,y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
129 lda #$08
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
130 sta <VD.PlFlg,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
131 leax >L011A,pcr default palette
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
132 leay <VD.Palet,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
133 L00E6 leau >L00F8,pcr CMP to RGB conversion
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
134 L00EA pshs u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
135 leau >L012A,pcr
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
136 ldb #16
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
137 L00F2 lda ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
138 jmp [,s]
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
139 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
140 L00F8 sta ,y+ and save RGB data
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
141 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
142 bne L00F2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
143 leas $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
144 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
145
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
146 L0101 pshs u,y,x,b,a puts palette data in.
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
147 lda >WGlobal+G.CrDvFl is this screen active?
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
148 beq L00FF 0 = not active
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
149 leax <VD.Palet,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
150 ldy #$FFB0
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
151 lda >WGlobal+G.MonTyp universal RGB/CMP 0 = CMP, 1 = RGB, 2 = MONO
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
152 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
153 leau >L00F6,pcr else do re-map colors
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
154 bra L00EA
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
155
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
156 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
157 fcb $3f,$1b,$2d,$26
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
158 fcb $00,$12,$00,$3f
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
159 fcb $00,$12,$00,$26
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
160
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
161 * converts CMP to RGB
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
162 L012A fdb $000c,$020e,$0709,$0510
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
163 fdb $1c2c,$0d1d,$0b1b,$0a2b
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
164 fdb $2211,$1221,$0301,$1332
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
165 fdb $1e2d,$1f2e,$0f3c,$2f3d
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
166 fdb $1708,$1506,$2716,$2636
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
167 fdb $192a,$1a3a,$1829,$2838
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
168 fdb $1404,$2333,$2535,$2434
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
169 fdb $203B,$313E,$3739,$3F30
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
170
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
171 * Entry: A = char to write
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
172 * Y = path desc ptr
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
173 Write cmpa #$0E
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
174 bls L01CF
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
175 cmpa #$1B escape code?
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
176 lbeq Escpe yes, do escape immediately
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
177 cmpa #$1F
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
178 lbls L01CD ignore gfx codes if not CoCo 2 compatible
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
179
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
180 tsta
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
181 bmi L01BA
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
182 ldb <VD.CFlag,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
183 beq L019A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
184 cmpa #$5E
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
185 bne L018A re-map characters from ASCII-VDG
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
186 lda #$00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
187 bra L01BA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
188 L018A cmpa #$5F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
189 bne L0192
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
190 lda #$1F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
191 bra L01BA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
192 L0192 cmpa #$60
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
193 bne L01AA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
194 lda #$67
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
195 bra L01BA
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 L019A cmpa #$7C true lowercase
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
198 bne L01A2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
199 lda #$21
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
200 bra L01BA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
201 L01A2 cmpa #$7E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
202 bne L01AA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
203 lda #$2D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
204 bra L01BA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
205 L01AA cmpa #$60
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
206 bcs L01B2 re-map ASCII
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
207 suba #$60
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
208 bra L01BA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
209 L01B2 cmpa #$40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
210 bcs L01B8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
211 suba #$40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
212 L01B8 eora #$40
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
213 L01BA ldx <VD.CrsrA,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
214 sta ,x+
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
215 stx <VD.CrsrA,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
216 cmpx <VD.ScrnE,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
217 bcs L01CA
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
218 lbsr SScrl if at end of screen, scroll it
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
219 L01CA lbsr PCrsr ends with a CLRB/RTS anyhow
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
220 L01CD clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
221 rts
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
222
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
223 L01CF leax >L01D8,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
224 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
225 ldd a,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
226 jmp d,x
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
227
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
228 L01D8 fdb L01CD-L01D8
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
229 fdb CHome-L01D8
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
230 fdb CrsrXY-L01D8
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
231 fdb TELin-L01D8
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
232 fdb CELin-L01D8
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
233 fdb COnOf-L01D8
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
234 fdb CRght-L01D8
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
235 fdb L01CD-L01D8
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
236 fdb CLeft-L01D8
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
237 fdb L036A-L01D8
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
238 fdb CDown-L01D8
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
239 fdb TEScn-L01D8
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
240 fdb ClrScn-L01D8
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
241 fdb Retrn-L01D8
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
242 fdb DAlfa-L01D8
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
243 fdb $53c6
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
244 fdb $F539
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
245
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
246 * $1B does palette changes
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
247 Escpe ldx <VD.EPlt1,u now X points to VD.NChar
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
248 lda ,x
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
249 cmpa #$30 default color
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
250 bne L0209
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
251 lbsr L00D8 do default palette
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
252 lbra L026E put palette and exit
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
253
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
254 L0209 cmpa #$31 change palette
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
255 lbeq L0258
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
256 cmpa #$21
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
257 lbne L01CD return without error
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
258 ldx PD.RGS,y
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
259 lda R$A,x
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
260 ldx <D.Proc
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
261 cmpa >P$SelP,x
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
262 beq L0249
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
263 ldb >P$SelP,x
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
264 sta >P$SelP,x
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
265 pshs y save our path desc ptr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
266 bsr L024A
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
267 ldy V$STAT,y
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
268 ldx <D.CCMem
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
269 cmpy <$20,x
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
270 puls y restore our path desc ptr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
271 bne L0248
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
272 inc <VD.DFlag,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
273 ldy <$20,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
274 sty <$22,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
275 stu <$20,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
276 L0248 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
277 L0249 rts
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
278
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
279 L024A leax <P$Path,x
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
280 lda b,x
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
281 ldx <D.PthDBT
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
282 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
283 ldy PD.DEV,y load Y with device table entry
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
284 rts
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
285
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
286 L0258 leax <L0260,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
287 ldb #$02
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
288 lbra GChar
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
289 L0260 ldx <VD.EPlt1,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
290 ldd ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
291 anda #$0F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
292 andb #$3F
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
293 leax <VD.Palet,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
294 stb a,x
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
295 L026E inc <VD.DFlag,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
296 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
297 rts
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
298
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
299 * Screen scroll
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
300 SScrl ldx <VD.SCrnA,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
301 leax <32,x
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
302 L0279 ldd ,x++
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
303 std <-34,x
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
304 cmpx <VD.ScrnE,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
305 bcs L0279
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
306 leax <-32,x
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
307 stx <VD.CrsrA,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
308 lda #32
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
309 ldb #$60
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
310 L028D stb ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
311 deca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
312 bne L028D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
313 rts
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
314
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
315 * $0D carriage return
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
316 Retrn bsr KCrsr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
317 tfr x,d
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
318 andb #$E0
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
319 stb <VD.CrsAL,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
320 PCrsr ldx <VD.CrsrA,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
321 lda ,x
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
322 sta <VD.CChar,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
323 lda <VD.CColr,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
324 beq L02AB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
325 L02A9 sta ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
326 L02AB clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
327 rts
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
328
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
329 * $0A moves cursor down
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
330 CDown bsr KCrsr
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
331 leax <32,x go down one line
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
332 cmpx <VD.SCrnE,u at the end of the screen?
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
333 bcs L02C1
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
334 leax <-32,x if so, go back up one line
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
335 pshs x
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
336 lbsr SScrl and scroll the screen
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
337 puls x
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
338 L02C1 stx <VD.CRsrA,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
339 bra PCrsr
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
340
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
341 * $08 moves cursor left one
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
342 CLeft bsr KCrsr
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
343 cmpx <VD.SCrnA,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
344 bls L02D2 ignore it if at the screen start
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
345 leax -$01,x
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
346 stx <VD.CRsrA,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
347 L02D2 bra PCrsr
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
348
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
349 * $06 moves cursor right one
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
350 CRght bsr KCrsr
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
351 leax $01,x to right one
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
352 cmpx <VD.SCrnE,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
353 bcc L02E0 if past end, ignore it
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
354 stx <VD.CRsrA,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
355 L02E0 bra PCrsr
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
356
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
357 * $0B erase from current char to end of screen
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
358 TEScn bsr KCrsr kill the cursor
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
359 bra L02E8 and clear the rest of the screen
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
360
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
361 * $0C clear screen & home cursor
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
362 ClrScn bsr CHome home cursor
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
363 L02E8 lda #$60
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
364 L02EA sta ,x+
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
365 cmpx <VD.SCrnE,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
366 bcs L02EA
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
367 bra PCrsr
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
368
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
369 * $01 Homes the cursor
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
370 CHome bsr KCrsr
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
371 ldx <VD.SCrnA,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
372 stx <VD.CRsrA,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
373 bra PCrsr
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
374
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
375 * Kill the cursor from the screen
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
376 KCrsr ldx <VD.CRsrA,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
377 lda <VD.CChar,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
378 sta ,x
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
379 clrb must be here, in general, for [...] BRA KCrsr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
380 rts
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
381
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
382 * $05 turns cursor on/off, color
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
383 COnOf lda <VD.NChar,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
384 suba #C$SPAC take out ASCII space
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
385 bne L0313
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
386 sta <VD.CColr,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
387 bra KCrsr
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
388 L0313 cmpa #$0B sets up cursor color
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
389 bge L02AB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
390 cmpa #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
391 bgt L031F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
392 lda #$AF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
393 bra L032F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
394 L031F cmpa #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
395 bgt L0327
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
396 lda #$A0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
397 bra L032F
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
398 ** BUG ** BUG ** BUG ** BUG
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
399 L0327 subb #$03 ** BUG ** !!! Should be SUBA
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
400 lsla left in for backwards compatibility
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
401 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
402 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
403 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
404 ora #$8F
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
405 L032F sta <VD.CColr,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
406 ldx <VD.CrsrA,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
407 lbra L02A9
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
408
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
409 * $02 moves cursor to X,Y
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
410 CrsrXY ldb #$02
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
411 leax <L0340,pcr goto there after
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
412 lbra GChar get two chars
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
413 L0340 bsr KCrsr
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
414 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
415 subb #C$SPAC take out ASCII space
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
416 lda #32 go down
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
417 mul
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
418 addb <VD.NChar,u add in X-pos
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
419 adca #$00
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
420 subd #C$SPAC take out another ASCII space
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
421 addd <VD.ScrnA,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
422 cmpd <VD.ScrnE,u at end of the screen?
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
423 lbcc L02AB exit if off the screen
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
424 std <VD.CRsrA,u otherwise save new cursor address
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
425 lbra PCrsr
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
426
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
427 * $04 clear characters to end of line
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
428 CELin bsr KCrsr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
429 tfr x,d
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
430 andb #$1F number of characters put on this line
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
431 pshs b
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
432 ldb #32
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
433 subb ,s+
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
434 bra L0376 and clear one line
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
435
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
436 * $03 erase line cursor is on
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
437 TELin lbsr Retrn do a carriage return
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
438 ldb #32 B = $00 from Retrn
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
439 L0376 lda #$60
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
440 ldx <VD.CRsrA,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
441 L037B sta ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
442 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
443 bne L037B
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
444 lbra PCrsr
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
445
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
446 * $09 moves cursor up one line
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
447 L036A lbsr KCrsr
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
448 leax <-32,x
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
449 cmpx <VD.SCrnA,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
450 bcs L0391
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
451 stx <VD.CRsrA,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
452 L0391 lbra PCrsr
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
453
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
454 * $0E switches from graphics to alpha mode
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
455 DAlfa clra
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
456 clrb
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
457 DAlfa2 pshs x,a
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
458 stb <VD.Alpha,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
459 clr <VD.DGBuf,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
460 lda >PIA1Base+2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
461 anda #$07
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
462 ora ,s+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
463 tstb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
464 bne L03AD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
465 anda #$EF
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
466 ora <VD.CFlag,u lowercase flag
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
467 L03AD sta <VD.TFlg1,u save VDG info
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
468 tst >WGlobal+G.CrDvFl is this screen currently showing?
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
469 lbeq L0440
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
470 sta >PIA1Base+2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
471 tstb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
472 bne L03CB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
473 stb >$FFC0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
474 stb >$FFC2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
475 stb >$FFC4
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
476 lda <VD.ScrnA,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
477 bra L03D7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
478 L03CB stb >$FFC0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
479 stb >$FFC3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
480 stb >$FFC5
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
481 lda <VD.SBAdd,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
482 L03D7 lbsr L0101
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
483 ldb <D.HINIT
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
484 orb #$80 set CoCo 2 compatible mode
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
485 stb <D.HINIT
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
486 stb >$FF90
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
487 ldb <D.VIDMD
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
488 andb #$78
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
489 stb >$FF98
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
490 stb <D.VIDMD
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
491 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
492 stb >$FF99
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
493 stb <D.VIDRS
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
494 stb >BordReg
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
495 stb <D.BORDR
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
496 tfr a,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
497 andb #$1F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
498 pshs b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
499 anda #$E0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
500 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
501 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
502 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
503 lsra
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
504 ldx <D.SysDAT
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
505 leax a,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
506 ldb $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
507 pshs b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
508 andb #$38
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
509 lslb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
510 lslb
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
511 stb <D.VOFF1
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
512 stb >$FF9D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
513 clrb
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
514 stb <D.VOFF0
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
515 stb >$FF9E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
516 ldb #$0F
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
517 stb <D.VOFF2
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
518 stb >$FF9C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
519 puls a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
520 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
521 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
522 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
523 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
524 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
525 ora ,s+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
526 ldb #$07
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
527 ldx #$FFC6 Ok, now set up via old coco2 mode
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
528 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
529 L0430 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
530 bcs L0439
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
531 sta ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
532 leax $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
533 bra L043D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
534 L0439 leax $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
535 sta ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
536 L043D decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
537 bne L0430
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
538 L0440 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
539 puls pc,x
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
540
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
541 pshs x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
542 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
543 ldb $02,s
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
544 ldx <D.SysMem
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
545 leax d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
546 puls b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
547 L044E sta ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
548 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
549 bne L044E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
550 puls pc,x
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
551
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
552 ldb #$01
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
553 GChar stb <VD.NGChr,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
554 stx <VD.RTAdd,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
555 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
556 rts
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
557
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
558 GetStat ldx PD.RGS,y
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
559 cmpa #SS.AlfaS
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
560 beq RT.AlfaS
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
561 cmpa #SS.ScSiz
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
562 beq Rt.ScSiz
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
563 cmpa #SS.Cursr
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
564 beq Rt.Cursr
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
565 cmpa #SS.Palet
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
566 lbeq Rt.Palet
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
567 comb
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
568 ldb #E$UnkSvc
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
569 rts
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
570
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
571 * Returns window or screen size
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
572 Rt.ScSiz clra
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
573 ldb <$42,u
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
574 std R$X,x
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
575 ldb <$43,u
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
576 std R$Y,x
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
577 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
578 rts
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
579
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
580 * Get palette information
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
581 Rt.Palet pshs u,y,x
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
582 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
583 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
584 ldx <D.Proc current proc desc
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
585 ldb P$Task,x destination task number
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
586 clra from task 0
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
587 tfr y,x
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
588 ldy #16 move 16 bytes
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
589 os9 F$Move
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
590 puls pc,u,y,x
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
591
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
592 * Return VDG alpha screen memory info
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
593 RT.AlfaS ldd <VD.ScrnA,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
594 anda #$E0 keep bits 4-6
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
595 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
596 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
597 lsra
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
598 lsra move to bits 0-2
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
599 ldy <D.SysDAT
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
600 ldd a,y
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
601 lbsr L06E1 map it in the process' memory area
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
602 bcs L0521
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
603 pshs b,a offset to block address
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
604 ldd <VD.ScrnA,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
605 anda #$1F make sure it's within the block
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
606 addd ,s
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
607 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
608 ldd <VD.CrsrA,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
609 anda #$1F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
610 addd ,s++
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
611 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
612 lda <VD.Caps,u save caps lock status in A and exit
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
613 bra L051E
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
614
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
615 * Returns VDG alpha screen cursor info
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
616 Rt.Cursr ldd <VD.CrsrA,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
617 subd <VD.ScrnA,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
618 pshs b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
619 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
620 andb #$1F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
621 addb #$20
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
622 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
623 puls b,a then divide by 32
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
624 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
625 rolb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
626 rolb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
627 rolb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
628 rolb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
629 clra
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
630 andb #$0F only 16 lines to a screen
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
631 addb #$20
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
632 std R$Y,x
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
633 ldb <VD.CFlag,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
634 lda <VD.CChar,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
635 bmi L051E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
636 cmpa #$60
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
637 bcc L0509
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
638 cmpa #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
639 bcc L050D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
640 tstb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
641 beq L0507
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
642 cmpa #$00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
643 bne L04FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
644 lda #$5E
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
645 bra L051E save it and exit
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
646
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
647 L04FF cmpa #$1F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
648 bne L0507
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
649 lda #$5F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
650 bra L051E
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
651 L0507 ora #$20 turn it into ASCII from VDG codes
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
652 L0509 eora #$40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
653 bra L051E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
654 L050D tstb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
655 bne L051E
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
656 cmpa #$21 remap specific codes
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
657 bne L0518
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
658 lda #$7C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
659 bra L051E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
660 L0518 cmpa #$2D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
661 bne L051E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
662 lda #$7E
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
663 L051E sta R$A,x
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
664 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
665 L0521 rts
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
666
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
667 SetStat ldx PD.RGS,y
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
668 cmpa #SS.ComSt
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
669 beq Rt.ComSt
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
670 cmpa #$8F
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
671 lbeq RT.XScrn
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
672 cmpa #SS.DScrn
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
673 lbeq Rt.DScrn
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
674 cmpa #SS.PScrn
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
675 lbeq Rt.PScrn
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
676 cmpa #SS.AScrn
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
677 lbeq RT.AScrn
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
678 cmpa #SS.FScrn
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
679 lbeq Rt.FScrn
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
680 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
681 ldb #$D0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
682 rts
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
683
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
684 * Allow switch between true/fake lowercase
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
685 Rt.ComSt ldd R$Y,x
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
686 L054C ldb #$10 sets screen to lowercase
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
687 bita #$01 Y = 0 = true lowercase, Y = 1 = fake lower
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
688 bne L0553
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
689 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
690 L0553 stb <$35,u
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
691 ldd #$2010 32x16
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
692 inc <$23,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
693 std <$42,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
694 rts
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
695
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
696 DTabl fcb $14 0: 640x192, 2 color
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
697 fcb $02
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
698 fcb $15 1: 320x192, 4 color
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
699 fcb $02
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
700 fcb $16 2: 160x192, 16 color
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
701 fcb $02
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
702 fcb $1D 3: 640x192, 4 color
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
703 fcb $04
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
704 fcb $1E 4: 320x192, 16 color
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
705 fcb $04
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
706
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
707 * Allocates and maps a hires screen into process address
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
708 RT.AScrn ldb R$X+1,x
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
709 cmpb #$04 screen type
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
710 bhi IllArg
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
711 lda #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
712 pshs y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
713 lda #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
714 ldb #$03
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
715 leay <VD.HiRes,u pointer to screen descriptor
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
716 lbsr L06C7 gets next free S.D.
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
717 bcs L05AF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
718 sta ,s
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
719 ldb $01,s screen type
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
720 stb $02,y VD.SType
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
721 leax >DTabl,pcr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
722 lslb
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
723 leax b,x point to display code, #blocks
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
724 ldb $01,x get number of blocks
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
725 stb $01,y VD.NBlk
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
726 lbsr L06DD
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
727 bcs L05AF deallocate ALL alloced blocks on error
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
728 stb ,y
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
729 lda $01,x number of blocks
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
730 ldy $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
731 tst $04,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
732 bne L05A6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
733 lbsr L06E3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
734 bcs L05AF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
735 L05A6 ldx $02,s
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
736 std R$X,x
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
737 ldb ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
738 clra
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
739 std R$Y,x
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
740 L05AF leas $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
741 puls pc,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
742 L05B3 leas $02,s
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
743
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
744 IllArg comb
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
745 ldb #E$IllArg
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
746 rts
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
747
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
748 RT.XScrn pshs x
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
749 ldb R$Y,x
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
750 bmi L05C8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
751 bsr L05DE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
752 bcs L05DC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
753 lbsr L06FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
754 bcs L05DC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
755 L05C8 ldx ,s
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
756 ldb R$Y+1,x
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
757 bmi L05DB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
758 bsr L05DE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
759 bcs L05DC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
760 lbsr L06E3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
761 bcs L05DC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
762 ldx ,s
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
763 std R$X,x
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
764 L05DB clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
765 L05DC puls pc,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
766 L05DE beq L05F1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
767 cmpb #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
768 bhi L05F1
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
769 bsr GetScrn
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
770 beq L05F1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
771 ldb ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
772 beq L05F1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
773 lda $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
774 andcc #^Carry
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
775 rts
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
776 L05F1 bra IllArg
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
777
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
778 * Convert screen to a different type
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
779 Rt.PScrn ldd R$X,x
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
780 pshs b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
781 cmpd #$0004
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
782 bhi L05B3
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
783 leax >DTabl,pcr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
784 lslb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
785 incb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
786 lda b,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
787 sta ,s
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
788 ldx R$Y,y
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
789 bsr L061B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
790 bcs L05B3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
791 lda ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
792 cmpa $01,x
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
793 bhi L05B3 if new one takes more blocks than old
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
794 lda $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
795 sta $02,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
796 leas $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
797 bra L0633
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
798 L061B ldd R$Y,x
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
799 bmi IllArg
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
800 beq L0633
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
801 cmpd #$0003
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
802 bgt IllArg
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
803 bsr GetScrn point X to 3 byte screen descriptor
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
804 lda ,x start block #, # of blocks, screen type
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
805 beq IllArg
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
806 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
807 rts
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
808
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
809 * Displays screen
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
810 Rt.DScrn bsr L061B
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
811 bcs L063A
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
812 L0633 stb <VD.DGBuf,u
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
813 inc <VD.DFlag,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
814 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
815 L063A rts
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
816
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
817 * Entry: D = screen 1-3
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
818 * Exit: X = ptr to screen buffer
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
819 GetScrn pshs b,a
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
820 leax <VD.GBuff,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
821 lda #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
822 mul
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
823 leax b,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
824 puls pc,b,a
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
825
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
826 * Frees memory of screen allocated by SS.AScrn
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
827 Rt.FScrn tst R$Y,x
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
828 bne L05F1
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
829 ldb R$Y+1,x
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
830 cmpb <VD.DGBuf,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
831 beq L05F1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
832 tstb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
833 lbsr L05DE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
834 bcs L05F1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
835 lbsr L06FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
836 L065B lda $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
837 ldb ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
838 beq L066D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
839 pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
840 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
841 sta ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
842 tfr d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
843 puls b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
844 os9 F$DelRAM
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
845 L066D rts
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
846
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
847 ShowS cmpb #$03 no more than 3 graphics buffers
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
848 bhi L06C6
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
849 bsr GetScrn point X to appropriate screen descriptor
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
850 ldb ,x VD.HiRes - start block of screen
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
851 beq L06C6 if not allocated
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
852 ldb $02,x VD.SType - screen type 0-4
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
853 cmpb #$04
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
854 bhi L06C6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
855 lslb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
856 pshs x
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
857 leax >DTabl,pcr
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
858 ldb b,x get proper display code
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
859 puls x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
860 stb >$FF99
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
861 stb >D.VIDRS
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
862 lda >D.HINIT
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
863 anda #$7F make coco 3 only mode
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
864 sta >D.HINIT
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
865 sta >$FF90
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
866 lda >D.VIDMD
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
867 ora #$80 graphics mode
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
868 anda #$F8 1 line/character row
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
869 sta >D.VIDMD
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
870 sta >$FF98
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
871 clr >D.BORDR
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
872 clr >BordReg
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
873 lda ,x get block #
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
874 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
875 lsla
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
876 sta >D.VOFF1
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
877 sta >$FF9D
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
878 clr >D.VOFF0
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
879 clr >$FF9E
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
880 clr >D.VOFF2
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
881 clr >$FF9C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
882 lbsr L0101
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
883 L06C6 rts
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
884
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
885 L06C7 clr ,-s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
886 inc ,s
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
887 L06CB tst ,y check block #
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
888 beq L06D9 if not used yet
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
889 leay b,y go to next screen descriptor
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
890 inc ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
891 deca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
892 bne L06CB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
893 comb
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
894 ldb #E$BMode
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
895 L06D9 puls pc,a
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
896
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
897 ldb #$01
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
898 L06DD os9 F$AlHRAM allocate a screen
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
899 rts
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
900
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
901 L06E1 lda #$01 map screen into memory
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
902 L06E3 pshs u,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
903 bsr L0710
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
904 bcc L06F9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
905 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
906 ldb $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
907 tfr d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
908 ldb ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
909 os9 F$MapBlk
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
910 stb $01,s save error code if any
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
911 tfr u,d
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
912 bcs L06FD
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
913 L06F9 leas $02,s destroy D on no error
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
914 puls pc,u,x
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
915
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
916 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
917
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
918 L06FF pshs y,x,a deallocate screen
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
919 bsr L0710
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
920 bcs L070E
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
921 ldd #DAT.Free set memory to unused
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
922 L0708 std ,x++
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
923 dec ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
924 bne L0708
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
925 L070E puls pc,y,x,a
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
926
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
927 L0710 pshs b,a
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
928 lda #$08 number of blocks to check
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
929 sta $01,s
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
930 ldx <D.Proc
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
931 leax <P$DATImg+$10,x to end of CoCo's DAT image map
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
932 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
933 addb ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
934 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
935 L071F cmpd ,--x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
936 beq L072A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
937 dec $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
938 bne L071F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
939 bra L0743
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
940 L072A dec $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
941 dec ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
942 beq L0738
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
943 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
944 cmpd ,--x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
945 beq L072A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
946 bra L0743
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
947 L0738 lda $01,s get lowest block number found
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
948 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
949 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
950 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
951 lsla
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
952 lsla multiply by 32 (convert to address)
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
953 clrb clear carry
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
954 leas $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
955 rts
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
956
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
957 L0743 puls b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
958 comb
754
c81bad35f02f Worked on commenting source and using proper symbolics, assembles to same
boisy
parents: 508
diff changeset
959 ldb #E$BPAddr bad page address
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
960 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
961
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
962 emod
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
963 eom equ *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
964 end