annotate 3rdparty/utils/winfo/winfo.asm @ 1473:1a540a1ebf66

Removed modpak.asm Moved sio.asm and t1.asm to Level 1
author boisy
date Mon, 15 Dec 2003 15:09:41 +0000
parents 00b1c751fad7
children eee8478186d9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
396
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
1 nam WInfo
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
2 ttl OS9 Level II sub to get window information - Ron Lammardo
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
3
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
4 *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
5 * 11/22/87 - Edition #1 - for OS9 Level II V02.00.01
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
6 * 12/22/95 - Edition #2 - for ALL versions of OS-9 by Alan DeKok
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
7 *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
8
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
9 ifp1
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
10 use defsfile
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
11 endc
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
12
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
13 typelang set sbrtn+objct
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
14 attrev set reent+revision
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
15 revision set 1
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
16
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
17 mod Eom,Mname,Typelang,Attrev,Start,Datend
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
18
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
19 mname fcs /WInfo/
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
20 edition fcb 2 edition
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
21
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
22 org 0
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
23 use winfodefs
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
24
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
25 org 0
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
26 stackadr rmb 2 stack address for return
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
27 de rmb 1 device table entry #
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
28 sctype rmb 1 screen type
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
29 offset rmb 2 screen start offset in block
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
30 datimg rmb 2 address of sys DAT image in sysprc
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
31 datadr rmb 2 address of sys DAT in system
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
32 entry rmb 2 address of currently proccessed window entry
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
33 wnum rmb 1 window entry number
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
34 scrblock rmb 1 block # containing screen mem
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
35 blockcnt rmb 1 # of blocks in screen
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
36 wstart rmb 2 x,y coordinates of window start on screen
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
37 wsize rmb 2 x,y size of window
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
38 cwstart rmb 2 x,y coordinates of current working area
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
39 cwsize rmb 2 x,y size of current working area
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
40 paramadr rmb 2 address of window name to dump
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
41 paramln. rmb 1
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
42 paramln rmb 1 size of window name to dump
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
43 vdgadr rmb 2 address of vdg screen
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
44 vdgflag rmb 1 vdg screen flag (1=yes)
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
45 scrnaddr rmb 2 address of screen
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
46 d$devtbl rmb 2 address of device table
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
47 mdname rmb 2 adress of module name
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
48 drvnam rmb 2 address of device driver name
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
49 buffaddr rmb 2 address of return packet
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
50 buffln. rmb 1 dummy byte
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
51 buffln rmb 1 length of return packet..must be > WI$size
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
52 weaddr rmb 2 logical address of window entry insys map (debugging only)
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
53 devmaddr rmb 2 device static storage entry in sys map (debugging only)
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
54 fgc rmb 1 foreground color
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
55 bgc rmb 1 background color
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
56 bdc rmb 1 border color
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
57 curx rmb 1 x coordinate of cursor
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
58 cury rmb 1 y coordinate of cursor
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
59 bpr rmb 2 bytes per row
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
60 stymark rmb 1 screen type marker byte
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
61 paltaddr rmb 2 address of palette registers
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
62 msb rmb 1 working field - msb for 2 digit mults
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
63 lsb rmb 1 working field - lsb for 2 digit mults
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
64 lset rmb 1 logic set #
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
65 psetgb rmb 2 pset group/buffer
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
66 fontgb rmb 2 font group/buffer
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
67 gcurgb rmb 2 gfx cursor group/buffer
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
68 minidat rmb 2 temp dat for cpymem
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
69 bfngrp rmb 2 buffer #/group return
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
70 drawcrsr rmb 4 draw cursor position - xxyy
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
71 sysdat rmb 16 system DAT image
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
72 devname rmb 5 device descriptor name
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
73 devtable rmb 9 device table entry
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
74 devmem equ . device memory copy
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
75 sc rmb 32 screen table
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
76 we rmb 64 window entry
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
77 rmb 32 filler so we got 128 bytes for dev memory
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
78 datend equ .
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
79
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
80 E$Param equ $38 bad Parameter error
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
81
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
82 cc3io fcs /CC3IO/ used to compare device driver name
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
83
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
84 tmpdat fcb 0,0 mini-dat image for block 0 data fetches
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
85
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
86 blnkpalt fcb $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
87 fcb $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
88
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
89 stytable fcb $01,$03,$03,$0f
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
90 blktable fcb 1,1,0,0,2,2,4,4
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
91
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
92 errmsg1 equ *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
93 fcc /Requested device not in device table/
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
94 errm1ln equ *-errmsg1
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
95 errmsg2 fcc /Requested device is not CC3IO/
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
96 errm2ln equ *-errmsg2
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
97 errmsg3 fcc /Can not access window until written to/
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
98 errm3ln equ *-errmsg3
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
99
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
100 start equ *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
101 pshs u,dp save registers
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
102 tfr s,d put in 'd' for computations
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
103 clrb clear lsb
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
104 suba #1 bump down page to make sure we don't conflict
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
105 tfr a,dp now set direct page
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
106 tfr d,u and set u register
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
107 sts <stackadr save address of stack
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
108 leax stackadr+2,u start adrress of bytes to init
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
109 ldb #devtable end addr..# of bytes to clear
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
110 lda #$ff fill character
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
111 lbsr zapblock init the characters
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
112
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
113 * get passed parameters
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
114
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
115 ldx 5,s # of parameters
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
116 cmpx #2 do we have two params?
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
117 lbne badparms no...error
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
118 ldx 7,s 1st param addr (window name addr)
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
119 stx <paramadr save the window name addr
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
120 os9 F$PrsNam get end of name
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
121 lbcs exit exit on error
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
122 clra clear msb
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
123 std <paramln. save window name length
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
124 ldx 11,s 2nd param addr (buffer addr)
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
125 stx <buffaddr save the buffer address
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
126 ldx 13,s 2nd param length
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
127 stx <buffln. save the buffer length address
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
128 cmpx #WI$Size check if buffer big enough
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
129 lblo smllbuff no..send buffer to small status
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
130
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
131 * clear return buffer
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
132
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
133 ldx <buffaddr address of return buffer
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
134 ldb #WI$ermsg end address to init
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
135 lda #$ff fill char
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
136 lbsr zapblock zap the block
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
137 ldb #40 # of bytes to init
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
138 lda #$20 space fill
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
139 lbsr zapblock zap the message
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
140
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
141 * get system process descriptor for sys DAT image
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
142
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
143 leax tmpdat,pcr addr of sys mini-dat
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
144 tfr x,d put it in d
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
145 ldx #$004C Addr of dat image in system direct page
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
146 ldy #2 2 bytes to get
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
147 pshs u save u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
148 leau datadr,u addr of receiver
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
149 os9 F$CpyMem get it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
150 puls u restore u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
151 lbcs exit exit on error
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
152 leax tmpdat,pcr addr of sys mini-data
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
153 tfr x,d put it in d
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
154 ldx datadr,u physical addr of sys DAT in sys addr map
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
155 pshs u save u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
156 leay sysdat,u addr of receiver
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
157 sty <datimg save it for later
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
158 tfr y,u put in u for call
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
159 ldy #16+16+1 16 bytes to get in image
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
160 os9 F$CpyMem get it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
161 puls u restore u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
162 lbcs exit and exit on error
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
163
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
164 ldx <datimg get ptr to system DAT image
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
165 lda 16+16,x grab Level III SCF map info
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
166 beq not.l3
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
167 sta 3,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
168 inca
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
169 sta 5,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
170
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
171 * get offset in system map to device tables
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
172 not.l3 ldy #2 2 bytes to get
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
173 ldd <datimg addr of sys DAT image
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
174 ldx #D.DevTbl addr of device table addr
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
175 pshs u save u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
176 leau d$devtbl,u addr of reciever
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
177 os9 F$Cpymem get it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
178 puls u restore u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
179 lbcs exit exit on error
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
180 clr <de clear device table entry #
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
181 ldx d$devtbl,u addr of device table
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
182 leax -$0D,x back off one entry for increment in loop
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
183 stx d$devtbl,u and save it again
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
184 leax devtable,u get the addr of our copy of devtable
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
185 stx <entry save the entry addr for later
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
186
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
187 * just do an I$Attach instead of rooting through the device table
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
188
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
189 lda #READ. read-only permissions
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
190 ldx <paramadr point to window name
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
191 pshs u save for later
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
192 OS9 I$Attach get U=address of device table entry
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
193 puls x kill end of device name pointer
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
194 lbcs error1 exit on error
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
195
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
196 OS9 I$Detach so link count is correct
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
197 exg x,u now U=memory, and X=ptr to device table entry
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
198
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
199 leay devtable,u addr of reciever
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
200 pshs u save u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
201 tfr y,u put reciever addr in u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
202 ldy #9 copy table entry
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
203 ldd <datimg addr of sys DAT image
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
204 os9 F$Cpymem get it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
205 puls u restore u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
206 lbcs exit exit on error
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
207 leax devtable,u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
208 lda V$USRS,x test for entry in use
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
209 lbeq error3 if not in use...give out error saying so
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
210
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
211 * Alan DeKok's mod: lots of code removed here
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
212
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
213 * get driver name offset
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
214
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
215 ldx <entry get device entry address
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
216 ldx V$DRIV,x get driver module start addr
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
217 leax M$Name,x get addr of module name
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
218 ldy #2 get 2 bytes
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
219 ldd <datimg addr of sys DAT image
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
220 pshs u save u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
221 leau mdname,u addr of reciever
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
222 os9 F$CpyMem get it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
223 puls u restore u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
224 lbcs exit exit on error
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
225
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
226 * now get actual driver name
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
227
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
228 ldx <entry addr of deice entry
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
229 ldd V$DRIV,x driver module start addr
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
230 addd mdname,u + module offset to driver name
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
231 tfr d,x put it in x so we can grab it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
232 ldy #5 5 bytes in name (CC3IO)
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
233 ldd <datimg addr of sys DAT image
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
234 pshs u save u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
235 leau devname,u addr of receiver
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
236 os9 F$CpyMem get it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
237 puls u restore u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
238 lbcs exit exit on error
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
239
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
240 * we got the requested device...now see if its cc3io
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
241
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
242 ldb #5 5 bytes to compare
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
243 leax cc3io,pcr get addr of 'CC3IO'
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
244 leay devname,u get addr of the driver nam
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
245 os9 F$CmpNam see if they're the same
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
246 lbcs error2 if not-skip to next entry
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
247
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
248 * get the device static storage
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
249
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
250 ldx <entry addr of device entry
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
251 ldd V$STAT,x addr of static storage
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
252 tfr d,x put in x so we can get it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
253 stx <devmaddr save device mem addr
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
254 ldd <datimg addr of sys DAT image
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
255 ldy #$80 bytes to get
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
256 pshs u save u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
257 leau devmem,u addr of receiver
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
258 os9 F$CpyMem get it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
259 puls u restore u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
260 lbcs exit exit on error
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
261
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
262 * get the window entry number
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
263
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
264 leax devmem,u addr of device mem
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
265 lda $35,x offset to window entry #
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
266 sta wnum,u save it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
267
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
268 * check if its a vdg screen
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
269
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
270 clr <vdgflag else clear the flag
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
271 leax devmem,u addr of device memory
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
272 lda 6,x offset to window type
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
273 anda #$80 check the high bit
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
274 lbeq vdgscrn if not set,its a vdg screen so jump
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
275
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
276 * get actual window entry
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
277
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
278 lda wnum,u window entry #
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
279 ldb #64 window entry size
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
280 mul find offset
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
281 addd #$1280 add it to start of window entrys
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
282 std <weaddr save window entry address
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
283 tfr d,x put in x so we can get it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
284 ldy #64 64 bytes to get in window entry
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
285 ldd <datimg addr of sys DAT image
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
286 pshs u save u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
287 leau we,u addr of receiver
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
288 os9 F$CpyMem get it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
289 puls u restore u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
290 lbcs exit exit on error
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
291
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
292
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
293 * check if window ok
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
294
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
295 lda we,u check msb of screen table address
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
296 cmpa #$ff is it valid ???
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
297 lbeq error3 send error message
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
298
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
299 * get screen table entry
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
300
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
301 ldx we,u address of screen table
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
302 ldy #32 32 bytes in screen table
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
303 ldd <datimg addr of sys DAT image
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
304 pshs u save u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
305 leau sc,u addr of receiver
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
306 os9 F$CpyMem get it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
307 puls u restore u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
308 lbcs exit exit on error
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
309 leax sc,u address of screen table
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
310 ldb 5,x border prn
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
311 stb <bdc save it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
312 ldb ,x screen type
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
313 stb <stymark
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
314
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
315 * remove bias to get actual screen type
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
316
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
317 cmpb #$80
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
318 bls lowtype
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
319 ldb #4 4 = 16 colors possible
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
320 stb <stymark make that the screen type marker
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
321 ldb #$87
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
322 subb ,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
323 bra getblock
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
324 lowtype equ *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
325 addb #4
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
326 getblock equ *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
327 stb <sctype save the screen type
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
328 decb decrement for indexing
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
329 leax blktable,pcr address of block count table
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
330 lda b,x get block count (via indexing table)
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
331 sta <blockcnt save it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
332 leax sc,u address of screen table
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
333 lda 1,x get first block used
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
334 sta <scrblock save it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
335 leax 16,x address of palettes
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
336 stx <paltaddr save it for later
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
337 leax we,u addr of window entry
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
338
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
339 * get screen start in block
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
340
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
341 leax $34,x screen start
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
342 lda ,x+ get msb
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
343 suba #$80 ?????
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
344 ldb ,x+ get lsb
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
345 std <offset save screen offset
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
346 ldy ,x++ get screen start coordinates
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
347 sty <wstart save them
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
348 ldd ,x++ get screen size (x,y)
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
349 std <wsize save it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
350 leax we,u get start of window entry
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
351 leax 5,x addr of cwarea start
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
352 ldy ,x++ working area start coordinates
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
353 sty <cwstart save them
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
354 ldd ,x++ working area size coordinates
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
355 std <cwsize save them
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
356 cmpd <wsize see if its same as total window size
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
357 beq getbpr if it is,skip next section
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
358
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
359 * adjust block offset to take change working area into account
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
360
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
361 clr <msb clear temp area
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
362 lda <cwstart x offset of area
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
363 lsla multiply by 2 for attribute bytes
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
364 sta <lsb save it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
365 lda <cwstart+1 y offset of area
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
366 lsla multiply by 2 for attribute bytes
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
367 ldb <wsize x-size of window
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
368 mul mulitply
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
369 addd <msb add x offset of area
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
370 addd <offset add original block offset
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
371 std <offset save new block offset
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
372
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
373 * get # of bytes per row and cursor coordinates
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
374
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
375 getbpr equ *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
376 ldx #$1075 address of gfx table start pointer
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
377 ldy #2 # of bytes to get
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
378 ldd <datimg addr of sys DAT image
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
379 pshs u save u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
380 leau msb,u addr of receiver
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
381 os9 F$Cpymem get it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
382 puls u restore u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
383 lbcs exit exit on error
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
384 lda <wnum get window entry number
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
385 ldb #$12 size of gfx table entry
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
386 mul get the offset to start of our gfx window entry
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
387 addd #1 add 1 for draw cursor start
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
388 ldx <msb load addr of table start
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
389 leax d,x and add offset
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
390 ldy #4 get 4 bytes
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
391 ldd <datimg addr of sys DAT image
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
392 pshs u save u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
393 leau drawcrsr,u addr of receiver
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
394 os9 F$Cpymem get it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
395 puls u restore u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
396 lbcs exit exit on error
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
397
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
398 clr <curx clear fields
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
399 clr <cury
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
400 leax we,u address of window entry
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
401 ldd $14,x butes per row
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
402 std <bpr save bytes per row
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
403
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
404 * get foreground/background prn's
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
405
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
406 leay stytable,pcr addr of screen type mask table
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
407 ldb <stymark get sty marker byte
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
408 decb decrement for indexing
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
409 leay b,y addr of mask (via indexing)
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
410 ldd $16,x get fore/back palette #'s
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
411 anda ,y strip of bias againt mask
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
412 andb ,y
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
413 sta <fgc save foreground prn
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
414 stb <bgc save background prn
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
415
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
416 lda $1A,x logic set #
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
417 sta <lset save it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
418 lda $1B,x block # of font
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
419 ldy $1C,x block offset of font
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
420 lbsr fetchit get group/buffer of font
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
421 std <fontgb save it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
422 lda $1E,x block # of pset
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
423 ldy $1F,x block offset of pset
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
424 leay -$20,y back off to get header start of pset
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
425 lbsr fetchit get group/buffer of pset
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
426 std <psetgb save it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
427 lda $28,x block # of gfx cursor
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
428 ldy $29,x block offset of gfx cursor
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
429 lbsr fetchit get group/buffer of gfx cursor
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
430 std <gcurgb save it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
431
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
432 ldd $0B,x cursor logical address
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
433 subd 3,x subtract screen logical start
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
434 lbra getcrps get x,y cursor coords
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
435
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
436 * get block number and offset in block for VDG type screen
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
437
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
438 vdgscrn equ *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
439 leax blnkpalt,pcr address of $ff's for vdg palettes
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
440 stx <paltaddr save the addr
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
441 lda #$ff fill char
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
442 sta <fgc no palettes for vdg screen
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
443 sta <bgc
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
444 sta <bdc
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
445 lda #1 vdgflag=1
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
446 sta <vdgflag
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
447 sta <blockcnt 1 block in screen
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
448 clra
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
449 clrb
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
450 std <wstart window starts at 0,0
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
451 std <cwstart
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
452 clr <sctype screentype = 0
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
453 leax devmem,u address of device memory
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
454 ldd $38,x logical screen start addr
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
455 std vdgadr,u msb of vdg address
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
456 lsra divide by 16
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
457 lsra
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
458 lsra
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
459 lsra
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
460 lsra divide by 2
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
461 inca add 1
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
462 lsla multiply by 2
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
463 deca subtract 1
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
464 ldx <datimg addr of sys DAT image
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
465 ldb a,x add on block # in map and get the physical block
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
466 stb <scrblock save it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
467 ldd vdgadr,u get the physical screen address
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
468 anda #%00011111 strip off block # bias
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
469 std <offset save offset within block
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
470 ldd #$2010 32 * 16 screen
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
471 std <cwsize save it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
472 std <wsize save it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
473 clr <curx clear cursor offset counters
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
474 clr <cury
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
475 ldd #$0020 32 bytes/row
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
476 std <bpr save it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
477 leax devmem,u address of device memory
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
478 ldd $3C,x cursor address
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
479 subd $38,x screen address
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
480
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
481 getcrps equ *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
482 cmpd <bpr are we done getting row?
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
483 blo gotycur yes..skip this
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
484 subd <bpr subtract bytes/row
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
485 inc <cury increment row #
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
486 bra getcrps and check for more
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
487
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
488 gotycur equ *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
489 stb <curx save y cursor pos
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
490 tst <vdgflag is it vdg screen??
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
491 bne savexcur yes..more processing
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
492 lda <sctype get screen type to determine divisor
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
493 cmpa #5 is it type 5 screen???
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
494 beq gotxcur go save x cursor position
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
495 lsrb divide by two to get actual offset
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
496 cmpa #8 is it type 7 screen???
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
497 bne gotxcur go save x cursor position
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
498 lsrb divide by two again
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
499
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
500 gotxcur equ *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
501 stb <curx save y cursor pos
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
502 lbra retbuffr go return buffer
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
503
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
504 savexcur equ *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
505 leax devmem,u address of device mem
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
506 lda $37,x screen # on display
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
507 bne chkmedrs if not 0 then its medium or hi res
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
508 tst $45,x test med-res flag
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
509 lbeq retbuffr its not hi-res gfx
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
510
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
511 chkmedrs equ *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
512 ldb #3 3 bytes per screen table entry
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
513 mul get screen table offset
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
514 leax $4A,x start of screen tables
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
515 leax b,x offset for screen #
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
516 inc <vdgflag =2 for med-res gfx
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
517 clr <offset screen starts at begin of block
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
518 clr <offset+1
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
519 lda ,x+ get start block
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
520 sta <scrblock save it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
521 lda ,x+ get block count
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
522 lbne vdghires if there its a hi-res
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
523 ldx #$0180 BPR for med-res vdg screen
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
524 stx <bpr save it for later
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
525 lda #%00010000 default mode of 1
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
526 leax devmem,u get start of device mem again
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
527 tst $3f,x screen mode
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
528 bpl vdgtyp1 if its is..go save it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
529 clra make the mode=0
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
530
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
531 vdgtyp1 equ *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
532 ora $66,x foreground color
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
533 sta <sctype thats our screen type
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
534 lbra retbuffr go return buffer
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
535
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
536 * hi res vdg screen
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
537
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
538 vdghires equ *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
539 sta <blockcnt save the block count
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
540 lda ,x get the screen type
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
541 sta <sctype save it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
542 ldy #$2818 sizex/sizey for screen type 0,1,2
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
543 ldx #$0280 BPR for screen type 0,1,2
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
544 cmpa #2 is screen type <= 2
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
545 bls vdgbpr if yes..go save BPR
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
546 ldy #$5018 BPR for screen types 3,4
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
547 ldx #$0500 BPR for screen types 3,4
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
548
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
549 vdgbpr equ *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
550 sty <wsize save the size
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
551 sty <cwsize same for current working size
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
552 stx <bpr save the bytes per row
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
553 leax devmem,u get address of device mem again
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
554 leax $6B,x address of palettes
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
555 stx <paltaddr save it for later
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
556 inc <vdgflag =3 (hi res vdg)
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
557 lbra retbuffr
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
558
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
559 * dump the screen
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
560
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
561 retbuffr equ *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
562 ldx <buffaddr address of return buffer
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
563 clra
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
564 sta WI$stat,x status is ok (=0)
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
565 lda <vdgflag
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
566 sta WI$vdg,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
567 lda <sctype
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
568 sta WI$sty,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
569 lda <scrblock
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
570 sta WI$block,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
571 lda <blockcnt
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
572 sta WI$blcnt,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
573 ldd <offset
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
574 std WI$offst,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
575 lda <wstart
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
576 sta WI$cpx,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
577 lda <wstart+1
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
578 sta WI$cpy,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
579 lda <wsize
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
580 sta WI$szx,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
581 lda <wsize+1
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
582 sta WI$szy,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
583 lda <cwstart
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
584 sta WI$cwcpx,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
585 lda <cwstart+1
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
586 sta WI$cwcpy,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
587 lda <cwsize
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
588 sta WI$cwszx,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
589 lda <cwsize+1
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
590 sta WI$cwszy,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
591 lda <curx
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
592 sta WI$curx,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
593 lda <cury
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
594 sta WI$cury,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
595 ldd <bpr
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
596 std WI$bpr,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
597 leay we,u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
598 lda $19,y
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
599 sta WI$cbsw,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
600 lda <bdc
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
601 sta WI$bdprn,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
602 lda <fgc
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
603 sta WI$fgprn,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
604 lda <bgc
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
605 sta WI$bgprn,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
606 lda <lset
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
607 sta WI$Lset,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
608 ldd <fontgb
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
609 sta WI$FntGr,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
610 stb WI$FntBf,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
611 ldd <psetgb
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
612 sta WI$PstGr,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
613 stb WI$PstBf,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
614 ldd <gcurgb
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
615 sta WI$GcrGr,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
616 stb WI$GcrBf,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
617 ldd <drawcrsr
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
618 std WI$DrCrx,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
619 ldd <drawcrsr+2
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
620 std WI$DrCry,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
621 lda edition,pcr
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
622 sta WI$Edtn,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
623 ldd <weaddr
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
624 std WI$weadr,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
625 ldd <devmaddr
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
626 std WI$devm,x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
627 leay WI$pregs,x addr of where to move palettes to
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
628 ldx <paltaddr addr of palettes
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
629 ldd #16 16 bytes to move
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
630 lbsr u$movexy move it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
631 bra clrexit done so return from sub
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
632
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
633 badparms equ *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
634 ldb #E$Param bad parameter error
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
635 bra exit go return it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
636
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
637 clrexit clrb no error..clear b reg
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
638 exit equ *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
639 lds <stackadr restore stack
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
640 puls u,dp restore u and dp registers
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
641 clra clear carry bit
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
642 tstb
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
643 beq return
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
644 coma set carry bit
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
645 return equ *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
646 rts
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
647
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
648 zapblock equ *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
649 sta ,x+
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
650 decb
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
651 bne zapblock
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
652 rts
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
653
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
654 * fetch 2 bytes from block [a] at offset [y]+3
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
655
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
656
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
657
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
658 fetchit equ *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
659 clr <minidat
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
660 sta <minidat+1
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
661 bne fetchok jump if valid block #
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
662 clra else clear group #
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
663 clrb clear buffer #
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
664 rts
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
665
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
666 fetchok equ *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
667 pshs x save x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
668 leax 3,y poistion to group #
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
669 tfr x,d put in d for arithmetic
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
670 anda #%00011111 strip off hig order bytes
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
671 tfr d,x and put back in x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
672 leay minidat,u adr of temp DAT image
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
673 tfr y,d put in d for os9 call
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
674 ldy #2 bytes to get
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
675 pshs u save u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
676 leau bfngrp,u addr of receving field
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
677 os9 F$Cpymem get it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
678 puls u restore u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
679 lbcs exit exit on error
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
680 ldd <bfngrp put it in d for return
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
681 puls x restore x
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
682 rts
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
683
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
684 * move [d] bytes from [x] to [y]
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
685
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
686 u$movexy pshs u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
687 tfr d,u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
688 movexy10 lda ,x+
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
689 sta ,y+
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
690 leau -1,u
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
691 cmpu #0
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
692 bne movexy10
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
693 puls u,pc
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
694
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
695 error1 equ *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
696 ldb #1 error number
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
697 pshs b save error #
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
698 leax errmsg1,pcr address of error msg
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
699 ldd #errm1ln length of error message
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
700 bra moverr go move it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
701
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
702 error2 equ *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
703 ldb #2 error number
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
704 pshs b save error #
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
705 leax errmsg2,pcr address of error msg
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
706 ldd #errm2ln length of error message
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
707 bra moverr go move it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
708
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
709 error3 equ *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
710 ldb #3 error number
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
711 pshs b save error #
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
712 leax errmsg3,pcr address of error msg
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
713 ldd #errm3ln length of error message
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
714 bra moverr go move it
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
715
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
716 moverr equ *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
717 ldy <buffaddr address of return buffer
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
718 leay WI$ErMsg,y address of error message
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
719 lbsr u$movexy
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
720 puls b
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
721
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
722 storstat equ *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
723 ldy <buffaddr address of return buffer
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
724 stb WI$Stat,y save the status byte
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
725 lbra clrexit done
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
726
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
727
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
728 smllbuff equ *
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
729 ldb #$ff buffer too small status #
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
730 bra storstat go store status # and exit
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
731
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
732
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
733 emod
00b1c751fad7 Added WInfo
boisy
parents:
diff changeset
734 eom equ *