annotate 3rdparty/utils/view/view.a @ 3250:13737f3608e6

Updated Level 1 VTIO and CoVDG for updates to do CoCoVGA. Updated Level 1 CoCo1 area makefile's to produce binaries and disk images needed for the CoCoVGA video output.
author David Ladd <drencor-xeen@users.sourceforge.net>
date Wed, 28 Mar 2018 21:20:31 -0500
parents 37fd74e6fad8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1706
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
1 *
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
2 * View: view a picture file on a window screen
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
3 *
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
4 * Global labels:
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
5 * main: Main entry point, called by root.a
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
6 * _exit: Exit with no error
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
7 * _error: Exit with error code in B
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
8 * _abort: Clean up and then exit with no error.
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
9 * E$Format: Exit with message about illegal file format.
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
10 *
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
11 check macro
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
12 pshs b,cc
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
13 ldb #\1
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
14 os9 F$PErr
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
15 puls b,cc
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
16 endm
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
17
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
18 ifp1
1912
37fd74e6fad8 Now assembles with rma, uses os9defs.d in c3
boisy
parents: 1777
diff changeset
19 use os9defs.d
1706
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
20 endc
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
21
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
22 StdOut equ 1
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
23 StdErr equ 2
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
24
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
25 psect View_a,0,0,0,0,0
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
26
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
27 main:
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
28 lbsr SetSig Install signal trap
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
29 com <abort Set for abort on signal.
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
30 lbsr select Send select code to current screen.
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
31
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
32 pshs a
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
33 pshs y
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
34 os9 F$ID Get our PID, for use with graphics
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
35 puls y
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
36 sta <PID
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
37 lbsr killbuffs Kill off buffers in our group before we start
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
38 lbsr saveopts Get StdOut options, and save them.
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
39 puls a
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
40
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
41 pshs d,x
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
42 leax end,y Set up free space pool.
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
43 stx <MemTop
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
44 pshs x
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
45 tfr s,d
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
46 subd #stacksize
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
47 subd ,s++
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
48 std <MemSiz
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
49 puls d,x
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
50
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
51 lbsr Parse Parse command line options, open input file
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
52
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
53 lda <format
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
54 pshs y
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
55 lbsr showpic Display the picture
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
56 puls y
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
57
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
58 lbsr bell
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
59 lbsr sendsig
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
60
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
61 lbsr keywait Wait for a keypress.
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
62 lbsr DoSave Save the picture.
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
63 _abort:
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
64 lbsr sendsig
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
65 lbsr cleanup Cleanup-- Select Stdout, turn on cursor, restore options.
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
66 lbsr killbuffs Kill any buffers we used.
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
67
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
68 * Exit with no error
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
69 _exit:
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
70 clrb
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
71 _error:
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
72 OS9 F$Exit
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
73
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
74 BEL fcb $07
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
75
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
76 bell
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
77 pshs a,b,x,y
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
78 tst <SigPID
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
79 bne bellend Don't bell if we should send a signal.
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
80 lda <outpath
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
81 leax BEL,pcr
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
82 ldy #1
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
83 os9 I$Write
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
84 bellend
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
85 puls a,b,x,y,pc
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
86
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
87 sendsig
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
88 pshs a,b
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
89 lda <SigPID
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
90 beq nosig
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
91 ldb <SigOut
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
92 os9 F$Send
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
93 lbcs _error
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
94 clr <SigPID
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
95 nosig
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
96 puls a,b,pc
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
97
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
98 E$Format:
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
99 leax ErrFmt,pcr
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
100 ldy #ErrFmt2-ErrFmt
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
101 bra DoError
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
102 ErrFmt fcc "Illegal file format."
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
103 fcb $0d
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
104 ErrFmt2
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
105 DoError
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
106 lda #StdErr
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
107 os9 I$WritLn
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
108 ldb #1
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
109 bra _error
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
110
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
111 *
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
112 * Expects allocation size requested in D,
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
113 * returns pointer in X. Error is generated if not enough mem.
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
114 malloc:
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
115 pshs a,b,y
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
116 clra
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
117 clrb
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
118 os9 F$Mem
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
119 lbcs _error
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
120 std <oldmemsize
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
121 pshs y
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
122
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
123 addd 2,s
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
124 os9 F$Mem
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
125 lbcs _error
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
126 std <newmemsize
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
127 puls x
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
128 puls a,b,y,pc
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
129
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
130 unmalloc:
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
131 pshs a,b,y
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
132 ldd #0
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
133 os9 F$Mem
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
134 lbcs _error
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
135 cmpd <newmemsize
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
136 bne unmalend
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
137 ldd <oldmemsize
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
138 os9 F$Mem
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
139 lbcs _error
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
140 unmalend
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
141 puls a,b,y,pc
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
142
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
143 ***************************************
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
144 * *
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
145 * Select according to picture format *
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
146 * *
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
147 ***************************************
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
148
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
149 SPTable
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
150 fcb MAXFormat
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
151 lbra MAXshowpic MAXshowpic also handles all the pmodes
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
152 fcb P00Format
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
153 lbra MAXshowpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
154 fcb P01Format
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
155 lbra MAXshowpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
156 fcb P10Format
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
157 lbra MAXshowpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
158 fcb P11Format
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
159 lbra MAXshowpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
160 fcb P20Format
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
161 lbra MAXshowpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
162 fcb P21Format
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
163 lbra MAXshowpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
164 fcb P30Format
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
165 lbra MAXshowpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
166 fcb P31Format
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
167 lbra MAXshowpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
168 fcb P40Format
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
169 lbra MAXshowpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
170 fcb P41Format
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
171 lbra MAXshowpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
172 fcb ARTFormat
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
173 lbra MAXshowpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
174 fcb MGEFormat
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
175 lbra MGEshowpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
176 fcb MGE640Format
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
177 lbra MGEshowpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
178 fcb CM3Format
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
179 lbra CM3showpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
180 fcb CLPFormat
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
181 lbra CLPshowpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
182 fcb PUBFormat
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
183 lbra CLPshowpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
184 fcb VEFFormat
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
185 lbra VEFshowpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
186 fcb PIX256Format
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
187 lbra PIXshowpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
188 fcb PIX128Format
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
189 lbra PIXshowpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
190 fcb PIXFormat
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
191 lbra PIXshowpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
192 fcb IMGFormat
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
193 lbra IMGshowpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
194 fcb RATFormat
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
195 lbra RATshowpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
196 fcb STFormat
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
197 lbra STshowpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
198 fcb MACFormat
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
199 lbra MACshowpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
200 fcb RLEFormat
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
201 lbra RLEshowpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
202 fcb GIFFormat
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
203 lbra GIFshowpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
204 fcb GIFBWFormat
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
205 lbra GIFshowpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
206 fcb MAXCMPFormat
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
207 lbra MAXshowpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
208 fcb ARTCMPFormat
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
209 lbra MAXshowpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
210
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
211 *
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
212 * Does a jump to the appropriate subr entry point.
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
213 * Expects picture format code in A.
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
214 *
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
215 showpic
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
216 pshs x Space to store jump destination
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
217 pshs x Save X register
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
218 leax SPTable-3,pcr
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
219 sploop
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
220 leax 3,x
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
221 cmpa ,x+ Does the format match?
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
222 bne sploop
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
223 stx 2,s Jump address is table entry
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
224 puls x,pc restore X and jump.
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
225
6b23465701c0 Tim Kientzle's VIEW
boisy
parents:
diff changeset
226 endsect