Subversion Repositories MB01 Project

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 - 1
  Tue Jul 17 11:00:23 2018                                                                                               Page    1
2
 
3
 
4
 
5
 
6
 
7
 
8
 
9
          2500 A.D. 65816 Macro Assembler #26960 - Version 5.02g
10
          -----------------------------------------------------
11
 
12
                       Input  Filename : src\FE\pcode.asm
13
                       Output Filename : obj\FE\pcode.obj
14
                       Listing Has Been Relocated
15
 
16
 
17
 2598                        	.LIST		on
18
 2599
19
 2600                        		;.INCLUDE inc\dirp01.inc
20
 2601  F8FFB1                		.INCLUDE inc\dpcbm.inc
21
 2602                        	;; cbm emulation
22
 2603
23
 2604                        	;;CBMP0	.EQU	$7F00
24
 2605
25
 2606                        	; sezione COMMON -- questo permette di includere il file in piu' file
26
 2607
27
 2608                        	DPCBM:	.SECTION page0, ref_only, common
28
 2609
29
 2610  000000                		.ABSOLUTE		;; inizia sempre da $00
30
 2611  000000                		.ORG	0x00
31
 2612
32
 2613                        	;;MAXLF	.EQU	$10		; max. logical files
33
 2614          00000B        	MAXLF	.EQU	11		; max. logical files
34
 2615          000008        	MAXVIEC	.EQU	8		; max. virtual iec device #
35
 2616  000000                			.DS	16
36
 2617  000010
37
 2618  000010  00            	subflg		.DB	; ($10)
38
 2619  000011  00            			.DB	; ($11)
39
 2620  000012  00            			.DB	; ($12)
40
 2621  000013  00            			.DB	; ($13)
41
 2622  000014  0000          	lineno		.DW	; ($14-$15) line number used by editor
42
 2623  000016  00            	tmppt		.DB	; ($16)
43
 2624  000017  00            	tcnt		.DB	; ($17) temp. counter/index
44
 2625  000018  0000          			.DW	; ($18-$19)
45
 2626  00001A  0000          			.DW	; ($1A-$1B)
46
 2627  00001C  0000          			.DW	; ($1C-$1D)
47
 2628  00001E  0000          			.DW	; ($1E-$1F)
48
 2629  000020  00            			.DB	; ($20)
49
 2630
50
 2631                        	; basic/p-code virtual machine work area
51
 2632  000021  0000          			.DW	; ($21-$22)
52
 2633  000023  0000          			.DW	; ($23-$24)
53
 2634  000025  0000          			.DW	; ($25-$26)
54
 2635  000027  0000          			.DW	; ($27-$28)
55
 2636  000029  0000          			.DW	; ($29-$2A)
56
 2637  00002B  0000          			.DW	; ($2B-$2C)
57
 2638  00002D  0000          			.DW	; ($2D-$2E)
58
 2639  00002F  0000          	arytab		.DW	; ($2F-$30)
59
 2640  000031  0000          	strend		.DW	; ($31-$32)
60
 2641  000033  0000          	freetop		.DW	; ($33-$34)
61
 2642  000035  0000          	freespc		.DW	; ($35-$36)
62
 2643  000037  0000          	memsiz		.DW	; ($37-$38)
63
  Tue Jul 17 11:00:23 2018                                                                                               Page    2
64
 
65
 
66
 
67
 
68
 2644  000039  0000          	curline		.DW	; ($39-$3A) current line number in execution
69
 2645  00003B  0000          	oldline		.DW	; ($3B-$3C) previous line number in execution
70
 2646  00003D  0000          	oldtxt		.DW	; ($3D-$3E) saved pointer to text in basic execution
71
 2647  00003F  0000          	datlin		.DW	; ($3F-$40)
72
 2648  000041  0000          	datptr		.DW	; ($41-$42)
73
 2649  000043  0000          	inpptr		.DW	; ($43-$44)
74
 2650  000045  0000          	varnam		.DW	; ($45-$46)
75
 2651  000047  0000          	varpnt		.DW	; ($47-$48)
76
 2652  000049  0000          	forpnt		.DW	; ($49-$4A) basic
77
 2653  00004B  0000          	opptr		.DW	; ($4B-$4C) basic
78
 2654  00004D  00            	opmask		.DB	; ($4D)
79
 2655  00004E  0000          	defpnt		.DW	; ($4E-$4F)
80
 2656  000050  0000          	dscpnt		.DW	; ($50-$51)
81
 2657  000052  00            	dsclen		.DB	; ($52)
82
 2658  000053  00            	prompt		.DB	; ($53) prompt flag/CMD channel - editor/basic ($13)
83
 2659
84
 2660                        	; equates for p-code virtual machine
85
 2661          00003B        	prtrap		.EQU	oldline		; ($3B) p-code trap errors flag
86
 2662          00003C        	pcstack		.EQU	oldline+1	; ($3C-$3D) p-code save stack
87
 2663          00003E        	prterr		.EQU	oldtxt+1	; ($3E) p-code run time error number
88
 2664          00003F        	psrline		.EQU	datlin		; ($3F-$40) pascal source line number
89
 2665          000041        	prseed		.EQU	datptr		; ($41-$42) p-code random generator
90
 2666          000043        	pbrkcnt		.EQU	inpptr		; ($43) p-code counter for break check
91
 2667          000044        	tmpy		.EQU	inpptr+1	; ($44) p-code temp. for save Y
92
 2668          000045        	inqidx		.EQU	varnam		; ($45) p-code index to input buffer
93
 2669          000046        	inqcnt		.EQU	varnam+1	; ($46) p-code input buffer counter
94
 2670          000047        	tmpv1		.EQU	varpnt		; ($47) p-code temp.
95
 2671          000048        	tmpv2		.EQU	varpnt+1	; ($48) p-code temp.
96
 2672          000049        	tmpa		.EQU	forpnt		; ($49) p-code temp. save A
97
 2673          00004A        	tmpwa		.EQU	forpnt+1	; ($4A) p-code tmp. save byte to write
98
 2674          00004B        	tmpx		.EQU	opptr		; ($4B) p-code tmp. save X when print
99
 2675          00004C        	pcterr		.EQU	opptr+1		; ($4C) p-code compiler error flag
100
 2676          00004D        	tmpdsk		.EQU	opmask		; ($4D) p-code default temp. disk unit
101
 2677          00004E        	defprn		.EQU	defpnt		; ($4E) p-code default printer #device
102
 2678          00004F        	pcdbg		.EQU	defpnt+1	; ($4F) p-code debug run after error
103
 2679          000050        	pcptr		.EQU	dscpnt		; ($50-$51) pointer to p-code (debug)
104
 2680          000052        	autolf		.EQU	dsclen		; ($52) p-code auto line feed flag
105
 2681
106
 2682  000054                	tmpwrk		.DS 4	; ($54-$57) temp. area editor/virtual iec
107
 2683  000058  00            	tmpb0		.DB	; ($58)
108
 2684  000059  00            	argbits		.DB	; ($59)	    FAC #1 guard bits
109
 2685  00005A  00            	tmpb2		.DB	; ($5A) tmp. byte - used by fpu
110
 2686  00005B  00            	txtlen		.DB	; ($5B) tmp. word length of text to insert in buffer
111
 2687  00005C  00            	tmpb1		.DB	; ($5C) tmp. byte used by editor and float point unit
112
 2688  00005D  0000          	tmpval		.DW	; ($5D-$5E) temp. word used by editor/fpu
113
 2689  00005F  0000          	tlnptr		.DW	; ($5F-$60) temp. line text pointer used by editor/fpu
114
 2690  000061  00            	facexp		.DB	; ($61)     FAC #1 exponent
115
 2691  000062                	facm		.DS 4	; ($62-$65) FAC #1 mantissa
116
 2692  000066  00            	facsgn		.DB	; ($66)     FAC #1 sign
117
 2693  000067  00            	sercnt		.DB	; ($67)     FAC #1 series evaluation
118
 2694  000068  00            	facov		.DB	; ($68)     FAC #1 overflow
119
 2695  000069  00            	argexp		.DB	; ($69)     FAC #2 exponent
120
 2696  00006A                	argm		.DS 4	; ($6A-$6D) FAC #2 mantissa
121
 2697  00006E  00            	argsgn		.DB	; ($6E)     FAC #2 sign
122
 2698  00006F  00            	arisgn		.DB	; ($6F)     FAC #1 & #2 sign comparison
123
 2699  000070  00            	facbits		.DB	; ($70)	    FAC #1 guard bits
124
 2700  000071  0000          	fbufpt		.DW	; ($71-$72) FAC series evaluation pointer
125
  Tue Jul 17 11:00:23 2018                                                                                               Page    3
126
 
127
 
128
 
129
 
130
 2701  000073  00            	fbufpt2		.DB	; ($73)	    FAC series evaluation bank (progr. bank)
131
 2702
132
 2703                        	; tmp. variables (equates) used by float point unit
133
 2704          000054        	factmp		.EQU	tmpwrk		; ($54-$57) used by fpu mult/div
134
 2705          00005A        	cprmsk		.EQU	tmpb2		; ($5A) used by trigs. funcs.
135
 2706          00005B        	faclsb		.EQU	txtlen		; ($5B) used by float point unit
136
 2707          00005D        	dccnt		.EQU	tmpval		; ($5D) digit count after decimal dot
137
 2708          00005E        	expval		.EQU	tmpval+1 	; ($5E) exponent value when convert
138
 2709          00005F        	dotfg		.EQU	tlnptr		; ($5F) flag decimal dot when convert
139
 2710          000060        	expsgn		.EQU	tlnptr+1 	; ($60) flag exponent sign when conver
140
 2711          000067        	sgnfg		.EQU	sercnt		; ($67) flag: minus sign when convert
141
 2712          000071        	decidx		.EQU	fbufpt		; ($71) string index when convert
142
 2713          000072        	s2fer		.EQU	fbufpt+1	; ($72) string to float flag error
143
 2714          000073        	decidx2		.EQU	fbufpt+2	; ($73) used when convert float to str
144
 2715
145
 2716  000074  0000          	s2fstk		.DW	; ($74-$75) save stack when string to float conversion
146
 2717  000076                	longp		LP	; ($76-$77-$78) temp. long pointer
147
 2718  000079  00            	s2fptr		.DB	; ($79) flag trap overflow err. string to float conv.
148
 2719
149
 2720  00007A  0000          	txtp		.DW	; ($7A-$7B) current pointer to text
150
 2721  00007C  00            	pcdsk		.DB	; ($7C) flag for pascal compiler
151
 2722                        				; <7> : compile in memory
152
 2723
153
 2724  00007D                	iecrp		LP	; ($7D) iec: pointer to read buffer for include file
154
 2725  000080  00            	iecalt		.DB	; ($80) iec: flag read from include file
155
 2726  000081                	iectp		LP	; ($81) iec: pointer to read main text buffer
156
 2727  000084  00            	iecndx		.DB	; ($84) iec: index main text buffer
157
 2728  000085  00            	ieceof		.DB	; ($85) iec: end of file flag main text buffer
158
 2729  000086                	iecwp		LP	; ($86) iec: pointer to write buffer
159
 2730  000089  00            	iecfg		.DB	; ($89)	iec: flag main text buffer
160
 2731  00008A  0000          	iecndx2		.DW	; ($8A) iec: index buffer include file
161
 2732  00008C  00            	iecbuf		.DB	; ($8C) iec: byte buffer
162
 2733  00008D  00            	svbnk		.DB	; ($8D) save vbnk when run pascal compiler
163
 2734  00008E  00            	ieceof2		.DB	; ($8E) iec: flag eof include file
164
 2735  00008F  00            	vxflag		.DB	; ($8F) flag valid text in x-bank
165
 2736  000090  00            	kstat		.DB	; ($90) CBM emulated IEC status
166
 2737  000091  00            	errno		.DB	; ($91) saved error number
167
 2738  000092  00            	keyfg		.DB	; ($92) keyboard flag: KbdFlag
168
 2739  000093  00            	keyctl		.DB	; ($93) flag control key from get key
169
 2740  000094  00            	keysh		.DB	; ($94) flag keyboard: KbdShift
170
 2741  000095  00            	keytg		.DB	; ($95) flag keyboard: KbdToggle
171
 2742  000096  00            	basic		.DB	; ($96) flag current 'basic' mode
172
 2743                        				; 	<7>: flag basic mode
173
 2744                        				; 	<6>: flag pascal compiler running
174
 2745  000097  00            	runf		.DB	; ($97) flag current run mode
175
 2746  000098  00            	ldtnd		.DB	; ($98) number of open files
176
 2747  000099  00            	dfltn		.DB	; ($99) default input device
177
 2748  00009A  00            	dflto		.DB	; ($9A) default output device
178
 2749  00009B  00            	skpbk		.DB	; ($9B) skip blank flag
179
 2750  00009C  00            	w2sf		.DB	; ($9C) integer to string flag conversion
180
 2751  00009D  00            	msgflg		.DB	; ($9D) flag message
181
 2752  00009E  00            	autof		.DB	; ($9E) flag auto-increment line numbering
182
 2753  00009F  0000          	wauto		.DW	; ($9F-$A0) auto-increment for line numbering
183
 2754  0000A1  00            	tbnk		.DB	; ($A1) bank that hold basic/pascal text
184
 2755  0000A2  00            	vbnk		.DB	; ($A2) bank that hold basic var/pascal pcode-stack
185
 2756  0000A3  00            	cbnk		.DB	; ($A3) compiler bank/temp. bank for exchange
186
 2757  0000A4  00            	jbnk		.DB	; ($A4) bank for obj, when compiling (3 bank max.)
187
  Tue Jul 17 11:00:23 2018                                                                                               Page    4
188
 
189
 
190
 
191
 
192
 2758  0000A5  00            	xbnk		.DB	; ($A5) exchange bank for text buffer
193
 2759  0000A6  00            	dbnk		.DB	; ($A6) bank for ram disk (jbnk + 3)
194
 2760  0000A7  0000          	botmem		.DW	; ($A7-$A8) start of memory on the text bank
195
 2761  0000A9  0000          	topmem		.DW	; ($A9-$AA) top of memory on the text bank
196
 2762  0000AB  0000          	txtbeg		.DW	; ($AB-$AC) begin of text buffer
197
 2763  0000AD  0000          	txtend		.DW	; ($AD-$AE) end of text buffer + 1
198
 2764  0000AF  0000          	txttop		.DW	; ($AF-$B0) top of memory + 1 reserved to text buffer
199
 2765  0000B1  0000          	varbeg		.DW	; ($B1-$B2) start of basic var/pcode
200
 2766  0000B3  0000          	vartop		.DW	; ($B3-$B4) top of basic var/pcode + 1
201
 2767  0000B5  0000          	xtop		.DW	; ($B5-$B6) top of text + 1 in x-bank
202
 2768  0000B7  00            	fnlen		.DB	; ($B7) length of current filename
203
 2769  0000B8  00            	lacur		.DB	; ($B8) current logical file number
204
 2770  0000B9  00            	sacur		.DB	; ($B9) current secondary address
205
 2771  0000BA  00            	facur		.DB	; ($BA) current device number
206
 2772  0000BB  0000          	fnadr		.DW	; ($BB-$BC) pointer to current filename
207
 2773  0000BD  00            	fnadr2		.DB	; ($BD) - bank that hold file name
208
 2774  0000BE  00            	objdsk		.DB	; ($BE) compiler: option '1' specified
209
 2775  0000BF  00            	truedsk		.DB	; ($BF) true disk for load pascal soource file
210
 2776  0000C0  0000          	curstk		.DW	; ($C0-$C1) current stack when in edit mode
211
 2777  0000C2  00            	pcodef		.DB	; ($C2) flag p-code present for execution
212
 2778
213
 2779  0000C3                	latb		.DS	MAXLF		; logical files table
214
 2780  0000CE                	fatb		.DS	MAXLF		; devices numbers table
215
 2781  0000D9                	satb		.DS	MAXLF		; secondary addresses table
216
 2782
217
 2783                        	;=============================================================
218
 2784
219
 2785  0000E4  0000          	cmdlin		.DW	; command line ptr for pscal program
220
 2786  0000E6  00            	fpcflag		.DB	; fpc flags (new style)
221
 2787                        				; <7>: new style compiler
222
 2788                        				; <6>: no save exec. file
223
 2789                        				; <5>: save obj. file
224
 2790
225
 2791  0000E6                		.RELATIVE
226
 2792                        		.ENDS
227
 2793
228
 2794                        	; basic work area starting at $FF00 of bank that hold text buffer
229
 2795                        	CBMHIM:	.SECTION ref_only, common
230
 2796  000000                		.ABSOLUTE
231
 2797  00FF00                		.ORG	$FF00
232
 2798                        	;	.ORG	0
233
 2799
234
 2800          0000A2        	TBUFMAX		.EQU	$A2	; size of input buffer
235
 2801          00AA55        	VALIDSGN	.EQU	$AA55	; valid signature
236
 2802
237
 2803  00FF00                	cbmwork		.DS	4	; first 4 bytes free for insert text line
238
 2804  00FF04                	TXTBUF		.DS	TBUFMAX	; input buffer for text insertion
239
 2805  00FFA6                	NUMSTR		.DS	32	; room for numeric string
240
 2806
241
 2807  00FFC6  0000          	TMPPTR		.DW		; temp. pointer
242
 2808  00FFC8  0000          			.DW
243
 2809  00FFCA  0000          			.DW
244
 2810  00FFCC  0000          			.DW
245
 2811  00FFCE  0000          			.DW
246
 2812  00FFD0                	GFNAME		.DS	32	; global file name
247
 2813  00FFF0                			.DS	8
248
 2814  00FFF8
249
  Tue Jul 17 11:00:23 2018                                                                                               Page    5
250
 
251
 
252
 
253
 
254
 2815                        		;;.ORG	$FFF8
255
 2816  00FFF8  0000          	TXTEND2		.DW		; saved text end + 1
256
 2817  00FFFA  0000          	TXTVSGN		.DW		; valid text buffer signature
257
 2818  00FFFC  0000          	XTOP2		.DW		; saved text end + 1 in exchange bank
258
 2819  00FFFE  0000          	XBVSGN		.DW		; valid x-bank buffer signature
259
 2820
260
 2821  00FFFE                		.RELATIVE
261
 2822                        		.ENDS
262
 2823
263
 2824                        	.COMMENT @
264
 2825                        	cbmwork		.EQU	$FF00	; first 4 bytes free for insert text line
265
 2826                        	TXTBUF		.EQU	$FF04	; input buffer for text insertion
266
 2827                        	NUMSTR		.EQU	$FFA6	; room for numeric string
267
 2828
268
 2829                        	TMPPTR		.EQU	$FFC6		; temp. pointer
269
 2830
270
 2831                        	TXTEND2		.EQU	$FFF8		; saved text end + 1
271
 2832                        	TXTVSGN		.EQU	$FFFA		; valid text buffer signature
272
 2833                        	XTOP2		.EQU	$FFFC		; saved text end + 1 in exchange bank
273
 2834                        	XBVSGN		.EQU	$FFFE		; valid x-bank buffer signature
274
 2835                        	@
275
 2836
276
 2837                        	; basic/pascal work area starting at $FF00 of bank that hold variables/p-code
277
 2838                        	CBMHIV:	.SECTION common, ref_only
278
 2839  000000                		.ABSOLUTE
279
 2840  00FF00                		.ORG	$FF00
280
 2841                        	;	.ORG	0
281
 2842
282
 2843          00005A        	QINSIZ		.EQU	$5A	; input buffer max. 90 chars.
283
 2844          000020        	NUMSIZ		.EQU	$20	; size of numeric buffer for conversion
284
 2845          000018        	MAX2LF		.EQU	((MAXLF + 1) * 2) ; size of p-code logical files table
285
 2846          000013        	MAXFNLEN	.EQU	19	; max. length of file name '@x:yyyyyyyyyyyyyyyy'
286
 2847
287
 2848  00FF00                	MINBUF		.DS	QINSIZ
288
 2849  00FF5A                	MNUMSTR		.DS	NUMSIZ
289
 2850  00FF7A  0000          	MTMPW0		.DW
290
 2851  00FF7C  0000          	MTMPW1		.DW
291
 2852  00FF7E  00            	MTMPB0		.DB
292
 2853  00FF7F                	MFNAME		.DS	16	; file name buffer
293
 2854  00FF8F                	MTMPNAM		.DS	15	; tmp. file name
294
 2855  00FF9E                	MPOW10		.DS	10	; power of 10 table
295
 2856  00FFA8                	MTRUE		.DS	6
296
 2857  00FFAE                	MFALSE		.DS	6
297
 2858  00FFB4                	MSTDF0		.DS	4	; descriptor for file #0 (consolle)
298
 2859  00FFB8                	MSTDF1		.DS	4	; descriptor for file #1 (disk command chann.)
299
 2860  00FFBC                	MSTDF2		.DS	4	; descriptor for file #2 (used by compiler)
300
 2861  00FFC0                	MMSET		.DS	16	; set variables
301
 2862  00FFD0                	MFILET		.DS	MAX2LF	; table of logical files: #0 consolle, #1 disk
302
 2863  00FFE8                	FAC1TMP		.DS	5	; these 3 used by float routines
303
 2864  00FFED                	FAC2TMP		.DS	5
304
 2865  00FFF2                	FAC3TMP		.DS	5
305
 2866  00FFF7                	FAC4TMP		.DS	5	; free to use
306
 2867  00FFFC  0000          	MTPTR		.DW		; used by new/dispose
307
 2868  00FFFE  0000          	MTMPW2		.DW
308
 2869
309
 2870  00FFFE                		.RELATIVE
310
 2871                        		.ENDS
311
  Tue Jul 17 11:00:23 2018                                                                                               Page    6
312
 
313
 
314
 
315
 
316
 2872
317
 2873                        	.COMMENT @
318
 2874                        	MINBUF		.EQU	$FF00
319
 2875                        	MNUMSTR		.EQU	$FF5A
320
 2876                        	MTMPW0		.EQU	$FF7A
321
 2877                        	MTMPW1		.EQU	$FF7C
322
 2878                        	MTMPB0		.EQU	$FF7E
323
 2879                        	MFNAME		.EQU	$FF7F	; file name buffer
324
 2880                        	MTMPNAM		.EQU	$FF8F	; tmp. file name
325
 2881                        	MPOW10		.EQU	$FF9E	; power of 10 table
326
 2882                        	MTRUE		.EQU	$FFA8
327
 2883                        	MFALSE		.EQU	$FFAE
328
 2884                        	MSTDF0		.EQU	$FFB4	; descriptor for file #0 (consolle)
329
 2885                        	MSTDF1		.EQU	$FFB8	; descriptor for file #1 (disk command chann.)
330
 2886                        	MSTDF2		.EQU	$FFBC	; descriptor for file #2 (used by compiler)
331
 2887                        	MMSET		.EQU	$FFC0	; set variables
332
 2888                        	MFILET		.EQU	$FFD0	; table of logical files: #0 consolle, #1 disk
333
 2889                        	FAC1TMP		.EQU	$FFE8	; these 3 used by float routines
334
 2890                        	FAC2TMP		.EQU	$FFED
335
 2891                        	FAC3TMP		.EQU	$FFF2
336
 2892                        	FAC4TMP		.EQU	$FFF7	; free to use
337
 2893                        	MTPTR		.EQU	$FFFC	; used by new/dispose
338
 2894                        	MTMPW2		.EQU	$FFFE
339
 2895                        	@
340
 2896
341
 2897                        	; temp. file names in x-bank
342
 2898          00FF00        	PASSRC		.EQU	$FF00
343
 2899          00FF20        	OBJDST		.EQU	$FF20
344
 2900          00FF40        	EXEDST		.EQU	$FF40
345
 2901          00FF60        	OBJDEL		.EQU	$FF60
346
 2902
347
 2903
348
 2904                        		.CODEFE
349
 2905                        		.LONGA off
350
 2906                        		.LONGI off
351
 2907
352
 2908                        		.GLOBAL vpmerr, pccstart, pcexec, L0FAA
353
 2909                        		.EXTERN XBBD4, XBBA2, XBC5B, XBA8C, XBB12, XBA2B, XB853, XB86A
354
 2910                        		.EXTERN XBAFE, XBAE2, XBCF3P, XE26B, XE264, XE2B4, XE30E
355
 2911                        		.EXTERN XBFED, XBF7B, XBF71, XB9EA, XBC49, XBB0F, XB9BC, XBBC7
356
 2912                        		.EXTERN XBBA2T, XB9E0, FCON05, XB867, XBBA2L, FCON10, XBA8CK
357
 2913                        		.EXTERN XBBA2K, XLN10, XBC0C, XBA28
358
 2914
359
 2915  FE1943
360
 2916                        	;---------------------------------------------------------------------------
361
 2917                        	; p-cpode main system
362
 2918                        	;---------------------------------------------------------------------------
363
 2919  FE1943
364
 2920                        	; start compiler
365
 2921  FE1943                	pccstart:
366
 2922                        		.EXTERN PCTORSIZ, PCROFS, PCCOMP, PCCDST
367
 2923                        		;.EXTERN  PCTORAM, , PCCOMPSIZ
368
 2924
369
 2925  FE1943  8B            		phb			; save current data bank
370
 2926  FE1944  A5 A3         		lda	cbnk		; the dest. bank
371
 2927  FE1946  8F 58 19 FE   		sta	>?10+1		; store dest bank for mvn istruction
372
 2928                        		;sta	>?12+1		; store dest bank for mvn istruction
373
  Tue Jul 17 11:00:23 2018                                                                                               Page    7
374
 
375
 
376
 
377
 
378
 2929  FE194A                		CPU16
379
 2930  FE194A  C2 30         		rep	#(PMFLAG.OR.PXFLAG)
380
 2931                        		.LONGA	on
381
 2932                        		.LONGI	on
382
 2933                        		.MNLIST
383
 2934  FE194C  A9 FD 40      		lda	#PCTORSIZ-1	; transfer type/std functio's record's
384
 2935  FE194F  A2 10 41      		ldx	#PCCOMP		; source address
385
 2936                        		;ldx	#PCTORAM	; source address
386
 2937                        		;ldy	#PCROFS
387
 2938  FE1952  A0 00 00      		ldy	#0		; dest address
388
 2939  FE1955  84 76         		sty	longp
389
 2940  FE1957  54 00 FE      	?10:	mvn	#^pccstart, #0
390
 2941
391
 2942                        		;lda	#PCCOMPSIZ-1	; transfer compiler p-code
392
 2943                        		;ldx	#PCCOMP		; source address
393
 2944                        		;ldy	#PCCDST		; dest. address
394
 2945                        		;sty	longp
395
 2946                        	;?12:	mvn	#^pccstart, #0
396
 2947  FE195A  98            		tya
397
 2948  FE195B  92 76         		sta	(longp)		; here bank = cbnk
398
 2949  FE195D                		CPU08
399
 2950  FE195D  E2 30         		sep	#(PMFLAG.OR.PXFLAG)
400
 2951                        		.LONGA	off
401
 2952                        		.LONGI	off
402
 2953                        		.MNLIST
403
 2954                        		;ldy	#$01
404
 2955                        		;lda	(longp),y	; p-code
405
 2956  FE195F  EB            		xba			; hi addess
406
 2957  FE1960  AA            		tax
407
 2958  FE1961  E8            		inx
408
 2959                        		;inx
409
 2960                        		;ldy	#>PCCDST
410
 2961  FE1962  A0 00         		ldy	#0
411
 2962
412
 2963  FE1964  A9 01         		lda	#1
413
 2964  FE1966  85 52         		sta	autolf
414
 2965                        		;inc	a
415
 2966  FE1968  85 4D         		sta	tmpdsk
416
 2967  FE196A  A9 04         		lda	#$04
417
 2968  FE196C  85 4E         		sta	defprn
418
 2969                        		;lda	#$80
419
 2970                        		;sta	pcdsk
420
 2971  FE196E  A9 40         		lda	#$40		; compiler flag for runf
421
 2972  FE1970
422
 2973  FE1970                	pccrun:
423
 2974  FE1970  20 CC 19      		jsr	setmem
424
 2975                        		;jsr	L0E89		; print CR
425
 2976  FE1973  20 C3 1A      		jsr	pcex
426
 2977  FE1976  A5 8D         		lda	svbnk		; restore v-bank
427
 2978  FE1978  85 A2         		sta	vbnk
428
 2979  FE197A  24 97         		bit	runf		; skip if run mode
429
 2980  FE197C  30 13         		bmi	?04
430
 2981  FE197E  24 4C         		bit	pcterr		; no link if any compilation error
431
 2982  FE1980  30 0F         		bmi	?04
432
 2983  FE1982  A5 7C         		lda	pcdsk
433
 2984  FE1984  30 04         		bmi	?01		; compile in memory: link
434
 2985  FE1986  24 E6         		bit	fpcflag
435
  Tue Jul 17 11:00:23 2018                                                                                               Page    8
436
 
437
 
438
 
439
 
440
 2986  FE1988  10 07         		bpl	?04		; old style compilation: no link
441
 2987  FE198A  20 5C 1C      	?01:	jsr	pclink
442
 2988  FE198D  A9 80         		lda	#$80
443
 2989  FE198F  85 C2         		sta	pcodef
444
 2990  FE1991  64 97         	?04:	stz	runf
445
 2991  FE1993  64 7C         		stz	pcdsk
446
 2992  FE1995  AB            		plb
447
 2993  FE1996  60            		rts
448
 2994
449
 2995  FE1997                	pcexec:
450
 2996  FE1997  8B            		phb
451
 2997  FE1998  A5 A2         		lda	vbnk
452
 2998  FE199A  48            		pha
453
 2999  FE199B  AB            		plb
454
 3000  FE199C  85 78         		sta	longp+2
455
 3001  FE199E  64 76         		stz	longp
456
 3002  FE19A0  64 77         		stz	longp+1
457
 3003  FE19A2
458
 3004  FE19A2                		ACC16CLC
459
 3005  FE19A2  C2 21         		rep	#(PMFLAG.OR.PCFLAG)
460
 3006                        		.LONGA	on
461
 3007                        		.MNLIST
462
 3008  FE19A4  A7 76         		lda	[longp]
463
 3009  FE19A6  1A            		inc	a
464
 3010  FE19A7  1A            		inc	a
465
 3011  FE19A8  89 01 00      		bit	#$0001
466
 3012  FE19AB  F0 01         		beq	?01
467
 3013  FE19AD  1A            		inc	a
468
 3014  FE19AE  85 E4         	?01:	sta	cmdlin
469
 3015  FE19B0  69 80 00      		adc	#128		; size of command line
470
 3016  FE19B3                		ACC08
471
 3017  FE19B3  E2 20         		sep	#PMFLAG
472
 3018                        		.LONGA	off
473
 3019                        		.MNLIST
474
 3020  FE19B5  EB            		xba
475
 3021                        		;ldy	#1
476
 3022                        		;lda	[longp],y
477
 3023  FE19B6  AA            		tax
478
 3024  FE19B7  E8            		inx
479
 3025                        		;inx
480
 3026  FE19B8  A0 00         		ldy	#0
481
 3027  FE19BA  A9 01         		lda	#1
482
 3028  FE19BC  85 52         		sta	autolf
483
 3029                        		;inc	a
484
 3030  FE19BE  85 4D         		sta	tmpdsk
485
 3031  FE19C0  A9 04         		lda	#$04
486
 3032  FE19C2  85 4E         		sta	defprn
487
 3033  FE19C4  A9 80         		lda	#$80
488
 3034  FE19C6  85 4F         		sta	pcdbg		; for RUN ???
489
 3035                        		;sta	pcdsk
490
 3036                        		;stz	pcdsk
491
 3037  FE19C8  A9 80         		lda	#$80
492
 3038  FE19CA  80 A4         		bra	pccrun
493
 3039
494
 3040                        	; memory setup
495
 3041                        	; X = start of heap, Y = start of p-code, A = run flag
496
 3042  FE19CC                	setmem:
497
  Tue Jul 17 11:00:23 2018                                                                                               Page    9
498
 
499
 
500
 
501
 
502
 3043  FE19CC  85 97         		sta	runf		; run flag
503
 3044  FE19CE  64 33         		STZ	$33		; $33-$34 : start of heap
504
 3045  FE19D0  86 34         		STX	$34
505
 3046  FE19D2  64 35         		STZ	$35		; $35-$36 : heap free list
506
 3047  FE19D4  64 36         		STZ	$36
507
 3048  FE19D6  64 39         		STZ	$39		; $39-$3A
508
 3049  FE19D8  64 3A         		STZ	$3A
509
 3050  FE19DA  A9 02         		LDA	#$02
510
 3051  FE19DC  85 2B         		STA	$2B		; $2B-$2C : start p-code pointer
511
 3052  FE19DE  84 2C         		STY	$2C
512
 3053  FE19E0  20 E7 FF      		jsr	FCLALL		; close all files
513
 3054  FE19E3  A5 A2         		lda	vbnk
514
 3055  FE19E5  85 8D         		sta	svbnk		; save v-bank
515
 3056  FE19E7  24 97         		bit	runf
516
 3057  FE19E9  30 04         		bmi	?01		; run: data bank = vbank
517
 3058  FE19EB  A5 A3         		lda	cbnk		; compilation: data bank = cbnk
518
 3059  FE19ED  85 A2         		sta	vbnk
519
 3060  FE19EF  48            	?01:	pha
520
 3061  FE19F0  AB            		plb			; setup current data bank
521
 3062  FE19F1  A2 00         		ldx	#$00
522
 3063  FE19F3  9E 00 FF      	?02:	stz	!MINBUF,x	; clear working area
523
 3064  FE19F6  E8            		inx
524
 3065  FE19F7  D0 FA         		bne	?02
525
 3066  FE19F9                		ACC16
526
 3067  FE19F9  C2 20         		rep	#PMFLAG
527
 3068                        		.LONGA	on
528
 3069                        		.MNLIST
529
 3070  FE19FB  A5 AF         		lda	txttop
530
 3071  FE19FD  85 37         		sta	$37
531
 3072  FE19FF  38            		SEC
532
 3073  FE1A00  E9 0A 00      		SBC	#$000A
533
 3074  FE1A03  85 2D         		STA	$2D		; $2D-$2E : stack pointer
534
 3075  FE1A05  A5 37         		LDA	$37
535
 3076  FE1A07  85 2F         		STA	$2F		; $2F-$30
536
 3077  FE1A09  85 31         		STA	$31		; $31-$32
537
 3078  FE1A0B  38            		SEC
538
 3079  FE1A0C  E9 04 00      		SBC	#$0004
539
 3080  FE1A0F  85 27         		STA	$27
540
 3081  FE1A11  A9 BA FF      		lda	#MSTDF1+2	; default file #1 (disk command channel)
541
 3082  FE1A14  92 27         		sta	($27)
542
 3083  FE1A16  A0 02         		ldy	#2
543
 3084  FE1A18  A9 B6 FF      		lda	#MSTDF0+2	; default file #0 (consolle)
544
 3085  FE1A1B  91 27         		sta	($27),y
545
 3086  FE1A1D  64 3F         		stz	psrline
546
 3087  FE1A1F  A9 B6 FF      		lda	#MSTDF0+2
547
 3088  FE1A22  8D D0 FF      		sta	!MFILET
548
 3089  FE1A25  A9 BA FF      		lda	#MSTDF1+2
549
 3090  FE1A28  8D D2 FF      		sta	!MFILET+2
550
 3091  FE1A2B  A6 97         		ldx	runf
551
 3092  FE1A2D  10 05         		bpl	?03
552
 3093  FE1A2F  9C D4 FF      		stz	!MFILET+4	; file #2 free in running mode
553
 3094  FE1A32  80 06         		bra	?04
554
 3095  FE1A34  A9 BE FF      	?03:	lda	#MSTDF2+2	; set file #2 for compiler
555
 3096  FE1A37  8D D4 FF      		sta	!MFILET+4
556
 3097  FE1A3A                	?04:	ACC08
557
 3098  FE1A3A  E2 20         		sep	#PMFLAG
558
 3099                        		.LONGA	off
559
  Tue Jul 17 11:00:23 2018                                                                                               Page   10
560
 
561
 
562
 
563
 
564
 3100                        		.MNLIST
565
 3101  FE1A3C  A2 30         		LDX	#TTMPSIZ-1
566
 3102  FE1A3E  BF 1A 3E FE   	?05:	LDA	>TTMPNAM,X
567
 3103  FE1A42  9D 8F FF      		STA	!MTMPNAM,X
568
 3104  FE1A45  CA            		DEX
569
 3105  FE1A46  10 F6         		BPL	?05
570
 3106  FE1A48  A5 4D         		lda	tmpdsk		; setup disk for tmp. file
571
 3107  FE1A4A  09 30         		ora	#'0'
572
 3108  FE1A4C  8D 8F FF      		sta	!MTMPNAM
573
 3109  FE1A4F  A9 C0         		lda	#$C0
574
 3110  FE1A51  85 3B         		sta	prtrap
575
 3111  FE1A53  64 3E         		stz	prterr
576
 3112  FE1A55  64 43         		stz	pbrkcnt
577
 3113  FE1A57  64 4C         		stz	pcterr
578
 3114  FE1A59  64 B7         		STZ	$B7
579
 3115  FE1A5B  A9 01         		LDA	#$01
580
 3116  FE1A5D  85 B8         		STA	$B8
581
 3117  FE1A5F  A9 08         		LDA	#$08
582
 3118  FE1A61  85 BA         		STA	$BA
583
 3119  FE1A63  A9 0F         		LDA	#$0F
584
 3120  FE1A65  85 B9         		STA	$B9
585
 3121  FE1A67  20 C0 FF      		JSR	FOPEN
586
 3122  FE1A6A  20 DE FF      		jsr	RDTIM
587
 3123  FE1A6D  85 41         		STA 	$41
588
 3124  FE1A6F  64 42         		stz	$42
589
 3125  FE1A71  64 45         		stz	inqidx
590
 3126  FE1A73  64 46         		stz	inqcnt
591
 3127  FE1A75  64 44         		stz	tmpy
592
 3128  FE1A77  64 49         		stz	tmpa
593
 3129  FE1A79  64 47         		stz	tmpv1
594
 3130  FE1A7B  64 48         		stz	tmpv2
595
 3131  FE1A7D  64 4A         		stz	tmpwa
596
 3132  FE1A7F  64 4B         		stz	tmpx
597
 3133                        		;stz	iecerr
598
 3134  FE1A81  64 90         		stz	kstat
599
 3135
600
 3136  FE1A83  24 97         		bit	runf
601
 3137  FE1A85  30 1A         		bmi	?12		; run mode
602
 3138  FE1A87
603
 3139                        		; source name for compiler in [longp]
604
 3140  FE1A87                		ACC16
605
 3141  FE1A87  C2 20         		rep	#PMFLAG
606
 3142                        		.LONGA	on
607
 3143                        		.MNLIST
608
 3144  FE1A89  A9 00 FF      		lda	#PASSRC
609
 3145  FE1A8C  85 76         		sta	longp
610
 3146  FE1A8E                		ACC08
611
 3147  FE1A8E  E2 20         		sep	#PMFLAG
612
 3148                        		.LONGA	off
613
 3149                        		.MNLIST
614
 3150  FE1A90  A5 A5         		lda	xbnk
615
 3151  FE1A92  85 78         		sta	longp+2
616
 3152  FE1A94
617
 3153  FE1A94  A0 00         		ldy	#0		; copy file name to internal buffer
618
 3154  FE1A96  B7 76         	?10:	lda	[longp],y
619
 3155  FE1A98  99 00 FF      		sta	MINBUF,y
620
 3156  FE1A9B  F0 03         		beq	?11
621
  Tue Jul 17 11:00:23 2018                                                                                               Page   11
622
 
623
 
624
 
625
 
626
 3157  FE1A9D  C8            		iny
627
 3158  FE1A9E  D0 F6         		bne	?10
628
 3159  FE1AA0  60            	?11:	rts
629
 3160
630
 3161  FE1AA1                	?12:	ACC16
631
 3162  FE1AA1  C2 20         		rep	#PMFLAG
632
 3163                        		.LONGA	on
633
 3164                        		.MNLIST
634
 3165  FE1AA3  A5 7A         		lda	txtp
635
 3166  FE1AA5  85 76         		sta	longp
636
 3167  FE1AA7                		ACC08
637
 3168  FE1AA7  E2 20         		sep	#PMFLAG
638
 3169                        		.LONGA	off
639
 3170                        		.MNLIST
640
 3171  FE1AA9  A5 A1         		lda	tbnk
641
 3172  FE1AAB  85 78         		sta	longp+2
642
 3173  FE1AAD  A0 7F         		ldy	#127
643
 3174  FE1AAF  A9 20         		lda	#' '
644
 3175  FE1AB1  91 E4         	?12l:	sta	(cmdlin),y
645
 3176  FE1AB3  88            		dey
646
 3177  FE1AB4  10 FB         		bpl	?12l
647
 3178  FE1AB6  C8            		iny
648
 3179  FE1AB7  B7 76         	?13l:	lda	[longp],y
649
 3180  FE1AB9  F0 07         		beq	?13
650
 3181  FE1ABB  91 E4         		sta	(cmdlin),y
651
 3182  FE1ABD  C8            		iny
652
 3183  FE1ABE  C0 80         		cpy	#128
653
 3184  FE1AC0  90 F5         		bcc	?13l
654
 3185  FE1AC2  60            	?13:	rts
655
 3186
656
 3187                        	; execute p-code
657
 3188  FE1AC3                	pcex:
658
 3189  FE1AC3                		INDEX16
659
 3190  FE1AC3  C2 10         		rep	#PXFLAG
660
 3191                        		.LONGI	on
661
 3192                        		.MNLIST
662
 3193  FE1AC5  BA            		tsx
663
 3194  FE1AC6  86 3C         		stx	pcstack
664
 3195  FE1AC8                		INDEX08
665
 3196  FE1AC8  E2 10         		sep	#PXFLAG
666
 3197                        		.LONGI	off
667
 3198                        		.MNLIST
668
 3199  FE1ACA  C6 43         	?04:	dec	pbrkcnt
669
 3200  FE1ACC  D0 03         		bne	?06
670
 3201  FE1ACE  20 B8 30      		jsr	L0E91		; check CTRL BREAK
671
 3202  FE1AD1                	?06:	ACC16
672
 3203  FE1AD1  C2 20         		rep	#PMFLAG
673
 3204                        		.LONGA	on
674
 3205                        		.MNLIST
675
 3206  FE1AD3  F4 C9 1A      		pea	#?04-1		; return address
676
 3207  FE1AD6  B2 2B         		lda	($2B)
677
 3208  FE1AD8  AA            		tax
678
 3209  FE1AD9  A5 2B         		lda	$2B
679
 3210  FE1ADB  85 50         		sta	pcptr		; save p-code pointer
680
 3211  FE1ADD  1A            		inc	a
681
 3212  FE1ADE  85 2B         		sta	$2B
682
 3213  FE1AE0                		ACC08
683
  Tue Jul 17 11:00:23 2018                                                                                               Page   12
684
 
685
 
686
 
687
 
688
 3214  FE1AE0  E2 20         		sep	#PMFLAG
689
 3215                        		.LONGA	off
690
 3216                        		.MNLIST
691
 3217  FE1AE2  A0 00         		LDY	#$00
692
 3218  FE1AE4  8A            		txa
693
 3219  FE1AE5  30 2B         		BMI	?14		; >= 80
694
 3220  FE1AE7  0A            	?08:	ASL	a
695
 3221  FE1AE8  AA            		TAX
696
 3222  FE1AE9  10 24         		BPL	?12		; 00..3F -> 0 byte
697
 3223  FE1AEB  C9 A0         		CMP	#$A0
698
 3224  FE1AED  90 12         		BCC	?10		; 40..4F -> 2 bytes
699
 3225  FE1AEF  29 02         		AND	#$02		; 50..7F
700
 3226  FE1AF1  F0 0E         		BEQ	?10		; EVEN -> 50,52,54,56... -> 2 bytes
701
 3227  FE1AF3  B2 2B         		LDA	($2B)		; ODD  -> 51,53,55,57... -> 1 byte (byte high = 00)
702
 3228  FE1AF5  85 23         		STA	$23
703
 3229  FE1AF7  E6 2B         		INC	$2B
704
 3230  FE1AF9  D0 02         		BNE	?09
705
 3231  FE1AFB  E6 2C         		INC	$2C
706
 3232  FE1AFD  84 24         	?09:	STY	$24
707
 3233  FE1AFF  80 0E         		bra	?12
708
 3234  FE1B01                	?10:	ACC16
709
 3235  FE1B01  C2 20         		rep	#PMFLAG
710
 3236                        		.LONGA	on
711
 3237                        		.MNLIST
712
 3238  FE1B03  B2 2B         		LDA	($2B)
713
 3239  FE1B05  85 23         		STA	$23
714
 3240  FE1B07  A5 2B         		lda	$2B
715
 3241  FE1B09  1A            		inc	a
716
 3242  FE1B0A  1A            		inc	a
717
 3243  FE1B0B  85 2B         		sta	$2B
718
 3244  FE1B0D                		ACC08
719
 3245  FE1B0D  E2 20         		sep	#PMFLAG
720
 3246                        		.LONGA	off
721
 3247                        		.MNLIST
722
 3248  FE1B0F  7C 86 3C      	?12:	jmp	(PCODET1,x)
723
 3249
724
 3250                        	?14:	; code negative
725
 3251                        		; P80-8D -> 0 byte, 8E -> 1 byte, 8F -> 2 bytes
726
 3252  FE1B12  29 0F         		AND	#$0F
727
 3253  FE1B14  C9 0E         		CMP	#$0E
728
 3254  FE1B16  85 23         		STA	$23
729
 3255  FE1B18  84 24         		STY	$24
730
 3256  FE1B1A  30 18         		BMI	?16
731
 3257  FE1B1C  08            		PHP
732
 3258  FE1B1D  B2 2B         		LDA	($2B)
733
 3259  FE1B1F  85 23         		STA	$23
734
 3260  FE1B21  E6 2B         		INC	$2B
735
 3261  FE1B23  D0 02         		BNE	?15
736
 3262  FE1B25  E6 2C         		INC	$2C
737
 3263  FE1B27  28            	?15:	PLP
738
 3264  FE1B28  F0 0A         		BEQ	?16
739
 3265  FE1B2A  B2 2B         		LDA	($2B)
740
 3266  FE1B2C  85 24         		STA	$24
741
 3267  FE1B2E  E6 2B         		INC	$2B
742
 3268  FE1B30  D0 02         		BNE	?16
743
 3269  FE1B32  E6 2C         		INC	$2C
744
 3270  FE1B34  8A            	?16:	TXA
745
  Tue Jul 17 11:00:23 2018                                                                                               Page   13
746
 
747
 
748
 
749
 
750
 3271  FE1B35  4A            		LSR	a
751
 3272  FE1B36  4A            		LSR	a
752
 3273  FE1B37  4A            		LSR	a
753
 3274  FE1B38  29 0E         		AND	#$0E
754
 3275  FE1B3A  AA            		TAX
755
 3276  FE1B3B  BF 86 3D FE   		LDA	>PCODET2,X
756
 3277  FE1B3F  85 27         		STA	$27
757
 3278  FE1B41  BF 87 3D FE   		LDA	>PCODET2+1,X
758
 3279  FE1B45  85 28         		STA	$28
759
 3280  FE1B47  A5 23         		LDA	$23
760
 3281  FE1B49  A6 24         		LDX	$24
761
 3282  FE1B4B  6C 27 7F      		JMP	(CBMP0+$27)
762
 3283  FE1B4E
763
 3284                        	; error: bad p-code
764
 3285  FE1B4E                	vpme07:
765
 3286  FE1B4E  A2 07         		LDX 	#$07
766
 3287
767
 3288                        	; runtime error handler
768
 3289                        	vpmerr:	; $0C78 - $0F0D
769
 3290  FE1B50  48            		pha			; dummy stack
770
 3291  FE1B51  48            		pha
771
 3292  FE1B52  86 3E         		stx	$3E		; error code
772
 3293  FE1B54  20 CC FF      		JSR	FCLRCH
773
 3294  FE1B57  64 3B         		STZ	$3B
774
 3295  FE1B59  A5 29         		lda	$29		; save current file desc
775
 3296  FE1B5B  85 71         		sta	fbufpt
776
 3297  FE1B5D  A5 2A         		lda	$2A
777
 3298  FE1B5F  85 72         		sta	fbufpt+1
778
 3299  FE1B61  20 5C 31      		JSR	L0F9B		; reset file #1 and print CR
779
 3300  FE1B64  A6 3E         		ldx	$3E
780
 3301  FE1B66  20 39 1C      		jsr	vpmsrch		; search error string
781
 3302                        		; now format and print error message
782
 3303  FE1B69  A5 78         		lda	longp+2		; param 3: error string pointer
783
 3304  FE1B6B  48            		pha
784
 3305  FE1B6C  D4 76         		pei	(longp)
785
 3306  FE1B6E  A5 3E         		lda	$3E		; param 2: error code
786
 3307  FE1B70  48            		pha
787
 3308  FE1B71  A9 FE         		lda	#^STRFMT2	; param 1: format string
788
 3309  FE1B73  48            		pha
789
 3310  FE1B74  F4 82 3E      		pea	#STRFMT2
790
 3311  FE1B77  A9 08         		lda	#$08		; param 0: number of total bytes
791
 3312  FE1B79  48            		pha
792
 3313  FE1B7A                		BPRINTF
793
 3314  FE1B7A  02 11         		cop	$11
794
 3315                        		.MNLIST
795
 3316  FE1B7C                	vpmerr2:
796
 3317                        	?08:	;;JSR	lprint		; long print error string
797
 3318  FE1B7C  24 97         		bit	runf
798
 3319  FE1B7E  10 0D         		bpl	?12		; running: print always line number
799
 3320                        		; now format line number
800
 3321  FE1B80  D4 3F         		pei	($3F)		; param 2: line number
801
 3322  FE1B82  A9 FE         		lda	#^STRFMT3
802
 3323  FE1B84  48            		pha			; param 1: format string
803
 3324  FE1B85  F4 9A 3E      		pea	#STRFMT3
804
 3325  FE1B88  A9 06         		lda	#$06		; param 0: number of total bytes
805
 3326  FE1B8A  48            		pha
806
 3327  FE1B8B                		BPRINTF
807
  Tue Jul 17 11:00:23 2018                                                                                               Page   14
808
 
809
 
810
 
811
 
812
 3328  FE1B8B  02 11         		cop	$11
813
 3329                        		.MNLIST
814
 3330
815
 3331                        	?10:	;;LDA	#<TLINS		; ',line '
816
 3332                        		;;STA 	longp
817
 3333                        		;;LDA	#>TLINS
818
 3334                        		;;STA	longp+1
819
 3335                        		;;JSR	lprint
820
 3336                        	?12:	;;LDA	#<MDFIL+6		; M2D92 - m35D8
821
 3337                        		;;STA	$29
822
 3338                        		;;LDA	#>MDFIL+6
823
 3339                        		;;STA 	$2A
824
 3340                        		;;bit	runf
825
 3341                        		;;bpl	?14		; running: print always line number
826
 3342                        	?13:	;;LDA 	$3F		; line number
827
 3343                        		;;STA	$21
828
 3344                        		;;LDA	$40
829
 3345                        		;;STA	$22
830
 3346                        		;;LDA 	#$00
831
 3347                        		;;STA	$23
832
 3348                        		;;JSR	L0D1C
833
 3349  FE1B8D  20 69 31      	?14:	JSR	L0E89		; print CR
834
 3350                        		; report debug info after error - always for compiler
835
 3351  FE1B90  24 97         		bit	runf
836
 3352  FE1B92  10 04         		bpl	?15
837
 3353  FE1B94  24 4F         		bit	pcdbg		; when run: only if debug enabled
838
 3354  FE1B96  10 1E         		bpl	?16
839
 3355  FE1B98  D4 71         	?15:	pei	(fbufpt)	; param 8: saved file ptr
840
 3356  FE1B9A  D4 33         		pei	($33)		; param 7: heap ptr
841
 3357  FE1B9C  D4 2D         		pei	($2D)		; param 6: stack ptr
842
 3358  FE1B9E  B2 50         		lda	(pcptr)
843
 3359  FE1BA0  48            		pha			; param 5: op-code
844
 3360  FE1BA1  D4 2B         		pei	($2B)		; param 4: current p-code ptr
845
 3361  FE1BA3  D4 50         		pei	(pcptr)		; param 3: p-code ptr at error
846
 3362  FE1BA5  A5 A2         		lda	vbnk
847
 3363  FE1BA7  48            		pha			; param 2: data bank
848
 3364  FE1BA8  A9 FE         		lda	#^STRFMT4
849
 3365  FE1BAA  48            		pha			; param 1: format string
850
 3366  FE1BAB  F4 A5 3E      		pea	#STRFMT4
851
 3367  FE1BAE  A9 10         		lda	#$10		; param 0: number of total bytes
852
 3368  FE1BB0  48            		pha
853
 3369  FE1BB1                		BPRINTF
854
 3370  FE1BB1  02 11         		cop	$11
855
 3371                        		.MNLIST
856
 3372  FE1BB3  20 69 31      		JSR	L0E89		; print CR
857
 3373  FE1BB6  A9 80         	?16:	lda	#$80		; report error for compiler
858
 3374  FE1BB8  85 4C         		sta	pcterr
859
 3375
860
 3376                        	; terminate pascal virtual machine
861
 3377                        	vpmhlt:	; $0914 - $0AC4
862
 3378                        		; if pcterr = $80 this mean compiler error(s)
863
 3379  FE1BBA  24 97         		bit	runf
864
 3380  FE1BBC  30 35         		bmi	?02		; execution
865
 3381  FE1BBE  20 CF 30      		jsr	L0942		; close all files
866
 3382  FE1BC1  24 4C         		bit	pcterr		; check compiler error
867
 3383  FE1BC3  10 2A         		bpl	?01		; no error
868
 3384                        		; delete file .OBJ
869
  Tue Jul 17 11:00:23 2018                                                                                               Page   15
870
 
871
 
872
 
873
 
874
 3385  FE1BC5  A9 01         		lda	#$01
875
 3386  FE1BC7  20 C3 FF      		jsr	FCLOSE		; close command channel
876
 3387  FE1BCA                		ACC16
877
 3388  FE1BCA  C2 20         		rep	#PMFLAG
878
 3389                        		.LONGA	on
879
 3390                        		.MNLIST
880
 3391  FE1BCC  A9 A7 FF      		lda	#NUMSTR+1
881
 3392  FE1BCF  85 BB         		sta	$BB		; file name to delete
882
 3393  FE1BD1                		ACC08
883
 3394  FE1BD1  E2 20         		sep	#PMFLAG
884
 3395                        		.LONGA	off
885
 3396                        		.MNLIST
886
 3397  FE1BD3  A5 A1         		lda	tbnk		; text bank hold file name
887
 3398  FE1BD5  85 BD         		sta	$BD
888
 3399  FE1BD7  8B            		phb
889
 3400  FE1BD8  48            		pha
890
 3401  FE1BD9  AB            		plb
891
 3402  FE1BDA  AD A6 FF      		lda	!NUMSTR		; lenght
892
 3403  FE1BDD  85 B7         		sta	$B7
893
 3404  FE1BDF  AB            		plb
894
 3405  FE1BE0  A9 01         		lda	#$01
895
 3406  FE1BE2  85 B8         		sta	$B8
896
 3407  FE1BE4  A9 0F         		lda	#$0F
897
 3408  FE1BE6  85 B9         		sta	$B9
898
 3409  FE1BE8  A9 08         		lda	#$08
899
 3410  FE1BEA  85 BA         		sta	$BA
900
 3411  FE1BEC  20 C0 FF      		jsr	FOPEN		; delete obj file
901
 3412  FE1BEF  A9 01         	?01:	lda	#1		; close file #1
902
 3413  FE1BF1  80 3B         		bra	?04
903
 3414  FE1BF3  20 0E 31      	?02:	jsr	R0B28		; close all files
904
 3415  FE1BF6  A9 08         		LDA 	#$08		; delete any tmp file
905
 3416  FE1BF8  85 BA         		STA 	$BA		; default disk
906
 3417  FE1BFA  85 B8         		STA 	$B8
907
 3418  FE1BFC  A9 0F         		LDA 	#$0F
908
 3419  FE1BFE  85 B9         		STA 	$B9
909
 3420  FE1C00                		INDEX16
910
 3421  FE1C00  C2 10         		rep	#PXFLAG
911
 3422                        		.LONGI	on
912
 3423                        		.MNLIST
913
 3424  FE1C02  A2 0A 3E      		ldx	#DTMPNAM	; copy temp. name
914
 3425  FE1C05  86 76         		stx	longp
915
 3426  FE1C07  A2 D0 FF      		ldx	#GFNAME		; buffer temp. name
916
 3427  FE1C0A  86 BB         		stx	$BB
917
 3428  FE1C0C                		INDEX08
918
 3429  FE1C0C  E2 10         		sep	#PXFLAG
919
 3430                        		.LONGI	off
920
 3431                        		.MNLIST
921
 3432  FE1C0E  A9 FE         		lda	#^vpmhlt
922
 3433  FE1C10  85 78         		sta	longp+2
923
 3434  FE1C12  A5 A1         		lda	tbnk
924
 3435  FE1C14  85 BD         		sta	$BD
925
 3436  FE1C16  A0 FF         		ldy	#$FF
926
 3437  FE1C18  C8            	?03:	iny
927
 3438  FE1C19  B7 76         		lda	[longp],y
928
 3439  FE1C1B  97 BB         		sta	[$BB],y
929
 3440  FE1C1D  D0 F9         		bne	?03
930
 3441  FE1C1F  84 B7         		sty	$B7
931
  Tue Jul 17 11:00:23 2018                                                                                               Page   16
932
 
933
 
934
 
935
 
936
 3442  FE1C21  A0 01         		ldy	#$01
937
 3443  FE1C23  A5 4D         		lda	tmpdsk
938
 3444  FE1C25  09 30         		ora	#'0'
939
 3445  FE1C27  97 BB         		sta	[$BB],y		; 'SX:...'
940
 3446  FE1C29  20 C0 FF      		JSR 	FOPEN
941
 3447  FE1C2C  A5 B8         		LDA 	$B8
942
 3448  FE1C2E  20 C3 FF      	?04:	JSR 	FCLOSE
943
 3449  FE1C31                		INDEX16
944
 3450  FE1C31  C2 10         		rep	#PXFLAG
945
 3451                        		.LONGI	on
946
 3452                        		.MNLIST
947
 3453  FE1C33  A6 3C         		LDX 	pcstack
948
 3454  FE1C35  9A            		TXS
949
 3455  FE1C36                		INDEX08
950
 3456  FE1C36  E2 10         		sep	#PXFLAG
951
 3457                        		.LONGI	off
952
 3458                        		.MNLIST
953
 3459  FE1C38  60            		RTS
954
 3460
955
 3461                        	; search error string - X = error code
956
 3462                        	; return pointer in longp
957
 3463  FE1C39                	vpmsrch:
958
 3464  FE1C39  A9 14         		LDA 	#<TERRS		; error's string table
959
 3465  FE1C3B  85 76         		STA	longp
960
 3466  FE1C3D  A9 3F         		LDA 	#>TERRS
961
 3467  FE1C3F  85 77         		STA	longp+1
962
 3468  FE1C41  A9 FE         		lda	#^vpmerr
963
 3469  FE1C43  85 78         		sta	longp+2
964
 3470  FE1C45  E0 1B         		cpx	#MAXVPME	; max error number
965
 3471  FE1C47  90 02         		bcc	?02
966
 3472  FE1C49  A2 1B         		ldx	#MAXVPME
967
 3473  FE1C4B  CA            	?02:	DEX
968
 3474  FE1C4C  F0 0D         		BEQ	?08
969
 3475  FE1C4E  A7 76         	?04:	LDA	[longp]
970
 3476  FE1C50  E6 76         		INC 	longp
971
 3477  FE1C52  D0 02         		BNE	?06
972
 3478  FE1C54  E6 77         		INC	longp+1
973
 3479  FE1C56  A8            	?06:	tay
974
 3480  FE1C57  D0 F5         		BNE	?04
975
 3481  FE1C59  F0 F0         		BEQ	?02
976
 3482  FE1C5B  60            	?08:	RTS
977
 3483
978
 3484                        	;---------------------------------------------------------------------------
979
 3485                        	; p-code linker
980
 3486                        	;---------------------------------------------------------------------------
981
 3487
982
 3488  FE1C5C                	pclink:
983
 3489                        		.GLOBAL pclink
984
 3490
985
 3491  FE1C5C  A5 A2         		lda	vbnk
986
 3492  FE1C5E  48            		pha
987
 3493  FE1C5F  AB            		plb
988
 3494  FE1C60  64 5F         		stz	$5F
989
 3495  FE1C62  64 60         		stz	$60
990
 3496  FE1C64  64 3E         		stz	prterr
991
 3497  FE1C66  64 76         		stz	longp
992
 3498  FE1C68  64 77         		stz	longp+1
993
  Tue Jul 17 11:00:23 2018                                                                                               Page   17
994
 
995
 
996
 
997
 
998
 3499  FE1C6A  A5 A4         		lda	jbnk
999
 3500  FE1C6C  85 78         		sta	longp+2		; pointer to obj. code
1000
 3501  FE1C6E  64 35         		stz	$35
1001
 3502  FE1C70  64 36         		stz	$36
1002
 3503  FE1C72  64 23         		stz	$23
1003
 3504  FE1C74  64 24         		stz	$24
1004
 3505  FE1C76  A9 02         		lda	#$02		; put 'halt'
1005
 3506  FE1C78  8D 02 00      		sta	!$0002
1006
 3507  FE1C7B  A6 24         	?02:	ldx	$24		; loop scan obj. code
1007
 3508  FE1C7D  E8            		inx
1008
 3509  FE1C7E  E4 38         		cpx	$38
1009
 3510  FE1C80  F0 4A         		beq	?08
1010
 3511  FE1C82  A0 00         		ldy	#0
1011
 3512  FE1C84                	?03:	ACC16CLC
1012
 3513  FE1C84  C2 21         		rep	#(PMFLAG.OR.PCFLAG)
1013
 3514                        		.LONGA	on
1014
 3515                        		.MNLIST
1015
 3516  FE1C86  98            		tya
1016
 3517  FE1C87  65 76         		adc	longp
1017
 3518  FE1C89  C5 86         		cmp	iecwp
1018
 3519  FE1C8B                		ACC08
1019
 3520  FE1C8B  E2 20         		sep	#PMFLAG
1020
 3521                        		.LONGA	off
1021
 3522                        		.MNLIST
1022
 3523  FE1C8D  A5 78         		lda	longp+2
1023
 3524  FE1C8F  E5 88         		sbc	iecwp+2
1024
 3525  FE1C91  B0 1E         		bcs	?05		; end of obj. code
1025
 3526  FE1C93  B7 76         		lda	[longp],y
1026
 3527  FE1C95  91 23         		sta	($23),y
1027
 3528  FE1C97  C8            		iny
1028
 3529  FE1C98  D0 EA         		bne	?03
1029
 3530  FE1C9A  E6 77         		inc	longp+1		; next block
1030
 3531  FE1C9C  D0 02         		bne	?04
1031
 3532  FE1C9E  E6 78         		inc	longp+2
1032
 3533  FE1CA0  A0 FC         	?04:	ldy	#$FC
1033
 3534  FE1CA2  B1 23         		lda	($23),y
1034
 3535  FE1CA4  F0 2B         		beq	?10		; if = 0
1035
 3536  FE1CA6  C9 01         		cmp	#$01
1036
 3537  FE1CA8  F0 36         		beq	?12		; if = 1
1037
 3538  FE1CAA  C9 02         		cmp	#$02
1038
 3539  FE1CAC  D0 CD         		bne	?02
1039
 3540  FE1CAE  4C 1D 1D      		jmp	?20		; if = 2
1040
 3541
1041
 3542  FE1CB1                	?05:	ACC16
1042
 3543  FE1CB1  C2 20         		rep	#PMFLAG
1043
 3544                        		.LONGA	on
1044
 3545                        		.MNLIST
1045
 3546  FE1CB3  A5 35         		lda	$35
1046
 3547  FE1CB5  F0 12         		beq	?07
1047
 3548  FE1CB7  B2 35         		lda	($35)
1048
 3549  FE1CB9  85 27         		sta	$27
1049
 3550  FE1CBB  A9 FF FF      		lda	#$FFFF
1050
 3551  FE1CBE  92 35         		sta	($35)
1051
 3552  FE1CC0  A5 27         		lda	$27
1052
 3553  FE1CC2  85 35         		sta	$35
1053
 3554  FE1CC4                		ACC08
1054
 3555  FE1CC4  E2 20         		sep	#PMFLAG
1055
  Tue Jul 17 11:00:23 2018                                                                                               Page   18
1056
 
1057
 
1058
 
1059
 
1060
 3556                        		.LONGA	off
1061
 3557                        		.MNLIST
1062
 3558  FE1CC6  EB            		xba
1063
 3559  FE1CC7  D0 E8         		bne	?05
1064
 3560  FE1CC9                	?07:	ACC08
1065
 3561  FE1CC9  E2 20         		sep	#PMFLAG
1066
 3562                        		.LONGA	off
1067
 3563                        		.MNLIST
1068
 3564  FE1CCB  60            		rts
1069
 3565
1070
 3566  FE1CCC  A9 80         	?08:	lda	#$80
1071
 3567  FE1CCE  85 4C         		sta	pcterr
1072
 3568  FE1CD0  60            		rts
1073
 3569
1074
 3570  FE1CD1  A0 FE         	?10:	ldy	#$FE
1075
 3571  FE1CD3  B1 23         		lda	($23),y
1076
 3572  FE1CD5  18            		clc
1077
 3573  FE1CD6  65 23         		adc	$23
1078
 3574  FE1CD8  85 23         		sta	$23
1079
 3575  FE1CDA  90 9F         		bcc	?02
1080
 3576  FE1CDC  E6 24         		inc	$24
1081
 3577  FE1CDE  D0 9B         		bne	?02
1082
 3578
1083
 3579  FE1CE0  A0 FE         	?12:	ldy	#$FE
1084
 3580  FE1CE2  B1 23         		lda	($23),y
1085
 3581  FE1CE4  AA            		tax
1086
 3582  FE1CE5  A0 00         		ldy	#$00
1087
 3583  FE1CE7                	?14:	ACC16CLC
1088
 3584  FE1CE7  C2 21         		rep	#(PMFLAG.OR.PCFLAG)
1089
 3585                        		.LONGA	on
1090
 3586                        		.MNLIST
1091
 3587  FE1CE9  B1 23         		lda	($23),y
1092
 3588  FE1CEB  65 5F         		adc	$5F
1093
 3589  FE1CED  85 21         		sta	$21
1094
 3590  FE1CEF  C8            		iny
1095
 3591  FE1CF0  C8            		iny
1096
 3592  FE1CF1  84 27         		sty	$27
1097
 3593  FE1CF3                		ACC08
1098
 3594  FE1CF3  E2 20         		sep	#PMFLAG
1099
 3595                        		.LONGA	off
1100
 3596                        		.MNLIST
1101
 3597  FE1CF5  A0 01         		ldy	#$01
1102
 3598  FE1CF7  B1 21         		lda	($21),y
1103
 3599  FE1CF9  C9 FF         		cmp	#$FF
1104
 3600  FE1CFB  F0 12         		beq	?16
1105
 3601  FE1CFD                		ACC16CLC
1106
 3602  FE1CFD  C2 21         		rep	#(PMFLAG.OR.PCFLAG)
1107
 3603                        		.LONGA	on
1108
 3604                        		.MNLIST
1109
 3605  FE1CFF  B2 21         		lda	($21)
1110
 3606  FE1D01  65 5F         		adc	$5F
1111
 3607  FE1D03  92 21         		sta	($21)
1112
 3608  FE1D05                		ACC08
1113
 3609  FE1D05  E2 20         		sep	#PMFLAG
1114
 3610                        		.LONGA	off
1115
 3611                        		.MNLIST
1116
 3612  FE1D07  A4 27         	?15:	ldy	$27
1117
  Tue Jul 17 11:00:23 2018                                                                                               Page   19
1118
 
1119
 
1120
 
1121
 
1122
 3613  FE1D09  CA            		dex
1123
 3614  FE1D0A  D0 DB         		bne	?14
1124
 3615  FE1D0C  4C 7B 1C      		jmp	?02
1125
 3616  FE1D0F                	?16:	ACC16
1126
 3617  FE1D0F  C2 20         		rep	#PMFLAG
1127
 3618                        		.LONGA	on
1128
 3619                        		.MNLIST
1129
 3620  FE1D11  A5 35         		lda	$35
1130
 3621  FE1D13  92 21         		sta	($21)
1131
 3622  FE1D15  A5 21         		lda	$21
1132
 3623  FE1D17  85 35         		sta	$35
1133
 3624  FE1D19                		ACC08
1134
 3625  FE1D19  E2 20         		sep	#PMFLAG
1135
 3626                        		.LONGA	off
1136
 3627                        		.MNLIST
1137
 3628  FE1D1B  80 EA         		bra	?15
1138
 3629  FE1D1D
1139
 3630  FE1D1D  A0 FE         	?20:	ldy	#$FE
1140
 3631  FE1D1F  B1 23         		lda	($23),y
1141
 3632  FE1D21  4A            		lsr	a
1142
 3633  FE1D22  AA            		tax
1143
 3634  FE1D23  A0 00         		ldy	#0
1144
 3635  FE1D25                	?22:	ACC16CLC
1145
 3636  FE1D25  C2 21         		rep	#(PMFLAG.OR.PCFLAG)
1146
 3637                        		.LONGA	on
1147
 3638                        		.MNLIST
1148
 3639  FE1D27  B1 23         		lda	($23),y
1149
 3640  FE1D29  65 5F         		adc	$5F
1150
 3641  FE1D2B  85 21         		sta	$21
1151
 3642  FE1D2D                		ACC08
1152
 3643  FE1D2D  E2 20         		sep	#PMFLAG
1153
 3644                        		.LONGA	off
1154
 3645                        		.MNLIST
1155
 3646  FE1D2F  C8            		iny
1156
 3647  FE1D30  C8            		iny
1157
 3648  FE1D31  20 52 1D      		jsr	?30
1158
 3649  FE1D34  B1 23         		lda	($23),y
1159
 3650  FE1D36  48            		pha
1160
 3651  FE1D37  C8            		iny
1161
 3652  FE1D38  B1 23         		lda	($23),y
1162
 3653  FE1D3A  C8            		iny
1163
 3654  FE1D3B  84 27         		sty	$27
1164
 3655  FE1D3D  A0 01         		ldy	#$01
1165
 3656  FE1D3F  90 03         		bcc	?24
1166
 3657  FE1D41  18            		clc
1167
 3658  FE1D42  65 60         		adc	$60
1168
 3659  FE1D44  91 21         	?24:	sta	($21),y
1169
 3660  FE1D46  88            		dey
1170
 3661  FE1D47  68            		pla
1171
 3662  FE1D48  91 21         		sta	($21),y
1172
 3663  FE1D4A  A4 27         		ldy	$27
1173
 3664  FE1D4C  CA            		dex
1174
 3665  FE1D4D  D0 D6         		bne	?22
1175
 3666  FE1D4F  4C 7B 1C      		jmp	?02
1176
 3667
1177
 3668  FE1D52                	?30:	ACC16
1178
 3669  FE1D52  C2 20         		rep	#PMFLAG
1179
  Tue Jul 17 11:00:23 2018                                                                                               Page   20
1180
 
1181
 
1182
 
1183
 
1184
 3670                        		.LONGA	on
1185
 3671                        		.MNLIST
1186
 3672  FE1D54  A5 35         		lda	$35
1187
 3673  FE1D56  8D FE FF      		sta	!$FFFE
1188
 3674  FE1D59  A9 FE FF      		lda	#$FFFE
1189
 3675  FE1D5C  85 25         		sta	$25
1190
 3676  FE1D5E  A5 25         	?32:	lda	$25
1191
 3677  FE1D60  85 27         		sta	$27
1192
 3678  FE1D62  B2 27         		lda	($27)
1193
 3679  FE1D64  85 25         		sta	$25
1194
 3680  FE1D66  18            		clc
1195
 3681  FE1D67  F0 0B         		beq	?34
1196
 3682  FE1D69  A5 25         		lda	$25
1197
 3683  FE1D6B  C5 21         		cmp	$21
1198
 3684  FE1D6D  D0 EF         		bne	?32
1199
 3685  FE1D6F  B2 25         		lda	($25)
1200
 3686  FE1D71  92 27         		sta	($27)
1201
 3687  FE1D73  38            		sec
1202
 3688  FE1D74  AD FE FF      	?34:	lda	!$FFFE
1203
 3689  FE1D77  85 35         		sta	$35
1204
 3690  FE1D79                		ACC08
1205
 3691  FE1D79  E2 20         		sep	#PMFLAG
1206
 3692                        		.LONGA	off
1207
 3693                        		.MNLIST
1208
 3694  FE1D7B  60            		rts
1209
 3695  FE1D7C
1210
 3696                        	;---------------------------------------------------------------------------
1211
 3697                        	; p-code execution
1212
 3698                        	;---------------------------------------------------------------------------
1213
 3699
1214
 3700                        	PC00:	; $1119 - $13A4
1215
 3701  FE1D7C  B1 2D         		LDA ($2D),Y
1216
 3702  FE1D7E  85 27         		STA $27
1217
 3703  FE1D80  C8            		INY
1218
 3704  FE1D81  B1 2D         		LDA ($2D),Y
1219
 3705  FE1D83  85 28         		STA $28
1220
 3706  FE1D85  A9 00         		LDA #$00
1221
 3707  FE1D87  91 2D         		STA ($2D),Y
1222
 3708  FE1D89  88            		DEY
1223
 3709  FE1D8A  B1 27         		LDA ($27),Y
1224
 3710  FE1D8C  91 2D         		STA ($2D),Y
1225
 3711  FE1D8E  60            		rts
1226
 3712
1227
 3713                        	PC3B:	; $0970 - $0B81
1228
 3714                        		; 'rewrite' on disk
1229
 3715  FE1D8F  20 EB 33      		JSR 	L09C2		; prepare for open
1230
 3716  FE1D92  A5 3E         		LDA 	$3E
1231
 3717  FE1D94  D0 4F         		BNE 	SK04		; if error
1232
 3718  FE1D96  24 97         		bit	runf
1233
 3719  FE1D98  30 2D         		bmi	?10		; run mode
1234
 3720  FE1D9A  24 BE         		bit	objdsk
1235
 3721  FE1D9C  30 08         		bmi	?01		; use disk '1': '1' option
1236
 3722  FE1D9E  A5 BF         		lda	truedsk		; need this because compiler put drive 0
1237
 3723  FE1DA0  09 30         		ora	#'0'
1238
 3724  FE1DA2  A0 01         		ldy	#1
1239
 3725  FE1DA4  97 BB         		sta	[$BB],y
1240
 3726
1241
  Tue Jul 17 11:00:23 2018                                                                                               Page   21
1242
 
1243
 
1244
 
1245
 
1246
 3727                        		; copy obj. name file to NUMSTR in tbank
1247
 3728  FE1DA6  8B            	?01:	phb
1248
 3729  FE1DA7  A5 BD         		lda	$BD
1249
 3730  FE1DA9  48            		pha
1250
 3731  FE1DAA  AB            		plb
1251
 3732  FE1DAB  A0 FF         		ldy	#$FF
1252
 3733  FE1DAD  C8            	?02:	iny
1253
 3734  FE1DAE  B7 BB         		lda	[$BB],y
1254
 3735  FE1DB0  99 A7 FF      		sta	NUMSTR+1,y
1255
 3736  FE1DB3  D0 F8         		bne	?02
1256
 3737  FE1DB5  A9 53         		lda	#'S'		; scratch
1257
 3738  FE1DB7  8D A7 FF      		sta	!NUMSTR+1
1258
 3739  FE1DBA  A5 B7         		lda	$B7
1259
 3740  FE1DBC  38            		sec
1260
 3741  FE1DBD  E9 04         		sbc	#4		; skip ',S,W'
1261
 3742  FE1DBF  8D A6 FF      		sta	!NUMSTR		; length
1262
 3743  FE1DC2  AA            		tax
1263
 3744  FE1DC3  9E A7 FF      		stz	!NUMSTR+1,x
1264
 3745  FE1DC6  AB            		plb
1265
 3746  FE1DC7
1266
 3747  FE1DC7  20 C0 FF      	?10:	JSR 	FOPEN		; open
1267
 3748  FE1DCA  24 97         		bit	runf
1268
 3749  FE1DCC  20 45 33      		JSR 	L0A73		; handle disk error
1269
 3750  FE1DCF  A9 A8         		LDA 	#$A8
1270
 3751  FE1DD1  92 29         		STA 	($29)
1271
 3752  FE1DD3  80 10         		bra	SK04
1272
 3753
1273
 3754                        	PC01:	; $112E - $13B9
1274
 3755  FE1DD5  B2 2D         		LDA	($2D)
1275
 3756  FE1DD7  AA            		TAX
1276
 3757  FE1DD8  A0 02         		ldy	#2
1277
 3758  FE1DDA                		ACC16
1278
 3759  FE1DDA  C2 20         		rep	#PMFLAG
1279
 3760                        		.LONGA	on
1280
 3761                        		.MNLIST
1281
 3762  FE1DDC  B1 2D         		LDA	($2D),Y
1282
 3763  FE1DDE  85 27         		STA	$27
1283
 3764  FE1DE0                		ACC08
1284
 3765  FE1DE0  E2 20         		sep	#PMFLAG
1285
 3766                        		.LONGA	off
1286
 3767                        		.MNLIST
1287
 3768  FE1DE2  8A            		TXA
1288
 3769  FE1DE3  92 27         		STA	($27)
1289
 3770  FE1DE5
1290
 3771                        	SK04:	; $1141 - $13CC
1291
 3772  FE1DE5                		ACC16CLC
1292
 3773  FE1DE5  C2 21         		rep	#(PMFLAG.OR.PCFLAG)
1293
 3774                        		.LONGA	on
1294
 3775                        		.MNLIST
1295
 3776  FE1DE7  A5 2D         		LDA	$2D
1296
 3777  FE1DE9  69 04 00      		ADC	#$0004
1297
 3778  FE1DEC  85 2D         		STA	$2D
1298
 3779  FE1DEE                		ACC08
1299
 3780  FE1DEE  E2 20         		sep	#PMFLAG
1300
 3781                        		.LONGA	off
1301
 3782                        		.MNLIST
1302
 3783  FE1DF0  60            		rts
1303
  Tue Jul 17 11:00:23 2018                                                                                               Page   22
1304
 
1305
 
1306
 
1307
 
1308
 3784
1309
 3785                        	PC02:	; $114F - $13DA
1310
 3786                        		; terminate procedure or program
1311
 3787  FE1DF1  24 97         		bit	runf
1312
 3788  FE1DF3  10 03         		bpl	?02
1313
 3789  FE1DF5  20 CF 30      		JSR 	R0AE9		; close all local files
1314
 3790  FE1DF8  18            	?02:	CLC
1315
 3791  FE1DF9  A5 2F         		LDA 	$2F
1316
 3792  FE1DFB  69 06         		ADC 	#$06
1317
 3793  FE1DFD  85 2D         		STA 	$2D
1318
 3794  FE1DFF  A5 30         		LDA 	$30
1319
 3795  FE1E01  69 00         		ADC 	#$00
1320
 3796  FE1E03  85 2E         		STA 	$2E
1321
 3797  FE1E05  C5 32         		CMP 	$32
1322
 3798  FE1E07  90 09         		BCC 	?04
1323
 3799  FE1E09  A5 2F         		LDA 	$2F
1324
 3800  FE1E0B  E5 31         		SBC 	$31
1325
 3801  FE1E0D  90 03         		BCC 	?04
1326
 3802  FE1E0F  4C BA 1B      		JMP 	vpmhlt		; terminate
1327
 3803  FE1E12  A0 04         	?04:	LDY 	#$04		; exit from procedure/function
1328
 3804  FE1E14                		ACC16
1329
 3805  FE1E14  C2 20         		rep	#PMFLAG
1330
 3806                        		.LONGA	on
1331
 3807                        		.MNLIST
1332
 3808  FE1E16  B1 2F         		LDA 	($2F),Y
1333
 3809  FE1E18  85 2B         		STA 	$2B
1334
 3810  FE1E1A  A0 02         		ldy	#$02
1335
 3811  FE1E1C  B1 2F         		LDA 	($2F),Y
1336
 3812  FE1E1E  85 2F         		STA 	$2F
1337
 3813  FE1E20                		ACC08
1338
 3814  FE1E20  E2 20         		sep	#PMFLAG
1339
 3815                        		.LONGA	off
1340
 3816                        		.MNLIST
1341
 3817  FE1E22  60            		rts
1342
 3818  FE1E23
1343
 3819                        	PC03:	; $1185 - $1410
1344
 3820                        		; return from integer function
1345
 3821  FE1E23  24 97         		bit	runf
1346
 3822  FE1E25  10 03         		bpl	?02
1347
 3823  FE1E27  20 CF 30      		JSR 	R0AE9
1348
 3824  FE1E2A                	?02:	CPU16
1349
 3825  FE1E2A  C2 30         		rep	#(PMFLAG.OR.PXFLAG)
1350
 3826                        		.LONGA	on
1351
 3827                        		.LONGI	on
1352
 3828                        		.MNLIST
1353
 3829  FE1E2C  B2 2D         		LDA 	($2D)
1354
 3830  FE1E2E  AA            		TAX
1355
 3831  FE1E2F  A5 2F         		LDA 	$2F
1356
 3832  FE1E31  85 2D         		STA 	$2D
1357
 3833  FE1E33  C8            		iny
1358
 3834  FE1E34  C8            		iny
1359
 3835  FE1E35  B1 2D         		LDA 	($2D),Y
1360
 3836  FE1E37  85 2F         		STA 	$2F
1361
 3837  FE1E39  C8            		iny
1362
 3838  FE1E3A  C8            		iny
1363
 3839  FE1E3B  B1 2D         		LDA 	($2D),Y
1364
 3840  FE1E3D  85 2B         		STA 	$2B
1365
  Tue Jul 17 11:00:23 2018                                                                                               Page   23
1366
 
1367
 
1368
 
1369
 
1370
 3841  FE1E3F  8A            		txa
1371
 3842  FE1E40  91 2D         		STA 	($2D),Y
1372
 3843  FE1E42                		CPU08
1373
 3844  FE1E42  E2 30         		sep	#(PMFLAG.OR.PXFLAG)
1374
 3845                        		.LONGA	off
1375
 3846                        		.LONGI	off
1376
 3847                        		.MNLIST
1377
 3848  FE1E44  80 9F         		bra	SK04
1378
 3849
1379
 3850                        	PC04:	; $11B4 - $143F
1380
 3851                        		; prepare for call procedure/function
1381
 3852  FE1E46  38            		SEC
1382
 3853  FE1E47                		ACC16
1383
 3854  FE1E47  C2 20         		rep	#PMFLAG
1384
 3855                        		.LONGA	on
1385
 3856                        		.MNLIST
1386
 3857  FE1E49  A5 2D         		LDA 	$2D
1387
 3858  FE1E4B  E9 06 00      		SBC 	#$0006
1388
 3859  FE1E4E  85 2D         		STA 	$2D
1389
 3860  FE1E50  A5 39         		LDA 	$39
1390
 3861  FE1E52  92 2D         		STA 	($2D)
1391
 3862  FE1E54  A5 2D         		LDA 	$2D
1392
 3863  FE1E56  85 39         		STA 	$39
1393
 3864  FE1E58                		ACC08
1394
 3865  FE1E58  E2 20         		sep	#PMFLAG
1395
 3866                        		.LONGA	off
1396
 3867                        		.MNLIST
1397
 3868  FE1E5A  60            		rts
1398
 3869
1399
 3870                        	PC09:	; $126F - 14FA
1400
 3871                        		; divide 2 integer and leave result in stack
1401
 3872  FE1E5B  BB            		tyx			; Y = X = 0
1402
 3873  FE1E5C                		ACC16
1403
 3874  FE1E5C  C2 20         		rep	#PMFLAG
1404
 3875                        		.LONGA	on
1405
 3876                        		.MNLIST
1406
 3877  FE1E5E  B2 2D         		LDA 	($2D)
1407
 3878  FE1E60  85 25         		STA 	$25
1408
 3879  FE1E62  C8            		iny
1409
 3880  FE1E63  C8            		iny
1410
 3881  FE1E64  B1 2D         		LDA 	($2D),y
1411
 3882  FE1E66  85 23         		STA 	$23
1412
 3883  FE1E68                		ACC08
1413
 3884  FE1E68  E2 20         		sep	#PMFLAG
1414
 3885                        		.LONGA	off
1415
 3886                        		.MNLIST
1416
 3887  FE1E6A  20 1A 1F      		JSR 	idiv
1417
 3888  FE1E6D                		ACC16
1418
 3889  FE1E6D  C2 20         		rep	#PMFLAG
1419
 3890                        		.LONGA	on
1420
 3891                        		.MNLIST
1421
 3892  FE1E6F  A5 21         		LDA 	$21
1422
 3893  FE1E71  91 2D         		STA 	($2D),Y
1423
 3894  FE1E73                		ACC08
1424
 3895  FE1E73  E2 20         		sep	#PMFLAG
1425
 3896                        		.LONGA	off
1426
 3897                        		.MNLIST
1427
  Tue Jul 17 11:00:23 2018                                                                                               Page   24
1428
 
1429
 
1430
 
1431
 
1432
 3898  FE1E75  80 1E         		bra	SK02
1433
 3899
1434
 3900                        	PC0B:	; $12F6 - $1581
1435
 3901                        		; logic 'and' 2 bytes and leave result in stack
1436
 3902  FE1E77  B2 2D         		LDA 	($2D)
1437
 3903  FE1E79  A0 02         		LDY 	#$02
1438
 3904  FE1E7B  31 2D         		AND 	($2D),Y
1439
 3905  FE1E7D  91 2D         		STA 	($2D),Y
1440
 3906  FE1E7F  80 14         		bra	SK02
1441
 3907
1442
 3908                        	PC0C:	; $1301 - $158C
1443
 3909                        		; logic 'or' 2 integer and leave result in stack
1444
 3910  FE1E81  B2 2D         		LDA 	($2D)
1445
 3911  FE1E83  A0 02         		LDY 	#$02
1446
 3912  FE1E85  11 2D         		ORA 	($2D),Y
1447
 3913  FE1E87  91 2D         		STA 	($2D),Y
1448
 3914  FE1E89  80 0A         		bra	SK02
1449
 3915
1450
 3916                        	PC05:	; $11D5 - $1460
1451
 3917                        		; add 2 integer and leave result in stack
1452
 3918  FE1E8B                		ACC16CLC
1453
 3919  FE1E8B  C2 21         		rep	#(PMFLAG.OR.PCFLAG)
1454
 3920                        		.LONGA	on
1455
 3921                        		.MNLIST
1456
 3922  FE1E8D  B2 2D         		LDA 	($2D)
1457
 3923  FE1E8F  A0 02         		LDY 	#$02
1458
 3924  FE1E91  71 2D         		ADC 	($2D),Y
1459
 3925  FE1E93  91 2D         		STA 	($2D),Y
1460
 3926                        	SK02:	; $11E7 - $1472
1461
 3927  FE1E95                		ACC16CLC
1462
 3928  FE1E95  C2 21         		rep	#(PMFLAG.OR.PCFLAG)
1463
 3929                        		.LONGA	on
1464
 3930                        		.MNLIST
1465
 3931  FE1E97  A5 2D         		LDA 	$2D
1466
 3932  FE1E99  1A            		inc	a
1467
 3933  FE1E9A  1A            		inc	a
1468
 3934  FE1E9B  85 2D         		STA 	$2D
1469
 3935  FE1E9D                		ACC08
1470
 3936  FE1E9D  E2 20         		sep	#PMFLAG
1471
 3937                        		.LONGA	off
1472
 3938                        		.MNLIST
1473
 3939  FE1E9F  60            		rts
1474
 3940
1475
 3941                        	PC06:	; $11F5 - $1480
1476
 3942                        		; subctract 2 integer and leave result in stack
1477
 3943  FE1EA0                		ACC16
1478
 3944  FE1EA0  C2 20         		rep	#PMFLAG
1479
 3945                        		.LONGA	on
1480
 3946                        		.MNLIST
1481
 3947  FE1EA2  A0 02         		ldy	#2
1482
 3948  FE1EA4  38            		sec
1483
 3949  FE1EA5  B1 2D         		LDA 	($2D),y
1484
 3950  FE1EA7  F2 2D         		sbc 	($2D)
1485
 3951  FE1EA9  91 2D         		STA 	($2D),Y
1486
 3952  FE1EAB                		ACC08
1487
 3953  FE1EAB  E2 20         		sep	#PMFLAG
1488
 3954                        		.LONGA	off
1489
  Tue Jul 17 11:00:23 2018                                                                                               Page   25
1490
 
1491
 
1492
 
1493
 
1494
 3955                        		.MNLIST
1495
 3956  FE1EAD  80 E6         		bra	SK02
1496
 3957  FE1EAF
1497
 3958                        	PC07:	; $1210 - $149B
1498
 3959                        		; mult 2 integer and leave result in stack
1499
 3960  FE1EAF  BB            		tyx			; Y = X = 0
1500
 3961  FE1EB0                		CPU16
1501
 3962  FE1EB0  C2 30         		rep	#(PMFLAG.OR.PXFLAG)
1502
 3963                        		.LONGA	on
1503
 3964                        		.LONGI	on
1504
 3965                        		.MNLIST
1505
 3966  FE1EB2  B2 2D         		LDA 	($2D)
1506
 3967  FE1EB4  85 23         		STA 	$23
1507
 3968  FE1EB6  48            		pha
1508
 3969  FE1EB7  10 06         		bpl	?02
1509
 3970  FE1EB9  38            		sec
1510
 3971  FE1EBA  8A            		txa			; X = 0
1511
 3972  FE1EBB  E5 23         		sbc	$23
1512
 3973  FE1EBD  85 23         		sta	$23
1513
 3974  FE1EBF  C8            	?02:	iny
1514
 3975  FE1EC0  C8            		iny
1515
 3976  FE1EC1  B1 2D         		LDA 	($2D),Y
1516
 3977  FE1EC3  85 25         		STA 	$25
1517
 3978  FE1EC5  10 06         		bpl	?04
1518
 3979  FE1EC7  38            		sec
1519
 3980  FE1EC8  8A            		txa			; X = 0
1520
 3981  FE1EC9  E5 25         		sbc	$25
1521
 3982  FE1ECB  85 25         		sta	$25
1522
 3983  FE1ECD  68            	?04:	PLA
1523
 3984  FE1ECE  51 2D         		EOR 	($2D),Y		; sign comparison
1524
 3985  FE1ED0                		CPU08
1525
 3986  FE1ED0  E2 30         		sep	#(PMFLAG.OR.PXFLAG)
1526
 3987                        		.LONGA	off
1527
 3988                        		.LONGI	off
1528
 3989                        		.MNLIST
1529
 3990  FE1ED2  08            		PHP
1530
 3991  FE1ED3  20 8B 29      		JSR 	imult		; return Z = 0 if CF = 0
1531
 3992  FE1ED6  B0 3D         		BCS 	er03
1532
 3993  FE1ED8  A5 22         		LDA 	$22
1533
 3994  FE1EDA  30 39         		BMI 	er03
1534
 3995  FE1EDC  28            		PLP
1535
 3996  FE1EDD                		CPU16
1536
 3997  FE1EDD  C2 30         		rep	#(PMFLAG.OR.PXFLAG)
1537
 3998                        		.LONGA	on
1538
 3999                        		.LONGI	on
1539
 4000                        		.MNLIST
1540
 4001  FE1EDF  10 06         		BPL	?06
1541
 4002  FE1EE1  38            		sec
1542
 4003  FE1EE2  8A            		txa			; X = 0
1543
 4004  FE1EE3  E5 21         		sbc	$21
1544
 4005  FE1EE5  85 21         		sta	$21
1545
 4006  FE1EE7  A5 21         	?06:	lda	$21
1546
 4007  FE1EE9  91 2D         		STA 	($2D),Y
1547
 4008  FE1EEB                		CPU08
1548
 4009  FE1EEB  E2 30         		sep	#(PMFLAG.OR.PXFLAG)
1549
 4010                        		.LONGA	off
1550
 4011                        		.LONGI	off
1551
  Tue Jul 17 11:00:23 2018                                                                                               Page   26
1552
 
1553
 
1554
 
1555
 
1556
 4012                        		.MNLIST
1557
 4013  FE1EED  80 A6         		bra	SK02
1558
 4014
1559
 4015                        	PC08:	; $124D - $14D8
1560
 4016                        		; compute modulo 2 integer and leave result in stack
1561
 4017  FE1EEF                		ACC16
1562
 4018  FE1EEF  C2 20         		rep	#PMFLAG
1563
 4019                        		.LONGA	on
1564
 4020                        		.MNLIST
1565
 4021  FE1EF1  B2 2D         		LDA 	($2D)
1566
 4022  FE1EF3  85 25         		STA 	$25
1567
 4023  FE1EF5  C8            		iny
1568
 4024  FE1EF6  C8            		iny
1569
 4025  FE1EF7  B1 2D         		LDA 	($2D),Y
1570
 4026  FE1EF9  85 23         		STA 	$23
1571
 4027  FE1EFB                		ACC08
1572
 4028  FE1EFB  E2 20         		sep	#PMFLAG
1573
 4029                        		.LONGA	off
1574
 4030                        		.MNLIST
1575
 4031  FE1EFD  20 1A 1F      		JSR 	idiv
1576
 4032  FE1F00                		ACC16
1577
 4033  FE1F00  C2 20         		rep	#PMFLAG
1578
 4034                        		.LONGA	on
1579
 4035                        		.MNLIST
1580
 4036  FE1F02  A5 23         		LDA 	$23
1581
 4037  FE1F04  91 2D         		STA 	($2D),Y
1582
 4038  FE1F06                		ACC08
1583
 4039  FE1F06  E2 20         		sep	#PMFLAG
1584
 4040                        		.LONGA	off
1585
 4041                        		.MNLIST
1586
 4042  FE1F08  80 8B         		bra	SK02
1587
 4043
1588
 4044                        	PC0A:	; $1291 - $151C
1589
 4045                        		; 2's complement integer and leave result in stack
1590
 4046  FE1F0A                		CPU16
1591
 4047  FE1F0A  C2 30         		rep	#(PMFLAG.OR.PXFLAG)
1592
 4048                        		.LONGA	on
1593
 4049                        		.LONGI	on
1594
 4050                        		.MNLIST
1595
 4051  FE1F0C  38            		SEC
1596
 4052  FE1F0D  98            		TYA
1597
 4053  FE1F0E  F2 2D         		SBC 	($2D)
1598
 4054  FE1F10  92 2D         		STA 	($2D)
1599
 4055  FE1F12                		CPU08
1600
 4056  FE1F12  E2 30         		sep	#(PMFLAG.OR.PXFLAG)
1601
 4057                        		.LONGA	off
1602
 4058                        		.LONGI	off
1603
 4059                        		.MNLIST
1604
 4060  FE1F14  60            		rts
1605
 4061
1606
 4062                        	; integer overflow
1607
 4063                        	er03:	; $12A0 - $152B
1608
 4064  FE1F15  A2 03         		LDX 	#$03
1609
 4065  FE1F17  4C 50 1B      		JMP 	vpmerr
1610
 4066
1611
 4067                        	; divide integer $23-$24 and $25-$26 - quot. in $21-$22 and rem. in $23-$24
1612
 4068                        	; in input X must be 0
1613
  Tue Jul 17 11:00:23 2018                                                                                               Page   27
1614
 
1615
 
1616
 
1617
 
1618
 4069  FE1F1A                	idiv:
1619
 4070  FE1F1A  A5 25         		LDA 	$25
1620
 4071  FE1F1C  05 26         		ora	$26
1621
 4072  FE1F1E  F0 F5         		BEQ 	er03
1622
 4073  FE1F20  64 21         		STZ	$21
1623
 4074  FE1F22  64 22         		STZ	$22
1624
 4075  FE1F24  A5 24         		lda	$24
1625
 4076  FE1F26  45 26         		eor	$26
1626
 4077  FE1F28  08            		PHP
1627
 4078  FE1F29                		CPU16
1628
 4079  FE1F29  C2 30         		rep	#(PMFLAG.OR.PXFLAG)
1629
 4080                        		.LONGA	on
1630
 4081                        		.LONGI	on
1631
 4082                        		.MNLIST
1632
 4083  FE1F2B  A5 23         		LDA 	$23
1633
 4084  FE1F2D  10 06         		BPL	?02
1634
 4085  FE1F2F  38            		sec
1635
 4086  FE1F30  8A            		txa			; X = 0
1636
 4087  FE1F31  E5 23         		sbc	$23
1637
 4088  FE1F33  85 23         		sta	$23
1638
 4089  FE1F35  A5 25         	?02:	LDA 	$25
1639
 4090  FE1F37  10 06         		BPL 	?04
1640
 4091  FE1F39  38            		sec
1641
 4092  FE1F3A  8A            		txa			; X = 0
1642
 4093  FE1F3B  E5 25         		sbc	$25
1643
 4094  FE1F3D  85 25         		sta	$25
1644
 4095  FE1F3F                	?04:	CPU08
1645
 4096  FE1F3F  E2 30         		sep	#(PMFLAG.OR.PXFLAG)
1646
 4097                        		.LONGA	off
1647
 4098                        		.LONGI	off
1648
 4099                        		.MNLIST
1649
 4100  FE1F41  A2 10         		LDX	#$10
1650
 4101  FE1F43  06 23         	?06:	ASL 	$23
1651
 4102  FE1F45  26 24         		ROL 	$24
1652
 4103  FE1F47  26 21         		ROL 	$21
1653
 4104  FE1F49  26 22         		ROL 	$22
1654
 4105  FE1F4B  30 C8         		BMI 	er03
1655
 4106  FE1F4D  A5 21         		LDA 	$21
1656
 4107  FE1F4F  C5 25         		CMP 	$25
1657
 4108  FE1F51  A5 22         		LDA 	$22
1658
 4109  FE1F53  E5 26         		SBC 	$26
1659
 4110  FE1F55  30 0F         		BMI 	?08
1660
 4111  FE1F57  85 22         		STA 	$22
1661
 4112  FE1F59  A5 21         		LDA 	$21
1662
 4113  FE1F5B  38            		SEC
1663
 4114  FE1F5C  E5 25         		SBC 	$25
1664
 4115  FE1F5E  85 21         		STA 	$21
1665
 4116  FE1F60  A5 23         		LDA 	$23
1666
 4117  FE1F62  09 01         		ORA 	#$01
1667
 4118  FE1F64  85 23         		STA 	$23
1668
 4119  FE1F66  CA            	?08:	DEX
1669
 4120  FE1F67  D0 DA         		BNE 	?06
1670
 4121  FE1F69  28            		PLP
1671
 4122  FE1F6A  10 10         		BPL 	?10
1672
 4123  FE1F6C                		CPU16
1673
 4124  FE1F6C  C2 30         		rep	#(PMFLAG.OR.PXFLAG)
1674
 4125                        		.LONGA	on
1675
  Tue Jul 17 11:00:23 2018                                                                                               Page   28
1676
 
1677
 
1678
 
1679
 
1680
 4126                        		.LONGI	on
1681
 4127                        		.MNLIST
1682
 4128  FE1F6E  38            		sec
1683
 4129  FE1F6F  8A            		txa			; X = 0
1684
 4130  FE1F70  E5 21         		sbc	$21
1685
 4131  FE1F72  85 21         		sta	$21
1686
 4132  FE1F74  38            		sec
1687
 4133  FE1F75  8A            		txa			; X = 0
1688
 4134  FE1F76  E5 23         		sbc	$23
1689
 4135  FE1F78  85 23         		sta	$23
1690
 4136  FE1F7A                		CPU08
1691
 4137  FE1F7A  E2 30         		sep	#(PMFLAG.OR.PXFLAG)
1692
 4138                        		.LONGA	off
1693
 4139                        		.LONGI	off
1694
 4140                        		.MNLIST
1695
 4141  FE1F7C  60            	?10:	RTS
1696
 4142
1697
 4143                        	PC0D:	; $xxxx - $2959
1698
 4144                        		; page() procedure
1699
 4145  FE1F7D  24 97         		bit	runf
1700
 4146  FE1F7F  10 27         		bpl	PC0Dx
1701
 4147  FE1F81  20 62 30      		JSR	L17A3
1702
 4148  FE1F84  20 4B 32      		JSR	R0F8D
1703
 4149  FE1F87  C6 B8         		DEC	$B8
1704
 4150  FE1F89  F0 0D         		BEQ	?02		; output (clear screen)
1705
 4151  FE1F8B  20 25 32      		JSR	L0EA8
1706
 4152  FE1F8E  A9 0C         		LDA	#$0C		; new page at printer
1707
 4153  FE1F90  20 E3 32      		JSR	L0EC4
1708
 4154  FE1F93  20 CC FF      		jsr	FCLRCH
1709
 4155  FE1F96  80 04         		bra	?04
1710
 4156  FE1F98  EA            	?02:	nop			; clear screen
1711
 4157  FE1F99                		SCNCLR			; call system function
1712
 4158  FE1F99  02 18         		cop	$18
1713
 4159  FE1F9B  01            		.DB	$01
1714
 4160                        		.MNLIST
1715
 4161  FE1F9C  A9 02         	?04:	LDA	#$02
1716
 4162  FE1F9E  18            		CLC
1717
 4163  FE1F9F  65 2D         		ADC	$2D
1718
 4164  FE1FA1  85 2D         		STA	$2D
1719
 4165  FE1FA3  90 02         		BCC	?06
1720
 4166  FE1FA5  E6 2E         		INC	$2E
1721
 4167  FE1FA7  60            	?06:	rts
1722
 4168
1723
 4169  FE1FA8                	PC0Dx:
1724
 4170  FE1FA8  4C 4E 1B      		JMP 	vpme07		; error: bad p-code
1725
 4171
1726
 4172                        	PC14:	; $xxxx - $2BDF		; close file
1727
 4173  FE1FAB  24 97         		bit	runf
1728
 4174  FE1FAD  10 F9         		bpl	PC0Dx
1729
 4175  FE1FAF  B1 2D         		LDA 	($2D),Y
1730
 4176  FE1FB1  85 29         		STA 	$29
1731
 4177  FE1FB3  C8            		INY
1732
 4178  FE1FB4  B1 2D         		LDA 	($2D),Y
1733
 4179  FE1FB6  85 2A         		STA 	$2A
1734
 4180  FE1FB8  20 4B 32      		JSR	R0F8D
1735
 4181  FE1FBB  A5 B8         		LDA	$B8
1736
 4182  FE1FBD  C9 FF         		CMP	#$FF
1737
  Tue Jul 17 11:00:23 2018                                                                                               Page   29
1738
 
1739
 
1740
 
1741
 
1742
 4183  FE1FBF  F0 0F         		BEQ	?02
1743
 4184  FE1FC1  0A            		ASL	a
1744
 4185  FE1FC2  AA            		TAX
1745
 4186  FE1FC3  A9 00         		LDA	#$00
1746
 4187  FE1FC5  9D D0 FF      		STA	!MFILET,X
1747
 4188  FE1FC8  9D D1 FF      		STA	!MFILET+1,X
1748
 4189  FE1FCB  A5 B8         		LDA	$B8
1749
 4190  FE1FCD  20 C3 FF      		JSR	FCLOSE
1750
 4191  FE1FD0  4C 95 1E      	?02:	JMP	SK02
1751
 4192
1752
 4193                        	PC0E:	; $130C - $1597
1753
 4194  FE1FD3  B2 2D         		LDA 	($2D)
1754
 4195  FE1FD5  49 01         		EOR 	#$01
1755
 4196  FE1FD7  92 2D         		STA 	($2D)
1756
 4197  FE1FD9  60            		rts
1757
 4198  FE1FDA
1758
 4199                        	PC0F:	; $1315 - $15A0
1759
 4200  FE1FDA  B1 2D         		LDA 	($2D),Y
1760
 4201  FE1FDC  A0 02         		LDY 	#$02
1761
 4202  FE1FDE  D1 2D         		CMP 	($2D),Y
1762
 4203  FE1FE0  C8            		INY
1763
 4204  FE1FE1  B1 2D         		LDA 	($2D),Y
1764
 4205  FE1FE3  49 80         		EOR 	#$80
1765
 4206  FE1FE5  85 27         		STA 	$27
1766
 4207  FE1FE7  A0 01         		LDY 	#$01
1767
 4208  FE1FE9  B1 2D         		LDA 	($2D),Y
1768
 4209  FE1FEB  49 80         		EOR 	#$80
1769
 4210  FE1FED  E5 27         		SBC 	$27
1770
 4211  FE1FEF  A0 03         		LDY 	#$03
1771
 4212  FE1FF1  90 3B         		BCC 	PC11c
1772
 4213  FE1FF3  B0 2C         		BCS 	PC11a
1773
 4214
1774
 4215                        	PC10:	; $1330 - $15BB
1775
 4216  FE1FF5  A0 02         		LDY 	#$02
1776
 4217  FE1FF7  B1 2D         		LDA 	($2D),Y
1777
 4218  FE1FF9  A0 00         		LDY 	#$00
1778
 4219  FE1FFB  D1 2D         		CMP 	($2D),Y
1779
 4220  FE1FFD  C8            		INY
1780
 4221  FE1FFE  B1 2D         		LDA 	($2D),Y
1781
 4222  FE2000  49 80         		EOR 	#$80
1782
 4223  FE2002  85 27         		STA 	$27
1783
 4224  FE2004  A0 03         		LDY 	#$03
1784
 4225  FE2006  B1 2D         		LDA 	($2D),Y
1785
 4226  FE2008  49 80         		EOR 	#$80
1786
 4227  FE200A  E5 27         		SBC 	$27
1787
 4228  FE200C  90 20         		BCC 	PC11c
1788
 4229  FE200E  B0 11         		BCS 	PC11a
1789
 4230
1790
 4231                        	PC11:	; $134B - $15D6
1791
 4232  FE2010  B1 2D         		LDA 	($2D),Y
1792
 4233  FE2012  A0 02         		LDY 	#$02
1793
 4234  FE2014  D1 2D         		CMP 	($2D),Y
1794
 4235  FE2016  D0 15         		BNE 	PC11b
1795
 4236  FE2018  88            		DEY
1796
 4237  FE2019  B1 2D         		LDA 	($2D),Y
1797
 4238  FE201B  A0 03         		LDY 	#$03
1798
 4239  FE201D  D1 2D         		CMP 	($2D),Y
1799
  Tue Jul 17 11:00:23 2018                                                                                               Page   30
1800
 
1801
 
1802
 
1803
 
1804
 4240  FE201F  D0 0D         		BNE 	PC11c
1805
 4241                        	PC11a:	; $135C - $15E7
1806
 4242  FE2021  A9 00         		LDA 	#$00
1807
 4243  FE2023  91 2D         		STA 	($2D),Y
1808
 4244  FE2025  88            		DEY
1809
 4245  FE2026  A9 01         		LDA 	#$01
1810
 4246  FE2028  91 2D         		STA 	($2D),Y
1811
 4247  FE202A  4C 95 1E      		JMP 	SK02
1812
 4248                        	PC11b:	; $1368 - $15F3
1813
 4249  FE202D  C8            		INY
1814
 4250                        	PC11c:	; $1369 - $15F4
1815
 4251  FE202E  A9 00         		LDA 	#$00
1816
 4252  FE2030  91 2D         		STA 	($2D),Y
1817
 4253  FE2032  88            		DEY
1818
 4254  FE2033  91 2D         		STA 	($2D),Y
1819
 4255  FE2035  4C 95 1E      		JMP 	SK02
1820
 4256
1821
 4257                        	PC12:	; $1373 - $15FE
1822
 4258  FE2038  20 49 20      		JSR 	decstk
1823
 4259  FE203B  A0 03         		LDY 	#$03
1824
 4260  FE203D  B1 2D         		LDA 	($2D),Y
1825
 4261  FE203F  A0 01         		LDY 	#$01
1826
 4262  FE2041  91 2D         		STA 	($2D),Y
1827
 4263  FE2043  C8            		INY
1828
 4264  FE2044  B1 2D         		LDA 	($2D),Y
1829
 4265  FE2046  92 2D         		STA 	($2D)
1830
 4266  FE2048  60            		rts
1831
 4267
1832
 4268                        	decstk:	; $1836 - $1ABF
1833
 4269  FE2049  A5 2D         		LDA 	$2D
1834
 4270  FE204B  38            		SEC
1835
 4271  FE204C  E9 02         		SBC 	#$02
1836
 4272  FE204E  85 2D         		STA 	$2D
1837
 4273  FE2050  B0 02         		BCS 	?02
1838
 4274  FE2052  C6 2E         		DEC 	$2E
1839
 4275  FE2054  60            	?02:	RTS
1840
 4276
1841
 4277                        	PC13:	; $1388 - $1613
1842
 4278  FE2055  A0 11         		LDY 	#$11
1843
 4279  FE2057  B1 2D         		LDA 	($2D),Y
1844
 4280  FE2059  D0 1E         		BNE 	?04
1845
 4281  FE205B  88            		DEY
1846
 4282  FE205C  B1 2D         		LDA 	($2D),Y
1847
 4283  FE205E  30 19         		BMI 	?04
1848
 4284  FE2060  AA            		TAX
1849
 4285  FE2061  4A            		LSR	a
1850
 4286  FE2062  4A            		LSR	a
1851
 4287  FE2063  4A            		LSR	a
1852
 4288  FE2064  A8            		TAY
1853
 4289  FE2065  8A            		TXA
1854
 4290  FE2066  29 07         		AND 	#$07
1855
 4291  FE2068  AA            		TAX
1856
 4292  FE2069  B1 2D         		LDA 	($2D),Y
1857
 4293  FE206B  6A            	?02:	ROR 	a
1858
 4294  FE206C  CA            		DEX
1859
 4295  FE206D  10 FC         		BPL 	?02
1860
 4296  FE206F  90 08         		BCC 	?04
1861
  Tue Jul 17 11:00:23 2018                                                                                               Page   31
1862
 
1863
 
1864
 
1865
 
1866
 4297  FE2071  A0 10         		LDY 	#$10
1867
 4298  FE2073  A9 01         		LDA 	#$01
1868
 4299  FE2075  91 2D         		STA 	($2D),Y
1869
 4300  FE2077  D0 09         		BNE 	?06
1870
 4301  FE2079  A0 10         	?04:	LDY 	#$10
1871
 4302  FE207B  A9 00         		LDA 	#$00
1872
 4303  FE207D  91 2D         		STA 	($2D),Y
1873
 4304  FE207F  C8            		INY
1874
 4305  FE2080  91 2D         		STA 	($2D),Y
1875
 4306  FE2082                	?06:
1876
 4307                        	L13B5:	; $13B5 - $1640
1877
 4308  FE2082  A5 2D         		LDA 	$2D
1878
 4309  FE2084  18            		CLC
1879
 4310  FE2085  69 10         		ADC 	#$10
1880
 4311  FE2087  85 2D         		STA 	$2D
1881
 4312  FE2089  90 02         		BCC 	?08
1882
 4313  FE208B  E6 2E         		INC 	$2E
1883
 4314  FE208D                	?08:
1884
 4315  FE208D  60            	PCxx:	rts
1885
 4316
1886
 4317                        	PC15:	; $13C3 - $164E
1887
 4318  FE208E  20 03 32      		JSR	L1762
1888
 4319  FE2091  20 76 32      		JSR	L0D1C
1889
 4320  FE2094  4C CC FF      		JMP	FCLRCH
1890
 4321
1891
 4322                        	PC16:	; $13CF - $165A
1892
 4323  FE2097  20 03 32      		JSR	L1762
1893
 4324  FE209A  A5 23         		LDA	$23
1894
 4325  FE209C  F0 EF         		BEQ	PCxx
1895
 4326  FE209E  A2 01         		LDX	#$01
1896
 4327  FE20A0  20 34 33      		JSR	L0E69
1897
 4328  FE20A3  A5 21         		LDA	$21
1898
 4329  FE20A5  20 E3 32      		JSR	L0EC4
1899
 4330  FE20A8  4C CC FF      		JMP	FCLRCH
1900
 4331
1901
 4332                        	PC19:	; $1421 - $16AC
1902
 4333                        		; write CR to text file
1903
 4334  FE20AB  84 3E         		STY	$3E
1904
 4335  FE20AD  20 85 30      		JSR	L17AD
1905
 4336  FE20B0  20 25 32      		JSR	L0EA8
1906
 4337  FE20B3  A9 0D         		LDA	#$0D
1907
 4338  FE20B5  20 E3 32      		JSR	L0EC4
1908
 4339
1909
 4340  FE20B8  A5 9A         		lda	dflto
1910
 4341  FE20BA  C9 03         		cmp	#$03
1911
 4342  FE20BC  F0 05         		beq	?02
1912
 4343  FE20BE  A9 0A         		LDA	#$0A
1913
 4344  FE20C0  20 E3 32      		JSR	L0EC4
1914
 4345  FE20C3                	?02:
1915
 4346  FE20C3  20 CC FF      		JSR	FCLRCH
1916
 4347  FE20C6  4C 95 1E      		JMP	SK02
1917
 4348
1918
 4349                        	PC1A:	; $1434 - $16BF
1919
 4350                        		; read integer from input text file
1920
 4351  FE20C9  20 14 30      		JSR	L178B
1921
 4352  FE20CC  20 1B 21      		JSR	L0DA5
1922
 4353  FE20CF  90 05         		BCC	?02
1923
  Tue Jul 17 11:00:23 2018                                                                                               Page   32
1924
 
1925
 
1926
 
1927
 
1928
 4354  FE20D1  A2 02         		LDX	#$02
1929
 4355  FE20D3  20 C0 31      		JSR	L0FAA
1930
 4356  FE20D6                	?02:
1931
 4357                        	L1441:	; $1441 - $16CC
1932
 4358  FE20D6  20 8F 30      		JSR	L17B7
1933
 4359                        	L1444:	; $1444 - $16CF
1934
 4360  FE20D9  A5 21         		LDA	$21
1935
 4361  FE20DB  A0 00         		LDY	#$00
1936
 4362  FE20DD  91 2D         		STA	($2D),Y
1937
 4363  FE20DF  C8            		INY
1938
 4364  FE20E0  A5 22         		LDA	$22
1939
 4365  FE20E2  91 2D         		STA	($2D),Y
1940
 4366  FE20E4  4C CC FF      		JMP	FCLRCH
1941
 4367
1942
 4368                        	PC1B:	; $1455 - $16E0
1943
 4369  FE20E7  84 22         		STY	$22
1944
 4370  FE20E9  20 14 30      		JSR	L178B
1945
 4371  FE20EC  85 21         		STA	$21
1946
 4372  FE20EE  A0 00         		LDY	#$00
1947
 4373  FE20F0  B1 29         		LDA	($29),Y
1948
 4374  FE20F2  29 40         		AND	#$40
1949
 4375  FE20F4  D0 1B         		BNE	L147F
1950
 4376  FE20F6  20 71 31      	?02:	JSR	L0F2B
1951
 4377  FE20F9  C9 0A         		CMP	#$0A
1952
 4378  FE20FB  F0 F9         		BEQ	?02
1953
 4379  FE20FD  D0 D7         		BNE	L1441
1954
 4380
1955
 4381                        	; redln
1956
 4382                        	PC1C:	; $146D - $16F8
1957
 4383  FE20FF  20 14 30      		JSR	L178B
1958
 4384  FE2102  A0 00         		LDY	#$00
1959
 4385  FE2104  B1 29         		LDA	($29),Y
1960
 4386  FE2106  29 40         		AND	#$40
1961
 4387  FE2108  D0 07         		BNE	L147F
1962
 4388  FE210A  20 71 31      	?02:	JSR	L0F2B
1963
 4389  FE210D  C9 0D         		CMP	#$0D
1964
 4390  FE210F  D0 F9         		BNE	?02
1965
 4391  FE2111
1966
 4392                        	L147F:	; $147F - $170A
1967
 4393  FE2111  A0 00         		LDY	#$00
1968
 4394  FE2113  B1 29         		LDA	($29),Y
1969
 4395  FE2115  09 02         		ORA	#$02
1970
 4396  FE2117  91 29         		STA	($29),Y
1971
 4397  FE2119  80 BE         		bra 	L1444
1972
 4398
1973
 4399                        	L0DA5:	; $0DA5 - $1030
1974
 4400  FE211B  80 03         		bra	?04
1975
 4401  FE211D  20 71 31      	?02:	JSR	L0F2B
1976
 4402  FE2120  C9 0D         	?04:	CMP	#$0D
1977
 4403  FE2122  F0 F9         		BEQ	?02
1978
 4404  FE2124  C9 20         		CMP	#$20
1979
 4405  FE2126  F0 F5         		BEQ	?02
1980
 4406  FE2128  C9 0A         		CMP	#$0A
1981
 4407  FE212A  F0 F1         		BEQ	?02
1982
 4408  FE212C  A2 00         		LDX	#$00
1983
 4409  FE212E  86 21         		STX	$21
1984
 4410  FE2130  86 22         		STX	$22
1985
  Tue Jul 17 11:00:23 2018                                                                                               Page   33
1986
 
1987
 
1988
 
1989
 
1990
 4411  FE2132  C9 2D         		CMP	#$2D		; minus sign
1991
 4412  FE2134  08            		PHP
1992
 4413  FE2135  F0 04         		BEQ	?06
1993
 4414  FE2137  C9 2B         		CMP	#$2B
1994
 4415  FE2139  D0 03         		BNE	?08		; plus sign
1995
 4416  FE213B  20 71 31      	?06:	JSR	L0F2B
1996
 4417  FE213E  C9 3A         	?08:	CMP	#$3A
1997
 4418  FE2140  10 4A         		BPL	?18
1998
 4419  FE2142  38            		SEC
1999
 4420  FE2143  E9 30         		SBC	#$30
2000
 4421  FE2145  30 45         		BMI	?18
2001
 4422  FE2147  48            	?10:	PHA
2002
 4423  FE2148  06 21         		ASL	$21
2003
 4424  FE214A  26 22         		ROL	$22
2004
 4425  FE214C  A5 21         		LDA	$21
2005
 4426  FE214E  A4 22         		LDY	$22
2006
 4427  FE2150  06 21         		ASL	$21
2007
 4428  FE2152  26 22         		ROL	$22
2008
 4429  FE2154  06 21         		ASL	$21
2009
 4430  FE2156  26 22         		ROL	$22
2010
 4431  FE2158  18            		CLC
2011
 4432  FE2159  65 21         		ADC	$21
2012
 4433  FE215B  85 21         		STA	$21
2013
 4434  FE215D  98            		TYA
2014
 4435  FE215E  65 22         		ADC	$22
2015
 4436  FE2160  85 22         		STA	$22
2016
 4437  FE2162  68            		PLA
2017
 4438  FE2163  18            		CLC
2018
 4439  FE2164  65 21         		ADC	$21
2019
 4440  FE2166  85 21         		STA	$21
2020
 4441  FE2168  90 02         		BCC	?12
2021
 4442  FE216A  E6 22         		INC	$22
2022
 4443  FE216C  20 71 31      	?12:	JSR	L0F2B
2023
 4444  FE216F  AA            		TAX
2024
 4445  FE2170  C9 3A         		CMP	#$3A
2025
 4446  FE2172  10 05         		BPL	?14
2026
 4447  FE2174  38            		SEC
2027
 4448  FE2175  E9 30         		SBC	#$30
2028
 4449  FE2177  10 CE         		BPL	?10
2029
 4450  FE2179  28            	?14:	PLP
2030
 4451  FE217A  D0 0D         		BNE	?16
2031
 4452  FE217C  38            		SEC
2032
 4453  FE217D  A9 00         		LDA 	#$00
2033
 4454  FE217F  E5 21         		SBC	$21
2034
 4455  FE2181  85 21         		STA	$21
2035
 4456  FE2183  A9 00         		LDA	#$00
2036
 4457  FE2185  E5 22         		SBC	$22
2037
 4458  FE2187  85 22         		STA	$22
2038
 4459  FE2189  8A            	?16:	TXA
2039
 4460  FE218A  18            		CLC
2040
 4461  FE218B  60            		RTS
2041
 4462  FE218C  68            	?18:	PLA
2042
 4463  FE218D  8A            		TXA
2043
 4464  FE218E  38            		SEC
2044
 4465  FE218F  60            		RTS
2045
 4466
2046
 4467                        	PC1D:	; $29C1 - $2FA3
2047
  Tue Jul 17 11:00:23 2018                                                                                               Page   34
2048
 
2049
 
2050
 
2051
 
2052
 4468                        		; read a floating point number from text file
2053
 4469  FE2190  20 14 30      		JSR	L178B
2054
 4470  FE2193  A2 00         		LDX	#$00
2055
 4471  FE2195  86 3E         		STX	$3E
2056
 4472  FE2197  C9 20         	?02:	CMP	#$20
2057
 4473  FE2199  F0 08         		BEQ	?04
2058
 4474  FE219B  C9 0D         		CMP	#$0D
2059
 4475  FE219D  F0 04         		BEQ	?04
2060
 4476  FE219F  C9 0A         		CMP	#$0A
2061
 4477  FE21A1  D0 08         		BNE	?08
2062
 4478  FE21A3  20 71 31      	?04:	JSR	L0F2B
2063
 4479  FE21A6  80 EF         		bra	?02
2064
 4480  FE21A8  20 71 31      	?06:	JSR	L0F2B
2065
 4481  FE21AB                	?08:
2066
 4482  FE21AB  9D 5A FF      	?10:	STA	!MNUMSTR,X	; buffer
2067
 4483  FE21AE  85 27         		STA	$27		; last char was read
2068
 4484  FE21B0  E8            		INX
2069
 4485  FE21B1  E0 1F         		CPX	#NUMSIZ-1
2070
 4486  FE21B3  F0 3D         		BEQ	?26
2071
 4487  FE21B5  C9 2E         		CMP	#$2E
2072
 4488  FE21B7  F0 EF         		BEQ	?06
2073
 4489  FE21B9  C9 45         		CMP	#'E'
2074
 4490  FE21BB  F0 EB         		BEQ	?06
2075
 4491  FE21BD  C9 65         		CMP	#'e'
2076
 4492  FE21BF  F0 E7         		BEQ	?06
2077
 4493  FE21C1  C9 2B         		CMP	#$2B
2078
 4494  FE21C3  F0 E3         		BEQ	?06
2079
 4495  FE21C5  C9 2D         		CMP	#$2D
2080
 4496  FE21C7  F0 DF         		BEQ	?06
2081
 4497  FE21C9  C9 30         		CMP	#$30
2082
 4498  FE21CB  90 04         		BCC	?12
2083
 4499  FE21CD  C9 3A         		CMP	#$3A
2084
 4500  FE21CF  90 D7         		BCC	?06
2085
 4501  FE21D1  CA            	?12:	DEX
2086
 4502  FE21D2  F0 1E         	?14:	BEQ	?26
2087
 4503  FE21D4  A9 00         		LDA	#$00
2088
 4504  FE21D6  9D 5A FF      		STA	!MNUMSTR,X
2089
 4505  FE21D9                		ACC16
2090
 4506  FE21D9  C2 20         		rep	#PMFLAG
2091
 4507                        		.LONGA	on
2092
 4508                        		.MNLIST
2093
 4509  FE21DB  D4 7A         		pei	($7A)
2094
 4510  FE21DD  A9 5A FF      		LDA	#MNUMSTR
2095
 4511  FE21E0  85 7A         		STA	$7A
2096
 4512  FE21E2                		ACC08
2097
 4513  FE21E2  E2 20         		sep	#PMFLAG
2098
 4514                        		.LONGA	off
2099
 4515                        		.MNLIST
2100
 4516  FE21E4  20 C6 98      		JSR	XBCF3P
2101
 4517  FE21E7  AA            		TAX			; X = return code from conversion
2102
 4518  FE21E8                		ACC16
2103
 4519  FE21E8  C2 20         		rep	#PMFLAG
2104
 4520                        		.LONGA	on
2105
 4521                        		.MNLIST
2106
 4522  FE21EA  68            		pla
2107
 4523  FE21EB  85 7A         		STA	$7A
2108
 4524  FE21ED                		ACC08
2109
  Tue Jul 17 11:00:23 2018                                                                                               Page   35
2110
 
2111
 
2112
 
2113
 
2114
 4525  FE21ED  E2 20         		sep	#PMFLAG
2115
 4526                        		.LONGA	off
2116
 4527                        		.MNLIST
2117
 4528  FE21EF  8A            		TXA
2118
 4529  FE21F0  F0 05         		BEQ	?28
2119
 4530  FE21F2  A2 0A         	?26:	LDX	#$0A		; floating point read error
2120
 4531  FE21F4  20 C0 31      		JSR	L0FAA
2121
 4532  FE21F7  A5 2D         	?28:	LDA	$2D
2122
 4533  FE21F9  38            		SEC
2123
 4534  FE21FA  E9 04         		SBC	#$04
2124
 4535  FE21FC  85 2D         		STA	$2D
2125
 4536  FE21FE  B0 02         		BCS	?30
2126
 4537  FE2200  C6 2E         		DEC	$2E
2127
 4538  FE2202  A4 2E         	?30:	LDY	$2E
2128
 4539  FE2204  AA            		TAX
2129
 4540  FE2205  20 92 97      		JSR	XBBD4
2130
 4541  FE2208  A5 27         		LDA	$27
2131
 4542  FE220A  20 8F 30      		JSR	L17B7
2132
 4543  FE220D  4C CC FF      		JMP	FCLRCH
2133
 4544
2134
 4545                        	PC1E:	; $2825 - $2E07
2135
 4546                        		; write float number to text file - float point format
2136
 4547  FE2210  B1 2D         		LDA	($2D),Y
2137
 4548  FE2212  30 02         		BMI	?02
2138
 4549  FE2214  D0 02         		BNE	?04
2139
 4550  FE2216  A9 01         	?02:	LDA 	#$01
2140
 4551  FE2218  48            	?04:	PHA
2141
 4552  FE2219  A0 0A         		LDY	#$0A
2142
 4553  FE221B  20 85 30      		JSR	L17AD
2143
 4554  FE221E  20 25 32      		JSR 	L0EA8
2144
 4555  FE2221  A5 2D         		LDA 	$2D
2145
 4556  FE2223  18            		CLC
2146
 4557  FE2224  69 04         		ADC	#$04
2147
 4558  FE2226  A4 2E         		LDY	$2E
2148
 4559  FE2228  90 01         		BCC	?06
2149
 4560  FE222A  C8            		INY
2150
 4561  FE222B  20 33 97      	?06:	JSR	XBBA2
2151
 4562  FE222E  A5 66         		LDA	$66
2152
 4563  FE2230  48            		PHA
2153
 4564  FE2231  20 EC 22      		JSR	L2891
2154
 4565  FE2234  68            		PLA
2155
 4566  FE2235  85 66         		STA	$66
2156
 4567  FE2237  68            		PLA
2157
 4568  FE2238  85 25         		STA	$25
2158
 4569  FE223A  18            		CLC
2159
 4570  FE223B  65 48         		ADC	tmpv2
2160
 4571  FE223D  30 02         		BMI	?08
2161
 4572  FE223F  D0 02         		BNE	?10
2162
 4573  FE2241  A9 01         	?08:	LDA	#$01
2163
 4574  FE2243  85 23         	?10:	STA	$23
2164
 4575  FE2245  20 55 23      		JSR	L290B
2165
 4576  FE2248  90 02         		BCC	?12
2166
 4577  FE224A  E6 48         		INC	tmpv2
2167
 4578  FE224C  A5 48         	?12:	LDA	tmpv2
2168
 4579  FE224E  85 23         		STA	$23
2169
 4580  FE2250  C9 01         		CMP	#$01
2170
 4581  FE2252  10 02         		BPL	?14
2171
  Tue Jul 17 11:00:23 2018                                                                                               Page   36
2172
 
2173
 
2174
 
2175
 
2176
 4582  FE2254  A9 01         		LDA	#$01
2177
 4583  FE2256  18            	?14:	CLC
2178
 4584  FE2257  65 25         		ADC	$25
2179
 4585  FE2259  69 02         		ADC	#$02
2180
 4586  FE225B  A0 02         		LDY	#$02
2181
 4587  FE225D  38            		SEC
2182
 4588  FE225E  F1 2D         		SBC	($2D),Y
2183
 4589  FE2260  AA            		TAX
2184
 4590  FE2261  10 08         		BPL	?18
2185
 4591  FE2263  A9 20         		LDA	#$20
2186
 4592  FE2265  20 E3 32      	?16:	JSR	L0EC4
2187
 4593  FE2268  E8            		INX
2188
 4594  FE2269  D0 FA         		BNE	?16
2189
 4595  FE226B  20 2A 33      	?18:	JSR	L29B6
2190
 4596  FE226E  20 92 23      		JSR	L2948
2191
 4597  FE2271  20 CC FF      		JSR	FCLRCH
2192
 4598  FE2274  A9 0C         		LDA	#$0C
2193
 4599  FE2276  4C 7B 27      		JMP	L155E
2194
 4600
2195
 4601                        	PC1F:	; $27AC - $2D8E
2196
 4602                        		; write float number to text file - exponential format
2197
 4603  FE2279  B1 2D         		LDA 	($2D),Y
2198
 4604  FE227B  48            		PHA
2199
 4605  FE227C  A5 2D         		LDA 	$2D
2200
 4606  FE227E  18            		CLC
2201
 4607  FE227F  69 02         		ADC 	#$02
2202
 4608  FE2281  A4 2E         		LDY 	$2E
2203
 4609  FE2283  90 01         		BCC	?02
2204
 4610  FE2285  C8            		INY
2205
 4611  FE2286  20 33 97      	?02:	JSR	XBBA2
2206
 4612  FE2289  A0 08         		LDY	#$08
2207
 4613  FE228B  20 85 30      		JSR 	L17AD
2208
 4614  FE228E  20 25 32      		JSR	L0EA8
2209
 4615  FE2291  20 2A 33      		JSR	L29B6
2210
 4616  FE2294  20 EC 22      		JSR	L2891
2211
 4617  FE2297  68            		PLA
2212
 4618  FE2298  38            		SEC
2213
 4619  FE2299  E9 06         		SBC	#$06
2214
 4620  FE229B  C9 02         		CMP	#$02
2215
 4621  FE229D  10 02         		BPL	?04
2216
 4622  FE229F  A9 02         		LDA	#$02
2217
 4623  FE22A1  85 23         	?04:	STA	$23
2218
 4624  FE22A3  85 25         		STA	$25
2219
 4625  FE22A5  20 55 23      		JSR	L290B
2220
 4626  FE22A8  90 02         		BCC	?06
2221
 4627  FE22AA  E6 48         		INC	tmpv2
2222
 4628  FE22AC  C6 25         	?06:	DEC	$25
2223
 4629  FE22AE  A9 01         		LDA	#$01
2224
 4630  FE22B0  85 23         		STA	$23
2225
 4631  FE22B2  20 92 23      		JSR	L2948
2226
 4632  FE22B5  A9 45         		LDA	#$45
2227
 4633  FE22B7  20 E3 32      		JSR	L0EC4
2228
 4634  FE22BA  C6 48         		DEC	tmpv2
2229
 4635  FE22BC  A9 2B         		LDA	#$2B
2230
 4636  FE22BE  24 48         		BIT	tmpv2
2231
 4637  FE22C0  10 09         		BPL	?08
2232
 4638  FE22C2  A9 00         		LDA	#$00
2233
  Tue Jul 17 11:00:23 2018                                                                                               Page   37
2234
 
2235
 
2236
 
2237
 
2238
 4639  FE22C4  38            		SEC
2239
 4640  FE22C5  E5 48         		SBC	tmpv2
2240
 4641  FE22C7  85 48         		STA	tmpv2
2241
 4642  FE22C9  A9 2D         		LDA	#$2D
2242
 4643  FE22CB  20 E3 32      	?08:	JSR	L0EC4
2243
 4644  FE22CE  A2 2F         		LDX	#$2F
2244
 4645  FE22D0  A5 48         		LDA	tmpv2
2245
 4646  FE22D2  E8            	?10:	INX
2246
 4647  FE22D3  38            		SEC
2247
 4648  FE22D4  E9 0A         		SBC	#$0A
2248
 4649  FE22D6  10 FA         		BPL	?10
2249
 4650  FE22D8  48            		PHA
2250
 4651  FE22D9  8A            		TXA
2251
 4652  FE22DA  20 E3 32      		JSR	L0EC4
2252
 4653  FE22DD  68            		PLA
2253
 4654  FE22DE  18            		CLC
2254
 4655  FE22DF  69 3A         		ADC	#$3A
2255
 4656  FE22E1  20 E3 32      		JSR	L0EC4
2256
 4657  FE22E4  20 CC FF      		JSR	FCLRCH
2257
 4658  FE22E7  A9 0A         		LDA	#$0A
2258
 4659  FE22E9  4C 7B 27      		JMP	L155E
2259
 4660
2260
 4661                        	L2891:	; $2891 - $2E73
2261
 4662  FE22EC  A9 00         		LDA	#$00
2262
 4663  FE22EE  85 48         		STA	tmpv2
2263
 4664  FE22F0  A5 61         	?02:	LDA 	$61
2264
 4665  FE22F2  F0 16         		BEQ	?06
2265
 4666  FE22F4  30 07         		BMI	?04
2266
 4667  FE22F6  20 6A 96      		JSR	XBAE2		; mult * 10
2267
 4668  FE22F9  C6 48         		DEC	tmpv2
2268
 4669  FE22FB  80 F3         		bra	?02
2269
 4670  FE22FD  A5 61         	?04:	LDA	$61
2270
 4671  FE22FF  C9 81         		CMP	#$81
2271
 4672  FE2301  90 07         		BCC	?06
2272
 4673  FE2303  20 81 96      		JSR	XBAFE		; div / 10
2273
 4674  FE2306  E6 48         		INC	tmpv2
2274
 4675  FE2308  80 F3         		bra	?04
2275
 4676  FE230A                	?06:
2276
 4677  FE230A  A5 61         	?07:	LDA	$61
2277
 4678  FE230C  30 0C         		BMI	?08
2278
 4679  FE230E  46 62         		LSR	$62
2279
 4680  FE2310  66 63         		ROR	$63
2280
 4681  FE2312  66 64         		ROR	$64
2281
 4682  FE2314  66 65         		ROR	$65
2282
 4683  FE2316  E6 61         		INC	$61
2283
 4684  FE2318  10 F0         		BPL	?07
2284
 4685  FE231A  A2 09         	?08:	LDX	#$09
2285
 4686  FE231C  A9 00         		LDA 	#$00
2286
 4687  FE231E  9D 5A FF      	?10:	STA	!MNUMSTR,X
2287
 4688  FE2321  CA            		DEX
2288
 4689  FE2322  10 FA         		BPL	?10
2289
 4690  FE2324  A0 20         		LDY	#$20
2290
 4691  FE2326  A2 00         	?12:	LDX	#$00
2291
 4692  FE2328  5E 5A FF      	?14:	LSR	!MNUMSTR,X
2292
 4693  FE232B  E8            		INX
2293
 4694  FE232C  08            		PHP
2294
 4695  FE232D  E0 0A         		CPX	#$0A
2295
  Tue Jul 17 11:00:23 2018                                                                                               Page   38
2296
 
2297
 
2298
 
2299
 
2300
 4696  FE232F  F0 0D         		BEQ	?16
2301
 4697  FE2331  28            		PLP
2302
 4698  FE2332  90 F4         		BCC	?14
2303
 4699  FE2334  BD 5A FF      		LDA	!MNUMSTR,X
2304
 4700  FE2337  69 09         		ADC	#$09
2305
 4701  FE2339  9D 5A FF      		STA	!MNUMSTR,X
2306
 4702  FE233C  D0 EA         		BNE	?14
2307
 4703  FE233E  28            	?16:	PLP
2308
 4704  FE233F  46 62         		LSR	$62
2309
 4705  FE2341  66 63         		ROR	$63
2310
 4706  FE2343  66 64         		ROR	$64
2311
 4707  FE2345  66 65         		ROR	$65
2312
 4708  FE2347  90 08         		BCC	?18
2313
 4709  FE2349  AD 5A FF      		LDA	!MNUMSTR
2314
 4710  FE234C  69 04         		ADC	#$04
2315
 4711  FE234E  8D 5A FF      		STA	!MNUMSTR
2316
 4712  FE2351  88            	?18:	DEY
2317
 4713  FE2352  D0 D2         		BNE	?12
2318
 4714  FE2354  60            		RTS
2319
 4715  FE2355
2320
 4716                        	L290B:	; $290B - $2EED
2321
 4717  FE2355  A5 23         		LDA	$23
2322
 4718  FE2357  30 25         		BMI	?06
2323
 4719  FE2359  F0 23         		BEQ	?06
2324
 4720  FE235B  C9 0A         		CMP	#$0A
2325
 4721  FE235D  B0 1F         		BCS	?06
2326
 4722  FE235F  AA            		TAX
2327
 4723  FE2360  BD 5A FF      		LDA	!MNUMSTR,X
2328
 4724  FE2363  18            		CLC
2329
 4725  FE2364  69 05         		ADC	#$05
2330
 4726  FE2366  9D 5A FF      		STA	!MNUMSTR,X
2331
 4727  FE2369  BD 5A FF      	?02:	LDA	!MNUMSTR,X
2332
 4728  FE236C  38            		SEC
2333
 4729  FE236D  E9 0A         		SBC	#$0A
2334
 4730  FE236F  30 0A         		BMI	?04
2335
 4731  FE2371  9D 5A FF      		STA	!MNUMSTR,X
2336
 4732  FE2374  CA            		DEX
2337
 4733  FE2375  30 09         		BMI	?10
2338
 4734  FE2377  FE 5A FF      		INC	!MNUMSTR,X
2339
 4735  FE237A  E8            		INX
2340
 4736  FE237B  CA            	?04:	DEX
2341
 4737  FE237C  10 EB         		BPL	?02
2342
 4738  FE237E  18            	?06:	CLC
2343
 4739  FE237F  60            	?08:	RTS
2344
 4740  FE2380  A6 23         	?10:	LDX	$23
2345
 4741  FE2382  38            	?12:	SEC
2346
 4742  FE2383  A9 01         		LDA	#$01
2347
 4743  FE2385  CA            		DEX
2348
 4744  FE2386  30 F7         		BMI	?08
2349
 4745  FE2388  F0 03         		BEQ	?14
2350
 4746  FE238A  BD 59 FF      		LDA	!MNUMSTR-1,X
2351
 4747  FE238D  9D 5A FF      	?14:	STA	!MNUMSTR,X
2352
 4748  FE2390  B0 F0         		BCS	?12		; here always CF = 1
2353
 4749
2354
 4750                        	L2948:	; $2948 - $2F2A
2355
 4751  FE2392  A2 00         		LDX	#$00
2356
 4752  FE2394  A5 23         		LDA	$23
2357
  Tue Jul 17 11:00:23 2018                                                                                               Page   39
2358
 
2359
 
2360
 
2361
 
2362
 4753  FE2396  F0 1D         		BEQ	?06
2363
 4754  FE2398  30 1B         		BMI	?06
2364
 4755  FE239A  A9 00         	?02:	LDA	#$00
2365
 4756  FE239C  E0 0A         		CPX	#$0A
2366
 4757  FE239E  F0 04         		BEQ	?04
2367
 4758  FE23A0  BD 5A FF      		LDA	!MNUMSTR,X		; buffer
2368
 4759  FE23A3  E8            		INX
2369
 4760  FE23A4  18            	?04:	CLC
2370
 4761  FE23A5  69 30         		ADC	#$30
2371
 4762  FE23A7  20 E3 32      		JSR	L0EC4
2372
 4763  FE23AA  C6 23         		DEC	$23
2373
 4764  FE23AC  D0 EC         		BNE	?02
2374
 4765  FE23AE  A9 2E         		LDA	#$2E
2375
 4766  FE23B0  20 E3 32      		JSR	L0EC4
2376
 4767  FE23B3  80 31         		bra	?12
2377
 4768  FE23B5  A9 30         	?06:	LDA	#$30
2378
 4769  FE23B7  20 E3 32      		JSR	L0EC4
2379
 4770  FE23BA  A9 2E         		LDA	#$2E
2380
 4771  FE23BC  20 E3 32      		JSR	L0EC4
2381
 4772  FE23BF  A9 00         		LDA	#$00
2382
 4773  FE23C1  38            		SEC
2383
 4774  FE23C2  E5 23         		SBC	$23
2384
 4775  FE23C4  85 23         		STA	$23
2385
 4776  FE23C6  F0 1E         		BEQ	?12
2386
 4777  FE23C8  A5 25         		LDA	$25
2387
 4778  FE23CA  38            		SEC
2388
 4779  FE23CB  E5 23         		SBC 	$23
2389
 4780  FE23CD  C9 01         		CMP 	#$01
2390
 4781  FE23CF  10 06         		BPL	?08
2391
 4782  FE23D1  A5 25         		LDA	$25
2392
 4783  FE23D3  85 23         		STA 	$23
2393
 4784  FE23D5  A9 00         		LDA	#$00
2394
 4785  FE23D7  85 25         	?08:	STA	$25
2395
 4786  FE23D9  A5 23         		LDA	$23
2396
 4787  FE23DB  F0 09         		BEQ	?12
2397
 4788  FE23DD  A9 30         		LDA	#$30
2398
 4789  FE23DF  20 E3 32      	?10:	JSR	L0EC4
2399
 4790  FE23E2  C6 23         		DEC	$23
2400
 4791  FE23E4  D0 F9         		BNE	?10
2401
 4792  FE23E6  A5 25         	?12:	LDA	$25
2402
 4793  FE23E8  F0 14         		BEQ	?18
2403
 4794  FE23EA  A9 00         	?14:	LDA	#$00
2404
 4795  FE23EC  E0 0A         		CPX	#$0A
2405
 4796  FE23EE  F0 04         		BEQ	?16
2406
 4797  FE23F0  BD 5A FF      		LDA	!MNUMSTR,X		; buffer
2407
 4798  FE23F3  E8            		INX
2408
 4799  FE23F4  18            	?16:	CLC
2409
 4800  FE23F5  69 30         		ADC	#$30
2410
 4801  FE23F7  20 E3 32      		JSR	L0EC4
2411
 4802  FE23FA  C6 25         		DEC	$25
2412
 4803  FE23FC  D0 EC         		BNE	?14
2413
 4804  FE23FE  60            	?18:	RTS
2414
 4805
2415
 4806                        	PC20:	; $2AC1 - $30A3
2416
 4807  FE23FF  20 62 24      		JSR 	L2B26
2417
 4808  FE2402  A0 04         		LDY 	#$04
2418
 4809                        	L2AC6:	; $2AC6 - $30A8
2419
  Tue Jul 17 11:00:23 2018                                                                                               Page   40
2420
 
2421
 
2422
 
2423
 
2424
 4810  FE2404  B1 2D         		LDA 	($2D),Y
2425
 4811  FE2406  85 27         		STA 	$27
2426
 4812  FE2408  C8            		INY
2427
 4813  FE2409  B1 2D         		LDA 	($2D),Y
2428
 4814  FE240B  85 28         		STA 	$28
2429
 4815  FE240D  85 23         		STA 	$23
2430
 4816  FE240F  10 0D         		BPL 	?02
2431
 4817  FE2411  A9 00         		LDA 	#$00
2432
 4818  FE2413  38            		SEC
2433
 4819  FE2414  E5 27         		SBC 	$27
2434
 4820  FE2416  85 27         		STA 	$27
2435
 4821  FE2418  A9 00         		LDA 	#$00
2436
 4822  FE241A  E5 28         		SBC 	$28
2437
 4823  FE241C  85 28         		STA 	$28
2438
 4824  FE241E  A9 00         	?02:	LDA 	#$00
2439
 4825  FE2420  88            		DEY
2440
 4826  FE2421  91 2D         		STA 	($2D),Y
2441
 4827  FE2423  88            		DEY
2442
 4828  FE2424  91 2D         		STA 	($2D),Y
2443
 4829  FE2426  A2 90         		LDX 	#$90
2444
 4830  FE2428  24 28         	?04:	BIT 	$28
2445
 4831  FE242A  30 09         		BMI 	?06
2446
 4832  FE242C  06 27         		ASL 	$27
2447
 4833  FE242E  26 28         		ROL 	$28
2448
 4834  FE2430  CA            		DEX
2449
 4835  FE2431  30 F5         		BMI 	?04
2450
 4836  FE2433  A2 00         		LDX 	#$00
2451
 4837  FE2435  88            	?06:	DEY
2452
 4838  FE2436  A5 27         		LDA 	$27
2453
 4839  FE2438  91 2D         		STA 	($2D),Y
2454
 4840  FE243A  A5 28         		LDA 	$28
2455
 4841  FE243C  24 23         		BIT 	$23
2456
 4842  FE243E  30 02         		BMI 	?08
2457
 4843  FE2440  29 7F         		AND 	#$7F
2458
 4844  FE2442  88            	?08:	DEY
2459
 4845  FE2443  91 2D         		STA 	($2D),Y
2460
 4846  FE2445  8A            		TXA
2461
 4847  FE2446  88            		DEY
2462
 4848  FE2447  91 2D         		STA 	($2D),Y
2463
 4849  FE2449  60            		rts
2464
 4850
2465
 4851                        	PC21:	; $2B0E - $30F0
2466
 4852  FE244A  20 62 24      		JSR 	L2B26
2467
 4853  FE244D  C8            	?01:	INY
2468
 4854  FE244E  C8            		INY
2469
 4855  FE244F  C8            		INY
2470
 4856  FE2450  C8            		INY
2471
 4857  FE2451  B1 2D         		LDA 	($2D),Y
2472
 4858  FE2453  88            		DEY
2473
 4859  FE2454  88            		DEY
2474
 4860  FE2455  88            		DEY
2475
 4861  FE2456  88            		DEY
2476
 4862  FE2457  91 2D         		STA 	($2D),Y
2477
 4863  FE2459  C8            		INY
2478
 4864  FE245A  C0 06         		CPY 	#$06
2479
 4865  FE245C  D0 EF         		BNE 	?01
2480
 4866  FE245E  A0 0A         		LDY 	#$0A
2481
  Tue Jul 17 11:00:23 2018                                                                                               Page   41
2482
 
2483
 
2484
 
2485
 
2486
 4867  FE2460  D0 A2         		BNE 	L2AC6
2487
 4868
2488
 4869                        	L2B26:	; $2B26 - $3108
2489
 4870  FE2462  A5 2D         		LDA 	$2D
2490
 4871  FE2464  38            		SEC
2491
 4872  FE2465  E9 04         		SBC 	#$04
2492
 4873  FE2467  85 2D         		STA 	$2D
2493
 4874  FE2469  B0 02         		BCS 	?01
2494
 4875  FE246B  C6 2E         		DEC 	$2E
2495
 4876  FE246D  60            	?01:	RTS
2496
 4877
2497
 4878                        	PC22:	; $2B90 - $3172
2498
 4879  FE246E  20 FE 24      		JSR 	L2BA8
2499
 4880  FE2471  20 0D 25      		JSR 	L2C0C
2500
 4881  FE2474  20 0C 94      		JSR 	XB86A
2501
 4882  FE2477  80 20         		bra	L2BF3
2502
 4883
2503
 4884                        	PC23:	; $2B9C - $317E
2504
 4885  FE2479  20 FE 24      		JSR 	L2BA8
2505
 4886  FE247C  20 0D 25      		JSR 	L2C0C
2506
 4887  FE247F  20 F6 93      		JSR 	XB853
2507
 4888  FE2482  80 15         		bra	L2BF3
2508
 4889
2509
 4890                        	PC24:	; $2BDE - $31C0
2510
 4891  FE2484  A0 00         		LDY 	#$00
2511
 4892  FE2486  B1 2D         		LDA 	($2D),Y
2512
 4893  FE2488  49 80         		EOR 	#$80
2513
 4894  FE248A  30 07         		BMI 	?02
2514
 4895  FE248C  38            		SEC
2515
 4896  FE248D  A0 06         		LDY 	#$06
2516
 4897  FE248F  71 2D         		ADC 	($2D),Y
2517
 4898  FE2491  B0 32         		BCS 	er09
2518
 4899  FE2493  20 0D 25      	?02:	JSR 	L2C0C
2519
 4900  FE2496  20 E2 95      		JSR 	XBA2B
2520
 4901                        	L2BF3:	; $2BF3 - $31D5
2521
 4902  FE2499  A5 2D         		LDA 	$2D
2522
 4903  FE249B  18            		CLC
2523
 4904  FE249C  69 06         		ADC 	#$06
2524
 4905  FE249E  85 2D         		STA 	$2D
2525
 4906  FE24A0  90 02         		BCC 	?02
2526
 4907  FE24A2  E6 2E         		INC 	$2E
2527
 4908  FE24A4  A4 2E         	?02:	LDY 	$2E
2528
 4909  FE24A6  AA            		TAX
2529
 4910  FE24A7  4C 92 97      		JMP 	XBBD4
2530
 4911
2531
 4912                        	PC25:	; $2BB7 - $3199
2532
 4913  FE24AA  B1 2D         		LDA 	($2D),Y
2533
 4914  FE24AC  F0 17         		BEQ 	er09
2534
 4915  FE24AE  A0 06         		LDY 	#$06
2535
 4916  FE24B0  B1 2D         		LDA 	($2D),Y
2536
 4917  FE24B2  A0 00         		LDY 	#$00
2537
 4918  FE24B4  38            		SEC
2538
 4919  FE24B5  F1 2D         		SBC 	($2D),Y
2539
 4920  FE24B7  90 04         		BCC 	?02
2540
 4921  FE24B9  69 81         		ADC 	#$81
2541
 4922  FE24BB  B0 08         		BCS 	er09
2542
 4923  FE24BD  20 0D 25      	?02:	JSR 	L2C0C
2543
  Tue Jul 17 11:00:23 2018                                                                                               Page   42
2544
 
2545
 
2546
 
2547
 
2548
 4924  FE24C0  20 94 96      		JSR 	XBB12
2549
 4925  FE24C3  80 D4         		bra 	L2BF3
2550
 4926
2551
 4927  FE24C5                	er09:
2552
 4928  FE24C5  A2 09         		LDX 	#$09		; floating point overflow
2553
 4929  FE24C7  4C 50 1B      		JMP 	vpmerr
2554
 4930
2555
 4931                        	PC26:	; $2C41 - $3223
2556
 4932  FE24CA  20 21 25      		JSR 	L2C4A
2557
 4933  FE24CD  C9 FF         		CMP 	#$FF
2558
 4934  FE24CF  F0 10         		BEQ 	L2C25
2559
 4935  FE24D1  D0 12         		BNE 	L2C28
2560
 4936
2561
 4937                        	PC27:	; $2C38 - $321A
2562
 4938  FE24D3  20 21 25      		JSR 	L2C4A
2563
 4939  FE24D6  C9 01         		CMP 	#$01
2564
 4940  FE24D8  F0 07         		BEQ 	L2C25
2565
 4941  FE24DA  D0 09         		BNE 	L2C28
2566
 4942
2567
 4943                        	PC28:	; $2C20 - $3202
2568
 4944  FE24DC  20 21 25      		JSR 	L2C4A
2569
 4945  FE24DF  F0 04         		BEQ 	L2C28
2570
 4946                        	L2C25:	; $2C25 - $3207
2571
 4947  FE24E1  A9 00         		LDA 	#$00
2572
 4948  FE24E3  80 02         		bra	L2C2A
2573
 4949                        	L2C28:	; $2C28 - $320A
2574
 4950  FE24E5  A9 01         		lda	#$01
2575
 4951  FE24E7                	L2C2A:
2576
 4952  FE24E7  A0 0A         		LDY 	#$0A
2577
 4953  FE24E9  91 2D         		STA 	($2D),Y
2578
 4954  FE24EB  C8            		INY
2579
 4955  FE24EC  A9 00         		LDA 	#$00
2580
 4956  FE24EE  91 2D         		STA 	($2D),Y
2581
 4957  FE24F0  A9 0A         		LDA 	#$0A
2582
 4958  FE24F2  4C 7B 27      		JMP 	L155E
2583
 4959
2584
 4960                        	PC29:	; $2BD3 - $31B5
2585
 4961  FE24F5  A0 01         		LDY 	#$01
2586
 4962  FE24F7  B1 2D         		LDA 	($2D),Y
2587
 4963  FE24F9  49 80         		EOR 	#$80
2588
 4964  FE24FB  91 2D         		STA 	($2D),Y
2589
 4965  FE24FD  60            		rts
2590
 4966
2591
 4967                        	L2BA8:	; $2BA8 - $318A
2592
 4968  FE24FE  B1 2D         		LDA 	($2D),Y
2593
 4969  FE2500  C9 FF         		CMP 	#$FF
2594
 4970  FE2502  F0 C1         		BEQ 	er09
2595
 4971  FE2504  A0 06         		LDY 	#$06
2596
 4972  FE2506  B1 2D         		LDA 	($2D),Y
2597
 4973  FE2508  C9 FF         		CMP 	#$FF
2598
 4974  FE250A  F0 B9         		BEQ 	er09
2599
 4975  FE250C  60            		RTS
2600
 4976
2601
 4977                        	L2C0C:	; $2C0C - $31EE
2602
 4978  FE250D  A5 2D         		LDA 	$2D
2603
 4979  FE250F  A4 2E         		LDY 	$2E
2604
 4980  FE2511  20 33 97      		JSR 	XBBA2
2605
  Tue Jul 17 11:00:23 2018                                                                                               Page   43
2606
 
2607
 
2608
 
2609
 
2610
 4981  FE2514  A5 2D         		LDA 	$2D
2611
 4982  FE2516  A4 2E         		LDY 	$2E
2612
 4983  FE2518  18            		CLC
2613
 4984  FE2519  69 06         		ADC 	#$06
2614
 4985  FE251B  90 01         		BCC 	?02
2615
 4986  FE251D  C8            		INY
2616
 4987  FE251E  4C 8D 93      	?02:	JMP 	XBA8C
2617
 4988
2618
 4989                        	L2C4A:	; $2C4A - $322C
2619
 4990  FE2521  A5 2D         		LDA 	$2D
2620
 4991  FE2523  18            		CLC
2621
 4992  FE2524  69 06         		ADC 	#$06
2622
 4993  FE2526  A4 2E         		LDY 	$2E
2623
 4994  FE2528  90 01         		BCC 	?01
2624
 4995  FE252A  C8            		INY
2625
 4996  FE252B  20 33 97      	?01:	JSR 	XBBA2
2626
 4997  FE252E  A5 2D         		LDA 	$2D
2627
 4998  FE2530  A4 2E         		LDY 	$2E
2628
 4999  FE2532  4C 1B 98      		JMP 	XBC5B
2629
 5000
2630
 5001                        	PC3A:	; $175B - $19E6
2631
 5002  FE2535  20 62 30      		JSR 	L17A3
2632
 5003  FE2538  A9 80         		LDA 	#$80
2633
 5004  FE253A  D0 05         		BNE 	L1749
2634
 5005
2635
 5006                        	PC2A:	; $1744 - $19CF
2636
 5007  FE253C  20 62 30      		JSR 	L17A3
2637
 5008  FE253F  A9 40         		LDA 	#$40
2638
 5009                        	L1749:	; $1749 - $19D4
2639
 5010  FE2541  A0 00         		LDY 	#$00
2640
 5011  FE2543  32 29         		AND 	($29)
2641
 5012  FE2545  F0 02         		BEQ 	?02
2642
 5013  FE2547  A9 01         		LDA 	#$01
2643
 5014  FE2549  92 2D         	?02:	STA 	($2D)
2644
 5015  FE254B  A9 00         		LDA 	#$00
2645
 5016  FE254D  C8            		INY
2646
 5017  FE254E  91 2D         		STA 	($2D),Y
2647
 5018  FE2550  60            		rts
2648
 5019
2649
 5020                        	PC2B:	; $2B32 - $3114
2650
 5021  FE2551  A5 2D         		LDA 	$2D
2651
 5022  FE2553  A4 2E         		LDY 	$2E
2652
 5023  FE2555  20 33 97      		JSR 	XBBA2
2653
 5024  FE2558  A5 2D         		LDA 	$2D
2654
 5025  FE255A  38            		SEC
2655
 5026  FE255B  E9 06         		SBC 	#$06
2656
 5027  FE255D  85 2D         		STA 	$2D
2657
 5028  FE255F  B0 02         		BCS 	?02
2658
 5029  FE2561  C6 2E         		DEC 	$2E
2659
 5030  FE2563  A4 2E         	?02:	LDY 	$2E
2660
 5031  FE2565  AA            		TAX
2661
 5032  FE2566  4C 92 97      		JMP 	XBBD4
2662
 5033
2663
 5034                        	PC2C:	; $2B4D - $312F
2664
 5035  FE2569  B1 2D         		LDA 	($2D),Y
2665
 5036  FE256B  38            		SEC
2666
 5037  FE256C  E9 06         		SBC 	#$06
2667
  Tue Jul 17 11:00:23 2018                                                                                               Page   44
2668
 
2669
 
2670
 
2671
 
2672
 5038  FE256E  AA            		TAX
2673
 5039  FE256F  C8            		INY
2674
 5040  FE2570  B1 2D         		LDA 	($2D),Y
2675
 5041  FE2572  E9 00         		SBC 	#$00
2676
 5042  FE2574  A8            		TAY
2677
 5043  FE2575  8A            		TXA
2678
 5044  FE2576  20 33 97      		JSR 	XBBA2
2679
 5045  FE2579  20 62 24      		JSR 	L2B26
2680
 5046  FE257C  A6 2D         		LDX 	$2D
2681
 5047  FE257E  A4 2E         		LDY 	$2E
2682
 5048  FE2580  4C 92 97      		JMP 	XBBD4
2683
 5049
2684
 5050                        	PC2D:	; $2B6A - $314C
2685
 5051  FE2583  A5 2D         		LDA 	$2D
2686
 5052  FE2585  A4 2E         		LDY 	$2E
2687
 5053  FE2587  20 33 97      		JSR 	XBBA2
2688
 5054  FE258A  A0 06         		LDY 	#$06
2689
 5055  FE258C  B1 2D         		LDA 	($2D),Y
2690
 5056  FE258E  38            		SEC
2691
 5057  FE258F  E9 06         		SBC 	#$06
2692
 5058  FE2591  AA            		TAX
2693
 5059  FE2592  C8            		INY
2694
 5060  FE2593  B1 2D         		LDA 	($2D),Y
2695
 5061  FE2595  E9 00         		SBC 	#$00
2696
 5062  FE2597  A8            		TAY
2697
 5063  FE2598  20 92 97      		JSR 	XBBD4
2698
 5064  FE259B  A9 08         		LDA 	#$08
2699
 5065  FE259D  18            		CLC
2700
 5066  FE259E  65 2D         		ADC 	$2D
2701
 5067  FE25A0  85 2D         		STA 	$2D
2702
 5068  FE25A2  90 02         		BCC 	?02
2703
 5069  FE25A4  E6 2E         		INC 	$2E
2704
 5070  FE25A6  60            	?02:	rts
2705
 5071
2706
 5072                        	PC2E:	; $14B1 - $173C
2707
 5073                        		; clear set variable (16 bytes)
2708
 5074  FE25A7  38            		SEC
2709
 5075  FE25A8  A5 2D         		LDA 	$2D
2710
 5076  FE25AA  E9 10         		SBC 	#$10
2711
 5077  FE25AC  85 2D         		STA 	$2D
2712
 5078  FE25AE  B0 02         		BCS 	?01
2713
 5079  FE25B0  C6 2E         		DEC 	$2E
2714
 5080  FE25B2  A0 0F         	?01:	LDY 	#$0F
2715
 5081  FE25B4  A9 00         		LDA 	#$00
2716
 5082  FE25B6  91 2D         	?02:	STA 	($2D),Y
2717
 5083  FE25B8  88            		DEY
2718
 5084  FE25B9  10 FB         		BPL 	?02
2719
 5085  FE25BB  60            		rts
2720
 5086
2721
 5087                        	PC2F:	; $14C8 - $1753
2722
 5088  FE25BC  B1 2D         		LDA 	($2D),Y
2723
 5089  FE25BE  85 21         		STA 	$21
2724
 5090  FE25C0  C8            		INY
2725
 5091  FE25C1  B1 2D         		LDA 	($2D),Y
2726
 5092  FE25C3  85 22         		STA 	$22
2727
 5093  FE25C5  20 CB 25      		JSR 	L1506
2728
 5094  FE25C8  4C 95 1E      		JMP 	SK02
2729
  Tue Jul 17 11:00:23 2018                                                                                               Page   45
2730
 
2731
 
2732
 
2733
 
2734
 5095  FE25CB
2735
 5096                        	L1506:	; $1506 - $1791
2736
 5097  FE25CB  A5 22         		LDA 	$22
2737
 5098  FE25CD  D0 1B         		BNE 	?04		; error
2738
 5099  FE25CF  A5 21         		LDA 	$21
2739
 5100  FE25D1  30 17         		BMI 	?04		; error
2740
 5101  FE25D3  4A            		LSR	a
2741
 5102  FE25D4  4A            		LSR	a
2742
 5103  FE25D5  4A            		LSR	a
2743
 5104  FE25D6  A8            		TAY
2744
 5105  FE25D7  C8            		INY
2745
 5106  FE25D8  C8            		INY
2746
 5107  FE25D9  A5 21         		LDA 	$21
2747
 5108  FE25DB  29 07         		AND 	#$07
2748
 5109  FE25DD  AA            		TAX
2749
 5110  FE25DE  A9 00         		LDA 	#$00
2750
 5111  FE25E0  38            		SEC
2751
 5112  FE25E1  2A            	?02:	ROL	a
2752
 5113  FE25E2  CA            		DEX
2753
 5114  FE25E3  10 FC         		BPL 	?02
2754
 5115  FE25E5  11 2D         		ORA 	($2D),Y
2755
 5116  FE25E7  91 2D         		STA 	($2D),Y
2756
 5117  FE25E9  60            		RTS
2757
 5118  FE25EA  A2 08         	?04:	LDX 	#$08		; error: set value error
2758
 5119  FE25EC  4C 50 1B      		JMP 	vpmerr
2759
 5120
2760
 5121                        	PC30:	; $14D7 - $1762
2761
 5122                        		; set variable
2762
 5123  FE25EF  B2 2D         		LDA 	($2D)
2763
 5124  FE25F1  85 23         		STA 	$23
2764
 5125  FE25F3                		ACC16
2765
 5126  FE25F3  C2 20         		rep	#PMFLAG
2766
 5127                        		.LONGA	on
2767
 5128                        		.MNLIST
2768
 5129  FE25F5  A0 02         		LDY 	#$02
2769
 5130  FE25F7  B1 2D         		LDA 	($2D),Y
2770
 5131  FE25F9  85 21         		STA 	$21
2771
 5132  FE25FB  C8            		INY
2772
 5133  FE25FC  A5 2D         		LDA 	$2D
2773
 5134  FE25FE  1A            		inc	a
2774
 5135  FE25FF  1A            		inc	a
2775
 5136  FE2600  85 2D         		STA 	$2D
2776
 5137  FE2602                		ACC08
2777
 5138  FE2602  E2 20         		sep	#PMFLAG
2778
 5139                        		.LONGA	off
2779
 5140                        		.MNLIST
2780
 5141  FE2604  A5 23         	?02:	LDA 	$23
2781
 5142  FE2606  C5 21         		CMP 	$21
2782
 5143  FE2608  90 0B         		BCC 	?04
2783
 5144  FE260A  20 CB 25      		JSR 	L1506
2784
 5145  FE260D  E6 21         		INC 	$21
2785
 5146  FE260F  D0 F3         		BNE 	?02
2786
 5147  FE2611  E6 22         		INC 	$22
2787
 5148  FE2613  80 EF         		bra	?02
2788
 5149  FE2615  4C 95 1E      	?04:	jmp	SK02
2789
 5150
2790
 5151                        	PC31:	; $152A - $17B5
2791
  Tue Jul 17 11:00:23 2018                                                                                               Page   46
2792
 
2793
 
2794
 
2795
 
2796
 5152                        		; operator 'or' for set variable
2797
 5153  FE2618  B1 2D         		LDA 	($2D),Y
2798
 5154  FE261A  99 C0 FF      		STA 	MMSET,Y		; (16 bytes)
2799
 5155  FE261D  C8            		INY
2800
 5156  FE261E  C0 10         		CPY 	#$10
2801
 5157  FE2620  D0 F6         		BNE 	PC31
2802
 5158  FE2622  B1 2D         	?02:	LDA 	($2D),Y
2803
 5159  FE2624  19 B0 FF      		ORA 	MMSET-16,Y
2804
 5160  FE2627  91 2D         		STA 	($2D),Y
2805
 5161  FE2629  C8            		INY
2806
 5162  FE262A  C0 20         		CPY 	#$20
2807
 5163  FE262C  D0 F4         		BNE 	?02
2808
 5164  FE262E  4C 82 20      		JMP 	L13B5
2809
 5165
2810
 5166                        	PC32:	; $xxxx - $29E2
2811
 5167  FE2631  24 97         		bit	runf
2812
 5168  FE2633  10 69         		bpl	PC32x
2813
 5169  FE2635  20 57 27      		JSR 	R29D7
2814
 5170  FE2638  B9 B0 FF      	?02:	LDA 	MMSET-16,Y
2815
 5171  FE263B  49 FF         		EOR 	#$FF
2816
 5172  FE263D  31 2D         		AND 	($2D),Y
2817
 5173  FE263F  91 2D         		STA 	($2D),Y
2818
 5174  FE2641  C8            		INY
2819
 5175  FE2642  C0 20         		CPY 	#$20
2820
 5176  FE2644  D0 F2         		BNE 	?02
2821
 5177  FE2646  F0 13         		BEQ 	R2A04
2822
 5178
2823
 5179                        	PC33:	; $xxxx - $29F5
2824
 5180  FE2648  24 97         		bit	runf
2825
 5181  FE264A  10 52         		bpl	PC32x
2826
 5182  FE264C  20 57 27      		JSR 	R29D7
2827
 5183  FE264F  B9 B0 FF      	?02:	LDA 	MMSET-16,Y
2828
 5184  FE2652  31 2D         		AND 	($2D),Y
2829
 5185  FE2654  91 2D         		STA 	($2D),Y
2830
 5186  FE2656  C8            		INY
2831
 5187  FE2657  C0 20         		CPY 	#$20
2832
 5188  FE2659  D0 F4         		BNE 	?02
2833
 5189  FE265B                	R2A04:
2834
 5190  FE265B  A9 10         		LDA 	#$10
2835
 5191  FE265D  4C 7B 27      		JMP	R17E9
2836
 5192  FE2660
2837
 5193                        	PC34:	; $xxxx - $298F
2838
 5194  FE2660  24 97         		bit	runf
2839
 5195  FE2662  10 3A         		bpl	PC32x
2840
 5196  FE2664  20 57 27      		JSR 	R29D7
2841
 5197  FE2667  B1 2D         	?02:	LDA 	($2D),Y
2842
 5198  FE2669  D9 B0 FF      		CMP 	MMSET-16,Y
2843
 5199  FE266C  D0 09         		BNE 	R29A1
2844
 5200  FE266E  C8            		INY
2845
 5201  FE266F  C0 20         		CPY 	#$20
2846
 5202  FE2671  D0 F4         		BNE 	?02
2847
 5203  FE2673  A9 01         	R299E:	LDA 	#$01
2848
 5204  FE2675  80 02         		bra	R29A3
2849
 5205  FE2677  A9 00         	R29A1:	lda	#$00
2850
 5206  FE2679  A0 1E         	R29A3:	LDY 	#$1E
2851
 5207  FE267B  91 2D         		STA 	($2D),Y
2852
 5208  FE267D  A9 00         		LDA 	#$00
2853
  Tue Jul 17 11:00:23 2018                                                                                               Page   47
2854
 
2855
 
2856
 
2857
 
2858
 5209  FE267F  C8            		INY
2859
 5210  FE2680  91 2D         		STA 	($2D),Y
2860
 5211  FE2682  A9 1E         		LDA 	#$1E
2861
 5212  FE2684  4C 7B 27      		JMP 	R17E9
2862
 5213
2863
 5214                        	PC35:	; $xxxx - $29C4
2864
 5215  FE2687  24 97         		bit	runf
2865
 5216  FE2689  10 13         		bpl	PC32x
2866
 5217  FE268B  20 57 27      		JSR 	R29D7
2867
 5218  FE268E  B9 B0 FF      	?02:	LDA 	MMSET-16,Y
2868
 5219  FE2691  49 FF         		EOR 	#$FF
2869
 5220  FE2693  31 2D         		AND 	($2D),Y
2870
 5221  FE2695  D0 E0         		BNE 	R29A1
2871
 5222  FE2697  C8            		INY
2872
 5223  FE2698  C0 20         		CPY 	#$20
2873
 5224  FE269A  D0 F2         		BNE 	?02
2874
 5225  FE269C  F0 D5         		BEQ 	R299E
2875
 5226
2876
 5227  FE269E                	PC32x:
2877
 5228  FE269E  4C 4E 1B      		JMP 	vpme07		; error: bad p-code
2878
 5229
2879
 5230                        	PC36:	; $xxxx - $29B1
2880
 5231  FE26A1  24 97         		bit	runf
2881
 5232  FE26A3  10 F9         		bpl	PC32x
2882
 5233  FE26A5  20 57 27      		JSR 	R29D7
2883
 5234  FE26A8  B1 2D         	?02:	LDA 	($2D),Y
2884
 5235  FE26AA  49 FF         		EOR 	#$FF
2885
 5236  FE26AC  39 B0 FF      		AND 	MMSET-16,Y
2886
 5237  FE26AF  D0 C6         		BNE 	R29A1
2887
 5238  FE26B1  C8            		INY
2888
 5239  FE26B2  C0 20         		CPY 	#$20
2889
 5240  FE26B4  D0 F2         		BNE 	?02
2890
 5241  FE26B6  F0 BB         		BEQ 	R299E
2891
 5242
2892
 5243                        	PC3C:	; $xxxx - $2B47
2893
 5244                        		; 'reset' for generic device
2894
 5245  FE26B8  24 97         		bit	runf
2895
 5246  FE26BA  10 E2         		bpl	PC32x		; error if compiler
2896
 5247  FE26BC  20 FA 26      		JSR 	R2B84		; open device
2897
 5248  FE26BF  A0 03         		LDY 	#$03
2898
 5249  FE26C1  B1 2D         		LDA 	($2D),Y		; high byte of secondary address
2899
 5250  FE26C3  D0 04         		BNE 	?02
2900
 5251  FE26C5  A9 A0         		LDA 	#$A0
2901
 5252  FE26C7  80 02         		bra	?04
2902
 5253  FE26C9  A9 A4         	?02:	lda	#$A4
2903
 5254  FE26CB  92 29         	?04:	STA 	($29)
2904
 5255  FE26CD                	R2B59:
2905
 5256  FE26CD  A5 2D         		LDA 	$2D
2906
 5257  FE26CF  18            		CLC
2907
 5258  FE26D0  69 08         		ADC 	#$08
2908
 5259  FE26D2  85 2D         		STA 	$2D
2909
 5260  FE26D4  90 02         		BCC 	?02
2910
 5261  FE26D6  E6 2E         		INC 	$2E
2911
 5262  FE26D8  60            	?02:	rts
2912
 5263
2913
 5264                        	PC3D:	; $xxxx - $2B67
2914
 5265                        		; 'rewrite' for generic device
2915
  Tue Jul 17 11:00:23 2018                                                                                               Page   48
2916
 
2917
 
2918
 
2919
 
2920
 5266  FE26D9  24 97         		bit	runf
2921
 5267  FE26DB  10 C1         		bpl	PC32x		; error if compiler
2922
 5268  FE26DD  20 FA 26      		JSR 	R2B84		; open device
2923
 5269  FE26E0  38            		SEC
2924
 5270  FE26E1  A5 29         		LDA 	$29
2925
 5271  FE26E3  E9 02         		SBC 	#$02
2926
 5272  FE26E5  85 29         		STA 	$29
2927
 5273  FE26E7  B0 02         		BCS 	?02
2928
 5274  FE26E9  C6 2A         		DEC 	$2A
2929
 5275  FE26EB  A0 00         	?02:	LDY 	#$00
2930
 5276  FE26ED  A9 20         		LDA 	#$20
2931
 5277  FE26EF  91 29         		STA 	($29),Y
2932
 5278  FE26F1  98            		TYA
2933
 5279  FE26F2  C8            		INY
2934
 5280  FE26F3  91 29         		STA 	($29),Y
2935
 5281  FE26F5  C8            		INY
2936
 5282  FE26F6  91 29         		STA 	($29),Y
2937
 5283  FE26F8  80 D3         		bra 	R2B59			; branch always
2938
 5284
2939
 5285                        	R2B84:	; $xxxx - $2BB4
2940
 5286                        		; setup params for generic device (rewrite or reset)
2941
 5287  FE26FA  64 3E         		STZ 	$3E
2942
 5288  FE26FC  B1 2D         		LDA 	($2D),Y		; offset 0: file name address
2943
 5289  FE26FE  85 BB         		STA 	$BB
2944
 5290  FE2700  C8            		INY
2945
 5291  FE2701  B1 2D         		LDA 	($2D),Y
2946
 5292  FE2703  85 BC         		STA 	$BC
2947
 5293  FE2705  A5 A1         		lda	tbnk
2948
 5294  FE2707  85 BD         		sta	$BD
2949
 5295  FE2709  C8            		INY
2950
 5296  FE270A  B1 2D         		LDA 	($2D),Y		; offset 2: secondary address
2951
 5297  FE270C  85 B9         		STA 	$B9
2952
 5298  FE270E  A0 04         		LDY 	#$04
2953
 5299  FE2710  B1 2D         		LDA 	($2D),Y		; offset 4: # device
2954
 5300  FE2712  85 BA         		STA 	$BA
2955
 5301  FE2714  A0 06         		LDY 	#$06
2956
 5302  FE2716  B1 2D         		LDA 	($2D),Y		; offset 6: file desc. ptr
2957
 5303  FE2718  38            		SEC
2958
 5304  FE2719  E9 03         		SBC 	#$03
2959
 5305  FE271B  91 2D         		STA 	($2D),Y
2960
 5306  FE271D  85 29         		STA 	$29
2961
 5307  FE271F  C8            		INY
2962
 5308  FE2720  B1 2D         		LDA 	($2D),Y
2963
 5309  FE2722  E9 00         		SBC 	#$00
2964
 5310  FE2724  91 2D         		STA 	($2D),Y
2965
 5311  FE2726  85 2A         		STA 	$2A
2966
 5312  FE2728  A0 02         		LDY 	#$02
2967
 5313  FE272A  91 29         		STA 	($29),Y
2968
 5314  FE272C  88            		DEY
2969
 5315  FE272D  A5 29         		LDA 	$29
2970
 5316  FE272F  91 29         		STA 	($29),Y
2971
 5317  FE2731  20 4B 32      		JSR 	R0F8D		; search file
2972
 5318  FE2734  A5 B8         		LDA 	$B8
2973
 5319  FE2736  30 05         		BMI 	?02		; not found
2974
 5320  FE2738  20 C3 FF      		JSR 	FCLOSE
2975
 5321  FE273B  80 03         		bra	?04
2976
 5322  FE273D  20 CE 31      	?02:	JSR 	R0F69		; open internal logic file
2977
  Tue Jul 17 11:00:23 2018                                                                                               Page   49
2978
 
2979
 
2980
 
2981
 
2982
 5323  FE2740  A5 3E         	?04:	LDA 	$3E
2983
 5324  FE2742  D0 1D         		BNE 	R29D7x		; if any error
2984
 5325  FE2744  A5 BB         		LDA 	$BB
2985
 5326  FE2746  05 BC         		ORA 	$BC
2986
 5327  FE2748  F0 08         		BEQ 	?08		; if no filename
2987
 5328  FE274A  A0 00         		LDY 	#$00
2988
 5329  FE274C  C8            	?06:	INY
2989
 5330  FE274D  B7 BB         		LDA 	[$BB],Y
2990
 5331  FE274F  D0 FB         		BNE 	?06
2991
 5332  FE2751  98            		TYA
2992
 5333  FE2752  85 B7         	?08:	STA 	$B7
2993
 5334  FE2754  4C C0 FF      		JMP 	FOPEN
2994
 5335
2995
 5336                        	R29D7:	; $xxxx - $29D7
2996
 5337  FE2757  B1 2D         		LDA 	($2D),Y
2997
 5338  FE2759  99 C0 FF      		STA 	MMSET,Y
2998
 5339  FE275C  C8            		INY
2999
 5340  FE275D  C0 10         		CPY 	#$10
3000
 5341  FE275F  D0 F6         		BNE 	R29D7
3001
 5342  FE2761  60            	R29D7x:	RTS
3002
 5343
3003
 5344                        	PC38:	; $1543 - $17CE
3004
 5345  FE2762  A0 10         		LDY 	#$10
3005
 5346  FE2764                		ACC16
3006
 5347  FE2764  C2 20         		rep	#PMFLAG
3007
 5348                        		.LONGA	on
3008
 5349                        		.MNLIST
3009
 5350  FE2766  B1 2D         		LDA 	($2D),Y
3010
 5351  FE2768  38            		SEC
3011
 5352  FE2769  E9 10 00      		SBC 	#$0010
3012
 5353  FE276C  85 27         		STA 	$27
3013
 5354  FE276E                		ACC08
3014
 5355  FE276E  E2 20         		sep	#PMFLAG
3015
 5356                        		.LONGA	off
3016
 5357                        		.MNLIST
3017
 5358  FE2770  A0 0F         		LDY 	#$0F
3018
 5359  FE2772  B1 2D         	?02:	LDA 	($2D),Y
3019
 5360  FE2774  91 27         		STA 	($27),Y
3020
 5361  FE2776  88            		DEY
3021
 5362  FE2777  10 F9         		BPL 	?02
3022
 5363  FE2779  A9 12         		LDA 	#$12
3023
 5364  FE277B                	R17E9:
3024
 5365                        	L155E:	; $155E - $17E9
3025
 5366  FE277B  18            		CLC
3026
 5367  FE277C  65 2D         		ADC 	$2D
3027
 5368  FE277E  85 2D         		STA 	$2D
3028
 5369  FE2780  90 02         		BCC 	?04
3029
 5370  FE2782  E6 2E         		INC 	$2E
3030
 5371  FE2784  60            	?04:	rts
3031
 5372
3032
 5373                        	PC39:	; $2A93 - $3075
3033
 5374                        		; return from real function
3034
 5375  FE2785  A5 2D         		LDA 	$2D
3035
 5376  FE2787  A4 2E         		LDY 	$2E
3036
 5377  FE2789  20 33 97      		JSR 	XBBA2
3037
 5378  FE278C                		ACC16
3038
 5379  FE278C  C2 20         		rep	#PMFLAG
3039
  Tue Jul 17 11:00:23 2018                                                                                               Page   50
3040
 
3041
 
3042
 
3043
 
3044
 5380                        		.LONGA	on
3045
 5381                        		.MNLIST
3046
 5382  FE278E  A5 2F         		LDA 	$2F
3047
 5383  FE2790  85 2D         		STA 	$2D
3048
 5384  FE2792  A0 02         		LDY 	#$02
3049
 5385  FE2794  B1 2D         		LDA 	($2D),Y
3050
 5386  FE2796  85 2F         		STA 	$2F
3051
 5387  FE2798  C8            		INY
3052
 5388  FE2799  C8            		INY
3053
 5389  FE279A  B1 2D         		LDA 	($2D),Y
3054
 5390  FE279C  85 2B         		STA 	$2B
3055
 5391  FE279E                		ACC08
3056
 5392  FE279E  E2 20         		sep	#PMFLAG
3057
 5393                        		.LONGA	off
3058
 5394                        		.MNLIST
3059
 5395  FE27A0  A6 2D         		LDX 	$2D
3060
 5396  FE27A2  A4 2E         		LDY 	$2E
3061
 5397  FE27A4  4C 92 97      		JMP 	XBBD4
3062
 5398
3063
 5399                        	PC52:	; $1B32 - $1DBD
3064
 5400  FE27A7                	PC53:
3065
 5401  FE27A7  20 17 2A      		JSR 	L1B8B
3066
 5402  FE27AA  80 0E         		bra	L19C1
3067
 5403
3068
 5404                        	PC58:	; $1B38 - $1DC3
3069
 5405  FE27AC                	PC59:
3070
 5406  FE27AC  A2 31         		LDX 	#$31
3071
 5407  FE27AE  A5 24         		LDA 	$24
3072
 5408  FE27B0  85 28         		STA 	$28
3073
 5409  FE27B2  A5 23         		LDA 	$23
3074
 5410  FE27B4  80 04         		bra	L19C1
3075
 5411
3076
 5412  FE27B6                	L19BD:
3077
 5413                        	PC80:	; $19BD - $1C48
3078
 5414  FE27B6  86 28         		STX 	$28
3079
 5415  FE27B8  A2 2F         		LDX 	#$2F
3080
 5416                        	L19C1:	; $19C1 - $1C4C
3081
 5417  FE27BA  0A            		ASL	a
3082
 5418  FE27BB  26 28         		ROL 	$28
3083
 5419  FE27BD  85 27         		STA 	$27
3084
 5420  FE27BF                		ACC16
3085
 5421  FE27BF  C2 20         		rep	#PMFLAG
3086
 5422                        		.LONGA	on
3087
 5423                        		.MNLIST
3088
 5424  FE27C1  A5 2D         		LDA 	$2D
3089
 5425  FE27C3  3A            		dec	a
3090
 5426  FE27C4  3A            		dec	a
3091
 5427  FE27C5  85 2D         		STA 	$2D
3092
 5428  FE27C7  B5 00         		LDA 	<$00,X
3093
 5429  FE27C9  38            		SEC
3094
 5430  FE27CA  E5 27         		SBC 	$27
3095
 5431  FE27CC  92 2D         		STA 	($2D)
3096
 5432  FE27CE                		ACC08
3097
 5433  FE27CE  E2 20         		sep	#PMFLAG
3098
 5434                        		.LONGA	off
3099
 5435                        		.MNLIST
3100
 5436  FE27D0  60            		rts
3101
  Tue Jul 17 11:00:23 2018                                                                                               Page   51
3102
 
3103
 
3104
 
3105
 
3106
 5437
3107
 5438                        	PC56:	; $1B26 - $1DB1
3108
 5439  FE27D1                	PC57:
3109
 5440  FE27D1  20 17 2A      		JSR 	L1B8B
3110
 5441  FE27D4  80 04         		bra	PC90a
3111
 5442
3112
 5443                        	PC90:	; $195B - $1BE6
3113
 5444  FE27D6  86 28         		STX 	$28
3114
 5445  FE27D8  A2 2F         		LDX 	#$2F
3115
 5446
3116
 5447                        	PC90a:	; $195F - $1BEA
3117
 5448  FE27DA  85 27         		STA 	$27
3118
 5449  FE27DC                		ACC16
3119
 5450  FE27DC  C2 20         		rep	#PMFLAG
3120
 5451                        		.LONGA	on
3121
 5452                        		.MNLIST
3122
 5453  FE27DE  E6 27         		INC 	$27
3123
 5454  FE27E0  06 27         		ASL 	$27
3124
 5455  FE27E2  38            		SEC
3125
 5456  FE27E3  B5 00         		LDA 	<$00,X
3126
 5457  FE27E5  E5 27         		SBC 	$27
3127
 5458  FE27E7  85 27         		STA 	$27
3128
 5459  FE27E9  A5 2D         		LDA 	$2D
3129
 5460  FE27EB  3A            		dec	a
3130
 5461  FE27EC  3A            		dec	a
3131
 5462  FE27ED  85 2D         		STA 	$2D
3132
 5463  FE27EF  B2 27         		LDA 	($27)
3133
 5464  FE27F1  92 2D         		STA 	($2D)
3134
 5465  FE27F3                		ACC08
3135
 5466  FE27F3  E2 20         		sep	#PMFLAG
3136
 5467                        		.LONGA	off
3137
 5468                        		.MNLIST
3138
 5469  FE27F5  60            		rts
3139
 5470
3140
 5471                        	PC54:	; 1B2C - $1DB7
3141
 5472  FE27F6                	PC55:
3142
 5473  FE27F6  20 17 2A      		JSR 	L1B8B
3143
 5474  FE27F9  80 0A         		bra	L19E6
3144
 5475
3145
 5476                        	PCE0:	; $198F - $1C1A
3146
 5477  FE27FB  86 28         		STX 	$28
3147
 5478  FE27FD  A2 31         		LDX 	#$31
3148
 5479  FE27FF  80 D9         		BRA 	PC90a
3149
 5480
3150
 5481                        	PCA0:	; $19E2 - $1C6D
3151
 5482  FE2801  86 28         		STX 	$28
3152
 5483  FE2803  A2 2F         		LDX 	#$2F
3153
 5484
3154
 5485  FE2805                	L19E6:
3155
 5486                        	PCA0a:	; $19E6 - $1C71
3156
 5487  FE2805  85 27         		STA 	$27
3157
 5488  FE2807                		ACC16
3158
 5489  FE2807  C2 20         		rep	#PMFLAG
3159
 5490                        		.LONGA	on
3160
 5491                        		.MNLIST
3161
 5492  FE2809  E6 27         		INC 	$27
3162
 5493  FE280B  06 27         		ASL 	$27
3163
  Tue Jul 17 11:00:23 2018                                                                                               Page   52
3164
 
3165
 
3166
 
3167
 
3168
 5494  FE280D  38            		SEC
3169
 5495  FE280E  B5 00         		LDA 	<$00,X
3170
 5496  FE2810  E5 27         		SBC 	$27
3171
 5497  FE2812  85 27         		STA 	$27
3172
 5498  FE2814  B2 2D         		LDA 	($2D)
3173
 5499  FE2816  92 27         		STA 	($27)
3174
 5500  FE2818  A5 2D         		LDA	$2D
3175
 5501  FE281A  1A            		inc	a
3176
 5502  FE281B  1A            		inc	a
3177
 5503  FE281C  85 2D         		STA	$2D
3178
 5504  FE281E                		ACC08
3179
 5505  FE281E  E2 20         		sep	#PMFLAG
3180
 5506                        		.LONGA	off
3181
 5507                        		.MNLIST
3182
 5508  FE2820  60            		rts
3183
 5509
3184
 5510                        	PCF0:	; $1A17 - $1CA2
3185
 5511  FE2821  86 28         		STX 	$28
3186
 5512  FE2823  A2 31         		LDX 	#$31
3187
 5513  FE2825  80 DE         		BRA 	PCA0a
3188
 5514
3189
 5515                        	PC4D:	; $1BB9 - $1E44
3190
 5516                        		; place a p-code pointer in stack
3191
 5517  FE2827
3192
 5518  FE2827  24 97         		bit	runf
3193
 5519  FE2829  30 0A         		bmi	?02
3194
 5520  FE282B  A5 24         		lda	$24
3195
 5521  FE282D  38            		sec
3196
 5522  FE282E  E9 30         		sbc	#>PCCDST
3197
 5523  FE2830  AA            		tax
3198
 5524  FE2831  A5 23         		lda	$23
3199
 5525  FE2833  80 04         		bra	PCB0
3200
 5526
3201
 5527  FE2835  A5 23         	?02:	LDA 	$23
3202
 5528  FE2837  A6 24         		LDX 	$24
3203
 5529
3204
 5530  FE2839                	L1945:
3205
 5531                        	PCB0:	; $1945 - $1BD0
3206
 5532                        		; push integer AX into stack
3207
 5533  FE2839  EB            		xba
3208
 5534  FE283A  8A            		txa			; byte high
3209
 5535  FE283B  EB            		xba
3210
 5536  FE283C                		CPU16
3211
 5537  FE283C  C2 30         		rep	#(PMFLAG.OR.PXFLAG)
3212
 5538                        		.LONGA	on
3213
 5539                        		.LONGI	on
3214
 5540                        		.MNLIST
3215
 5541  FE283E  A8            		tay
3216
 5542  FE283F  A5 2D         		LDA 	$2D
3217
 5543  FE2841  3A            		dec	a
3218
 5544  FE2842  3A            		dec	a
3219
 5545  FE2843  85 2D         		STA 	$2D
3220
 5546  FE2845  98            		tya
3221
 5547  FE2846  92 2D         		STA 	($2D)
3222
 5548  FE2848                		CPU08
3223
 5549  FE2848  E2 30         		sep	#(PMFLAG.OR.PXFLAG)
3224
 5550                        		.LONGA	off
3225
  Tue Jul 17 11:00:23 2018                                                                                               Page   53
3226
 
3227
 
3228
 
3229
 
3230
 5551                        		.LONGI	off
3231
 5552                        		.MNLIST
3232
 5553  FE284A  60            		rts
3233
 5554
3234
 5555                        	PCC0:	; $1995 - $1C20
3235
 5556  FE284B  85 27         		STA 	$27
3236
 5557  FE284D  86 28         		STX 	$28
3237
 5558  FE284F                		ACC16
3238
 5559  FE284F  C2 20         		rep	#PMFLAG
3239
 5560                        		.LONGA	on
3240
 5561                        		.MNLIST
3241
 5562  FE2851  E6 27         		INC 	$27
3242
 5563  FE2853  06 27         		ASL 	$27
3243
 5564  FE2855  38            		SEC
3244
 5565  FE2856  B2 2D         		LDA 	($2D)
3245
 5566  FE2858  E5 27         		SBC 	$27
3246
 5567  FE285A  85 27         		STA 	$27
3247
 5568  FE285C  B2 27         		LDA 	($27)
3248
 5569  FE285E  92 2D         		STA 	($2D)
3249
 5570  FE2860                		ACC08
3250
 5571  FE2860  E2 20         		sep	#PMFLAG
3251
 5572                        		.LONGA	off
3252
 5573                        		.MNLIST
3253
 5574  FE2862  60            		rts
3254
 5575  FE2863
3255
 5576                        	PCD0:	; $1A1D - $1CA8
3256
 5577  FE2863  86 28         		STX 	$28
3257
 5578  FE2865  85 27         		STA 	$27
3258
 5579  FE2867                		ACC16
3259
 5580  FE2867  C2 20         		rep	#PMFLAG
3260
 5581                        		.LONGA	on
3261
 5582                        		.MNLIST
3262
 5583  FE2869  E6 27         		INC 	$27
3263
 5584  FE286B  06 27         		ASL 	$27
3264
 5585  FE286D  38            		SEC
3265
 5586  FE286E  A0 02         		LDY 	#$02
3266
 5587  FE2870  B1 2D         		LDA 	($2D),Y
3267
 5588  FE2872  E5 27         		SBC 	$27
3268
 5589  FE2874  85 27         		STA 	$27
3269
 5590  FE2876  B2 2D         		LDA 	($2D)
3270
 5591  FE2878  92 27         		STA 	($27)
3271
 5592  FE287A  18            		CLC
3272
 5593  FE287B  A5 2D         		LDA 	$2D
3273
 5594  FE287D  69 04 00      		ADC 	#$0004
3274
 5595  FE2880  85 2D         		STA 	$2D
3275
 5596  FE2882                		ACC08
3276
 5597  FE2882  E2 20         		sep	#PMFLAG
3277
 5598                        		.LONGA	off
3278
 5599                        		.MNLIST
3279
 5600  FE2884  60            		rts
3280
 5601
3281
 5602                        	PC40:	; $156A - $17F5
3282
 5603                        		; absolute jmp to p-code - update p-code pointer
3283
 5604  FE2885                		ACC16
3284
 5605  FE2885  C2 20         		rep	#PMFLAG
3285
 5606                        		.LONGA	on
3286
 5607                        		.MNLIST
3287
  Tue Jul 17 11:00:23 2018                                                                                               Page   54
3288
 
3289
 
3290
 
3291
 
3292
 5608  FE2887  A5 23         		LDA 	$23
3293
 5609  FE2889  1A            		inc	a
3294
 5610  FE288A  F0 0E         		beq	?02
3295
 5611  FE288C  3A            		dec	a
3296
 5612  FE288D  A6 97         		ldx	runf
3297
 5613  FE288F  30 04         		bmi	?01
3298
 5614  FE2891  38            		sec
3299
 5615  FE2892  E9 00 30      		sbc	#PCCDST
3300
 5616  FE2895  85 2B         	?01:	STA 	$2B
3301
 5617  FE2897                		CPU08
3302
 5618  FE2897  E2 30         		sep	#(PMFLAG.OR.PXFLAG)
3303
 5619                        		.LONGA	off
3304
 5620                        		.LONGI	off
3305
 5621                        		.MNLIST
3306
 5622  FE2899  60            		rts
3307
 5623  FE289A  A2 0B         	?02:	LDX 	#$0B		; undefined goto
3308
 5624  FE289C                	_jer:	CPU08
3309
 5625  FE289C  E2 30         		sep	#(PMFLAG.OR.PXFLAG)
3310
 5626                        		.LONGA	off
3311
 5627                        		.LONGI	off
3312
 5628                        		.MNLIST
3313
 5629  FE289E  4C 50 1B      		JMP 	vpmerr
3314
 5630
3315
 5631                        	PC41:	; $1580 - $180B
3316
 5632                        		; absolute conditioned jmp to p-code  - update p-code pointer
3317
 5633  FE28A1  B2 2D         		LDA 	($2D)
3318
 5634  FE28A3  6A            		ROR	a
3319
 5635  FE28A4  B0 0F         		BCS 	?02
3320
 5636  FE28A6                		ACC16
3321
 5637  FE28A6  C2 20         		rep	#PMFLAG
3322
 5638                        		.LONGA	on
3323
 5639                        		.MNLIST
3324
 5640  FE28A8  A5 23         		LDA 	$23
3325
 5641  FE28AA  A6 97         		ldx	runf
3326
 5642  FE28AC  30 03         		bmi	?01
3327
 5643  FE28AE  E9 FF 2F      		sbc	#PCCDST-1	; here CF=0
3328
 5644  FE28B1  85 2B         	?01:	STA 	$2B
3329
 5645  FE28B3                		ACC08
3330
 5646  FE28B3  E2 20         		sep	#PMFLAG
3331
 5647                        		.LONGA	off
3332
 5648                        		.MNLIST
3333
 5649  FE28B5  4C 95 1E      	?02:	JMP 	SK02
3334
 5650
3335
 5651                        	PC42:	; $1590 - $181B
3336
 5652                        		; 'case' jmp table - update p-code pointer
3337
 5653  FE28B8  A2 06         		LDX 	#$06		; case error
3338
 5654  FE28BA  38            		SEC
3339
 5655  FE28BB  24 97         		bit	runf
3340
 5656  FE28BD                		ACC16
3341
 5657  FE28BD  C2 20         		rep	#PMFLAG
3342
 5658                        		.LONGA	on
3343
 5659                        		.MNLIST
3344
 5660  FE28BF  30 09         		bmi	?01
3345
 5661  FE28C1  A5 23         		lda	$23
3346
 5662  FE28C3  E9 00 30      		sbc	#PCCDST
3347
 5663  FE28C6  85 23         		sta	$23
3348
 5664  FE28C8  90 D2         		bcc	_jer
3349
  Tue Jul 17 11:00:23 2018                                                                                               Page   55
3350
 
3351
 
3352
 
3353
 
3354
 5665  FE28CA  B2 2D         	?01:	LDA 	($2D)
3355
 5666  FE28CC  F2 23         		SBC 	($23)
3356
 5667  FE28CE  85 27         		STA 	$27
3357
 5668  FE28D0  30 CA         		BMI 	_jer		; error
3358
 5669  FE28D2  A5 23         		LDA 	$23
3359
 5670  FE28D4  1A            		inc	a
3360
 5671  FE28D5  1A            		inc	a
3361
 5672  FE28D6  85 23         		STA 	$23
3362
 5673  FE28D8  B2 23         		LDA 	($23)
3363
 5674  FE28DA  38            		sec
3364
 5675  FE28DB  F2 2D         		SBC 	($2D)
3365
 5676  FE28DD  30 BD         		BMI 	_jer
3366
 5677  FE28DF  06 27         		ASL 	$27
3367
 5678  FE28E1  A5 23         		LDA 	$23
3368
 5679  FE28E3  65 27         		ADC 	$27
3369
 5680  FE28E5  85 27         		STA 	$27
3370
 5681  FE28E7  A0 02         		LDY 	#$02
3371
 5682  FE28E9  B1 27         		LDA 	($27),Y
3372
 5683  FE28EB  C9 00 FF      		cmp	#$FF00
3373
 5684  FE28EE  B0 AC         		bcs	_jer		; error
3374
 5685  FE28F0  A6 97         		ldx	runf
3375
 5686  FE28F2  30 03         		bmi	?02
3376
 5687  FE28F4  E9 FF 2F      		sbc	#PCCDST-1	; here CF=0
3377
 5688  FE28F7  85 2B         	?02:	STA 	$2B
3378
 5689  FE28F9                		ACC08
3379
 5690  FE28F9  E2 20         		sep	#PMFLAG
3380
 5691                        		.LONGA	off
3381
 5692                        		.MNLIST
3382
 5693  FE28FB  4C 95 1E      		JMP	SK02
3383
 5694
3384
 5695                        	PC43:	; $15F8 - $1883
3385
 5696  FE28FE  24 97         		bit	runf
3386
 5697  FE2900  30 07         		bmi	?02
3387
 5698  FE2902  38            		sec
3388
 5699  FE2903  A5 24         		lda	$24
3389
 5700  FE2905  E9 30         		sbc	#>PCCDST
3390
 5701  FE2907  85 24         		sta	$24
3391
 5702  FE2909  20 49 29      	?02:	JSR 	L15DB
3392
 5703  FE290C  4C 95 1E      		JMP 	SK02
3393
 5704
3394
 5705                        	PC44:	; $15FE - $1889
3395
 5706  FE290F  24 97         		bit	runf
3396
 5707  FE2911  30 07         		bmi	?01
3397
 5708  FE2913  38            		sec
3398
 5709  FE2914  A5 24         		lda	$24
3399
 5710  FE2916  E9 30         		sbc	#>PCCDST
3400
 5711  FE2918  85 24         		sta	$24
3401
 5712  FE291A  A2 04         	?01:	LDX 	#$04		; error: array index
3402
 5713  FE291C  20 B2 29      		JSR 	L1656
3403
 5714  FE291F  20 66 29      		JSR 	L1626
3404
 5715  FE2922  A0 00         		LDY 	#$00
3405
 5716  FE2924  B1 23         		LDA 	($23),Y
3406
 5717  FE2926  A0 02         		LDY 	#$02
3407
 5718  FE2928  51 23         		EOR 	($23),Y
3408
 5719  FE292A  4A            		LSR	a
3409
 5720  FE292B  B0 06         		BCS 	?02
3410
 5721  FE292D  E6 21         		INC 	$21
3411
  Tue Jul 17 11:00:23 2018                                                                                               Page   56
3412
 
3413
 
3414
 
3415
 
3416
 5722  FE292F  D0 02         		BNE 	?02
3417
 5723  FE2931  E6 22         		INC 	$22
3418
 5724  FE2933  18            	?02:	CLC
3419
 5725  FE2934  20 56 29      		JSR 	L15E8
3420
 5726  FE2937  4C 95 1E      		JMP 	SK02
3421
 5727
3422
 5728                        	PC45:	; $161E - $18A9
3423
 5729  FE293A  A2 05         		LDX 	#$05		; variable out of range
3424
 5730  FE293C  24 97         		bit	runf
3425
 5731  FE293E  30 72         		bmi	L1656
3426
 5732  FE2940  38            		sec
3427
 5733  FE2941  A5 24         		lda	$24
3428
 5734  FE2943  E9 30         		sbc	#>PCCDST
3429
 5735  FE2945  85 24         		sta	$24
3430
 5736  FE2947  80 69         		bra 	L1656
3431
 5737
3432
 5738                        	L15DB:	; $15DB - $1866
3433
 5739  FE2949                	R1866:
3434
 5740  FE2949  A2 04         		LDX 	#$04		; error: array index
3435
 5741  FE294B  20 B2 29      		JSR 	L1656
3436
 5742  FE294E  20 66 29      		JSR 	L1626
3437
 5743  FE2951  06 21         		ASL 	$21
3438
 5744  FE2953  26 22         		ROL 	$22
3439
 5745  FE2955  38            		SEC
3440
 5746                        	L15E8:	; $15E8 - $1873
3441
 5747  FE2956  A0 02         		LDY 	#$02
3442
 5748  FE2958  B1 2D         		LDA 	($2D),Y
3443
 5749  FE295A  E5 21         		SBC 	$21
3444
 5750  FE295C  91 2D         		STA 	($2D),Y
3445
 5751  FE295E  C8            		INY
3446
 5752  FE295F  B1 2D         		LDA 	($2D),Y
3447
 5753  FE2961  E5 22         		SBC 	$22
3448
 5754  FE2963  91 2D         		STA 	($2D),Y
3449
 5755  FE2965  60            		RTS
3450
 5756
3451
 5757                        	L1626:	; $1626 - $18B1
3452
 5758  FE2966  A0 02         		LDY 	#$02
3453
 5759  FE2968  38            		SEC
3454
 5760  FE2969                		ACC16
3455
 5761  FE2969  C2 20         		rep	#PMFLAG
3456
 5762                        		.LONGA	on
3457
 5763                        		.MNLIST
3458
 5764  FE296B  B1 23         		LDA 	($23),Y
3459
 5765  FE296D  F2 2D         		SBC 	($2D)
3460
 5766  FE296F  85 21         		STA 	$21
3461
 5767  FE2971                		ACC08
3462
 5768  FE2971  E2 20         		sep	#PMFLAG
3463
 5769                        		.LONGA	off
3464
 5770                        		.MNLIST
3465
 5771  FE2973  A0 04         		LDY 	#$04
3466
 5772  FE2975  B1 23         		LDA 	($23),Y
3467
 5773  FE2977  85 25         		STA 	$25
3468
 5774  FE2979  4A            		LSR	a
3469
 5775  FE297A  C8            		INY
3470
 5776  FE297B  11 23         		ORA 	($23),Y
3471
 5777  FE297D  F0 5E         		BEQ 	L1681
3472
 5778  FE297F  B1 23         		LDA 	($23),Y
3473
  Tue Jul 17 11:00:23 2018                                                                                               Page   57
3474
 
3475
 
3476
 
3477
 
3478
 5779  FE2981  85 26         		STA 	$26
3479
 5780  FE2983  A5 21         		LDA 	$21
3480
 5781  FE2985  85 23         		STA 	$23
3481
 5782  FE2987  A5 22         		LDA 	$22
3482
 5783  FE2989  85 24         		STA 	$24
3483
 5784                        		;;JMP 	imult
3484
 5785
3485
 5786                        	; mult integer $23-24 and $25-$26 and leave result in $21-$22
3486
 5787                        	; $17E3 - $1A6E
3487
 5788  FE298B                	imult:
3488
 5789  FE298B  A9 00         		LDA 	#$00
3489
 5790  FE298D  85 21         		STA 	$21
3490
 5791  FE298F  85 22         		STA 	$22
3491
 5792  FE2991  A2 10         		LDX 	#$10
3492
 5793  FE2993  66 24         	?02:	ROR 	$24
3493
 5794  FE2995  66 23         		ROR 	$23
3494
 5795  FE2997  90 10         		BCC 	?04
3495
 5796  FE2999  18            		CLC
3496
 5797  FE299A  A5 21         		LDA 	$21
3497
 5798  FE299C  65 25         		ADC 	$25
3498
 5799  FE299E  85 21         		STA 	$21
3499
 5800  FE29A0  A5 22         		LDA 	$22
3500
 5801  FE29A2  65 26         		ADC 	$26
3501
 5802  FE29A4  85 22         		STA 	$22
3502
 5803  FE29A6  90 01         		BCC 	?04
3503
 5804  FE29A8  60            		RTS
3504
 5805  FE29A9  06 25         	?04:	ASL 	$25
3505
 5806  FE29AB  26 26         		ROL 	$26
3506
 5807  FE29AD  CA            		DEX
3507
 5808  FE29AE  D0 E3         		BNE 	?02
3508
 5809  FE29B0  18            		CLC
3509
 5810  FE29B1  60            		RTS
3510
 5811
3511
 5812                        	L1656:	; $1656 - $18E1
3512
 5813                        		; enter with Y = 0
3513
 5814  FE29B2  B1 2D         		LDA 	($2D),Y
3514
 5815  FE29B4  D1 23         		CMP 	($23),Y
3515
 5816  FE29B6  C8            		INY
3516
 5817  FE29B7  B1 23         		LDA 	($23),Y
3517
 5818  FE29B9  49 80         		EOR 	#$80
3518
 5819  FE29BB  85 27         		STA 	$27
3519
 5820  FE29BD  B1 2D         		LDA 	($2D),Y
3520
 5821  FE29BF  49 80         		EOR 	#$80
3521
 5822  FE29C1  E5 27         		SBC 	$27
3522
 5823  FE29C3  90 19         		BCC 	L1682
3523
 5824  FE29C5  C8            		INY
3524
 5825  FE29C6  B1 23         		LDA 	($23),Y
3525
 5826  FE29C8  A0 00         		LDY 	#$00
3526
 5827  FE29CA  D1 2D         		CMP 	($2D),Y
3527
 5828  FE29CC  C8            		INY
3528
 5829  FE29CD  B1 2D         		LDA 	($2D),Y
3529
 5830  FE29CF  49 80         		EOR 	#$80
3530
 5831  FE29D1  85 27         		STA 	$27
3531
 5832  FE29D3  A0 03         		LDY 	#$03
3532
 5833  FE29D5  B1 23         		LDA 	($23),Y
3533
 5834  FE29D7  49 80         		EOR 	#$80
3534
 5835  FE29D9  E5 27         		SBC 	$27
3535
  Tue Jul 17 11:00:23 2018                                                                                               Page   58
3536
 
3537
 
3538
 
3539
 
3540
 5836  FE29DB  90 01         		BCC 	L1682
3541
 5837  FE29DD                	L1681:
3542
 5838  FE29DD  60            		RTS
3543
 5839  FE29DE                	L1682:
3544
 5840  FE29DE  4C 50 1B      		JMP 	vpmerr
3545
 5841
3546
 5842                        	PC46:	; $1B85 - $1E10
3547
 5843                        		; call function/procedure from procedure/function at superior level
3548
 5844  FE29E1  20 17 2A      		JSR 	L1B8B
3549
 5845  FE29E4  80 06         		BRA 	L1B45
3550
 5846
3551
 5847                        	PC47:	; $1B81 - $1E0C
3552
 5848                        		; call function/procedure from main program
3553
 5849  FE29E6  A2 31         		LDX 	#$31
3554
 5850  FE29E8  80 02         		BRA 	L1B45
3555
 5851
3556
 5852                        	PC48:	; $1B43 - $1DCE
3557
 5853                        		; call nested function/procedure from procedure/function
3558
 5854  FE29EA  A2 2F         		LDX 	#$2F
3559
 5855                        	L1B45:	; $1B45 - $1DD0
3560
 5856  FE29EC                		ACC16
3561
 5857  FE29EC  C2 20         		rep	#PMFLAG
3562
 5858                        		.LONGA	on
3563
 5859                        		.MNLIST
3564
 5860  FE29EE  B2 39         		LDA 	($39)
3565
 5861  FE29F0  48            		PHA
3566
 5862  FE29F1  B5 00         		LDA 	<$00,X
3567
 5863  FE29F3  92 39         		STA 	($39)
3568
 5864  FE29F5  C8            		INY
3569
 5865  FE29F6  C8            		INY
3570
 5866  FE29F7  A5 2F         		LDA 	$2F
3571
 5867  FE29F9  91 39         		STA 	($39),Y
3572
 5868  FE29FB  C8            		INY
3573
 5869  FE29FC  C8            		INY
3574
 5870  FE29FD  A5 2B         		LDA 	$2B
3575
 5871  FE29FF  91 39         		STA 	($39),Y
3576
 5872  FE2A01  A5 39         		LDA 	$39
3577
 5873  FE2A03  85 2F         		STA 	$2F
3578
 5874  FE2A05  68            		PLA
3579
 5875  FE2A06  85 39         		STA 	$39
3580
 5876  FE2A08  A5 23         		LDA 	$23
3581
 5877  FE2A0A  A6 97         		ldx	runf
3582
 5878  FE2A0C  30 04         		bmi	?02
3583
 5879  FE2A0E  38            		sec
3584
 5880  FE2A0F  E9 00 30      		sbc	#PCCDST
3585
 5881  FE2A12  85 2B         	?02:	STA 	$2B
3586
 5882  FE2A14                		ACC08
3587
 5883  FE2A14  E2 20         		sep	#PMFLAG
3588
 5884                        		.LONGA	off
3589
 5885                        		.MNLIST
3590
 5886  FE2A16  60            		rts
3591
 5887
3592
 5888                        	L1B8B:	; $1B8B - $1E16
3593
 5889  FE2A17  B1 2B         		LDA 	($2B),Y
3594
 5890  FE2A19  E6 2B         		INC 	$2B
3595
 5891  FE2A1B  D0 02         		BNE 	?02
3596
 5892  FE2A1D  E6 2C         		INC 	$2C
3597
  Tue Jul 17 11:00:23 2018                                                                                               Page   59
3598
 
3599
 
3600
 
3601
 
3602
 5893  FE2A1F                	?02:
3603
 5894                        	L1B93:	; $1B93 - $1E1E
3604
 5895  FE2A1F  AA            		TAX
3605
 5896  FE2A20  A5 2F         		LDA 	$2F
3606
 5897  FE2A22  85 21         		STA 	$21
3607
 5898  FE2A24  A5 30         		LDA 	$30
3608
 5899  FE2A26  85 22         		STA 	$22
3609
 5900  FE2A28  CA            	?04:	DEX
3610
 5901  FE2A29  30 10         		BMI 	?06
3611
 5902  FE2A2B  B1 21         		LDA 	($21),Y
3612
 5903  FE2A2D  85 27         		STA 	$27
3613
 5904  FE2A2F  C8            		INY
3614
 5905  FE2A30  B1 21         		LDA 	($21),Y
3615
 5906  FE2A32  88            		DEY
3616
 5907  FE2A33  85 22         		STA 	$22
3617
 5908  FE2A35  A5 27         		LDA 	$27
3618
 5909  FE2A37  85 21         		STA 	$21
3619
 5910  FE2A39  80 ED         		BRA	?04
3620
 5911  FE2A3B  A2 21         	?06:	LDX 	#$21
3621
 5912  FE2A3D  A5 24         		LDA 	$24
3622
 5913  FE2A3F  85 28         		STA 	$28
3623
 5914  FE2A41  A5 23         		LDA 	$23
3624
 5915  FE2A43  60            		RTS
3625
 5916
3626
 5917                        	PC49:	; $2D14 - $2AD5
3627
 5918                        		; compiler cause 'bad p-code' error (only in run mode)
3628
 5919  FE2A44  24 97         		bit	runf
3629
 5920  FE2A46  10 6F         		bpl	er07
3630
 5921  FE2A48  A5 23         		LDA 	$23
3631
 5922  FE2A4A  F0 6A         		BEQ 	?14
3632
 5923  FE2A4C  A5 2F         		LDA 	$2F
3633
 5924  FE2A4E  85 21         		STA 	$21
3634
 5925  FE2A50  A5 30         		LDA 	$30
3635
 5926  FE2A52  85 22         		STA 	$22
3636
 5927  FE2A54  B1 2F         	?02:	LDA 	($2F),Y
3637
 5928  FE2A56  AA            		TAX
3638
 5929  FE2A57  C8            		INY
3639
 5930  FE2A58  B1 2F         		LDA 	($2F),Y
3640
 5931  FE2A5A  85 30         		STA 	$30
3641
 5932  FE2A5C  86 2F         		STX 	$2F
3642
 5933  FE2A5E  88            		DEY
3643
 5934  FE2A5F  C6 23         		DEC 	$23
3644
 5935  FE2A61  D0 F1         		BNE 	?02
3645
 5936  FE2A63  A0 02         	?04:	LDY 	#$02
3646
 5937  FE2A65  B1 21         		LDA 	($21),Y
3647
 5938  FE2A67  AA            		TAX
3648
 5939  FE2A68  C8            		INY
3649
 5940  FE2A69  B1 21         		LDA 	($21),Y
3650
 5941  FE2A6B  E4 2F         		CPX 	$2F
3651
 5942  FE2A6D  D0 04         		BNE 	?06
3652
 5943  FE2A6F  C5 30         		CMP 	$30
3653
 5944  FE2A71  F0 06         		BEQ 	?08
3654
 5945  FE2A73  86 21         	?06:	STX 	$21
3655
 5946  FE2A75  85 22         		STA 	$22
3656
 5947  FE2A77  D0 EA         		BNE 	?04
3657
 5948  FE2A79  A5 39         	?08:	LDA 	$39
3658
 5949  FE2A7B  05 3A         		ORA 	$3A
3659
  Tue Jul 17 11:00:23 2018                                                                                               Page   60
3660
 
3661
 
3662
 
3663
 
3664
 5950  FE2A7D  F0 2A         		BEQ 	?12
3665
 5951  FE2A7F  A5 39         		LDA 	$39
3666
 5952  FE2A81  C5 2F         		CMP 	$2F
3667
 5953  FE2A83  A5 3A         		LDA 	$3A
3668
 5954  FE2A85  E5 30         		SBC 	$30
3669
 5955  FE2A87  B0 20         		BCS 	?12
3670
 5956  FE2A89  A5 39         		LDA 	$39
3671
 5957  FE2A8B  C5 21         		CMP 	$21
3672
 5958  FE2A8D  A5 3A         		LDA 	$3A
3673
 5959  FE2A8F  E5 22         		SBC 	$22
3674
 5960  FE2A91  90 08         		BCC 	?10
3675
 5961  FE2A93  A5 39         		LDA 	$39
3676
 5962  FE2A95  85 21         		STA 	$21
3677
 5963  FE2A97  A5 3A         		LDA 	$3A
3678
 5964  FE2A99  85 22         		STA 	$22
3679
 5965  FE2A9B  A9 00         	?10:	LDA 	#$00
3680
 5966                        		;ldy	#0		; ?????
3681
 5967  FE2A9D  B1 39         		LDA 	($39),Y
3682
 5968  FE2A9F  AA            		TAX
3683
 5969  FE2AA0  C8            		INY
3684
 5970  FE2AA1  B1 39         		LDA 	($39),Y
3685
 5971  FE2AA3  86 39         		STX 	$39
3686
 5972  FE2AA5  85 3A         		STA 	$3A
3687
 5973  FE2AA7  80 D0         		BRA	?08
3688
 5974  FE2AA9  A5 21         	?12:	LDA 	$21
3689
 5975  FE2AAB  18            		CLC
3690
 5976  FE2AAC  69 06         		ADC 	#$06
3691
 5977  FE2AAE  85 2D         		STA 	$2D
3692
 5978  FE2AB0  A5 22         		LDA 	$22
3693
 5979  FE2AB2  69 00         		ADC 	#$00
3694
 5980  FE2AB4  85 2E         		STA 	$2E
3695
 5981  FE2AB6  60            	?14:	RTS
3696
 5982
3697
 5983  FE2AB7                	PC4F:
3698
 5984  FE2AB7                	er07:
3699
 5985  FE2AB7  4C 4E 1B      		JMP 	vpme07		; error: bad p-code
3700
 5986
3701
 5987                        	PC4A:	; $1685 - $1910
3702
 5988                        		; execute an external routine - address in $23-$24
3703
 5989                        		; in the same program bank
3704
 5990  FE2ABA  6C 23 7F      		jmp	(CBMP0+$23)
3705
 5991
3706
 5992                        	PC4B:	; $xxxx - $32EA (run only)
3707
 5993  FE2ABD  24 97         		bit	runf
3708
 5994  FE2ABF  10 F6         		bpl	er07
3709
 5995  FE2AC1  A9 04         		LDA 	#$04
3710
 5996  FE2AC3  A2 06         		LDX 	#$06
3711
 5997  FE2AC5  20 2D 2B      		JSR 	R3335
3712
 5998  FE2AC8  A0 00         	?02:	LDY 	#$00
3713
 5999  FE2ACA  B1 21         		LDA 	($21),Y
3714
 6000  FE2ACC  91 25         		STA 	($25),Y
3715
 6001  FE2ACE  A0 02         		LDY 	#$02
3716
 6002  FE2AD0  B1 27         		LDA 	($27),Y
3717
 6003  FE2AD2  F0 06         		BEQ 	?04
3718
 6004  FE2AD4  E6 21         		INC 	$21
3719
 6005  FE2AD6  D0 02         		BNE 	?04
3720
 6006  FE2AD8  E6 22         		INC 	$22
3721
  Tue Jul 17 11:00:23 2018                                                                                               Page   61
3722
 
3723
 
3724
 
3725
 
3726
 6007  FE2ADA  20 8D 2B      	?04:	JSR 	R3399
3727
 6008  FE2ADD  D0 E9         		BNE 	?02
3728
 6009  FE2ADF  A9 04         		LDA 	#$04
3729
 6010  FE2AE1  4C 7B 27      		JMP  	R17E9
3730
 6011
3731
 6012                        	PC4C:	; $xxxx - $330D (run only)
3732
 6013  FE2AE4  24 97         		bit	runf
3733
 6014  FE2AE6  10 CF         		bpl	er07
3734
 6015  FE2AE8  A9 08         		LDA 	#$08
3735
 6016  FE2AEA  A2 04         		LDX 	#$04
3736
 6017  FE2AEC  20 2D 2B      		JSR 	R3335
3737
 6018  FE2AEF  A0 00         	?02:	LDY 	#$00
3738
 6019  FE2AF1  B1 25         		LDA 	($25),Y
3739
 6020  FE2AF3  91 21         		STA 	($21),Y
3740
 6021  FE2AF5  A0 02         		LDY 	#$02
3741
 6022  FE2AF7  B1 27         		LDA 	($27),Y
3742
 6023  FE2AF9  F0 0B         		BEQ 	?04
3743
 6024  FE2AFB  88            		DEY
3744
 6025  FE2AFC  A9 00         		LDA 	#$00
3745
 6026  FE2AFE  91 21         		STA 	($21),Y
3746
 6027  FE2B00  E6 21         		INC 	$21
3747
 6028  FE2B02  D0 02         		BNE 	?04
3748
 6029  FE2B04  E6 22         		INC 	$22
3749
 6030  FE2B06  20 8D 2B      	?04:	JSR 	R3399
3750
 6031  FE2B09  D0 E4         		BNE 	?02
3751
 6032  FE2B0B  A9 06         		LDA 	#$06
3752
 6033  FE2B0D  4C 7B 27      		JMP	R17E9
3753
 6034
3754
 6035                        	PC4E:	; $200F - $2A92
3755
 6036  FE2B10  20 1D 2B      		JSR 	L2027
3756
 6037  FE2B13                		ACC16
3757
 6038  FE2B13  C2 20         		rep	#PMFLAG
3758
 6039                        		.LONGA	on
3759
 6040                        		.MNLIST
3760
 6041  FE2B15  B2 23         		LDA 	($23)
3761
 6042  FE2B17  3A            		dec	a
3762
 6043  FE2B18  92 23         		STA 	($23)
3763
 6044  FE2B1A                		ACC08
3764
 6045  FE2B1A  E2 20         		sep	#PMFLAG
3765
 6046                        		.LONGA	off
3766
 6047                        		.MNLIST
3767
 6048  FE2B1C  60            		rts
3768
 6049  FE2B1D
3769
 6050                        	L2027:	; $2027 - $2AA6
3770
 6051  FE2B1D                		ACC16
3771
 6052  FE2B1D  C2 20         		rep	#PMFLAG
3772
 6053                        		.LONGA	on
3773
 6054                        		.MNLIST
3774
 6055  FE2B1F  E6 23         		INC 	$23
3775
 6056  FE2B21  06 23         		ASL 	$23
3776
 6057  FE2B23  A5 2F         		LDA 	$2F
3777
 6058  FE2B25  38            		SEC
3778
 6059  FE2B26  E5 23         		SBC 	$23
3779
 6060  FE2B28  85 23         		STA 	$23
3780
 6061  FE2B2A                		ACC08
3781
 6062  FE2B2A  E2 20         		sep	#PMFLAG
3782
 6063                        		.LONGA	off
3783
  Tue Jul 17 11:00:23 2018                                                                                               Page   62
3784
 
3785
 
3786
 
3787
 
3788
 6064                        		.MNLIST
3789
 6065  FE2B2C  60            		RTS
3790
 6066
3791
 6067                        	R3335:	; $xxxx - $3335 (run only)
3792
 6068  FE2B2D  48            		PHA
3793
 6069  FE2B2E  A5 2D         		LDA 	$2D
3794
 6070  FE2B30  48            		PHA
3795
 6071  FE2B31  8A            		TXA
3796
 6072  FE2B32  18            		CLC
3797
 6073  FE2B33  65 2D         		ADC 	$2D
3798
 6074  FE2B35  85 2D         		STA 	$2D
3799
 6075  FE2B37  A5 2E         		LDA 	$2E
3800
 6076  FE2B39  48            		PHA
3801
 6077  FE2B3A  69 00         		ADC 	#$00
3802
 6078  FE2B3C  85 2E         		STA 	$2E
3803
 6079  FE2B3E  A0 04         		LDY 	#$04
3804
 6080  FE2B40  B1 23         		LDA 	($23),Y
3805
 6081  FE2B42  0A            		ASL	a
3806
 6082  FE2B43  85 47         		STA 	tmpv1
3807
 6083  FE2B45  C8            		INY
3808
 6084  FE2B46  B1 23         		LDA 	($23),Y
3809
 6085  FE2B48  2A            		ROL	a
3810
 6086  FE2B49  85 48         		STA 	tmpv2
3811
 6087  FE2B4B  A0 00         		LDY 	#$00
3812
 6088  FE2B4D  20 49 29      		JSR 	R1866
3813
 6089  FE2B50  A0 02         		LDY 	#$02
3814
 6090  FE2B52  B1 2D         		LDA 	($2D),Y
3815
 6091  FE2B54  38            		SEC
3816
 6092  FE2B55  E5 47         		SBC 	tmpv1
3817
 6093  FE2B57  85 21         		STA 	$21
3818
 6094  FE2B59  C8            		INY
3819
 6095  FE2B5A  B1 2D         		LDA 	($2D),Y
3820
 6096  FE2B5C  E5 48         		SBC 	tmpv2
3821
 6097  FE2B5E  85 22         		STA 	$22
3822
 6098  FE2B60  68            		PLA
3823
 6099  FE2B61  85 28         		STA 	$28
3824
 6100  FE2B63  68            		PLA
3825
 6101  FE2B64  85 27         		STA 	$27
3826
 6102  FE2B66  A0 00         		LDY 	#$00
3827
 6103  FE2B68  B1 27         		LDA 	($27),Y
3828
 6104  FE2B6A  85 23         		STA 	$23
3829
 6105  FE2B6C  18            		CLC
3830
 6106  FE2B6D  69 01         		ADC 	#$01
3831
 6107  FE2B6F  29 FE         		AND 	#$FE
3832
 6108  FE2B71  85 25         		STA 	$25
3833
 6109  FE2B73  C8            		INY
3834
 6110  FE2B74  B1 27         		LDA 	($27),Y
3835
 6111  FE2B76  85 24         		STA 	$24
3836
 6112  FE2B78  69 00         		ADC 	#$00
3837
 6113  FE2B7A  85 26         		STA 	$26
3838
 6114  FE2B7C  68            		PLA
3839
 6115  FE2B7D  A8            		TAY
3840
 6116  FE2B7E  38            		SEC
3841
 6117  FE2B7F  B1 27         		LDA 	($27),Y
3842
 6118  FE2B81  E5 25         		SBC 	$25
3843
 6119  FE2B83  85 25         		STA 	$25
3844
 6120  FE2B85  C8            		INY
3845
  Tue Jul 17 11:00:23 2018                                                                                               Page   63
3846
 
3847
 
3848
 
3849
 
3850
 6121  FE2B86  B1 27         		LDA 	($27),Y
3851
 6122  FE2B88  E5 26         		SBC 	$26
3852
 6123  FE2B8A  85 26         		STA 	$26
3853
 6124  FE2B8C  60            		RTS
3854
 6125
3855
 6126                        	R3399:	; $xxxx - $3399 (compiler only)
3856
 6127  FE2B8D                		ACC16
3857
 6128  FE2B8D  C2 20         		rep	#PMFLAG
3858
 6129                        		.LONGA	on
3859
 6130                        		.MNLIST
3860
 6131  FE2B8F  E6 21         		INC 	$21
3861
 6132  FE2B91  E6 25         		INC 	$25
3862
 6133  FE2B93  C6 23         		dec	$23
3863
 6134  FE2B95                		ACC08
3864
 6135  FE2B95  E2 20         		sep	#PMFLAG
3865
 6136                        		.LONGA	off
3866
 6137                        		.MNLIST
3867
 6138  FE2B97  A5 24         		lda 	$24
3868
 6139  FE2B99  05 23         		ORA 	$23
3869
 6140  FE2B9B  60            		RTS
3870
 6141
3871
 6142                        	; line number (run only)
3872
 6143                        	PC50:	; not in compiler - $2984
3873
 6144                        		; store line number in $3F-$40
3874
 6145  FE2B9C                	PC51:
3875
 6146  FE2B9C  24 97         		bit	runf
3876
 6147  FE2B9E  30 03         		bmi	?02
3877
 6148  FE2BA0  4C 4E 1B      		jmp	vpme07
3878
 6149  FE2BA3  A5 23         	?02:	LDA 	$23
3879
 6150  FE2BA5  85 3F         		STA 	$3F
3880
 6151  FE2BA7  A5 24         		LDA 	$24
3881
 6152  FE2BA9  85 40         		STA 	$40
3882
 6153  FE2BAB  60            		rts
3883
 6154
3884
 6155                        	PC5A:	; $2CF0 - $33B5
3885
 6156                        	PC5B:	; simple 'new' for compiler
3886
 6157  FE2BAC                		ACC16
3887
 6158  FE2BAC  C2 20         		rep	#PMFLAG
3888
 6159                        		.LONGA	on
3889
 6160                        		.MNLIST
3890
 6161  FE2BAE  A5 2D         		LDA 	$2D
3891
 6162  FE2BB0  3A            		dec	a
3892
 6163  FE2BB1  3A            		dec	a
3893
 6164  FE2BB2  85 2D         		STA 	$2D
3894
 6165  FE2BB4                		ACC08
3895
 6166  FE2BB4  E2 20         		sep	#PMFLAG
3896
 6167                        		.LONGA	off
3897
 6168                        		.MNLIST
3898
 6169  FE2BB6  24 97         		bit	runf
3899
 6170  FE2BB8  30 12         		bmi	?01
3900
 6171  FE2BBA                		ACC16
3901
 6172  FE2BBA  C2 20         		rep	#PMFLAG
3902
 6173                        		.LONGA	on
3903
 6174                        		.MNLIST
3904
 6175  FE2BBC  06 23         		ASL 	$23
3905
 6176  FE2BBE  18            		CLC
3906
 6177  FE2BBF  A5 33         		LDA 	$33
3907
  Tue Jul 17 11:00:23 2018                                                                                               Page   64
3908
 
3909
 
3910
 
3911
 
3912
 6178  FE2BC1  65 23         		ADC 	$23
3913
 6179  FE2BC3  85 33         		STA 	$33
3914
 6180  FE2BC5  92 2D         		STA 	($2D)
3915
 6181  FE2BC7                		ACC08
3916
 6182  FE2BC7  E2 20         		sep	#PMFLAG
3917
 6183                        		.LONGA	off
3918
 6184                        		.MNLIST
3919
 6185  FE2BC9  4C 3E 2C      		JMP 	L1A97
3920
 6186                        		; p-code execution - new
3921
 6187  FE2BCC  20 23 2D      	?01:	JSR 	R3511
3922
 6188  FE2BCF  20 3F 2D      	?02:	JSR 	R3527
3923
 6189  FE2BD2  F0 42         		BEQ 	?08
3924
 6190  FE2BD4  A0 02         		LDY 	#$02
3925
 6191  FE2BD6  B1 21         		LDA 	($21),Y
3926
 6192  FE2BD8  38            		SEC
3927
 6193  FE2BD9  E5 23         		SBC 	$23
3928
 6194  FE2BDB  85 25         		STA 	$25
3929
 6195  FE2BDD  C8            		INY
3930
 6196  FE2BDE  B1 21         		LDA 	($21),Y
3931
 6197  FE2BE0  E5 24         		SBC 	$24
3932
 6198  FE2BE2  85 26         		STA 	$26
3933
 6199  FE2BE4  90 E9         		BCC 	?02
3934
 6200  FE2BE6  D0 08         		BNE 	?04
3935
 6201  FE2BE8  A5 25         		LDA 	$25
3936
 6202  FE2BEA  F0 17         		BEQ 	?06
3937
 6203  FE2BEC  4A            		LSR	a
3938
 6204  FE2BED  4A            		LSR	a
3939
 6205  FE2BEE  F0 DF         		BEQ 	?02
3940
 6206  FE2BF0  20 50 2C      	?04:	JSR 	R3431
3941
 6207  FE2BF3                		ACC16
3942
 6208  FE2BF3  C2 20         		rep	#PMFLAG
3943
 6209                        		.LONGA	on
3944
 6210                        		.MNLIST
3945
 6211  FE2BF5  A0 02         		LDY 	#$02
3946
 6212  FE2BF7  A5 25         		LDA 	$25
3947
 6213  FE2BF9  91 21         		STA 	($21),Y
3948
 6214  FE2BFB  AD FC FF      		lda	!MTPTR
3949
 6215  FE2BFE  85 35         		sta	$35
3950
 6216  FE2C00                		ACC08
3951
 6217  FE2C00  E2 20         		sep	#PMFLAG
3952
 6218                        		.LONGA	off
3953
 6219                        		.MNLIST
3954
 6220  FE2C02  60            		rts
3955
 6221  FE2C03  20 50 2C      	?06:	JSR 	R3431
3956
 6222  FE2C06  A0 00         		LDY 	#$00
3957
 6223  FE2C08                		ACC08
3958
 6224  FE2C08  E2 20         		sep	#PMFLAG
3959
 6225                        		.LONGA	off
3960
 6226                        		.MNLIST
3961
 6227  FE2C0A  B1 21         		LDA 	($21),Y
3962
 6228  FE2C0C  91 27         		STA 	($27),Y
3963
 6229  FE2C0E  AD FC FF      		lda	!MTPTR
3964
 6230  FE2C11  85 35         		sta	$35
3965
 6231  FE2C13                		ACC08
3966
 6232  FE2C13  E2 20         		sep	#PMFLAG
3967
 6233                        		.LONGA	off
3968
 6234                        		.MNLIST
3969
  Tue Jul 17 11:00:23 2018                                                                                               Page   65
3970
 
3971
 
3972
 
3973
 
3974
 6235  FE2C15  60            		rts
3975
 6236  FE2C16                	?08:	ACC16CLC
3976
 6237  FE2C16  C2 21         		rep	#(PMFLAG.OR.PCFLAG)
3977
 6238                        		.LONGA	on
3978
 6239                        		.MNLIST
3979
 6240  FE2C18  AD FC FF      		lda	!MTPTR
3980
 6241  FE2C1B  85 35         		sta	$35
3981
 6242  FE2C1D  A5 23         		LDA 	$23
3982
 6243  FE2C1F  65 33         		ADC 	$33
3983
 6244  FE2C21  85 33         		STA 	$33
3984
 6245  FE2C23  92 2D         		STA 	($2D)
3985
 6246  FE2C25  69 28 00      		ADC 	#$0028
3986
 6247  FE2C28  C5 2D         		CMP 	$2D
3987
 6248  FE2C2A                		ACC08
3988
 6249  FE2C2A  E2 20         		sep	#PMFLAG
3989
 6250                        		.LONGA	off
3990
 6251                        		.MNLIST
3991
 6252  FE2C2C  90 21         		BCC	PC61x
3992
 6253  FE2C2E                	er01:
3993
 6254  FE2C2E  A2 01         		LDX 	#$01		; stack overflow error
3994
 6255  FE2C30  4C 50 1B      		JMP 	vpmerr
3995
 6256
3996
 6257                        	PC60:	; $1A86 - $1D11
3997
 6258                        	PC61:	; reserve room in stack
3998
 6259  FE2C33                		ACC16
3999
 6260  FE2C33  C2 20         		rep	#PMFLAG
4000
 6261                        		.LONGA	on
4001
 6262                        		.MNLIST
4002
 6263  FE2C35  06 23         		ASL 	$23
4003
 6264  FE2C37  38            		SEC
4004
 6265  FE2C38  A5 2D         		LDA 	$2D
4005
 6266  FE2C3A  E5 23         		SBC 	$23
4006
 6267  FE2C3C  85 2D         		STA 	$2D
4007
 6268                        	L1A97:	; $1A97 - $1D22
4008
 6269  FE2C3E                		ACC16CLC
4009
 6270  FE2C3E  C2 21         		rep	#(PMFLAG.OR.PCFLAG)
4010
 6271                        		.LONGA	on
4011
 6272                        		.MNLIST
4012
 6273  FE2C40  A5 33         		LDA 	$33
4013
 6274  FE2C42  69 28 00      		ADC 	#$0028
4014
 6275  FE2C45  85 27         		STA 	$27
4015
 6276  FE2C47  A5 2D         		LDA 	$2D
4016
 6277  FE2C49  C5 27         		CMP 	$27
4017
 6278  FE2C4B                		ACC08
4018
 6279  FE2C4B  E2 20         		sep	#PMFLAG
4019
 6280                        		.LONGA	off
4020
 6281                        		.MNLIST
4021
 6282  FE2C4D  90 DF         		BCC 	er01
4022
 6283  FE2C4F                	PC61x:
4023
 6284  FE2C4F  60            		rts
4024
 6285
4025
 6286                        	R3431:	; $xxxx - $3431
4026
 6287  FE2C50  20 15 2D      		JSR 	R3503
4027
 6288  FE2C53  A0 01         		LDY 	#$01
4028
 6289  FE2C55  91 2D         		STA 	($2D),Y
4029
 6290  FE2C57  88            		DEY
4030
 6291  FE2C58  8A            		TXA
4031
  Tue Jul 17 11:00:23 2018                                                                                               Page   66
4032
 
4033
 
4034
 
4035
 
4036
 6292  FE2C59  91 2D         		STA 	($2D),Y
4037
 6293  FE2C5B  60            		RTS
4038
 6294
4039
 6295                        	PC5C:	; $xxxx - $343D
4040
 6296                        	PC5D:	; dispose
4041
 6297  FE2C5C  24 97         		bit	runf
4042
 6298  FE2C5E  30 03         		bmi	?02
4043
 6299  FE2C60  4C 4E 1B      		jmp	vpme07
4044
 6300  FE2C63  20 23 2D      	?02:	JSR 	R3511
4045
 6301  FE2C66  20 3F 2D      	?04:	JSR	R3527
4046
 6302  FE2C69  F0 65         		BEQ	?12
4047
 6303  FE2C6B  A0 00         		LDY 	#$00
4048
 6304  FE2C6D  B1 2D         		LDA 	($2D),Y
4049
 6305  FE2C6F  C5 21         		CMP 	$21
4050
 6306  FE2C71  D0 27         		BNE	?08
4051
 6307  FE2C73  C8            		INY
4052
 6308  FE2C74  B1 2D         		LDA 	($2D),Y
4053
 6309  FE2C76  C5 22         		CMP 	$22
4054
 6310  FE2C78  D0 20         		BNE	?08
4055
 6311  FE2C7A  A5 21         		LDA 	$21
4056
 6312  FE2C7C  38            		SEC
4057
 6313  FE2C7D  E5 23         		SBC 	$23
4058
 6314  FE2C7F  85 25         		STA 	$25
4059
 6315  FE2C81  A5 22         		LDA 	$22
4060
 6316  FE2C83  E5 24         		SBC 	$24
4061
 6317  FE2C85  85 26         		STA 	$26
4062
 6318  FE2C87  A0 03         		LDY 	#$03
4063
 6319  FE2C89  B1 21         	?06:	LDA 	($21),Y
4064
 6320  FE2C8B  91 25         		STA 	($25),Y
4065
 6321  FE2C8D  88            		DEY
4066
 6322  FE2C8E  10 F9         		BPL	?06
4067
 6323  FE2C90  A5 25         		LDA 	$25
4068
 6324  FE2C92  85 21         		STA 	$21
4069
 6325  FE2C94  A5 26         		LDA 	$26
4070
 6326  FE2C96  85 22         		STA 	$22
4071
 6327  FE2C98  80 19         		bra	?10
4072
 6328  FE2C9A  A0 00         	?08:	LDY 	#$00
4073
 6329  FE2C9C                		ACC16
4074
 6330  FE2C9C  C2 20         		rep	#PMFLAG
4075
 6331                        		.LONGA	on
4076
 6332                        		.MNLIST
4077
 6333  FE2C9E  B1 2D         		LDA 	($2D),Y
4078
 6334  FE2CA0  38            		SEC
4079
 6335  FE2CA1  E5 23         		SBC 	$23
4080
 6336  FE2CA3  85 25         		STA 	$25
4081
 6337  FE2CA5  C8            		INY
4082
 6338  FE2CA6                		ACC08
4083
 6339  FE2CA6  E2 20         		sep	#PMFLAG
4084
 6340                        		.LONGA	off
4085
 6341                        		.MNLIST
4086
 6342  FE2CA8  20 15 2D      		JSR 	R3503
4087
 6343  FE2CAB  C5 26         		CMP 	$26
4088
 6344  FE2CAD  D0 B7         		BNE 	?04
4089
 6345  FE2CAF  E4 25         		CPX 	$25
4090
 6346  FE2CB1  D0 B3         		BNE	?04
4091
 6347  FE2CB3  A0 02         	?10:	LDY 	#$02
4092
 6348  FE2CB5                		ACC16CLC
4093
  Tue Jul 17 11:00:23 2018                                                                                               Page   67
4094
 
4095
 
4096
 
4097
 
4098
 6349  FE2CB5  C2 21         		rep	#(PMFLAG.OR.PCFLAG)
4099
 6350                        		.LONGA	on
4100
 6351                        		.MNLIST
4101
 6352  FE2CB7  B1 21         		LDA 	($21),Y
4102
 6353  FE2CB9  65 23         		ADC 	$23
4103
 6354  FE2CBB  85 23         		STA 	$23
4104
 6355  FE2CBD  91 21         		STA 	($21),Y
4105
 6356  FE2CBF  A0 01         		LDY 	#$01
4106
 6357  FE2CC1  B2 21         		LDA 	($21)
4107
 6358  FE2CC3  92 27         		STA 	($27)
4108
 6359  FE2CC5                		ACC08
4109
 6360  FE2CC5  E2 20         		sep	#PMFLAG
4110
 6361                        		.LONGA	off
4111
 6362                        		.MNLIST
4112
 6363  FE2CC7  20 50 2C      		JSR 	R3431
4113
 6364  FE2CCA  88            		DEY
4114
 6365  FE2CCB  20 30 2D      		JSR 	R351E
4115
 6366  FE2CCE  80 96         		bra	?04
4116
 6367  FE2CD0  20 15 2D      	?12:	JSR 	R3503
4117
 6368  FE2CD3  A0 00         		LDY 	#$00
4118
 6369  FE2CD5  B1 2D         		LDA 	($2D),Y
4119
 6370  FE2CD7  C5 33         		CMP 	$33
4120
 6371  FE2CD9  D0 1A         		BNE 	?14
4121
 6372  FE2CDB  C8            		INY
4122
 6373  FE2CDC  B1 2D         		LDA 	($2D),Y
4123
 6374  FE2CDE  C5 34         		CMP 	$34
4124
 6375  FE2CE0  D0 13         		BNE 	?14
4125
 6376  FE2CE2                		ACC16
4126
 6377  FE2CE2  C2 20         		rep	#PMFLAG
4127
 6378                        		.LONGA	on
4128
 6379                        		.MNLIST
4129
 6380  FE2CE4  A5 33         		LDA 	$33
4130
 6381  FE2CE6  38            		SEC
4131
 6382  FE2CE7  E5 23         		SBC 	$23
4132
 6383  FE2CE9  85 33         		STA 	$33
4133
 6384  FE2CEB  AD FC FF      		lda	!MTPTR
4134
 6385  FE2CEE  85 35         		sta	$35
4135
 6386  FE2CF0                		ACC08
4136
 6387  FE2CF0  E2 20         		sep	#PMFLAG
4137
 6388                        		.LONGA	off
4138
 6389                        		.MNLIST
4139
 6390  FE2CF2  4C 95 1E      		JMP 	SK02
4140
 6391  FE2CF5  A0 00         	?14:	LDY 	#$00
4141
 6392  FE2CF7                		CPU16
4142
 6393  FE2CF7  C2 30         		rep	#(PMFLAG.OR.PXFLAG)
4143
 6394                        		.LONGA	on
4144
 6395                        		.LONGI	on
4145
 6396                        		.MNLIST
4146
 6397  FE2CF9  B2 2D         		LDA 	($2D)
4147
 6398  FE2CFB  38            		SEC
4148
 6399  FE2CFC  E5 23         		SBC 	$23
4149
 6400  FE2CFE  92 27         		STA 	($27)
4150
 6401  FE2D00  85 21         		STA 	$21
4151
 6402  FE2D02  98            		TYA
4152
 6403  FE2D03  91 21         		STA 	($21),Y
4153
 6404  FE2D05  C8            		INY
4154
 6405  FE2D06  C8            		INY
4155
  Tue Jul 17 11:00:23 2018                                                                                               Page   68
4156
 
4157
 
4158
 
4159
 
4160
 6406  FE2D07  A5 23         		LDA 	$23
4161
 6407  FE2D09  91 21         		STA 	($21),Y
4162
 6408  FE2D0B  AD FC FF      		lda	!MTPTR
4163
 6409  FE2D0E  85 35         		sta	$35
4164
 6410  FE2D10                		CPU08
4165
 6411  FE2D10  E2 30         		sep	#(PMFLAG.OR.PXFLAG)
4166
 6412                        		.LONGA	off
4167
 6413                        		.LONGI	off
4168
 6414                        		.MNLIST
4169
 6415  FE2D12  4C 95 1E      		JMP 	SK02
4170
 6416
4171
 6417                        	R3503:	; $xxxx - $3503
4172
 6418  FE2D15  A0 02         		LDY 	#$02
4173
 6419  FE2D17  18            		CLC
4174
 6420  FE2D18  A5 21         		LDA 	$21
4175
 6421  FE2D1A  71 21         		ADC 	($21),Y
4176
 6422  FE2D1C  AA            		TAX
4177
 6423  FE2D1D  C8            		INY
4178
 6424  FE2D1E  A5 22         		LDA 	$22
4179
 6425  FE2D20  71 21         		ADC 	($21),Y
4180
 6426  FE2D22  60            		RTS
4181
 6427
4182
 6428                        	R3511:	; $xxxx - $3511
4183
 6429  FE2D23  A5 23         		LDA 	$23
4184
 6430  FE2D25  4A            		LSR	a
4185
 6431  FE2D26  05 24         		ORA 	$24
4186
 6432  FE2D28  D0 02         		BNE 	?02
4187
 6433  FE2D2A  E6 23         		INC 	$23
4188
 6434  FE2D2C  06 23         	?02:	ASL 	$23
4189
 6435  FE2D2E  26 24         		ROL 	$24
4190
 6436                        	R351E:	; $xxxx - $351E
4191
 6437  FE2D30                		ACC16
4192
 6438  FE2D30  C2 20         		rep	#PMFLAG
4193
 6439                        		.LONGA	on
4194
 6440                        		.MNLIST
4195
 6441  FE2D32  A5 35         		lda	$35
4196
 6442  FE2D34  8D FC FF      		sta	!MTPTR
4197
 6443  FE2D37  A9 FC FF      		lda	#MTPTR
4198
 6444  FE2D3A  85 21         		sta	$21
4199
 6445  FE2D3C                		ACC08
4200
 6446  FE2D3C  E2 20         		sep	#PMFLAG
4201
 6447                        		.LONGA	off
4202
 6448                        		.MNLIST
4203
 6449                        		;LDA 	#$35
4204
 6450                        		;STA $21
4205
 6451                        		;LDA #$00
4206
 6452                        		;STA $22
4207
 6453  FE2D3E  60            		RTS
4208
 6454
4209
 6455                        	R3527:	; $xxxx - $3527
4210
 6456  FE2D3F  A5 21         		LDA 	$21
4211
 6457  FE2D41  85 27         		STA 	$27
4212
 6458  FE2D43  A5 22         		LDA 	$22
4213
 6459  FE2D45  85 28         		STA 	$28
4214
 6460  FE2D47  A0 00         		LDY 	#$00
4215
 6461  FE2D49  B1 21         		LDA 	($21),Y
4216
 6462  FE2D4B  AA            		TAX
4217
  Tue Jul 17 11:00:23 2018                                                                                               Page   69
4218
 
4219
 
4220
 
4221
 
4222
 6463  FE2D4C  C8            		INY
4223
 6464  FE2D4D  B1 21         		LDA 	($21),Y
4224
 6465  FE2D4F  85 22         		STA 	$22
4225
 6466  FE2D51  86 21         		STX 	$21
4226
 6467  FE2D53  05 21         		ORA 	$21
4227
 6468  FE2D55  60            		RTS
4228
 6469
4229
 6470                        	PC5E:	; $1A54 - $1CDF
4230
 6471  FE2D56                	PC5F:
4231
 6472  FE2D56                		ACC16
4232
 6473  FE2D56  C2 20         		rep	#PMFLAG
4233
 6474                        		.LONGA	on
4234
 6475                        		.MNLIST
4235
 6476  FE2D58  06 23         		ASL 	$23
4236
 6477  FE2D5A  38            		SEC
4237
 6478  FE2D5B  B2 2D         		LDA 	($2D)
4238
 6479  FE2D5D  E5 23         		SBC 	$23
4239
 6480  FE2D5F  85 25         		STA 	$25
4240
 6481  FE2D61  C8            		INY
4241
 6482  FE2D62  C8            		INY
4242
 6483  FE2D63  38            		SEC
4243
 6484  FE2D64  B1 2D         		LDA 	($2D),Y
4244
 6485  FE2D66  E5 23         		SBC 	$23
4245
 6486  FE2D68  85 21         		STA 	$21
4246
 6487  FE2D6A                		ACC08
4247
 6488  FE2D6A  E2 20         		sep	#PMFLAG
4248
 6489                        		.LONGA	off
4249
 6490                        		.MNLIST
4250
 6491  FE2D6C  20 99 2D      		JSR 	L1AFF
4251
 6492  FE2D6F  A5 2D         		LDA 	$2D
4252
 6493  FE2D71  18            		CLC
4253
 6494  FE2D72  69 04         		ADC 	#$04
4254
 6495  FE2D74  85 2D         		STA 	$2D
4255
 6496  FE2D76  90 02         		BCC 	?02
4256
 6497  FE2D78  E6 2E         		INC 	$2E
4257
 6498  FE2D7A  60            	?02:	RTS
4258
 6499
4259
 6500                        	PC37:	; $1B1E - $1DA9
4260
 6501  FE2D7B  A9 08         		LDA 	#$08
4261
 6502  FE2D7D  85 23         		STA 	$23
4262
 6503  FE2D7F  84 24         		STY 	$24
4263
 6504
4264
 6505                        	PC6A:	; $1ACB - $1D56
4265
 6506  FE2D81                	PC6B:
4266
 6507  FE2D81                		ACC16
4267
 6508  FE2D81  C2 20         		rep	#PMFLAG
4268
 6509                        		.LONGA	on
4269
 6510                        		.MNLIST
4270
 6511  FE2D83  06 23         		ASL 	$23
4271
 6512  FE2D85  B2 2D         		LDA 	($2D)
4272
 6513  FE2D87  38            		SEC
4273
 6514  FE2D88  E5 23         		SBC 	$23
4274
 6515  FE2D8A  85 25         		STA 	$25
4275
 6516  FE2D8C  A5 2D         		LDA 	$2D
4276
 6517  FE2D8E  1A            		inc	a
4277
 6518  FE2D8F  1A            		inc	a
4278
 6519  FE2D90  38            		SEC
4279
  Tue Jul 17 11:00:23 2018                                                                                               Page   70
4280
 
4281
 
4282
 
4283
 
4284
 6520  FE2D91  E5 23         		SBC 	$23
4285
 6521  FE2D93  85 2D         		STA 	$2D
4286
 6522  FE2D95  85 21         		STA 	$21
4287
 6523  FE2D97                		ACC08
4288
 6524  FE2D97  E2 20         		sep	#PMFLAG
4289
 6525                        		.LONGA	off
4290
 6526                        		.MNLIST
4291
 6527  FE2D99
4292
 6528                        	L1AFF:	; $1AFF - $1D8A
4293
 6529  FE2D99  A0 00         		LDY 	#$00
4294
 6530  FE2D9B  C6 24         		DEC 	$24
4295
 6531  FE2D9D  30 0D         		BMI 	?04
4296
 6532  FE2D9F  B1 25         	?02:	LDA 	($25),Y
4297
 6533  FE2DA1  91 21         		STA 	($21),Y
4298
 6534  FE2DA3  C8            		INY
4299
 6535  FE2DA4  D0 F9         		BNE 	?02
4300
 6536  FE2DA6  E6 26         		INC 	$26
4301
 6537  FE2DA8  E6 22         		INC 	$22
4302
 6538  FE2DAA  D0 ED         		BNE 	L1AFF
4303
 6539  FE2DAC  C4 23         	?04:	CPY 	$23
4304
 6540  FE2DAE  F0 07         		BEQ 	?06
4305
 6541  FE2DB0  B1 25         		LDA 	($25),Y
4306
 6542  FE2DB2  91 21         		STA 	($21),Y
4307
 6543  FE2DB4  C8            		INY
4308
 6544  FE2DB5  D0 F5         		BNE 	?04
4309
 6545  FE2DB7  60            	?06:	RTS
4310
 6546
4311
 6547                        	PC62:	; $1AB6 - $1D41
4312
 6548  FE2DB8                	PC63:
4313
 6549  FE2DB8                		ACC16
4314
 6550  FE2DB8  C2 20         		rep	#PMFLAG
4315
 6551                        		.LONGA	on
4316
 6552                        		.MNLIST
4317
 6553  FE2DBA  06 23         		ASL 	$23
4318
 6554  FE2DBC  38            		SEC
4319
 6555  FE2DBD  B2 2D         		LDA 	($2D)
4320
 6556  FE2DBF  E5 23         		SBC 	$23
4321
 6557  FE2DC1  92 2D         		STA 	($2D)
4322
 6558  FE2DC3                		ACC08
4323
 6559  FE2DC3  E2 20         		sep	#PMFLAG
4324
 6560                        		.LONGA	off
4325
 6561                        		.MNLIST
4326
 6562  FE2DC5  60            		rts
4327
 6563
4328
 6564                        	PC64:	; $2068 - $2A09
4329
 6565  FE2DC6                	PC65:
4330
 6566  FE2DC6  20 23 2E      		JSR 	L2095
4331
 6567  FE2DC9  B1 25         	?00:	LDA 	($25),Y
4332
 6568  FE2DCB  D1 21         		CMP 	($21),Y
4333
 6569  FE2DCD  D0 0C         		BNE 	PC65b
4334
 6570  FE2DCF  0A            		ASL	a
4335
 6571  FE2DD0  F0 05         		BEQ 	?01
4336
 6572  FE2DD2  C8            		INY
4337
 6573  FE2DD3  C4 23         		CPY 	$23
4338
 6574  FE2DD5  D0 F2         		BNE 	?00
4339
 6575  FE2DD7                	?01:
4340
 6576  FE2DD7  A9 01         	PC65a:	LDA 	#$01		; R2A1A
4341
  Tue Jul 17 11:00:23 2018                                                                                               Page   71
4342
 
4343
 
4344
 
4345
 
4346
 6577  FE2DD9  80 02         		bra	PC65c
4347
 6578  FE2DDB  A9 00         	PC65b:	lda	#0		; R2A1D
4348
 6579  FE2DDD  A0 02         	PC65c:	LDY 	#$02
4349
 6580  FE2DDF  91 2D         		STA 	($2D),Y
4350
 6581  FE2DE1  A9 00         		LDA 	#$00
4351
 6582  FE2DE3  C8            		INY
4352
 6583  FE2DE4  91 2D         		STA 	($2D),Y
4353
 6584  FE2DE6  A9 02         		LDA 	#$02
4354
 6585  FE2DE8  4C 7B 27      		jmp	L155E
4355
 6586  FE2DEB
4356
 6587                        	PC66:	; $xxxx - $2A42
4357
 6588  FE2DEB                	PC67:
4358
 6589  FE2DEB  24 97         		bit	runf
4359
 6590  FE2DED  30 03         		bmi	?02
4360
 6591  FE2DEF  4C 4E 1B      		jmp	vpme07
4361
 6592  FE2DF2  20 23 2E      	?02:	JSR 	R2A57
4362
 6593  FE2DF5  B1 25         	?04:	LDA 	($25),Y
4363
 6594  FE2DF7  D1 21         		CMP 	($21),Y
4364
 6595  FE2DF9  30 E0         		BMI 	PC65b
4365
 6596  FE2DFB  D0 DA         		BNE 	PC65a
4366
 6597  FE2DFD  0A            		ASL	a
4367
 6598  FE2DFE  F0 D7         		BEQ 	PC65a
4368
 6599  FE2E00  C8            		INY
4369
 6600  FE2E01  C4 23         		CPY 	$23
4370
 6601  FE2E03  D0 F0         		BNE 	?04
4371
 6602  FE2E05  F0 D0         		BEQ 	PC65a
4372
 6603
4373
 6604                        	PC68:	; $xxxx - $2A2D
4374
 6605  FE2E07                	PC69:
4375
 6606  FE2E07  24 97         		bit	runf
4376
 6607  FE2E09  30 03         		bmi	?02
4377
 6608  FE2E0B  4C 4E 1B      		jmp	vpme07
4378
 6609  FE2E0E  20 23 2E      	?02:	JSR 	R2A57
4379
 6610  FE2E11  B1 21         	?04:	LDA 	($21),Y
4380
 6611  FE2E13  D1 25         		CMP 	($25),Y
4381
 6612  FE2E15  30 C4         		BMI 	PC65b
4382
 6613  FE2E17  D0 BE         		BNE 	PC65a
4383
 6614  FE2E19  0A            		ASL	a
4384
 6615  FE2E1A  F0 BB         		BEQ 	PC65a
4385
 6616  FE2E1C  C8            		INY
4386
 6617  FE2E1D  C4 23         		CPY 	$23
4387
 6618  FE2E1F  D0 F0         		BNE	?04
4388
 6619  FE2E21  F0 B4         		BEQ	PC65a
4389
 6620
4390
 6621  FE2E23                	R2A57:
4391
 6622                        	L2095:	; $2095 - $2A57
4392
 6623  FE2E23                		ACC16
4393
 6624  FE2E23  C2 20         		rep	#PMFLAG
4394
 6625                        		.LONGA	on
4395
 6626                        		.MNLIST
4396
 6627  FE2E25  B2 2D         		LDA 	($2D)
4397
 6628  FE2E27  85 25         		STA 	$25
4398
 6629  FE2E29  C8            		INY
4399
 6630  FE2E2A  C8            		iny
4400
 6631  FE2E2B  B1 2D         		LDA 	($2D),Y
4401
 6632  FE2E2D  85 21         		STA 	$21
4402
 6633  FE2E2F                		ACC08
4403
  Tue Jul 17 11:00:23 2018                                                                                               Page   72
4404
 
4405
 
4406
 
4407
 
4408
 6634  FE2E2F  E2 20         		sep	#PMFLAG
4409
 6635                        		.LONGA	off
4410
 6636                        		.MNLIST
4411
 6637  FE2E31  A0 00         		LDY 	#$00
4412
 6638  FE2E33  60            		RTS
4413
 6639
4414
 6640                        	PC6E:	; $0B48 - $0D4E
4415
 6641  FE2E34                	PC6F:
4416
 6642  FE2E34  20 DB 2E      		JSR	L0B7F
4417
 6643  FE2E37  A0 00         		LDY 	#$00
4418
 6644  FE2E39  B1 29         		LDA 	($29),Y
4419
 6645  FE2E3B  29 10         		AND 	#$10
4420
 6646  FE2E3D  D0 1B         		BNE	?06
4421
 6647  FE2E3F  20 25 32      		JSR	L0EA8
4422
 6648  FE2E42  A0 00         	?02:	LDY 	#$00
4423
 6649  FE2E44  B1 21         		LDA 	($21),Y
4424
 6650  FE2E46  20 E3 32      		JSR 	L0EC4
4425
 6651  FE2E49  E6 21         		INC 	$21
4426
 6652  FE2E4B  D0 02         		BNE 	?04
4427
 6653  FE2E4D  E6 22         		INC 	$22
4428
 6654  FE2E4F  20 CD 2E      	?04:	JSR	L0B71
4429
 6655  FE2E52  D0 EE         		BNE	?02
4430
 6656  FE2E54  20 CC FF      		jsr	FCLRCH
4431
 6657  FE2E57  4C 95 1E      		JMP	SK02
4432
 6658  FE2E5A                	?06:
4433
 6659  FE2E5A                	PC76:
4434
 6660  FE2E5A                	PC77:
4435
 6661  FE2E5A                	PC78:
4436
 6662  FE2E5A                	PC79:
4437
 6663  FE2E5A  4C 4E 1B      		JMP	vpme07
4438
 6664
4439
 6665                        	PC6Cx:	; $0983 - $0B94
4440
 6666  FE2E5D  4C E5 1D      		jmp	SK04
4441
 6667  FE2E60
4442
 6668                        	PC6C:	; $0991 - $0B97
4443
 6669                        	PC6D:	; 'reset' on disk
4444
 6670  FE2E60  20 EB 33      		JSR	L09C2
4445
 6671  FE2E63  A5 3E         		LDA 	$3E
4446
 6672  FE2E65  D0 F6         		BNE 	PC6Cx
4447
 6673  FE2E67  E6 BB         		INC 	$BB		; skip '@'
4448
 6674  FE2E69  D0 02         		BNE 	?02
4449
 6675  FE2E6B  E6 BC         		INC 	$BC
4450
 6676  FE2E6D  A4 B7         	?02:	ldy 	$B7		; flength
4451
 6677  FE2E6F  88            		dey
4452
 6678  FE2E70  84 B7         		sty	$B7
4453
 6679  FE2E72  88            		dey
4454
 6680  FE2E73  A9 52         		lda	#'R'		; read
4455
 6681  FE2E75  97 BB         		sta	[$BB],y
4456
 6682                        		;SEC
4457
 6683                        		;SBC 	#$05
4458
 6684                        		;dec	a		; skip '@' ???
4459
 6685                        		;STA 	$B7
4460
 6686                        		;lda	#$C0
4461
 6687                        		;trb	$B9
4462
 6688  FE2E77  20 C0 FF      		JSR 	FOPEN
4463
 6689  FE2E7A  20 45 33      		JSR 	L0A73
4464
 6690  FE2E7D  A5 3E         		LDA 	$3E
4465
  Tue Jul 17 11:00:23 2018                                                                                               Page   73
4466
 
4467
 
4468
 
4469
 
4470
 6691  FE2E7F  D0 DC         		BNE 	PC6Cx
4471
 6692  FE2E81  A9 00         		LDA 	#$00
4472
 6693  FE2E83  A8            		TAY
4473
 6694  FE2E84  91 29         		STA 	($29),Y
4474
 6695  FE2E86  A5 2D         		LDA 	$2D
4475
 6696  FE2E88  18            		CLC
4476
 6697  FE2E89  69 02         		ADC 	#$02
4477
 6698  FE2E8B  85 2D         		STA 	$2D
4478
 6699  FE2E8D  90 02         		BCC 	?04
4479
 6700  FE2E8F  E6 2E         		INC 	$2E
4480
 6701  FE2E91                	?04:
4481
 6702                        	PC70:	; $0B0C - $0D12
4482
 6703  FE2E91                	PC71:
4483
 6704  FE2E91  20 DB 2E      		JSR 	L0B7F
4484
 6705  FE2E94  A0 00         		LDY 	#$00
4485
 6706  FE2E96  B1 29         		LDA 	($29),Y
4486
 6707  FE2E98  29 10         		AND 	#$10
4487
 6708  FE2E9A  D0 2E         		BNE 	?10
4488
 6709  FE2E9C  20 EF 31      		JSR 	L0F11
4489
 6710  FE2E9F  20 71 31      	?02:	JSR	L0F2B
4490
 6711  FE2EA2  A0 00         		LDY 	#$00
4491
 6712  FE2EA4  91 21         		STA 	($21),Y
4492
 6713  FE2EA6  E6 21         		INC 	$21
4493
 6714  FE2EA8  D0 02         		BNE	?04
4494
 6715  FE2EAA  E6 22         		INC	$22
4495
 6716  FE2EAC  AA            	?04:	TAX
4496
 6717  FE2EAD  A0 00         		LDY 	#$00
4497
 6718  FE2EAF  B1 29         		LDA 	($29),Y
4498
 6719  FE2EB1  29 80         		AND 	#$80
4499
 6720  FE2EB3  D0 0F         		BNE 	?06
4500
 6721  FE2EB5  20 CD 2E      		JSR	L0B71
4501
 6722  FE2EB8  D0 E5         		BNE	?02
4502
 6723  FE2EBA  E0 0D         		CPX	#$0D
4503
 6724  FE2EBC  D0 06         		BNE	?06
4504
 6725  FE2EBE  B1 29         		LDA 	($29),Y
4505
 6726  FE2EC0  09 40         		ORA 	#$40
4506
 6727  FE2EC2  91 29         		STA 	($29),Y
4507
 6728  FE2EC4  20 CC FF      	?06:	JSR	FCLRCH
4508
 6729  FE2EC7  4C 95 1E      	?08:	JMP	SK02
4509
 6730  FE2ECA  4C 4E 1B      	?10:	JMP	vpme07
4510
 6731
4511
 6732                        	L0B71:	; $0B71 - $0D77
4512
 6733  FE2ECD  A5 23         		LDA 	$23
4513
 6734  FE2ECF  38            		SEC
4514
 6735  FE2ED0  E9 01         		SBC 	#$01
4515
 6736  FE2ED2  85 23         		STA 	$23
4516
 6737  FE2ED4  B0 02         		BCS 	?02
4517
 6738  FE2ED6  C6 24         		DEC 	$24
4518
 6739  FE2ED8  05 24         	?02:	ORA 	$24
4519
 6740  FE2EDA  60            		RTS
4520
 6741
4521
 6742                        	L0B7F:	; $0B7F - $0D85
4522
 6743  FE2EDB                		ACC16
4523
 6744  FE2EDB  C2 20         		rep	#PMFLAG
4524
 6745                        		.LONGA	on
4525
 6746                        		.MNLIST
4526
 6747  FE2EDD  B1 2D         		LDA 	($2D),Y
4527
  Tue Jul 17 11:00:23 2018                                                                                               Page   74
4528
 
4529
 
4530
 
4531
 
4532
 6748  FE2EDF  C8            		iny
4533
 6749  FE2EE0  85 29         		STA 	$29
4534
 6750  FE2EE2  06 23         		ASL 	$23
4535
 6751  FE2EE4  38            		SEC
4536
 6752  FE2EE5  A5 29         		LDA 	$29
4537
 6753  FE2EE7  E5 23         		SBC 	$23
4538
 6754  FE2EE9  85 21         		STA 	$21
4539
 6755  FE2EEB  A5 23         		LDA 	$23
4540
 6756  FE2EED                		ACC08
4541
 6757  FE2EED  E2 20         		sep	#PMFLAG
4542
 6758                        		.LONGA	off
4543
 6759                        		.MNLIST
4544
 6760  FE2EEF  D0 13         		BNE 	?04
4545
 6761  FE2EF1  E6 23         		INC 	$23
4546
 6762  FE2EF3  A5 21         		LDA 	$21
4547
 6763  FE2EF5  38            		SEC
4548
 6764  FE2EF6  E9 02         		SBC 	#$02
4549
 6765  FE2EF8  85 21         		STA 	$21
4550
 6766  FE2EFA  B0 02         		BCS 	?02
4551
 6767  FE2EFC  C6 22         		DEC 	$22
4552
 6768  FE2EFE  A9 00         	?02:	LDA 	#$00
4553
 6769  FE2F00  A0 01         		LDY 	#$01
4554
 6770  FE2F02  91 21         		STA 	($21),Y
4555
 6771  FE2F04  60            	?04:	RTS
4556
 6772
4557
 6773                        	PC18:	; $13FF - $168A
4558
 6774                        		; load string 'true ' or 'false'
4559
 6775  FE2F05  20 03 32      		JSR	L1762
4560
 6776  FE2F08  66 21         		ROR	$21		; CF = 1 if TRUE
4561
 6777  FE2F0A                		INDEX16
4562
 6778  FE2F0A  C2 10         		rep	#PXFLAG
4563
 6779                        		.LONGI	on
4564
 6780                        		.MNLIST
4565
 6781  FE2F0C  A2 AE FF      		ldx	#MFALSE		; false
4566
 6782  FE2F0F  90 03         		BCC	?02
4567
 6783  FE2F11  A2 A8 FF      		ldx	#MTRUE		; true
4568
 6784  FE2F14  86 21         	?02:	stx	$21
4569
 6785  FE2F16                		INDEX08
4570
 6786  FE2F16  E2 10         		sep	#PXFLAG
4571
 6787                        		.LONGI	off
4572
 6788                        		.MNLIST
4573
 6789  FE2F18  80 03         		bra	L13E9
4574
 6790
4575
 6791                        	PC17:	; $13E6 - $1671
4576
 6792  FE2F1A  20 03 32      		JSR	L1762
4577
 6793                        	L13E9:	; $13E9 - $1674
4578
 6794  FE2F1D  A0 00         		LDY	#$00
4579
 6795  FE2F1F  C8            	?02:	INY
4580
 6796  FE2F20  B1 21         		LDA	($21),Y
4581
 6797  FE2F22  D0 FB         		BNE	?02
4582
 6798  FE2F24  A5 23         		LDA	$23
4583
 6799  FE2F26  25 24         		AND	$24
4584
 6800  FE2F28  49 FF         		EOR	#$FF
4585
 6801  FE2F2A  D0 02         		BNE 	?04
4586
 6802  FE2F2C  84 23         		STY	$23
4587
 6803  FE2F2E  84 25         	?04:	STY	$25
4588
 6804  FE2F30  80 1C         		bra	L16AA
4589
  Tue Jul 17 11:00:23 2018                                                                                               Page   75
4590
 
4591
 
4592
 
4593
 
4594
 6805
4595
 6806                        	PC72:	; $168E - $1919
4596
 6807  FE2F32                	PC73:
4597
 6808  FE2F32  A5 24         		LDA 	$24
4598
 6809  FE2F34  85 26         		STA 	$26
4599
 6810  FE2F36  A5 23         		LDA 	$23
4600
 6811  FE2F38  85 25         		STA 	$25
4601
 6812  FE2F3A  20 03 32      		JSR 	L1762
4602
 6813  FE2F3D  A5 25         		LDA 	$25
4603
 6814  FE2F3F  49 01         		EOR 	#$01
4604
 6815  FE2F41  6A            		ROR	a
4605
 6816  FE2F42  A5 21         		LDA 	$21
4606
 6817  FE2F44  E5 25         		SBC 	$25
4607
 6818  FE2F46  85 21         		STA 	$21
4608
 6819  FE2F48  A5 22         		LDA 	$22
4609
 6820  FE2F4A  E5 26         		SBC 	$26
4610
 6821  FE2F4C  85 22         		STA 	$22
4611
 6822                        	L16AA:	; $16AA - $1935
4612
 6823  FE2F4E  A6 25         		LDX 	$25
4613
 6824  FE2F50  20 34 33      		JSR	L0E69
4614
 6825  FE2F53  A6 25         		LDX 	$25
4615
 6826  FE2F55  A5 23         		LDA 	$23
4616
 6827  FE2F57  C5 25         		CMP 	$25
4617
 6828  FE2F59  B0 01         		BCS 	?02
4618
 6829  FE2F5B  AA            		TAX
4619
 6830  FE2F5C  A0 00         	?02:	LDY 	#$00
4620
 6831  FE2F5E  CA            		DEX
4621
 6832  FE2F5F  30 0D         		BMI 	?04
4622
 6833  FE2F61  B1 21         		LDA 	($21),Y
4623
 6834  FE2F63  20 E3 32      		JSR 	L0EC4
4624
 6835  FE2F66  E6 21         		INC 	$21
4625
 6836  FE2F68  D0 F2         		BNE 	?02
4626
 6837  FE2F6A  E6 22         		INC 	$22
4627
 6838  FE2F6C  D0 EE         		BNE 	?02
4628
 6839  FE2F6E  4C CC FF      	?04:	JMP	FCLRCH
4629
 6840
4630
 6841                        	PC74:	; $1BC0 - $1E4B
4631
 6842  FE2F71                	PC75:
4632
 6843  FE2F71  20 17 2A      		JSR	L1B8B
4633
 6844  FE2F74  A5 21         		LDA 	$21
4634
 6845  FE2F76  38            		SEC
4635
 6846  FE2F77  E9 04         		SBC	#$04
4636
 6847  FE2F79  B0 02         		BCS	?02
4637
 6848  FE2F7B  C6 22         		DEC	$22
4638
 6849  FE2F7D  06 23         	?02:	ASL 	$23
4639
 6850  FE2F7F  26 24         		ROL 	$24
4640
 6851  FE2F81  38            		SEC
4641
 6852  FE2F82  E5 23         		SBC 	$23
4642
 6853  FE2F84  85 21         		STA 	$21
4643
 6854  FE2F86  A5 22         		LDA 	$22
4644
 6855  FE2F88  E5 24         		SBC 	$24
4645
 6856  FE2F8A  85 22         		STA 	$22
4646
 6857  FE2F8C  A0 00         		LDY 	#$00
4647
 6858  FE2F8E  B1 21         		LDA 	($21),Y
4648
 6859  FE2F90  85 23         		STA 	$23
4649
 6860  FE2F92  C8            		INY
4650
 6861  FE2F93  B1 21         		LDA 	($21),Y
4651
  Tue Jul 17 11:00:23 2018                                                                                               Page   76
4652
 
4653
 
4654
 
4655
 
4656
 6862  FE2F95  85 24         		STA 	$24
4657
 6863  FE2F97  C8            		INY
4658
 6864  FE2F98  B1 21         		LDA 	($21),Y
4659
 6865  FE2F9A  A0 00         		LDY 	#$00
4660
 6866  FE2F9C  20 1F 2A      		JSR 	L1B93
4661
 6867  FE2F9F  4C EC 29      		JMP	L1B45
4662
 6868
4663
 6869                        	; read string
4664
 6870                        	PC7A:	; $16D0 - $195B
4665
 6871  FE2FA2                	PC7B:
4666
 6872  FE2FA2  20 14 30      		JSR	L178B
4667
 6873  FE2FA5  48            		PHA
4668
 6874  FE2FA6  A5 23         		LDA 	$23
4669
 6875  FE2FA8  49 01         		EOR 	#$01
4670
 6876  FE2FAA  6A            		ROR	a
4671
 6877  FE2FAB  A0 02         		LDY 	#$02
4672
 6878  FE2FAD  B1 2D         		LDA 	($2D),Y
4673
 6879  FE2FAF  E5 23         		SBC	$23
4674
 6880  FE2FB1  85 21         		STA 	$21
4675
 6881  FE2FB3  C8            		INY
4676
 6882  FE2FB4  B1 2D         		LDA 	($2D),Y
4677
 6883  FE2FB6  E5 24         		SBC 	$24
4678
 6884  FE2FB8  85 22         		STA 	$22
4679
 6885  FE2FBA  68            		PLA
4680
 6886  FE2FBB  C9 20         	?02:	CMP	#$20
4681
 6887  FE2FBD  F0 08         		BEQ	?04
4682
 6888  FE2FBF  C9 0D         		CMP	#$0D
4683
 6889  FE2FC1  F0 04         		BEQ	?04
4684
 6890  FE2FC3  C9 0A         		CMP	#$0A
4685
 6891  FE2FC5  D0 05         		BNE	?06
4686
 6892  FE2FC7  20 71 31      	?04:	JSR	L0F2B
4687
 6893  FE2FCA  80 EF         		bra	?02
4688
 6894  FE2FCC  A0 00         	?06:	LDY	#$00
4689
 6895  FE2FCE  C9 0D         		CMP	#$0D
4690
 6896  FE2FD0  F0 25         		BEQ	?12
4691
 6897  FE2FD2  91 21         		STA 	($21),Y
4692
 6898  FE2FD4  E6 21         		INC 	$21
4693
 6899  FE2FD6  D0 02         		BNE	?08
4694
 6900  FE2FD8  E6 22         		INC	$22
4695
 6901  FE2FDA  A5 23         	?08:	LDA	$23
4696
 6902  FE2FDC  38            		SEC
4697
 6903  FE2FDD  E9 01         		SBC	#$01
4698
 6904  FE2FDF  85 23         		STA	$23
4699
 6905  FE2FE1  B0 02         		BCS	?09
4700
 6906  FE2FE3  C6 24         		DEC 	$24
4701
 6907  FE2FE5  05 24         	?09:	ORA 	$24
4702
 6908  FE2FE7  F0 05         		BEQ	?10
4703
 6909  FE2FE9  20 71 31      		JSR	L0F2B
4704
 6910  FE2FEC  80 DE         		bra	?06
4705
 6911  FE2FEE  20 71 31      	?10:	JSR	L0F2B
4706
 6912  FE2FF1  C9 0D         		CMP	#$0D
4707
 6913  FE2FF3  D0 F9         		BNE	?10
4708
 6914  FE2FF5  F0 17         		BEQ	?14
4709
 6915  FE2FF7  A0 FF         	?12:	LDY	#$FF
4710
 6916  FE2FF9  A9 20         		LDA	#$20
4711
 6917  FE2FFB  C8            	?13a:	INY
4712
 6918  FE2FFC  C4 23         		CPY	$23
4713
  Tue Jul 17 11:00:23 2018                                                                                               Page   77
4714
 
4715
 
4716
 
4717
 
4718
 6919  FE2FFE  F0 04         		BEQ	?13
4719
 6920  FE3000  91 21         		STA	($21),Y
4720
 6921  FE3002  D0 F7         		BNE	?13a
4721
 6922  FE3004  A9 FF         	?13:	LDA	#$FF
4722
 6923  FE3006  85 23         		STA 	$23
4723
 6924  FE3008  C6 24         		DEC 	$24
4724
 6925  FE300A  10 EB         		BPL	?12
4725
 6926  FE300C  A9 0D         		LDA	#$0D
4726
 6927  FE300E  20 8F 30      	?14:	JSR	L17B7
4727
 6928  FE3011  4C E5 1D      		JMP	SK04
4728
 6929
4729
 6930                        	L178B:	; $178B - $1A16
4730
 6931  FE3014  20 62 30      		JSR 	L17A3
4731
 6932  FE3017  20 EF 31      		JSR	L0F11
4732
 6933  FE301A  38            		SEC
4733
 6934  FE301B  A5 29         		LDA 	$29
4734
 6935  FE301D  E9 02         		SBC 	#$02
4735
 6936  FE301F  85 27         		STA 	$27
4736
 6937  FE3021  A5 2A         		LDA 	$2A
4737
 6938  FE3023  E9 00         		SBC 	#$00
4738
 6939  FE3025  85 28         		STA 	$28
4739
 6940  FE3027  A0 00         		LDY 	#$00
4740
 6941  FE3029  B1 27         		LDA 	($27),Y
4741
 6942  FE302B  60            		RTS
4742
 6943
4743
 6944                        	PC7C:	; $203F - $2ABE
4744
 6945                        	PC7D:	; execute function/procedure
4745
 6946  FE302C  A5 23         		LDA 	$23
4746
 6947  FE302E  0A            		ASL	a
4747
 6948  FE302F  AA            		TAX
4748
 6949  FE3030  24 97         		bit	runf
4749
 6950  FE3032  30 03         		bmi	?02
4750
 6951  FE3034  7C 96 3D      		jmp	(CFUNCT,X)	; compiling
4751
 6952  FE3037  7C A8 3D      	?02:	jmp	(RFUNCT,X)	; running
4752
 6953
4753
 6954                        	PC7E:	; $1FEA - $2A6D
4754
 6955                        	PC7F:	; change p-code pointer
4755
 6956  FE303A  20 1D 2B      		JSR 	L2027
4756
 6957  FE303D                		ACC16
4757
 6958  FE303D  C2 20         		rep	#PMFLAG
4758
 6959                        		.LONGA	on
4759
 6960                        		.MNLIST
4760
 6961  FE303F  B2 23         		LDA 	($23)
4761
 6962  FE3041  1A            		inc	a
4762
 6963  FE3042  92 23         		STA 	($23)
4763
 6964  FE3044                		ACC08
4764
 6965  FE3044  E2 20         		sep	#PMFLAG
4765
 6966                        		.LONGA	off
4766
 6967                        		.MNLIST
4767
 6968  FE3046  EB            		xba
4768
 6969  FE3047  49 80         		EOR 	#$80
4769
 6970  FE3049  12 23         		ORA 	($23)
4770
 6971  FE304B  D0 0B         		BNE	?04
4771
 6972  FE304D  18            		CLC
4772
 6973  FE304E  A5 2B         		LDA	$2B
4773
 6974  FE3050  69 03         		ADC	#$03
4774
 6975  FE3052  85 2B         		STA	$2B
4775
  Tue Jul 17 11:00:23 2018                                                                                               Page   78
4776
 
4777
 
4778
 
4779
 
4780
 6976  FE3054  90 02         		BCC	?04
4781
 6977  FE3056  E6 2C         		INC	$2C
4782
 6978  FE3058  60            	?04:	rts
4783
 6979
4784
 6980                        	PC3E:	; $xxxx - $3240 (CHAIN)
4785
 6981  FE3059  4C 4E 1B      		jmp	vpme07
4786
 6982
4787
 6983                        	PC3F:	; $14A7 - $1732
4788
 6984  FE305C  20 85 30      		JSR 	L17AD
4789
 6985  FE305F  88            		DEY
4790
 6986  FE3060  80 07         		bra	L148A
4791
 6987
4792
 6988                        	L17A3:	; $17A3 - $1A2E
4793
 6989  FE3062  64 3E         		STZ 	$3E		; clear error
4794
 6990  FE3064  A0 00         		ldy	#0
4795
 6991  FE3066  20 85 30      		JSR 	L17AD
4796
 6992
4797
 6993                        	L148A:	; $148A - $1715
4798
 6994  FE3069  A0 00         		LDY 	#$00
4799
 6995  FE306B  B2 29         		LDA 	($29)
4800
 6996  FE306D  29 02         		AND 	#$02
4801
 6997  FE306F  F0 1D         		BEQ 	L17B0
4802
 6998  FE3071  52 29         		EOR 	($29)
4803
 6999  FE3073  92 29         		STA 	($29)
4804
 7000  FE3075  20 EF 31      		JSR 	L0F11
4805
 7001  FE3078  20 71 31      	?02:	JSR 	L0F2B
4806
 7002  FE307B  C9 0A         		CMP 	#$0A
4807
 7003  FE307D  F0 F9         		BEQ 	?02
4808
 7004  FE307F  20 8F 30      		jsr	L17B7
4809
 7005  FE3082  4C CC FF      		JMP 	FCLRCH
4810
 7006
4811
 7007                        	L17AD:	; $17AD - $1A38
4812
 7008  FE3085  B1 2D         		LDA 	($2D),Y
4813
 7009  FE3087  85 29         		STA 	$29
4814
 7010  FE3089  C8            		INY
4815
 7011  FE308A  B1 2D         		LDA 	($2D),Y
4816
 7012  FE308C  85 2A         		STA 	$2A
4817
 7013  FE308E                	L17B0:
4818
 7014  FE308E  60            		RTS
4819
 7015
4820
 7016                        	L17B7:	; $17B7 - $1A42
4821
 7017                        		; store char
4822
 7018  FE308F  A2 00         		LDX 	#$00
4823
 7019  FE3091  C9 0D         		CMP 	#$0D
4824
 7020  FE3093  D0 04         		BNE 	?02
4825
 7021  FE3095  A9 20         		LDA 	#$20
4826
 7022  FE3097  A2 40         		LDX 	#$40
4827
 7023  FE3099  48            	?02:	PHA
4828
 7024  FE309A  86 27         		STX 	$27
4829
 7025  FE309C  A0 00         		LDY 	#$00
4830
 7026  FE309E  B2 29         		LDA 	($29)
4831
 7027  FE30A0  29 BF         		AND 	#$BF
4832
 7028  FE30A2  05 27         		ORA 	$27
4833
 7029  FE30A4  92 29         		STA 	($29)
4834
 7030  FE30A6                		ACC16
4835
 7031  FE30A6  C2 20         		rep	#PMFLAG
4836
 7032                        		.LONGA	on
4837
  Tue Jul 17 11:00:23 2018                                                                                               Page   79
4838
 
4839
 
4840
 
4841
 
4842
 7033                        		.MNLIST
4843
 7034  FE30A8  A5 29         		LDA 	$29
4844
 7035  FE30AA  3A            		dec	a
4845
 7036  FE30AB  3A            		dec	a
4846
 7037  FE30AC  85 27         		STA 	$27
4847
 7038  FE30AE                		ACC08
4848
 7039  FE30AE  E2 20         		sep	#PMFLAG
4849
 7040                        		.LONGA	off
4850
 7041                        		.MNLIST
4851
 7042  FE30B0  68            		PLA
4852
 7043  FE30B1  92 27         		STA 	($27)		; store char
4853
 7044  FE30B3  98            		TYA
4854
 7045  FE30B4  C8            		INY
4855
 7046  FE30B5  91 27         		STA 	($27),Y
4856
 7047  FE30B7  60            		RTS
4857
 7048  FE30B8
4858
 7049                        	;---------------------------------------------------------------------------
4859
 7050                        	; I/O subsystem
4860
 7051                        	;---------------------------------------------------------------------------
4861
 7052
4862
 7053                        	L0E91:	; $0E91 - $111C
4863
 7054                        		; check break from keyboard
4864
 7055  FE30B8  A5 3B         		LDA 	$3B
4865
 7056  FE30BA  29 40         		AND 	#$40
4866
 7057  FE30BC  F0 0A         		BEQ 	?02		; no detect break
4867
 7058  FE30BE  20 E1 FF      		JSR 	CHKSTOP
4868
 7059  FE30C1  D0 05         		bne	?02		; no break detected
4869
 7060  FE30C3  A2 13         		ldx	#$13		; break error
4870
 7061  FE30C5  4C 50 1B      		jmp	vpmerr
4871
 7062  FE30C8  A5 42         	?02:	lda	$42
4872
 7063  FE30CA  69 05         		adc	#$05
4873
 7064  FE30CC  85 42         		sta	$42
4874
 7065  FE30CE  60            		rts
4875
 7066
4876
 7067  FE30CF                	R0AE9:
4877
 7068                        	L0942:	; $0942 - $0AE9
4878
 7069                        		; close all open files (10 files from #2 to #11)
4879
 7070  FE30CF  A2 12         		LDX 	#MAX2LF-6	; skip first 2 entry (#0 and #1)
4880
 7071  FE30D1  BD D5 FF      	?01:	LDA 	!MFILET+5,X	; file table
4881
 7072  FE30D4  D0 05         		BNE	?04
4882
 7073  FE30D6  CA            	?02:	DEX
4883
 7074  FE30D7  CA            		DEX
4884
 7075  FE30D8  10 F7         		BPL	?01
4885
 7076  FE30DA  60            		RTS
4886
 7077  FE30DB  BD D5 FF      	?04:	LDA	!MFILET+5,X
4887
 7078  FE30DE  85 2A         		STA 	$2A
4888
 7079  FE30E0  BD D4 FF      		LDA	!MFILET+4,X
4889
 7080  FE30E3  85 29         		sta	$29
4890
 7081  FE30E5  24 97         		bit	runf
4891
 7082  FE30E7  10 12         		bpl	?06
4892
 7083  FE30E9  C5 2F         		cmp	$2F
4893
 7084  FE30EB  A5 2A         		lda	$2A
4894
 7085  FE30ED  E5 30         		sbc	$30
4895
 7086  FE30EF  B0 E5         		bcs	?02
4896
 7087  FE30F1  A5 29         		lda	$29
4897
 7088  FE30F3  C5 33         		cmp	$33
4898
 7089  FE30F5  A5 2A         		lda	$2A
4899
  Tue Jul 17 11:00:23 2018                                                                                               Page   80
4900
 
4901
 
4902
 
4903
 
4904
 7090  FE30F7  E5 34         		sbc	$34
4905
 7091  FE30F9  90 DB         		bcc	?02
4906
 7092  FE30FB  9E D4 FF      	?06:	STZ 	MFILET+4,X
4907
 7093  FE30FE  9E D5 FF      		STZ 	MFILET+5,X
4908
 7094  FE3101  8A            		TXA
4909
 7095  FE3102  DA            		phx
4910
 7096  FE3103  4A            		LSR	a
4911
 7097  FE3104  69 02         		ADC 	#$02		; skip file#0 and file #1
4912
 7098  FE3106  85 B8         		STA 	$B8
4913
 7099  FE3108  20 21 31      		JSR 	L0A5B		; R0C61
4914
 7100  FE310B  FA            		PLX
4915
 7101  FE310C  80 C8         		bra	?02
4916
 7102
4917
 7103                        	R0B28:	; $xxxx - $0B28
4918
 7104                        		; close all files in running mode
4919
 7105  FE310E  A2 00         		LDX 	#$00
4920
 7106  FE3110  86 33         		STX 	$33
4921
 7107  FE3112  86 34         		STX 	$34
4922
 7108  FE3114  CA            		DEX
4923
 7109  FE3115  86 2F         		STX 	$2F
4924
 7110  FE3117  86 30         		STX 	$30
4925
 7111  FE3119  20 CF 30      		JSR 	R0AE9
4926
 7112  FE311C  A9 01         		LDA 	#$01		; close #1 reserved to command channel
4927
 7113  FE311E  4C C3 FF      		JMP 	FCLOSE
4928
 7114
4929
 7115                        	; CLOSE ???
4930
 7116                        	L0A5B:	; $0A5B - $0C61
4931
 7117                        		; close
4932
 7118  FE3121  A0 00         		LDY 	#$00
4933
 7119  FE3123  B1 29         		LDA 	($29),Y
4934
 7120  FE3125  29 08         		AND 	#$08
4935
 7121  FE3127  F0 0A         		BEQ 	?02
4936
 7122  FE3129  48            		pha
4937
 7123  FE312A  A6 B8         		LDX 	$B8
4938
 7124  FE312C  20 C9 FF      		jsr	FSETOUT		; set file for output
4939
 7125  FE312F  68            		pla
4940
 7126  FE3130
4941
 7127                        		;;jsr	FCHROUT
4942
 7128  FE3130
4943
 7129  FE3130  20 CC FF      		jsr	FCLRCH
4944
 7130  FE3133  A5 B8         	?02:	LDA 	$B8		; close
4945
 7131  FE3135  4C C3 FF      		JMP 	FCLOSE
4946
 7132
4947
 7133  FE3138  63 6C 6F 73 65 	?20:	.DB	'close %bu', $0D
4948
               20 25 62 75 0D
4949
 7134
4950
 7135                        	L0E7C:	; $0E7C - $1107
4951
 7136                        		; print string zero-terminated
4952
 7137  FE3142  A0 00         		LDY 	#$00
4953
 7138  FE3144  B1 21         	?01:	LDA 	($21),Y
4954
 7139  FE3146  F0 06         		BEQ 	?02
4955
 7140  FE3148  20 D2 FF      		JSR 	FCHROUT
4956
 7141  FE314B  C8            		INY
4957
 7142  FE314C  D0 F6         		BNE 	?01
4958
 7143  FE314E  60            	?02:	RTS
4959
 7144
4960
 7145                        	lprint:	; long print string zero-terminated
4961
  Tue Jul 17 11:00:23 2018                                                                                               Page   81
4962
 
4963
 
4964
 
4965
 
4966
 7146  FE314F  A0 00         		LDY 	#$00
4967
 7147  FE3151  B7 76         	?01:	LDA 	[longp],Y
4968
 7148  FE3153  F0 06         		BEQ 	?02
4969
 7149  FE3155  20 D2 FF      		JSR 	FCHROUT
4970
 7150  FE3158  C8            		INY
4971
 7151  FE3159  D0 F6         		BNE 	?01
4972
 7152  FE315B  60            	?02:	RTS
4973
 7153
4974
 7154                        	L0F9B:	; $0F9B - $1226
4975
 7155  FE315C  A9 01         		LDA 	#$01
4976
 7156  FE315E  85 B8         		STA 	$B8
4977
 7157  FE3160                		ACC16
4978
 7158  FE3160  C2 20         		rep	#PMFLAG
4979
 7159                        		.LONGA	on
4980
 7160                        		.MNLIST
4981
 7161  FE3162  A9 BA FF      		lda	#MSTDF1+2	; default file #1 (disk command channel)
4982
 7162  FE3165  85 29         		STA 	$29
4983
 7163  FE3167                		ACC08
4984
 7164  FE3167  E2 20         		sep	#PMFLAG
4985
 7165                        		.LONGA	off
4986
 7166                        		.MNLIST
4987
 7167
4988
 7168                        	L0E89:	; $0E89 - $1114
4989
 7169                        		; print CR
4990
 7170  FE3169  48            		PHA
4991
 7171  FE316A  A9 0D         		LDA 	#$0D
4992
 7172  FE316C  20 D2 FF      		JSR 	FCHROUT
4993
 7173  FE316F  68            		PLA
4994
 7174  FE3170  60            		RTS
4995
 7175
4996
 7176                        	L0F2B:	; $0F2B - $11B6
4997
 7177  FE3171  84 27         		STY 	$27
4998
 7178  FE3173  A5 B8         		LDA 	$B8
4999
 7179  FE3175  D0 11         		BNE 	?01
5000
 7180  FE3177  20 B8 30      		JSR 	L0E91		; R111C
5001
 7181  FE317A  DA            		phx
5002
 7182  FE317B  5A            		phy
5003
 7183  FE317C  20 DE FF      		jsr	RDTIM
5004
 7184  FE317F  85 41         		STA 	$41
5005
 7185  FE3181  7A            		ply
5006
 7186  FE3182  FA            		plx
5007
 7187  FE3183  20 C9 34      		JSR 	L0F73		; R11FE
5008
 7188                        		;JSR 	L2C5E		; R0DEF
5009
 7189  FE3186  80 19         		bra	?03
5010
 7190                        	?01:	; $0F41 - $11CC
5011
 7191  FE3188  A0 00         		LDY 	#$00
5012
 7192  FE318A  84 90         		STY 	$90
5013
 7193  FE318C  B1 29         		LDA 	($29),Y
5014
 7194  FE318E  29 80         		AND 	#$80
5015
 7195  FE3190  D0 1E         		BNE 	?06
5016
 7196  FE3192  A5 3E         		LDA 	$3E		; current run-time error
5017
 7197  FE3194  D0 09         		BNE 	?02
5018
 7198  FE3196  20 CF FF      		JSR 	FCHRIN		; input byte
5019
 7199  FE3199  85 28         		STA 	$28
5020
 7200  FE319B  A5 90         		LDA 	$90
5021
 7201  FE319D  D0 05         		BNE 	?04
5022
 7202  FE319F  A5 28         	?02:	LDA 	$28
5023
  Tue Jul 17 11:00:23 2018                                                                                               Page   82
5024
 
5025
 
5026
 
5027
 
5028
 7203  FE31A1  A4 27         	?03:	LDY 	$27
5029
 7204  FE31A3  60            		RTS
5030
 7205  FE31A4  C9 40         	?04:	CMP 	#$40		; end of file ?
5031
 7206  FE31A6  D0 0C         		BNE 	?08
5032
 7207  FE31A8  B1 29         		LDA 	($29),Y
5033
 7208  FE31AA  09 80         		ORA 	#$80
5034
 7209  FE31AC  91 29         		STA 	($29),Y
5035
 7210  FE31AE  D0 EF         		BNE 	?02
5036
 7211  FE31B0  A2 0F         	?06:	LDX 	#$0F		; error: end of file
5037
 7212  FE31B2  80 02         		bra	?10
5038
 7213  FE31B4  A2 11         	?08:	ldx	#$11		; error: device read error
5039
 7214  FE31B6  A4 27         	?10:	LDY 	$27
5040
 7215  FE31B8  80 06         		bra	L0FAA
5041
 7216  FE31BA
5042
 7217                        	L0F25:	; $0F25 - $11B0
5043
 7218  FE31BA  A2 0D         		ldx	#$0D		; error: file not open for reading
5044
 7219  FE31BC  80 02         		bra	L0FAA
5045
 7220                        	L0EBE:	; $0EBE - $1149
5046
 7221  FE31BE  A2 0E         		ldx	#$0E		; error: file not open for writing
5047
 7222                        	L0FAA:	; $0FAA - $1235
5048
 7223  FE31C0  24 3B         		bit 	$3B		; bit 7 = 1: no errors trap
5049
 7224  FE31C2  30 07         		bmi	?04		; print error
5050
 7225  FE31C4  A5 3E         		LDA 	$3E
5051
 7226  FE31C6  D0 02         		BNE	?02
5052
 7227  FE31C8  86 3E         		STX 	$3E		; runtime error
5053
 7228  FE31CA  60            	?02:	RTS
5054
 7229  FE31CB  4C 50 1B      	?04:	JMP 	vpmerr
5055
 7230
5056
 7231  FE31CE                	R0F69:
5057
 7232                        	L0CDE:	; $0CDE - $0F69
5058
 7233                        		; open file in internal table (24 bytes, 12 files)
5059
 7234  FE31CE  A2 00         		LDX 	#$00
5060
 7235  FE31D0                		ACC16
5061
 7236  FE31D0  C2 20         		rep	#PMFLAG
5062
 7237                        		.LONGA	on
5063
 7238                        		.MNLIST
5064
 7239  FE31D2  BD D0 FF      	?02:	LDA 	!MFILET,X	; logical file table (#0 and #1 permanent)
5065
 7240  FE31D5  F0 0C         		BEQ 	?04		; free entry
5066
 7241  FE31D7  E8            		INX
5067
 7242  FE31D8  E8            		INX
5068
 7243  FE31D9  E0 18         		CPX 	#MAX2LF		; max files * 2 (22)
5069
 7244  FE31DB  D0 F5         		BNE	?02
5070
 7245  FE31DD                		ACC08
5071
 7246  FE31DD  E2 20         		sep	#PMFLAG
5072
 7247                        		.LONGA	off
5073
 7248                        		.MNLIST
5074
 7249  FE31DF  A2 10         		LDX 	#$10		; error: no free i/o channels
5075
 7250  FE31E1  80 DD         		bra	L0FAA
5076
 7251  FE31E3  A5 29         	?04:	LDA 	$29		; word
5077
 7252  FE31E5  9D D0 FF      		STA 	!MFILET,X	; fill entry on table M2CDA
5078
 7253                        	L0CFD:	; $0CFD - $0F88
5079
 7254  FE31E8                		ACC08
5080
 7255  FE31E8  E2 20         		sep	#PMFLAG
5081
 7256                        		.LONGA	off
5082
 7257                        		.MNLIST
5083
 7258  FE31EA  8A            		TXA
5084
 7259  FE31EB  4A            		LSR	a		; file number
5085
  Tue Jul 17 11:00:23 2018                                                                                               Page   83
5086
 
5087
 
5088
 
5089
 
5090
 7260  FE31EC  85 B8         		STA 	$B8
5091
 7261  FE31EE  60            	L0F10:	RTS
5092
 7262
5093
 7263                        	L0F11:	; $0F11 - $119C
5094
 7264  FE31EF  A0 00         		LDY 	#$00
5095
 7265  FE31F1  B1 29         		LDA 	($29),Y
5096
 7266  FE31F3  29 20         		AND 	#$20
5097
 7267  FE31F5  D0 C3         		BNE 	L0F25
5098
 7268  FE31F7  20 4B 32      		JSR 	L0D02
5099
 7269  FE31FA  A6 B8         		LDX 	$B8
5100
 7270  FE31FC  30 BC         		BMI 	L0F25
5101
 7271  FE31FE  F0 EE         		BEQ 	L0F10
5102
 7272  FE3200  4C C6 FF      		JMP 	FSETIN		; set file for input
5103
 7273
5104
 7274                        	L1762:	; $1762 - $19ED
5105
 7275  FE3203  A0 00         		LDY 	#$00
5106
 7276  FE3205  84 3E         		STY 	$3E
5107
 7277  FE3207                		ACC16
5108
 7278  FE3207  C2 20         		rep	#PMFLAG
5109
 7279                        		.LONGA	on
5110
 7280                        		.MNLIST
5111
 7281  FE3209  B1 2D         		LDA 	($2D),Y
5112
 7282  FE320B  85 23         		STA 	$23
5113
 7283  FE320D  C8            		INY
5114
 7284  FE320E  C8            		INY
5115
 7285  FE320F  B1 2D         		LDA 	($2D),Y
5116
 7286  FE3211  85 21         		STA 	$21
5117
 7287  FE3213  C8            		INY
5118
 7288  FE3214  C8            		INY
5119
 7289  FE3215                		ACC08
5120
 7290  FE3215  E2 20         		sep	#PMFLAG
5121
 7291                        		.LONGA	off
5122
 7292                        		.MNLIST
5123
 7293  FE3217  20 85 30      		JSR 	L17AD
5124
 7294  FE321A  A5 2D         		LDA 	$2D
5125
 7295  FE321C  18            		CLC
5126
 7296  FE321D  69 06         		ADC 	#$06
5127
 7297  FE321F  85 2D         		STA 	$2D
5128
 7298  FE3221  90 02         		BCC 	?02
5129
 7299  FE3223  E6 2E         		INC 	$2E
5130
 7300                        	?02:	;;;JMP	L0EA8
5131
 7301
5132
 7302                        	L0EA8:	; $0EA8 - $1133
5133
 7303  FE3225  A0 00         		LDY 	#$00
5134
 7304  FE3227  B1 29         		LDA 	($29),Y
5135
 7305  FE3229  29 30         		AND 	#$30
5136
 7306  FE322B  F0 91         		BEQ 	L0EBE
5137
 7307  FE322D  20 4B 32      		JSR 	L0D02
5138
 7308  FE3230  A6 B8         		LDX 	$B8
5139
 7309  FE3232  30 8A         		BMI 	L0EBE
5140
 7310  FE3234  C9 01         		CMP 	#$01
5141
 7311  FE3236  F0 B6         		BEQ	L0F10
5142
 7312  FE3238  4C C9 FF      		JMP 	FSETOUT		; set file for output
5143
 7313
5144
 7314                        	L1FC5:	; $1FC5
5145
 7315  FE323B                		ACC16
5146
 7316  FE323B  C2 20         		rep	#PMFLAG
5147
  Tue Jul 17 11:00:23 2018                                                                                               Page   84
5148
 
5149
 
5150
 
5151
 
5152
 7317                        		.LONGA	on
5153
 7318                        		.MNLIST
5154
 7319  FE323D  B2 2D         		LDA	($2D)
5155
 7320  FE323F  85 21         		STA	$21
5156
 7321  FE3241  C8            		INY
5157
 7322  FE3242  C8            		INY
5158
 7323  FE3243  B1 2D         		LDA	($2D),Y
5159
 7324  FE3245  85 29         		STA	$29
5160
 7325  FE3247                		ACC08
5161
 7326  FE3247  E2 20         		sep	#PMFLAG
5162
 7327                        		.LONGA	off
5163
 7328                        		.MNLIST
5164
 7329  FE3249  80 DA         		bra	L0EA8
5165
 7330
5166
 7331  FE324B                	R0F8D:
5167
 7332                        	L0D02:	; $0D02 - $0F8D
5168
 7333                        		; search file in internal table
5169
 7334  FE324B  A2 FF         		LDX 	#$FF
5170
 7335  FE324D  86 B8         		STX 	$B8		; invalid file
5171
 7336  FE324F  E8            		INX
5172
 7337  FE3250                		ACC16
5173
 7338  FE3250  C2 20         		rep	#PMFLAG
5174
 7339                        		.LONGA	on
5175
 7340                        		.MNLIST
5176
 7341  FE3252  BD D0 FF      	?02:	LDA 	!MFILET,X	; scan logical file table
5177
 7342  FE3255  C5 29         		CMP 	$29
5178
 7343  FE3257  F0 8F         		BEQ	L0CFD		; found
5179
 7344  FE3259  E8            		INX
5180
 7345  FE325A  E8            		INX
5181
 7346  FE325B  E0 18         		CPX 	#MAX2LF		; max files * 2
5182
 7347  FE325D  D0 F3         		BNE	?02
5183
 7348  FE325F                		ACC08
5184
 7349  FE325F  E2 20         		sep	#PMFLAG
5185
 7350                        		.LONGA	off
5186
 7351                        		.MNLIST
5187
 7352  FE3261  60            	_?rs:	rts
5188
 7353
5189
 7354                        	L2CAA:	; $2CAA - $0E3B
5190
 7355                        		; send char to printer
5191
 7356  FE3262  85 49         		STA 	tmpa
5192
 7357  FE3264  20 A8 FF      		JSR 	CIOUT
5193
 7358  FE3267  A5 49         		LDA 	tmpa
5194
 7359  FE3269  C9 0D         		CMP 	#$0D
5195
 7360  FE326B  D0 F4         		BNE 	_?rs
5196
 7361  FE326D  A5 52         		LDA 	autolf		; send LF if not zero
5197
 7362  FE326F  F0 F0         		BEQ 	_?rs		; auto line feed flag
5198
 7363  FE3271  A9 0A         		LDA 	#$0A
5199
 7364  FE3273  4C A8 FF      		JMP 	CIOUT
5200
 7365
5201
 7366                        	L0D1C:	; $0D1C - $0FA7
5202
 7367                        		; print integer - $21-$22 = integer, $23 = size of the print field
5203
 7368  FE3276  A2 00         		LDX 	#$00
5204
 7369  FE3278  A5 22         		LDA 	$22		; $21-$22 = integer
5205
 7370  FE327A  08            		PHP
5206
 7371  FE327B  24 97         		bit	runf		; when compile print unsigned
5207
 7372  FE327D                		ACC16
5208
 7373  FE327D  C2 20         		rep	#PMFLAG
5209
  Tue Jul 17 11:00:23 2018                                                                                               Page   85
5210
 
5211
 
5212
 
5213
 
5214
 7374                        		.LONGA	on
5215
 7375                        		.MNLIST
5216
 7376  FE327F  10 0B         		bpl	?02		; compiler: no 2's complement
5217
 7377  FE3281  A5 21         		LDA 	$21		; $21-$22 = integer
5218
 7378  FE3283  10 07         		bpl	?02
5219
 7379  FE3285  49 FF FF      		eor	#$FFFF
5220
 7380  FE3288  1A            		inc	a
5221
 7381  FE3289  85 21         		STA 	$21
5222
 7382  FE328B  E8            		INX
5223
 7383  FE328C  A0 00         	?02:	LDY 	#$00
5224
 7384  FE328E  38            		sec
5225
 7385  FE328F  E8            	?04:	INX
5226
 7386                        		;SEC
5227
 7387  FE3290  A5 21         		LDA 	$21
5228
 7388  FE3292  F9 9E FF      		SBC	!MPOW10,y
5229
 7389  FE3295  C8            		INY
5230
 7390  FE3296  C8            		INY
5231
 7391  FE3297  B0 F6         		BCS 	?04
5232
 7392  FE3299                		ACC08
5233
 7393  FE3299  E2 20         		sep	#PMFLAG
5234
 7394                        		.LONGA	off
5235
 7395                        		.MNLIST
5236
 7396  FE329B  20 34 33      		JSR 	L0E69		; print blanks
5237
 7397  FE329E  28            		PLP
5238
 7398  FE329F  10 09         		BPL	?06
5239
 7399  FE32A1  24 97         		bit	runf		; when compile print unsigned
5240
 7400  FE32A3  10 05         		bpl	?06
5241
 7401  FE32A5  A9 2D         		LDA 	#$2D
5242
 7402  FE32A7  20 E3 32      		JSR 	L0EC4		; print sign
5243
 7403  FE32AA  38            	?06:	SEC
5244
 7404  FE32AB  08            		PHP
5245
 7405  FE32AC  A0 08         		LDY 	#$08
5246
 7406  FE32AE                		ACC16
5247
 7407  FE32AE  C2 20         		rep	#PMFLAG
5248
 7408                        		.LONGA	on
5249
 7409                        		.MNLIST
5250
 7410  FE32B0  A2 2F         	?08:	LDX 	#$2F
5251
 7411  FE32B2  38            		sec
5252
 7412  FE32B3  E8            	?10:	INX
5253
 7413                        		;SEC
5254
 7414  FE32B4  A5 21         		LDA 	$21
5255
 7415  FE32B6  F9 9C FF      		SBC	!MPOW10-2,y
5256
 7416  FE32B9  85 21         		STA 	$21
5257
 7417  FE32BB  B0 F6         		BCS 	?10
5258
 7418  FE32BD                		ACC08
5259
 7419  FE32BD  E2 20         		sep	#PMFLAG
5260
 7420                        		.LONGA	off
5261
 7421                        		.MNLIST
5262
 7422  FE32BF  8A            		txa
5263
 7423  FE32C0  C9 30         		CMP 	#$30
5264
 7424  FE32C2  D0 04         		BNE 	?12
5265
 7425  FE32C4  28            		PLP
5266
 7426  FE32C5  B0 06         		BCS 	?14
5267
 7427  FE32C7  08            		PHP
5268
 7428  FE32C8  20 E3 32      	?12:	JSR 	L0EC4		; print digit
5269
 7429  FE32CB  28            		PLP
5270
 7430  FE32CC  18            		clc
5271
  Tue Jul 17 11:00:23 2018                                                                                               Page   86
5272
 
5273
 
5274
 
5275
 
5276
 7431  FE32CD  08            	?14:	php
5277
 7432  FE32CE                		ACC16CLC
5278
 7433  FE32CE  C2 21         		rep	#(PMFLAG.OR.PCFLAG)
5279
 7434                        		.LONGA	on
5280
 7435                        		.MNLIST
5281
 7436  FE32D0  A5 21         		LDA 	$21
5282
 7437  FE32D2  79 9C FF      		ADC	!MPOW10-2,y
5283
 7438  FE32D5  85 21         		STA 	$21
5284
 7439  FE32D7  88            		DEY
5285
 7440  FE32D8  88            		DEY
5286
 7441  FE32D9  D0 D5         		BNE 	?08
5287
 7442  FE32DB                		ACC08
5288
 7443  FE32DB  E2 20         		sep	#PMFLAG
5289
 7444                        		.LONGA	off
5290
 7445                        		.MNLIST
5291
 7446  FE32DD  28            		plp
5292
 7447  FE32DE  A5 21         		LDA 	$21
5293
 7448  FE32E0  18            		CLC
5294
 7449  FE32E1  69 30         		ADC 	#$30
5295
 7450
5296
 7451                        	L0EC4:	; $0EC4 - $114F
5297
 7452                        		; write char to text device
5298
 7453  FE32E3  08            		PHP
5299
 7454  FE32E4  85 4A         		sta	tmpwa
5300
 7455  FE32E6  84 44         		STY 	tmpy
5301
 7456  FE32E8  86 4B         		stx	tmpx
5302
 7457  FE32EA  A4 B8         		LDY 	$B8
5303
 7458  FE32EC  C0 01         		CPY 	#$01
5304
 7459  FE32EE  F0 2C         		BEQ	?03		; to command channel
5305
 7460  FE32F0  A4 BA         		LDY 	$BA
5306
 7461  FE32F2  C0 03         		CPY	#$03
5307
 7462  FE32F4  F0 26         		BEQ 	?03		; to screen
5308
 7463  FE32F6  90 24         		BCC	?03
5309
 7464  FE32F8  A8            		tay
5310
 7465  FE32F9  B2 29         		LDA 	($29)
5311
 7466  FE32FB  89 04         		bit 	#$04
5312
 7467  FE32FD  F0 06         		BEQ 	?01		; no printer
5313
 7468  FE32FF  98            		tya
5314
 7469  FE3300  20 62 32      		JSR 	L2CAA		; send to printer
5315
 7470  FE3303  80 1A         		bra	?04
5316
 7471  FE3305  29 08         	?01:	AND 	#$08
5317
 7472  FE3307  A8            		TAY
5318
 7473  FE3308  A5 4A         		lda	tmpwa
5319
 7474  FE330A  C0 00         		CPY 	#$00
5320
 7475  FE330C  D0 0E         		BNE 	?03
5321
 7476  FE330E  C9 0D         		CMP 	#$0D
5322
 7477  FE3310  F0 05         		BEQ 	?02
5323
 7478  FE3312  20 A8 FF      		JSR 	CIOUT
5324
 7479  FE3315  80 08         		bra	?04
5325
 7480  FE3317  20 A8 FF      	?02:	JSR 	CIOUT
5326
 7481  FE331A  80 03         		bra	?04
5327
 7482  FE331C  20 D2 FF      	?03:	JSR 	FCHROUT
5328
 7483  FE331F  20 B8 30      	?04:	JSR 	L0E91
5329
 7484  FE3322  A6 4B         		ldx	tmpx
5330
 7485  FE3324  A4 44         		LDY 	tmpy
5331
 7486  FE3326  A5 4A         		lda	tmpwa
5332
 7487  FE3328  28            		PLP
5333
  Tue Jul 17 11:00:23 2018                                                                                               Page   87
5334
 
5335
 
5336
 
5337
 
5338
 7488  FE3329  60            	_?rs1:	RTS
5339
 7489
5340
 7490                        	L29B6:	; $29B6 - $2F98
5341
 7491                        		; print a blank or minus sign
5342
 7492  FE332A  A9 20         		LDA	#$20
5343
 7493  FE332C  24 66         		BIT	$66
5344
 7494  FE332E  10 B3         		BPL	L0EC4
5345
 7495  FE3330  A9 2D         		LDA	#$2D
5346
 7496  FE3332  80 AF         		bra	L0EC4
5347
 7497
5348
 7498                        	L0E69:	; $0E69 - $10F4
5349
 7499  FE3334  8A            		TXA
5350
 7500  FE3335  49 FF         		EOR 	#$FF
5351
 7501  FE3337  38            		SEC
5352
 7502  FE3338  65 23         		ADC 	$23
5353
 7503  FE333A  AA            		TAX
5354
 7504  FE333B  CA            	?01:	DEX
5355
 7505  FE333C  30 EB         		BMI	_?rs1
5356
 7506  FE333E  A9 20         		LDA 	#$20
5357
 7507  FE3340  20 E3 32      		JSR 	L0EC4
5358
 7508  FE3343  80 F6         		bra	?01
5359
 7509
5360
 7510                        	L0A73:	; $0A73 - $0C79
5361
 7511                        		; handle disk error
5362
 7512                        		;LDX 	#$01		; file #1
5363
 7513                        		;JSR 	FSETIN		; channel command in input
5364
 7514  FE3345  20 CC FF      		jsr	FCLRCH
5365
 7515  FE3348  24 7C         		bit	pcdsk
5366
 7516  FE334A  10 06         		bpl	?rd		; compile/exec on real disk
5367
 7517  FE334C  64 21         		stz	$21		; no real disk error
5368
 7518  FE334E
5369
 7519  FE334E  A9 00         		lda	#0		; no error
5370
 7520  FE3350  80 36         		bra	?rd2
5371
 7521  FE3352
5372
 7522  FE3352  A5 A1         	?rd:	lda	tbnk		; destination buffer
5373
 7523  FE3354  48            		pha
5374
 7524  FE3355  F4 04 FF      		pea	#TXTBUF
5375
 7525  FE3358  F4 A1 00      		pea	#TBUFMAX-1	; size
5376
 7526  FE335B  A9 0F         		lda	#$0F		; command chnl
5377
 7527  FE335D  48            		pha
5378
 7528  FE335E                		CBMFSRD			; get error string
5379
 7529  FE335E  02 81         		cop	FN_CBMFSRW
5380
 7530  FE3360  00            		.DB	$00
5381
 7531                        		.MNLIST
5382
 7532  FE3361  8B            		phb
5383
 7533  FE3362  A5 A1         		lda	tbnk
5384
 7534  FE3364  48            		pha
5385
 7535  FE3365  AB            		plb
5386
 7536  FE3366  AD 04 FF      		lda	!TXTBUF
5387
 7537  FE3369  29 0F         		and	#$0F
5388
 7538  FE336B  0A            		asl	a
5389
 7539  FE336C  85 21         		sta	$21
5390
 7540  FE336E  0A            		asl	a
5391
 7541  FE336F  0A            		asl	a
5392
 7542  FE3370  65 21         		adc	$21
5393
 7543  FE3372  85 21         		sta	$21
5394
 7544  FE3374  AD 05 FF      		lda	!TXTBUF+1
5395
  Tue Jul 17 11:00:23 2018                                                                                               Page   88
5396
 
5397
 
5398
 
5399
 
5400
 7545  FE3377  AB            		plb
5401
 7546  FE3378  29 0F         		and	#$0F
5402
 7547  FE337A  65 21         		adc	$21
5403
 7548  FE337C  85 21         		sta	$21
5404
 7549  FE337E  F0 08         		beq	?rd2		; no error
5405
 7550  FE3380  C9 14         		cmp	#20		; below 20 no disk error
5406
 7551  FE3382  A9 00         		lda	#0
5407
 7552  FE3384  90 02         		bcc	?rd2
5408
 7553  FE3386  A9 1B         		lda	#MAXVPME	; disk error
5409
 7554  FE3388  85 3E         	?rd2:	sta	$3E
5410
 7555  FE338A
5411
 7556                        		;jsr	FCHRIN		; get error code
5412
 7557                        		;sta	$21
5413
 7558                        		;jsr	FCLRCH
5414
 7559                        		;LDA 	$21		; error code
5415
 7560                        		;STA 	$3E		; error code from disk
5416
 7561  FE338A
5417
 7562  FE338A  F0 9D         		BEQ 	_?rs1		; no disk error
5418
 7563  FE338C  A5 3B         		LDA 	$3B
5419
 7564  FE338E  29 80         		AND 	#$80
5420
 7565  FE3390  F0 97         		BEQ 	_?rs1		; trap i/o error
5421
 7566  FE3392  A5 29         		lda	$29		; save current file desc
5422
 7567  FE3394  85 71         		sta	fbufpt
5423
 7568  FE3396  A5 2A         		lda	$2A
5424
 7569  FE3398  85 72         		sta	fbufpt+1
5425
 7570  FE339A  20 5C 31      		JSR 	L0F9B		; reset file #1 and print CR
5426
 7571  FE339D  64 3B         		stz	$3B
5427
 7572  FE339F  A6 3E         		ldx	$3E		; error code
5428
 7573  FE33A1  E0 1B         		cpx	#MAXVPME
5429
 7574  FE33A3  90 12         		bcc	?er0		; no disk error
5430
 7575  FE33A5  A5 A1         		lda	tbnk
5431
 7576  FE33A7  85 78         		sta	longp+2		; error string from disk
5432
 7577  FE33A9  A9 04         		lda	#<TXTBUF
5433
 7578  FE33AB  85 76         		sta	longp
5434
 7579  FE33AD  A9 FF         		lda	#>TXTBUF
5435
 7580  FE33AF  85 77         		sta	longp+1
5436
 7581  FE33B1  A5 21         		lda	$21
5437
 7582  FE33B3  85 3E         		sta	$3E		; disk error code
5438
 7583  FE33B5  80 03         		bra	?er1
5439
 7584  FE33B7  20 39 1C      	?er0:	jsr	vpmsrch		; search error string - store ptr in longp
5440
 7585
5441
 7586                        		; now format and print error message
5442
 7587  FE33BA
5443
 7588  FE33BA  A4 B7         	?er1:	ldy	$B7
5444
 7589  FE33BC  D0 12         		bne	?02a		; file name
5445
 7590
5446
 7591  FE33BE  A5 78         		lda	longp+2		; param 3: error string pointer
5447
 7592  FE33C0  48            		pha
5448
 7593  FE33C1  D4 76         		pei	(longp)
5449
 7594  FE33C3  A5 3E         		lda	$3E		; param 2: error code
5450
 7595  FE33C5  48            		pha
5451
 7596  FE33C6  A9 FE         		lda	#^STRFMT1A	; param 1: format string
5452
 7597  FE33C8  48            		pha
5453
 7598  FE33C9  F4 6D 3E      		pea	#STRFMT1A
5454
 7599  FE33CC  A9 08         		lda	#$08		; param 0: number of total bytes
5455
 7600  FE33CE  80 15         		bra	?pr
5456
 7601
5457
  Tue Jul 17 11:00:23 2018                                                                                               Page   89
5458
 
5459
 
5460
 
5461
 
5462
 7602                        		;stz	!MTMPB0
5463
 7603                        		;ACC16
5464
 7604                        		;lda	$BB		; set an empty string if no file name
5465
 7605                        		;bne	?02a
5466
 7606                        		;lda	#MTMPB0
5467
 7607                        		;sta	$BB
5468
 7608                        	?02a:	;ACC08
5469
 7609
5470
 7610  FE33D0  A5 BD         		lda	$BD		; param 4: file name pointer
5471
 7611  FE33D2  48            		pha
5472
 7612  FE33D3  D4 BB         		pei	($BB)
5473
 7613  FE33D5  A5 78         		lda	longp+2		; param 3: error string pointer
5474
 7614  FE33D7  48            		pha
5475
 7615  FE33D8  D4 76         		pei	(longp)
5476
 7616  FE33DA  A5 3E         		lda	$3E		; param 2: error code
5477
 7617  FE33DC  48            		pha
5478
 7618  FE33DD  A9 FE         		lda	#^STRFMT1	; param 1: format string
5479
 7619  FE33DF  48            		pha
5480
 7620  FE33E0  F4 4B 3E      		pea	#STRFMT1
5481
 7621  FE33E3  A9 0B         		lda	#$0B		; param 0: number of total bytes
5482
 7622  FE33E5  48            	?pr:	pha
5483
 7623  FE33E6                		BPRINTF
5484
 7624  FE33E6  02 11         		cop	$11
5485
 7625                        		.MNLIST
5486
 7626                        		;;JSR 	L0E89
5487
 7627  FE33E8  4C 7C 1B      		JMP 	vpmerr2
5488
 7628
5489
 7629                        	L09C2:	; $09C2 - $0BC8
5490
 7630                        		; prepare for open a disk file
5491
 7631  FE33EB  64 3E         		STZ 	$3E		; clear runtime error
5492
 7632  FE33ED                		ACC16
5493
 7633  FE33ED  C2 20         		rep	#PMFLAG
5494
 7634                        		.LONGA	on
5495
 7635                        		.MNLIST
5496
 7636  FE33EF  B2 2D         		LDA 	($2D)
5497
 7637  FE33F1  85 21         		STA 	$21
5498
 7638  FE33F3  C8            		INY
5499
 7639  FE33F4  C8            		INY
5500
 7640  FE33F5  B1 2D         		LDA 	($2D),Y
5501
 7641  FE33F7  38            		SEC
5502
 7642  FE33F8  E9 03 00      		SBC 	#$0003
5503
 7643  FE33FB  91 2D         		STA 	($2D),Y
5504
 7644  FE33FD  85 29         		STA 	$29
5505
 7645  FE33FF  88            		dey
5506
 7646  FE3400  91 29         		STA 	($29),Y
5507
 7647  FE3402                		ACC08
5508
 7648  FE3402  E2 20         		sep	#PMFLAG
5509
 7649                        		.LONGA	off
5510
 7650                        		.MNLIST
5511
 7651  FE3404  20 4B 32      		JSR 	L0D02		; search file
5512
 7652  FE3407  A5 B8         		LDA 	$B8
5513
 7653  FE3409  30 05         		BMI 	?02		; no file in internal table
5514
 7654  FE340B  20 21 31      		JSR 	L0A5B		; close file
5515
 7655  FE340E  80 03         		bra	?04
5516
 7656  FE3410  20 CE 31      	?02:	JSR 	L0CDE		; open file in internal table
5517
 7657  FE3413  A5 3E         	?04:	LDA 	$3E
5518
 7658  FE3415  F0 01         		beq	?044
5519
  Tue Jul 17 11:00:23 2018                                                                                               Page   90
5520
 
5521
 
5522
 
5523
 
5524
 7659  FE3417  60            		rts
5525
 7660                        		;BNE 	?14		; exit if any error
5526
 7661  FE3418  A5 21         	?044:	LDA 	$21
5527
 7662  FE341A  05 22         		ORA 	$22
5528
 7663                        		;;BNE 	?06		; file name was specified
5529
 7664  FE341C  F0 3E         		beq 	?05		; file name was not specified
5530
 7665
5531
 7666  FE341E  B2 21         		lda	($21)
5532
 7667  FE3420  C9 40         		cmp	#'@'
5533
 7668  FE3422  D0 06         		bne	?04a
5534
 7669  FE3424  E6 21         		inc	$21
5535
 7670  FE3426  D0 02         		bne	?04a
5536
 7671  FE3428  E6 22         		inc	$22
5537
 7672  FE342A  A0 01         	?04a:	ldy	#1
5538
 7673  FE342C  B1 21         		lda	($21),y
5539
 7674  FE342E  C9 3A         		cmp	#':'
5540
 7675  FE3430  F0 3A         		beq	?06		; drive present 'x:'
5541
 7676  FE3432  88            		dey
5542
 7677  FE3433  B1 21         	?04b:	lda	($21),y
5543
 7678  FE3435  99 7E FF      		sta	MTMPB0,y
5544
 7679  FE3438  F0 0E         		beq	?04c
5545
 7680  FE343A  C9 20         		cmp	#' '
5546
 7681  FE343C  F0 0A         		beq	?04c
5547
 7682  FE343E  C8            		iny
5548
 7683  FE343F  C0 11         		cpy	#17
5549
 7684  FE3441  90 F0         		bcc	?04b
5550
 7685  FE3443  A9 00         		lda	#0
5551
 7686  FE3445  99 7D FF      		sta	MTMPB0-1,y
5552
 7687  FE3448  A9 30         	?04c:	lda	#'0'
5553
 7688  FE344A  8D 7C FF      		sta	!MTMPB0-2
5554
 7689  FE344D  A9 3A         		lda	#':'
5555
 7690  FE344F  8D 7D FF      		sta	!MTMPB0-1
5556
 7691  FE3452  A9 7C         		LDA 	#<MTMPW1	; local buffer file name
5557
 7692  FE3454  85 21         		STA 	$21
5558
 7693  FE3456  A9 FF         		LDA 	#>MTMPW1
5559
 7694  FE3458  85 22         		STA 	$22
5560
 7695  FE345A  80 10         		bra	?06
5561
 7696  FE345C
5562
 7697  FE345C  A9 8F         	?05:	lda	#<MTMPNAM	; setup temp. file
5563
 7698  FE345E  85 21         		sta	$21
5564
 7699  FE3460  A9 FF         		lda	#>MTMPNAM	; temp. file name '0:PCODEV01.XTN'
5565
 7700  FE3462  85 22         		sta	$22
5566
 7701  FE3464  A5 B8         		lda	$B8		; #file number 2..11
5567
 7702  FE3466  18            		clc
5568
 7703  FE3467  69 2E         		adc	#$2E		; '0'..'9'
5569
 7704  FE3469  8D 9C FF      		sta	!MTMPNAM+$0D	; N = '0'..'9'
5570
 7705                        	?06:	; compiler bug -- store one more '@' in front
5571
 7706                        		; avoid this - skip '@' if one at beginning
5572
 7707  FE346C  B2 21         		lda	($21)
5573
 7708  FE346E  C9 40         		cmp	#'@'
5574
 7709  FE3470  D0 06         		bne	?07
5575
 7710  FE3472  E6 21         		inc	$21
5576
 7711  FE3474  D0 02         		bne	?07
5577
 7712  FE3476  E6 22         		inc	$22
5578
 7713  FE3478  A9 D0         	?07:	LDA 	#<GFNAME	; global buffer file name
5579
 7714  FE347A  85 BB         		STA 	$BB
5580
 7715  FE347C  A9 FF         		LDA 	#>GFNAME
5581
  Tue Jul 17 11:00:23 2018                                                                                               Page   91
5582
 
5583
 
5584
 
5585
 
5586
 7716  FE347E  85 BC         		STA 	$BC
5587
 7717  FE3480  A5 A1         		lda	tbnk		; text bank
5588
 7718  FE3482  85 BD         		sta	$BD		; bank
5589
 7719  FE3484  A0 00         		LDY 	#$00
5590
 7720  FE3486  A9 40         		LDA 	#$40		; put '@' - replace file on disk if write
5591
 7721  FE3488  97 BB         		STA 	[$BB],Y
5592
 7722  FE348A  B1 21         	?08:	LDA 	($21),Y
5593
 7723  FE348C  C8            		INY
5594
 7724  FE348D  C9 61         		CMP 	#'a'
5595
 7725  FE348F  90 06         		BCC 	?10
5596
 7726  FE3491  C9 7B         		CMP 	#'z'+1
5597
 7727  FE3493  B0 02         		BCS 	?10
5598
 7728  FE3495  29 DF         		and	#$DF
5599
 7729  FE3497  C9 00         	?10:	CMP 	#$00		; #0 is string terminator
5600
 7730  FE3499  F0 0B         		BEQ 	?12
5601
 7731  FE349B  C9 20         		CMP 	#$20
5602
 7732  FE349D  F0 07         		BEQ 	?12		; blank is a string terminator
5603
 7733  FE349F  97 BB         		STA 	[$BB],Y
5604
 7734  FE34A1  C0 12         		CPY 	#MAXFNLEN-1	; one more room for '@'
5605
 7735  FE34A3  90 E5         		bcc 	?08
5606
 7736  FE34A5  C8            		INY			; trunc file name if exceed
5607
 7737  FE34A6  A9 2C         	?12:	lda	#','		; put final ',s,w'
5608
 7738  FE34A8  97 BB         		sta	[$BB],y
5609
 7739  FE34AA  C8            		iny
5610
 7740  FE34AB  A9 53         		lda	#'S'
5611
 7741  FE34AD  97 BB         		sta	[$BB],y
5612
 7742  FE34AF  C8            		iny
5613
 7743  FE34B0  A9 2C         		lda	#','
5614
 7744  FE34B2  97 BB         		sta	[$BB],y
5615
 7745  FE34B4  C8            		iny
5616
 7746  FE34B5  A9 57         		lda	#'W'
5617
 7747  FE34B7  97 BB         		sta	[$BB],y
5618
 7748  FE34B9  C8            		iny
5619
 7749  FE34BA  A9 00         		lda	#0
5620
 7750  FE34BC  97 BB         		STA 	[$BB],Y		; store terminator
5621
 7751  FE34BE  84 B7         		STY 	$B7		; filename lenght
5622
 7752  FE34C0  A5 B8         		LDA 	$B8
5623
 7753                        		;and	#$3F
5624
 7754                        		;ora	#$80
5625
 7755  FE34C2  85 B9         		STA 	$B9		; secondary address = file number
5626
 7756  FE34C4  A9 08         		LDA 	#$08		; virtual iec disk #number
5627
 7757  FE34C6  85 BA         		STA 	$BA
5628
 7758  FE34C8  60            	?14:	RTS
5629
 7759
5630
 7760                        	L0F73:	; $0F73 - $11FE
5631
 7761                        		; get byte from input buffer -- with boundary check
5632
 7762  FE34C9  A4 45         		LDY	inqidx
5633
 7763  FE34CB  C4 46         		CPY	inqcnt
5634
 7764  FE34CD  D0 1F         		BNE	?04
5635
 7765  FE34CF  A0 00         		LDY	#$00
5636
 7766  FE34D1  84 45         		STY 	inqidx
5637
 7767  FE34D3  20 CF FF      	?02:	JSR	FCHRIN
5638
 7768  FE34D6  99 00 FF      		STA	!MINBUF,Y
5639
 7769  FE34D9  C8            		INY
5640
 7770  FE34DA  C0 5A         		cpy	#QINSIZ		; check boundary
5641
 7771  FE34DC  90 05         		bcc	?03		; room available
5642
 7772  FE34DE  A9 0D         		lda	#$0D		; terminate input
5643
  Tue Jul 17 11:00:23 2018                                                                                               Page   92
5644
 
5645
 
5646
 
5647
 
5648
 7773  FE34E0  99 FF FE      		STA	!MINBUF-1,Y
5649
 7774                        		;sta	$ff00-1,y
5650
 7775  FE34E3  C9 0D         	?03:	CMP	#$0D
5651
 7776  FE34E5  D0 EC         		BNE	?02
5652
 7777  FE34E7  84 46         		STY	inqcnt
5653
 7778  FE34E9  20 D2 FF      		JSR	FCHROUT
5654
 7779  FE34EC  A4 45         		LDY	inqidx
5655
 7780  FE34EE  E6 45         	?04:	INC	inqidx
5656
 7781  FE34F0  B9 00 FF      		LDA	!MINBUF,Y
5657
 7782  FE34F3  60            		RTS
5658
 7783
5659
 7784                        	;---------------------------------------------------------------------------
5660
 7785                        	; external function's used by compiler
5661
 7786                        	;---------------------------------------------------------------------------
5662
 7787
5663
 7788                        	L084E:	; $1C33 - ($084E)
5664
 7789                        		; evaluate floating point constant
5665
 7790                        		.GLOBAL L084E
5666
 7791  FE34F4                		ACC16
5667
 7792  FE34F4  C2 20         		rep	#PMFLAG
5668
 7793                        		.LONGA	on
5669
 7794                        		.MNLIST
5670
 7795  FE34F6  38            		SEC
5671
 7796  FE34F7  B1 2D         		LDA 	($2D),Y
5672
 7797  FE34F9  E9 50 00      		SBC	#$0050
5673
 7798  FE34FC  85 7A         		STA	$7A
5674
 7799  FE34FE                		ACC08
5675
 7800  FE34FE  E2 20         		sep	#PMFLAG
5676
 7801                        		.LONGA	off
5677
 7802                        		.MNLIST
5678
 7803  FE3500  20 C6 98      		JSR	XBCF3P
5679
 7804  FE3503  AA            		TAX			; X = 0 if all ok
5680
 7805  FE3504                		ACC16
5681
 7806  FE3504  C2 20         		rep	#PMFLAG
5682
 7807                        		.LONGA	on
5683
 7808                        		.MNLIST
5684
 7809  FE3506  A0 02         		LDY	#$02
5685
 7810  FE3508  B1 2D         		LDA	($2D),Y
5686
 7811  FE350A  3A            		dec	a
5687
 7812  FE350B  3A            		dec	a
5688
 7813  FE350C  85 27         		STA	$27
5689
 7814  FE350E  C8            		INY
5690
 7815  FE350F  C8            		iny
5691
 7816  FE3510  B1 2D         		LDA	($2D),Y
5692
 7817  FE3512  3A            		dec	a
5693
 7818  FE3513  3A            		dec	a
5694
 7819  FE3514  85 23         		STA	$23
5695
 7820  FE3516  C8            		INY
5696
 7821  FE3517  C8            		iny
5697
 7822  FE3518  B1 2D         		LDA	($2D),Y
5698
 7823  FE351A  3A            		dec	a
5699
 7824  FE351B  3A            		dec	a
5700
 7825  FE351C  85 25         		STA	$25
5701
 7826  FE351E  C8            		iny
5702
 7827  FE351F                		ACC08
5703
 7828  FE351F  E2 20         		sep	#PMFLAG
5704
 7829                        		.LONGA	off
5705
  Tue Jul 17 11:00:23 2018                                                                                               Page   93
5706
 
5707
 
5708
 
5709
 
5710
 7830                        		.MNLIST
5711
 7831  FE3521  A9 00         		LDA	#$00
5712
 7832  FE3523  91 2D         		STA	($2D),Y
5713
 7833  FE3525  E0 00         		CPX	#$00
5714
 7834  FE3527  D0 04         		BNE	?16
5715
 7835  FE3529  A9 01         		LDA	#$01
5716
 7836  FE352B  91 2D         		STA	($2D),Y
5717
 7837  FE352D  88            	?16:	DEY
5718
 7838  FE352E  91 2D         		STA	($2D),Y
5719
 7839  FE3530                		ACC16
5720
 7840  FE3530  C2 20         		rep	#PMFLAG
5721
 7841                        		.LONGA	on
5722
 7842                        		.MNLIST
5723
 7843  FE3532  AD E8 FF      		lda	!FAC1TMP
5724
 7844  FE3535  92 25         		STA	($25)
5725
 7845  FE3537  AD EA FF      		lda	!FAC1TMP+2
5726
 7846  FE353A  92 27         		STA	($27)
5727
 7847  FE353C                		ACC08
5728
 7848  FE353C  E2 20         		sep	#PMFLAG
5729
 7849                        		.LONGA	off
5730
 7850                        		.MNLIST
5731
 7851  FE353E  A9 00         		lda	#$00
5732
 7852  FE3540  EB            		xba
5733
 7853  FE3541  AD EC FF      		lda	!FAC1TMP+4
5734
 7854  FE3544                		ACC16CLC
5735
 7855  FE3544  C2 21         		rep	#(PMFLAG.OR.PCFLAG)
5736
 7856                        		.LONGA	on
5737
 7857                        		.MNLIST
5738
 7858  FE3546  92 23         		STA	($23)
5739
 7859  FE3548  A5 2D         		LDA	$2D
5740
 7860  FE354A  69 06 00      		ADC	#$0006
5741
 7861  FE354D  85 2D         		STA	$2D
5742
 7862  FE354F                		ACC08
5743
 7863  FE354F  E2 20         		sep	#PMFLAG
5744
 7864                        		.LONGA	off
5745
 7865                        		.MNLIST
5746
 7866  FE3551  60            		RTS
5747
 7867
5748
 7868                        	L0851:	; $1D1C ($0851)
5749
 7869                        		; search reserved words
5750
 7870                        		.EXTERN PCRSWD
5751
 7871                        		.GLOBAL L0851
5752
 7872  FE3552  38            		SEC
5753
 7873  FE3553                		ACC16
5754
 7874  FE3553  C2 20         		rep	#PMFLAG
5755
 7875                        		.LONGA	on
5756
 7876                        		.MNLIST
5757
 7877  FE3555  B2 2D         		LDA	($2D)
5758
 7878  FE3557  E9 08 00      		SBC	#$0008
5759
 7879  FE355A  85 23         		STA	$23
5760
 7880  FE355C                		ACC08
5761
 7881  FE355C  E2 20         		sep	#PMFLAG
5762
 7882                        		.LONGA	off
5763
 7883                        		.MNLIST
5764
 7884  FE355E  A9 FF         		LDA	#$FF
5765
 7885  FE3560  85 21         		STA	$21
5766
 7886  FE3562  A2 00         		LDX	#$00
5767
  Tue Jul 17 11:00:23 2018                                                                                               Page   94
5768
 
5769
 
5770
 
5771
 
5772
 7887  FE3564  A0 00         	?02:	LDY	#$00
5773
 7888  FE3566  E6 21         		INC	$21
5774
 7889  FE3568  B1 23         	?04:	LDA	($23),Y
5775
 7890  FE356A  DF 0E 82 FE   		CMP	>PCRSWD,X
5776
 7891  FE356E  D0 15         		BNE	?10
5777
 7892  FE3570  C8            		INY
5778
 7893  FE3571  C9 20         		CMP	#$20
5779
 7894  FE3573  F0 01         		BEQ	?06
5780
 7895  FE3575  E8            		INX
5781
 7896  FE3576  C0 08         	?06:	CPY	#$08
5782
 7897  FE3578  D0 EE         		BNE	?04
5783
 7898  FE357A  A5 21         		LDA	$21
5784
 7899  FE357C  A0 00         	?08:	LDY	#$00
5785
 7900  FE357E  92 2D         		STA	($2D)
5786
 7901  FE3580  98            		TYA
5787
 7902  FE3581  C8            		INY
5788
 7903  FE3582  91 2D         		STA	($2D),Y
5789
 7904  FE3584  60            		RTS
5790
 7905  FE3585  BF 0E 82 FE   	?10:	LDA	>PCRSWD,X
5791
 7906  FE3589  E8            		INX
5792
 7907  FE358A  C9 20         		CMP	#$20
5793
 7908  FE358C  D0 F7         		BNE	?10
5794
 7909  FE358E  BF 0E 82 FE   		LDA	>PCRSWD,X
5795
 7910  FE3592  D0 D0         		BNE	?02
5796
 7911  FE3594  A9 27         		LDA	#$27
5797
 7912  FE3596  D0 E4         		BNE	?08
5798
 7913
5799
 7914                        	L083C:	; $1E16 ($083C)
5800
 7915                        		; load an error message in compile mode
5801
 7916                        		.EXTERN PCERRS
5802
 7917                        		.GLOBAL L083C
5803
 7918  FE3598                		ACC16
5804
 7919  FE3598  C2 20         		rep	#PMFLAG
5805
 7920                        		.LONGA	on
5806
 7921                        		.MNLIST
5807
 7922  FE359A  B2 2D         		lda	($2D)
5808
 7923  FE359C  38            		sec
5809
 7924  FE359D  E9 80 00      		sbc	#$0080
5810
 7925  FE35A0  85 21         		sta	$21
5811
 7926  FE35A2                		ACC08
5812
 7927  FE35A2  E2 20         		sep	#PMFLAG
5813
 7928                        		.LONGA	off
5814
 7929                        		.MNLIST
5815
 7930  FE35A4  A0 02         		ldy	#$02
5816
 7931  FE35A6  B1 2D         		lda	($2D),y		; error code
5817
 7932  FE35A8  A8            		tay			; Y = error code
5818
 7933  FE35A9  A9 80         		lda	#$80
5819
 7934  FE35AB  85 4C         		sta	pcterr		; set error flag
5820
 7935  FE35AD  A2 00         		ldx	#0		; index
5821
 7936  FE35AF                		INDEX16
5822
 7937  FE35AF  C2 10         		rep	#PXFLAG
5823
 7938                        		.LONGI	on
5824
 7939                        		.MNLIST
5825
 7940  FE35B1  98            		tya
5826
 7941  FE35B2  F0 14         		beq	?04		; error code = 0 should not occur
5827
 7942  FE35B4  D0 04         		bne	?02
5828
 7943  FE35B6  AA            	?01:	tax
5829
  Tue Jul 17 11:00:23 2018                                                                                               Page   95
5830
 
5831
 
5832
 
5833
 
5834
 7944  FE35B7  A8            		tay
5835
 7945  FE35B8  F0 0E         		beq	?04
5836
 7946  FE35BA  BF E5 82 FE   	?02:	lda	>PCERRS,x	; offset of error string's
5837
 7947  FE35BE  F0 F6         		beq	?01		; end of strings table
5838
 7948  FE35C0  E8            		inx
5839
 7949  FE35C1  C9 0D         		cmp	#$0D
5840
 7950  FE35C3  D0 F5         		bne	?02
5841
 7951  FE35C5  88            		dey
5842
 7952  FE35C6  D0 F2         		bne	?02
5843
 7953  FE35C8  BF E5 82 FE   	?04:	lda	>PCERRS,x	; here Y = 0 at first time
5844
 7954  FE35CC  E8            		inx
5845
 7955  FE35CD  91 21         		sta	($21),y
5846
 7956  FE35CF  C8            		iny
5847
 7957  FE35D0  C9 0D         		cmp	#$0D
5848
 7958  FE35D2  D0 F4         		bne	?04		; until carriage return
5849
 7959  FE35D4  88            		dey
5850
 7960  FE35D5  A9 24         		lda	#$24		; change CR
5851
 7961  FE35D7  91 21         		sta	($21),y
5852
 7962  FE35D9                		CPU16
5853
 7963  FE35D9  C2 30         		rep	#(PMFLAG.OR.PXFLAG)
5854
 7964                        		.LONGA	on
5855
 7965                        		.LONGI	on
5856
 7966                        		.MNLIST
5857
 7967  FE35DB  A5 2D         		lda	$2D
5858
 7968  FE35DD  69 04 00      		adc	#$0004
5859
 7969  FE35E0  85 2D         		sta	$2D
5860
 7970  FE35E2                		CPU08
5861
 7971  FE35E2  E2 30         		sep	#(PMFLAG.OR.PXFLAG)
5862
 7972                        		.LONGA	off
5863
 7973                        		.LONGI	off
5864
 7974                        		.MNLIST
5865
 7975  FE35E4  60            		rts
5866
 7976
5867
 7977                        	L0836:	; $1DC9 ($0836)
5868
 7978                        		; search standard procedure/function/identifier
5869
 7979                        		.EXTERN PCSFADDR
5870
 7980                        		.GLOBAL L0836
5871
 7981  FE35E5                		ACC16
5872
 7982  FE35E5  C2 20         		rep	#PMFLAG
5873
 7983                        		.LONGA	on
5874
 7984                        		.MNLIST
5875
 7985  FE35E7  A9 5E 3A      		LDA	#PCSFADDR
5876
 7986  FE35EA  85 23         		sta	$23
5877
 7987  FE35EC  80 0C         		bra	L1D79
5878
 7988
5879
 7989                        	L084B:	; $1D63 ($084B)
5880
 7990                        		; search user procedure/function/identifier
5881
 7991                        		.GLOBAL L084B
5882
 7992  FE35EE                		ACC16
5883
 7993  FE35EE  C2 20         		rep	#PMFLAG
5884
 7994                        		.LONGA	on
5885
 7995                        		.MNLIST
5886
 7996  FE35F0  B2 2D         		LDA	($2D)
5887
 7997  FE35F2  85 23         		STA	$23
5888
 7998  FE35F4  A5 2D         		LDA	$2D
5889
 7999  FE35F6  1A            		inc	a
5890
 8000  FE35F7  1A            		inc	a
5891
  Tue Jul 17 11:00:23 2018                                                                                               Page   96
5892
 
5893
 
5894
 
5895
 
5896
 8001  FE35F8  85 2D         		STA	$2D
5897
 8002  FE35FA                	L1D79:
5898
 8003  FE35FA  B2 2D         		LDA	($2D)
5899
 8004  FE35FC  38            		SEC
5900
 8005  FE35FD  E9 08 00      		SBC	#$0008
5901
 8006  FE3600  85 21         		STA	$21
5902
 8007  FE3602  A5 23         	?02:	LDA	$23
5903
 8008  FE3604  F0 25         		BEQ	?08
5904
 8009  FE3606  38            		SEC
5905
 8010  FE3607  E9 10 00      		SBC	#$0010
5906
 8011  FE360A  85 27         		sta	$27
5907
 8012  FE360C                		ACC08
5908
 8013  FE360C  E2 20         		sep	#PMFLAG
5909
 8014                        		.LONGA	off
5910
 8015                        		.MNLIST
5911
 8016  FE360E  A0 00         		LDY	#$00
5912
 8017  FE3610  B1 21         	?04:	LDA	($21),Y
5913
 8018  FE3612  D1 27         		CMP	($27),Y
5914
 8019  FE3614  D0 0B         		BNE	?06
5915
 8020  FE3616  C8            		INY
5916
 8021  FE3617  C0 08         		CPY	#$08
5917
 8022  FE3619  D0 F5         		BNE	?04
5918
 8023  FE361B                		ACC16
5919
 8024  FE361B  C2 20         		rep	#PMFLAG
5920
 8025                        		.LONGA	on
5921
 8026                        		.MNLIST
5922
 8027  FE361D  A5 23         		LDA	$23
5923
 8028  FE361F  80 0A         		bra	?08
5924
 8029  FE3621  A0 0E         	?06:	LDY	#$0E
5925
 8030  FE3623                		ACC16
5926
 8031  FE3623  C2 20         		rep	#PMFLAG
5927
 8032                        		.LONGA	on
5928
 8033                        		.MNLIST
5929
 8034  FE3625  B1 27         		LDA	($27),Y
5930
 8035  FE3627  85 23         		STA	$23
5931
 8036  FE3629  D0 D7         		BNE	?02
5932
 8037  FE362B  92 2D         	?08:	STA	($2D)
5933
 8038  FE362D                		ACC08
5934
 8039  FE362D  E2 20         		sep	#PMFLAG
5935
 8040                        		.LONGA	off
5936
 8041                        		.MNLIST
5937
 8042  FE362F                	L1E79x:
5938
 8043  FE362F  60            		RTS
5939
 8044
5940
 8045                        	L083F:	; $1E79 ($083F)
5941
 8046                        		.GLOBAL L083F
5942
 8047  FE3630  A0 00         		LDY	#$00
5943
 8048  FE3632  B2 0F         		LDA	($0F)
5944
 8049  FE3634  F0 F9         		BEQ	L1E79x
5945
 8050  FE3636                		ACC16
5946
 8051  FE3636  C2 20         		rep	#PMFLAG
5947
 8052                        		.LONGA	on
5948
 8053                        		.MNLIST
5949
 8054  FE3638  B2 1B         		LDA	($1B)
5950
 8055  FE363A  85 29         		STA	$29
5951
 8056  FE363C                		ACC08
5952
 8057  FE363C  E2 20         		sep	#PMFLAG
5953
  Tue Jul 17 11:00:23 2018                                                                                               Page   97
5954
 
5955
 
5956
 
5957
 
5958
 8058                        		.LONGA	off
5959
 8059                        		.MNLIST
5960
 8060  FE363E  B2 0D         		LDA	($0D)
5961
 8061  FE3640  F0 08         		BEQ	?02
5962
 8062  FE3642                		ACC16
5963
 8063  FE3642  C2 20         		rep	#PMFLAG
5964
 8064                        		.LONGA	on
5965
 8065                        		.MNLIST
5966
 8066  FE3644  B2 19         		LDA	($19)
5967
 8067  FE3646  85 29         		STA	$29
5968
 8068  FE3648                		ACC08
5969
 8069  FE3648  E2 20         		sep	#PMFLAG
5970
 8070                        		.LONGA	off
5971
 8071                        		.MNLIST
5972
 8072  FE364A  B2 29         	?02:	LDA	($29)
5973
 8073  FE364C  29 80         		AND	#$80
5974
 8074  FE364E  F0 03         		BEQ	?04
5975
 8075  FE3650  4C DC 36      		jmp	?10
5976
 8076  FE3653                	?04:	ACC16
5977
 8077  FE3653  C2 20         		rep	#PMFLAG
5978
 8078                        		.LONGA	on
5979
 8079                        		.MNLIST
5980
 8080  FE3655  A5 29         		LDA	$29
5981
 8081  FE3657  3A            		dec	a
5982
 8082  FE3658  3A            		dec	a
5983
 8083  FE3659  85 21         		STA	$21
5984
 8084  FE365B                		ACC08
5985
 8085  FE365B  E2 20         		sep	#PMFLAG
5986
 8086                        		.LONGA	off
5987
 8087                        		.MNLIST
5988
 8088  FE365D  B2 21         		LDA	($21)
5989
 8089  FE365F  92 0F         		STA	($0F)
5990
 8090  FE3661  20 EF 31      		JSR	L0F11
5991
 8091  FE3664  20 71 31      	?05:	JSR	L0F2B
5992
 8092  FE3667  C9 0A         		CMP	#$0A
5993
 8093  FE3669  F0 F9         		BEQ	?05
5994
 8094  FE366B  92 21         		STA	($21)
5995
 8095  FE366D  20 CC FF      		JSR	FCLRCH
5996
 8096  FE3670  B2 0F         		LDA	($0F)
5997
 8097  FE3672  C9 0D         		CMP	#$0D
5998
 8098  FE3674  D0 3C         		BNE	?06
5999
 8099  FE3676  A9 20         	?05a:	LDA	#$20
6000
 8100  FE3678  92 0F         		STA	($0F)
6001
 8101  FE367A                		CPU16
6002
 8102  FE367A  C2 30         		rep	#(PMFLAG.OR.PXFLAG)
6003
 8103                        		.LONGA	on
6004
 8104                        		.LONGI	on
6005
 8105                        		.MNLIST
6006
 8106  FE367C  B2 13         		LDA	($13)		; line number?
6007
 8107  FE367E  1A            		inc	a
6008
 8108  FE367F  92 13         		STA	($13)
6009
 8109
6010
 8110                        		;ldx	srcdsk
6011
 8111                        		;cpx	#$08
6012
 8112                        		;beq	?05b
6013
 8113                        		;lda	psrline
6014
 8114                        		;STA	($13)
6015
  Tue Jul 17 11:00:23 2018                                                                                               Page   98
6016
 
6017
 
6018
 
6019
 
6020
 8115
6021
 8116  FE3681  98            	?05b:	tya
6022
 8117  FE3682  92 11         		STA	($11)
6023
 8118  FE3684                		CPU08
6024
 8119  FE3684  E2 30         		sep	#(PMFLAG.OR.PXFLAG)
6025
 8120                        		.LONGA	off
6026
 8121                        		.LONGI	off
6027
 8122                        		.MNLIST
6028
 8123  FE3686  A9 01         		LDA	#$01
6029
 8124  FE3688  92 0B         		STA	($0B)
6030
 8125  FE368A  B2 07         		LDA	($07)
6031
 8126  FE368C  F0 24         		BEQ	?06
6032
 8127  FE368E                		ACC16
6033
 8128  FE368E  C2 20         		rep	#PMFLAG
6034
 8129                        		.LONGA	on
6035
 8130                        		.MNLIST
6036
 8131  FE3690  B2 17         		LDA	($17)
6037
 8132  FE3692  85 29         		STA	$29
6038
 8133  FE3694                		ACC08
6039
 8134  FE3694  E2 20         		sep	#PMFLAG
6040
 8135                        		.LONGA	off
6041
 8136                        		.MNLIST
6042
 8137  FE3696  20 25 32      		JSR	L0EA8
6043
 8138  FE3699  A9 0D         		LDA	#$0D
6044
 8139  FE369B  20 E3 32      		JSR	L0EC4
6045
 8140  FE369E  A0 00         		LDY	#$00
6046
 8141  FE36A0                		ACC16
6047
 8142  FE36A0  C2 20         		rep	#PMFLAG
6048
 8143                        		.LONGA	on
6049
 8144                        		.MNLIST
6050
 8145  FE36A2  B2 13         		LDA	($13)
6051
 8146  FE36A4  85 21         		STA	$21
6052
 8147  FE36A6                		ACC08
6053
 8148  FE36A6  E2 20         		sep	#PMFLAG
6054
 8149                        		.LONGA	off
6055
 8150                        		.MNLIST
6056
 8151  FE36A8  A9 05         		LDA	#$05		; line number 4 chars
6057
 8152  FE36AA  85 23         		STA	$23
6058
 8153  FE36AC  20 76 32      		JSR	L0D1C		; print line number
6059
 8154  FE36AF  20 CC FF      		JSR	FCLRCH
6060
 8155  FE36B2  A0 00         	?06:	LDY	#$00
6061
 8156  FE36B4  B2 07         		LDA	($07)
6062
 8157  FE36B6  F0 23         		BEQ	?08
6063
 8158  FE36B8                		ACC16
6064
 8159  FE36B8  C2 20         		rep	#PMFLAG
6065
 8160                        		.LONGA	on
6066
 8161                        		.MNLIST
6067
 8162  FE36BA  B2 17         		LDA	($17)
6068
 8163  FE36BC  85 29         		STA	$29
6069
 8164  FE36BE                		ACC08
6070
 8165  FE36BE  E2 20         		sep	#PMFLAG
6071
 8166                        		.LONGA	off
6072
 8167                        		.MNLIST
6073
 8168  FE36C0  20 25 32      		JSR	L0EA8
6074
 8169  FE36C3  A0 00         		LDY	#$00
6075
 8170  FE36C5  B2 0F         		LDA	($0F)
6076
 8171  FE36C7  20 E3 32      		JSR	L0EC4
6077
  Tue Jul 17 11:00:23 2018                                                                                               Page   99
6078
 
6079
 
6080
 
6081
 
6082
 8172  FE36CA  AA            		TAX
6083
 8173  FE36CB  B2 11         		LDA	($11)
6084
 8174  FE36CD  C9 64         		CMP	#$64
6085
 8175  FE36CF  B0 0A         		BCS	?08
6086
 8176  FE36D1  1A            		inc	a
6087
 8177  FE36D2  92 11         		STA	($11)
6088
 8178  FE36D4  A8            		TAY
6089
 8179  FE36D5  8A            		TXA
6090
 8180  FE36D6  91 15         		STA	($15),Y
6091
 8181  FE36D8  20 CC FF      		JSR	FCLRCH
6092
 8182  FE36DB  60            	?08:	RTS
6093
 8183  FE36DC  A0 00         	?10:	LDY	#$00
6094
 8184  FE36DE  B2 0D         		LDA	($0D)
6095
 8185  FE36E0  F0 05         		BEQ	?12
6096
 8186  FE36E2  98            		TYA
6097
 8187  FE36E3  92 0D         		STA	($0D)
6098
 8188  FE36E5  80 8F         		bra	?05a
6099
 8189  FE36E7  92 0F         	?12:	STA	($0F)
6100
 8190  FE36E9  A9 01         		LDA 	#$01
6101
 8191  FE36EB  92 09         		STA 	($09)
6102
 8192  FE36ED  60            		RTS
6103
 8193
6104
 8194                        	L0842:	; $1F4C ($0842)
6105
 8195                        		; setup group of 11 pointer from $07-$08 to $1B-$1C
6106
 8196                        		.GLOBAL L0842
6107
 8197  FE36EE  DA            		phx
6108
 8198  FE36EF  A0 00         		LDY	#$00
6109
 8199  FE36F1  BB            		tyx
6110
 8200  FE36F2                		ACC16
6111
 8201  FE36F2  C2 20         		rep	#PMFLAG
6112
 8202                        		.LONGA	on
6113
 8203                        		.MNLIST
6114
 8204  FE36F4  B1 2D         	?02:	LDA	($2D),Y
6115
 8205  FE36F6  3A            		dec	a
6116
 8206  FE36F7  3A            		dec	a
6117
 8207  FE36F8  95 07         		STA	<$07,x
6118
 8208  FE36FA  E8            		inx
6119
 8209  FE36FB  E8            		inx
6120
 8210  FE36FC  C8            		iny
6121
 8211  FE36FD  C8            		iny
6122
 8212  FE36FE  C0 16         		cpy	#$16
6123
 8213  FE3700  D0 F2         		bne	?02
6124
 8214  FE3702  18            		clc
6125
 8215  FE3703  A5 2D         		lda	$2D
6126
 8216  FE3705  69 16 00      		adc	#$0016
6127
 8217  FE3708  85 2D         		sta	$2D
6128
 8218  FE370A  38            		sec
6129
 8219  FE370B  A5 15         		lda	$15
6130
 8220  FE370D  E9 63 00      		sbc	#$0063
6131
 8221  FE3710  85 15         		sta	$15
6132
 8222  FE3712                		ACC08
6133
 8223  FE3712  E2 20         		sep	#PMFLAG
6134
 8224                        		.LONGA	off
6135
 8225                        		.MNLIST
6136
 8226  FE3714  FA            		plx
6137
 8227  FE3715  60            		rts
6138
 8228
6139
  Tue Jul 17 11:00:23 2018                                                                                               Page  100
6140
 
6141
 
6142
 
6143
 
6144
 8229                        	L0845:	; $1DD3 ($0845)
6145
 8230                        		; setup pointer to standard basic type records
6146
 8231                        		.EXTERN PCTYPEREC
6147
 8232                        		.GLOBAL L0845
6148
 8233  FE3716  A2 00         		LDX	#$00
6149
 8234  FE3718                		ACC16
6150
 8235  FE3718  C2 20         		rep	#PMFLAG
6151
 8236                        		.LONGA	on
6152
 8237                        		.MNLIST
6153
 8238  FE371A  B2 2D         	?02:	LDA	($2D)
6154
 8239  FE371C  3A            		dec	a
6155
 8240  FE371D  3A            		dec	a
6156
 8241  FE371E  85 27         		STA	$27
6157
 8242  FE3720  BF D1 82 FE   		LDA	>PCTYPEREC,X
6158
 8243  FE3724  92 27         		sta	($27)
6159
 8244  FE3726  A5 2D         		lda	$2D
6160
 8245  FE3728  1A            		inc	a
6161
 8246  FE3729  1A            		inc	a
6162
 8247  FE372A  85 2D         		sta	$2D
6163
 8248  FE372C  E8            		inx
6164
 8249  FE372D  E8            		inx
6165
 8250  FE372E  E0 14         		cpx	#$14
6166
 8251  FE3730  D0 E8         		bne	?02
6167
 8252  FE3732                		ACC08
6168
 8253  FE3732  E2 20         		sep	#PMFLAG
6169
 8254                        		.LONGA	off
6170
 8255                        		.MNLIST
6171
 8256  FE3734  60            		rts
6172
 8257
6173
 8258                        	L0857:	; $1C2D ($0857)
6174
 8259                        		.GLOBAL L0857, L0854
6175
 8260  FE3735  A9 50         		LDA 	#<MINBUF+$50	; buffer 0250?
6176
 8261  FE3737  A2 FF         		LDX	#>MINBUF+$50
6177
 8262                        		;lda	#$00
6178
 8263                        		;ldx	#$02
6179
 8264  FE3739  80 22         		bra	L1C14
6180
 8265
6181
 8266                        	L0854:	; $1BF1 ($0854)
6182
 8267  FE373B  A5 4E         		LDA	defprn		; open file for printer
6183
 8268  FE373D  85 BA         		STA	$BA
6184
 8269  FE373F  A9 02         		LDA	#$02
6185
 8270  FE3741  85 B8         		STA	$B8
6186
 8271  FE3743  A9 00         		LDA	#$00
6187
 8272  FE3745  85 B9         		STA	$B9
6188
 8273  FE3747  85 B7         		STA	$B7
6189
 8274  FE3749  20 C0 FF      		JSR	FOPEN
6190
 8275  FE374C  A5 2D         		LDA	$2D
6191
 8276  FE374E  18            		CLC
6192
 8277  FE374F  69 02         		ADC	#$02
6193
 8278  FE3751  85 2D         		STA	$2D
6194
 8279  FE3753  90 02         		BCC	?02
6195
 8280  FE3755  E6 2E         		INC	$2E
6196
 8281  FE3757  AD D4 FF      	?02:	LDA	!MFILET+4	; default printer file descriptor
6197
 8282  FE375A  AE D5 FF      		LDX	!MFILET+5
6198
 8283                        	L1C14:	; $1C14
6199
 8284  FE375D  EB            		xba
6200
 8285  FE375E  8A            		txa			; high byte
6201
  Tue Jul 17 11:00:23 2018                                                                                               Page  101
6202
 
6203
 
6204
 
6205
 
6206
 8286  FE375F  EB            		xba
6207
 8287  FE3760                		CPU16
6208
 8288  FE3760  C2 30         		rep	#(PMFLAG.OR.PXFLAG)
6209
 8289                        		.LONGA	on
6210
 8290                        		.LONGI	on
6211
 8291                        		.MNLIST
6212
 8292  FE3762  AA            		tax
6213
 8293  FE3763  B2 2D         		LDA	($2D)
6214
 8294  FE3765  3A            		dec	a
6215
 8295  FE3766  3A            		dec	a
6216
 8296  FE3767  85 27         		STA	$27
6217
 8297  FE3769  8A            		TXA
6218
 8298  FE376A  92 27         		STA	($27)
6219
 8299  FE376C                		CPU08
6220
 8300  FE376C  E2 30         		sep	#(PMFLAG.OR.PXFLAG)
6221
 8301                        		.LONGA	off
6222
 8302                        		.LONGI	off
6223
 8303                        		.MNLIST
6224
 8304  FE376E  80 5C         		bra	L1FDB
6225
 8305
6226
 8306                        	;---------------------------------------------------------------------------
6227
 8307                        	; function's in 'compile' mode
6228
 8308                        	;---------------------------------------------------------------------------
6229
 8309
6230
 8310                        	CF00:	; $1FAE
6231
 8311  FE3770  B2 2D         		LDA	($2D)
6232
 8312  FE3772  29 7F         		AND	#$7F
6233
 8313  FE3774  92 2D         		STA	($2D)
6234
 8314  FE3776  98            		TYA
6235
 8315  FE3777  C8            		INY
6236
 8316  FE3778  91 2D         		STA	($2D),Y
6237
 8317                        	CF08:	; $1FB8
6238
 8318  FE377A  60            		RTS
6239
 8319
6240
 8320                        	; procedure wrhexb(n: integer)
6241
 8321  FE377B                	RF22:
6242
 8322  FE377B  A9 01         		lda	#1
6243
 8323  FE377D  A2 00         		ldx	#0
6244
 8324  FE377F  20 FB 27      		jsr	PCE0		; set text to std. 'output'
6245
 8325  FE3782  A0 02         		ldy	#2		; swap text var with integer
6246
 8326  FE3784                		CPU16
6247
 8327  FE3784  C2 30         		rep	#(PMFLAG.OR.PXFLAG)
6248
 8328                        		.LONGA	on
6249
 8329                        		.LONGI	on
6250
 8330                        		.MNLIST
6251
 8331  FE3786  B2 2D         		lda	($2D)
6252
 8332  FE3788  AA            		tax
6253
 8333  FE3789  B1 2D         		lda	($2D),y
6254
 8334  FE378B  92 2D         		sta	($2D)
6255
 8335  FE378D  8A            		txa
6256
 8336  FE378E  91 2D         		sta	($2D),y
6257
 8337  FE3790                		CPU08
6258
 8338  FE3790  E2 30         		sep	#(PMFLAG.OR.PXFLAG)
6259
 8339                        		.LONGA	off
6260
 8340                        		.LONGI	off
6261
 8341                        		.MNLIST
6262
 8342  FE3792  A0 00         		ldy	#0
6263
  Tue Jul 17 11:00:23 2018                                                                                               Page  102
6264
 
6265
 
6266
 
6267
 
6268
 8343
6269
 8344                        	; procedure fwrhexb(f: text, n: integer)
6270
 8345  FE3794                	RF07:
6271
 8346  FE3794  20 3B 32      		JSR	L1FC5
6272
 8347  FE3797  A5 21         		LDA	$21
6273
 8348  FE3799  20 0C 38      		jsr	R353E
6274
 8349  FE379C  80 1F         		bra	CF01x
6275
 8350
6276
 8351                        	; procedure wrhexw(n: integer)
6277
 8352  FE379E                	RF21:
6278
 8353  FE379E  A9 01         		lda	#1
6279
 8354  FE37A0  A2 00         		ldx	#0
6280
 8355  FE37A2  20 FB 27      		jsr	PCE0		; set text to std. 'output'
6281
 8356  FE37A5  A0 02         		ldy	#2		; swap text var with integer
6282
 8357  FE37A7                		CPU16
6283
 8358  FE37A7  C2 30         		rep	#(PMFLAG.OR.PXFLAG)
6284
 8359                        		.LONGA	on
6285
 8360                        		.LONGI	on
6286
 8361                        		.MNLIST
6287
 8362  FE37A9  B2 2D         		lda	($2D)
6288
 8363  FE37AB  AA            		tax
6289
 8364  FE37AC  B1 2D         		lda	($2D),y
6290
 8365  FE37AE  92 2D         		sta	($2D)
6291
 8366  FE37B0  8A            		txa
6292
 8367  FE37B1  91 2D         		sta	($2D),y
6293
 8368  FE37B3                		CPU08
6294
 8369  FE37B3  E2 30         		sep	#(PMFLAG.OR.PXFLAG)
6295
 8370                        		.LONGA	off
6296
 8371                        		.LONGI	off
6297
 8372                        		.MNLIST
6298
 8373  FE37B5  A0 00         		ldy	#0
6299
 8374  FE37B7
6300
 8375                        	; procedure fwrhexw(f: text, n: integer)
6301
 8376  FE37B7                	RF06:
6302
 8377                        	CF01:	; $1FB9
6303
 8378                        		; print hex
6304
 8379  FE37B7  20 3B 32      		JSR	L1FC5
6305
 8380  FE37BA  20 05 38      		JSR	L0D9B
6306
 8381  FE37BD                	CF01x:
6307
 8382  FE37BD  20 CC FF      		JSR	FCLRCH
6308
 8383  FE37C0  A9 04         		lda	#$04
6309
 8384
6310
 8385                        	L1FE0:	; $1FE0
6311
 8386  FE37C2  18            		CLC
6312
 8387  FE37C3  65 2D         		ADC	$2D
6313
 8388  FE37C5  85 2D         		STA	$2D
6314
 8389  FE37C7  90 02         		BCC	?02
6315
 8390  FE37C9  E6 2E         		INC	$2E
6316
 8391  FE37CB  60            	?02:	RTS
6317
 8392
6318
 8393                        	L1FDB:	; $1FDB
6319
 8394  FE37CC  A9 02         		LDA	#$02
6320
 8395  FE37CE  80 F2         		bra	L1FE0
6321
 8396
6322
 8397                        	CF03:	; $1F7A
6323
 8398  FE37D0  C8            		INY
6324
 8399  FE37D1  B1 2D         		LDA	($2D),Y
6325
  Tue Jul 17 11:00:23 2018                                                                                               Page  103
6326
 
6327
 
6328
 
6329
 
6330
 8400  FE37D3  D0 22         		BNE	?04
6331
 8401  FE37D5  88            		DEY
6332
 8402  FE37D6  B1 2D         		LDA	($2D),Y
6333
 8403  FE37D8  F0 F2         		BEQ	L1FDB
6334
 8404  FE37DA  C9 10         		CMP	#$10
6335
 8405  FE37DC  B0 19         		BCS	?04
6336
 8406  FE37DE  AA            		TAX
6337
 8407  FE37DF  A0 02         		LDY	#$02
6338
 8408  FE37E1  B1 2D         		LDA	($2D),Y
6339
 8409  FE37E3  85 27         		STA	$27
6340
 8410  FE37E5  C8            		INY
6341
 8411  FE37E6  B1 2D         		LDA 	($2D),Y
6342
 8412  FE37E8  06 27         	?02:	ASL	$27
6343
 8413  FE37EA  2A            		ROL	a
6344
 8414  FE37EB  CA            		DEX
6345
 8415  FE37EC  D0 FA         		BNE	?02
6346
 8416  FE37EE  91 2D         		STA	($2D),Y
6347
 8417  FE37F0  88            		DEY
6348
 8418  FE37F1  A5 27         		LDA	$27
6349
 8419  FE37F3  91 2D         		STA	($2D),Y
6350
 8420  FE37F5  80 D5         		bra	L1FDB
6351
 8421  FE37F7  A0 02         	?04:	LDY	#$02
6352
 8422  FE37F9  A9 00         		LDA	#$00
6353
 8423  FE37FB  91 2D         		STA	($2D),Y
6354
 8424  FE37FD  C8            		INY
6355
 8425  FE37FE  91 2D         		STA	($2D),Y
6356
 8426  FE3800  80 CA         		bra	L1FDB
6357
 8427
6358
 8428  FE3802                	CF02:
6359
 8429  FE3802                	CF04:
6360
 8430  FE3802                	CF05:
6361
 8431  FE3802                	CF06:
6362
 8432  FE3802                	CF07:
6363
 8433  FE3802  4C 4E 1B      		jmp	vpme07
6364
 8434
6365
 8435                        	L0D9B:	; $0D9B
6366
 8436                        		; print hex $21-$22
6367
 8437  FE3805  A5 22         		LDA	$22
6368
 8438  FE3807  20 0C 38      		JSR	R353E
6369
 8439  FE380A  A5 21         		LDA	$21
6370
 8440  FE380C
6371
 8441  FE380C                	R353E:
6372
 8442  FE380C  48            	?10:	PHA
6373
 8443  FE380D  4A            		LSR	a
6374
 8444  FE380E  4A            		LSR	a
6375
 8445  FE380F  4A            		LSR	a
6376
 8446  FE3810  4A            		LSR	a
6377
 8447  FE3811  20 24 38      		JSR	?20
6378
 8448  FE3814  AA            		TAX
6379
 8449  FE3815  68            		PLA
6380
 8450  FE3816  29 0F         		AND	#$0F
6381
 8451  FE3818  20 24 38      		JSR	?20
6382
 8452  FE381B  48            		PHA
6383
 8453  FE381C  8A            		TXA
6384
 8454  FE381D  20 D2 FF      		JSR	FCHROUT
6385
 8455  FE3820  68            		PLA
6386
 8456  FE3821  4C D2 FF      		JMP	FCHROUT
6387
  Tue Jul 17 11:00:23 2018                                                                                               Page  104
6388
 
6389
 
6390
 
6391
 
6392
 8457  FE3824  18            	?20:	CLC
6393
 8458  FE3825  69 F6         		ADC	#$F6
6394
 8459  FE3827  90 02         		BCC	?30
6395
 8460  FE3829  69 06         		ADC	#$06
6396
 8461  FE382B  69 3A         	?30:	ADC	#$3A
6397
 8462  FE382D  60            		RTS
6398
 8463
6399
 8464                        	;---------------------------------------------------------------------------
6400
 8465                        	; function's in 'run' mode
6401
 8466                        	;---------------------------------------------------------------------------
6402
 8467
6403
 8468                        	; function peekb(address: integer): $00..$FF
6404
 8469  FE382E                	RF00:
6405
 8470  FE382E                		ACC16
6406
 8471  FE382E  C2 20         		rep	#PMFLAG
6407
 8472                        		.LONGA	on
6408
 8473                        		.MNLIST
6409
 8474  FE3830  B2 2D         		lda	($2D)
6410
 8475  FE3832  85 27         		sta	$27
6411
 8476  FE3834                		ACC08
6412
 8477  FE3834  E2 20         		sep	#PMFLAG
6413
 8478                        		.LONGA	off
6414
 8479                        		.MNLIST
6415
 8480  FE3836  98            		tya
6416
 8481  FE3837  C8            		iny
6417
 8482  FE3838  91 2D         		sta	($2D),y
6418
 8483  FE383A  B2 27         		lda	($27)
6419
 8484  FE383C  92 2D         		sta	($2D)
6420
 8485  FE383E  60            		rts
6421
 8486
6422
 8487                        	; function peekw(address: integer): integer
6423
 8488  FE383F                	RF01:
6424
 8489  FE383F                		ACC16
6425
 8490  FE383F  C2 20         		rep	#PMFLAG
6426
 8491                        		.LONGA	on
6427
 8492                        		.MNLIST
6428
 8493  FE3841  B2 2D         		lda	($2D)
6429
 8494  FE3843  85 27         		sta	$27
6430
 8495  FE3845  B2 27         		lda	($27)
6431
 8496  FE3847  92 2D         		sta	($2D)
6432
 8497  FE3849                		ACC08
6433
 8498  FE3849  E2 20         		sep	#PMFLAG
6434
 8499                        		.LONGA	off
6435
 8500                        		.MNLIST
6436
 8501  FE384B  60            		rts
6437
 8502
6438
 8503                        	; function peekbz(address: $00..$FF): $00..$FF
6439
 8504  FE384C                	RF02:
6440
 8505  FE384C  B2 2D         		lda	($2D)
6441
 8506  FE384E  AA            		tax
6442
 8507  FE384F  B5 00         		lda	<$00,x
6443
 8508  FE3851  92 2D         		sta	($2D)
6444
 8509  FE3853  98            		tya
6445
 8510  FE3854  C8            		iny
6446
 8511  FE3855  91 2D         		sta	($2D),y
6447
 8512  FE3857  60            		rts
6448
 8513
6449
  Tue Jul 17 11:00:23 2018                                                                                               Page  105
6450
 
6451
 
6452
 
6453
 
6454
 8514                        	; function peekwz(address: $00..$FF): integer
6455
 8515  FE3858                	RF03:
6456
 8516  FE3858  B2 2D         		lda	($2D)
6457
 8517  FE385A  AA            		tax
6458
 8518  FE385B                		ACC16
6459
 8519  FE385B  C2 20         		rep	#PMFLAG
6460
 8520                        		.LONGA	on
6461
 8521                        		.MNLIST
6462
 8522  FE385D  B5 00         		lda	<$00,x
6463
 8523  FE385F  92 2D         		sta	($2D)
6464
 8524  FE3861                		ACC08
6465
 8525  FE3861  E2 20         		sep	#PMFLAG
6466
 8526                        		.LONGA	off
6467
 8527                        		.MNLIST
6468
 8528  FE3863  60            		rts
6469
 8529
6470
 8530                        	; function odd(n: integer): boolean
6471
 8531  FE3864                	RF04:
6472
 8532  FE3864  A9 01         		lda	#$01
6473
 8533  FE3866  32 2D         		and	($2D)
6474
 8534  FE3868  92 2D         		sta	($2D)
6475
 8535  FE386A
6476
 8536                        	; function chr(n:integer): char
6477
 8537                        	; function asc(c:char): integer
6478
 8538  FE386A                	RF05:
6479
 8539  FE386A  98            		tya
6480
 8540  FE386B  C8            		iny
6481
 8541  FE386C  91 2D         		sta	($2D),y
6482
 8542  FE386E  60            		rts
6483
 8543
6484
 8544                        	; function sin(x: real): real
6485
 8545  FE386F                	RF08:
6486
 8546  FE386F  A9 36         		lda	#<XE26B
6487
 8547  FE3871  A0 9C         		ldy	#>XE26B
6488
 8548  FE3873  80 00         		bra	_math
6489
 8549  FE3875
6490
 8550  FE3875                	_math:
6491
 8551  FE3875  85 27         		sta	$27
6492
 8552  FE3877  84 28         		sty	$28
6493
 8553  FE3879  A5 2D         		lda	$2D
6494
 8554  FE387B  A4 2E         		ldy	$2E
6495
 8555  FE387D  20 33 97      		jsr	XBBA2
6496
 8556  FE3880  20 8A 38      		jsr	_mathj
6497
 8557  FE3883  A6 2D         		ldx	$2D
6498
 8558  FE3885  A4 2E         		ldy	$2E
6499
 8559  FE3887  4C 92 97      		jmp	XBBD4
6500
 8560  FE388A                	_mathj:
6501
 8561  FE388A  6C 27 7F      		jmp	(CBMP0+$0027)
6502
 8562
6503
 8563                        	; function cos(x: real): real
6504
 8564  FE388D                	RF09:
6505
 8565  FE388D  A9 2F         		lda	#<XE264
6506
 8566  FE388F  A0 9C         		ldy	#>XE264
6507
 8567  FE3891  80 E2         		bra	_math
6508
 8568
6509
 8569                        	; function cos(x: real): real
6510
 8570  FE3893                	RF0A:
6511
  Tue Jul 17 11:00:23 2018                                                                                               Page  106
6512
 
6513
 
6514
 
6515
 
6516
 8571  FE3893  A9 7D         		lda	#<XE2B4
6517
 8572  FE3895  A0 9C         		ldy	#>XE2B4
6518
 8573  FE3897  80 DC         		bra	_math
6519
 8574
6520
 8575                        	; function arctan(x: real): real
6521
 8576  FE3899                	RF0B:
6522
 8577  FE3899  A9 FE         		lda	#<XE30E
6523
 8578  FE389B  A0 9B         		ldy	#>XE30E
6524
 8579  FE389D  80 D6         		bra	_math
6525
 8580
6526
 8581                        	; function exp(x: real): real
6527
 8582  FE389F                	RF0C:
6528
 8583  FE389F  A9 55         		lda	#<XBFED
6529
 8584  FE38A1  A0 9B         		ldy	#>XBFED
6530
 8585  FE38A3  80 D0         		bra	_math
6531
 8586
6532
 8587                        	; function ln(x: real): real
6533
 8588  FE38A5                	RF0D:
6534
 8589  FE38A5  A9 8E         		lda	#<XB9EA
6535
 8590  FE38A7  A0 95         		ldy	#>XB9EA
6536
 8591  FE38A9  80 CA         		bra	_math
6537
 8592
6538
 8593                        	; function sqrt(x: real): real
6539
 8594  FE38AB                	RF0E:
6540
 8595  FE38AB  A9 0A         		lda	#<XBF71
6541
 8596  FE38AD  A0 9B         		ldy	#>XBF71
6542
 8597  FE38AF  80 C4         		bra	_math
6543
 8598
6544
 8599                        	; function raisexy(x,y: real): real
6545
 8600  FE38B1                	RF0F:
6546
 8601  FE38B1  A5 2D         		lda	$2D
6547
 8602  FE38B3  A4 2E         		ldy	$2E
6548
 8603  FE38B5  18            		clc
6549
 8604  FE38B6  69 06         		adc	#$06
6550
 8605  FE38B8  90 01         		bcc	?02
6551
 8606  FE38BA  C8            		iny
6552
 8607  FE38BB  20 8D 93      	?02:	jsr	XBA8C		; move x to FAC #2
6553
 8608  FE38BE  A5 2D         		lda	$2D
6554
 8609  FE38C0  A4 2E         		ldy	$2E
6555
 8610  FE38C2  20 33 97      		jsr	XBBA2		; move y to FAC #1
6556
 8611  FE38C5  20 14 9B      		jsr	XBF7B		; compute x^y
6557
 8612  FE38C8  A5 2D         		lda	$2D
6558
 8613  FE38CA  A4 2E         		ldy	$2E
6559
 8614  FE38CC  18            		clc
6560
 8615  FE38CD  69 06         		adc	#$06
6561
 8616  FE38CF  90 01         		bcc	?04
6562
 8617  FE38D1  C8            		iny
6563
 8618  FE38D2  85 2D         	?04:	sta	$2D
6564
 8619  FE38D4  84 2E         		sty	$2E
6565
 8620  FE38D6  AA            		tax
6566
 8621  FE38D7  4C 92 97      		jmp	XBBD4
6567
 8622
6568
 8623                        	; function nroot(x: real; n: integer): real
6569
 8624  FE38DA                	RF10:
6570
 8625  FE38DA  B2 2D         		lda	($2D)
6571
 8626  FE38DC  AA            		tax
6572
 8627  FE38DD  C8            		iny
6573
  Tue Jul 17 11:00:23 2018                                                                                               Page  107
6574
 
6575
 
6576
 
6577
 
6578
 8628  FE38DE  B1 2D         		lda	($2D),y
6579
 8629  FE38E0  85 62         		sta	$62
6580
 8630  FE38E2  85 21         		sta	$21
6581
 8631  FE38E4  86 63         		stx	$63
6582
 8632  FE38E6  10 0D         		bpl	?02
6583
 8633  FE38E8  A9 00         		lda	#$00
6584
 8634  FE38EA  38            		sec
6585
 8635  FE38EB  E5 63         		sbc	$63
6586
 8636  FE38ED  85 63         		sta	$63
6587
 8637  FE38EF  A9 00         		lda	#$00
6588
 8638  FE38F1  E5 62         		sbc	$62
6589
 8639  FE38F3  85 62         		sta	$62
6590
 8640  FE38F5  A2 90         	?02:	ldx	#$90
6591
 8641  FE38F7  38            		sec
6592
 8642  FE38F8  20 09 98      		jsr	XBC49		; convert integer to float
6593
 8643  FE38FB  A5 21         		lda	$21
6594
 8644  FE38FD  85 66         		sta	$66
6595
 8645  FE38FF  A9 A2         		lda	#<XB9BC		; move costant 1.0 to FAC #2
6596
 8646  FE3901  A0 9C         		ldy	#>XB9BC
6597
 8647  FE3903  A2 FE         		ldx	#^RF10
6598
 8648  FE3905  20 91 96      		jsr	XBB0F		; and compute 1/n
6599
 8649  FE3908  20 72 97      		jsr	XBBC7		; round and move to FAC1TMP
6600
 8650  FE390B  A5 2D         		lda	$2D
6601
 8651  FE390D  A4 2E         		ldy	$2E
6602
 8652  FE390F  18            		clc
6603
 8653  FE3910  69 02         		adc	#$02
6604
 8654  FE3912  90 01         		bcc	?04
6605
 8655  FE3914  C8            		iny
6606
 8656  FE3915  85 2D         	?04:	sta	$2D
6607
 8657  FE3917  84 2E         		sty	$2E
6608
 8658  FE3919  20 8D 93      		jsr	XBA8C		; move x to FAC #2
6609
 8659  FE391C  A9 E8         		lda	#<FAC1TMP
6610
 8660  FE391E  A0 FF         		ldy	#>FAC1TMP
6611
 8661  FE3920  20 41 97      		jsr	XBBA2T		; move 1/n to FAC #1
6612
 8662  FE3923  20 14 9B      		jsr	XBF7B		; compute x^(1/n)
6613
 8663  FE3926  A6 2D         		ldx	$2D
6614
 8664  FE3928  A4 2E         		ldy	$2E
6615
 8665  FE392A  4C 92 97      		jmp	XBBD4
6616
 8666
6617
 8667                        	; procedure swapw(var n,m: integer)
6618
 8668  FE392D                	RF11:
6619
 8669  FE392D  A0 02         		ldy	#$02
6620
 8670  FE392F                		CPU16
6621
 8671  FE392F  C2 30         		rep	#(PMFLAG.OR.PXFLAG)
6622
 8672                        		.LONGA	on
6623
 8673                        		.LONGI	on
6624
 8674                        		.MNLIST
6625
 8675  FE3931  B2 2D         		lda	($2D)
6626
 8676  FE3933  3A            		dec	a
6627
 8677  FE3934  3A            		dec	a
6628
 8678  FE3935  85 25         		sta	$25		; pointer to m
6629
 8679  FE3937  B1 2D         		lda	($2D),y
6630
 8680  FE3939  3A            		dec	a
6631
 8681  FE393A  3A            		dec	a
6632
 8682  FE393B  85 27         		sta	$27		; pointer to n
6633
 8683  FE393D  B2 25         		lda	($25)
6634
 8684  FE393F  AA            		tax
6635
  Tue Jul 17 11:00:23 2018                                                                                               Page  108
6636
 
6637
 
6638
 
6639
 
6640
 8685  FE3940  B2 27         		lda	($27)
6641
 8686  FE3942  92 25         		sta	($25)
6642
 8687  FE3944  8A            		txa
6643
 8688  FE3945  92 27         		sta	($27)
6644
 8689  FE3947                		CPU08
6645
 8690  FE3947  E2 30         		sep	#(PMFLAG.OR.PXFLAG)
6646
 8691                        		.LONGA	off
6647
 8692                        		.LONGI	off
6648
 8693                        		.MNLIST
6649
 8694  FE3949  4C E5 1D      		jmp	SK04
6650
 8695
6651
 8696                        	; procedure passign(var p: pointer; adr:integer)
6652
 8697  FE394C                	RF12:
6653
 8698  FE394C  A0 02         		ldy	#$02
6654
 8699  FE394E                		ACC16
6655
 8700  FE394E  C2 20         		rep	#PMFLAG
6656
 8701                        		.LONGA	on
6657
 8702                        		.MNLIST
6658
 8703  FE3950  B1 2D         		lda	($2D),y		; pointer to p
6659
 8704  FE3952  3A            		dec	a
6660
 8705  FE3953  3A            		dec	a
6661
 8706  FE3954  85 27         		sta	$27
6662
 8707  FE3956  B2 2D         		lda	($2D)		; load adr
6663
 8708  FE3958  92 27         		sta	($27)		; assign to p
6664
 8709  FE395A                		ACC08
6665
 8710  FE395A  E2 20         		sep	#PMFLAG
6666
 8711                        		.LONGA	off
6667
 8712                        		.MNLIST
6668
 8713  FE395C  4C E5 1D      		jmp	SK04
6669
 8714
6670
 8715                        	; function trunc(x: real): integer
6671
 8716  FE395F                	RF13:
6672
 8717  FE395F  A5 2D         		lda	$2D
6673
 8718  FE3961  A4 2E         		ldy	$2E
6674
 8719  FE3963  20 33 97      		jsr	XBBA2
6675
 8720  FE3966                	RF13x:
6676
 8721  FE3966  A5 61         		lda	$61
6677
 8722  FE3968  F0 2E         		beq	?08		; zero
6678
 8723  FE396A  10 2C         		bpl	?08		; less than 1
6679
 8724  FE396C  38            		sec
6680
 8725  FE396D  E9 90         		sbc	#$90
6681
 8726  FE396F  10 2D         		bpl	?10		; integer overflow
6682
 8727  FE3971  AA            		tax
6683
 8728  FE3972  46 62         	?02:	lsr	$62
6684
 8729  FE3974  66 63         		ror	$63
6685
 8730  FE3976  E8            		inx
6686
 8731  FE3977  D0 F9         		bne	?02
6687
 8732  FE3979  A5 66         	?04:	lda	$66
6688
 8733  FE397B  10 0D         		bpl	?06
6689
 8734  FE397D  A9 00         		lda	#$00
6690
 8735  FE397F  38            		sec
6691
 8736  FE3980  E5 63         		sbc	$63
6692
 8737  FE3982  85 63         		sta	$63
6693
 8738  FE3984  A9 00         		lda	#$00
6694
 8739  FE3986  E5 62         		sbc	$62
6695
 8740  FE3988  85 62         		sta	$62
6696
 8741  FE398A  A0 04         	?06:	ldy	#$04
6697
  Tue Jul 17 11:00:23 2018                                                                                               Page  109
6698
 
6699
 
6700
 
6701
 
6702
 8742  FE398C                		ACC16
6703
 8743  FE398C  C2 20         		rep	#PMFLAG
6704
 8744                        		.LONGA	on
6705
 8745                        		.MNLIST
6706
 8746  FE398E  A5 62         		lda	$62
6707
 8747  FE3990  EB            		xba
6708
 8748  FE3991  91 2D         		sta	($2D),y
6709
 8749  FE3993                		ACC08
6710
 8750  FE3993  E2 20         		sep	#PMFLAG
6711
 8751                        		.LONGA	off
6712
 8752                        		.MNLIST
6713
 8753  FE3995  4C E5 1D      		jmp	SK04
6714
 8754  FE3998  64 62         	?08:	stz	$62
6715
 8755  FE399A  64 63         		stz	$63
6716
 8756  FE399C  80 EC         		bra	?06
6717
 8757  FE399E  A2 03         	?10:	ldx	#$03		; integer overflow
6718
 8758  FE39A0  4C 50 1B      		jmp	vpmerr
6719
 8759
6720
 8760                        	; function round(x: real): integer
6721
 8761  FE39A3                	RF14:
6722
 8762  FE39A3  A5 2D         		lda	$2D
6723
 8763  FE39A5  A4 2E         		ldy	$2E
6724
 8764  FE39A7  20 33 97      		jsr	XBBA2
6725
 8765  FE39AA  A9 AC         		lda	#<FCON05	; float 0.5
6726
 8766  FE39AC  A0 9C         		ldy	#>FCON05
6727
 8767  FE39AE  A6 66         		ldx	$66
6728
 8768  FE39B0  10 04         		bpl	?02		; add 0.5
6729
 8769  FE39B2  A9 D0         		lda	#<XB9E0		; float -0.5
6730
 8770  FE39B4  A0 9C         		ldy	#>XB9E0
6731
 8771  FE39B6  20 09 94      	?02:	jsr	XB867		; add =/- 0.5
6732
 8772  FE39B9  80 AB         		bra	RF13x		; and trunc
6733
 8773
6734
 8774                        	; function random: integer
6735
 8775  FE39BB                	RF15:
6736
 8776  FE39BB  20 49 20      		jsr	decstk		; decrement stack
6737
 8777  FE39BE  A5 41         		lda	$41
6738
 8778  FE39C0  0A            		asl	a
6739
 8779  FE39C1  69 00         		adc	#$00
6740
 8780  FE39C3  45 41         		eor	$41
6741
 8781  FE39C5  4A            		lsr	a
6742
 8782  FE39C6  90 02         		bcc	?02
6743
 8783  FE39C8  09 80         		ora	#$80
6744
 8784  FE39CA  E6 42         	?02:	inc	$42
6745
 8785  FE39CC  65 42         		adc	$42
6746
 8786  FE39CE  85 41         		sta	$41
6747
 8787  FE39D0  50 02         		bvc	?04
6748
 8788  FE39D2  E6 42         		inc	$42
6749
 8789  FE39D4  92 2D         	?04:	sta	($2D)
6750
 8790  FE39D6  98            		tya
6751
 8791  FE39D7  C8            		iny
6752
 8792  FE39D8  91 2D         		sta	($2D),y
6753
 8793  FE39DA  60            		rts
6754
 8794
6755
 8795                        	; procedure iotrap(boolean)
6756
 8796  FE39DB                	RF16:
6757
 8797  FE39DB  B2 2D         		lda	($2D)
6758
 8798  FE39DD  08            		php
6759
  Tue Jul 17 11:00:23 2018                                                                                               Page  110
6760
 
6761
 
6762
 
6763
 
6764
 8799  FE39DE  A5 3B         		lda	prtrap
6765
 8800  FE39E0  09 80         		ora	#$80
6766
 8801  FE39E2  28            		plp
6767
 8802  FE39E3  D0 02         		bne	?02
6768
 8803  FE39E5  49 80         		eor	#$80
6769
 8804  FE39E7  85 3B         	?02:	sta	prtrap
6770
 8805  FE39E9  4C 95 1E      		jmp	SK02
6771
 8806
6772
 8807                        	; procedure breaks(boolean)
6773
 8808  FE39EC                	RF17:
6774
 8809  FE39EC  B2 2D         		lda	($2D)
6775
 8810  FE39EE  08            		php
6776
 8811  FE39EF  A5 3B         		lda	prtrap
6777
 8812  FE39F1  09 40         		ora	#$40
6778
 8813  FE39F3  28            		plp
6779
 8814  FE39F4  D0 02         		bne	?02
6780
 8815  FE39F6  49 40         		eor	#$40
6781
 8816  FE39F8  85 3B         	?02:	sta	prtrap
6782
 8817  FE39FA  4C 95 1E      		jmp	SK02
6783
 8818
6784
 8819                        	; function ioerror: integer
6785
 8820  FE39FD                	RF18:
6786
 8821  FE39FD  20 49 20      		jsr	decstk		; decrement stack
6787
 8822  FE3A00  A5 3E         		lda	prterr
6788
 8823  FE3A02                	RF18x:
6789
 8824  FE3A02  92 2D         		sta	($2D)
6790
 8825  FE3A04  98            		tya
6791
 8826  FE3A05  C8            		iny
6792
 8827  FE3A06  91 2D         		sta	($2D),y
6793
 8828  FE3A08  60            		rts
6794
 8829  FE3A09
6795
 8830                        	; function getkey: char
6796
 8831  FE3A09                	RF19:
6797
 8832  FE3A09  20 49 20      		jsr	decstk		; decrement stack
6798
 8833  FE3A0C  20 E4 FF      		jsr	FGETIN
6799
 8834  FE3A0F  80 F1         		bra	RF18x
6800
 8835
6801
 8836                        	; function rdhex: integer;
6802
 8837  FE3A11                	RF20:
6803
 8838  FE3A11  A9 00         		lda	#0
6804
 8839  FE3A13  AA            		tax
6805
 8840  FE3A14  20 FB 27      		jsr	PCE0		; set text to std. 'input'
6806
 8841  FE3A17
6807
 8842                        	; function frdhex(file: text): integer;
6808
 8843  FE3A17                	RF1A:
6809
 8844  FE3A17  20 14 30      		jsr	L178B
6810
 8845  FE3A1A  20 34 3A      		jsr	R10A6
6811
 8846  FE3A1D  90 05         		bcc	?02
6812
 8847  FE3A1F  A2 02         		ldx	#$02
6813
 8848  FE3A21  20 C0 31      		jsr	L0FAA
6814
 8849  FE3A24  20 8F 30      	?02:	jsr	L17B7
6815
 8850  FE3A27  A0 01         		ldy	#1
6816
 8851  FE3A29  A5 21         		lda	$21
6817
 8852  FE3A2B  92 2D         		sta	($2D)
6818
 8853  FE3A2D  A5 22         		lda	$22
6819
 8854  FE3A2F  91 2D         		sta	($2D),y
6820
 8855  FE3A31  4C CC FF      		jmp	FCLRCH
6821
  Tue Jul 17 11:00:23 2018                                                                                               Page  111
6822
 
6823
 
6824
 
6825
 
6826
 8856  FE3A34
6827
 8857  FE3A34                	R10A6:
6828
 8858  FE3A34  A2 00         		ldx	#0
6829
 8859  FE3A36  86 21         		stx	$21
6830
 8860  FE3A38  86 22         		stx	$22
6831
 8861  FE3A3A  C9 20         		cmp	#$20
6832
 8862  FE3A3C  F0 08         		beq	?02
6833
 8863  FE3A3E  C9 0D         		cmp	#$0D
6834
 8864  FE3A40  F0 04         		beq	?02
6835
 8865  FE3A42  C9 0A         		cmp	#$0A
6836
 8866  FE3A44  D0 03         		bne	?04
6837
 8867  FE3A46  20 71 31      	?02:	jsr	L0F2B
6838
 8868  FE3A49  AA            	?04:	tax
6839
 8869  FE3A4A  20 68 3A      		jsr	R10DA
6840
 8870  FE3A4D  B0 17         		bcs	?10
6841
 8871  FE3A4F  A0 04         	?06:	ldy	#$04
6842
 8872  FE3A51  06 21         	?08:	asl	$21
6843
 8873  FE3A53  26 22         		rol	$22
6844
 8874  FE3A55  88            		dey
6845
 8875  FE3A56  D0 F9         		bne	?08
6846
 8876  FE3A58  05 21         		ora	$21
6847
 8877  FE3A5A  85 21         		sta	$21
6848
 8878  FE3A5C  20 71 31      		jsr	L0F2B
6849
 8879  FE3A5F  AA            		tax
6850
 8880  FE3A60  20 68 3A      		jsr	R10DA
6851
 8881  FE3A63  90 EA         		bcc	?06
6852
 8882  FE3A65  18            		clc
6853
 8883  FE3A66  8A            	?10:	txa
6854
 8884  FE3A67  60            		rts
6855
 8885  FE3A68
6856
 8886  FE3A68                	R10DA:
6857
 8887  FE3A68  38            		sec
6858
 8888  FE3A69  E9 30         		sbc	#$30
6859
 8889  FE3A6B  90 13         		bcc	?02
6860
 8890  FE3A6D  C9 0A         		cmp	#$0A
6861
 8891  FE3A6F  90 10         		bcc	?04
6862
 8892  FE3A71  38            		sec
6863
 8893  FE3A72  E9 07         		sbc	#$07
6864
 8894  FE3A74  90 0A         		bcc	?02
6865
 8895  FE3A76  C9 10         		cmp	#$10
6866
 8896  FE3A78  90 07         		bcc	?04
6867
 8897  FE3A7A  38            		sec
6868
 8898  FE3A7B  E9 20         		sbc	#$20
6869
 8899  FE3A7D  C9 10         		cmp	#$10
6870
 8900  FE3A7F  60            		rts
6871
 8901  FE3A80  38            	?02:	sec
6872
 8902  FE3A81  60            	?04:	rts
6873
 8903
6874
 8904                        	; function andw(a,b: integer): integer
6875
 8905  FE3A82                	RF1B:
6876
 8906  FE3A82  A0 02         		ldy	#$02
6877
 8907  FE3A84                		ACC16
6878
 8908  FE3A84  C2 20         		rep	#PMFLAG
6879
 8909                        		.LONGA	on
6880
 8910                        		.MNLIST
6881
 8911  FE3A86  B2 2D         		lda	($2D)		; a
6882
 8912  FE3A88  31 2D         		and	($2D),y		; and b
6883
  Tue Jul 17 11:00:23 2018                                                                                               Page  112
6884
 
6885
 
6886
 
6887
 
6888
 8913  FE3A8A  91 2D         		sta	($2D),y		; store in b
6889
 8914  FE3A8C                		ACC08
6890
 8915  FE3A8C  E2 20         		sep	#PMFLAG
6891
 8916                        		.LONGA	off
6892
 8917                        		.MNLIST
6893
 8918  FE3A8E  4C 95 1E      		jmp	SK02
6894
 8919
6895
 8920                        	; function orw(a,b: integer): integer
6896
 8921  FE3A91                	RF1C:
6897
 8922  FE3A91  A0 02         		ldy	#$02
6898
 8923  FE3A93                		ACC16
6899
 8924  FE3A93  C2 20         		rep	#PMFLAG
6900
 8925                        		.LONGA	on
6901
 8926                        		.MNLIST
6902
 8927  FE3A95  B2 2D         		lda	($2D)		; a
6903
 8928  FE3A97  11 2D         		ora	($2D),y		; or b
6904
 8929  FE3A99  91 2D         		sta	($2D),y		; store in b
6905
 8930  FE3A9B                		ACC08
6906
 8931  FE3A9B  E2 20         		sep	#PMFLAG
6907
 8932                        		.LONGA	off
6908
 8933                        		.MNLIST
6909
 8934  FE3A9D  4C 95 1E      		jmp	SK02
6910
 8935
6911
 8936                        	; function xorw(a,b: integer): integer
6912
 8937  FE3AA0                	RF1D:
6913
 8938  FE3AA0  A0 02         		ldy	#$02
6914
 8939  FE3AA2                		ACC16
6915
 8940  FE3AA2  C2 20         		rep	#PMFLAG
6916
 8941                        		.LONGA	on
6917
 8942                        		.MNLIST
6918
 8943  FE3AA4  B2 2D         		lda	($2D)		; a
6919
 8944  FE3AA6  51 2D         		eor	($2D),y		; xor b
6920
 8945  FE3AA8  91 2D         		sta	($2D),y		; store in b
6921
 8946  FE3AAA                		ACC08
6922
 8947  FE3AAA  E2 20         		sep	#PMFLAG
6923
 8948                        		.LONGA	off
6924
 8949                        		.MNLIST
6925
 8950  FE3AAC  4C 95 1E      		jmp	SK02
6926
 8951  FE3AAF
6927
 8952                        	; function notw(a: integer): integer
6928
 8953  FE3AAF                	RF1E:
6929
 8954  FE3AAF                		ACC16
6930
 8955  FE3AAF  C2 20         		rep	#PMFLAG
6931
 8956                        		.LONGA	on
6932
 8957                        		.MNLIST
6933
 8958  FE3AB1  B2 2D         		lda	($2D)		; a
6934
 8959  FE3AB3  49 FF FF      		eor	#$FFFF
6935
 8960  FE3AB6  92 2D         		sta	($2D)
6936
 8961  FE3AB8                		ACC08
6937
 8962  FE3AB8  E2 20         		sep	#PMFLAG
6938
 8963                        		.LONGA	off
6939
 8964                        		.MNLIST
6940
 8965  FE3ABA  60            		rts
6941
 8966  FE3ABB
6942
 8967                        	; function negw(a: integer): integer
6943
 8968  FE3ABB                	RF1F:
6944
 8969  FE3ABB                		ACC16
6945
  Tue Jul 17 11:00:23 2018                                                                                               Page  113
6946
 
6947
 
6948
 
6949
 
6950
 8970  FE3ABB  C2 20         		rep	#PMFLAG
6951
 8971                        		.LONGA	on
6952
 8972                        		.MNLIST
6953
 8973  FE3ABD  B2 2D         		lda	($2D)		; a
6954
 8974  FE3ABF  49 FF FF      		eor	#$FFFF
6955
 8975  FE3AC2  1A            		inc	a
6956
 8976  FE3AC3  92 2D         		sta	($2D)
6957
 8977  FE3AC5                		ACC08
6958
 8978  FE3AC5  E2 20         		sep	#PMFLAG
6959
 8979                        		.LONGA	off
6960
 8980                        		.MNLIST
6961
 8981  FE3AC7  60            		rts
6962
 8982
6963
 8983                        	; function lpeekb(bank: $00..$FF; address: integer): $00..$FF
6964
 8984  FE3AC8                	RF23:
6965
 8985  FE3AC8                		ACC16
6966
 8986  FE3AC8  C2 20         		rep	#PMFLAG
6967
 8987                        		.LONGA	on
6968
 8988                        		.MNLIST
6969
 8989  FE3ACA  B2 2D         		lda	($2D)
6970
 8990  FE3ACC  85 76         		sta	longp
6971
 8991  FE3ACE                		ACC08
6972
 8992  FE3ACE  E2 20         		sep	#PMFLAG
6973
 8993                        		.LONGA	off
6974
 8994                        		.MNLIST
6975
 8995  FE3AD0  98            		tya
6976
 8996  FE3AD1  A0 03         		ldy	#3
6977
 8997  FE3AD3  91 2D         		sta	($2D),y
6978
 8998  FE3AD5  88            		dey
6979
 8999  FE3AD6  B1 2D         		lda	($2D),y
6980
 9000  FE3AD8  85 78         		sta	longp+2
6981
 9001  FE3ADA  A7 76         		lda	[longp]
6982
 9002  FE3ADC  91 2D         		sta	($2D),y
6983
 9003  FE3ADE  4C 95 1E      		jmp	SK02
6984
 9004
6985
 9005                        	; function lpeekw(bank: $00..$FF; address: integer): integer
6986
 9006  FE3AE1                	RF24:
6987
 9007  FE3AE1                		ACC16
6988
 9008  FE3AE1  C2 20         		rep	#PMFLAG
6989
 9009                        		.LONGA	on
6990
 9010                        		.MNLIST
6991
 9011  FE3AE3  B2 2D         		lda	($2D)
6992
 9012  FE3AE5  85 76         		sta	longp
6993
 9013  FE3AE7                		ACC08
6994
 9014  FE3AE7  E2 20         		sep	#PMFLAG
6995
 9015                        		.LONGA	off
6996
 9016                        		.MNLIST
6997
 9017  FE3AE9  A0 02         		ldy	#2
6998
 9018  FE3AEB  B1 2D         		lda	($2D),y
6999
 9019  FE3AED  85 78         		sta	longp+2
7000
 9020  FE3AEF                		ACC16
7001
 9021  FE3AEF  C2 20         		rep	#PMFLAG
7002
 9022                        		.LONGA	on
7003
 9023                        		.MNLIST
7004
 9024  FE3AF1  A7 76         		lda	[longp]
7005
 9025  FE3AF3  91 2D         		sta	($2D),y
7006
 9026  FE3AF5                		ACC08
7007
  Tue Jul 17 11:00:23 2018                                                                                               Page  114
7008
 
7009
 
7010
 
7011
 
7012
 9027  FE3AF5  E2 20         		sep	#PMFLAG
7013
 9028                        		.LONGA	off
7014
 9029                        		.MNLIST
7015
 9030  FE3AF7  4C 95 1E      		jmp	SK02
7016
 9031
7017
 9032                        	; procedure pokeb(address, val: integer)
7018
 9033  FE3AFA                	RF25:
7019
 9034  FE3AFA  A0 02         		ldy	#2
7020
 9035  FE3AFC                		ACC16
7021
 9036  FE3AFC  C2 20         		rep	#PMFLAG
7022
 9037                        		.LONGA	on
7023
 9038                        		.MNLIST
7024
 9039  FE3AFE  B1 2D         		lda	($2D),y
7025
 9040  FE3B00  85 27         		sta	$27
7026
 9041  FE3B02                		ACC08
7027
 9042  FE3B02  E2 20         		sep	#PMFLAG
7028
 9043                        		.LONGA	off
7029
 9044                        		.MNLIST
7030
 9045  FE3B04  B2 2D         		lda	($2D)
7031
 9046  FE3B06  92 27         		sta	($27)
7032
 9047  FE3B08  4C E5 1D      		jmp	SK04
7033
 9048  FE3B0B
7034
 9049                        	; procedure pokew(address, val: integer)
7035
 9050  FE3B0B                	RF26:
7036
 9051  FE3B0B  A0 02         		ldy	#2
7037
 9052  FE3B0D                		ACC16
7038
 9053  FE3B0D  C2 20         		rep	#PMFLAG
7039
 9054                        		.LONGA	on
7040
 9055                        		.MNLIST
7041
 9056  FE3B0F  B1 2D         		lda	($2D),y
7042
 9057  FE3B11  85 27         		sta	$27
7043
 9058  FE3B13  B2 2D         		lda	($2D)
7044
 9059  FE3B15  92 27         		sta	($27)
7045
 9060  FE3B17                		ACC08
7046
 9061  FE3B17  E2 20         		sep	#PMFLAG
7047
 9062                        		.LONGA	off
7048
 9063                        		.MNLIST
7049
 9064  FE3B19  4C E5 1D      		jmp	SK04
7050
 9065
7051
 9066                        	; procedure pokebz(zp, val: integer)
7052
 9067  FE3B1C                	RF27:
7053
 9068  FE3B1C  A0 02         		ldy	#2
7054
 9069  FE3B1E  B1 2D         		lda	($2D),y
7055
 9070  FE3B20  AA            		tax
7056
 9071  FE3B21  B2 2D         		lda	($2D)
7057
 9072  FE3B23  95 00         		sta	<$00,x
7058
 9073  FE3B25  4C E5 1D      		jmp	SK04
7059
 9074
7060
 9075                        	; procedure pokewz(zp, val: integer)
7061
 9076  FE3B28                	RF28:
7062
 9077  FE3B28  A0 02         		ldy	#2
7063
 9078  FE3B2A  B1 2D         		lda	($2D),y
7064
 9079  FE3B2C  AA            		tax
7065
 9080  FE3B2D                		ACC16
7066
 9081  FE3B2D  C2 20         		rep	#PMFLAG
7067
 9082                        		.LONGA	on
7068
 9083                        		.MNLIST
7069
  Tue Jul 17 11:00:23 2018                                                                                               Page  115
7070
 
7071
 
7072
 
7073
 
7074
 9084  FE3B2F  B2 2D         		lda	($2D)
7075
 9085  FE3B31  95 00         		sta	<$00,x
7076
 9086  FE3B33                		ACC08
7077
 9087  FE3B33  E2 20         		sep	#PMFLAG
7078
 9088                        		.LONGA	off
7079
 9089                        		.MNLIST
7080
 9090  FE3B35  4C E5 1D      		jmp	SK04
7081
 9091
7082
 9092                        	; procedure lpokeb(bank, address, val: integer)
7083
 9093  FE3B38                	RF29:
7084
 9094  FE3B38  A0 02         		ldy	#2
7085
 9095  FE3B3A                		ACC16
7086
 9096  FE3B3A  C2 20         		rep	#PMFLAG
7087
 9097                        		.LONGA	on
7088
 9098                        		.MNLIST
7089
 9099  FE3B3C  B1 2D         		lda	($2D),y
7090
 9100  FE3B3E  85 76         		sta	longp
7091
 9101  FE3B40                		ACC08
7092
 9102  FE3B40  E2 20         		sep	#PMFLAG
7093
 9103                        		.LONGA	off
7094
 9104                        		.MNLIST
7095
 9105  FE3B42  A0 04         		ldy	#4
7096
 9106  FE3B44  B1 2D         		lda	($2D),y
7097
 9107  FE3B46  85 78         		sta	longp+2
7098
 9108  FE3B48  B2 2D         		lda	($2D)
7099
 9109  FE3B4A  87 76         		sta	[longp]
7100
 9110  FE3B4C  80 16         		bra	RF2Ax
7101
 9111  FE3B4E
7102
 9112                        	; procedure lpokew(bank, address, val: integer)
7103
 9113  FE3B4E                	RF2A:
7104
 9114  FE3B4E  A0 02         		ldy	#2
7105
 9115  FE3B50                		ACC16
7106
 9116  FE3B50  C2 20         		rep	#PMFLAG
7107
 9117                        		.LONGA	on
7108
 9118                        		.MNLIST
7109
 9119  FE3B52  B1 2D         		lda	($2D),y
7110
 9120  FE3B54  85 76         		sta	longp
7111
 9121  FE3B56                		ACC08
7112
 9122  FE3B56  E2 20         		sep	#PMFLAG
7113
 9123                        		.LONGA	off
7114
 9124                        		.MNLIST
7115
 9125  FE3B58  A0 04         		ldy	#4
7116
 9126  FE3B5A  B1 2D         		lda	($2D),y
7117
 9127  FE3B5C  85 78         		sta	longp+2
7118
 9128  FE3B5E                		ACC16
7119
 9129  FE3B5E  C2 20         		rep	#PMFLAG
7120
 9130                        		.LONGA	on
7121
 9131                        		.MNLIST
7122
 9132  FE3B60  B2 2D         		lda	($2D)
7123
 9133  FE3B62  87 76         		sta	[longp]
7124
 9134  FE3B64                	RF2Ax:	ACC16CLC
7125
 9135  FE3B64  C2 21         		rep	#(PMFLAG.OR.PCFLAG)
7126
 9136                        		.LONGA	on
7127
 9137                        		.MNLIST
7128
 9138  FE3B66  A5 2D         		lda	$2D
7129
 9139  FE3B68  69 06 00      		adc	#$0006
7130
 9140  FE3B6B  85 2D         		sta	$2D
7131
  Tue Jul 17 11:00:23 2018                                                                                               Page  116
7132
 
7133
 
7134
 
7135
 
7136
 9141  FE3B6D                		ACC08
7137
 9142  FE3B6D  E2 20         		sep	#PMFLAG
7138
 9143                        		.LONGA	off
7139
 9144                        		.MNLIST
7140
 9145  FE3B6F  60            		rts
7141
 9146
7142
 9147                        	; function shl(val, shift: integer): integer
7143
 9148  FE3B70                	RF2B:
7144
 9149  FE3B70  C8            		iny
7145
 9150  FE3B71  B1 2D         		lda	($2D),y
7146
 9151  FE3B73  30 29         		bmi	RF2Bz
7147
 9152  FE3B75  D0 1B         		bne	RF2Bx
7148
 9153  FE3B77  88            		dey
7149
 9154  FE3B78  B1 2D         		lda	($2D),y
7150
 9155  FE3B7A  F0 1F         		beq	RF2By
7151
 9156  FE3B7C  C9 10         	R1EE6:	cmp	#$10
7152
 9157  FE3B7E  B0 12         		bcs	RF2Bx
7153
 9158  FE3B80  AA            		tax
7154
 9159  FE3B81  A0 02         		ldy	#2
7155
 9160  FE3B83                		ACC16
7156
 9161  FE3B83  C2 20         		rep	#PMFLAG
7157
 9162                        		.LONGA	on
7158
 9163                        		.MNLIST
7159
 9164  FE3B85  B1 2D         		lda	($2D),y
7160
 9165  FE3B87  0A            	?02:	asl	a
7161
 9166  FE3B88  CA            		dex
7162
 9167  FE3B89  D0 FC         		bne	?02
7163
 9168  FE3B8B  91 2D         		sta	($2D),y
7164
 9169  FE3B8D                		ACC08
7165
 9170  FE3B8D  E2 20         		sep	#PMFLAG
7166
 9171                        		.LONGA	off
7167
 9172                        		.MNLIST
7168
 9173  FE3B8F  4C 95 1E      		jmp	SK02
7169
 9174
7170
 9175  FE3B92  A0 02         	RF2Bx:	ldy	#2
7171
 9176  FE3B94  A9 00         		lda	#0
7172
 9177  FE3B96  91 2D         		sta	($2D),y
7173
 9178  FE3B98  C8            		iny
7174
 9179  FE3B99  91 2D         		sta	($2D),y
7175
 9180  FE3B9B  4C 95 1E      	RF2By:	jmp	SK02
7176
 9181
7177
 9182  FE3B9E  49 FF         	RF2Bz:	eor	#$FF
7178
 9183  FE3BA0  D0 F0         		bne	RF2Bx
7179
 9184  FE3BA2  88            		dey
7180
 9185  FE3BA3  38            		sec
7181
 9186  FE3BA4  F1 2D         		sbc	($2D),y
7182
 9187  FE3BA6  90 16         		bcc	R1F1C
7183
 9188  FE3BA8  49 FF         	R1F3C:	eor	#$FF
7184
 9189  FE3BAA  D0 E6         		bne	RF2Bx
7185
 9190  FE3BAC  88            		dey
7186
 9191  FE3BAD  38            		sec
7187
 9192  FE3BAE  F1 2D         		sbc	($2D),y
7188
 9193  FE3BB0  80 CA         		bra	R1EE6
7189
 9194
7190
 9195                        	; function shr(val, shift: integer): integer
7191
 9196  FE3BB2                	RF2C:
7192
 9197  FE3BB2  C8            		iny
7193
  Tue Jul 17 11:00:23 2018                                                                                               Page  117
7194
 
7195
 
7196
 
7197
 
7198
 9198  FE3BB3  B1 2D         		lda	($2D),y
7199
 9199  FE3BB5  30 F1         		bmi	R1F3C
7200
 9200  FE3BB7  D0 D9         		bne	RF2Bx
7201
 9201  FE3BB9  88            		dey
7202
 9202  FE3BBA  B1 2D         		lda	($2D),y
7203
 9203  FE3BBC  F0 DD         		beq	RF2By
7204
 9204  FE3BBE  C9 10         	R1F1C:	cmp	#$10
7205
 9205  FE3BC0  B0 D0         		bcs	RF2Bx
7206
 9206  FE3BC2  AA            		tax
7207
 9207  FE3BC3  A0 02         		ldy	#2
7208
 9208  FE3BC5                		ACC16
7209
 9209  FE3BC5  C2 20         		rep	#PMFLAG
7210
 9210                        		.LONGA	on
7211
 9211                        		.MNLIST
7212
 9212  FE3BC7  B1 2D         		lda	($2D),y
7213
 9213  FE3BC9  4A            	?02:	lsr	a
7214
 9214  FE3BCA  CA            		dex
7215
 9215  FE3BCB  D0 FC         		bne	?02
7216
 9216  FE3BCD  91 2D         		sta	($2D),y
7217
 9217  FE3BCF                		ACC08
7218
 9218  FE3BCF  E2 20         		sep	#PMFLAG
7219
 9219                        		.LONGA	off
7220
 9220                        		.MNLIST
7221
 9221  FE3BD1  4C 95 1E      		jmp	SK02
7222
 9222
7223
 9223                        	; function exp10(x: real): real
7224
 9224  FE3BD4                	RF2D:
7225
 9225  FE3BD4  A9 A7         		lda	#<FCON10
7226
 9226  FE3BD6  A0 9C         		ldy	#>FCON10
7227
 9227  FE3BD8  20 B8 93      		jsr	XBA8CK		; move float 10 to FAC #2
7228
 9228  FE3BDB  A5 2D         		lda	$2D
7229
 9229  FE3BDD  A4 2E         		ldy	$2E
7230
 9230  FE3BDF  20 33 97      		jsr	XBBA2		; move x to FAC #1
7231
 9231  FE3BE2  20 14 9B      		jsr	XBF7B		; compute 10^x
7232
 9232  FE3BE5  A6 2D         		ldx	$2D
7233
 9233  FE3BE7  A4 2E         		ldy	$2E
7234
 9234  FE3BE9  4C 92 97      		jmp	XBBD4
7235
 9235
7236
 9236                        	; function log(x:real):real
7237
 9237  FE3BEC                	RF2E:
7238
 9238  FE3BEC  A5 2D         		lda	$2D
7239
 9239  FE3BEE  A4 2E         		ldy	$2E
7240
 9240  FE3BF0  20 33 97      		jsr	XBBA2		; move x to FAC #1
7241
 9241  FE3BF3  20 8E 95      		jsr	XB9EA		; compute ln(x)
7242
 9242  FE3BF6  20 CE 97      		jsr	XBC0C		; round FAC #1 and move to FAC #2
7243
 9243  FE3BF9  A9 DF         		lda	#<XLN10
7244
 9244  FE3BFB  A0 9C         		ldy	#>XLN10
7245
 9245  FE3BFD  20 49 97      		jsr	XBBA2K		; move ln(10) to FAC #1
7246
 9246  FE3C00  20 94 96      		jsr	XBB12		; compute ln(x)/ln(10)
7247
 9247  FE3C03  A6 2D         		ldx	$2D
7248
 9248  FE3C05  A4 2E         		ldy	$2E
7249
 9249  FE3C07  4C 92 97      		jmp	XBBD4
7250
 9250
7251
 9251                        	;function nraise(x: real; n: integer): real
7252
 9252  FE3C0A                	RF2F:
7253
 9253  FE3C0A  64 23         		stz	$23
7254
 9254  FE3C0C  A2 FF         		ldx	#$FF
7255
  Tue Jul 17 11:00:23 2018                                                                                               Page  118
7256
 
7257
 
7258
 
7259
 
7260
 9255  FE3C0E                		ACC16
7261
 9256  FE3C0E  C2 20         		rep	#PMFLAG
7262
 9257                        		.LONGA	on
7263
 9258                        		.MNLIST
7264
 9259  FE3C10  B2 2D         		lda	($2D)
7265
 9260  FE3C12  85 21         		sta	$21
7266
 9261  FE3C14  A5 2D         		lda	$2D
7267
 9262  FE3C16  1A            		inc	a
7268
 9263  FE3C17  1A            		inc	a
7269
 9264  FE3C18  85 2D         		sta	$2D
7270
 9265  FE3C1A  A5 21         		lda	$21
7271
 9266  FE3C1C  10 08         		bpl	?02
7272
 9267  FE3C1E  98            		tya
7273
 9268  FE3C1F  38            		sec
7274
 9269  FE3C20  E5 21         		sbc	$21
7275
 9270  FE3C22  85 21         		sta	$21
7276
 9271  FE3C24  86 23         		stx	$23
7277
 9272  FE3C26  F0 33         	?02:	beq	?20		; if n = 0 return 1
7278
 9273  FE3C28  3A            		dec	a
7279
 9274  FE3C29  85 21         		sta	$21		; counter
7280
 9275  FE3C2B                		ACC08
7281
 9276  FE3C2B  E2 20         		sep	#PMFLAG
7282
 9277                        		.LONGA	off
7283
 9278                        		.MNLIST
7284
 9279  FE3C2D  08            		php
7285
 9280  FE3C2E  A5 2D         		lda	$2D
7286
 9281  FE3C30  A4 2E         		ldy	$2E
7287
 9282  FE3C32  20 33 97      		jsr	XBBA2		; move x to FAC #1
7288
 9283  FE3C35  28            		plp
7289
 9284  FE3C36  F0 14         		beq	?14		; if n = 1 return x, if n = -1 return 1/x
7290
 9285  FE3C38  20 CE 97      	?06:	jsr	XBC0C		; round FAC #1 and move to FAC #2
7291
 9286  FE3C3B  A5 2D         		lda	$2D
7292
 9287  FE3C3D  A4 2E         		ldy	$2E
7293
 9288  FE3C3F  A6 A2         		ldx	vbnk
7294
 9289  FE3C41  20 DF 95      		jsr	XBA28		; x*x
7295
 9290  FE3C44                		ACC16
7296
 9291  FE3C44  C2 20         		rep	#PMFLAG
7297
 9292                        		.LONGA	on
7298
 9293                        		.MNLIST
7299
 9294  FE3C46  C6 21         		dec	$21
7300
 9295  FE3C48                		ACC08
7301
 9296  FE3C48  E2 20         		sep	#PMFLAG
7302
 9297                        		.LONGA	off
7303
 9298                        		.MNLIST
7304
 9299  FE3C4A  D0 EC         		bne	?06
7305
 9300  FE3C4C  24 23         	?14:	bit	$23
7306
 9301  FE3C4E  10 1B         		bpl	?22		; return value
7307
 9302  FE3C50  A9 A2         		lda	#<XB9BC		; compute 1/x
7308
 9303  FE3C52  A0 9C         		ldy	#>XB9BC
7309
 9304  FE3C54  A2 FE         		ldx	#^RF2F
7310
 9305  FE3C56  20 91 96      		jsr	XBB0F
7311
 9306  FE3C59  80 10         		bra	?22
7312
 9307  FE3C5B                	?20:	ACC08			; return 1.0
7313
 9308  FE3C5B  E2 20         		sep	#PMFLAG
7314
 9309                        		.LONGA	off
7315
 9310                        		.MNLIST
7316
 9311  FE3C5D  A9 81         		lda	#$81
7317
  Tue Jul 17 11:00:23 2018                                                                                               Page  119
7318
 
7319
 
7320
 
7321
 
7322
 9312  FE3C5F  85 61         		sta	$61
7323
 9313  FE3C61  64 62         		stz	$62
7324
 9314  FE3C63  64 63         		stz	$63
7325
 9315  FE3C65  64 64         		stz	$64
7326
 9316  FE3C67  64 65         		stz	$65
7327
 9317  FE3C69  64 66         		stz	$66
7328
 9318  FE3C6B  A6 2D         	?22:	ldx	$2D
7329
 9319  FE3C6D  A4 2E         		ldy	$2E
7330
 9320  FE3C6F  4C 92 97      		jmp	XBBD4
7331
 9321
7332
 9322                        	; pcmdlin(var p)
7333
 9323  FE3C72                	RF30:
7334
 9324  FE3C72                		ACC16CLC
7335
 9325  FE3C72  C2 21         		rep	#(PMFLAG.OR.PCFLAG)
7336
 9326                        		.LONGA	on
7337
 9327                        		.MNLIST
7338
 9328  FE3C74  B2 2D         		lda	($2D)		; pointer to p
7339
 9329  FE3C76  3A            		dec	a
7340
 9330  FE3C77  3A            		dec	a
7341
 9331  FE3C78  85 27         		sta	$27
7342
 9332  FE3C7A  A5 E4         		lda	cmdlin		; load adr
7343
 9333  FE3C7C  69 80 00      		adc	#128
7344
 9334  FE3C7F  92 27         		sta	($27)		; assign to p
7345
 9335  FE3C81                		ACC08
7346
 9336  FE3C81  E2 20         		sep	#PMFLAG
7347
 9337                        		.LONGA	off
7348
 9338                        		.MNLIST
7349
 9339  FE3C83  4C 95 1E      		jmp	SK02
7350
 9340  FE3C86
7351
 9341                        	;---------------------------------------------------------------------------
7352
 9342                        	; address table's
7353
 9343                        	;---------------------------------------------------------------------------
7354
 9344
7355
 9345                        	; function's table for p-code tokens $00..$7F
7356
 9346  FE3C86                	PCODET1:
7357
 9347  FE3C86  7C1D D51D F11D 		.DW	PC00, PC01, PC02, PC03, PC04, PC05, PC06, PC07
7358
               231E 461E 8B1E
7359
               A01E AF1E
7360
 9348  FE3C96  EF1E 5B1E 0A1F 		.DW	PC08, PC09, PC0A, PC0B, PC0C, PC0D, PC0E, PC0F
7361
               771E 811E 7D1F
7362
               D31F DA1F
7363
 9349  FE3CA6  F51F 1020 3820 		.DW	PC10, PC11, PC12, PC13, PC14, PC15, PC16, PC17
7364
               5520 AB1F 8E20
7365
               9720 1A2F
7366
 9350  FE3CB6  052F AB20 C920 		.DW	PC18, PC19, PC1A, PC1B, PC1C, PC1D, PC1E, PC1F
7367
               E720 FF20 9021
7368
               1022 7922
7369
 9351  FE3CC6  FF23 4A24 6E24 		.DW	PC20, PC21, PC22, PC23, PC24, PC25, PC26, PC27
7370
               7924 8424 AA24
7371
               CA24 D324
7372
 9352  FE3CD6  DC24 F524 3C25 		.DW	PC28, PC29, PC2A, PC2B, PC2C, PC2D, PC2E, PC2F
7373
               5125 6925 8325
7374
               A725 BC25
7375
 9353  FE3CE6  EF25 1826 3126 		.DW	PC30, PC31, PC32, PC33, PC34, PC35, PC36, PC37
7376
               4826 6026 8726
7377
               A126 7B2D
7378
 9354  FE3CF6  6227 8527 3525 		.DW	PC38, PC39, PC3A, PC3B, PC3C, PC3D, PC3E, PC3F
7379
  Tue Jul 17 11:00:23 2018                                                                                               Page  120
7380
 
7381
 
7382
 
7383
 
7384
               8F1D B826 D926
7385
               5930 5C30
7386
 9355  FE3D06  8528 A128 B828 		.DW	PC40, PC41, PC42, PC43, PC44, PC45, PC46, PC47
7387
               FE28 0F29 3A29
7388
               E129 E629
7389
 9356  FE3D16  EA29 442A BA2A 		.DW	PC48, PC49, PC4A, PC4B, PC4C, PC4D, PC4E, PC4F
7390
               BD2A E42A 2728
7391
               102B B72A
7392
 9357  FE3D26  9C2B 9C2B A727 		.DW	PC50, PC51, PC52, PC53, PC54, PC55, PC56, PC57
7393
               A727 F627 F627
7394
               D127 D127
7395
 9358  FE3D36  AC27 AC27 AC2B 		.DW	PC58, PC59, PC5A, PC5B, PC5C, PC5D, PC5E, PC5F
7396
               AC2B 5C2C 5C2C
7397
               562D 562D
7398
 9359  FE3D46  332C 332C B82D 		.DW	PC60, PC61, PC62, PC63, PC64, PC65, PC66, PC67
7399
               B82D C62D C62D
7400
               EB2D EB2D
7401
 9360  FE3D56  072E 072E 812D 		.DW	PC68, PC69, PC6A, PC6B, PC6C, PC6D, PC6E, PC6F
7402
               812D 602E 602E
7403
               342E 342E
7404
 9361  FE3D66  912E 912E 322F 		.DW	PC70, PC71, PC72, PC73, PC74, PC75, PC76, PC77
7405
               322F 712F 712F
7406
               5A2E 5A2E
7407
 9362  FE3D76  5A2E 5A2E A22F 		.DW	PC78, PC79, PC7A, PC7B, PC7C, PC7D, PC7E, PC7F
7408
               A22F 2C30 2C30
7409
               3A30 3A30
7410
 9363
7411
 9364                        	; function's table for p-code tokens $80..$FF
7412
 9365  FE3D86                	PCODET2:
7413
 9366  FE3D86  B627 D627 0128 		.DW	PC80, PC90, PCA0, PCB0, PCC0, PCD0, PCE0, PCF0
7414
               3928 4B28 6328
7415
               FB27 2128
7416
 9367
7417
 9368                        	; function's in 'compile' mode
7418
 9369  FE3D96                	CFUNCT:
7419
 9370  FE3D96  7037 B737 0238 		.DW	CF00, CF01, CF02, CF03, CF04, CF05, CF06, CF07, CF08
7420
               D037 0238 0238
7421
               0238 0238 7A37
7422
 9371  FE3DA8
7423
 9372  FE3DA8                	RFUNCT:
7424
 9373  FE3DA8  2E38 3F38 4C38 		.DW	RF00, RF01, RF02, RF03, RF04, RF05, RF06, RF07
7425
               5838 6438 6A38
7426
               B737 9437
7427
 9374  FE3DB8  6F38 8D38 9338 		.DW	RF08, RF09, RF0A, RF0B, RF0C, RF0D, RF0E, RF0F
7428
               9938 9F38 A538
7429
               AB38 B138
7430
 9375  FE3DC8  DA38 2D39 4C39 		.DW	RF10, RF11, RF12, RF13, RF14, RF15, RF16, RF17
7431
               5F39 A339 BB39
7432
               DB39 EC39
7433
 9376  FE3DD8  FD39 093A 173A 		.DW	RF18, RF19, RF1A, RF1B, RF1C, RF1D, RF1E, RF1F
7434
               823A 913A A03A
7435
               AF3A BB3A
7436
 9377  FE3DE8  113A 9E37 7B37 		.DW	RF20, RF21, RF22, RF23, RF24, RF25, RF26, RF27
7437
               C83A E13A FA3A
7438
               0B3B 1C3B
7439
 9378  FE3DF8  283B 383B 4E3B 		.DW	RF28, RF29, RF2A, RF2B, RF2C, RF2D, RF2E, RF2F
7440
               703B B23B D43B
7441
  Tue Jul 17 11:00:23 2018                                                                                               Page  121
7442
 
7443
 
7444
 
7445
 
7446
               EC3B 0A3C
7447
 9379  FE3E08  723C          		.DW	RF30
7448
 9380
7449
 9381                        	; tmp. file name: delete
7450
 9382  FE3E0A                	DTMPNAM:
7451
 9383  FE3E0A  53 30 3A 50 43 		.DB	'S0:PCODEV01.XT?', $00
7452
               4F 44 45 56 30
7453
               31 2E 58 54 3F
7454
               00
7455
 9384
7456
 9385                        	; temp. file name (copy in ram)
7457
 9386  FE3E1A                	TTMPNAM:
7458
 9387  FE3E1A  30 3A 50 43 4F 		.DB	'0:PCODEV01.XTN', $00
7459
               44 45 56 30 31
7460
               2E 58 54 4E 00
7461
 9388  FE3E29  0A00 6400 E803 		.DW	10, 100, 1000, 10000, 40000
7462
               1027 409C
7463
 9389  FE3E33  74 72 75 65 20 		.DB	'true ', $00
7464
               00
7465
 9390  FE3E39  66 61 6C 73 65 		.DB	'false', $00
7466
               00
7467
 9391  FE3E3F  20 00 42 00 20 		.DB	$20, $00, $42, $00, $20, $00, $A0, $00, $20, $00, $A4, $00
7468
               00 A0 00 20 00
7469
               A4 00
7470
 9392          000031        	TTMPSIZ	.EQU	($ - TTMPNAM)
7471
 9393
7472
 9394  FE3E4B                	STRFMT1:
7473
 9395  FE3E4B  64 69 73 6B 20 		.DB	'disk error(#%bu): %s - file: "%s"', $00
7474
               65 72 72 6F 72
7475
               28 23 25 62 75
7476
               29 3A 20 25 73
7477
               20 2D 20 66 69
7478
               6C 65 3A 20 22
7479
               25 73 22 00
7480
 9396  FE3E6D                	STRFMT1A:
7481
 9397  FE3E6D  64 69 73 6B 20 		.DB	'disk error(#%bu): %s', $00
7482
               65 72 72 6F 72
7483
               28 23 25 62 75
7484
               29 3A 20 25 73
7485
               00
7486
 9398  FE3E82                	STRFMT2:
7487
 9399  FE3E82  72 75 6E 74 69 		.DB	'runtime error(#%bu): %s', $00
7488
               6D 65 20 65 72
7489
               72 6F 72 28 23
7490
               25 62 75 29 3A
7491
               20 25 73 00
7492
 9400  FE3E9A                	STRFMT3:
7493
 9401  FE3E9A  2C 20 6C 69 6E 		.DB	', line %hu', $00
7494
               65 20 25 68 75
7495
               00
7496
 9402  FE3EA5                	STRFMT4:
7497
 9403  FE3EA5  62 61 6E 6B 3A 		.DB	'bank: $%02bX, pcptr: $%04hX (current: $%04hX), opcode: $%02bX', $0D
7498
               20 24 25 30 32
7499
               62 58 2C 20 70
7500
               63 70 74 72 3A
7501
               20 24 25 30 34
7502
               68 58 20 28 63
7503
  Tue Jul 17 11:00:23 2018                                                                                               Page  122
7504
 
7505
 
7506
 
7507
 
7508
               75 72 72 65 6E
7509
               74 3A 20 24 25
7510
               30 34 68 58 29
7511
               2C 20 6F 70 63
7512
               6F 64 65 3A 20
7513
               24 25 30 32 62
7514
               58 0D
7515
 9404  FE3EE3  73 74 61 63 6B 		.DB	'stackptr:$%04hX, heapptr:$%04hX, fileptr: $%04hX', $00
7516
               70 74 72 3A 24
7517
               25 30 34 68 58
7518
               2C 20 68 65 61
7519
               70 70 74 72 3A
7520
               24 25 30 34 68
7521
               58 2C 20 66 69
7522
               6C 65 70 74 72
7523
               3A 20 24 25 30
7524
               34 68 58 00
7525
 9405  FE3F14
7526
 9406                        	; run-time error string's
7527
 9407  FE3F14                	TERRS:
7528
 9408  FE3F14  73 74 61 63 6B 		.DB	'stack overflow', 0		; 01
7529
               20 6F 76 65 72
7530
               66 6C 6F 77 00
7531
 9409  FE3F23  69 6E 74 65 67 		.DB	'integer read error', 0		; 02
7532
               65 72 20 72 65
7533
               61 64 20 65 72
7534
               72 6F 72 00
7535
 9410  FE3F36  69 6E 74 65 67 		.DB	'integer overflow', 0		; 03
7536
               65 72 20 6F 76
7537
               65 72 66 6C 6F
7538
               77 00
7539
 9411  FE3F47  61 72 72 61 79 		.DB	'array index error', 0		; 04
7540
               20 69 6E 64 65
7541
               78 20 65 72 72
7542
               6F 72 00
7543
 9412  FE3F59  76 61 72 69 61 		.DB	'variable out of range', 0	; 05
7544
               62 6C 65 20 6F
7545
               75 74 20 6F 66
7546
               20 72 61 6E 67
7547
               65 00
7548
 9413  FE3F6F  63 61 73 65 20 		.DB	'case error', 0			; 06
7549
               65 72 72 6F 72
7550
               00
7551
 9414  FE3F7A  62 61 64 20 70 		.DB	'bad p-code', 0			; 07
7552
               2D 63 6F 64 65
7553
               00
7554
 9415  FE3F85  73 65 74 20 76 		.DB	'set value error', 0		; 08
7555
               61 6C 75 65 20
7556
               65 72 72 6F 72
7557
               00
7558
 9416  FE3F95  66 6C 6F 61 74 		.DB	'floating point overflow', 0	; 09
7559
               69 6E 67 20 70
7560
               6F 69 6E 74 20
7561
               6F 76 65 72 66
7562
               6C 6F 77 00
7563
 9417  FE3FAD  66 6C 6F 61 74 		.DB	'floating point read error', 0	; 0A
7564
               69 6E 67 20 70
7565
  Tue Jul 17 11:00:23 2018                                                                                               Page  123
7566
 
7567
 
7568
 
7569
 
7570
               6F 69 6E 74 20
7571
               72 65 61 64 20
7572
               65 72 72 6F 72
7573
               00
7574
 9418  FE3FC7  75 6E 64 65 66 		.DB	'undefined goto', 0		; 0B
7575
               69 6E 65 64 20
7576
               67 6F 74 6F 00
7577
 9419  FE3FD6  63 6F 6D 70 6C 		.DB	'complex log or square root', 0	; 0C
7578
               65 78 20 6C 6F
7579
               67 20 6F 72 20
7580
               73 71 75 61 72
7581
               65 20 72 6F 6F
7582
               74 00
7583
 9420  FE3FF1  66 69 6C 65 20 		.DB	'file not open for reading', 0	; 0D
7584
               6E 6F 74 20 6F
7585
               70 65 6E 20 66
7586
               6F 72 20 72 65
7587
               61 64 69 6E 67
7588
               00
7589
 9421  FE400B  66 69 6C 65 20 		.DB	'file not open for writing', 0	; 0E
7590
               6E 6F 74 20 6F
7591
               70 65 6E 20 66
7592
               6F 72 20 77 72
7593
               69 74 69 6E 67
7594
               00
7595
 9422  FE4025  65 6E 64 20 6F 		.DB	'end of file', 0		; 0F
7596
               66 20 66 69 6C
7597
               65 00
7598
 9423  FE4031  6E 6F 20 66 72 		.DB	'no free i/o channels', 0	; 10
7599
               65 65 20 69 2F
7600
               6F 20 63 68 61
7601
               6E 6E 65 6C 73
7602
               00
7603
 9424  FE4046  64 65 76 69 63 		.DB	'device read error', 0		; 11
7604
               65 20 72 65 61
7605
               64 20 65 72 72
7606
               6F 72 00
7607
 9425  FE4058  64 69 76 69 73 		.DB	'division by zero', 0		; 12
7608
               69 6F 6E 20 62
7609
               79 20 7A 65 72
7610
               6F 00
7611
 9426  FE4069  62 72 65 61 6B 		.DB	'break', 0			; 13
7612
               00
7613
 9427  FE406F  6D 69 73 73 69 		.DB	'missing drive number', 0	; 14
7614
               6E 67 20 64 72
7615
               69 76 65 20 6E
7616
               75 6D 62 65 72
7617
               00
7618
 9428  FE4084  6C 6F 67 69 63 		.DB	'logical file not open', 0	; 15
7619
               61 6C 20 66 69
7620
               6C 65 20 6E 6F
7621
               74 20 6F 70 65
7622
               6E 00
7623
 9429  FE409A  6C 6F 67 69 63 		.DB	'logical file already open', 0	; 16
7624
               61 6C 20 66 69
7625
               6C 65 20 61 6C
7626
               72 65 61 64 79
7627
  Tue Jul 17 11:00:23 2018                                                                                               Page  124
7628
 
7629
 
7630
 
7631
 
7632
               20 6F 70 65 6E
7633
               00
7634
 9430  FE40B4  66 69 6C 65 20 		.DB	'file not found', 0		; 17
7635
               6E 6F 74 20 66
7636
               6F 75 6E 64 00
7637
 9431  FE40C3  64 65 76 69 63 		.DB	'device not present', 0		; 18
7638
               65 20 6E 6F 74
7639
               20 70 72 65 73
7640
               65 6E 74 00
7641
 9432  FE40D6  6D 69 73 73 69 		.DB	'missing file name', 0		; 19
7642
               6E 67 20 66 69
7643
               6C 65 20 6E 61
7644
               6D 65 00
7645
 9433  FE40E8  69 6C 6C 65 67 		.DB	'illegal device number', 0	; 1A
7646
               61 6C 20 64 65
7647
               76 69 63 65 20
7648
               6E 75 6D 62 65
7649
               72 00
7650
 9434  FE40FE  73 68 6F 75 6C 		.DB	'should not occur', 0
7651
               64 20 6E 6F 74
7652
               20 6F 63 63 75
7653
               72 00
7654
 9435  FE410F  00            		.DB	$00
7655
 
7656
 
7657
             Lines Assembled : 8587                  Errors : 0
7658
 
7659
 
7660