diff --git a/main_tb_behav.wcfg b/main_tb_behav.wcfg index 02ad119..d3a68df 100644 --- a/main_tb_behav.wcfg +++ b/main_tb_behav.wcfg @@ -14,15 +14,15 @@ - - - + + + - + - + cpuAddress[31:0] cpuAddress[31:0] @@ -35,276 +35,68 @@ cpuDataIn[15:0] cpuDataIn[15:0] - - ram_ack - ram_ack + + rxd1 + rxd1 - - cpuCS - cpuCS + + txd1 + txd1 - - cpuReadEn - cpuReadEn + + cts1 + cts1 - - cpuWriteEn - cpuWriteEn + + rts1 + rts1 - - cpu_r_w - cpu_r_w - - - cpu_dtack - cpu_dtack - - - n_basRom1CS - n_basRom1CS + + serialClock + serialClock - - n_basRom2CS - n_basRom2CS + + interface1DataOut[7:0] + interface1DataOut[7:0] - - dispByteLatch[7:0] - dispByteLatch[7:0] - - - dispState - dispState - - - regsel - regsel + + n_int1 + n_int1 n_interface1CS n_interface1CS - - cpuAddress[26:0] - cpuAddress[26:0] - - - cpuDataOut[15:0] - cpuDataOut[15:0] - - - mem_cen - mem_cen - - - mem_oen - mem_oen - - - mem_wen - mem_wen - - - mem_data_valid - mem_data_valid - - - mem_ready - mem_ready - - - cState - cState - - - nState - nState - - - mem_rd_data[63:0] - mem_rd_data[63:0] - - - mem_wdf_data[63:0] - mem_wdf_data[63:0] - - - oldAddress[26:0] - oldAddress[26:0] - - - ram_ub - ram_ub - - - ram_lb - ram_lb - - - LED[15:0] - LED[15:0] - - - cpu_clk - cpu_clk - - - CPU_RESETN - CPU_RESETN - - - init_calib_complete - init_calib_complete - - - reset_req_n - reset_req_n - - - rst_n - rst_n - - - rst_stretch[31:0] - rst_stretch[31:0] - - - ui_clk - ui_clk + + cpu_uds + cpu_uds - - mem_data_valid - mem_data_valid + + cpu_lds + cpu_lds - - mem_data_ready - mem_data_ready - - - read_complete - read_complete - - - write_complete - write_complete - - - read_transaction_complete - read_transaction_complete - - - rstrobe - rstrobe - - - wstrobe - wstrobe - - - din[42:0] - din[42:0] - - - dout[42:0] - dout[42:0] - - - rd_en - rd_en - - - rst - rst - - - wr_ack - wr_ack - - - read_complete - read_complete - - - write_complete - write_complete - - - mem_rd_data_end - mem_rd_data_end - - - mem_rd_data_valid - mem_rd_data_valid - - - mem_rd_data[63:0] - mem_rd_data[63:0] - - - mem_wdf_data[63:0] - mem_wdf_data[63:0] - - - mem_wdf_end - mem_wdf_end - - - mem_wdf_wren - mem_wdf_wren - - - mem_wdf_mask[7:0] - mem_wdf_mask[7:0] - - - mem_wdf_rdy - mem_wdf_rdy - - - save_address[27:0] - save_address[27:0] - - - save_data[63:0] - save_data[63:0] - - - rstrobe_sync - rstrobe_sync - - - wstrobe_sync - wstrobe_sync - - - state[2:0] - state[2:0] - - - cache_write_ack - cache_write_ack - - - cache_read_en - cache_read_en + + cpu_r_w + cpu_r_w - - cache_data[15:0] - cache_data[15:0] + + txByteWritten + txByteWritten - - cache_addr[42:16] - cache_addr[42:16] + + txByteLatch[7:0] + txByteLatch[7:0] - - cache_data_count[9:0] - cache_data_count[9:0] + + txBuffer[7:0] + txBuffer[7:0] - - cache_write_en - cache_write_en + + regsel + regsel - - mem_busy - mem_busy + + memAddress[15:0] + memAddress[15:0] diff --git a/roms/ehbasic/basic68k.L68 b/roms/ehbasic/basic68k.L68 index 780ea3b..7ee63cd 100644 --- a/roms/ehbasic/basic68k.L68 +++ b/roms/ehbasic/basic68k.L68 @@ -1,6 +1,6 @@ 0000083E Starting Address Assembler used: EASy68K Editor/Assembler v5.16.01 -Created On: 16/07/2020 20:55:48 +Created On: 15/08/2020 20:38:05 00000000 1 ************************************************************************************* 00000000 2 * * @@ -73,9176 +73,9174 @@ Created On: 16/07/2020 20:55:48 00000000 69 INCLUDE "basic68k.inc" 00000000 70 00000000 71 -00000064 72 ORG 100 * start of RAM -00000064 73 -00000064 74 ram_strt ds.l $300 * allow 1K for the stack, this should be plenty -00000C64 75 * for any BASIC program that doesn't do something -00000C64 76 * silly, it could even be much less. -00000C64 77 ram_base -00000C64 78 LAB_WARM ds.w 1 * BASIC warm start entry point -00000C66 79 Wrmjpv ds.l 1 * BASIC warm start jump vector -00000C6A 80 -00000C6A 81 Usrjmp ds.w 1 * USR function JMP address -00000C6C 82 Usrjpv ds.l 1 * USR function JMP vector -00000C70 83 -00000C70 84 -00000C70 85 V_INPT ds.w 1 * non halting scan input device entry point -00000C72 86 V_INPTv ds.l 1 * non halting scan input device jump vector -00000C76 87 -00000C76 88 V_OUTP ds.w 1 * send byte to output device entry point -00000C78 89 V_OUTPv ds.l 1 * send byte to output device jump vector -00000C7C 90 -00000C7C 91 V_LOAD ds.w 1 * load BASIC program entry point -00000C7E 92 V_LOADv ds.l 1 * load BASIC program jump vector -00000C82 93 -00000C82 94 V_SAVE ds.w 1 * save BASIC program entry point -00000C84 95 V_SAVEv ds.l 1 * save BASIC program jump vector -00000C88 96 -00000C88 97 V_CTLC ds.w 1 * save CTRL-C check entry point -00000C8A 98 V_CTLCv ds.l 1 * save CTRL-C check jump vector -00000C8E 99 -00000C8E 100 Itemp ds.l 1 * temporary integer (for GOTO etc) -00000C92 101 -00000C92 102 Smeml ds.l 1 * start of memory (start of program) -00000C96 103 -00000C96 104 -00000C96 105 Sfncl ds.l 1 * start of functions (end of Program) -00000C9A 106 -00000C9A 107 -00000C9A 108 Svarl ds.l 1 * start of variables (end of functions) -00000C9E 109 -00000C9E 110 -00000C9E 111 Sstrl ds.l 1 * start of strings (end of variables) -00000CA2 112 -00000CA2 113 -00000CA2 114 Sarryl ds.l 1 * start of arrays (end of strings) -00000CA6 115 -00000CA6 116 -00000CA6 117 Earryl ds.l 1 * end of arrays (start of free mem) -00000CAA 118 Sstorl ds.l 1 * string storage (moving down) -00000CAE 119 Ememl ds.l 1 * end of memory (upper bound of RAM) -00000CB2 120 Sutill ds.l 1 * string utility ptr -00000CB6 121 Clinel ds.l 1 * current line (Basic line number) -00000CBA 122 Blinel ds.l 1 * break line (Basic line number) -00000CBE 123 -00000CBE 124 Cpntrl ds.l 1 * continue pointer -00000CC2 125 Dlinel ds.l 1 * current DATA line -00000CC6 126 Dptrl ds.l 1 * DATA pointer -00000CCA 127 Rdptrl ds.l 1 * read pointer -00000CCE 128 Varname ds.l 1 * current var name -00000CD2 129 Cvaral ds.l 1 * current var address -00000CD6 130 Lvarpl ds.l 1 * variable pointer for LET and FOR/NEXT -00000CDA 131 -00000CDA 132 des_sk_e ds.l 6 * descriptor stack end address -00000CF2 133 des_sk * descriptor stack start address -00000CF2 134 * use a4 for the descriptor pointer -00000CF2 135 ds.w 1 -00000CF4 136 Ibuffs ds.l $40 * start of input buffer -00000DF4 137 Ibuffe -00000DF4 138 * end of input buffer -00000DF4 139 -00000DF4 140 FAC1_m ds.l 1 * FAC1 mantissa1 -00000DF8 141 FAC1_e ds.w 1 * FAC1 exponent -00000DFA =00000DF9 142 FAC1_s EQU FAC1_e+1 * FAC1 sign (b7) -00000DFA 143 ds.w 1 -00000DFC 144 -00000DFC 145 FAC2_m ds.l 1 * FAC2 mantissa1 -00000E00 146 FAC2_e ds.l 1 * FAC2 exponent -00000E04 =00000E01 147 FAC2_s EQU FAC2_e+1 * FAC2 sign (b7) -00000E04 =00000E02 148 FAC_sc EQU FAC2_e+2 * FAC sign comparison, Acc#1 vs #2 -00000E04 =00000E03 149 flag EQU FAC2_e+3 * flag byte for divide routine -00000E04 150 -00000E04 151 PRNlword ds.l 1 * PRNG seed long word -00000E08 152 -00000E08 153 ut1_pl ds.l 1 * utility pointer 1 -00000E0C 154 -00000E0C 155 Asptl ds.l 1 * array size/pointer -00000E10 156 Astrtl ds.l 1 * array start pointer -00000E14 157 -00000E14 =00000E10 158 numexp EQU Astrtl * string to float number exponent count -00000E14 =00000E11 159 expcnt EQU Astrtl+1 * string to float exponent count -00000E14 160 -00000E14 =00000E13 161 expneg EQU Astrtl+3 * string to float eval exponent -ve flag -00000E14 162 -00000E14 163 func_l ds.l 1 * function pointer -00000E18 164 -00000E18 165 -00000E18 166 * these two need to be a word aligned pair ! -00000E18 167 Defdim ds.w 1 * default DIM flag -00000E1A =00000E18 168 cosout EQU Defdim * flag which CORDIC output (re-use byte) -00000E1A =00000E19 169 Dtypef EQU Defdim+1 * data type flag, $80=string, $40=integer, $00=float -00000E1A 170 -00000E1A 171 -00000E1A 172 Binss ds.l 4 * number to bin string start (32 chrs) -00000E2A 173 -00000E2A 174 Decss ds.l 1 * number to decimal string start (16 chrs) -00000E2E 175 ds.w 1 * -00000E30 176 Usdss ds.w 1 * unsigned decimal string start (10 chrs) -00000E32 177 -00000E32 178 Hexss ds.l 2 * number to hex string start (8 chrs) -00000E3A 179 -00000E3A 180 BHsend ds.w 1 * bin/decimal/hex string end -00000E3C 181 -00000E3C 182 -00000E3C 183 prstk ds.b 1 * stacked function index -00000E3D 184 -00000E3D 185 tpower ds.b 1 * remember CORDIC power -00000E3E 186 -00000E3E 187 Asrch ds.b 1 * scan-between-quotes flag, alt search character -00000E3F 188 -00000E3F 189 Dimcnt ds.b 1 * # of dimensions -00000E40 190 -00000E40 191 Breakf ds.b 1 * break flag, $00=END else=break -00000E41 192 Oquote ds.b 1 * open quote flag (Flag: DATA; LIST; memory) -00000E42 193 Gclctd ds.b 1 * garbage collected flag -00000E43 194 Sufnxf ds.b 1 * subscript/FNX flag, 1xxx xxx = FN(0xxx xxx) -00000E44 195 Imode ds.b 1 * input mode flag, $00=INPUT, $98=READ -00000E45 196 -00000E45 197 Cflag ds.b 1 * comparison evaluation flag -00000E46 198 -00000E46 199 TabSiz ds.b 1 * TAB step size -00000E47 200 -00000E47 201 comp_f ds.b 1 * compare function flag, bits 0,1 and 2 used -00000E48 202 * bit 2 set if > -00000E48 203 * bit 1 set if = -00000E48 204 * bit 0 set if < -00000E48 205 -00000E48 206 Nullct ds.b 1 * nulls output after each line -00000E49 207 TPos ds.b 1 * BASIC terminal position byte -00000E4A 208 TWidth ds.b 1 * BASIC terminal width byte -00000E4B 209 Iclim ds.b 1 * input column limit -00000E4C 210 ccflag ds.b 1 * CTRL-C check flag -00000E4D 211 ccbyte ds.b 1 * CTRL-C last received byte -00000E4E 212 ccnull ds.b 1 * CTRL-C last received byte 'life' timer -00000E4F 213 -00000E4F 214 -00000E4F 215 file_byte ds.b 1 * load/save data byte -00000E50 216 file_id ds.l 1 * load/save file ID -00000E54 217 -00000E54 218 even * dummy even value and zero pad byte -00000E54 219 -00000E54 220 prg_strt -00000E54 221 -00000E54 222 -00000E54 =00004000 223 ram_addr EQU $04000 * RAM start address -00000E54 =00004000 224 ram_size EQU $04000 * RAM size -00000E54 =00004000 225 -------------------- end include -------------------- -00000E54 226 * RAM offset definitions -00000E54 227 -00000E54 228 * Use this value to run out of ROM -00000E54 229 * ORG $A00000 -00000E54 230 * Use this value to run out of RAM -00000800 231 ORG $000800 * past the vectors in a real system +00000000 72 ORG 0 * start of RAM +00000000 73 +00000000 74 ram_strt ds.l $100 * allow 1K for the stack, this should be plenty +00000400 75 * for any BASIC program that doesn't do something +00000400 76 * silly, it could even be much less. +00000400 77 ram_base +00000400 78 LAB_WARM ds.w 1 * BASIC warm start entry point +00000402 79 Wrmjpv ds.l 1 * BASIC warm start jump vector +00000406 80 +00000406 81 Usrjmp ds.w 1 * USR function JMP address +00000408 82 Usrjpv ds.l 1 * USR function JMP vector +0000040C 83 +0000040C 84 +0000040C 85 V_INPT ds.w 1 * non halting scan input device entry point +0000040E 86 V_INPTv ds.l 1 * non halting scan input device jump vector +00000412 87 +00000412 88 V_OUTP ds.w 1 * send byte to output device entry point +00000414 89 V_OUTPv ds.l 1 * send byte to output device jump vector +00000418 90 +00000418 91 V_LOAD ds.w 1 * load BASIC program entry point +0000041A 92 V_LOADv ds.l 1 * load BASIC program jump vector +0000041E 93 +0000041E 94 V_SAVE ds.w 1 * save BASIC program entry point +00000420 95 V_SAVEv ds.l 1 * save BASIC program jump vector +00000424 96 +00000424 97 V_CTLC ds.w 1 * save CTRL-C check entry point +00000426 98 V_CTLCv ds.l 1 * save CTRL-C check jump vector +0000042A 99 +0000042A 100 Itemp ds.l 1 * temporary integer (for GOTO etc) +0000042E 101 +0000042E 102 Smeml ds.l 1 * start of memory (start of program) +00000432 103 +00000432 104 +00000432 105 Sfncl ds.l 1 * start of functions (end of Program) +00000436 106 +00000436 107 +00000436 108 Svarl ds.l 1 * start of variables (end of functions) +0000043A 109 +0000043A 110 +0000043A 111 Sstrl ds.l 1 * start of strings (end of variables) +0000043E 112 +0000043E 113 +0000043E 114 Sarryl ds.l 1 * start of arrays (end of strings) +00000442 115 +00000442 116 +00000442 117 Earryl ds.l 1 * end of arrays (start of free mem) +00000446 118 Sstorl ds.l 1 * string storage (moving down) +0000044A 119 Ememl ds.l 1 * end of memory (upper bound of RAM) +0000044E 120 Sutill ds.l 1 * string utility ptr +00000452 121 Clinel ds.l 1 * current line (Basic line number) +00000456 122 Blinel ds.l 1 * break line (Basic line number) +0000045A 123 +0000045A 124 Cpntrl ds.l 1 * continue pointer +0000045E 125 Dlinel ds.l 1 * current DATA line +00000462 126 Dptrl ds.l 1 * DATA pointer +00000466 127 Rdptrl ds.l 1 * read pointer +0000046A 128 Varname ds.l 1 * current var name +0000046E 129 Cvaral ds.l 1 * current var address +00000472 130 Lvarpl ds.l 1 * variable pointer for LET and FOR/NEXT +00000476 131 +00000476 132 des_sk_e ds.l 6 * descriptor stack end address +0000048E 133 des_sk * descriptor stack start address +0000048E 134 * use a4 for the descriptor pointer +0000048E 135 ds.w 1 +00000490 136 Ibuffs ds.l $40 * start of input buffer +00000590 137 Ibuffe +00000590 138 * end of input buffer +00000590 139 +00000590 140 FAC1_m ds.l 1 * FAC1 mantissa1 +00000594 141 FAC1_e ds.w 1 * FAC1 exponent +00000596 =00000595 142 FAC1_s EQU FAC1_e+1 * FAC1 sign (b7) +00000596 143 ds.w 1 +00000598 144 +00000598 145 FAC2_m ds.l 1 * FAC2 mantissa1 +0000059C 146 FAC2_e ds.l 1 * FAC2 exponent +000005A0 =0000059D 147 FAC2_s EQU FAC2_e+1 * FAC2 sign (b7) +000005A0 =0000059E 148 FAC_sc EQU FAC2_e+2 * FAC sign comparison, Acc#1 vs #2 +000005A0 =0000059F 149 flag EQU FAC2_e+3 * flag byte for divide routine +000005A0 150 +000005A0 151 PRNlword ds.l 1 * PRNG seed long word +000005A4 152 +000005A4 153 ut1_pl ds.l 1 * utility pointer 1 +000005A8 154 +000005A8 155 Asptl ds.l 1 * array size/pointer +000005AC 156 Astrtl ds.l 1 * array start pointer +000005B0 157 +000005B0 =000005AC 158 numexp EQU Astrtl * string to float number exponent count +000005B0 =000005AD 159 expcnt EQU Astrtl+1 * string to float exponent count +000005B0 160 +000005B0 =000005AF 161 expneg EQU Astrtl+3 * string to float eval exponent -ve flag +000005B0 162 +000005B0 163 func_l ds.l 1 * function pointer +000005B4 164 +000005B4 165 +000005B4 166 * these two need to be a word aligned pair ! +000005B4 167 Defdim ds.w 1 * default DIM flag +000005B6 =000005B4 168 cosout EQU Defdim * flag which CORDIC output (re-use byte) +000005B6 =000005B5 169 Dtypef EQU Defdim+1 * data type flag, $80=string, $40=integer, $00=float +000005B6 170 +000005B6 171 +000005B6 172 Binss ds.l 4 * number to bin string start (32 chrs) +000005C6 173 +000005C6 174 Decss ds.l 1 * number to decimal string start (16 chrs) +000005CA 175 ds.w 1 * +000005CC 176 Usdss ds.w 1 * unsigned decimal string start (10 chrs) +000005CE 177 +000005CE 178 Hexss ds.l 2 * number to hex string start (8 chrs) +000005D6 179 +000005D6 180 BHsend ds.w 1 * bin/decimal/hex string end +000005D8 181 +000005D8 182 +000005D8 183 prstk ds.b 1 * stacked function index +000005D9 184 +000005D9 185 tpower ds.b 1 * remember CORDIC power +000005DA 186 +000005DA 187 Asrch ds.b 1 * scan-between-quotes flag, alt search character +000005DB 188 +000005DB 189 Dimcnt ds.b 1 * # of dimensions +000005DC 190 +000005DC 191 Breakf ds.b 1 * break flag, $00=END else=break +000005DD 192 Oquote ds.b 1 * open quote flag (Flag: DATA; LIST; memory) +000005DE 193 Gclctd ds.b 1 * garbage collected flag +000005DF 194 Sufnxf ds.b 1 * subscript/FNX flag, 1xxx xxx = FN(0xxx xxx) +000005E0 195 Imode ds.b 1 * input mode flag, $00=INPUT, $98=READ +000005E1 196 +000005E1 197 Cflag ds.b 1 * comparison evaluation flag +000005E2 198 +000005E2 199 TabSiz ds.b 1 * TAB step size +000005E3 200 +000005E3 201 comp_f ds.b 1 * compare function flag, bits 0,1 and 2 used +000005E4 202 * bit 2 set if > +000005E4 203 * bit 1 set if = +000005E4 204 * bit 0 set if < +000005E4 205 +000005E4 206 Nullct ds.b 1 * nulls output after each line +000005E5 207 TPos ds.b 1 * BASIC terminal position byte +000005E6 208 TWidth ds.b 1 * BASIC terminal width byte +000005E7 209 Iclim ds.b 1 * input column limit +000005E8 210 ccflag ds.b 1 * CTRL-C check flag +000005E9 211 ccbyte ds.b 1 * CTRL-C last received byte +000005EA 212 ccnull ds.b 1 * CTRL-C last received byte 'life' timer +000005EB 213 +000005EB 214 +000005EB 215 file_byte ds.b 1 * load/save data byte +000005EC 216 file_id ds.l 1 * load/save file ID +000005F0 217 +000005F0 218 even * dummy even value and zero pad byte +000005F0 219 +000005F0 220 -------------------- end include -------------------- +000005F0 221 * RAM offset definitions +000005F0 222 +000005F0 223 * Use this value to run out of ROM +000005F0 224 * ORG $00C000 * past the vectors in a real system +000005F0 225 * Use this value to run out of RAM +00000800 226 ORG $000800 * past the vectors in a real system +00000800 227 +00000800 228 * Use these two lines when running from ROM +00000800 229 *ram_addr EQU $02000 * RAM start address +00000800 230 *ram_size EQU $06000 * RAM size +00000800 231 prg_strt 00000800 232 -00000800 =00F00009 233 ACIAC EQU $F00009 -00000800 =00F0000B 234 ACIAD EQU ACIAC+2 -00000800 =00000000 235 RDRF EQU 0 ; ACIAC Receive Data Register Full -00000800 =00000001 236 TDRE EQU 1 ; ACIAC Transmit Data Register Empty -00000800 237 -00000800 238 -00000800 6000 003C 239 BRA code_start * For convenience, so you can start from first address -00000804 240 -00000804 241 ************************************************************************************* -00000804 242 * -00000804 243 * the following code is simulator specific, change to suit your system -00000804 244 -00000804 245 * output character to the console from register d0.b -00000804 246 -00000804 247 VEC_OUT -00000804 248 ;MOVEM.L A0/D1,-(A7) * Save working registers -00000804 0839 0001 00F00009 249 BTST.B #TDRE,ACIAC.L -0000080C 67F6 250 BEQ.S VEC_OUT -0000080E 13C0 00F0000B 251 MOVE.B D0,ACIAD.L -00000814 252 ;MOVEM.L (A7)+,A0/D1 * Restore working registers -00000814 4E75 253 RTS -00000816 254 +00000800 233 * Use these two lines when running from RAM +00000800 =00004000 234 ram_addr EQU $04000 * RAM start address +00000800 =00004000 235 ram_size EQU $04000 * RAM size +00000800 236 +00000800 =00F00009 237 ACIAC EQU $F00009 +00000800 =00F0000B 238 ACIAD EQU ACIAC+2 +00000800 =00000000 239 RDRF EQU 0 ; ACIAC Receive Data Register Full +00000800 =00000001 240 TDRE EQU 1 ; ACIAC Transmit Data Register Empty +00000800 241 +00000800 6000 003C 242 BRA code_start * For convenience, so you can start from first address +00000804 243 +00000804 244 ************************************************************************************* +00000804 245 * +00000804 246 * the following code is simulator specific, change to suit your system +00000804 247 * output character to the console from register d0.b +00000804 248 +00000804 249 +00000804 250 VEC_OUT +00000804 0839 0001 00F00009 251 BTST.B #TDRE,ACIAC.L +0000080C 67F6 252 BEQ.S VEC_OUT +0000080E 13C0 00F0000B 253 MOVE.B D0,ACIAD.L +00000814 4E75 254 RTS 00000816 255 00000816 256 ************************************************************************************* 00000816 257 * 00000816 258 * input a character from the console into register d0 -00000816 259 * else return Cb=0 if there's no character available +00000816 259 * else return Cb=0 if theres no character available 00000816 260 -00000816 261 VEC_IN -00000816 262 ; MOVEM.L A0/D1,-(A7) * Save working registers +00000816 261 +00000816 262 VEC_IN 00000816 0839 0000 00F00009 263 BTST.B #RDRF,ACIAC.L 0000081E 670C 264 BEQ.S RXNOTREADY 00000820 1039 00F0000B 265 MOVE.B ACIAD.L,D0 -00000826 266 ; MOVEM.L (A7)+,A0/D1 * Restore working registers -00000826 003C 0001 267 ORI.b #1,CCR * Set the carry, flag we got a byte -0000082A 4E75 268 RTS * Return -0000082C 269 RXNOTREADY -0000082C 270 ;MOVEM.L (A7)+,A0/D1 * Restore working registers -0000082C 023C 00FE 271 ANDI.b #$FE,CCR * Clear the carry, flag character available -00000830 4E75 272 RTS -00000832 273 -00000832 274 ************************************************************************************* -00000832 275 * -00000832 276 * LOAD routine for the TS2 computer (not implemented) -00000832 277 -00000832 278 VEC_LD -00000832 7E2E 279 MOVEQ #$2E,d7 * error code $2E "Not implemented" error -00000834 6000 013A 280 BRA LAB_XERR * do error #d7, then warm start -00000838 281 -00000838 282 ************************************************************************************* -00000838 283 * -00000838 284 * SAVE routine for the TS2 computer (not implemented) -00000838 285 -00000838 286 VEC_SV -00000838 7E2E 287 MOVEQ #$2E,d7 * error code $2E "Not implemented" error -0000083A 6000 0134 288 BRA LAB_XERR * do error #d7, then warm start -0000083E 289 -0000083E 290 ************************************************************************************* -0000083E 291 * -0000083E 292 * turn off simulator key echo -0000083E 293 -0000083E 294 code_start -0000083E 295 -0000083E 41F9 00F00009 296 LEA.L ACIAC,A0 * A0 points to console ACIA -00000844 10BC 0015 297 MOVE.B #$15,(A0) * Set up ACIA1 constants (no IRQ, -00000848 298 * RTS* low, 8 bit, no parity, 1 stop) -00000848 299 -00000848 300 * to tell EhBASIC where and how much RAM it has pass the address in a0 and the size -00000848 301 * in d0. these values are at the end of the .inc file -00000848 302 -00000848 207C 00004000 303 MOVEA.l #ram_addr,a0 * tell BASIC where RAM starts -0000084E 203C 00004000 304 MOVE.l #ram_size,d0 * tell BASIC how big RAM is +00000826 003C 0001 266 ORI.b #1,CCR * Set the carry, flag we got a byte +0000082A 4E75 267 RTS * Return +0000082C 268 RXNOTREADY +0000082C 023C 00FE 269 ANDI.b #$FE,CCR * Clear the carry, flag character available +00000830 4E75 270 RTS +00000832 271 +00000832 272 ************************************************************************************* +00000832 273 * +00000832 274 * LOAD routine for the TS2 computer (not implemented) +00000832 275 +00000832 276 VEC_LD +00000832 7E2E 277 MOVEQ #$2E,d7 * error code $2E "Not implemented" error +00000834 6000 013A 278 BRA LAB_XERR * do error #d7, then warm start +00000838 279 +00000838 280 ************************************************************************************* +00000838 281 * +00000838 282 * SAVE routine for the TS2 computer (not implemented) +00000838 283 +00000838 284 VEC_SV +00000838 7E2E 285 MOVEQ #$2E,d7 * error code $2E "Not implemented" error +0000083A 6000 0134 286 BRA LAB_XERR * do error #d7, then warm start +0000083E 287 +0000083E 288 ************************************************************************************* +0000083E 289 * +0000083E 290 * turn off simulator key echo +0000083E 291 +0000083E 292 code_start +0000083E 293 * Set up ACIA parameters +0000083E 41F9 00F00009 294 LEA.L ACIAC,A0 * A0 points to console ACIA +00000844 10BC 0015 295 MOVE.B #$15,(A0) * Set up ACIA1 constants (no IRQ, +00000848 296 * RTS* low, 8 bit, no parity, 1 stop) +00000848 297 +00000848 298 * to tell EhBASIC where and how much RAM it has pass the address in a0 and the size +00000848 299 * in d0. these values are at the end of the .inc file +00000848 300 +00000848 207C 00004000 301 MOVEA.l #ram_addr,a0 * tell BASIC where RAM starts +0000084E 203C 00004000 302 MOVE.l #ram_size,d0 * tell BASIC how big RAM is +00000854 303 +00000854 304 * end of simulator specific code 00000854 305 -00000854 306 * end of simulator specific code -00000854 307 -00000854 308 +00000854 306 +00000854 307 **************************************************************************************** +00000854 308 **************************************************************************************** 00000854 309 **************************************************************************************** 00000854 310 **************************************************************************************** -00000854 311 **************************************************************************************** -00000854 312 **************************************************************************************** +00000854 311 * +00000854 312 * Register use :- (must improve this !!) 00000854 313 * -00000854 314 * Register use :- (must improve this !!) -00000854 315 * -00000854 316 * a6 - temp Bpntr * temporary BASIC execute pointer -00000854 317 * a5 - Bpntr * BASIC execute (get byte) pointer -00000854 318 * a4 - des_sk * descriptor stack pointer -00000854 319 * a3 - ram_strt * start of RAM. all RAM references are offsets -00000854 320 * * from this value -00000854 321 * -00000854 322 -00000854 323 ************************************************************************************* -00000854 324 * -00000854 325 * BASIC cold start entry point. assume entry with RAM address in a0 and RAM length -00000854 326 * in d0 -00000854 327 -00000854 328 LAB_COLD -00000854 B0BC 00004000 329 CMP.l #$4000,d0 * compare size with 16k -0000085A 6C08 330 BGE.s LAB_sizok * branch if >= 16k -0000085C 331 -0000085C 7005 332 MOVEQ #5,d0 * error 5 - not enough RAM -0000085E 1E3C 00E4 333 move.b #228,D7 * Go to TUTOR function -00000862 4E4E 334 trap #14 * Call TRAP14 handler -00000864 335 -00000864 336 LAB_sizok -00000864 2648 337 MOVEA.l a0,a3 * copy RAM base to a3 -00000866 D1C0 338 ADDA.l d0,a0 * a0 is top of RAM -00000868 2748 0CAE 339 MOVE.l a0,Ememl(a3) * set end of mem -0000086C 4FEB 0C64 340 LEA ram_base(a3),sp * set stack to RAM start + 1k * set stack to RAM start + 1k -00000870 341 -00000870 303C 4EF9 342 MOVE.w #$4EF9,d0 * JMP opcode -00000874 204F 343 MOVEA.l sp,a0 * point to start of vector table -00000876 344 -00000876 30C0 345 MOVE.w d0,(a0)+ * LAB_WARM -00000878 43FA FFDA 346 LEA LAB_COLD(pc),a1 * initial warm start vector -0000087C 20C9 347 MOVE.l a1,(a0)+ * set vector -0000087E 348 -0000087E 30C0 349 MOVE.w d0,(a0)+ * Usrjmp -00000880 43FA 00DC 350 LEA LAB_FCER(pc),a1 * initial user function vector -00000884 351 * "Function call" error -00000884 20C9 352 MOVE.l a1,(a0)+ * set vector -00000886 353 -00000886 30C0 354 MOVE.w d0,(a0)+ * V_INPT JMP opcode -00000888 43FA FF8C 355 LEA VEC_IN(pc),a1 * get byte from input device vector -0000088C 20C9 356 MOVE.l a1,(a0)+ * set vector -0000088E 357 -0000088E 30C0 358 MOVE.w d0,(a0)+ * V_OUTP JMP opcode -00000890 43FA FF72 359 LEA VEC_OUT(pc),a1 * send byte to output device vector -00000894 20C9 360 MOVE.l a1,(a0)+ * set vector -00000896 361 -00000896 30C0 362 MOVE.w d0,(a0)+ * V_LOAD JMP opcode -00000898 43FA FF98 363 LEA VEC_LD(pc),a1 * load BASIC program vector -0000089C 20C9 364 MOVE.l a1,(a0)+ * set vector -0000089E 365 -0000089E 30C0 366 MOVE.w d0,(a0)+ * V_SAVE JMP opcode -000008A0 43FA FF96 367 LEA VEC_SV(pc),a1 * save BASIC program vector -000008A4 20C9 368 MOVE.l a1,(a0)+ * set vector -000008A6 369 -000008A6 30C0 370 MOVE.w d0,(a0)+ * V_CTLC JMP opcode -000008A8 43FA 261E 371 LEA VEC_CC(pc),a1 * save CTRL-C check vector -000008AC 20C9 372 MOVE.l a1,(a0)+ * set vector +00000854 314 * a6 - temp Bpntr * temporary BASIC execute pointer +00000854 315 * a5 - Bpntr * BASIC execute (get byte) pointer +00000854 316 * a4 - des_sk * descriptor stack pointer +00000854 317 * a3 - ram_strt * start of RAM. all RAM references are offsets +00000854 318 * * from this value +00000854 319 * +00000854 320 +00000854 321 ************************************************************************************* +00000854 322 * +00000854 323 * BASIC cold start entry point. assume entry with RAM address in a0 and RAM length +00000854 324 * in d0 +00000854 325 +00000854 326 LAB_COLD +00000854 B0BC 00004000 327 CMP.l #$4000,d0 * compare size with 16k +0000085A 6C08 328 BGE.s LAB_sizok * branch if >= 16k +0000085C 329 +0000085C 7005 330 MOVEQ #5,d0 * error 5 - not enough RAM +0000085E 1E3C 00E4 331 move.b #228,D7 * Go to TUTOR function +00000862 4E4E 332 trap #14 * Call TRAP14 handler +00000864 333 +00000864 334 LAB_sizok +00000864 2648 335 MOVEA.l a0,a3 * copy RAM base to a3 +00000866 D1C0 336 ADDA.l d0,a0 * a0 is top of RAM +00000868 2748 044A 337 MOVE.l a0,Ememl(a3) * set end of mem +0000086C 4FEB 0400 338 LEA ram_base(a3),sp * set stack to RAM start + 1k +00000870 339 +00000870 303C 4EF9 340 MOVE.w #$4EF9,d0 * JMP opcode +00000874 204F 341 MOVEA.l sp,a0 * point to start of vector table +00000876 342 +00000876 30C0 343 MOVE.w d0,(a0)+ * LAB_WARM +00000878 43FA FFDA 344 LEA LAB_COLD(pc),a1 * initial warm start vector +0000087C 20C9 345 MOVE.l a1,(a0)+ * set vector +0000087E 346 +0000087E 30C0 347 MOVE.w d0,(a0)+ * Usrjmp +00000880 43FA 00DC 348 LEA LAB_FCER(pc),a1 * initial user function vector +00000884 349 * "Function call" error +00000884 20C9 350 MOVE.l a1,(a0)+ * set vector +00000886 351 +00000886 30C0 352 MOVE.w d0,(a0)+ * V_INPT JMP opcode +00000888 43FA FF8C 353 LEA VEC_IN(pc),a1 * get byte from input device vector +0000088C 20C9 354 MOVE.l a1,(a0)+ * set vector +0000088E 355 +0000088E 30C0 356 MOVE.w d0,(a0)+ * V_OUTP JMP opcode +00000890 43FA FF72 357 LEA VEC_OUT(pc),a1 * send byte to output device vector +00000894 20C9 358 MOVE.l a1,(a0)+ * set vector +00000896 359 +00000896 30C0 360 MOVE.w d0,(a0)+ * V_LOAD JMP opcode +00000898 43FA FF98 361 LEA VEC_LD(pc),a1 * load BASIC program vector +0000089C 20C9 362 MOVE.l a1,(a0)+ * set vector +0000089E 363 +0000089E 30C0 364 MOVE.w d0,(a0)+ * V_SAVE JMP opcode +000008A0 43FA FF96 365 LEA VEC_SV(pc),a1 * save BASIC program vector +000008A4 20C9 366 MOVE.l a1,(a0)+ * set vector +000008A6 367 +000008A6 30C0 368 MOVE.w d0,(a0)+ * V_CTLC JMP opcode +000008A8 43FA 261E 369 LEA VEC_CC(pc),a1 * save CTRL-C check vector +000008AC 20C9 370 MOVE.l a1,(a0)+ * set vector +000008AE 371 +000008AE 372 * set-up start values 000008AE 373 -000008AE 374 * set-up start values -000008AE 375 -000008AE 376 *##LAB_GMEM -000008AE 7000 377 MOVEQ #$00,d0 * clear d0 -000008B0 1740 0E48 378 MOVE.b d0,Nullct(a3) * default NULL count -000008B4 1740 0E49 379 MOVE.b d0,TPos(a3) * clear terminal position -000008B8 1740 0E4C 380 MOVE.b d0,ccflag(a3) * allow CTRL-C check -000008BC 3740 0E52 381 MOVE.w d0,prg_strt-2(a3) * clear start word -000008C0 3740 0E3A 382 MOVE.w d0,BHsend(a3) * clear value to string end word -000008C4 383 -000008C4 177C 0050 0E4A 384 MOVE.b #$50,TWidth(a3) * default terminal width byte for simulator -000008CA 177C 000E 0E46 385 MOVE.b #$0E,TabSiz(a3) * save default tab size = 14 -000008D0 386 -000008D0 177C 0038 0E4B 387 MOVE.b #$38,Iclim(a3) * default limit for TAB = 14 for simulator -000008D6 388 -000008D6 49EB 0CF2 389 LEA des_sk(a3),a4 * set descriptor stack start -000008DA 390 -000008DA 41EB 0E54 391 LEA prg_strt(a3),a0 * get start of mem -000008DE 2748 0C92 392 MOVE.l a0,Smeml(a3) * save start of mem -000008E2 393 -000008E2 6100 0322 394 BSR LAB_1463 * do "NEW" and "CLEAR" -000008E6 6100 0898 395 BSR LAB_CRLF * print CR/LF -000008EA 202B 0CAE 396 MOVE.l Ememl(a3),d0 * get end of mem -000008EE 90AB 0C92 397 SUB.l Smeml(a3),d0 * subtract start of mem -000008F2 398 -000008F2 6100 1BCC 399 BSR LAB_295E * print d0 as unsigned integer (bytes free) -000008F6 41FA 33EE 400 LEA LAB_SMSG(pc),a0 * point to start message -000008FA 6100 08E2 401 BSR LAB_18C3 * print null terminated string from memory -000008FE 402 -000008FE 41FA 29D2 403 LEA LAB_RSED(pc),a0 * get pointer to value -00000902 6100 1A68 404 BSR LAB_UFAC * unpack memory (a0) into FAC1 -00000906 405 -00000906 41FA 0092 406 LEA LAB_1274(pc),a0 * get warm start vector -0000090A 2748 0C66 407 MOVE.l a0,Wrmjpv(a3) * set warm start vector -0000090E 6100 1FD2 408 BSR LAB_RND * initialise -00000912 4EEB 0C64 409 JMP LAB_WARM(a3) * go do warm start -00000916 410 -00000916 411 -00000916 412 ************************************************************************************* -00000916 413 * -00000916 414 * do format error -00000916 415 -00000916 416 LAB_FOER -00000916 7E2C 417 MOVEQ #$2C,d7 * error code $2C "Format" error -00000918 6056 418 BRA.s LAB_XERR * do error #d7, then warm start -0000091A 419 -0000091A 420 -0000091A 421 ************************************************************************************* -0000091A 422 * -0000091A 423 * do address error -0000091A 424 -0000091A 425 LAB_ADER -0000091A 7E2A 426 MOVEQ #$2A,d7 * error code $2A "Address" error -0000091C 6052 427 BRA.s LAB_XERR * do error #d7, then warm start -0000091E 428 -0000091E 429 -0000091E 430 ************************************************************************************* -0000091E 431 * -0000091E 432 * do wrong dimensions error -0000091E 433 -0000091E 434 LAB_WDER -0000091E 7E28 435 MOVEQ #$28,d7 * error code $28 "Wrong dimensions" error -00000920 604E 436 BRA.s LAB_XERR * do error #d7, then warm start -00000922 437 -00000922 438 -00000922 439 ************************************************************************************* -00000922 440 * -00000922 441 * do undimensioned array error -00000922 442 -00000922 443 LAB_UDER -00000922 7E26 444 MOVEQ #$26,d7 * error code $26 "undimensioned array" error -00000924 604A 445 BRA.s LAB_XERR * do error #d7, then warm start -00000926 446 -00000926 447 -00000926 448 ************************************************************************************* -00000926 449 * -00000926 450 * do undefined variable error +000008AE 374 *##LAB_GMEM +000008AE 7000 375 MOVEQ #$00,d0 * clear d0 +000008B0 1740 05E4 376 MOVE.b d0,Nullct(a3) * default NULL count +000008B4 1740 05E5 377 MOVE.b d0,TPos(a3) * clear terminal position +000008B8 1740 05E8 378 MOVE.b d0,ccflag(a3) * allow CTRL-C check +000008BC 3740 07FE 379 MOVE.w d0,prg_strt-2(a3) * clear start word +000008C0 3740 05D6 380 MOVE.w d0,BHsend(a3) * clear value to string end word +000008C4 381 +000008C4 177C 0050 05E6 382 MOVE.b #$50,TWidth(a3) * default terminal width byte for simulator +000008CA 177C 000E 05E2 383 MOVE.b #$0E,TabSiz(a3) * save default tab size = 14 +000008D0 384 +000008D0 177C 0038 05E7 385 MOVE.b #$38,Iclim(a3) * default limit for TAB = 14 for simulator +000008D6 386 +000008D6 49EB 048E 387 LEA des_sk(a3),a4 * set descriptor stack start +000008DA 388 +000008DA 41EB 0800 389 LEA prg_strt(a3),a0 * get start of mem +000008DE 2748 042E 390 MOVE.l a0,Smeml(a3) * save start of mem +000008E2 391 +000008E2 6100 0322 392 BSR LAB_1463 * do "NEW" and "CLEAR" +000008E6 6100 0898 393 BSR LAB_CRLF * print CR/LF +000008EA 202B 044A 394 MOVE.l Ememl(a3),d0 * get end of mem +000008EE 90AB 042E 395 SUB.l Smeml(a3),d0 * subtract start of mem +000008F2 396 +000008F2 6100 1BCC 397 BSR LAB_295E * print d0 as unsigned integer (bytes free) +000008F6 41FA 33EE 398 LEA LAB_SMSG(pc),a0 * point to start message +000008FA 6100 08E2 399 BSR LAB_18C3 * print null terminated string from memory +000008FE 400 +000008FE 41FA 29D2 401 LEA LAB_RSED(pc),a0 * get pointer to value +00000902 6100 1A68 402 BSR LAB_UFAC * unpack memory (a0) into FAC1 +00000906 403 +00000906 41FA 0092 404 LEA LAB_1274(pc),a0 * get warm start vector +0000090A 2748 0402 405 MOVE.l a0,Wrmjpv(a3) * set warm start vector +0000090E 6100 1FD2 406 BSR LAB_RND * initialise +00000912 4EEB 0400 407 JMP LAB_WARM(a3) * go do warm start +00000916 408 +00000916 409 +00000916 410 ************************************************************************************* +00000916 411 * +00000916 412 * do format error +00000916 413 +00000916 414 LAB_FOER +00000916 7E2C 415 MOVEQ #$2C,d7 * error code $2C "Format" error +00000918 6056 416 BRA.s LAB_XERR * do error #d7, then warm start +0000091A 417 +0000091A 418 +0000091A 419 ************************************************************************************* +0000091A 420 * +0000091A 421 * do address error +0000091A 422 +0000091A 423 LAB_ADER +0000091A 7E2A 424 MOVEQ #$2A,d7 * error code $2A "Address" error +0000091C 6052 425 BRA.s LAB_XERR * do error #d7, then warm start +0000091E 426 +0000091E 427 +0000091E 428 ************************************************************************************* +0000091E 429 * +0000091E 430 * do wrong dimensions error +0000091E 431 +0000091E 432 LAB_WDER +0000091E 7E28 433 MOVEQ #$28,d7 * error code $28 "Wrong dimensions" error +00000920 604E 434 BRA.s LAB_XERR * do error #d7, then warm start +00000922 435 +00000922 436 +00000922 437 ************************************************************************************* +00000922 438 * +00000922 439 * do undimensioned array error +00000922 440 +00000922 441 LAB_UDER +00000922 7E26 442 MOVEQ #$26,d7 * error code $26 "undimensioned array" error +00000924 604A 443 BRA.s LAB_XERR * do error #d7, then warm start +00000926 444 +00000926 445 +00000926 446 ************************************************************************************* +00000926 447 * +00000926 448 * do undefined variable error +00000926 449 +00000926 450 LAB_UVER 00000926 451 -00000926 452 LAB_UVER -00000926 453 -00000926 454 * if you do want a non existant variable to return an error then leave the novar -00000926 455 * value at the top of this file set to zero +00000926 452 * if you do want a non existant variable to return an error then leave the novar +00000926 453 * value at the top of this file set to zero +00000926 454 +00000926 TRUE 455 ifeq novar 00000926 456 -00000926 TRUE 457 ifeq novar -00000926 458 -00000926 7E24 459 MOVEQ #$24,d7 * error code $24 "undefined variable" error -00000928 6046 460 BRA.s LAB_XERR * do error #d7, then warm start +00000926 7E24 457 MOVEQ #$24,d7 * error code $24 "undefined variable" error +00000928 6046 458 BRA.s LAB_XERR * do error #d7, then warm start +0000092A 459 +0000092A 460 endc 0000092A 461 -0000092A 462 endc -0000092A 463 -0000092A 464 * if you want a non existant variable to return a null value then set the novar -0000092A 465 * value at the top of this file to some non zero value -0000092A 466 -0000092A FALSE 467 ifne novar -0000092A 468 endc -0000092A 469 -0000092A 470 -0000092A 471 ************************************************************************************* -0000092A 472 * -0000092A 473 * do loop without do error -0000092A 474 -0000092A 475 LAB_LDER -0000092A 7E22 476 MOVEQ #$22,d7 * error code $22 "LOOP without DO" error -0000092C 6042 477 BRA.s LAB_XERR * do error #d7, then warm start -0000092E 478 -0000092E 479 -0000092E 480 ************************************************************************************* -0000092E 481 * -0000092E 482 * do undefined function error -0000092E 483 -0000092E 484 LAB_UFER -0000092E 7E20 485 MOVEQ #$20,d7 * error code $20 "Undefined function" error -00000930 603E 486 BRA.s LAB_XERR * do error #d7, then warm start -00000932 487 -00000932 488 -00000932 489 ************************************************************************************* -00000932 490 * -00000932 491 * do can't continue error -00000932 492 -00000932 493 LAB_CCER -00000932 7E1E 494 MOVEQ #$1E,d7 * error code $1E "Can't continue" error -00000934 603A 495 BRA.s LAB_XERR * do error #d7, then warm start -00000936 496 -00000936 497 -00000936 498 ************************************************************************************* -00000936 499 * -00000936 500 * do string too complex error -00000936 501 -00000936 502 LAB_SCER -00000936 7E1C 503 MOVEQ #$1C,d7 * error code $1C "String too complex" error -00000938 6036 504 BRA.s LAB_XERR * do error #d7, then warm start -0000093A 505 -0000093A 506 -0000093A 507 ************************************************************************************* -0000093A 508 * -0000093A 509 * do string too long error -0000093A 510 -0000093A 511 LAB_SLER -0000093A 7E1A 512 MOVEQ #$1A,d7 * error code $1A "String too long" error -0000093C 6032 513 BRA.s LAB_XERR * do error #d7, then warm start -0000093E 514 -0000093E 515 -0000093E 516 ************************************************************************************* -0000093E 517 * -0000093E 518 * do type missmatch error -0000093E 519 -0000093E 520 LAB_TMER -0000093E 7E18 521 MOVEQ #$18,d7 * error code $18 "Type mismatch" error -00000940 602E 522 BRA.s LAB_XERR * do error #d7, then warm start -00000942 523 -00000942 524 -00000942 525 ************************************************************************************* -00000942 526 * -00000942 527 * do illegal direct error -00000942 528 -00000942 529 LAB_IDER -00000942 7E16 530 MOVEQ #$16,d7 * error code $16 "Illegal direct" error -00000944 602A 531 BRA.s LAB_XERR * do error #d7, then warm start -00000946 532 -00000946 533 -00000946 534 ************************************************************************************* -00000946 535 * -00000946 536 * do divide by zero error -00000946 537 -00000946 538 LAB_DZER -00000946 7E14 539 MOVEQ #$14,d7 * error code $14 "Divide by zero" error -00000948 6026 540 BRA.s LAB_XERR * do error #d7, then warm start -0000094A 541 -0000094A 542 -0000094A 543 ************************************************************************************* -0000094A 544 * -0000094A 545 * do double dimension error -0000094A 546 -0000094A 547 LAB_DDER -0000094A 7E12 548 MOVEQ #$12,d7 * error code $12 "Double dimension" error -0000094C 6022 549 BRA.s LAB_XERR * do error #d7, then warm start -0000094E 550 -0000094E 551 -0000094E 552 ************************************************************************************* -0000094E 553 * -0000094E 554 * do array bounds error -0000094E 555 -0000094E 556 LAB_ABER -0000094E 7E10 557 MOVEQ #$10,d7 * error code $10 "Array bounds" error -00000950 601E 558 BRA.s LAB_XERR * do error #d7, then warm start -00000952 559 -00000952 560 -00000952 561 ************************************************************************************* -00000952 562 * -00000952 563 * do undefined satement error -00000952 564 -00000952 565 LAB_USER -00000952 7E0E 566 MOVEQ #$0E,d7 * error code $0E "Undefined statement" error -00000954 601A 567 BRA.s LAB_XERR * do error #d7, then warm start -00000956 568 -00000956 569 -00000956 570 ************************************************************************************* -00000956 571 * -00000956 572 * do out of memory error -00000956 573 -00000956 574 LAB_OMER -00000956 7E0C 575 MOVEQ #$0C,d7 * error code $0C "Out of memory" error -00000958 6016 576 BRA.s LAB_XERR * do error #d7, then warm start -0000095A 577 -0000095A 578 -0000095A 579 ************************************************************************************* -0000095A 580 * -0000095A 581 * do overflow error -0000095A 582 -0000095A 583 LAB_OFER -0000095A 7E0A 584 MOVEQ #$0A,d7 * error code $0A "Overflow" error -0000095C 6012 585 BRA.s LAB_XERR * do error #d7, then warm start -0000095E 586 -0000095E 587 -0000095E 588 ************************************************************************************* -0000095E 589 * -0000095E 590 * do function call error -0000095E 591 -0000095E 592 LAB_FCER -0000095E 7E08 593 MOVEQ #$08,d7 * error code $08 "Function call" error -00000960 600E 594 BRA.s LAB_XERR * do error #d7, then warm start -00000962 595 -00000962 596 -00000962 597 ************************************************************************************* -00000962 598 * -00000962 599 * do out of data error -00000962 600 -00000962 601 LAB_ODER -00000962 7E06 602 MOVEQ #$06,d7 * error code $06 "Out of DATA" error -00000964 600A 603 BRA.s LAB_XERR * do error #d7, then warm start -00000966 604 -00000966 605 -00000966 606 ************************************************************************************* -00000966 607 * -00000966 608 * do return without gosub error -00000966 609 -00000966 610 LAB_RGER -00000966 7E04 611 MOVEQ #$04,d7 * error code $04 "RETURN without GOSUB" error -00000968 6006 612 BRA.s LAB_XERR * do error #d7, then warm start -0000096A 613 -0000096A 614 -0000096A 615 ************************************************************************************* -0000096A 616 * -0000096A 617 * do syntax error -0000096A 618 -0000096A 619 LAB_SNER -0000096A 7E02 620 MOVEQ #$02,d7 * error code $02 "Syntax" error -0000096C 6002 621 BRA.s LAB_XERR * do error #d7, then warm start -0000096E 622 -0000096E 623 -0000096E 624 ************************************************************************************* -0000096E 625 * -0000096E 626 * do next without for error -0000096E 627 -0000096E 628 LAB_NFER -0000096E 7E00 629 MOVEQ #$00,d7 * error code $00 "NEXT without FOR" error -00000970 630 -00000970 631 -00000970 632 ************************************************************************************* -00000970 633 * -00000970 634 * do error #d7, then warm start -00000970 635 -00000970 636 LAB_XERR -00000970 6100 02CA 637 BSR LAB_1491 * flush stack & clear continue flag -00000974 6100 080A 638 BSR LAB_CRLF * print CR/LF -00000978 43FA 2FE4 639 LEA LAB_BAER(pc),a1 * start of error message pointer table -0000097C 3E31 7000 640 MOVE.w (a1,d7.w),d7 * get error message offset -00000980 41F1 7000 641 LEA (a1,d7.w),a0 * get error message address -00000984 6100 0858 642 BSR LAB_18C3 * print null terminated string from memory -00000988 41FA 331F 643 LEA LAB_EMSG(pc),a0 * point to " Error" message -0000098C 644 LAB_1269 -0000098C 6100 0850 645 BSR LAB_18C3 * print null terminated string from memory -00000990 202B 0CB6 646 MOVE.l Clinel(a3),d0 * get current line -00000994 6B04 647 BMI.s LAB_1274 * go do warm start if -ve # (was immediate mode) -00000996 648 -00000996 649 * else print line number -00000996 6100 1B1C 650 BSR LAB_2953 * print " in line [LINE #]" +0000092A 462 * if you want a non existant variable to return a null value then set the novar +0000092A 463 * value at the top of this file to some non zero value +0000092A 464 +0000092A FALSE 465 ifne novar +0000092A 466 endc +0000092A 467 +0000092A 468 +0000092A 469 ************************************************************************************* +0000092A 470 * +0000092A 471 * do loop without do error +0000092A 472 +0000092A 473 LAB_LDER +0000092A 7E22 474 MOVEQ #$22,d7 * error code $22 "LOOP without DO" error +0000092C 6042 475 BRA.s LAB_XERR * do error #d7, then warm start +0000092E 476 +0000092E 477 +0000092E 478 ************************************************************************************* +0000092E 479 * +0000092E 480 * do undefined function error +0000092E 481 +0000092E 482 LAB_UFER +0000092E 7E20 483 MOVEQ #$20,d7 * error code $20 "Undefined function" error +00000930 603E 484 BRA.s LAB_XERR * do error #d7, then warm start +00000932 485 +00000932 486 +00000932 487 ************************************************************************************* +00000932 488 * +00000932 489 * do can't continue error +00000932 490 +00000932 491 LAB_CCER +00000932 7E1E 492 MOVEQ #$1E,d7 * error code $1E "Can't continue" error +00000934 603A 493 BRA.s LAB_XERR * do error #d7, then warm start +00000936 494 +00000936 495 +00000936 496 ************************************************************************************* +00000936 497 * +00000936 498 * do string too complex error +00000936 499 +00000936 500 LAB_SCER +00000936 7E1C 501 MOVEQ #$1C,d7 * error code $1C "String too complex" error +00000938 6036 502 BRA.s LAB_XERR * do error #d7, then warm start +0000093A 503 +0000093A 504 +0000093A 505 ************************************************************************************* +0000093A 506 * +0000093A 507 * do string too long error +0000093A 508 +0000093A 509 LAB_SLER +0000093A 7E1A 510 MOVEQ #$1A,d7 * error code $1A "String too long" error +0000093C 6032 511 BRA.s LAB_XERR * do error #d7, then warm start +0000093E 512 +0000093E 513 +0000093E 514 ************************************************************************************* +0000093E 515 * +0000093E 516 * do type missmatch error +0000093E 517 +0000093E 518 LAB_TMER +0000093E 7E18 519 MOVEQ #$18,d7 * error code $18 "Type mismatch" error +00000940 602E 520 BRA.s LAB_XERR * do error #d7, then warm start +00000942 521 +00000942 522 +00000942 523 ************************************************************************************* +00000942 524 * +00000942 525 * do illegal direct error +00000942 526 +00000942 527 LAB_IDER +00000942 7E16 528 MOVEQ #$16,d7 * error code $16 "Illegal direct" error +00000944 602A 529 BRA.s LAB_XERR * do error #d7, then warm start +00000946 530 +00000946 531 +00000946 532 ************************************************************************************* +00000946 533 * +00000946 534 * do divide by zero error +00000946 535 +00000946 536 LAB_DZER +00000946 7E14 537 MOVEQ #$14,d7 * error code $14 "Divide by zero" error +00000948 6026 538 BRA.s LAB_XERR * do error #d7, then warm start +0000094A 539 +0000094A 540 +0000094A 541 ************************************************************************************* +0000094A 542 * +0000094A 543 * do double dimension error +0000094A 544 +0000094A 545 LAB_DDER +0000094A 7E12 546 MOVEQ #$12,d7 * error code $12 "Double dimension" error +0000094C 6022 547 BRA.s LAB_XERR * do error #d7, then warm start +0000094E 548 +0000094E 549 +0000094E 550 ************************************************************************************* +0000094E 551 * +0000094E 552 * do array bounds error +0000094E 553 +0000094E 554 LAB_ABER +0000094E 7E10 555 MOVEQ #$10,d7 * error code $10 "Array bounds" error +00000950 601E 556 BRA.s LAB_XERR * do error #d7, then warm start +00000952 557 +00000952 558 +00000952 559 ************************************************************************************* +00000952 560 * +00000952 561 * do undefined satement error +00000952 562 +00000952 563 LAB_USER +00000952 7E0E 564 MOVEQ #$0E,d7 * error code $0E "Undefined statement" error +00000954 601A 565 BRA.s LAB_XERR * do error #d7, then warm start +00000956 566 +00000956 567 +00000956 568 ************************************************************************************* +00000956 569 * +00000956 570 * do out of memory error +00000956 571 +00000956 572 LAB_OMER +00000956 7E0C 573 MOVEQ #$0C,d7 * error code $0C "Out of memory" error +00000958 6016 574 BRA.s LAB_XERR * do error #d7, then warm start +0000095A 575 +0000095A 576 +0000095A 577 ************************************************************************************* +0000095A 578 * +0000095A 579 * do overflow error +0000095A 580 +0000095A 581 LAB_OFER +0000095A 7E0A 582 MOVEQ #$0A,d7 * error code $0A "Overflow" error +0000095C 6012 583 BRA.s LAB_XERR * do error #d7, then warm start +0000095E 584 +0000095E 585 +0000095E 586 ************************************************************************************* +0000095E 587 * +0000095E 588 * do function call error +0000095E 589 +0000095E 590 LAB_FCER +0000095E 7E08 591 MOVEQ #$08,d7 * error code $08 "Function call" error +00000960 600E 592 BRA.s LAB_XERR * do error #d7, then warm start +00000962 593 +00000962 594 +00000962 595 ************************************************************************************* +00000962 596 * +00000962 597 * do out of data error +00000962 598 +00000962 599 LAB_ODER +00000962 7E06 600 MOVEQ #$06,d7 * error code $06 "Out of DATA" error +00000964 600A 601 BRA.s LAB_XERR * do error #d7, then warm start +00000966 602 +00000966 603 +00000966 604 ************************************************************************************* +00000966 605 * +00000966 606 * do return without gosub error +00000966 607 +00000966 608 LAB_RGER +00000966 7E04 609 MOVEQ #$04,d7 * error code $04 "RETURN without GOSUB" error +00000968 6006 610 BRA.s LAB_XERR * do error #d7, then warm start +0000096A 611 +0000096A 612 +0000096A 613 ************************************************************************************* +0000096A 614 * +0000096A 615 * do syntax error +0000096A 616 +0000096A 617 LAB_SNER +0000096A 7E02 618 MOVEQ #$02,d7 * error code $02 "Syntax" error +0000096C 6002 619 BRA.s LAB_XERR * do error #d7, then warm start +0000096E 620 +0000096E 621 +0000096E 622 ************************************************************************************* +0000096E 623 * +0000096E 624 * do next without for error +0000096E 625 +0000096E 626 LAB_NFER +0000096E 7E00 627 MOVEQ #$00,d7 * error code $00 "NEXT without FOR" error +00000970 628 +00000970 629 +00000970 630 ************************************************************************************* +00000970 631 * +00000970 632 * do error #d7, then warm start +00000970 633 +00000970 634 LAB_XERR +00000970 6100 02CA 635 BSR LAB_1491 * flush stack & clear continue flag +00000974 6100 080A 636 BSR LAB_CRLF * print CR/LF +00000978 43FA 2FE4 637 LEA LAB_BAER(pc),a1 * start of error message pointer table +0000097C 3E31 7000 638 MOVE.w (a1,d7.w),d7 * get error message offset +00000980 41F1 7000 639 LEA (a1,d7.w),a0 * get error message address +00000984 6100 0858 640 BSR LAB_18C3 * print null terminated string from memory +00000988 41FA 331F 641 LEA LAB_EMSG(pc),a0 * point to " Error" message +0000098C 642 LAB_1269 +0000098C 6100 0850 643 BSR LAB_18C3 * print null terminated string from memory +00000990 202B 0452 644 MOVE.l Clinel(a3),d0 * get current line +00000994 6B04 645 BMI.s LAB_1274 * go do warm start if -ve # (was immediate mode) +00000996 646 +00000996 647 * else print line number +00000996 6100 1B1C 648 BSR LAB_2953 * print " in line [LINE #]" +0000099A 649 +0000099A 650 * BASIC warm start entry point, wait for Basic command 0000099A 651 -0000099A 652 * BASIC warm start entry point, wait for Basic command -0000099A 653 -0000099A 654 LAB_1274 -0000099A 41FA 3340 655 LEA LAB_RMSG(pc),a0 * point to "Ready" message -0000099E 6100 083E 656 BSR LAB_18C3 * go do print string +0000099A 652 LAB_1274 +0000099A 41FA 3340 653 LEA LAB_RMSG(pc),a0 * point to "Ready" message +0000099E 6100 083E 654 BSR LAB_18C3 * go do print string +000009A2 655 +000009A2 656 * wait for Basic command - no "Ready" 000009A2 657 -000009A2 658 * wait for Basic command - no "Ready" -000009A2 659 -000009A2 660 LAB_127D -000009A2 72FF 661 MOVEQ #-1,d1 * set to -1 -000009A4 2741 0CB6 662 MOVE.l d1,Clinel(a3) * set current line # -000009A8 1741 0E40 663 MOVE.b d1,Breakf(a3) * set break flag -000009AC 4BEB 0CF4 664 LEA Ibuffs(a3),a5 * set basic execute pointer ready for new line -000009B0 665 LAB_127E -000009B0 6100 00EC 666 BSR LAB_1357 * call for BASIC input -000009B4 6100 0BF4 667 BSR LAB_GBYT * scan memory -000009B8 67F6 668 BEQ.s LAB_127E * loop while null +000009A2 658 LAB_127D +000009A2 72FF 659 MOVEQ #-1,d1 * set to -1 +000009A4 2741 0452 660 MOVE.l d1,Clinel(a3) * set current line # +000009A8 1741 05DC 661 MOVE.b d1,Breakf(a3) * set break flag +000009AC 4BEB 0490 662 LEA Ibuffs(a3),a5 * set basic execute pointer ready for new line +000009B0 663 LAB_127E +000009B0 6100 00EC 664 BSR LAB_1357 * call for BASIC input +000009B4 6100 0BF4 665 BSR LAB_GBYT * scan memory +000009B8 67F6 666 BEQ.s LAB_127E * loop while null +000009BA 667 +000009BA 668 * got to interpret input line now .... 000009BA 669 -000009BA 670 * got to interpret input line now .... -000009BA 671 -000009BA 6508 672 BCS.s LAB_1295 * branch if numeric character, handle new -000009BC 673 * BASIC line -000009BC 674 -000009BC 675 * no line number so do immediate mode, a5 -000009BC 676 * points to the buffer start -000009BC 6100 0156 677 BSR LAB_13A6 * crunch keywords into Basic tokens -000009C0 678 * crunch from (a5), output to (a0) -000009C0 679 * returns .. -000009C0 680 * d2 is length, d1 trashed, d0 trashed, -000009C0 681 * a1 trashed -000009C0 6000 03C4 682 BRA LAB_15F6 * go scan & interpret code -000009C4 683 -000009C4 684 -000009C4 685 ************************************************************************************* -000009C4 686 * -000009C4 687 * handle a new BASIC line -000009C4 688 -000009C4 689 LAB_1295 -000009C4 6100 063A 690 BSR LAB_GFPN * get fixed-point number into temp integer & d1 -000009C8 6100 014A 691 BSR LAB_13A6 * crunch keywords into Basic tokens -000009CC 692 * crunch from (a5), output to (a0) -000009CC 693 * returns .. d2 is length, -000009CC 694 * d1 trashed, d0 trashed, a1 trashed -000009CC 222B 0C8E 695 MOVE.l Itemp(a3),d1 * get required line # -000009D0 6100 0218 696 BSR LAB_SSLN * search BASIC for d1 line number -000009D4 697 * returns pointer in a0 -000009D4 6532 698 BCS.s LAB_12E6 * branch if not found -000009D6 699 -000009D6 700 * aroooogah! line # already exists! delete it -000009D6 2250 701 MOVEA.l (a0),a1 * get start of block (next line pointer) -000009D8 202B 0C96 702 MOVE.l Sfncl(a3),d0 * get end of block (start of functions) -000009DC 9089 703 SUB.l a1,d0 * subtract start of block ( = bytes to move) -000009DE E288 704 LSR.l #1,d0 * /2 (word move) -000009E0 5380 705 SUBQ.l #1,d0 * adjust for DBF loop -000009E2 4840 706 SWAP d0 * swap high word to low word -000009E4 2448 707 MOVEA.l a0,a2 * copy destination -000009E6 708 LAB_12AE -000009E6 4840 709 SWAP d0 * swap high word to low word -000009E8 710 LAB_12B0 -000009E8 34D9 711 MOVE.w (a1)+,(a2)+ * copy word -000009EA 51C8 FFFC 712 DBF d0,LAB_12B0 * decrement low count and loop until done -000009EE 713 -000009EE 4840 714 SWAP d0 * swap high word to low word -000009F0 51C8 FFF4 715 DBF d0,LAB_12AE * decrement high count and loop until done -000009F4 716 -000009F4 274A 0C96 717 MOVE.l a2,Sfncl(a3) * start of functions -000009F8 274A 0C9A 718 MOVE.l a2,Svarl(a3) * save start of variables -000009FC 274A 0C9E 719 MOVE.l a2,Sstrl(a3) * start of strings -00000A00 274A 0CA2 720 MOVE.l a2,Sarryl(a3) * save start of arrays -00000A04 274A 0CA6 721 MOVE.l a2,Earryl(a3) * save end of arrays -00000A08 722 -00000A08 723 * got new line in buffer and no existing same # -00000A08 724 LAB_12E6 -00000A08 102B 0CF4 725 MOVE.b Ibuffs(a3),d0 * get byte from start of input buffer -00000A0C 6764 726 BEQ.s LAB_1325 * if null line go do line chaining -00000A0E 727 -00000A0E 728 * got new line and it isn't empty line -00000A0E 226B 0C96 729 MOVEA.l Sfncl(a3),a1 * get start of functions (end of block to move) -00000A12 45F1 2008 730 LEA 8(a1,d2),a2 * copy it, add line length and add room for -00000A16 731 * pointer and line number -00000A16 732 -00000A16 274A 0C96 733 MOVE.l a2,Sfncl(a3) * start of functions -00000A1A 274A 0C9A 734 MOVE.l a2,Svarl(a3) * save start of variables -00000A1E 274A 0C9E 735 MOVE.l a2,Sstrl(a3) * start of strings -00000A22 274A 0CA2 736 MOVE.l a2,Sarryl(a3) * save start of arrays -00000A26 274A 0CA6 737 MOVE.l a2,Earryl(a3) * save end of arrays -00000A2A 276B 0CAE 0CAA 738 MOVE.l Ememl(a3),Sstorl(a3) * copy end of mem to start of strings, clear -00000A30 739 * strings -00000A30 740 -00000A30 2209 741 MOVE.l a1,d1 * copy end of block to move -00000A32 9288 742 SUB.l a0,d1 * subtract start of block to move -00000A34 E289 743 LSR.l #1,d1 * /2 (word copy) -00000A36 5381 744 SUBQ.l #1,d1 * correct for loop end on -1 -00000A38 4841 745 SWAP d1 * swap high word to low word -00000A3A 746 LAB_12FF -00000A3A 4841 747 SWAP d1 * swap high word to low word -00000A3C 748 LAB_1301 -00000A3C 3521 749 MOVE.w -(a1),-(a2) * decrement pointers and copy word -00000A3E 51C9 FFFC 750 DBF d1,LAB_1301 * decrement & loop -00000A42 751 -00000A42 4841 752 SWAP d1 * swap high word to low word -00000A44 51C9 FFF4 753 DBF d1,LAB_12FF * decrement high count and loop until done +000009BA 6508 670 BCS.s LAB_1295 * branch if numeric character, handle new +000009BC 671 * BASIC line +000009BC 672 +000009BC 673 * no line number so do immediate mode, a5 +000009BC 674 * points to the buffer start +000009BC 6100 0156 675 BSR LAB_13A6 * crunch keywords into Basic tokens +000009C0 676 * crunch from (a5), output to (a0) +000009C0 677 * returns .. +000009C0 678 * d2 is length, d1 trashed, d0 trashed, +000009C0 679 * a1 trashed +000009C0 6000 03C4 680 BRA LAB_15F6 * go scan & interpret code +000009C4 681 +000009C4 682 +000009C4 683 ************************************************************************************* +000009C4 684 * +000009C4 685 * handle a new BASIC line +000009C4 686 +000009C4 687 LAB_1295 +000009C4 6100 063A 688 BSR LAB_GFPN * get fixed-point number into temp integer & d1 +000009C8 6100 014A 689 BSR LAB_13A6 * crunch keywords into Basic tokens +000009CC 690 * crunch from (a5), output to (a0) +000009CC 691 * returns .. d2 is length, +000009CC 692 * d1 trashed, d0 trashed, a1 trashed +000009CC 222B 042A 693 MOVE.l Itemp(a3),d1 * get required line # +000009D0 6100 0218 694 BSR LAB_SSLN * search BASIC for d1 line number +000009D4 695 * returns pointer in a0 +000009D4 6532 696 BCS.s LAB_12E6 * branch if not found +000009D6 697 +000009D6 698 * aroooogah! line # already exists! delete it +000009D6 2250 699 MOVEA.l (a0),a1 * get start of block (next line pointer) +000009D8 202B 0432 700 MOVE.l Sfncl(a3),d0 * get end of block (start of functions) +000009DC 9089 701 SUB.l a1,d0 * subtract start of block ( = bytes to move) +000009DE E288 702 LSR.l #1,d0 * /2 (word move) +000009E0 5380 703 SUBQ.l #1,d0 * adjust for DBF loop +000009E2 4840 704 SWAP d0 * swap high word to low word +000009E4 2448 705 MOVEA.l a0,a2 * copy destination +000009E6 706 LAB_12AE +000009E6 4840 707 SWAP d0 * swap high word to low word +000009E8 708 LAB_12B0 +000009E8 34D9 709 MOVE.w (a1)+,(a2)+ * copy word +000009EA 51C8 FFFC 710 DBF d0,LAB_12B0 * decrement low count and loop until done +000009EE 711 +000009EE 4840 712 SWAP d0 * swap high word to low word +000009F0 51C8 FFF4 713 DBF d0,LAB_12AE * decrement high count and loop until done +000009F4 714 +000009F4 274A 0432 715 MOVE.l a2,Sfncl(a3) * start of functions +000009F8 274A 0436 716 MOVE.l a2,Svarl(a3) * save start of variables +000009FC 274A 043A 717 MOVE.l a2,Sstrl(a3) * start of strings +00000A00 274A 043E 718 MOVE.l a2,Sarryl(a3) * save start of arrays +00000A04 274A 0442 719 MOVE.l a2,Earryl(a3) * save end of arrays +00000A08 720 +00000A08 721 * got new line in buffer and no existing same # +00000A08 722 LAB_12E6 +00000A08 102B 0490 723 MOVE.b Ibuffs(a3),d0 * get byte from start of input buffer +00000A0C 6764 724 BEQ.s LAB_1325 * if null line go do line chaining +00000A0E 725 +00000A0E 726 * got new line and it isn't empty line +00000A0E 226B 0432 727 MOVEA.l Sfncl(a3),a1 * get start of functions (end of block to move) +00000A12 45F1 2008 728 LEA 8(a1,d2),a2 * copy it, add line length and add room for +00000A16 729 * pointer and line number +00000A16 730 +00000A16 274A 0432 731 MOVE.l a2,Sfncl(a3) * start of functions +00000A1A 274A 0436 732 MOVE.l a2,Svarl(a3) * save start of variables +00000A1E 274A 043A 733 MOVE.l a2,Sstrl(a3) * start of strings +00000A22 274A 043E 734 MOVE.l a2,Sarryl(a3) * save start of arrays +00000A26 274A 0442 735 MOVE.l a2,Earryl(a3) * save end of arrays +00000A2A 276B 044A 0446 736 MOVE.l Ememl(a3),Sstorl(a3) * copy end of mem to start of strings, clear +00000A30 737 * strings +00000A30 738 +00000A30 2209 739 MOVE.l a1,d1 * copy end of block to move +00000A32 9288 740 SUB.l a0,d1 * subtract start of block to move +00000A34 E289 741 LSR.l #1,d1 * /2 (word copy) +00000A36 5381 742 SUBQ.l #1,d1 * correct for loop end on -1 +00000A38 4841 743 SWAP d1 * swap high word to low word +00000A3A 744 LAB_12FF +00000A3A 4841 745 SWAP d1 * swap high word to low word +00000A3C 746 LAB_1301 +00000A3C 3521 747 MOVE.w -(a1),-(a2) * decrement pointers and copy word +00000A3E 51C9 FFFC 748 DBF d1,LAB_1301 * decrement & loop +00000A42 749 +00000A42 4841 750 SWAP d1 * swap high word to low word +00000A44 51C9 FFF4 751 DBF d1,LAB_12FF * decrement high count and loop until done +00000A48 752 +00000A48 753 * space is opened up, now copy the crunched line from the input buffer into the space 00000A48 754 -00000A48 755 * space is opened up, now copy the crunched line from the input buffer into the space -00000A48 756 -00000A48 43EB 0CF4 757 LEA Ibuffs(a3),a1 * source is input buffer -00000A4C 2448 758 MOVEA.l a0,a2 * copy destination -00000A4E 72FF 759 MOVEQ #-1,d1 * set to allow re-chaining -00000A50 24C1 760 MOVE.l d1,(a2)+ * set next line pointer (allow re-chaining) -00000A52 24EB 0C8E 761 MOVE.l Itemp(a3),(a2)+ * save line number -00000A56 E24A 762 LSR.w #1,d2 * /2 (word copy) -00000A58 5342 763 SUBQ.w #1,d2 * correct for loop end on -1 -00000A5A 764 LAB_1303 -00000A5A 34D9 765 MOVE.w (a1)+,(a2)+ * copy word -00000A5C 51CA FFFC 766 DBF d2,LAB_1303 * decrement & loop -00000A60 767 -00000A60 6010 768 BRA.s LAB_1325 * go test for end of prog +00000A48 43EB 0490 755 LEA Ibuffs(a3),a1 * source is input buffer +00000A4C 2448 756 MOVEA.l a0,a2 * copy destination +00000A4E 72FF 757 MOVEQ #-1,d1 * set to allow re-chaining +00000A50 24C1 758 MOVE.l d1,(a2)+ * set next line pointer (allow re-chaining) +00000A52 24EB 042A 759 MOVE.l Itemp(a3),(a2)+ * save line number +00000A56 E24A 760 LSR.w #1,d2 * /2 (word copy) +00000A58 5342 761 SUBQ.w #1,d2 * correct for loop end on -1 +00000A5A 762 LAB_1303 +00000A5A 34D9 763 MOVE.w (a1)+,(a2)+ * copy word +00000A5C 51CA FFFC 764 DBF d2,LAB_1303 * decrement & loop +00000A60 765 +00000A60 6010 766 BRA.s LAB_1325 * go test for end of prog +00000A62 767 +00000A62 768 * rebuild chaining of BASIC lines 00000A62 769 -00000A62 770 * rebuild chaining of BASIC lines -00000A62 771 -00000A62 772 LAB_132E -00000A62 5048 773 ADDQ.w #8,a0 * point to first code byte of line, there is -00000A64 774 * always 1 byte + [EOL] as null entries are -00000A64 775 * deleted -00000A64 776 LAB_1330 -00000A64 4A18 777 TST.b (a0)+ * test byte -00000A66 66FC 778 BNE.s LAB_1330 * loop if not [EOL] -00000A68 779 -00000A68 780 * was [EOL] so get next line start -00000A68 3208 781 MOVE.w a0,d1 * past pad byte(s) -00000A6A 0241 0001 782 ANDI.w #1,d1 * mask odd bit -00000A6E D0C1 783 ADD.w d1,a0 * add back to ensure even -00000A70 2288 784 MOVE.l a0,(a1) * save next line pointer to current line -00000A72 785 LAB_1325 -00000A72 2248 786 MOVEA.l a0,a1 * copy pointer for this line -00000A74 4A90 787 TST.l (a0) * test pointer to next line -00000A76 66EA 788 BNE.s LAB_132E * not end of program yet so we must -00000A78 789 * go and fix the pointers -00000A78 790 -00000A78 6100 0198 791 BSR LAB_1477 * reset execution to start, clear variables -00000A7C 792 * and flush stack -00000A7C 6000 FF24 793 BRA LAB_127D * now we just wait for Basic command, no "Ready" -00000A80 794 -00000A80 795 -00000A80 796 ************************************************************************************* -00000A80 797 * -00000A80 798 * receive a line from the keyboard -00000A80 799 * character $08 as delete key, BACKSPACE on -00000A80 800 * standard keyboard -00000A80 801 LAB_134B -00000A80 6100 0776 802 BSR LAB_PRNA * go print the character -00000A84 7020 803 MOVEQ #' ',d0 * load [SPACE] -00000A86 6100 0770 804 BSR LAB_PRNA * go print -00000A8A 7008 805 MOVEQ #$08,d0 * load [BACKSPACE] -00000A8C 6100 076A 806 BSR LAB_PRNA * go print -00000A90 5341 807 SUBQ.w #$01,d1 * decrement the buffer index (delete) -00000A92 6010 808 BRA.s LAB_1359 * re-enter loop -00000A94 809 -00000A94 810 * print "? " and get BASIC input -00000A94 811 * return a0 pointing to the buffer start -00000A94 812 -00000A94 813 LAB_INLN -00000A94 6100 0760 814 BSR LAB_18E3 * print "?" character -00000A98 7020 815 MOVEQ #' ',d0 * load " " -00000A9A 6100 075C 816 BSR LAB_PRNA * go print -00000A9E 817 -00000A9E 818 * call for BASIC input (main entry point) -00000A9E 819 * return a0 pointing to the buffer start -00000A9E 820 -00000A9E 821 LAB_1357 -00000A9E 7200 822 MOVEQ #$00,d1 * clear buffer index -00000AA0 41EB 0CF4 823 LEA Ibuffs(a3),a0 * set buffer base pointer -00000AA4 824 LAB_1359 -00000AA4 4EAB 0C70 825 JSR V_INPT(a3) * call scan input device -00000AA8 64FA 826 BCC.s LAB_1359 * loop if no byte -00000AAA 827 -00000AAA 67F8 828 BEQ.s LAB_1359 * loop if null byte -00000AAC 829 -00000AAC B03C 0007 830 CMP.b #$07,d0 * compare with [BELL] -00000AB0 6718 831 BEQ.s LAB_1378 * branch if [BELL] -00000AB2 832 -00000AB2 B03C 000D 833 CMP.b #$0D,d0 * compare with [CR] -00000AB6 6700 06C2 834 BEQ LAB_1866 * do CR/LF exit if [CR] -00000ABA 835 -00000ABA 4A41 836 TST.w d1 * set flags on buffer index -00000ABC 6606 837 BNE.s LAB_1374 * branch if not empty -00000ABE 838 -00000ABE 839 * the next two lines ignore any non printing character and [SPACE] if the input buffer -00000ABE 840 * is empty -00000ABE 841 -00000ABE B03C 0020 842 CMP.b #' ',d0 * compare with [SP]+1 -00000AC2 63E0 843 BLS.s LAB_1359 * if < ignore character -00000AC4 844 -00000AC4 845 *## CMP.b #' '+1,d0 * compare with [SP]+1 -00000AC4 846 *## BCS.s LAB_1359 * if < ignore character -00000AC4 847 -00000AC4 848 LAB_1374 -00000AC4 B03C 0008 849 CMP.b #$08,d0 * compare with [BACKSPACE] -00000AC8 67B6 850 BEQ.s LAB_134B * go delete last character -00000ACA 851 -00000ACA 852 LAB_1378 -00000ACA B27C 00FF 853 CMP.w #(Ibuffe-Ibuffs-1),d1 * compare character count with max-1 -00000ACE 640C 854 BCC.s LAB_138E * skip store & do [BELL] if buffer full -00000AD0 855 -00000AD0 1180 1000 856 MOVE.b d0,(a0,d1.w) * else store in buffer -00000AD4 5241 857 ADDQ.w #$01,d1 * increment index -00000AD6 858 LAB_137F -00000AD6 6100 0720 859 BSR LAB_PRNA * go print the character -00000ADA 60C8 860 BRA.s LAB_1359 * always loop for next character +00000A62 770 LAB_132E +00000A62 5048 771 ADDQ.w #8,a0 * point to first code byte of line, there is +00000A64 772 * always 1 byte + [EOL] as null entries are +00000A64 773 * deleted +00000A64 774 LAB_1330 +00000A64 4A18 775 TST.b (a0)+ * test byte +00000A66 66FC 776 BNE.s LAB_1330 * loop if not [EOL] +00000A68 777 +00000A68 778 * was [EOL] so get next line start +00000A68 3208 779 MOVE.w a0,d1 * past pad byte(s) +00000A6A 0241 0001 780 ANDI.w #1,d1 * mask odd bit +00000A6E D0C1 781 ADD.w d1,a0 * add back to ensure even +00000A70 2288 782 MOVE.l a0,(a1) * save next line pointer to current line +00000A72 783 LAB_1325 +00000A72 2248 784 MOVEA.l a0,a1 * copy pointer for this line +00000A74 4A90 785 TST.l (a0) * test pointer to next line +00000A76 66EA 786 BNE.s LAB_132E * not end of program yet so we must +00000A78 787 * go and fix the pointers +00000A78 788 +00000A78 6100 0198 789 BSR LAB_1477 * reset execution to start, clear variables +00000A7C 790 * and flush stack +00000A7C 6000 FF24 791 BRA LAB_127D * now we just wait for Basic command, no "Ready" +00000A80 792 +00000A80 793 +00000A80 794 ************************************************************************************* +00000A80 795 * +00000A80 796 * receive a line from the keyboard +00000A80 797 * character $08 as delete key, BACKSPACE on +00000A80 798 * standard keyboard +00000A80 799 LAB_134B +00000A80 6100 0776 800 BSR LAB_PRNA * go print the character +00000A84 7020 801 MOVEQ #' ',d0 * load [SPACE] +00000A86 6100 0770 802 BSR LAB_PRNA * go print +00000A8A 7008 803 MOVEQ #$08,d0 * load [BACKSPACE] +00000A8C 6100 076A 804 BSR LAB_PRNA * go print +00000A90 5341 805 SUBQ.w #$01,d1 * decrement the buffer index (delete) +00000A92 6010 806 BRA.s LAB_1359 * re-enter loop +00000A94 807 +00000A94 808 * print "? " and get BASIC input +00000A94 809 * return a0 pointing to the buffer start +00000A94 810 +00000A94 811 LAB_INLN +00000A94 6100 0760 812 BSR LAB_18E3 * print "?" character +00000A98 7020 813 MOVEQ #' ',d0 * load " " +00000A9A 6100 075C 814 BSR LAB_PRNA * go print +00000A9E 815 +00000A9E 816 * call for BASIC input (main entry point) +00000A9E 817 * return a0 pointing to the buffer start +00000A9E 818 +00000A9E 819 LAB_1357 +00000A9E 7200 820 MOVEQ #$00,d1 * clear buffer index +00000AA0 41EB 0490 821 LEA Ibuffs(a3),a0 * set buffer base pointer +00000AA4 822 LAB_1359 +00000AA4 4EAB 040C 823 JSR V_INPT(a3) * call scan input device +00000AA8 64FA 824 BCC.s LAB_1359 * loop if no byte +00000AAA 825 +00000AAA 67F8 826 BEQ.s LAB_1359 * loop if null byte +00000AAC 827 +00000AAC B03C 0007 828 CMP.b #$07,d0 * compare with [BELL] +00000AB0 6718 829 BEQ.s LAB_1378 * branch if [BELL] +00000AB2 830 +00000AB2 B03C 000D 831 CMP.b #$0D,d0 * compare with [CR] +00000AB6 6700 06C2 832 BEQ LAB_1866 * do CR/LF exit if [CR] +00000ABA 833 +00000ABA 4A41 834 TST.w d1 * set flags on buffer index +00000ABC 6606 835 BNE.s LAB_1374 * branch if not empty +00000ABE 836 +00000ABE 837 * the next two lines ignore any non printing character and [SPACE] if the input buffer +00000ABE 838 * is empty +00000ABE 839 +00000ABE B03C 0020 840 CMP.b #' ',d0 * compare with [SP]+1 +00000AC2 63E0 841 BLS.s LAB_1359 * if < ignore character +00000AC4 842 +00000AC4 843 *## CMP.b #' '+1,d0 * compare with [SP]+1 +00000AC4 844 *## BCS.s LAB_1359 * if < ignore character +00000AC4 845 +00000AC4 846 LAB_1374 +00000AC4 B03C 0008 847 CMP.b #$08,d0 * compare with [BACKSPACE] +00000AC8 67B6 848 BEQ.s LAB_134B * go delete last character +00000ACA 849 +00000ACA 850 LAB_1378 +00000ACA B27C 00FF 851 CMP.w #(Ibuffe-Ibuffs-1),d1 * compare character count with max-1 +00000ACE 640C 852 BCC.s LAB_138E * skip store & do [BELL] if buffer full +00000AD0 853 +00000AD0 1180 1000 854 MOVE.b d0,(a0,d1.w) * else store in buffer +00000AD4 5241 855 ADDQ.w #$01,d1 * increment index +00000AD6 856 LAB_137F +00000AD6 6100 0720 857 BSR LAB_PRNA * go print the character +00000ADA 60C8 858 BRA.s LAB_1359 * always loop for next character +00000ADC 859 +00000ADC 860 * announce buffer full 00000ADC 861 -00000ADC 862 * announce buffer full -00000ADC 863 -00000ADC 864 LAB_138E -00000ADC 7007 865 MOVEQ #$07,d0 * [BELL] character into d0 -00000ADE 60F6 866 BRA.s LAB_137F * go print the [BELL] but ignore input character -00000AE0 867 -00000AE0 868 -00000AE0 869 ************************************************************************************* -00000AE0 870 * -00000AE0 871 * copy a hex value without crunching -00000AE0 872 -00000AE0 873 LAB_1392 -00000AE0 1180 2000 874 MOVE.b d0,(a0,d2.w) * save the byte to the output -00000AE4 5242 875 ADDQ.w #1,d2 * increment the buffer save index -00000AE6 876 -00000AE6 5241 877 ADDQ.w #1,d1 * increment the buffer read index -00000AE8 1035 1000 878 MOVE.b (a5,d1.w),d0 * get a byte from the input buffer -00000AEC 6700 0094 879 BEQ LAB_13EC * if [EOL] go save it without crunching -00000AF0 880 -00000AF0 B03C 0020 881 CMP.b #' ',d0 * compare the character with " " -00000AF4 67EA 882 BEQ.s LAB_1392 * if [SPACE] just go save it and get another -00000AF6 883 -00000AF6 B03C 0030 884 CMP.b #'0',d0 * compare the character with "0" -00000AFA 654A 885 BCS.s LAB_13C6 * if < "0" quit the hex save loop -00000AFC 886 -00000AFC B03C 0039 887 CMP.b #'9',d0 * compare with "9" -00000B00 63DE 888 BLS.s LAB_1392 * if it is "0" to "9" save it and get another -00000B02 889 -00000B02 7ADF 890 MOVEQ #-33,d5 * mask xx0x xxxx, ASCII upper case -00000B04 CA00 891 AND.b d0,d5 * mask the character -00000B06 892 -00000B06 BA3C 0041 893 CMP.b #'A',d5 * compare with "A" -00000B0A 6540 894 BCS.s LAB_13CC * if < "A" quit the hex save loop -00000B0C 895 -00000B0C BA3C 0046 896 CMP.b #'F',d5 * compare with "F" -00000B10 63CE 897 BLS.s LAB_1392 * if it is "A" to "F" save it and get another -00000B12 898 -00000B12 6038 899 BRA.s LAB_13CC * else continue crunching -00000B14 900 -00000B14 901 * crunch keywords into Basic tokens -00000B14 902 * crunch from (a5), output to (a0) -00000B14 903 * returns .. -00000B14 904 * d4 trashed -00000B14 905 * d3 trashed -00000B14 906 * d2 is length -00000B14 907 * d1 trashed -00000B14 908 * d0 trashed -00000B14 909 * a1 trashed -00000B14 910 -00000B14 911 * this is the improved BASIC crunch routine and is 10 to 100 times faster than the -00000B14 912 * old list search -00000B14 913 -00000B14 914 LAB_13A6 -00000B14 7200 915 MOVEQ #0,d1 * clear the read index -00000B16 2401 916 MOVE.l d1,d2 * clear the save index -00000B18 1741 0E41 917 MOVE.b d1,Oquote(a3) * clear the open quote/DATA flag -00000B1C 918 LAB_13AC -00000B1C 7000 919 MOVEQ #0,d0 * clear word -00000B1E 1035 1000 920 MOVE.b (a5,d1.w),d0 * get byte from input buffer -00000B22 675E 921 BEQ.s LAB_13EC * if null save byte then continue crunching -00000B24 922 -00000B24 B03C 005F 923 CMP.b #'_',d0 * compare with "_" -00000B28 6458 924 BCC.s LAB_13EC * if >= "_" save byte then continue crunching -00000B2A 925 -00000B2A B03C 003C 926 CMP.b #'<',d0 * compare with "<" -00000B2E 641C 927 BCC.s LAB_13CC * if >= "<" go crunch -00000B30 928 -00000B30 B03C 0030 929 CMP.b #'0',d0 * compare with "0" -00000B34 644C 930 BCC.s LAB_13EC * if >= "0" save byte then continue crunching -00000B36 931 -00000B36 1740 0E3E 932 MOVE.b d0,Asrch(a3) * save buffer byte as search character -00000B3A B03C 0022 933 CMP.b #$22,d0 * is it quote character? -00000B3E 6776 934 BEQ.s LAB_1410 * branch if so (copy quoted string) -00000B40 935 -00000B40 B03C 0024 936 CMP.b #'$',d0 * is it the hex value character? -00000B44 679A 937 BEQ.s LAB_1392 * if so go copy a hex value -00000B46 938 -00000B46 939 LAB_13C6 -00000B46 B03C 002A 940 CMP.b #'*',d0 * compare with "*" -00000B4A 6536 941 BCS.s LAB_13EC * if <= "*" save byte then continue crunching -00000B4C 942 -00000B4C 943 * crunch rest -00000B4C 944 LAB_13CC -00000B4C 082B 0006 0E41 945 BTST.b #6,Oquote(a3) * test open quote/DATA token flag -00000B52 662E 946 BNE.s LAB_13EC * branch if b6 of Oquote set (was DATA) -00000B54 947 * go save byte then continue crunching -00000B54 948 -00000B54 0400 002A 949 SUB.b #$2A,d0 * normalise byte -00000B58 D040 950 ADD.w d0,d0 * *2 makes word offset (high byte=$00) -00000B5A 43FA 2C04 951 LEA TAB_CHRT(pc),a1 * get keyword offset table address -00000B5E 3031 0000 952 MOVE.w (a1,d0.w),d0 * get offset into keyword table -00000B62 6B6E 953 BMI.s LAB_141F * branch if no keywords for character -00000B64 954 -00000B64 43FA 2F90 955 LEA TAB_STAR(pc),a1 * get keyword table address -00000B68 D2C0 956 ADDA.w d0,a1 * add keyword offset -00000B6A 76FF 957 MOVEQ #-1,d3 * clear index -00000B6C 3801 958 MOVE.w d1,d4 * copy read index -00000B6E 959 LAB_13D6 -00000B6E 5243 960 ADDQ.w #1,d3 * increment table index -00000B70 1031 3000 961 MOVE.b (a1,d3.w),d0 * get byte from table -00000B74 962 LAB_13D8 -00000B74 6B0A 963 BMI.s LAB_13EA * branch if token, save token and continue -00000B76 964 * crunching -00000B76 965 -00000B76 5244 966 ADDQ.w #1,d4 * increment read index -00000B78 B035 4000 967 CMP.b (a5,d4.w),d0 * compare byte from input buffer -00000B7C 67F0 968 BEQ.s LAB_13D6 * loop if character match -00000B7E 969 -00000B7E 6040 970 BRA.s LAB_1417 * branch if no match -00000B80 971 -00000B80 972 LAB_13EA -00000B80 3204 973 MOVE.w d4,d1 * update read index -00000B82 974 LAB_13EC -00000B82 1180 2000 975 MOVE.b d0,(a0,d2.w) * save byte to output -00000B86 5242 976 ADDQ.w #1,d2 * increment buffer save index -00000B88 5241 977 ADDQ.w #1,d1 * increment buffer read index -00000B8A 4A00 978 TST.b d0 * set flags -00000B8C 674A 979 BEQ.s LAB_142A * branch if was null [EOL] -00000B8E 980 -00000B8E 981 * d0 holds token or byte here -00000B8E 0400 003A 982 SUB.b #$3A,d0 * subtract ":" -00000B92 6706 983 BEQ.s LAB_13FF * branch if it was ":" (is now $00) -00000B94 984 -00000B94 985 * d0 now holds token-$3A -00000B94 B03C 0049 986 CMP.b #(TK_DATA-$3A),d0 * compare with DATA token - $3A -00000B98 6604 987 BNE.s LAB_1401 * branch if not DATA -00000B9A 988 -00000B9A 989 * token was : or DATA -00000B9A 990 LAB_13FF -00000B9A 1740 0E41 991 MOVE.b d0,Oquote(a3) * save token-$3A ($00 for ":", TK_DATA-$3A for -00000B9E 992 * DATA) -00000B9E 993 LAB_1401 -00000B9E 0400 0055 994 SUB.b #(TK_REM-$3A),d0 * subtract REM token offset -00000BA2 6600 FF78 995 BNE LAB_13AC * If wasn't REM then go crunch rest of line -00000BA6 996 -00000BA6 1740 0E3E 997 MOVE.b d0,Asrch(a3) * else was REM so set search for [EOL] -00000BAA 998 -00000BAA 999 * loop for REM, "..." etc. -00000BAA 1000 LAB_1408 -00000BAA 1035 1000 1001 MOVE.b (a5,d1.w),d0 * get byte from input buffer -00000BAE 67D2 1002 BEQ.s LAB_13EC * branch if null [EOL] -00000BB0 1003 -00000BB0 B02B 0E3E 1004 CMP.b Asrch(a3),d0 * compare with stored character -00000BB4 67CC 1005 BEQ.s LAB_13EC * branch if match (end quote, REM, :, or DATA) -00000BB6 1006 -00000BB6 1007 * entry for copy string in quotes, don't crunch -00000BB6 1008 LAB_1410 -00000BB6 1180 2000 1009 MOVE.b d0,(a0,d2.w) * save byte to output -00000BBA 5242 1010 ADDQ.w #1,d2 * increment buffer save index -00000BBC 5241 1011 ADDQ.w #1,d1 * increment buffer read index -00000BBE 60EA 1012 BRA.s LAB_1408 * loop +00000ADC 862 LAB_138E +00000ADC 7007 863 MOVEQ #$07,d0 * [BELL] character into d0 +00000ADE 60F6 864 BRA.s LAB_137F * go print the [BELL] but ignore input character +00000AE0 865 +00000AE0 866 +00000AE0 867 ************************************************************************************* +00000AE0 868 * +00000AE0 869 * copy a hex value without crunching +00000AE0 870 +00000AE0 871 LAB_1392 +00000AE0 1180 2000 872 MOVE.b d0,(a0,d2.w) * save the byte to the output +00000AE4 5242 873 ADDQ.w #1,d2 * increment the buffer save index +00000AE6 874 +00000AE6 5241 875 ADDQ.w #1,d1 * increment the buffer read index +00000AE8 1035 1000 876 MOVE.b (a5,d1.w),d0 * get a byte from the input buffer +00000AEC 6700 0094 877 BEQ LAB_13EC * if [EOL] go save it without crunching +00000AF0 878 +00000AF0 B03C 0020 879 CMP.b #' ',d0 * compare the character with " " +00000AF4 67EA 880 BEQ.s LAB_1392 * if [SPACE] just go save it and get another +00000AF6 881 +00000AF6 B03C 0030 882 CMP.b #'0',d0 * compare the character with "0" +00000AFA 654A 883 BCS.s LAB_13C6 * if < "0" quit the hex save loop +00000AFC 884 +00000AFC B03C 0039 885 CMP.b #'9',d0 * compare with "9" +00000B00 63DE 886 BLS.s LAB_1392 * if it is "0" to "9" save it and get another +00000B02 887 +00000B02 7ADF 888 MOVEQ #-33,d5 * mask xx0x xxxx, ASCII upper case +00000B04 CA00 889 AND.b d0,d5 * mask the character +00000B06 890 +00000B06 BA3C 0041 891 CMP.b #'A',d5 * compare with "A" +00000B0A 6540 892 BCS.s LAB_13CC * if < "A" quit the hex save loop +00000B0C 893 +00000B0C BA3C 0046 894 CMP.b #'F',d5 * compare with "F" +00000B10 63CE 895 BLS.s LAB_1392 * if it is "A" to "F" save it and get another +00000B12 896 +00000B12 6038 897 BRA.s LAB_13CC * else continue crunching +00000B14 898 +00000B14 899 * crunch keywords into Basic tokens +00000B14 900 * crunch from (a5), output to (a0) +00000B14 901 * returns .. +00000B14 902 * d4 trashed +00000B14 903 * d3 trashed +00000B14 904 * d2 is length +00000B14 905 * d1 trashed +00000B14 906 * d0 trashed +00000B14 907 * a1 trashed +00000B14 908 +00000B14 909 * this is the improved BASIC crunch routine and is 10 to 100 times faster than the +00000B14 910 * old list search +00000B14 911 +00000B14 912 LAB_13A6 +00000B14 7200 913 MOVEQ #0,d1 * clear the read index +00000B16 2401 914 MOVE.l d1,d2 * clear the save index +00000B18 1741 05DD 915 MOVE.b d1,Oquote(a3) * clear the open quote/DATA flag +00000B1C 916 LAB_13AC +00000B1C 7000 917 MOVEQ #0,d0 * clear word +00000B1E 1035 1000 918 MOVE.b (a5,d1.w),d0 * get byte from input buffer +00000B22 675E 919 BEQ.s LAB_13EC * if null save byte then continue crunching +00000B24 920 +00000B24 B03C 005F 921 CMP.b #'_',d0 * compare with "_" +00000B28 6458 922 BCC.s LAB_13EC * if >= "_" save byte then continue crunching +00000B2A 923 +00000B2A B03C 003C 924 CMP.b #'<',d0 * compare with "<" +00000B2E 641C 925 BCC.s LAB_13CC * if >= "<" go crunch +00000B30 926 +00000B30 B03C 0030 927 CMP.b #'0',d0 * compare with "0" +00000B34 644C 928 BCC.s LAB_13EC * if >= "0" save byte then continue crunching +00000B36 929 +00000B36 1740 05DA 930 MOVE.b d0,Asrch(a3) * save buffer byte as search character +00000B3A B03C 0022 931 CMP.b #$22,d0 * is it quote character? +00000B3E 6776 932 BEQ.s LAB_1410 * branch if so (copy quoted string) +00000B40 933 +00000B40 B03C 0024 934 CMP.b #'$',d0 * is it the hex value character? +00000B44 679A 935 BEQ.s LAB_1392 * if so go copy a hex value +00000B46 936 +00000B46 937 LAB_13C6 +00000B46 B03C 002A 938 CMP.b #'*',d0 * compare with "*" +00000B4A 6536 939 BCS.s LAB_13EC * if <= "*" save byte then continue crunching +00000B4C 940 +00000B4C 941 * crunch rest +00000B4C 942 LAB_13CC +00000B4C 082B 0006 05DD 943 BTST.b #6,Oquote(a3) * test open quote/DATA token flag +00000B52 662E 944 BNE.s LAB_13EC * branch if b6 of Oquote set (was DATA) +00000B54 945 * go save byte then continue crunching +00000B54 946 +00000B54 0400 002A 947 SUB.b #$2A,d0 * normalise byte +00000B58 D040 948 ADD.w d0,d0 * *2 makes word offset (high byte=$00) +00000B5A 43FA 2C04 949 LEA TAB_CHRT(pc),a1 * get keyword offset table address +00000B5E 3031 0000 950 MOVE.w (a1,d0.w),d0 * get offset into keyword table +00000B62 6B6E 951 BMI.s LAB_141F * branch if no keywords for character +00000B64 952 +00000B64 43FA 2F90 953 LEA TAB_STAR(pc),a1 * get keyword table address +00000B68 D2C0 954 ADDA.w d0,a1 * add keyword offset +00000B6A 76FF 955 MOVEQ #-1,d3 * clear index +00000B6C 3801 956 MOVE.w d1,d4 * copy read index +00000B6E 957 LAB_13D6 +00000B6E 5243 958 ADDQ.w #1,d3 * increment table index +00000B70 1031 3000 959 MOVE.b (a1,d3.w),d0 * get byte from table +00000B74 960 LAB_13D8 +00000B74 6B0A 961 BMI.s LAB_13EA * branch if token, save token and continue +00000B76 962 * crunching +00000B76 963 +00000B76 5244 964 ADDQ.w #1,d4 * increment read index +00000B78 B035 4000 965 CMP.b (a5,d4.w),d0 * compare byte from input buffer +00000B7C 67F0 966 BEQ.s LAB_13D6 * loop if character match +00000B7E 967 +00000B7E 6040 968 BRA.s LAB_1417 * branch if no match +00000B80 969 +00000B80 970 LAB_13EA +00000B80 3204 971 MOVE.w d4,d1 * update read index +00000B82 972 LAB_13EC +00000B82 1180 2000 973 MOVE.b d0,(a0,d2.w) * save byte to output +00000B86 5242 974 ADDQ.w #1,d2 * increment buffer save index +00000B88 5241 975 ADDQ.w #1,d1 * increment buffer read index +00000B8A 4A00 976 TST.b d0 * set flags +00000B8C 674A 977 BEQ.s LAB_142A * branch if was null [EOL] +00000B8E 978 +00000B8E 979 * d0 holds token or byte here +00000B8E 0400 003A 980 SUB.b #$3A,d0 * subtract ":" +00000B92 6706 981 BEQ.s LAB_13FF * branch if it was ":" (is now $00) +00000B94 982 +00000B94 983 * d0 now holds token-$3A +00000B94 B03C 0049 984 CMP.b #(TK_DATA-$3A),d0 * compare with DATA token - $3A +00000B98 6604 985 BNE.s LAB_1401 * branch if not DATA +00000B9A 986 +00000B9A 987 * token was : or DATA +00000B9A 988 LAB_13FF +00000B9A 1740 05DD 989 MOVE.b d0,Oquote(a3) * save token-$3A ($00 for ":", TK_DATA-$3A for +00000B9E 990 * DATA) +00000B9E 991 LAB_1401 +00000B9E 0400 0055 992 SUB.b #(TK_REM-$3A),d0 * subtract REM token offset +00000BA2 6600 FF78 993 BNE LAB_13AC * If wasn't REM then go crunch rest of line +00000BA6 994 +00000BA6 1740 05DA 995 MOVE.b d0,Asrch(a3) * else was REM so set search for [EOL] +00000BAA 996 +00000BAA 997 * loop for REM, "..." etc. +00000BAA 998 LAB_1408 +00000BAA 1035 1000 999 MOVE.b (a5,d1.w),d0 * get byte from input buffer +00000BAE 67D2 1000 BEQ.s LAB_13EC * branch if null [EOL] +00000BB0 1001 +00000BB0 B02B 05DA 1002 CMP.b Asrch(a3),d0 * compare with stored character +00000BB4 67CC 1003 BEQ.s LAB_13EC * branch if match (end quote, REM, :, or DATA) +00000BB6 1004 +00000BB6 1005 * entry for copy string in quotes, don't crunch +00000BB6 1006 LAB_1410 +00000BB6 1180 2000 1007 MOVE.b d0,(a0,d2.w) * save byte to output +00000BBA 5242 1008 ADDQ.w #1,d2 * increment buffer save index +00000BBC 5241 1009 ADDQ.w #1,d1 * increment buffer read index +00000BBE 60EA 1010 BRA.s LAB_1408 * loop +00000BC0 1011 +00000BC0 1012 * not found keyword this go so find the end of this word in the table 00000BC0 1013 -00000BC0 1014 * not found keyword this go so find the end of this word in the table -00000BC0 1015 -00000BC0 1016 LAB_1417 -00000BC0 3801 1017 MOVE.w d1,d4 * reset read pointer -00000BC2 1018 LAB_141B -00000BC2 5243 1019 ADDQ.w #1,d3 * increment keyword table pointer, flag -00000BC4 1020 * unchanged -00000BC4 1031 3000 1021 MOVE.b (a1,d3.w),d0 * get keyword table byte -00000BC8 6AF8 1022 BPL.s LAB_141B * if not end of keyword go do next byte -00000BCA 1023 -00000BCA 5243 1024 ADDQ.w #1,d3 * increment keyword table pointer flag -00000BCC 1025 * unchanged -00000BCC 1031 3000 1026 MOVE.b (a1,d3.w),d0 * get keyword table byte -00000BD0 66A2 1027 BNE.s LAB_13D8 * go test next word if not zero byte (table end) -00000BD2 1028 -00000BD2 1029 * reached end of table with no match -00000BD2 1030 LAB_141F -00000BD2 1035 1000 1031 MOVE.b (a5,d1.w),d0 * restore byte from input buffer -00000BD6 60AA 1032 BRA.s LAB_13EC * go save byte in output and continue crunching -00000BD8 1033 -00000BD8 1034 * reached [EOL] -00000BD8 1035 LAB_142A -00000BD8 7000 1036 MOVEQ #0,d0 * ensure longword clear -00000BDA 0102 1037 BTST d0,d2 * test odd bit (fastest) -00000BDC 6706 1038 BEQ.s LAB_142C * branch if no bytes to fill -00000BDE 1039 -00000BDE 1180 2000 1040 MOVE.b d0,(a0,d2.w) * clear next byte -00000BE2 5242 1041 ADDQ.w #1,d2 * increment buffer save index -00000BE4 1042 LAB_142C -00000BE4 2180 2000 1043 MOVE.l d0,(a0,d2.w) * clear next line pointer, EOT in immediate mode -00000BE8 4E75 1044 RTS -00000BEA 1045 -00000BEA 1046 -00000BEA 1047 ************************************************************************************* -00000BEA 1048 * -00000BEA 1049 * search Basic for d1 line number from start of mem -00000BEA 1050 -00000BEA 1051 LAB_SSLN -00000BEA 206B 0C92 1052 MOVEA.l Smeml(a3),a0 * get start of program mem -00000BEE 6002 1053 BRA.s LAB_SCLN * go search for required line from a0 -00000BF0 1054 -00000BF0 1055 LAB_145F -00000BF0 2040 1056 MOVEA.l d0,a0 * copy next line pointer -00000BF2 1057 -00000BF2 1058 * search Basic for d1 line number from a0 -00000BF2 1059 * returns Cb=0 if found -00000BF2 1060 * returns a0 pointer to found or next higher (not found) line -00000BF2 1061 -00000BF2 1062 LAB_SCLN -00000BF2 2018 1063 MOVE.l (a0)+,d0 * get next line pointer and point to line # -00000BF4 6708 1064 BEQ.s LAB_145E * is end marker so we're done, do 'no line' exit -00000BF6 1065 -00000BF6 B290 1066 CMP.l (a0),d1 * compare this line # with required line # -00000BF8 6EF6 1067 BGT.s LAB_145F * loop if required # > this # -00000BFA 1068 -00000BFA 5948 1069 SUBQ.w #4,a0 * adjust pointer, flags not changed -00000BFC 4E75 1070 RTS -00000BFE 1071 -00000BFE 1072 LAB_145E -00000BFE 5948 1073 SUBQ.w #4,a0 * adjust pointer, flags not changed -00000C00 5380 1074 SUBQ.l #1,d0 * make end program found = -1, set carry -00000C02 4E75 1075 RTS -00000C04 1076 -00000C04 1077 -00000C04 1078 ************************************************************************************* -00000C04 1079 * -00000C04 1080 * perform NEW -00000C04 1081 -00000C04 1082 LAB_NEW -00000C04 664C 1083 BNE.s RTS_005 * exit if not end of statement (do syntax error) -00000C06 1084 -00000C06 1085 LAB_1463 -00000C06 206B 0C92 1086 MOVEA.l Smeml(a3),a0 * point to start of program memory -00000C0A 7000 1087 MOVEQ #0,d0 * clear longword -00000C0C 20C0 1088 MOVE.l d0,(a0)+ * clear first line, next line pointer -00000C0E 2748 0C96 1089 MOVE.l a0,Sfncl(a3) * set start of functions +00000BC0 1014 LAB_1417 +00000BC0 3801 1015 MOVE.w d1,d4 * reset read pointer +00000BC2 1016 LAB_141B +00000BC2 5243 1017 ADDQ.w #1,d3 * increment keyword table pointer, flag +00000BC4 1018 * unchanged +00000BC4 1031 3000 1019 MOVE.b (a1,d3.w),d0 * get keyword table byte +00000BC8 6AF8 1020 BPL.s LAB_141B * if not end of keyword go do next byte +00000BCA 1021 +00000BCA 5243 1022 ADDQ.w #1,d3 * increment keyword table pointer flag +00000BCC 1023 * unchanged +00000BCC 1031 3000 1024 MOVE.b (a1,d3.w),d0 * get keyword table byte +00000BD0 66A2 1025 BNE.s LAB_13D8 * go test next word if not zero byte (table end) +00000BD2 1026 +00000BD2 1027 * reached end of table with no match +00000BD2 1028 LAB_141F +00000BD2 1035 1000 1029 MOVE.b (a5,d1.w),d0 * restore byte from input buffer +00000BD6 60AA 1030 BRA.s LAB_13EC * go save byte in output and continue crunching +00000BD8 1031 +00000BD8 1032 * reached [EOL] +00000BD8 1033 LAB_142A +00000BD8 7000 1034 MOVEQ #0,d0 * ensure longword clear +00000BDA 0102 1035 BTST d0,d2 * test odd bit (fastest) +00000BDC 6706 1036 BEQ.s LAB_142C * branch if no bytes to fill +00000BDE 1037 +00000BDE 1180 2000 1038 MOVE.b d0,(a0,d2.w) * clear next byte +00000BE2 5242 1039 ADDQ.w #1,d2 * increment buffer save index +00000BE4 1040 LAB_142C +00000BE4 2180 2000 1041 MOVE.l d0,(a0,d2.w) * clear next line pointer, EOT in immediate mode +00000BE8 4E75 1042 RTS +00000BEA 1043 +00000BEA 1044 +00000BEA 1045 ************************************************************************************* +00000BEA 1046 * +00000BEA 1047 * search Basic for d1 line number from start of mem +00000BEA 1048 +00000BEA 1049 LAB_SSLN +00000BEA 206B 042E 1050 MOVEA.l Smeml(a3),a0 * get start of program mem +00000BEE 6002 1051 BRA.s LAB_SCLN * go search for required line from a0 +00000BF0 1052 +00000BF0 1053 LAB_145F +00000BF0 2040 1054 MOVEA.l d0,a0 * copy next line pointer +00000BF2 1055 +00000BF2 1056 * search Basic for d1 line number from a0 +00000BF2 1057 * returns Cb=0 if found +00000BF2 1058 * returns a0 pointer to found or next higher (not found) line +00000BF2 1059 +00000BF2 1060 LAB_SCLN +00000BF2 2018 1061 MOVE.l (a0)+,d0 * get next line pointer and point to line # +00000BF4 6708 1062 BEQ.s LAB_145E * is end marker so we're done, do 'no line' exit +00000BF6 1063 +00000BF6 B290 1064 CMP.l (a0),d1 * compare this line # with required line # +00000BF8 6EF6 1065 BGT.s LAB_145F * loop if required # > this # +00000BFA 1066 +00000BFA 5948 1067 SUBQ.w #4,a0 * adjust pointer, flags not changed +00000BFC 4E75 1068 RTS +00000BFE 1069 +00000BFE 1070 LAB_145E +00000BFE 5948 1071 SUBQ.w #4,a0 * adjust pointer, flags not changed +00000C00 5380 1072 SUBQ.l #1,d0 * make end program found = -1, set carry +00000C02 4E75 1073 RTS +00000C04 1074 +00000C04 1075 +00000C04 1076 ************************************************************************************* +00000C04 1077 * +00000C04 1078 * perform NEW +00000C04 1079 +00000C04 1080 LAB_NEW +00000C04 664C 1081 BNE.s RTS_005 * exit if not end of statement (do syntax error) +00000C06 1082 +00000C06 1083 LAB_1463 +00000C06 206B 042E 1084 MOVEA.l Smeml(a3),a0 * point to start of program memory +00000C0A 7000 1085 MOVEQ #0,d0 * clear longword +00000C0C 20C0 1086 MOVE.l d0,(a0)+ * clear first line, next line pointer +00000C0E 2748 0432 1087 MOVE.l a0,Sfncl(a3) * set start of functions +00000C12 1088 +00000C12 1089 * reset execution to start, clear variables and flush stack 00000C12 1090 -00000C12 1091 * reset execution to start, clear variables and flush stack -00000C12 1092 -00000C12 1093 LAB_1477 -00000C12 2A6B 0C92 1094 MOVEA.l Smeml(a3),a5 * reset BASIC execute pointer -00000C16 534D 1095 SUBQ.w #1,a5 * -1 (as end of previous line) +00000C12 1091 LAB_1477 +00000C12 2A6B 042E 1092 MOVEA.l Smeml(a3),a5 * reset BASIC execute pointer +00000C16 534D 1093 SUBQ.w #1,a5 * -1 (as end of previous line) +00000C18 1094 +00000C18 1095 * "CLEAR" command gets here 00000C18 1096 -00000C18 1097 * "CLEAR" command gets here -00000C18 1098 -00000C18 1099 LAB_147A -00000C18 276B 0CAE 0CAA 1100 MOVE.l Ememl(a3),Sstorl(a3) * save end of mem as bottom of string space -00000C1E 202B 0C96 1101 MOVE.l Sfncl(a3),d0 * get start of functions -00000C22 2740 0C9A 1102 MOVE.l d0,Svarl(a3) * start of variables -00000C26 2740 0C9E 1103 MOVE.l d0,Sstrl(a3) * start of strings -00000C2A 2740 0CA2 1104 MOVE.l d0,Sarryl(a3) * set start of arrays -00000C2E 2740 0CA6 1105 MOVE.l d0,Earryl(a3) * set end of arrays -00000C32 1106 LAB_1480 -00000C32 7000 1107 MOVEQ #0,d0 * set Zb -00000C34 1740 0E4E 1108 MOVE.b d0,ccnull(a3) * clear get byte countdown -00000C38 6100 01CE 1109 BSR LAB_RESTORE * perform RESTORE command +00000C18 1097 LAB_147A +00000C18 276B 044A 0446 1098 MOVE.l Ememl(a3),Sstorl(a3) * save end of mem as bottom of string space +00000C1E 202B 0432 1099 MOVE.l Sfncl(a3),d0 * get start of functions +00000C22 2740 0436 1100 MOVE.l d0,Svarl(a3) * start of variables +00000C26 2740 043A 1101 MOVE.l d0,Sstrl(a3) * start of strings +00000C2A 2740 043E 1102 MOVE.l d0,Sarryl(a3) * set start of arrays +00000C2E 2740 0442 1103 MOVE.l d0,Earryl(a3) * set end of arrays +00000C32 1104 LAB_1480 +00000C32 7000 1105 MOVEQ #0,d0 * set Zb +00000C34 1740 05EA 1106 MOVE.b d0,ccnull(a3) * clear get byte countdown +00000C38 6100 01CE 1107 BSR LAB_RESTORE * perform RESTORE command +00000C3C 1108 +00000C3C 1109 * flush stack & clear continue flag 00000C3C 1110 -00000C3C 1111 * flush stack & clear continue flag -00000C3C 1112 -00000C3C 1113 LAB_1491 -00000C3C 49EB 0CF2 1114 LEA des_sk(a3),a4 * reset descriptor stack pointer -00000C40 1115 -00000C40 201F 1116 MOVE.l (sp)+,d0 * pull return address -00000C42 4FEB 0C64 1117 LEA ram_base(a3),sp * set stack to RAM start + 1k* set stack to RAM start + 1k, flush stack -00000C46 2F00 1118 MOVE.l d0,-(sp) * restore return address -00000C48 1119 -00000C48 7000 1120 MOVEQ #0,d0 * clear longword -00000C4A 2740 0CBE 1121 MOVE.l d0,Cpntrl(a3) * clear continue pointer -00000C4E 1740 0E43 1122 MOVE.b d0,Sufnxf(a3) * clear subscript/FNX flag -00000C52 1123 RTS_005 -00000C52 4E75 1124 RTS -00000C54 1125 -00000C54 1126 -00000C54 1127 ************************************************************************************* -00000C54 1128 * -00000C54 1129 * perform CLEAR -00000C54 1130 -00000C54 1131 LAB_CLEAR -00000C54 67C2 1132 BEQ.s LAB_147A * if no following byte go do "CLEAR" -00000C56 1133 -00000C56 4E75 1134 RTS * was following byte (go do syntax error) -00000C58 1135 -00000C58 1136 -00000C58 1137 ************************************************************************************* -00000C58 1138 * -00000C58 1139 * perform LIST [n][-m] -00000C58 1140 -00000C58 1141 LAB_LIST -00000C58 6512 1142 BCS.s LAB_14BD * branch if next character numeric (LIST n...) -00000C5A 1143 -00000C5A 72FF 1144 MOVEQ #-1,d1 * set end to $FFFFFFFF -00000C5C 2741 0C8E 1145 MOVE.l d1,Itemp(a3) * save to Itemp -00000C60 1146 -00000C60 7200 1147 MOVEQ #0,d1 * set start to $00000000 -00000C62 4A00 1148 TST.b d0 * test next byte -00000C64 670A 1149 BEQ.s LAB_14C0 * branch if next character [NULL] (LIST) -00000C66 1150 -00000C66 B03C 00B3 1151 CMP.b #TK_MINUS,d0 * compare with token for - -00000C6A 66E6 1152 BNE.s RTS_005 * exit if not - (LIST -m) -00000C6C 1153 -00000C6C 1154 * LIST [[n]-[m]] this sets the n, if present, -00000C6C 1155 * as the start and end -00000C6C 1156 LAB_14BD -00000C6C 6100 0392 1157 BSR LAB_GFPN * get fixed-point number into temp integer & d1 -00000C70 1158 LAB_14C0 -00000C70 6100 FF78 1159 BSR LAB_SSLN * search BASIC for d1 line number -00000C74 1160 * (pointer in a0) -00000C74 6100 0934 1161 BSR LAB_GBYT * scan memory -00000C78 6716 1162 BEQ.s LAB_14D4 * branch if no more characters -00000C7A 1163 -00000C7A 1164 * this bit checks the - is present -00000C7A B03C 00B3 1165 CMP.b #TK_MINUS,d0 * compare with token for - -00000C7E 66D2 1166 BNE.s RTS_005 * return if not "-" (will be Syntax error) -00000C80 1167 -00000C80 72FF 1168 MOVEQ #-1,d1 * set end to $FFFFFFFF -00000C82 2741 0C8E 1169 MOVE.l d1,Itemp(a3) * save Itemp -00000C86 1170 -00000C86 1171 * LIST [n]-[m] the - was there so see if -00000C86 1172 * there is an m to set as the end value -00000C86 6100 0920 1173 BSR LAB_IGBY * increment & scan memory -00000C8A 6704 1174 BEQ.s LAB_14D4 * branch if was [NULL] (LIST n-) -00000C8C 1175 -00000C8C 6100 0372 1176 BSR LAB_GFPN * get fixed-point number into temp integer & d1 -00000C90 1177 LAB_14D4 -00000C90 177C 0000 0E41 1178 MOVE.b #$00,Oquote(a3) * clear open quote flag -00000C96 6100 04E8 1179 BSR LAB_CRLF * print CR/LF -00000C9A 2018 1180 MOVE.l (a0)+,d0 * get next line pointer -00000C9C 67B4 1181 BEQ.s RTS_005 * if null all done so exit -00000C9E 1182 -00000C9E 2240 1183 MOVEA.l d0,a1 * copy next line pointer -00000CA0 6100 012C 1184 BSR LAB_1629 * do CRTL-C check vector -00000CA4 1185 -00000CA4 2018 1186 MOVE.l (a0)+,d0 * get this line # -00000CA6 B0AB 0C8E 1187 CMP.l Itemp(a3),d0 * compare end line # with this line # -00000CAA 62A6 1188 BHI.s RTS_005 * if this line greater all done so exit -00000CAC 1189 -00000CAC 1190 LAB_14E2 -00000CAC 48E7 00C0 1191 MOVEM.l a0-a1,-(sp) * save registers -00000CB0 6100 180E 1192 BSR LAB_295E * print d0 as unsigned integer -00000CB4 4CDF 0300 1193 MOVEM.l (sp)+,a0-a1 * restore registers -00000CB8 7020 1194 MOVEQ #$20,d0 * space is the next character -00000CBA 1195 LAB_150C -00000CBA 6100 053C 1196 BSR LAB_PRNA * go print the character -00000CBE B03C 0022 1197 CMP.b #$22,d0 * was it " character -00000CC2 6606 1198 BNE.s LAB_1519 * branch if not -00000CC4 1199 -00000CC4 1200 * we're either entering or leaving quotes -00000CC4 0A2B 00FF 0E41 1201 EOR.b #$FF,Oquote(a3) * toggle open quote flag -00000CCA 1202 LAB_1519 -00000CCA 1018 1203 MOVE.b (a0)+,d0 * get byte and increment pointer -00000CCC 6608 1204 BNE.s LAB_152E * branch if not [EOL] (go print) -00000CCE 1205 -00000CCE 1206 * was [EOL] -00000CCE 2049 1207 MOVEA.l a1,a0 * copy next line pointer -00000CD0 2008 1208 MOVE.l a0,d0 * copy to set flags -00000CD2 66BC 1209 BNE.s LAB_14D4 * go do next line if not [EOT] -00000CD4 1210 -00000CD4 4E75 1211 RTS -00000CD6 1212 -00000CD6 1213 LAB_152E -00000CD6 6AE2 1214 BPL.s LAB_150C * just go print it if not token byte -00000CD8 1215 -00000CD8 1216 * else it was a token byte so maybe uncrunch it -00000CD8 4A2B 0E41 1217 TST.b Oquote(a3) * test the open quote flag -00000CDC 6BDC 1218 BMI.s LAB_150C * just go print character if open quote set -00000CDE 1219 -00000CDE 1220 * else uncrunch BASIC token -00000CDE 45FA 2AEA 1221 LEA LAB_KEYT(pc),a2 * get keyword table address -00000CE2 727F 1222 MOVEQ #$7F,d1 * mask into d1 -00000CE4 C200 1223 AND.b d0,d1 * copy and mask token -00000CE6 E549 1224 LSL.w #2,d1 * *4 -00000CE8 45F2 1000 1225 LEA (a2,d1.w),a2 * get keyword entry address -00000CEC 101A 1226 MOVE.b (a2)+,d0 * get byte from keyword table -00000CEE 6100 0508 1227 BSR LAB_PRNA * go print the first character -00000CF2 7200 1228 MOVEQ #0,d1 * clear d1 -00000CF4 121A 1229 MOVE.b (a2)+,d1 * get remaining length byte from keyword table -00000CF6 6BD2 1230 BMI.s LAB_1519 * if -ve done so go get next byte -00000CF8 1231 -00000CF8 3012 1232 MOVE.w (a2),d0 * get offset to rest -00000CFA 45FA 2DFA 1233 LEA TAB_STAR(pc),a2 * get keyword table address -00000CFE 45F2 0000 1234 LEA (a2,d0.w),a2 * get address of rest -00000D02 1235 LAB_1540 -00000D02 101A 1236 MOVE.b (a2)+,d0 * get byte from keyword table -00000D04 6100 04F2 1237 BSR LAB_PRNA * go print the character -00000D08 51C9 FFF8 1238 DBF d1,LAB_1540 * decrement and loop if more to do -00000D0C 1239 -00000D0C 60BC 1240 BRA.s LAB_1519 * go get next byte -00000D0E 1241 -00000D0E 1242 -00000D0E 1243 ************************************************************************************* -00000D0E 1244 * -00000D0E 1245 * perform FOR -00000D0E 1246 -00000D0E 1247 LAB_FOR -00000D0E 6100 0390 1248 BSR LAB_LET * go do LET -00000D12 1249 -00000D12 202B 0CD6 1250 MOVE.l Lvarpl(a3),d0 * get the loop variable pointer -00000D16 B0AB 0C9E 1251 CMP.l Sstrl(a3),d0 * compare it with the end of vars memory -00000D1A 6C00 FC22 1252 BGE LAB_TMER * if greater go do type mismatch error -00000D1E 1253 -00000D1E 1254 * test for not less than the start of variables memory if needed -00000D1E 1255 * -00000D1E 1256 * CMP.l Svarl(a3),d0 * compare it with the start of variables memory -00000D1E 1257 * BLT LAB_TMER * if not variables memory do type mismatch error -00000D1E 1258 -00000D1E 1259 * MOVEQ #28,d0 * we need 28 bytes ! -00000D1E 1260 * BSR.s LAB_1212 * check room on stack for d0 bytes -00000D1E 1261 -00000D1E 6100 0214 1262 BSR LAB_SNBS * scan for next BASIC statement ([:] or [EOL]) -00000D22 1263 * returns a0 as pointer to [:] or [EOL] -00000D22 2E88 1264 MOVE.l a0,(sp) * push onto stack (and dump the return address) -00000D24 2F2B 0CB6 1265 MOVE.l Clinel(a3),-(sp) * push current line onto stack -00000D28 1266 -00000D28 70AA 1267 MOVEQ #TK_TO-$100,d0 * set "TO" token -00000D2A 6100 0874 1268 BSR LAB_SCCA * scan for CHR$(d0) else syntax error/warm start -00000D2E 6100 0702 1269 BSR LAB_CTNM * check if source is numeric, else type mismatch -00000D32 1F2B 0E19 1270 MOVE.b Dtypef(a3),-(sp) * push the FOR variable data type onto stack -00000D36 6100 06F8 1271 BSR LAB_EVNM * evaluate expression and check is numeric else -00000D3A 1272 * do type mismatch -00000D3A 1273 -00000D3A 2F2B 0DF4 1274 MOVE.l FAC1_m(a3),-(sp) * push TO value mantissa -00000D3E 3F2B 0DF8 1275 MOVE.w FAC1_e(a3),-(sp) * push TO value exponent and sign -00000D42 1276 -00000D42 277C 80000000 0DF4 1277 MOVE.l #$80000000,FAC1_m(a3) * set default STEP size mantissa -00000D4A 377C 8100 0DF8 1278 MOVE.w #$8100,FAC1_e(a3) * set default STEP size exponent and sign -00000D50 1279 -00000D50 6100 0858 1280 BSR LAB_GBYT * scan memory -00000D54 B03C 00AF 1281 CMP.b #TK_STEP,d0 * compare with STEP token -00000D58 6608 1282 BNE.s LAB_15B3 * jump if not "STEP" -00000D5A 1283 -00000D5A 1284 * was STEP token so .... -00000D5A 6100 084C 1285 BSR LAB_IGBY * increment & scan memory -00000D5E 6100 06D0 1286 BSR LAB_EVNM * evaluate expression & check is numeric -00000D62 1287 * else do type mismatch -00000D62 1288 LAB_15B3 -00000D62 2F2B 0DF4 1289 MOVE.l FAC1_m(a3),-(sp) * push STEP value mantissa -00000D66 3F2B 0DF8 1290 MOVE.w FAC1_e(a3),-(sp) * push STEP value exponent and sign -00000D6A 1291 -00000D6A 2F2B 0CD6 1292 MOVE.l Lvarpl(a3),-(sp) * push variable pointer for FOR/NEXT -00000D6E 3F3C 0081 1293 MOVE.w #TK_FOR,-(sp) * push FOR token on stack -00000D72 1294 -00000D72 6018 1295 BRA.s LAB_15C2 * go do interpreter inner loop -00000D74 1296 -00000D74 1297 LAB_15DC * have reached [EOL]+1 -00000D74 300D 1298 MOVE.w a5,d0 * copy BASIC execute pointer -00000D76 C07C 0001 1299 AND.w #1,d0 * and make line start address even -00000D7A DAC0 1300 ADD.w d0,a5 * add to BASIC execute pointer -00000D7C 201D 1301 MOVE.l (a5)+,d0 * get next line pointer -00000D7E 6700 FC1A 1302 BEQ LAB_1274 * if null go to immediate mode, no "BREAK" -00000D82 1303 * message (was immediate or [EOT] marker) -00000D82 1304 -00000D82 275D 0CB6 1305 MOVE.l (a5)+,Clinel(a3) * save (new) current line # -00000D86 1306 LAB_15F6 -00000D86 6100 0822 1307 BSR LAB_GBYT * get BASIC byte -00000D8A 611A 1308 BSR.s LAB_15FF * go interpret BASIC code from (a5) +00000C3C 1111 LAB_1491 +00000C3C 49EB 048E 1112 LEA des_sk(a3),a4 * reset descriptor stack pointer +00000C40 1113 +00000C40 201F 1114 MOVE.l (sp)+,d0 * pull return address +00000C42 4FEB 0400 1115 LEA ram_base(a3),sp * set stack to RAM start + 1k, flush stack +00000C46 2F00 1116 MOVE.l d0,-(sp) * restore return address +00000C48 1117 +00000C48 7000 1118 MOVEQ #0,d0 * clear longword +00000C4A 2740 045A 1119 MOVE.l d0,Cpntrl(a3) * clear continue pointer +00000C4E 1740 05DF 1120 MOVE.b d0,Sufnxf(a3) * clear subscript/FNX flag +00000C52 1121 RTS_005 +00000C52 4E75 1122 RTS +00000C54 1123 +00000C54 1124 +00000C54 1125 ************************************************************************************* +00000C54 1126 * +00000C54 1127 * perform CLEAR +00000C54 1128 +00000C54 1129 LAB_CLEAR +00000C54 67C2 1130 BEQ.s LAB_147A * if no following byte go do "CLEAR" +00000C56 1131 +00000C56 4E75 1132 RTS * was following byte (go do syntax error) +00000C58 1133 +00000C58 1134 +00000C58 1135 ************************************************************************************* +00000C58 1136 * +00000C58 1137 * perform LIST [n][-m] +00000C58 1138 +00000C58 1139 LAB_LIST +00000C58 6512 1140 BCS.s LAB_14BD * branch if next character numeric (LIST n...) +00000C5A 1141 +00000C5A 72FF 1142 MOVEQ #-1,d1 * set end to $FFFFFFFF +00000C5C 2741 042A 1143 MOVE.l d1,Itemp(a3) * save to Itemp +00000C60 1144 +00000C60 7200 1145 MOVEQ #0,d1 * set start to $00000000 +00000C62 4A00 1146 TST.b d0 * test next byte +00000C64 670A 1147 BEQ.s LAB_14C0 * branch if next character [NULL] (LIST) +00000C66 1148 +00000C66 B03C 00B3 1149 CMP.b #TK_MINUS,d0 * compare with token for - +00000C6A 66E6 1150 BNE.s RTS_005 * exit if not - (LIST -m) +00000C6C 1151 +00000C6C 1152 * LIST [[n]-[m]] this sets the n, if present, +00000C6C 1153 * as the start and end +00000C6C 1154 LAB_14BD +00000C6C 6100 0392 1155 BSR LAB_GFPN * get fixed-point number into temp integer & d1 +00000C70 1156 LAB_14C0 +00000C70 6100 FF78 1157 BSR LAB_SSLN * search BASIC for d1 line number +00000C74 1158 * (pointer in a0) +00000C74 6100 0934 1159 BSR LAB_GBYT * scan memory +00000C78 6716 1160 BEQ.s LAB_14D4 * branch if no more characters +00000C7A 1161 +00000C7A 1162 * this bit checks the - is present +00000C7A B03C 00B3 1163 CMP.b #TK_MINUS,d0 * compare with token for - +00000C7E 66D2 1164 BNE.s RTS_005 * return if not "-" (will be Syntax error) +00000C80 1165 +00000C80 72FF 1166 MOVEQ #-1,d1 * set end to $FFFFFFFF +00000C82 2741 042A 1167 MOVE.l d1,Itemp(a3) * save Itemp +00000C86 1168 +00000C86 1169 * LIST [n]-[m] the - was there so see if +00000C86 1170 * there is an m to set as the end value +00000C86 6100 0920 1171 BSR LAB_IGBY * increment & scan memory +00000C8A 6704 1172 BEQ.s LAB_14D4 * branch if was [NULL] (LIST n-) +00000C8C 1173 +00000C8C 6100 0372 1174 BSR LAB_GFPN * get fixed-point number into temp integer & d1 +00000C90 1175 LAB_14D4 +00000C90 177C 0000 05DD 1176 MOVE.b #$00,Oquote(a3) * clear open quote flag +00000C96 6100 04E8 1177 BSR LAB_CRLF * print CR/LF +00000C9A 2018 1178 MOVE.l (a0)+,d0 * get next line pointer +00000C9C 67B4 1179 BEQ.s RTS_005 * if null all done so exit +00000C9E 1180 +00000C9E 2240 1181 MOVEA.l d0,a1 * copy next line pointer +00000CA0 6100 012C 1182 BSR LAB_1629 * do CRTL-C check vector +00000CA4 1183 +00000CA4 2018 1184 MOVE.l (a0)+,d0 * get this line # +00000CA6 B0AB 042A 1185 CMP.l Itemp(a3),d0 * compare end line # with this line # +00000CAA 62A6 1186 BHI.s RTS_005 * if this line greater all done so exit +00000CAC 1187 +00000CAC 1188 LAB_14E2 +00000CAC 48E7 00C0 1189 MOVEM.l a0-a1,-(sp) * save registers +00000CB0 6100 180E 1190 BSR LAB_295E * print d0 as unsigned integer +00000CB4 4CDF 0300 1191 MOVEM.l (sp)+,a0-a1 * restore registers +00000CB8 7020 1192 MOVEQ #$20,d0 * space is the next character +00000CBA 1193 LAB_150C +00000CBA 6100 053C 1194 BSR LAB_PRNA * go print the character +00000CBE B03C 0022 1195 CMP.b #$22,d0 * was it " character +00000CC2 6606 1196 BNE.s LAB_1519 * branch if not +00000CC4 1197 +00000CC4 1198 * we're either entering or leaving quotes +00000CC4 0A2B 00FF 05DD 1199 EOR.b #$FF,Oquote(a3) * toggle open quote flag +00000CCA 1200 LAB_1519 +00000CCA 1018 1201 MOVE.b (a0)+,d0 * get byte and increment pointer +00000CCC 6608 1202 BNE.s LAB_152E * branch if not [EOL] (go print) +00000CCE 1203 +00000CCE 1204 * was [EOL] +00000CCE 2049 1205 MOVEA.l a1,a0 * copy next line pointer +00000CD0 2008 1206 MOVE.l a0,d0 * copy to set flags +00000CD2 66BC 1207 BNE.s LAB_14D4 * go do next line if not [EOT] +00000CD4 1208 +00000CD4 4E75 1209 RTS +00000CD6 1210 +00000CD6 1211 LAB_152E +00000CD6 6AE2 1212 BPL.s LAB_150C * just go print it if not token byte +00000CD8 1213 +00000CD8 1214 * else it was a token byte so maybe uncrunch it +00000CD8 4A2B 05DD 1215 TST.b Oquote(a3) * test the open quote flag +00000CDC 6BDC 1216 BMI.s LAB_150C * just go print character if open quote set +00000CDE 1217 +00000CDE 1218 * else uncrunch BASIC token +00000CDE 45FA 2AEA 1219 LEA LAB_KEYT(pc),a2 * get keyword table address +00000CE2 727F 1220 MOVEQ #$7F,d1 * mask into d1 +00000CE4 C200 1221 AND.b d0,d1 * copy and mask token +00000CE6 E549 1222 LSL.w #2,d1 * *4 +00000CE8 45F2 1000 1223 LEA (a2,d1.w),a2 * get keyword entry address +00000CEC 101A 1224 MOVE.b (a2)+,d0 * get byte from keyword table +00000CEE 6100 0508 1225 BSR LAB_PRNA * go print the first character +00000CF2 7200 1226 MOVEQ #0,d1 * clear d1 +00000CF4 121A 1227 MOVE.b (a2)+,d1 * get remaining length byte from keyword table +00000CF6 6BD2 1228 BMI.s LAB_1519 * if -ve done so go get next byte +00000CF8 1229 +00000CF8 3012 1230 MOVE.w (a2),d0 * get offset to rest +00000CFA 45FA 2DFA 1231 LEA TAB_STAR(pc),a2 * get keyword table address +00000CFE 45F2 0000 1232 LEA (a2,d0.w),a2 * get address of rest +00000D02 1233 LAB_1540 +00000D02 101A 1234 MOVE.b (a2)+,d0 * get byte from keyword table +00000D04 6100 04F2 1235 BSR LAB_PRNA * go print the character +00000D08 51C9 FFF8 1236 DBF d1,LAB_1540 * decrement and loop if more to do +00000D0C 1237 +00000D0C 60BC 1238 BRA.s LAB_1519 * go get next byte +00000D0E 1239 +00000D0E 1240 +00000D0E 1241 ************************************************************************************* +00000D0E 1242 * +00000D0E 1243 * perform FOR +00000D0E 1244 +00000D0E 1245 LAB_FOR +00000D0E 6100 0390 1246 BSR LAB_LET * go do LET +00000D12 1247 +00000D12 202B 0472 1248 MOVE.l Lvarpl(a3),d0 * get the loop variable pointer +00000D16 B0AB 043A 1249 CMP.l Sstrl(a3),d0 * compare it with the end of vars memory +00000D1A 6C00 FC22 1250 BGE LAB_TMER * if greater go do type mismatch error +00000D1E 1251 +00000D1E 1252 * test for not less than the start of variables memory if needed +00000D1E 1253 * +00000D1E 1254 * CMP.l Svarl(a3),d0 * compare it with the start of variables memory +00000D1E 1255 * BLT LAB_TMER * if not variables memory do type mismatch error +00000D1E 1256 +00000D1E 1257 * MOVEQ #28,d0 * we need 28 bytes ! +00000D1E 1258 * BSR.s LAB_1212 * check room on stack for d0 bytes +00000D1E 1259 +00000D1E 6100 0214 1260 BSR LAB_SNBS * scan for next BASIC statement ([:] or [EOL]) +00000D22 1261 * returns a0 as pointer to [:] or [EOL] +00000D22 2E88 1262 MOVE.l a0,(sp) * push onto stack (and dump the return address) +00000D24 2F2B 0452 1263 MOVE.l Clinel(a3),-(sp) * push current line onto stack +00000D28 1264 +00000D28 70AA 1265 MOVEQ #TK_TO-$100,d0 * set "TO" token +00000D2A 6100 0874 1266 BSR LAB_SCCA * scan for CHR$(d0) else syntax error/warm start +00000D2E 6100 0702 1267 BSR LAB_CTNM * check if source is numeric, else type mismatch +00000D32 1F2B 05B5 1268 MOVE.b Dtypef(a3),-(sp) * push the FOR variable data type onto stack +00000D36 6100 06F8 1269 BSR LAB_EVNM * evaluate expression and check is numeric else +00000D3A 1270 * do type mismatch +00000D3A 1271 +00000D3A 2F2B 0590 1272 MOVE.l FAC1_m(a3),-(sp) * push TO value mantissa +00000D3E 3F2B 0594 1273 MOVE.w FAC1_e(a3),-(sp) * push TO value exponent and sign +00000D42 1274 +00000D42 277C 80000000 0590 1275 MOVE.l #$80000000,FAC1_m(a3) * set default STEP size mantissa +00000D4A 377C 8100 0594 1276 MOVE.w #$8100,FAC1_e(a3) * set default STEP size exponent and sign +00000D50 1277 +00000D50 6100 0858 1278 BSR LAB_GBYT * scan memory +00000D54 B03C 00AF 1279 CMP.b #TK_STEP,d0 * compare with STEP token +00000D58 6608 1280 BNE.s LAB_15B3 * jump if not "STEP" +00000D5A 1281 +00000D5A 1282 * was STEP token so .... +00000D5A 6100 084C 1283 BSR LAB_IGBY * increment & scan memory +00000D5E 6100 06D0 1284 BSR LAB_EVNM * evaluate expression & check is numeric +00000D62 1285 * else do type mismatch +00000D62 1286 LAB_15B3 +00000D62 2F2B 0590 1287 MOVE.l FAC1_m(a3),-(sp) * push STEP value mantissa +00000D66 3F2B 0594 1288 MOVE.w FAC1_e(a3),-(sp) * push STEP value exponent and sign +00000D6A 1289 +00000D6A 2F2B 0472 1290 MOVE.l Lvarpl(a3),-(sp) * push variable pointer for FOR/NEXT +00000D6E 3F3C 0081 1291 MOVE.w #TK_FOR,-(sp) * push FOR token on stack +00000D72 1292 +00000D72 6018 1293 BRA.s LAB_15C2 * go do interpreter inner loop +00000D74 1294 +00000D74 1295 LAB_15DC * have reached [EOL]+1 +00000D74 300D 1296 MOVE.w a5,d0 * copy BASIC execute pointer +00000D76 C07C 0001 1297 AND.w #1,d0 * and make line start address even +00000D7A DAC0 1298 ADD.w d0,a5 * add to BASIC execute pointer +00000D7C 201D 1299 MOVE.l (a5)+,d0 * get next line pointer +00000D7E 6700 FC1A 1300 BEQ LAB_1274 * if null go to immediate mode, no "BREAK" +00000D82 1301 * message (was immediate or [EOT] marker) +00000D82 1302 +00000D82 275D 0452 1303 MOVE.l (a5)+,Clinel(a3) * save (new) current line # +00000D86 1304 LAB_15F6 +00000D86 6100 0822 1305 BSR LAB_GBYT * get BASIC byte +00000D8A 611A 1306 BSR.s LAB_15FF * go interpret BASIC code from (a5) +00000D8C 1307 +00000D8C 1308 * interpreter inner loop (re)entry point 00000D8C 1309 -00000D8C 1310 * interpreter inner loop (re)entry point -00000D8C 1311 -00000D8C 1312 LAB_15C2 -00000D8C 6140 1313 BSR.s LAB_1629 * do CRTL-C check vector -00000D8E 4A2B 0CB6 1314 TST.b Clinel(a3) * test current line #, is -ve for immediate mode -00000D92 6B04 1315 BMI.s LAB_15D1 * branch if immediate mode -00000D94 1316 -00000D94 274D 0CBE 1317 MOVE.l a5,Cpntrl(a3) * save BASIC execute pointer as continue pointer -00000D98 1318 LAB_15D1 -00000D98 101D 1319 MOVE.b (a5)+,d0 * get this byte & increment pointer -00000D9A 67D8 1320 BEQ.s LAB_15DC * loop if [EOL] -00000D9C 1321 -00000D9C B03C 003A 1322 CMP.b #$3A,d0 * compare with ":" -00000DA0 67E4 1323 BEQ.s LAB_15F6 * loop if was statement separator -00000DA2 1324 -00000DA2 6000 FBC6 1325 BRA LAB_SNER * else syntax error, then warm start -00000DA6 1326 -00000DA6 1327 -00000DA6 1328 ************************************************************************************* -00000DA6 1329 * -00000DA6 1330 * interpret BASIC code from (a5) -00000DA6 1331 -00000DA6 1332 LAB_15FF -00000DA6 6700 008C 1333 BEQ RTS_006 * exit if zero [EOL] -00000DAA 1334 -00000DAA 1335 LAB_1602 -00000DAA 0A00 0080 1336 EORI.b #$80,d0 * normalise token -00000DAE 6B00 02F0 1337 BMI LAB_LET * if not token, go do implied LET -00000DB2 1338 -00000DB2 B03C 0028 1339 CMP.b #(TK_TAB-$80),d0 * compare normalised token with TAB -00000DB6 6400 FBB2 1340 BCC LAB_SNER * branch if d0>=TAB, syntax error/warm start -00000DBA 1341 * only tokens before TAB can start a statement -00000DBA 1342 -00000DBA 4880 1343 EXT.w d0 * byte to word (clear high byte) -00000DBC D040 1344 ADD.w d0,d0 * *2 -00000DBE 41FA 2868 1345 LEA LAB_CTBL(pc),a0 * get vector table base address -00000DC2 3030 0000 1346 MOVE.w (a0,d0.w),d0 * get offset to vector -00000DC6 4870 0000 1347 PEA (a0,d0.w) * push vector -00000DCA 6000 07DC 1348 BRA LAB_IGBY * get following byte & execute vector -00000DCE 1349 -00000DCE 1350 -00000DCE 1351 ************************************************************************************* -00000DCE 1352 * -00000DCE 1353 * CTRL-C check jump. this is called as a subroutine but exits back via a jump if a -00000DCE 1354 * key press is detected. -00000DCE 1355 -00000DCE 1356 LAB_1629 -00000DCE 4EEB 0C88 1357 JMP V_CTLC(a3) * ctrl c check vector +00000D8C 1310 LAB_15C2 +00000D8C 6140 1311 BSR.s LAB_1629 * do CRTL-C check vector +00000D8E 4A2B 0452 1312 TST.b Clinel(a3) * test current line #, is -ve for immediate mode +00000D92 6B04 1313 BMI.s LAB_15D1 * branch if immediate mode +00000D94 1314 +00000D94 274D 045A 1315 MOVE.l a5,Cpntrl(a3) * save BASIC execute pointer as continue pointer +00000D98 1316 LAB_15D1 +00000D98 101D 1317 MOVE.b (a5)+,d0 * get this byte & increment pointer +00000D9A 67D8 1318 BEQ.s LAB_15DC * loop if [EOL] +00000D9C 1319 +00000D9C B03C 003A 1320 CMP.b #$3A,d0 * compare with ":" +00000DA0 67E4 1321 BEQ.s LAB_15F6 * loop if was statement separator +00000DA2 1322 +00000DA2 6000 FBC6 1323 BRA LAB_SNER * else syntax error, then warm start +00000DA6 1324 +00000DA6 1325 +00000DA6 1326 ************************************************************************************* +00000DA6 1327 * +00000DA6 1328 * interpret BASIC code from (a5) +00000DA6 1329 +00000DA6 1330 LAB_15FF +00000DA6 6700 008C 1331 BEQ RTS_006 * exit if zero [EOL] +00000DAA 1332 +00000DAA 1333 LAB_1602 +00000DAA 0A00 0080 1334 EORI.b #$80,d0 * normalise token +00000DAE 6B00 02F0 1335 BMI LAB_LET * if not token, go do implied LET +00000DB2 1336 +00000DB2 B03C 0028 1337 CMP.b #(TK_TAB-$80),d0 * compare normalised token with TAB +00000DB6 6400 FBB2 1338 BCC LAB_SNER * branch if d0>=TAB, syntax error/warm start +00000DBA 1339 * only tokens before TAB can start a statement +00000DBA 1340 +00000DBA 4880 1341 EXT.w d0 * byte to word (clear high byte) +00000DBC D040 1342 ADD.w d0,d0 * *2 +00000DBE 41FA 2868 1343 LEA LAB_CTBL(pc),a0 * get vector table base address +00000DC2 3030 0000 1344 MOVE.w (a0,d0.w),d0 * get offset to vector +00000DC6 4870 0000 1345 PEA (a0,d0.w) * push vector +00000DCA 6000 07DC 1346 BRA LAB_IGBY * get following byte & execute vector +00000DCE 1347 +00000DCE 1348 +00000DCE 1349 ************************************************************************************* +00000DCE 1350 * +00000DCE 1351 * CTRL-C check jump. this is called as a subroutine but exits back via a jump if a +00000DCE 1352 * key press is detected. +00000DCE 1353 +00000DCE 1354 LAB_1629 +00000DCE 4EEB 0424 1355 JMP V_CTLC(a3) * ctrl c check vector +00000DD2 1356 +00000DD2 1357 * if there was a key press it gets back here ..... 00000DD2 1358 -00000DD2 1359 * if there was a key press it gets back here ..... -00000DD2 1360 -00000DD2 1361 LAB_1636 -00000DD2 B03C 0003 1362 CMP.b #$03,d0 * compare with CTRL-C -00000DD6 670C 1363 BEQ.s LAB_163B * STOP if was CTRL-C -00000DD8 1364 -00000DD8 1365 LAB_1639 -00000DD8 4E75 1366 RTS * -00000DDA 1367 -00000DDA 1368 -00000DDA 1369 ************************************************************************************* -00000DDA 1370 * -00000DDA 1371 * perform END -00000DDA 1372 -00000DDA 1373 LAB_END -00000DDA 66FC 1374 BNE.s LAB_1639 * exit if something follows STOP -00000DDC 177C 0000 0E40 1375 MOVE.b #0,Breakf(a3) * clear break flag, indicate program end -00000DE2 1376 -00000DE2 1377 -00000DE2 1378 ************************************************************************************* -00000DE2 1379 * -00000DE2 1380 * perform STOP -00000DE2 1381 -00000DE2 1382 LAB_STOP -00000DE2 66F4 1383 BNE.s LAB_1639 * exit if something follows STOP -00000DE4 1384 -00000DE4 1385 LAB_163B -00000DE4 43EB 0DF4 1386 LEA Ibuffe(a3),a1 * get buffer end -00000DE8 BBC9 1387 CMPA.l a1,a5 * compare execute address with buffer end -00000DEA 650A 1388 BCS.s LAB_164F * branch if BASIC pointer is in buffer -00000DEC 1389 * can't continue in immediate mode -00000DEC 1390 -00000DEC 1391 * else... -00000DEC 274D 0CBE 1392 MOVE.l a5,Cpntrl(a3) * save BASIC execute pointer as continue pointer -00000DF0 1393 LAB_1647 -00000DF0 276B 0CB6 0CBA 1394 MOVE.l Clinel(a3),Blinel(a3) * save break line -00000DF6 1395 LAB_164F -00000DF6 584F 1396 ADDQ.w #4,sp * dump return address, don't return to execute -00000DF8 1397 * loop -00000DF8 102B 0E40 1398 MOVE.b Breakf(a3),d0 * get break flag -00000DFC 6700 FB9C 1399 BEQ LAB_1274 * go do warm start if was program end -00000E00 1400 -00000E00 41FA 2E9F 1401 LEA LAB_BMSG(pc),a0 * point to "Break" -00000E04 6000 FB86 1402 BRA LAB_1269 * print "Break" and do warm start -00000E08 1403 -00000E08 1404 -00000E08 1405 ************************************************************************************* -00000E08 1406 * -00000E08 1407 * perform RESTORE -00000E08 1408 -00000E08 1409 LAB_RESTORE -00000E08 206B 0C92 1410 MOVEA.l Smeml(a3),a0 * copy start of memory -00000E0C 6720 1411 BEQ.s LAB_1624 * branch if next character null (RESTORE) -00000E0E 1412 -00000E0E 6100 01F0 1413 BSR LAB_GFPN * get fixed-point number into temp integer & d1 -00000E12 B2AB 0CB6 1414 CMP.l Clinel(a3),d1 * compare current line # with required line # -00000E16 630E 1415 BLS.s LAB_GSCH * branch if >= (start search from beginning) -00000E18 1416 -00000E18 204D 1417 MOVEA.l a5,a0 * copy BASIC execute pointer -00000E1A 1418 LAB_RESs -00000E1A 4A18 1419 TST.b (a0)+ * test next byte & increment pointer -00000E1C 66FC 1420 BNE.s LAB_RESs * loop if not EOL -00000E1E 1421 -00000E1E 3008 1422 MOVE.w a0,d0 * copy pointer -00000E20 C07C 0001 1423 AND.w #1,d0 * mask odd bit -00000E24 D0C0 1424 ADD.w d0,a0 * add pointer -00000E26 1425 * search for line in Itemp from (a0) -00000E26 1426 LAB_GSCH -00000E26 6100 FDCA 1427 BSR LAB_SCLN * search for d1 line number from a0 -00000E2A 1428 * returns Cb=0 if found -00000E2A 6500 FB26 1429 BCS LAB_USER * go do "Undefined statement" error if not found -00000E2E 1430 -00000E2E 1431 LAB_1624 -00000E2E 4A20 1432 TST.b -(a0) * decrement pointer (faster) -00000E30 2748 0CC6 1433 MOVE.l a0,Dptrl(a3) * save DATA pointer -00000E34 1434 RTS_006 -00000E34 4E75 1435 RTS -00000E36 1436 -00000E36 1437 -00000E36 1438 ************************************************************************************* -00000E36 1439 * -00000E36 1440 * perform NULL -00000E36 1441 -00000E36 1442 LAB_NULL -00000E36 6100 10DA 1443 BSR LAB_GTBY * get byte parameter, result in d0 and Itemp -00000E3A 1740 0E48 1444 MOVE.b d0,Nullct(a3) * save new NULL count -00000E3E 4E75 1445 RTS -00000E40 1446 -00000E40 1447 -00000E40 1448 ************************************************************************************* -00000E40 1449 * -00000E40 1450 * perform CONT -00000E40 1451 -00000E40 1452 LAB_CONT -00000E40 6600 FB28 1453 BNE LAB_SNER * if following byte exit to do syntax error -00000E44 1454 -00000E44 4A2B 0CB6 1455 TST.b Clinel(a3) * test current line #, is -ve for immediate mode -00000E48 6A00 FAE8 1456 BPL LAB_CCER * if running go do can't continue error -00000E4C 1457 -00000E4C 202B 0CBE 1458 MOVE.l Cpntrl(a3),d0 * get continue pointer -00000E50 6700 FAE0 1459 BEQ LAB_CCER * go do can't continue error if we can't -00000E54 1460 -00000E54 1461 * we can continue so ... -00000E54 2A40 1462 MOVEA.l d0,a5 * save continue pointer as BASIC execute pointer -00000E56 276B 0CBA 0CB6 1463 MOVE.l Blinel(a3),Clinel(a3) * set break line as current line -00000E5C 4E75 1464 RTS -00000E5E 1465 -00000E5E 1466 -00000E5E 1467 ************************************************************************************* -00000E5E 1468 * -00000E5E 1469 * perform RUN -00000E5E 1470 -00000E5E 1471 LAB_RUN -00000E5E 660C 1472 BNE.s LAB_RUNn * if following byte do RUN n -00000E60 1473 -00000E60 6100 FDB0 1474 BSR LAB_1477 * execution to start, clear vars & flush stack -00000E64 274D 0CBE 1475 MOVE.l a5,Cpntrl(a3) * save as continue pointer -00000E68 6000 FF22 1476 BRA LAB_15C2 * go do interpreter inner loop -00000E6C 1477 * (can't RTS, we flushed the stack!) -00000E6C 1478 -00000E6C 1479 LAB_RUNn -00000E6C 6100 FDAA 1480 BSR LAB_147A * go do "CLEAR" -00000E70 601C 1481 BRA.s LAB_16B0 * get n and do GOTO n -00000E72 1482 -00000E72 1483 -00000E72 1484 ************************************************************************************* -00000E72 1485 * -00000E72 1486 * perform DO -00000E72 1487 -00000E72 1488 LAB_DO -00000E72 1489 * MOVE.l #$05,d0 * need 5 bytes for DO -00000E72 1490 * BSR.s LAB_1212 * check room on stack for A bytes -00000E72 2F0D 1491 MOVE.l a5,-(sp) * push BASIC execute pointer on stack -00000E74 2F2B 0CB6 1492 MOVE.l Clinel(a3),-(sp) * push current line on stack -00000E78 3F3C 009C 1493 MOVE.w #TK_DO,-(sp) * push token for DO on stack -00000E7C 487A FF0E 1494 PEA LAB_15C2(pc) * set return address -00000E80 6000 0728 1495 BRA LAB_GBYT * scan memory & return to interpreter inner loop -00000E84 1496 -00000E84 1497 -00000E84 1498 ************************************************************************************* -00000E84 1499 * -00000E84 1500 * perform GOSUB -00000E84 1501 -00000E84 1502 LAB_GOSUB -00000E84 1503 * MOVE.l #10,d0 * need 10 bytes for GOSUB -00000E84 1504 * BSR.s LAB_1212 * check room on stack for d0 bytes -00000E84 2F0D 1505 MOVE.l a5,-(sp) * push BASIC execute pointer -00000E86 2F2B 0CB6 1506 MOVE.l Clinel(a3),-(sp) * push current line -00000E8A 3F3C 008D 1507 MOVE.w #TK_GOSUB,-(sp) * push token for GOSUB -00000E8E 1508 LAB_16B0 -00000E8E 6100 071A 1509 BSR LAB_GBYT * scan memory -00000E92 487A FEF8 1510 PEA LAB_15C2(pc) * return to interpreter inner loop after GOTO n -00000E96 1511 -00000E96 1512 * this PEA is needed because either we just cleared the stack and have nowhere to return -00000E96 1513 * to or, in the case of GOSUB, we have just dropped a load on the stack and the address -00000E96 1514 * we whould have returned to is buried. This burried return address will be unstacked by -00000E96 1515 * the corresponding RETURN command -00000E96 1516 -00000E96 1517 -00000E96 1518 ************************************************************************************* -00000E96 1519 * -00000E96 1520 * perform GOTO -00000E96 1521 -00000E96 1522 LAB_GOTO -00000E96 6100 0168 1523 BSR LAB_GFPN * get fixed-point number into temp integer & d1 -00000E9A 206B 0C92 1524 MOVEA.l Smeml(a3),a0 * get start of memory -00000E9E B2AB 0CB6 1525 CMP.l Clinel(a3),d1 * compare current line with wanted # -00000EA2 630E 1526 BLS.s LAB_16D0 * branch if current # => wanted # -00000EA4 1527 -00000EA4 204D 1528 MOVEA.l a5,a0 * copy BASIC execute pointer -00000EA6 1529 LAB_GOTs -00000EA6 4A18 1530 TST.b (a0)+ * test next byte & increment pointer -00000EA8 66FC 1531 BNE.s LAB_GOTs * loop if not EOL -00000EAA 1532 -00000EAA 3008 1533 MOVE.w a0,d0 * past pad byte(s) -00000EAC C07C 0001 1534 AND.w #1,d0 * mask odd bit -00000EB0 D0C0 1535 ADD.w d0,a0 * add to pointer -00000EB2 1536 -00000EB2 1537 LAB_16D0 -00000EB2 6100 FD3E 1538 BSR LAB_SCLN * search for d1 line number from a0 -00000EB6 1539 * returns Cb=0 if found -00000EB6 6500 FA9A 1540 BCS LAB_USER * if carry set go do "Undefined statement" error -00000EBA 1541 -00000EBA 2A48 1542 MOVEA.l a0,a5 * copy to basic execute pointer -00000EBC 534D 1543 SUBQ.w #1,a5 * decrement pointer -00000EBE 274D 0CBE 1544 MOVE.l a5,Cpntrl(a3) * save as continue pointer -00000EC2 4E75 1545 RTS -00000EC4 1546 -00000EC4 1547 -00000EC4 1548 ************************************************************************************* -00000EC4 1549 * -00000EC4 1550 * perform LOOP -00000EC4 1551 -00000EC4 1552 LAB_LOOP -00000EC4 0C6F 009C 0004 1553 CMP.w #TK_DO,4(sp) * compare token on stack with DO token -00000ECA 6600 FA5E 1554 BNE LAB_LDER * branch if no matching DO -00000ECE 1555 -00000ECE 1E00 1556 MOVE.b d0,d7 * copy following token (byte) -00000ED0 672E 1557 BEQ.s LoopAlways * if no following token loop forever -00000ED2 1558 -00000ED2 BE3C 003A 1559 CMP.b #':',d7 * compare with ":" -00000ED6 6728 1560 BEQ.s LoopAlways * if no following token loop forever -00000ED8 1561 -00000ED8 0407 00B0 1562 SUB.b #TK_UNTIL,d7 * subtract token for UNTIL -00000EDC 6708 1563 BEQ.s DoRest * branch if was UNTIL -00000EDE 1564 -00000EDE 5307 1565 SUBQ.b #1,d7 * decrement result -00000EE0 6600 FA88 1566 BNE LAB_SNER * if not WHILE go do syntax error & warm start -00000EE4 1567 * only if the token was WHILE will this fail -00000EE4 1568 -00000EE4 7EFF 1569 MOVEQ #-1,d7 * set invert result longword -00000EE6 1570 DoRest -00000EE6 6100 06C0 1571 BSR LAB_IGBY * increment & scan memory -00000EEA 6100 055C 1572 BSR LAB_EVEX * evaluate expression -00000EEE 4A2B 0DF8 1573 TST.b FAC1_e(a3) * test FAC1 exponent -00000EF2 6706 1574 BEQ.s DoCmp * if = 0 go do straight compare -00000EF4 1575 -00000EF4 177C 00FF 0DF8 1576 MOVE.b #$FF,FAC1_e(a3) * else set all bits -00000EFA 1577 DoCmp -00000EFA BF2B 0DF8 1578 EOR.b d7,FAC1_e(a3) * EOR with invert byte -00000EFE 6614 1579 BNE.s LoopDone * if <> 0 clear stack & back to interpreter loop -00000F00 1580 -00000F00 1581 * loop condition wasn't met so do it again -00000F00 1582 LoopAlways -00000F00 276F 0006 0CB6 1583 MOVE.l 6(sp),Clinel(a3) * copy DO current line -00000F06 2A6F 000A 1584 MOVE.l 10(sp),a5 * save BASIC execute pointer -00000F0A 1585 -00000F0A 41FA FE80 1586 LEA LAB_15C2(pc),a0 * get return address -00000F0E 2E88 1587 MOVE.l a0,(sp) * dump the call to this routine and set the -00000F10 1588 * return address -00000F10 6000 0698 1589 BRA LAB_GBYT * scan memory and return to interpreter inner -00000F14 1590 * loop -00000F14 1591 -00000F14 1592 * clear stack & back to interpreter loop -00000F14 1593 LoopDone -00000F14 4FEF 000E 1594 LEA 14(sp),sp * dump structure and call from stack -00000F18 6014 1595 BRA.s LAB_DATA * go perform DATA (find : or [EOL]) -00000F1A 1596 -00000F1A 1597 -00000F1A 1598 ************************************************************************************* -00000F1A 1599 * -00000F1A 1600 * perform RETURN -00000F1A 1601 -00000F1A 1602 LAB_RETURN -00000F1A 6616 1603 BNE.s RTS_007 * exit if following token to allow syntax error -00000F1C 1604 -00000F1C 0C6F 008D 0004 1605 CMP.w #TK_GOSUB,4(sp) * compare token from stack with GOSUB -00000F22 6600 FA42 1606 BNE LAB_RGER * do RETURN without GOSUB error if no matching -00000F26 1607 * GOSUB -00000F26 1608 -00000F26 5C4F 1609 ADDQ.w #6,sp * dump calling address & token -00000F28 275F 0CB6 1610 MOVE.l (sp)+,Clinel(a3) * pull current line -00000F2C 2A5F 1611 MOVE.l (sp)+,a5 * pull BASIC execute pointer -00000F2E 1612 * now do perform "DATA" statement as we could be -00000F2E 1613 * returning into the middle of an ON GOSUB -00000F2E 1614 * n,m,p,q line (the return address used by the -00000F2E 1615 * DATA statement is the one pushed before the -00000F2E 1616 * GOSUB was executed!) -00000F2E 1617 -00000F2E 1618 -00000F2E 1619 ************************************************************************************* -00000F2E 1620 * -00000F2E 1621 * perform DATA -00000F2E 1622 -00000F2E 1623 LAB_DATA -00000F2E 6104 1624 BSR.s LAB_SNBS * scan for next BASIC statement ([:] or [EOL]) -00000F30 1625 * returns a0 as pointer to [:] or [EOL] -00000F30 2A48 1626 MOVEA.l a0,a5 * skip rest of statement -00000F32 1627 RTS_007 -00000F32 4E75 1628 RTS -00000F34 1629 -00000F34 1630 -00000F34 1631 ************************************************************************************* -00000F34 1632 * -00000F34 1633 * scan for next BASIC statement ([:] or [EOL]) -00000F34 1634 * returns a0 as pointer to [:] or [EOL] -00000F34 1635 -00000F34 1636 LAB_SNBS -00000F34 204D 1637 MOVEA.l a5,a0 * copy BASIC execute pointer -00000F36 7222 1638 MOVEQ #$22,d1 * set string quote character -00000F38 743A 1639 MOVEQ #$3A,d2 * set look for character = ":" -00000F3A 6008 1640 BRA.s LAB_172D * go do search -00000F3C 1641 -00000F3C 1642 LAB_172C -00000F3C B400 1643 CMP.b d0,d2 * compare with ":" -00000F3E 6708 1644 BEQ.s RTS_007a * exit if found -00000F40 1645 -00000F40 B200 1646 CMP.b d0,d1 * compare with '"' -00000F42 670C 1647 BEQ.s LAB_1725 * if found go search for [EOL] -00000F44 1648 -00000F44 1649 LAB_172D -00000F44 1018 1650 MOVE.b (a0)+,d0 * get next byte -00000F46 66F4 1651 BNE.s LAB_172C * loop if not null [EOL] -00000F48 1652 -00000F48 1653 RTS_007a -00000F48 5348 1654 SUBQ.w #1,a0 * correct pointer -00000F4A 4E75 1655 RTS -00000F4C 1656 -00000F4C 1657 LAB_1723 -00000F4C B200 1658 CMP.b d0,d1 * compare with '"' -00000F4E 67F4 1659 BEQ.s LAB_172D * if found go search for ":" or [EOL] -00000F50 1660 -00000F50 1661 LAB_1725 -00000F50 1018 1662 MOVE.b (a0)+,d0 * get next byte -00000F52 66F8 1663 BNE.s LAB_1723 * loop if not null [EOL] -00000F54 1664 -00000F54 60F2 1665 BRA.s RTS_007a * correct pointer & return -00000F56 1666 -00000F56 1667 -00000F56 1668 ************************************************************************************* -00000F56 1669 * -00000F56 1670 * perform IF -00000F56 1671 -00000F56 1672 LAB_IF -00000F56 6100 04F0 1673 BSR LAB_EVEX * evaluate expression -00000F5A 6100 064E 1674 BSR LAB_GBYT * scan memory -00000F5E B03C 00AD 1675 CMP.b #TK_THEN,d0 * compare with THEN token -00000F62 6714 1676 BEQ.s LAB_174B * if it was THEN then continue -00000F64 1677 -00000F64 1678 * wasn't IF .. THEN so must be IF .. GOTO -00000F64 B03C 0089 1679 CMP.b #TK_GOTO,d0 * compare with GOTO token -00000F68 6600 FA00 1680 BNE LAB_SNER * if not GOTO token do syntax error/warm start -00000F6C 1681 -00000F6C 1682 * was GOTO so check for GOTO -00000F6C 204D 1683 MOVE.l a5,a0 * save the execute pointer -00000F6E 6100 0638 1684 BSR LAB_IGBY * scan memory, test for a numeric character -00000F72 2A48 1685 MOVE.l a0,a5 * restore the execute pointer -00000F74 6400 F9F4 1686 BCC LAB_SNER * if not numeric do syntax error/warm start -00000F78 1687 -00000F78 1688 LAB_174B -00000F78 102B 0DF8 1689 MOVE.b FAC1_e(a3),d0 * get FAC1 exponent -00000F7C 671E 1690 BEQ.s LAB_174E * if result was zero go look for an ELSE -00000F7E 1691 -00000F7E 6100 0628 1692 BSR LAB_IGBY * increment & scan memory -00000F82 6500 FF12 1693 BCS LAB_GOTO * if numeric do GOTO n -00000F86 1694 * a GOTO will never return to the IF -00000F86 1695 * statement so there is no need to return -00000F86 1696 * to this code -00000F86 1697 -00000F86 B03C 008E 1698 CMP.b #TK_RETURN,d0 * compare with RETURN token -00000F8A 6700 FE1E 1699 BEQ LAB_1602 * if RETURN then interpret BASIC code from (a5) -00000F8E 1700 * and don't return here -00000F8E 1701 -00000F8E 6100 FE16 1702 BSR LAB_15FF * else interpret BASIC code from (a5) -00000F92 1703 -00000F92 1704 * the IF was executed and there may be a following ELSE so the code needs to return -00000F92 1705 * here to check and ignore the ELSE if present -00000F92 1706 -00000F92 1015 1707 MOVE.b (a5),d0 * get the next basic byte -00000F94 B03C 00A9 1708 CMP.b #TK_ELSE,d0 * compare it with the token for ELSE -00000F98 6794 1709 BEQ LAB_DATA * if ELSE ignore the following statement -00000F9A 1710 -00000F9A 1711 * there was no ELSE so continue execution of IF THEN [: ]. any -00000F9A 1712 * following ELSE will, correctly, cause a syntax error -00000F9A 1713 -00000F9A 4E75 1714 RTS * else return to interpreter inner loop +00000DD2 1359 LAB_1636 +00000DD2 B03C 0003 1360 CMP.b #$03,d0 * compare with CTRL-C +00000DD6 670C 1361 BEQ.s LAB_163B * STOP if was CTRL-C +00000DD8 1362 +00000DD8 1363 LAB_1639 +00000DD8 4E75 1364 RTS * +00000DDA 1365 +00000DDA 1366 +00000DDA 1367 ************************************************************************************* +00000DDA 1368 * +00000DDA 1369 * perform END +00000DDA 1370 +00000DDA 1371 LAB_END +00000DDA 66FC 1372 BNE.s LAB_1639 * exit if something follows STOP +00000DDC 177C 0000 05DC 1373 MOVE.b #0,Breakf(a3) * clear break flag, indicate program end +00000DE2 1374 +00000DE2 1375 +00000DE2 1376 ************************************************************************************* +00000DE2 1377 * +00000DE2 1378 * perform STOP +00000DE2 1379 +00000DE2 1380 LAB_STOP +00000DE2 66F4 1381 BNE.s LAB_1639 * exit if something follows STOP +00000DE4 1382 +00000DE4 1383 LAB_163B +00000DE4 43EB 0590 1384 LEA Ibuffe(a3),a1 * get buffer end +00000DE8 BBC9 1385 CMPA.l a1,a5 * compare execute address with buffer end +00000DEA 650A 1386 BCS.s LAB_164F * branch if BASIC pointer is in buffer +00000DEC 1387 * can't continue in immediate mode +00000DEC 1388 +00000DEC 1389 * else... +00000DEC 274D 045A 1390 MOVE.l a5,Cpntrl(a3) * save BASIC execute pointer as continue pointer +00000DF0 1391 LAB_1647 +00000DF0 276B 0452 0456 1392 MOVE.l Clinel(a3),Blinel(a3) * save break line +00000DF6 1393 LAB_164F +00000DF6 584F 1394 ADDQ.w #4,sp * dump return address, don't return to execute +00000DF8 1395 * loop +00000DF8 102B 05DC 1396 MOVE.b Breakf(a3),d0 * get break flag +00000DFC 6700 FB9C 1397 BEQ LAB_1274 * go do warm start if was program end +00000E00 1398 +00000E00 41FA 2E9F 1399 LEA LAB_BMSG(pc),a0 * point to "Break" +00000E04 6000 FB86 1400 BRA LAB_1269 * print "Break" and do warm start +00000E08 1401 +00000E08 1402 +00000E08 1403 ************************************************************************************* +00000E08 1404 * +00000E08 1405 * perform RESTORE +00000E08 1406 +00000E08 1407 LAB_RESTORE +00000E08 206B 042E 1408 MOVEA.l Smeml(a3),a0 * copy start of memory +00000E0C 6720 1409 BEQ.s LAB_1624 * branch if next character null (RESTORE) +00000E0E 1410 +00000E0E 6100 01F0 1411 BSR LAB_GFPN * get fixed-point number into temp integer & d1 +00000E12 B2AB 0452 1412 CMP.l Clinel(a3),d1 * compare current line # with required line # +00000E16 630E 1413 BLS.s LAB_GSCH * branch if >= (start search from beginning) +00000E18 1414 +00000E18 204D 1415 MOVEA.l a5,a0 * copy BASIC execute pointer +00000E1A 1416 LAB_RESs +00000E1A 4A18 1417 TST.b (a0)+ * test next byte & increment pointer +00000E1C 66FC 1418 BNE.s LAB_RESs * loop if not EOL +00000E1E 1419 +00000E1E 3008 1420 MOVE.w a0,d0 * copy pointer +00000E20 C07C 0001 1421 AND.w #1,d0 * mask odd bit +00000E24 D0C0 1422 ADD.w d0,a0 * add pointer +00000E26 1423 * search for line in Itemp from (a0) +00000E26 1424 LAB_GSCH +00000E26 6100 FDCA 1425 BSR LAB_SCLN * search for d1 line number from a0 +00000E2A 1426 * returns Cb=0 if found +00000E2A 6500 FB26 1427 BCS LAB_USER * go do "Undefined statement" error if not found +00000E2E 1428 +00000E2E 1429 LAB_1624 +00000E2E 4A20 1430 TST.b -(a0) * decrement pointer (faster) +00000E30 2748 0462 1431 MOVE.l a0,Dptrl(a3) * save DATA pointer +00000E34 1432 RTS_006 +00000E34 4E75 1433 RTS +00000E36 1434 +00000E36 1435 +00000E36 1436 ************************************************************************************* +00000E36 1437 * +00000E36 1438 * perform NULL +00000E36 1439 +00000E36 1440 LAB_NULL +00000E36 6100 10DA 1441 BSR LAB_GTBY * get byte parameter, result in d0 and Itemp +00000E3A 1740 05E4 1442 MOVE.b d0,Nullct(a3) * save new NULL count +00000E3E 4E75 1443 RTS +00000E40 1444 +00000E40 1445 +00000E40 1446 ************************************************************************************* +00000E40 1447 * +00000E40 1448 * perform CONT +00000E40 1449 +00000E40 1450 LAB_CONT +00000E40 6600 FB28 1451 BNE LAB_SNER * if following byte exit to do syntax error +00000E44 1452 +00000E44 4A2B 0452 1453 TST.b Clinel(a3) * test current line #, is -ve for immediate mode +00000E48 6A00 FAE8 1454 BPL LAB_CCER * if running go do can't continue error +00000E4C 1455 +00000E4C 202B 045A 1456 MOVE.l Cpntrl(a3),d0 * get continue pointer +00000E50 6700 FAE0 1457 BEQ LAB_CCER * go do can't continue error if we can't +00000E54 1458 +00000E54 1459 * we can continue so ... +00000E54 2A40 1460 MOVEA.l d0,a5 * save continue pointer as BASIC execute pointer +00000E56 276B 0456 0452 1461 MOVE.l Blinel(a3),Clinel(a3) * set break line as current line +00000E5C 4E75 1462 RTS +00000E5E 1463 +00000E5E 1464 +00000E5E 1465 ************************************************************************************* +00000E5E 1466 * +00000E5E 1467 * perform RUN +00000E5E 1468 +00000E5E 1469 LAB_RUN +00000E5E 660C 1470 BNE.s LAB_RUNn * if following byte do RUN n +00000E60 1471 +00000E60 6100 FDB0 1472 BSR LAB_1477 * execution to start, clear vars & flush stack +00000E64 274D 045A 1473 MOVE.l a5,Cpntrl(a3) * save as continue pointer +00000E68 6000 FF22 1474 BRA LAB_15C2 * go do interpreter inner loop +00000E6C 1475 * (can't RTS, we flushed the stack!) +00000E6C 1476 +00000E6C 1477 LAB_RUNn +00000E6C 6100 FDAA 1478 BSR LAB_147A * go do "CLEAR" +00000E70 601C 1479 BRA.s LAB_16B0 * get n and do GOTO n +00000E72 1480 +00000E72 1481 +00000E72 1482 ************************************************************************************* +00000E72 1483 * +00000E72 1484 * perform DO +00000E72 1485 +00000E72 1486 LAB_DO +00000E72 1487 * MOVE.l #$05,d0 * need 5 bytes for DO +00000E72 1488 * BSR.s LAB_1212 * check room on stack for A bytes +00000E72 2F0D 1489 MOVE.l a5,-(sp) * push BASIC execute pointer on stack +00000E74 2F2B 0452 1490 MOVE.l Clinel(a3),-(sp) * push current line on stack +00000E78 3F3C 009C 1491 MOVE.w #TK_DO,-(sp) * push token for DO on stack +00000E7C 487A FF0E 1492 PEA LAB_15C2(pc) * set return address +00000E80 6000 0728 1493 BRA LAB_GBYT * scan memory & return to interpreter inner loop +00000E84 1494 +00000E84 1495 +00000E84 1496 ************************************************************************************* +00000E84 1497 * +00000E84 1498 * perform GOSUB +00000E84 1499 +00000E84 1500 LAB_GOSUB +00000E84 1501 * MOVE.l #10,d0 * need 10 bytes for GOSUB +00000E84 1502 * BSR.s LAB_1212 * check room on stack for d0 bytes +00000E84 2F0D 1503 MOVE.l a5,-(sp) * push BASIC execute pointer +00000E86 2F2B 0452 1504 MOVE.l Clinel(a3),-(sp) * push current line +00000E8A 3F3C 008D 1505 MOVE.w #TK_GOSUB,-(sp) * push token for GOSUB +00000E8E 1506 LAB_16B0 +00000E8E 6100 071A 1507 BSR LAB_GBYT * scan memory +00000E92 487A FEF8 1508 PEA LAB_15C2(pc) * return to interpreter inner loop after GOTO n +00000E96 1509 +00000E96 1510 * this PEA is needed because either we just cleared the stack and have nowhere to return +00000E96 1511 * to or, in the case of GOSUB, we have just dropped a load on the stack and the address +00000E96 1512 * we whould have returned to is buried. This burried return address will be unstacked by +00000E96 1513 * the corresponding RETURN command +00000E96 1514 +00000E96 1515 +00000E96 1516 ************************************************************************************* +00000E96 1517 * +00000E96 1518 * perform GOTO +00000E96 1519 +00000E96 1520 LAB_GOTO +00000E96 6100 0168 1521 BSR LAB_GFPN * get fixed-point number into temp integer & d1 +00000E9A 206B 042E 1522 MOVEA.l Smeml(a3),a0 * get start of memory +00000E9E B2AB 0452 1523 CMP.l Clinel(a3),d1 * compare current line with wanted # +00000EA2 630E 1524 BLS.s LAB_16D0 * branch if current # => wanted # +00000EA4 1525 +00000EA4 204D 1526 MOVEA.l a5,a0 * copy BASIC execute pointer +00000EA6 1527 LAB_GOTs +00000EA6 4A18 1528 TST.b (a0)+ * test next byte & increment pointer +00000EA8 66FC 1529 BNE.s LAB_GOTs * loop if not EOL +00000EAA 1530 +00000EAA 3008 1531 MOVE.w a0,d0 * past pad byte(s) +00000EAC C07C 0001 1532 AND.w #1,d0 * mask odd bit +00000EB0 D0C0 1533 ADD.w d0,a0 * add to pointer +00000EB2 1534 +00000EB2 1535 LAB_16D0 +00000EB2 6100 FD3E 1536 BSR LAB_SCLN * search for d1 line number from a0 +00000EB6 1537 * returns Cb=0 if found +00000EB6 6500 FA9A 1538 BCS LAB_USER * if carry set go do "Undefined statement" error +00000EBA 1539 +00000EBA 2A48 1540 MOVEA.l a0,a5 * copy to basic execute pointer +00000EBC 534D 1541 SUBQ.w #1,a5 * decrement pointer +00000EBE 274D 045A 1542 MOVE.l a5,Cpntrl(a3) * save as continue pointer +00000EC2 4E75 1543 RTS +00000EC4 1544 +00000EC4 1545 +00000EC4 1546 ************************************************************************************* +00000EC4 1547 * +00000EC4 1548 * perform LOOP +00000EC4 1549 +00000EC4 1550 LAB_LOOP +00000EC4 0C6F 009C 0004 1551 CMP.w #TK_DO,4(sp) * compare token on stack with DO token +00000ECA 6600 FA5E 1552 BNE LAB_LDER * branch if no matching DO +00000ECE 1553 +00000ECE 1E00 1554 MOVE.b d0,d7 * copy following token (byte) +00000ED0 672E 1555 BEQ.s LoopAlways * if no following token loop forever +00000ED2 1556 +00000ED2 BE3C 003A 1557 CMP.b #':',d7 * compare with ":" +00000ED6 6728 1558 BEQ.s LoopAlways * if no following token loop forever +00000ED8 1559 +00000ED8 0407 00B0 1560 SUB.b #TK_UNTIL,d7 * subtract token for UNTIL +00000EDC 6708 1561 BEQ.s DoRest * branch if was UNTIL +00000EDE 1562 +00000EDE 5307 1563 SUBQ.b #1,d7 * decrement result +00000EE0 6600 FA88 1564 BNE LAB_SNER * if not WHILE go do syntax error & warm start +00000EE4 1565 * only if the token was WHILE will this fail +00000EE4 1566 +00000EE4 7EFF 1567 MOVEQ #-1,d7 * set invert result longword +00000EE6 1568 DoRest +00000EE6 6100 06C0 1569 BSR LAB_IGBY * increment & scan memory +00000EEA 6100 055C 1570 BSR LAB_EVEX * evaluate expression +00000EEE 4A2B 0594 1571 TST.b FAC1_e(a3) * test FAC1 exponent +00000EF2 6706 1572 BEQ.s DoCmp * if = 0 go do straight compare +00000EF4 1573 +00000EF4 177C 00FF 0594 1574 MOVE.b #$FF,FAC1_e(a3) * else set all bits +00000EFA 1575 DoCmp +00000EFA BF2B 0594 1576 EOR.b d7,FAC1_e(a3) * EOR with invert byte +00000EFE 6614 1577 BNE.s LoopDone * if <> 0 clear stack & back to interpreter loop +00000F00 1578 +00000F00 1579 * loop condition wasn't met so do it again +00000F00 1580 LoopAlways +00000F00 276F 0006 0452 1581 MOVE.l 6(sp),Clinel(a3) * copy DO current line +00000F06 2A6F 000A 1582 MOVE.l 10(sp),a5 * save BASIC execute pointer +00000F0A 1583 +00000F0A 41FA FE80 1584 LEA LAB_15C2(pc),a0 * get return address +00000F0E 2E88 1585 MOVE.l a0,(sp) * dump the call to this routine and set the +00000F10 1586 * return address +00000F10 6000 0698 1587 BRA LAB_GBYT * scan memory and return to interpreter inner +00000F14 1588 * loop +00000F14 1589 +00000F14 1590 * clear stack & back to interpreter loop +00000F14 1591 LoopDone +00000F14 4FEF 000E 1592 LEA 14(sp),sp * dump structure and call from stack +00000F18 6014 1593 BRA.s LAB_DATA * go perform DATA (find : or [EOL]) +00000F1A 1594 +00000F1A 1595 +00000F1A 1596 ************************************************************************************* +00000F1A 1597 * +00000F1A 1598 * perform RETURN +00000F1A 1599 +00000F1A 1600 LAB_RETURN +00000F1A 6616 1601 BNE.s RTS_007 * exit if following token to allow syntax error +00000F1C 1602 +00000F1C 0C6F 008D 0004 1603 CMP.w #TK_GOSUB,4(sp) * compare token from stack with GOSUB +00000F22 6600 FA42 1604 BNE LAB_RGER * do RETURN without GOSUB error if no matching +00000F26 1605 * GOSUB +00000F26 1606 +00000F26 5C4F 1607 ADDQ.w #6,sp * dump calling address & token +00000F28 275F 0452 1608 MOVE.l (sp)+,Clinel(a3) * pull current line +00000F2C 2A5F 1609 MOVE.l (sp)+,a5 * pull BASIC execute pointer +00000F2E 1610 * now do perform "DATA" statement as we could be +00000F2E 1611 * returning into the middle of an ON GOSUB +00000F2E 1612 * n,m,p,q line (the return address used by the +00000F2E 1613 * DATA statement is the one pushed before the +00000F2E 1614 * GOSUB was executed!) +00000F2E 1615 +00000F2E 1616 +00000F2E 1617 ************************************************************************************* +00000F2E 1618 * +00000F2E 1619 * perform DATA +00000F2E 1620 +00000F2E 1621 LAB_DATA +00000F2E 6104 1622 BSR.s LAB_SNBS * scan for next BASIC statement ([:] or [EOL]) +00000F30 1623 * returns a0 as pointer to [:] or [EOL] +00000F30 2A48 1624 MOVEA.l a0,a5 * skip rest of statement +00000F32 1625 RTS_007 +00000F32 4E75 1626 RTS +00000F34 1627 +00000F34 1628 +00000F34 1629 ************************************************************************************* +00000F34 1630 * +00000F34 1631 * scan for next BASIC statement ([:] or [EOL]) +00000F34 1632 * returns a0 as pointer to [:] or [EOL] +00000F34 1633 +00000F34 1634 LAB_SNBS +00000F34 204D 1635 MOVEA.l a5,a0 * copy BASIC execute pointer +00000F36 7222 1636 MOVEQ #$22,d1 * set string quote character +00000F38 743A 1637 MOVEQ #$3A,d2 * set look for character = ":" +00000F3A 6008 1638 BRA.s LAB_172D * go do search +00000F3C 1639 +00000F3C 1640 LAB_172C +00000F3C B400 1641 CMP.b d0,d2 * compare with ":" +00000F3E 6708 1642 BEQ.s RTS_007a * exit if found +00000F40 1643 +00000F40 B200 1644 CMP.b d0,d1 * compare with '"' +00000F42 670C 1645 BEQ.s LAB_1725 * if found go search for [EOL] +00000F44 1646 +00000F44 1647 LAB_172D +00000F44 1018 1648 MOVE.b (a0)+,d0 * get next byte +00000F46 66F4 1649 BNE.s LAB_172C * loop if not null [EOL] +00000F48 1650 +00000F48 1651 RTS_007a +00000F48 5348 1652 SUBQ.w #1,a0 * correct pointer +00000F4A 4E75 1653 RTS +00000F4C 1654 +00000F4C 1655 LAB_1723 +00000F4C B200 1656 CMP.b d0,d1 * compare with '"' +00000F4E 67F4 1657 BEQ.s LAB_172D * if found go search for ":" or [EOL] +00000F50 1658 +00000F50 1659 LAB_1725 +00000F50 1018 1660 MOVE.b (a0)+,d0 * get next byte +00000F52 66F8 1661 BNE.s LAB_1723 * loop if not null [EOL] +00000F54 1662 +00000F54 60F2 1663 BRA.s RTS_007a * correct pointer & return +00000F56 1664 +00000F56 1665 +00000F56 1666 ************************************************************************************* +00000F56 1667 * +00000F56 1668 * perform IF +00000F56 1669 +00000F56 1670 LAB_IF +00000F56 6100 04F0 1671 BSR LAB_EVEX * evaluate expression +00000F5A 6100 064E 1672 BSR LAB_GBYT * scan memory +00000F5E B03C 00AD 1673 CMP.b #TK_THEN,d0 * compare with THEN token +00000F62 6714 1674 BEQ.s LAB_174B * if it was THEN then continue +00000F64 1675 +00000F64 1676 * wasn't IF .. THEN so must be IF .. GOTO +00000F64 B03C 0089 1677 CMP.b #TK_GOTO,d0 * compare with GOTO token +00000F68 6600 FA00 1678 BNE LAB_SNER * if not GOTO token do syntax error/warm start +00000F6C 1679 +00000F6C 1680 * was GOTO so check for GOTO +00000F6C 204D 1681 MOVE.l a5,a0 * save the execute pointer +00000F6E 6100 0638 1682 BSR LAB_IGBY * scan memory, test for a numeric character +00000F72 2A48 1683 MOVE.l a0,a5 * restore the execute pointer +00000F74 6400 F9F4 1684 BCC LAB_SNER * if not numeric do syntax error/warm start +00000F78 1685 +00000F78 1686 LAB_174B +00000F78 102B 0594 1687 MOVE.b FAC1_e(a3),d0 * get FAC1 exponent +00000F7C 671E 1688 BEQ.s LAB_174E * if result was zero go look for an ELSE +00000F7E 1689 +00000F7E 6100 0628 1690 BSR LAB_IGBY * increment & scan memory +00000F82 6500 FF12 1691 BCS LAB_GOTO * if numeric do GOTO n +00000F86 1692 * a GOTO will never return to the IF +00000F86 1693 * statement so there is no need to return +00000F86 1694 * to this code +00000F86 1695 +00000F86 B03C 008E 1696 CMP.b #TK_RETURN,d0 * compare with RETURN token +00000F8A 6700 FE1E 1697 BEQ LAB_1602 * if RETURN then interpret BASIC code from (a5) +00000F8E 1698 * and don't return here +00000F8E 1699 +00000F8E 6100 FE16 1700 BSR LAB_15FF * else interpret BASIC code from (a5) +00000F92 1701 +00000F92 1702 * the IF was executed and there may be a following ELSE so the code needs to return +00000F92 1703 * here to check and ignore the ELSE if present +00000F92 1704 +00000F92 1015 1705 MOVE.b (a5),d0 * get the next basic byte +00000F94 B03C 00A9 1706 CMP.b #TK_ELSE,d0 * compare it with the token for ELSE +00000F98 6794 1707 BEQ LAB_DATA * if ELSE ignore the following statement +00000F9A 1708 +00000F9A 1709 * there was no ELSE so continue execution of IF THEN [: ]. any +00000F9A 1710 * following ELSE will, correctly, cause a syntax error +00000F9A 1711 +00000F9A 4E75 1712 RTS * else return to interpreter inner loop +00000F9C 1713 +00000F9C 1714 * perform ELSE after IF 00000F9C 1715 -00000F9C 1716 * perform ELSE after IF -00000F9C 1717 -00000F9C 1718 LAB_174E -00000F9C 101D 1719 MOVE.b (a5)+,d0 * faster increment past THEN -00000F9E 76A9 1720 MOVEQ #TK_ELSE,d3 * set search for ELSE token -00000FA0 788B 1721 MOVEQ #TK_IF,d4 * set search for IF token -00000FA2 7A00 1722 MOVEQ #0,d5 * clear the nesting depth -00000FA4 1723 LAB_1750 -00000FA4 101D 1724 MOVE.b (a5)+,d0 * get next BASIC byte & increment ptr -00000FA6 6720 1725 BEQ.s LAB_1754 * if EOL correct the pointer and return -00000FA8 1726 -00000FA8 B004 1727 CMP.b d4,d0 * compare with "IF" token -00000FAA 6604 1728 BNE.s LAB_1752 * skip if not nested IF -00000FAC 1729 -00000FAC 5245 1730 ADDQ.w #1,d5 * else increment the nesting depth .. -00000FAE 60F4 1731 BRA.s LAB_1750 * .. and continue looking -00000FB0 1732 -00000FB0 1733 LAB_1752 -00000FB0 B003 1734 CMP.b d3,d0 * compare with ELSE token -00000FB2 66F0 1735 BNE.s LAB_1750 * if not ELSE continue looking -00000FB4 1736 -00000FB4 1737 LAB_1756 -00000FB4 51CD FFEE 1738 DBF d5,LAB_1750 * loop if still nested +00000F9C 1716 LAB_174E +00000F9C 101D 1717 MOVE.b (a5)+,d0 * faster increment past THEN +00000F9E 76A9 1718 MOVEQ #TK_ELSE,d3 * set search for ELSE token +00000FA0 788B 1719 MOVEQ #TK_IF,d4 * set search for IF token +00000FA2 7A00 1720 MOVEQ #0,d5 * clear the nesting depth +00000FA4 1721 LAB_1750 +00000FA4 101D 1722 MOVE.b (a5)+,d0 * get next BASIC byte & increment ptr +00000FA6 6720 1723 BEQ.s LAB_1754 * if EOL correct the pointer and return +00000FA8 1724 +00000FA8 B004 1725 CMP.b d4,d0 * compare with "IF" token +00000FAA 6604 1726 BNE.s LAB_1752 * skip if not nested IF +00000FAC 1727 +00000FAC 5245 1728 ADDQ.w #1,d5 * else increment the nesting depth .. +00000FAE 60F4 1729 BRA.s LAB_1750 * .. and continue looking +00000FB0 1730 +00000FB0 1731 LAB_1752 +00000FB0 B003 1732 CMP.b d3,d0 * compare with ELSE token +00000FB2 66F0 1733 BNE.s LAB_1750 * if not ELSE continue looking +00000FB4 1734 +00000FB4 1735 LAB_1756 +00000FB4 51CD FFEE 1736 DBF d5,LAB_1750 * loop if still nested +00000FB8 1737 +00000FB8 1738 * found the matching ELSE, now do <{n|statement}> 00000FB8 1739 -00000FB8 1740 * found the matching ELSE, now do <{n|statement}> -00000FB8 1741 -00000FB8 6100 05F0 1742 BSR LAB_GBYT * scan memory -00000FBC 6500 FED8 1743 BCS LAB_GOTO * if numeric do GOTO n -00000FC0 1744 * code will return to the interpreter loop -00000FC0 1745 * at the tail end of the GOTO -00000FC0 1746 -00000FC0 6000 FDE4 1747 BRA LAB_15FF * else interpret BASIC code from (a5) -00000FC4 1748 * code will return to the interpreter loop -00000FC4 1749 * at the tail end of the -00000FC4 1750 -00000FC4 1751 -00000FC4 1752 ************************************************************************************* -00000FC4 1753 * -00000FC4 1754 * perform REM, skip (rest of) line -00000FC4 1755 -00000FC4 1756 LAB_REM -00000FC4 4A1D 1757 TST.b (a5)+ * test byte & increment pointer -00000FC6 66FC 1758 BNE.s LAB_REM * loop if not EOL -00000FC8 1759 -00000FC8 1760 LAB_1754 -00000FC8 534D 1761 SUBQ.w #1,a5 * correct the execute pointer -00000FCA 4E75 1762 RTS -00000FCC 1763 -00000FCC 1764 -00000FCC 1765 ************************************************************************************* -00000FCC 1766 * -00000FCC 1767 * perform ON -00000FCC 1768 -00000FCC 1769 LAB_ON -00000FCC 6100 0F44 1770 BSR LAB_GTBY * get byte parameter, result in d0 and Itemp -00000FD0 1400 1771 MOVE.b d0,d2 * copy byte -00000FD2 6100 05D6 1772 BSR LAB_GBYT * restore BASIC byte -00000FD6 3F00 1773 MOVE.w d0,-(sp) * push GOTO/GOSUB token -00000FD8 B03C 008D 1774 CMP.b #TK_GOSUB,d0 * compare with GOSUB token -00000FDC 6708 1775 BEQ.s LAB_176C * branch if GOSUB -00000FDE 1776 -00000FDE B03C 0089 1777 CMP.b #TK_GOTO,d0 * compare with GOTO token -00000FE2 6600 F986 1778 BNE LAB_SNER * if not GOTO do syntax error, then warm start +00000FB8 6100 05F0 1740 BSR LAB_GBYT * scan memory +00000FBC 6500 FED8 1741 BCS LAB_GOTO * if numeric do GOTO n +00000FC0 1742 * code will return to the interpreter loop +00000FC0 1743 * at the tail end of the GOTO +00000FC0 1744 +00000FC0 6000 FDE4 1745 BRA LAB_15FF * else interpret BASIC code from (a5) +00000FC4 1746 * code will return to the interpreter loop +00000FC4 1747 * at the tail end of the +00000FC4 1748 +00000FC4 1749 +00000FC4 1750 ************************************************************************************* +00000FC4 1751 * +00000FC4 1752 * perform REM, skip (rest of) line +00000FC4 1753 +00000FC4 1754 LAB_REM +00000FC4 4A1D 1755 TST.b (a5)+ * test byte & increment pointer +00000FC6 66FC 1756 BNE.s LAB_REM * loop if not EOL +00000FC8 1757 +00000FC8 1758 LAB_1754 +00000FC8 534D 1759 SUBQ.w #1,a5 * correct the execute pointer +00000FCA 4E75 1760 RTS +00000FCC 1761 +00000FCC 1762 +00000FCC 1763 ************************************************************************************* +00000FCC 1764 * +00000FCC 1765 * perform ON +00000FCC 1766 +00000FCC 1767 LAB_ON +00000FCC 6100 0F44 1768 BSR LAB_GTBY * get byte parameter, result in d0 and Itemp +00000FD0 1400 1769 MOVE.b d0,d2 * copy byte +00000FD2 6100 05D6 1770 BSR LAB_GBYT * restore BASIC byte +00000FD6 3F00 1771 MOVE.w d0,-(sp) * push GOTO/GOSUB token +00000FD8 B03C 008D 1772 CMP.b #TK_GOSUB,d0 * compare with GOSUB token +00000FDC 6708 1773 BEQ.s LAB_176C * branch if GOSUB +00000FDE 1774 +00000FDE B03C 0089 1775 CMP.b #TK_GOTO,d0 * compare with GOTO token +00000FE2 6600 F986 1776 BNE LAB_SNER * if not GOTO do syntax error, then warm start +00000FE6 1777 +00000FE6 1778 * next character was GOTO or GOSUB 00000FE6 1779 -00000FE6 1780 * next character was GOTO or GOSUB -00000FE6 1781 -00000FE6 1782 LAB_176C -00000FE6 5302 1783 SUBQ.b #1,d2 * decrement index (byte value) -00000FE8 6606 1784 BNE.s LAB_1773 * branch if not zero -00000FEA 1785 -00000FEA 301F 1786 MOVE.w (sp)+,d0 * pull GOTO/GOSUB token -00000FEC 6000 FDBC 1787 BRA LAB_1602 * go execute it -00000FF0 1788 -00000FF0 1789 LAB_1773 -00000FF0 6100 05B6 1790 BSR LAB_IGBY * increment & scan memory -00000FF4 610A 1791 BSR.s LAB_GFPN * get fixed-point number into temp integer & d1 -00000FF6 1792 * (skip this n) -00000FF6 B03C 002C 1793 CMP.b #$2C,d0 * compare next character with "," -00000FFA 67EA 1794 BEQ.s LAB_176C * loop if "," -00000FFC 1795 -00000FFC 301F 1796 MOVE.w (sp)+,d0 * pull GOTO/GOSUB token (run out of options) -00000FFE 4E75 1797 RTS * and exit -00001000 1798 -00001000 1799 -00001000 1800 ************************************************************************************* -00001000 1801 * -00001000 1802 * get fixed-point number into temp integer & d1 -00001000 1803 * interpret number from (a5), leave (a5) pointing to byte after # -00001000 1804 -00001000 1805 LAB_GFPN -00001000 7200 1806 MOVEQ #$00,d1 * clear integer register -00001002 2001 1807 MOVE.l d1,d0 * clear d0 -00001004 6100 05A4 1808 BSR LAB_GBYT * scan memory, Cb=1 if "0"-"9", & get byte -00001008 642E 1809 BCC.s LAB_1786 * return if carry clear, chr was not "0"-"9" -0000100A 1810 -0000100A 2F02 1811 MOVE.l d2,-(sp) * save d2 -0000100C 1812 LAB_1785 -0000100C 2401 1813 MOVE.l d1,d2 * copy integer register -0000100E D281 1814 ADD.l d1,d1 * *2 -00001010 6500 F958 1815 BCS LAB_SNER * if overflow do syntax error, then warm start -00001014 1816 -00001014 D281 1817 ADD.l d1,d1 * *4 -00001016 6500 F952 1818 BCS LAB_SNER * if overflow do syntax error, then warm start -0000101A 1819 -0000101A D282 1820 ADD.l d2,d1 * *1 + *4 -0000101C 6500 F94C 1821 BCS LAB_SNER * if overflow do syntax error, then warm start -00001020 1822 -00001020 D281 1823 ADD.l d1,d1 * *10 -00001022 6500 F946 1824 BCS LAB_SNER * if overflow do syntax error, then warm start -00001026 1825 -00001026 0400 0030 1826 SUB.b #$30,d0 * subtract $30 from byte -0000102A D280 1827 ADD.l d0,d1 * add to integer register, the top 24 bits are -0000102C 1828 * always clear -0000102C 6900 F93C 1829 BVS LAB_SNER * if overflow do syntax error, then warm start -00001030 1830 * this makes the maximum line number 2147483647 -00001030 6100 0576 1831 BSR LAB_IGBY * increment & scan memory -00001034 65D6 1832 BCS.s LAB_1785 * loop for next character if "0"-"9" -00001036 1833 -00001036 241F 1834 MOVE.l (sp)+,d2 * restore d2 -00001038 1835 LAB_1786 -00001038 2741 0C8E 1836 MOVE.l d1,Itemp(a3) * save Itemp -0000103C 4E75 1837 RTS -0000103E 1838 -0000103E 1839 -0000103E 1840 ************************************************************************************* -0000103E 1841 * -0000103E 1842 * perform DEC -0000103E 1843 -0000103E 1844 LAB_DEC -0000103E 3F3C 8180 1845 MOVE.w #$8180,-(sp) * set -1 sign/exponent -00001042 600A 1846 BRA.s LAB_17B7 * go do DEC -00001044 1847 -00001044 1848 -00001044 1849 ************************************************************************************* -00001044 1850 * -00001044 1851 * perform INC -00001044 1852 -00001044 1853 LAB_INC -00001044 3F3C 8100 1854 MOVE.w #$8100,-(sp) * set 1 sign/exponent -00001048 6004 1855 BRA.s LAB_17B7 * go do INC -0000104A 1856 -0000104A 1857 * was "," so another INCR variable to do -0000104A 1858 LAB_17B8 -0000104A 6100 055C 1859 BSR LAB_IGBY * increment and scan memory -0000104E 1860 LAB_17B7 -0000104E 6100 0768 1861 BSR LAB_GVAR * get variable address in a0 -00001052 1862 -00001052 1863 * if you want a non existant variable to return a null value then set the novar -00001052 1864 * value at the top of this file to some non zero value -00001052 1865 -00001052 FALSE 1866 ifne novar -00001052 1867 endc -00001052 1868 -00001052 4A2B 0E19 1869 TST.b Dtypef(a3) * test data type, $80=string, $40=integer, -00001056 1870 * $00=float -00001056 6B00 F8E6 1871 BMI LAB_TMER * if string do "Type mismatch" error/warm start -0000105A 1872 -0000105A 6636 1873 BNE.s LAB_INCI * go do integer INC/DEC -0000105C 1874 -0000105C 2748 0CD6 1875 MOVE.l a0,Lvarpl(a3) * save var address -00001060 6100 130A 1876 BSR LAB_UFAC * unpack memory (a0) into FAC1 -00001064 277C 80000000 0DFC 1877 MOVE.l #$80000000,FAC2_m(a3) * set FAC2 mantissa for 1 -0000106C 3017 1878 MOVE.w (sp),d0 * move exponent & sign to d0 -0000106E 3740 0E00 1879 MOVE.w d0,FAC2_e(a3) * move exponent & sign to FAC2 -00001072 176B 0DF9 0E02 1880 MOVE.b FAC1_s(a3),FAC_sc(a3) * make sign compare = FAC1 sign -00001078 B12B 0E02 1881 EOR.b d0,FAC_sc(a3) * make sign compare (FAC1_s EOR FAC2_s) -0000107C 6100 100A 1882 BSR LAB_ADD * add FAC2 to FAC1 -00001080 6100 1306 1883 BSR LAB_PFAC * pack FAC1 into variable (Lvarpl) -00001084 1884 LAB_INCT -00001084 6100 0524 1885 BSR LAB_GBYT * scan memory -00001088 0C00 002C 1886 CMPI.b #$2C,d0 * compare with "," -0000108C 67BC 1887 BEQ.s LAB_17B8 * continue if "," (another variable to do) -0000108E 1888 -0000108E 544F 1889 ADDQ.w #2,sp * else dump sign & exponent -00001090 4E75 1890 RTS -00001092 1891 -00001092 1892 LAB_INCI -00001092 4A2F 0001 1893 TST.b 1(sp) * test sign -00001096 6604 1894 BNE.s LAB_DECI * branch if DEC -00001098 1895 -00001098 5290 1896 ADDQ.l #1,(a0) * increment variable -0000109A 60E8 1897 BRA.s LAB_INCT * go scan for more -0000109C 1898 -0000109C 1899 LAB_DECI -0000109C 5390 1900 SUBQ.l #1,(a0) * decrement variable -0000109E 60E4 1901 BRA.s LAB_INCT * go scan for more -000010A0 1902 -000010A0 1903 -000010A0 1904 ************************************************************************************* -000010A0 1905 * -000010A0 1906 * perform LET -000010A0 1907 -000010A0 1908 LAB_LET -000010A0 6100 0712 1909 BSR LAB_SVAR * search for or create a variable -000010A4 1910 * return the variable address in a0 -000010A4 2748 0CD6 1911 MOVE.l a0,Lvarpl(a3) * save variable address -000010A8 1F2B 0E19 1912 MOVE.b Dtypef(a3),-(sp) * push var data type, $80=string, $40=integer, -000010AC 1913 * $00=float -000010AC 70BD 1914 MOVEQ #TK_EQUAL-$100,d0 * get = token -000010AE 6100 04F0 1915 BSR LAB_SCCA * scan for CHR$(d0), else do syntax error/warm -000010B2 1916 * start -000010B2 6100 0394 1917 BSR LAB_EVEX * evaluate expression -000010B6 102B 0E19 1918 MOVE.b Dtypef(a3),d0 * copy expression data type -000010BA 175F 0E19 1919 MOVE.b (sp)+,Dtypef(a3) * pop variable data type -000010BE E318 1920 ROL.b #1,d0 * set carry if expression type = string -000010C0 6100 0372 1921 BSR LAB_CKTM * type match check, set C for string -000010C4 6700 12C2 1922 BEQ LAB_PFAC * if number pack FAC1 into variable Lvarpl & RET +00000FE6 1780 LAB_176C +00000FE6 5302 1781 SUBQ.b #1,d2 * decrement index (byte value) +00000FE8 6606 1782 BNE.s LAB_1773 * branch if not zero +00000FEA 1783 +00000FEA 301F 1784 MOVE.w (sp)+,d0 * pull GOTO/GOSUB token +00000FEC 6000 FDBC 1785 BRA LAB_1602 * go execute it +00000FF0 1786 +00000FF0 1787 LAB_1773 +00000FF0 6100 05B6 1788 BSR LAB_IGBY * increment & scan memory +00000FF4 610A 1789 BSR.s LAB_GFPN * get fixed-point number into temp integer & d1 +00000FF6 1790 * (skip this n) +00000FF6 B03C 002C 1791 CMP.b #$2C,d0 * compare next character with "," +00000FFA 67EA 1792 BEQ.s LAB_176C * loop if "," +00000FFC 1793 +00000FFC 301F 1794 MOVE.w (sp)+,d0 * pull GOTO/GOSUB token (run out of options) +00000FFE 4E75 1795 RTS * and exit +00001000 1796 +00001000 1797 +00001000 1798 ************************************************************************************* +00001000 1799 * +00001000 1800 * get fixed-point number into temp integer & d1 +00001000 1801 * interpret number from (a5), leave (a5) pointing to byte after # +00001000 1802 +00001000 1803 LAB_GFPN +00001000 7200 1804 MOVEQ #$00,d1 * clear integer register +00001002 2001 1805 MOVE.l d1,d0 * clear d0 +00001004 6100 05A4 1806 BSR LAB_GBYT * scan memory, Cb=1 if "0"-"9", & get byte +00001008 642E 1807 BCC.s LAB_1786 * return if carry clear, chr was not "0"-"9" +0000100A 1808 +0000100A 2F02 1809 MOVE.l d2,-(sp) * save d2 +0000100C 1810 LAB_1785 +0000100C 2401 1811 MOVE.l d1,d2 * copy integer register +0000100E D281 1812 ADD.l d1,d1 * *2 +00001010 6500 F958 1813 BCS LAB_SNER * if overflow do syntax error, then warm start +00001014 1814 +00001014 D281 1815 ADD.l d1,d1 * *4 +00001016 6500 F952 1816 BCS LAB_SNER * if overflow do syntax error, then warm start +0000101A 1817 +0000101A D282 1818 ADD.l d2,d1 * *1 + *4 +0000101C 6500 F94C 1819 BCS LAB_SNER * if overflow do syntax error, then warm start +00001020 1820 +00001020 D281 1821 ADD.l d1,d1 * *10 +00001022 6500 F946 1822 BCS LAB_SNER * if overflow do syntax error, then warm start +00001026 1823 +00001026 0400 0030 1824 SUB.b #$30,d0 * subtract $30 from byte +0000102A D280 1825 ADD.l d0,d1 * add to integer register, the top 24 bits are +0000102C 1826 * always clear +0000102C 6900 F93C 1827 BVS LAB_SNER * if overflow do syntax error, then warm start +00001030 1828 * this makes the maximum line number 2147483647 +00001030 6100 0576 1829 BSR LAB_IGBY * increment & scan memory +00001034 65D6 1830 BCS.s LAB_1785 * loop for next character if "0"-"9" +00001036 1831 +00001036 241F 1832 MOVE.l (sp)+,d2 * restore d2 +00001038 1833 LAB_1786 +00001038 2741 042A 1834 MOVE.l d1,Itemp(a3) * save Itemp +0000103C 4E75 1835 RTS +0000103E 1836 +0000103E 1837 +0000103E 1838 ************************************************************************************* +0000103E 1839 * +0000103E 1840 * perform DEC +0000103E 1841 +0000103E 1842 LAB_DEC +0000103E 3F3C 8180 1843 MOVE.w #$8180,-(sp) * set -1 sign/exponent +00001042 600A 1844 BRA.s LAB_17B7 * go do DEC +00001044 1845 +00001044 1846 +00001044 1847 ************************************************************************************* +00001044 1848 * +00001044 1849 * perform INC +00001044 1850 +00001044 1851 LAB_INC +00001044 3F3C 8100 1852 MOVE.w #$8100,-(sp) * set 1 sign/exponent +00001048 6004 1853 BRA.s LAB_17B7 * go do INC +0000104A 1854 +0000104A 1855 * was "," so another INCR variable to do +0000104A 1856 LAB_17B8 +0000104A 6100 055C 1857 BSR LAB_IGBY * increment and scan memory +0000104E 1858 LAB_17B7 +0000104E 6100 0768 1859 BSR LAB_GVAR * get variable address in a0 +00001052 1860 +00001052 1861 * if you want a non existant variable to return a null value then set the novar +00001052 1862 * value at the top of this file to some non zero value +00001052 1863 +00001052 FALSE 1864 ifne novar +00001052 1865 endc +00001052 1866 +00001052 4A2B 05B5 1867 TST.b Dtypef(a3) * test data type, $80=string, $40=integer, +00001056 1868 * $00=float +00001056 6B00 F8E6 1869 BMI LAB_TMER * if string do "Type mismatch" error/warm start +0000105A 1870 +0000105A 6636 1871 BNE.s LAB_INCI * go do integer INC/DEC +0000105C 1872 +0000105C 2748 0472 1873 MOVE.l a0,Lvarpl(a3) * save var address +00001060 6100 130A 1874 BSR LAB_UFAC * unpack memory (a0) into FAC1 +00001064 277C 80000000 0598 1875 MOVE.l #$80000000,FAC2_m(a3) * set FAC2 mantissa for 1 +0000106C 3017 1876 MOVE.w (sp),d0 * move exponent & sign to d0 +0000106E 3740 059C 1877 MOVE.w d0,FAC2_e(a3) * move exponent & sign to FAC2 +00001072 176B 0595 059E 1878 MOVE.b FAC1_s(a3),FAC_sc(a3) * make sign compare = FAC1 sign +00001078 B12B 059E 1879 EOR.b d0,FAC_sc(a3) * make sign compare (FAC1_s EOR FAC2_s) +0000107C 6100 100A 1880 BSR LAB_ADD * add FAC2 to FAC1 +00001080 6100 1306 1881 BSR LAB_PFAC * pack FAC1 into variable (Lvarpl) +00001084 1882 LAB_INCT +00001084 6100 0524 1883 BSR LAB_GBYT * scan memory +00001088 0C00 002C 1884 CMPI.b #$2C,d0 * compare with "," +0000108C 67BC 1885 BEQ.s LAB_17B8 * continue if "," (another variable to do) +0000108E 1886 +0000108E 544F 1887 ADDQ.w #2,sp * else dump sign & exponent +00001090 4E75 1888 RTS +00001092 1889 +00001092 1890 LAB_INCI +00001092 4A2F 0001 1891 TST.b 1(sp) * test sign +00001096 6604 1892 BNE.s LAB_DECI * branch if DEC +00001098 1893 +00001098 5290 1894 ADDQ.l #1,(a0) * increment variable +0000109A 60E8 1895 BRA.s LAB_INCT * go scan for more +0000109C 1896 +0000109C 1897 LAB_DECI +0000109C 5390 1898 SUBQ.l #1,(a0) * decrement variable +0000109E 60E4 1899 BRA.s LAB_INCT * go scan for more +000010A0 1900 +000010A0 1901 +000010A0 1902 ************************************************************************************* +000010A0 1903 * +000010A0 1904 * perform LET +000010A0 1905 +000010A0 1906 LAB_LET +000010A0 6100 0712 1907 BSR LAB_SVAR * search for or create a variable +000010A4 1908 * return the variable address in a0 +000010A4 2748 0472 1909 MOVE.l a0,Lvarpl(a3) * save variable address +000010A8 1F2B 05B5 1910 MOVE.b Dtypef(a3),-(sp) * push var data type, $80=string, $40=integer, +000010AC 1911 * $00=float +000010AC 70BD 1912 MOVEQ #TK_EQUAL-$100,d0 * get = token +000010AE 6100 04F0 1913 BSR LAB_SCCA * scan for CHR$(d0), else do syntax error/warm +000010B2 1914 * start +000010B2 6100 0394 1915 BSR LAB_EVEX * evaluate expression +000010B6 102B 05B5 1916 MOVE.b Dtypef(a3),d0 * copy expression data type +000010BA 175F 05B5 1917 MOVE.b (sp)+,Dtypef(a3) * pop variable data type +000010BE E318 1918 ROL.b #1,d0 * set carry if expression type = string +000010C0 6100 0372 1919 BSR LAB_CKTM * type match check, set C for string +000010C4 6700 12C2 1920 BEQ LAB_PFAC * if number pack FAC1 into variable Lvarpl & RET +000010C8 1921 +000010C8 1922 * string LET 000010C8 1923 -000010C8 1924 * string LET -000010C8 1925 -000010C8 1926 LAB_17D5 -000010C8 246B 0CD6 1927 MOVEA.l Lvarpl(a3),a2 * get pointer to variable -000010CC 1928 LAB_17D6 -000010CC 206B 0DF4 1929 MOVEA.l FAC1_m(a3),a0 * get descriptor pointer -000010D0 2250 1930 MOVEA.l (a0),a1 * get string pointer -000010D2 B3EB 0CAA 1931 CMP.l Sstorl(a3),a1 * compare string memory start with string -000010D6 1932 * pointer -000010D6 6516 1933 BCS.s LAB_1811 * if it was in program memory assign the value -000010D8 1934 * and exit -000010D8 1935 -000010D8 B1EB 0C96 1936 CMPA.l Sfncl(a3),a0 * compare functions start with descriptor -000010DC 1937 * pointer -000010DC 6510 1938 BCS.s LAB_1811 * branch if >= (string is on stack) -000010DE 1939 -000010DE 1940 * string is variable$ make space and copy string -000010DE 1941 LAB_1810 -000010DE 7200 1942 MOVEQ #0,d1 * clear length -000010E0 3228 0004 1943 MOVE.w 4(a0),d1 * get string length -000010E4 2050 1944 MOVEA.l (a0),a0 * get string pointer -000010E6 6100 0B04 1945 BSR LAB_20C9 * copy string -000010EA 206B 0DF4 1946 MOVEA.l FAC1_m(a3),a0 * get descriptor pointer back -000010EE 1947 * clean stack & assign value to string variable -000010EE 1948 LAB_1811 -000010EE B9C8 1949 CMPA.l a0,a4 * is string on the descriptor stack -000010F0 6602 1950 BNE.s LAB_1813 * skip pop if not -000010F2 1951 -000010F2 5C4C 1952 ADDQ.w #$06,a4 * else update stack pointer -000010F4 1953 LAB_1813 -000010F4 24D8 1954 MOVE.l (a0)+,(a2)+ * save pointer to variable -000010F6 3490 1955 MOVE.w (a0),(a2) * save length to variable -000010F8 1956 RTS_008 -000010F8 4E75 1957 RTS -000010FA 1958 -000010FA 1959 -000010FA 1960 ************************************************************************************* -000010FA 1961 * -000010FA 1962 * perform GET -000010FA 1963 -000010FA 1964 LAB_GET -000010FA 6100 06B8 1965 BSR LAB_SVAR * search for or create a variable -000010FE 1966 * return the variable address in a0 -000010FE 2748 0CD6 1967 MOVE.l a0,Lvarpl(a3) * save variable address as GET variable -00001102 4A2B 0E19 1968 TST.b Dtypef(a3) * test data type, $80=string, $40=integer, -00001106 1969 * $00=float -00001106 6B0C 1970 BMI.s LAB_GETS * go get string character -00001108 1971 -00001108 1972 * was numeric get -00001108 6100 1DE4 1973 BSR INGET * get input byte -0000110C 6100 09BA 1974 BSR LAB_1FD0 * convert d0 to unsigned byte in FAC1 -00001110 6000 1276 1975 BRA LAB_PFAC * pack FAC1 into variable (Lvarpl) & return -00001114 1976 -00001114 1977 LAB_GETS -00001114 7200 1978 MOVEQ #$00,d1 * assume no byte -00001116 2041 1979 MOVE.l d1,a0 * assume null string -00001118 6100 1DD4 1980 BSR INGET * get input byte -0000111C 6408 1981 BCC.s LAB_NoSt * branch if no byte received -0000111E 1982 -0000111E 7201 1983 MOVEQ #$01,d1 * string is single byte -00001120 6100 0AFC 1984 BSR LAB_2115 * make string space d1 bytes long -00001124 1985 * return a0 = pointer, other registers unchanged -00001124 1986 -00001124 1080 1987 MOVE.b d0,(a0) * save byte in string (byte IS string!) -00001126 1988 LAB_NoSt -00001126 6100 0ADC 1989 BSR LAB_RTST * push string on descriptor stack -0000112A 1990 * a0 = pointer, d1 = length -0000112A 1991 -0000112A 609C 1992 BRA.s LAB_17D5 * do string LET & return -0000112C 1993 -0000112C 1994 -0000112C 1995 ************************************************************************************* -0000112C 1996 * -0000112C 1997 * PRINT -0000112C 1998 -0000112C 1999 LAB_1829 -0000112C 6100 00B4 2000 BSR LAB_18C6 * print string from stack -00001130 2001 LAB_182C -00001130 6100 0478 2002 BSR LAB_GBYT * scan memory +000010C8 1924 LAB_17D5 +000010C8 246B 0472 1925 MOVEA.l Lvarpl(a3),a2 * get pointer to variable +000010CC 1926 LAB_17D6 +000010CC 206B 0590 1927 MOVEA.l FAC1_m(a3),a0 * get descriptor pointer +000010D0 2250 1928 MOVEA.l (a0),a1 * get string pointer +000010D2 B3EB 0446 1929 CMP.l Sstorl(a3),a1 * compare string memory start with string +000010D6 1930 * pointer +000010D6 6516 1931 BCS.s LAB_1811 * if it was in program memory assign the value +000010D8 1932 * and exit +000010D8 1933 +000010D8 B1EB 0432 1934 CMPA.l Sfncl(a3),a0 * compare functions start with descriptor +000010DC 1935 * pointer +000010DC 6510 1936 BCS.s LAB_1811 * branch if >= (string is on stack) +000010DE 1937 +000010DE 1938 * string is variable$ make space and copy string +000010DE 1939 LAB_1810 +000010DE 7200 1940 MOVEQ #0,d1 * clear length +000010E0 3228 0004 1941 MOVE.w 4(a0),d1 * get string length +000010E4 2050 1942 MOVEA.l (a0),a0 * get string pointer +000010E6 6100 0B04 1943 BSR LAB_20C9 * copy string +000010EA 206B 0590 1944 MOVEA.l FAC1_m(a3),a0 * get descriptor pointer back +000010EE 1945 * clean stack & assign value to string variable +000010EE 1946 LAB_1811 +000010EE B9C8 1947 CMPA.l a0,a4 * is string on the descriptor stack +000010F0 6602 1948 BNE.s LAB_1813 * skip pop if not +000010F2 1949 +000010F2 5C4C 1950 ADDQ.w #$06,a4 * else update stack pointer +000010F4 1951 LAB_1813 +000010F4 24D8 1952 MOVE.l (a0)+,(a2)+ * save pointer to variable +000010F6 3490 1953 MOVE.w (a0),(a2) * save length to variable +000010F8 1954 RTS_008 +000010F8 4E75 1955 RTS +000010FA 1956 +000010FA 1957 +000010FA 1958 ************************************************************************************* +000010FA 1959 * +000010FA 1960 * perform GET +000010FA 1961 +000010FA 1962 LAB_GET +000010FA 6100 06B8 1963 BSR LAB_SVAR * search for or create a variable +000010FE 1964 * return the variable address in a0 +000010FE 2748 0472 1965 MOVE.l a0,Lvarpl(a3) * save variable address as GET variable +00001102 4A2B 05B5 1966 TST.b Dtypef(a3) * test data type, $80=string, $40=integer, +00001106 1967 * $00=float +00001106 6B0C 1968 BMI.s LAB_GETS * go get string character +00001108 1969 +00001108 1970 * was numeric get +00001108 6100 1DE4 1971 BSR INGET * get input byte +0000110C 6100 09BA 1972 BSR LAB_1FD0 * convert d0 to unsigned byte in FAC1 +00001110 6000 1276 1973 BRA LAB_PFAC * pack FAC1 into variable (Lvarpl) & return +00001114 1974 +00001114 1975 LAB_GETS +00001114 7200 1976 MOVEQ #$00,d1 * assume no byte +00001116 2041 1977 MOVE.l d1,a0 * assume null string +00001118 6100 1DD4 1978 BSR INGET * get input byte +0000111C 6408 1979 BCC.s LAB_NoSt * branch if no byte received +0000111E 1980 +0000111E 7201 1981 MOVEQ #$01,d1 * string is single byte +00001120 6100 0AFC 1982 BSR LAB_2115 * make string space d1 bytes long +00001124 1983 * return a0 = pointer, other registers unchanged +00001124 1984 +00001124 1080 1985 MOVE.b d0,(a0) * save byte in string (byte IS string!) +00001126 1986 LAB_NoSt +00001126 6100 0ADC 1987 BSR LAB_RTST * push string on descriptor stack +0000112A 1988 * a0 = pointer, d1 = length +0000112A 1989 +0000112A 609C 1990 BRA.s LAB_17D5 * do string LET & return +0000112C 1991 +0000112C 1992 +0000112C 1993 ************************************************************************************* +0000112C 1994 * +0000112C 1995 * PRINT +0000112C 1996 +0000112C 1997 LAB_1829 +0000112C 6100 00B4 1998 BSR LAB_18C6 * print string from stack +00001130 1999 LAB_182C +00001130 6100 0478 2000 BSR LAB_GBYT * scan memory +00001134 2001 +00001134 2002 * perform PRINT 00001134 2003 -00001134 2004 * perform PRINT -00001134 2005 -00001134 2006 LAB_PRINT -00001134 674A 2007 BEQ.s LAB_CRLF * if nothing following just print CR/LF -00001136 2008 -00001136 2009 LAB_1831 -00001136 B03C 00A8 2010 CMP.b #TK_TAB,d0 * compare with TAB( token -0000113A 6764 2011 BEQ.s LAB_18A2 * go do TAB/SPC -0000113C 2012 -0000113C B03C 00AC 2013 CMP.b #TK_SPC,d0 * compare with SPC( token -00001140 675E 2014 BEQ.s LAB_18A2 * go do TAB/SPC -00001142 2015 -00001142 B03C 002C 2016 CMP.b #',',d0 * compare with "," -00001146 6740 2017 BEQ.s LAB_188B * go do move to next TAB mark -00001148 2018 -00001148 B03C 003B 2019 CMP.b #';',d0 * compare with ";" -0000114C 6700 0086 2020 BEQ LAB_18BD * if ";" continue with PRINT processing -00001150 2021 -00001150 6100 02F6 2022 BSR LAB_EVEX * evaluate expression -00001154 4A2B 0E19 2023 TST.b Dtypef(a3) * test data type, $80=string, $40=integer, -00001158 2024 * $00=float -00001158 6BD2 2025 BMI.s LAB_1829 * branch if string +00001134 2004 LAB_PRINT +00001134 674A 2005 BEQ.s LAB_CRLF * if nothing following just print CR/LF +00001136 2006 +00001136 2007 LAB_1831 +00001136 B03C 00A8 2008 CMP.b #TK_TAB,d0 * compare with TAB( token +0000113A 6764 2009 BEQ.s LAB_18A2 * go do TAB/SPC +0000113C 2010 +0000113C B03C 00AC 2011 CMP.b #TK_SPC,d0 * compare with SPC( token +00001140 675E 2012 BEQ.s LAB_18A2 * go do TAB/SPC +00001142 2013 +00001142 B03C 002C 2014 CMP.b #',',d0 * compare with "," +00001146 6740 2015 BEQ.s LAB_188B * go do move to next TAB mark +00001148 2016 +00001148 B03C 003B 2017 CMP.b #';',d0 * compare with ";" +0000114C 6700 0086 2018 BEQ LAB_18BD * if ";" continue with PRINT processing +00001150 2019 +00001150 6100 02F6 2020 BSR LAB_EVEX * evaluate expression +00001154 4A2B 05B5 2021 TST.b Dtypef(a3) * test data type, $80=string, $40=integer, +00001158 2022 * $00=float +00001158 6BD2 2023 BMI.s LAB_1829 * branch if string +0000115A 2024 +0000115A 2025 ** replace the two lines above with this code 0000115A 2026 -0000115A 2027 ** replace the two lines above with this code -0000115A 2028 -0000115A 2029 ** MOVE.b Dtypef(a3),d0 * get data type flag, $80=string, $00=numeric -0000115A 2030 ** BMI.s LAB_1829 * branch if string -0000115A 2031 -0000115A 6100 13AA 2032 BSR LAB_2970 * convert FAC1 to string -0000115E 6100 0A5E 2033 BSR LAB_20AE * print " terminated string to FAC1 stack +0000115A 2027 ** MOVE.b Dtypef(a3),d0 * get data type flag, $80=string, $00=numeric +0000115A 2028 ** BMI.s LAB_1829 * branch if string +0000115A 2029 +0000115A 6100 13AA 2030 BSR LAB_2970 * convert FAC1 to string +0000115E 6100 0A5E 2031 BSR LAB_20AE * print " terminated string to FAC1 stack +00001162 2032 +00001162 2033 * don't check fit if terminal width byte is zero 00001162 2034 -00001162 2035 * don't check fit if terminal width byte is zero -00001162 2036 -00001162 7000 2037 MOVEQ #0,d0 * clear d0 -00001164 102B 0E4A 2038 MOVE.b TWidth(a3),d0 * get terminal width byte -00001168 670C 2039 BEQ.s LAB_185E * skip check if zero -0000116A 2040 -0000116A 902C 0007 2041 SUB.b 7(a4),d0 * subtract string length -0000116E 902B 0E49 2042 SUB.b TPos(a3),d0 * subtract terminal position -00001172 6402 2043 BCC.s LAB_185E * branch if less than terminal width -00001174 2044 -00001174 610A 2045 BSR.s LAB_CRLF * else print CR/LF -00001176 2046 LAB_185E -00001176 616A 2047 BSR.s LAB_18C6 * print string from stack -00001178 60B6 2048 BRA.s LAB_182C * always go continue processing line -0000117A 2049 -0000117A 2050 -0000117A 2051 ************************************************************************************* -0000117A 2052 * -0000117A 2053 * CR/LF return to BASIC from BASIC input handler -0000117A 2054 * leaves a0 pointing to the buffer start -0000117A 2055 -0000117A 2056 LAB_1866 -0000117A 11BC 0000 1000 2057 MOVE.b #$00,(a0,d1.w) * null terminate input +00001162 7000 2035 MOVEQ #0,d0 * clear d0 +00001164 102B 05E6 2036 MOVE.b TWidth(a3),d0 * get terminal width byte +00001168 670C 2037 BEQ.s LAB_185E * skip check if zero +0000116A 2038 +0000116A 902C 0007 2039 SUB.b 7(a4),d0 * subtract string length +0000116E 902B 05E5 2040 SUB.b TPos(a3),d0 * subtract terminal position +00001172 6402 2041 BCC.s LAB_185E * branch if less than terminal width +00001174 2042 +00001174 610A 2043 BSR.s LAB_CRLF * else print CR/LF +00001176 2044 LAB_185E +00001176 616A 2045 BSR.s LAB_18C6 * print string from stack +00001178 60B6 2046 BRA.s LAB_182C * always go continue processing line +0000117A 2047 +0000117A 2048 +0000117A 2049 ************************************************************************************* +0000117A 2050 * +0000117A 2051 * CR/LF return to BASIC from BASIC input handler +0000117A 2052 * leaves a0 pointing to the buffer start +0000117A 2053 +0000117A 2054 LAB_1866 +0000117A 11BC 0000 1000 2055 MOVE.b #$00,(a0,d1.w) * null terminate input +00001180 2056 +00001180 2057 * print CR/LF 00001180 2058 -00001180 2059 * print CR/LF -00001180 2060 -00001180 2061 LAB_CRLF -00001180 700D 2062 MOVEQ #$0D,d0 * load [CR] -00001182 6174 2063 BSR.s LAB_PRNA * go print the character -00001184 700A 2064 MOVEQ #$0A,d0 * load [LF] -00001186 6070 2065 BRA.s LAB_PRNA * go print the character & return -00001188 2066 -00001188 2067 LAB_188B -00001188 142B 0E49 2068 MOVE.b TPos(a3),d2 * get terminal position -0000118C B42B 0E4B 2069 CMP.b Iclim(a3),d2 * compare with input column limit -00001190 6504 2070 BCS.s LAB_1898 * branch if less than Iclim -00001192 2071 -00001192 61EC 2072 BSR.s LAB_CRLF * else print CR/LF (next line) -00001194 603E 2073 BRA.s LAB_18BD * continue with PRINT processing -00001196 2074 -00001196 2075 LAB_1898 -00001196 942B 0E46 2076 SUB.b TabSiz(a3),d2 * subtract TAB size -0000119A 64FA 2077 BCC.s LAB_1898 * loop if result was >= 0 -0000119C 2078 -0000119C 4402 2079 NEG.b d2 * twos complement it -0000119E 6022 2080 BRA.s LAB_18B7 * print d2 spaces -000011A0 2081 -000011A0 2082 * do TAB/SPC -000011A0 2083 LAB_18A2 -000011A0 3F00 2084 MOVE.w d0,-(sp) * save token -000011A2 6100 0D6A 2085 BSR LAB_SGBY * increment and get byte, result in d0 and Itemp -000011A6 3400 2086 MOVE.w d0,d2 * copy byte -000011A8 6100 0400 2087 BSR LAB_GBYT * get basic byte back -000011AC B03C 0029 2088 CMP.b #$29,d0 * is next character ")" -000011B0 6600 F7B8 2089 BNE LAB_SNER * if not do syntax error, then warm start -000011B4 2090 -000011B4 301F 2091 MOVE.w (sp)+,d0 * get token back -000011B6 B03C 00A8 2092 CMP.b #TK_TAB,d0 * was it TAB ? -000011BA 6606 2093 BNE.s LAB_18B7 * branch if not (was SPC) -000011BC 2094 -000011BC 2095 * calculate TAB offset -000011BC 942B 0E49 2096 SUB.b TPos(a3),d2 * subtract terminal position -000011C0 6312 2097 BLS.s LAB_18BD * branch if result was <= 0 -000011C2 2098 * can't TAB backwards or already there -000011C2 2099 -000011C2 2100 * print d2.b spaces -000011C2 2101 LAB_18B7 -000011C2 7000 2102 MOVEQ #0,d0 * clear longword -000011C4 5300 2103 SUBQ.b #1,d0 * make d0 = $FF -000011C6 C480 2104 AND.l d0,d2 * mask for byte only -000011C8 670A 2105 BEQ.s LAB_18BD * branch if zero -000011CA 2106 -000011CA 7020 2107 MOVEQ #$20,d0 * load " " -000011CC 5302 2108 SUBQ.b #1,d2 * adjust for DBF loop -000011CE 2109 LAB_18B8 -000011CE 6128 2110 BSR.s LAB_PRNA * go print -000011D0 51CA FFFC 2111 DBF d2,LAB_18B8 * decrement count and loop if not all done -000011D4 2112 -000011D4 2113 * continue with PRINT processing -000011D4 2114 LAB_18BD -000011D4 6100 03D2 2115 BSR LAB_IGBY * increment & scan memory -000011D8 6600 FF5C 2116 BNE LAB_1831 * if byte continue executing PRINT -000011DC 2117 -000011DC 4E75 2118 RTS * exit if nothing more to print -000011DE 2119 -000011DE 2120 -000011DE 2121 ************************************************************************************* -000011DE 2122 * -000011DE 2123 * print null terminated string from a0 -000011DE 2124 -000011DE 2125 LAB_18C3 -000011DE 6100 09DE 2126 BSR LAB_20AE * print terminated string to FAC1/stack +00001180 2059 LAB_CRLF +00001180 700D 2060 MOVEQ #$0D,d0 * load [CR] +00001182 6174 2061 BSR.s LAB_PRNA * go print the character +00001184 700A 2062 MOVEQ #$0A,d0 * load [LF] +00001186 6070 2063 BRA.s LAB_PRNA * go print the character & return +00001188 2064 +00001188 2065 LAB_188B +00001188 142B 05E5 2066 MOVE.b TPos(a3),d2 * get terminal position +0000118C B42B 05E7 2067 CMP.b Iclim(a3),d2 * compare with input column limit +00001190 6504 2068 BCS.s LAB_1898 * branch if less than Iclim +00001192 2069 +00001192 61EC 2070 BSR.s LAB_CRLF * else print CR/LF (next line) +00001194 603E 2071 BRA.s LAB_18BD * continue with PRINT processing +00001196 2072 +00001196 2073 LAB_1898 +00001196 942B 05E2 2074 SUB.b TabSiz(a3),d2 * subtract TAB size +0000119A 64FA 2075 BCC.s LAB_1898 * loop if result was >= 0 +0000119C 2076 +0000119C 4402 2077 NEG.b d2 * twos complement it +0000119E 6022 2078 BRA.s LAB_18B7 * print d2 spaces +000011A0 2079 +000011A0 2080 * do TAB/SPC +000011A0 2081 LAB_18A2 +000011A0 3F00 2082 MOVE.w d0,-(sp) * save token +000011A2 6100 0D6A 2083 BSR LAB_SGBY * increment and get byte, result in d0 and Itemp +000011A6 3400 2084 MOVE.w d0,d2 * copy byte +000011A8 6100 0400 2085 BSR LAB_GBYT * get basic byte back +000011AC B03C 0029 2086 CMP.b #$29,d0 * is next character ")" +000011B0 6600 F7B8 2087 BNE LAB_SNER * if not do syntax error, then warm start +000011B4 2088 +000011B4 301F 2089 MOVE.w (sp)+,d0 * get token back +000011B6 B03C 00A8 2090 CMP.b #TK_TAB,d0 * was it TAB ? +000011BA 6606 2091 BNE.s LAB_18B7 * branch if not (was SPC) +000011BC 2092 +000011BC 2093 * calculate TAB offset +000011BC 942B 05E5 2094 SUB.b TPos(a3),d2 * subtract terminal position +000011C0 6312 2095 BLS.s LAB_18BD * branch if result was <= 0 +000011C2 2096 * can't TAB backwards or already there +000011C2 2097 +000011C2 2098 * print d2.b spaces +000011C2 2099 LAB_18B7 +000011C2 7000 2100 MOVEQ #0,d0 * clear longword +000011C4 5300 2101 SUBQ.b #1,d0 * make d0 = $FF +000011C6 C480 2102 AND.l d0,d2 * mask for byte only +000011C8 670A 2103 BEQ.s LAB_18BD * branch if zero +000011CA 2104 +000011CA 7020 2105 MOVEQ #$20,d0 * load " " +000011CC 5302 2106 SUBQ.b #1,d2 * adjust for DBF loop +000011CE 2107 LAB_18B8 +000011CE 6128 2108 BSR.s LAB_PRNA * go print +000011D0 51CA FFFC 2109 DBF d2,LAB_18B8 * decrement count and loop if not all done +000011D4 2110 +000011D4 2111 * continue with PRINT processing +000011D4 2112 LAB_18BD +000011D4 6100 03D2 2113 BSR LAB_IGBY * increment & scan memory +000011D8 6600 FF5C 2114 BNE LAB_1831 * if byte continue executing PRINT +000011DC 2115 +000011DC 4E75 2116 RTS * exit if nothing more to print +000011DE 2117 +000011DE 2118 +000011DE 2119 ************************************************************************************* +000011DE 2120 * +000011DE 2121 * print null terminated string from a0 +000011DE 2122 +000011DE 2123 LAB_18C3 +000011DE 6100 09DE 2124 BSR LAB_20AE * print terminated string to FAC1/stack +000011E2 2125 +000011E2 2126 * print string from stack 000011E2 2127 -000011E2 2128 * print string from stack -000011E2 2129 -000011E2 2130 LAB_18C6 -000011E2 6100 0BCE 2131 BSR LAB_22B6 * pop string off descriptor stack or from memory -000011E6 2132 * returns with d0 = length, a0 = pointer -000011E6 670C 2133 BEQ.s RTS_009 * exit (RTS) if null string -000011E8 2134 -000011E8 3200 2135 MOVE.w d0,d1 * copy length & set Z flag -000011EA 5341 2136 SUBQ.w #1,d1 * -1 for BF loop -000011EC 2137 LAB_18CD -000011EC 1018 2138 MOVE.b (a0)+,d0 * get byte from string -000011EE 6108 2139 BSR.s LAB_PRNA * go print the character -000011F0 51C9 FFFA 2140 DBF d1,LAB_18CD * decrement count and loop if not done yet -000011F4 2141 -000011F4 2142 RTS_009 -000011F4 4E75 2143 RTS -000011F6 2144 -000011F6 2145 -000011F6 2146 ************************************************************************************* -000011F6 2147 * -000011F6 2148 * print "?" character -000011F6 2149 -000011F6 2150 LAB_18E3 -000011F6 703F 2151 MOVEQ #$3F,d0 * load "?" character -000011F8 2152 -000011F8 2153 -000011F8 2154 ************************************************************************************* -000011F8 2155 * -000011F8 2156 * print character in d0, includes the null handler and infinite line length code -000011F8 2157 * changes no registers -000011F8 2158 -000011F8 2159 LAB_PRNA -000011F8 2F01 2160 MOVE.l d1,-(sp) * save d1 -000011FA B03C 0020 2161 CMP.b #$20,d0 * compare with " " -000011FE 6528 2162 BCS.s LAB_18F9 * branch if less, non printing character -00001200 2163 -00001200 2164 * don't check fit if terminal width byte is zero -00001200 122B 0E4A 2165 MOVE.b TWidth(a3),d1 * get terminal width -00001204 6610 2166 BNE.s LAB_18F0 * branch if not zero (not infinite length) -00001206 2167 -00001206 2168 * is "infinite line" so check TAB position -00001206 122B 0E49 2169 MOVE.b TPos(a3),d1 * get position -0000120A 922B 0E46 2170 SUB.b TabSiz(a3),d1 * subtract TAB size -0000120E 6614 2171 BNE.s LAB_18F7 * skip reset if different -00001210 2172 -00001210 1741 0E49 2173 MOVE.b d1,TPos(a3) * else reset position -00001214 600E 2174 BRA.s LAB_18F7 * go print character -00001216 2175 -00001216 2176 LAB_18F0 -00001216 B22B 0E49 2177 CMP.b TPos(a3),d1 * compare with terminal character position -0000121A 6608 2178 BNE.s LAB_18F7 * branch if not at end of line -0000121C 2179 -0000121C 2F00 2180 MOVE.l d0,-(sp) * save d0 -0000121E 6100 FF60 2181 BSR LAB_CRLF * else print CR/LF -00001222 201F 2182 MOVE.l (sp)+,d0 * restore d0 -00001224 2183 LAB_18F7 -00001224 522B 0E49 2184 ADDQ.b #$01,TPos(a3) * increment terminal position -00001228 2185 LAB_18F9 -00001228 4EAB 0C76 2186 JSR V_OUTP(a3) * output byte via output vector -0000122C B03C 000D 2187 CMP.b #$0D,d0 * compare with [CR] -00001230 6618 2188 BNE.s LAB_188A * branch if not [CR] -00001232 2189 -00001232 2190 * else print nullct nulls after the [CR] -00001232 7200 2191 MOVEQ #$00,d1 * clear d1 -00001234 122B 0E48 2192 MOVE.b Nullct(a3),d1 * get null count -00001238 670C 2193 BEQ.s LAB_1886 * branch if no nulls -0000123A 2194 -0000123A 7000 2195 MOVEQ #$00,d0 * load [NULL] -0000123C 2196 LAB_1880 -0000123C 4EAB 0C76 2197 JSR V_OUTP(a3) * go print the character -00001240 51C9 FFFA 2198 DBF d1,LAB_1880 * decrement count and loop if not all done -00001244 2199 -00001244 700D 2200 MOVEQ #$0D,d0 * restore the character -00001246 2201 LAB_1886 -00001246 1741 0E49 2202 MOVE.b d1,TPos(a3) * clear terminal position -0000124A 2203 LAB_188A -0000124A 221F 2204 MOVE.l (sp)+,d1 * restore d1 -0000124C 4E75 2205 RTS -0000124E 2206 -0000124E 2207 -0000124E 2208 ************************************************************************************* -0000124E 2209 * -0000124E 2210 * handle bad input data -0000124E 2211 -0000124E 2212 LAB_1904 -0000124E 2A5F 2213 MOVEA.l (sp)+,a5 * restore execute pointer -00001250 4A2B 0E44 2214 TST.b Imode(a3) * test input mode flag, $00=INPUT, $98=READ -00001254 6A0A 2215 BPL.s LAB_1913 * branch if INPUT (go do redo) -00001256 2216 -00001256 276B 0CC2 0CB6 2217 MOVE.l Dlinel(a3),Clinel(a3) * save DATA line as current line -0000125C 6000 F6E0 2218 BRA LAB_TMER * do type mismatch error, then warm start -00001260 2219 -00001260 2220 * mode was INPUT -00001260 2221 LAB_1913 -00001260 41FA 2A68 2222 LEA LAB_REDO(pc),a0 * point to redo message -00001264 6100 FF78 2223 BSR LAB_18C3 * print null terminated string from memory -00001268 2A6B 0CBE 2224 MOVEA.l Cpntrl(a3),a5 * save continue pointer as BASIC execute pointer -0000126C 4E75 2225 RTS -0000126E 2226 -0000126E 2227 -0000126E 2228 ************************************************************************************* -0000126E 2229 * -0000126E 2230 * perform INPUT -0000126E 2231 -0000126E 2232 LAB_INPUT -0000126E 6100 0860 2233 BSR LAB_CKRN * check not direct (back here if ok) -00001272 B03C 0022 2234 CMP.b #'"',d0 * compare the next byte with open quote -00001276 660E 2235 BNE.s LAB_1934 * if no prompt string just go get the input -00001278 2236 -00001278 6100 0306 2237 BSR LAB_1BC1 * print "..." string -0000127C 703B 2238 MOVEQ #';',d0 * set the search character to ";" -0000127E 6100 0320 2239 BSR LAB_SCCA * scan for CHR$(d0), else do syntax error/warm -00001282 2240 * start -00001282 6100 FF5E 2241 BSR LAB_18C6 * print string from Sutill/Sutilh -00001286 2242 * finished the prompt, now read the data -00001286 2243 LAB_1934 -00001286 6100 F80C 2244 BSR LAB_INLN * print "? " and get BASIC input -0000128A 2245 * return a0 pointing to the buffer start -0000128A 7000 2246 MOVEQ #0,d0 * flag INPUT -0000128C 2247 -0000128C 2248 * if you don't want a null response to INPUT to break the program then set the nobrk -0000128C 2249 * value at the top of this file to some non zero value -0000128C 2250 -0000128C FALSE 2251 ifne nobrk -0000128C 2252 endc -0000128C 2253 -0000128C 2254 * if you do want a null response to INPUT to break the program then leave the nobrk -0000128C 2255 * value at the top of this file set to zero +000011E2 2128 LAB_18C6 +000011E2 6100 0BCE 2129 BSR LAB_22B6 * pop string off descriptor stack or from memory +000011E6 2130 * returns with d0 = length, a0 = pointer +000011E6 670C 2131 BEQ.s RTS_009 * exit (RTS) if null string +000011E8 2132 +000011E8 3200 2133 MOVE.w d0,d1 * copy length & set Z flag +000011EA 5341 2134 SUBQ.w #1,d1 * -1 for BF loop +000011EC 2135 LAB_18CD +000011EC 1018 2136 MOVE.b (a0)+,d0 * get byte from string +000011EE 6108 2137 BSR.s LAB_PRNA * go print the character +000011F0 51C9 FFFA 2138 DBF d1,LAB_18CD * decrement count and loop if not done yet +000011F4 2139 +000011F4 2140 RTS_009 +000011F4 4E75 2141 RTS +000011F6 2142 +000011F6 2143 +000011F6 2144 ************************************************************************************* +000011F6 2145 * +000011F6 2146 * print "?" character +000011F6 2147 +000011F6 2148 LAB_18E3 +000011F6 703F 2149 MOVEQ #$3F,d0 * load "?" character +000011F8 2150 +000011F8 2151 +000011F8 2152 ************************************************************************************* +000011F8 2153 * +000011F8 2154 * print character in d0, includes the null handler and infinite line length code +000011F8 2155 * changes no registers +000011F8 2156 +000011F8 2157 LAB_PRNA +000011F8 2F01 2158 MOVE.l d1,-(sp) * save d1 +000011FA B03C 0020 2159 CMP.b #$20,d0 * compare with " " +000011FE 6528 2160 BCS.s LAB_18F9 * branch if less, non printing character +00001200 2161 +00001200 2162 * don't check fit if terminal width byte is zero +00001200 122B 05E6 2163 MOVE.b TWidth(a3),d1 * get terminal width +00001204 6610 2164 BNE.s LAB_18F0 * branch if not zero (not infinite length) +00001206 2165 +00001206 2166 * is "infinite line" so check TAB position +00001206 122B 05E5 2167 MOVE.b TPos(a3),d1 * get position +0000120A 922B 05E2 2168 SUB.b TabSiz(a3),d1 * subtract TAB size +0000120E 6614 2169 BNE.s LAB_18F7 * skip reset if different +00001210 2170 +00001210 1741 05E5 2171 MOVE.b d1,TPos(a3) * else reset position +00001214 600E 2172 BRA.s LAB_18F7 * go print character +00001216 2173 +00001216 2174 LAB_18F0 +00001216 B22B 05E5 2175 CMP.b TPos(a3),d1 * compare with terminal character position +0000121A 6608 2176 BNE.s LAB_18F7 * branch if not at end of line +0000121C 2177 +0000121C 2F00 2178 MOVE.l d0,-(sp) * save d0 +0000121E 6100 FF60 2179 BSR LAB_CRLF * else print CR/LF +00001222 201F 2180 MOVE.l (sp)+,d0 * restore d0 +00001224 2181 LAB_18F7 +00001224 522B 05E5 2182 ADDQ.b #$01,TPos(a3) * increment terminal position +00001228 2183 LAB_18F9 +00001228 4EAB 0412 2184 JSR V_OUTP(a3) * output byte via output vector +0000122C B03C 000D 2185 CMP.b #$0D,d0 * compare with [CR] +00001230 6618 2186 BNE.s LAB_188A * branch if not [CR] +00001232 2187 +00001232 2188 * else print nullct nulls after the [CR] +00001232 7200 2189 MOVEQ #$00,d1 * clear d1 +00001234 122B 05E4 2190 MOVE.b Nullct(a3),d1 * get null count +00001238 670C 2191 BEQ.s LAB_1886 * branch if no nulls +0000123A 2192 +0000123A 7000 2193 MOVEQ #$00,d0 * load [NULL] +0000123C 2194 LAB_1880 +0000123C 4EAB 0412 2195 JSR V_OUTP(a3) * go print the character +00001240 51C9 FFFA 2196 DBF d1,LAB_1880 * decrement count and loop if not all done +00001244 2197 +00001244 700D 2198 MOVEQ #$0D,d0 * restore the character +00001246 2199 LAB_1886 +00001246 1741 05E5 2200 MOVE.b d1,TPos(a3) * clear terminal position +0000124A 2201 LAB_188A +0000124A 221F 2202 MOVE.l (sp)+,d1 * restore d1 +0000124C 4E75 2203 RTS +0000124E 2204 +0000124E 2205 +0000124E 2206 ************************************************************************************* +0000124E 2207 * +0000124E 2208 * handle bad input data +0000124E 2209 +0000124E 2210 LAB_1904 +0000124E 2A5F 2211 MOVEA.l (sp)+,a5 * restore execute pointer +00001250 4A2B 05E0 2212 TST.b Imode(a3) * test input mode flag, $00=INPUT, $98=READ +00001254 6A0A 2213 BPL.s LAB_1913 * branch if INPUT (go do redo) +00001256 2214 +00001256 276B 045E 0452 2215 MOVE.l Dlinel(a3),Clinel(a3) * save DATA line as current line +0000125C 6000 F6E0 2216 BRA LAB_TMER * do type mismatch error, then warm start +00001260 2217 +00001260 2218 * mode was INPUT +00001260 2219 LAB_1913 +00001260 41FA 2A68 2220 LEA LAB_REDO(pc),a0 * point to redo message +00001264 6100 FF78 2221 BSR LAB_18C3 * print null terminated string from memory +00001268 2A6B 045A 2222 MOVEA.l Cpntrl(a3),a5 * save continue pointer as BASIC execute pointer +0000126C 4E75 2223 RTS +0000126E 2224 +0000126E 2225 +0000126E 2226 ************************************************************************************* +0000126E 2227 * +0000126E 2228 * perform INPUT +0000126E 2229 +0000126E 2230 LAB_INPUT +0000126E 6100 0860 2231 BSR LAB_CKRN * check not direct (back here if ok) +00001272 B03C 0022 2232 CMP.b #'"',d0 * compare the next byte with open quote +00001276 660E 2233 BNE.s LAB_1934 * if no prompt string just go get the input +00001278 2234 +00001278 6100 0306 2235 BSR LAB_1BC1 * print "..." string +0000127C 703B 2236 MOVEQ #';',d0 * set the search character to ";" +0000127E 6100 0320 2237 BSR LAB_SCCA * scan for CHR$(d0), else do syntax error/warm +00001282 2238 * start +00001282 6100 FF5E 2239 BSR LAB_18C6 * print string from Sutill/Sutilh +00001286 2240 * finished the prompt, now read the data +00001286 2241 LAB_1934 +00001286 6100 F80C 2242 BSR LAB_INLN * print "? " and get BASIC input +0000128A 2243 * return a0 pointing to the buffer start +0000128A 7000 2244 MOVEQ #0,d0 * flag INPUT +0000128C 2245 +0000128C 2246 * if you don't want a null response to INPUT to break the program then set the nobrk +0000128C 2247 * value at the top of this file to some non zero value +0000128C 2248 +0000128C FALSE 2249 ifne nobrk +0000128C 2250 endc +0000128C 2251 +0000128C 2252 * if you do want a null response to INPUT to break the program then leave the nobrk +0000128C 2253 * value at the top of this file set to zero +0000128C 2254 +0000128C TRUE 2255 ifeq nobrk 0000128C 2256 -0000128C TRUE 2257 ifeq nobrk -0000128C 2258 -0000128C 4A10 2259 TST.b (a0) * test first byte from buffer -0000128E 660A 2260 BNE.s LAB_1953 * branch if not null input -00001290 2261 -00001290 6000 FB5E 2262 BRA LAB_1647 * go do BREAK exit +0000128C 4A10 2257 TST.b (a0) * test first byte from buffer +0000128E 660A 2258 BNE.s LAB_1953 * branch if not null input +00001290 2259 +00001290 6000 FB5E 2260 BRA LAB_1647 * go do BREAK exit +00001294 2261 +00001294 2262 endc 00001294 2263 -00001294 2264 endc -00001294 2265 -00001294 2266 -00001294 2267 ************************************************************************************* -00001294 2268 * -00001294 2269 * perform READ -00001294 2270 -00001294 2271 LAB_READ -00001294 206B 0CC6 2272 MOVEA.l Dptrl(a3),a0 * get the DATA pointer -00001298 7098 2273 MOVEQ #$98-$100,d0 * flag READ -0000129A 2274 LAB_1953 -0000129A 1740 0E44 2275 MOVE.b d0,Imode(a3) * set input mode flag, $00=INPUT, $98=READ -0000129E 2748 0CCA 2276 MOVE.l a0,Rdptrl(a3) * save READ pointer -000012A2 2277 -000012A2 2278 * READ or INPUT the next variable from list -000012A2 2279 LAB_195B -000012A2 6100 0510 2280 BSR LAB_SVAR * search for or create a variable -000012A6 2281 * return the variable address in a0 -000012A6 2748 0CD6 2282 MOVE.l a0,Lvarpl(a3) * save variable address as LET variable -000012AA 2F0D 2283 MOVE.l a5,-(sp) * save BASIC execute pointer -000012AC 2284 LAB_1961 -000012AC 2A6B 0CCA 2285 MOVEA.l Rdptrl(a3),a5 * set READ pointer as BASIC execute pointer -000012B0 6100 02F8 2286 BSR LAB_GBYT * scan memory -000012B4 661E 2287 BNE.s LAB_1986 * if not null go get the value -000012B6 2288 -000012B6 2289 * the pointer was to a null entry -000012B6 4A2B 0E44 2290 TST.b Imode(a3) * test input mode flag, $00=INPUT, $98=READ -000012BA 6B72 2291 BMI.s LAB_19DD * branch if READ (go find the next statement) -000012BC 2292 -000012BC 2293 * else the mode was INPUT so get more -000012BC 6100 FF38 2294 BSR LAB_18E3 * print a "?" character -000012C0 6100 F7D2 2295 BSR LAB_INLN * print "? " and get BASIC input -000012C4 2296 * return a0 pointing to the buffer start -000012C4 2297 -000012C4 2298 * if you don't want a null response to INPUT to break the program then set the nobrk -000012C4 2299 * value at the top of this file to some non zero value -000012C4 2300 -000012C4 FALSE 2301 ifne nobrk -000012C4 2302 endc -000012C4 2303 -000012C4 2304 * if you do want a null response to INPUT to break the program then leave the nobrk -000012C4 2305 * value at the top of this file set to zero +00001294 2264 +00001294 2265 ************************************************************************************* +00001294 2266 * +00001294 2267 * perform READ +00001294 2268 +00001294 2269 LAB_READ +00001294 206B 0462 2270 MOVEA.l Dptrl(a3),a0 * get the DATA pointer +00001298 7098 2271 MOVEQ #$98-$100,d0 * flag READ +0000129A 2272 LAB_1953 +0000129A 1740 05E0 2273 MOVE.b d0,Imode(a3) * set input mode flag, $00=INPUT, $98=READ +0000129E 2748 0466 2274 MOVE.l a0,Rdptrl(a3) * save READ pointer +000012A2 2275 +000012A2 2276 * READ or INPUT the next variable from list +000012A2 2277 LAB_195B +000012A2 6100 0510 2278 BSR LAB_SVAR * search for or create a variable +000012A6 2279 * return the variable address in a0 +000012A6 2748 0472 2280 MOVE.l a0,Lvarpl(a3) * save variable address as LET variable +000012AA 2F0D 2281 MOVE.l a5,-(sp) * save BASIC execute pointer +000012AC 2282 LAB_1961 +000012AC 2A6B 0466 2283 MOVEA.l Rdptrl(a3),a5 * set READ pointer as BASIC execute pointer +000012B0 6100 02F8 2284 BSR LAB_GBYT * scan memory +000012B4 661E 2285 BNE.s LAB_1986 * if not null go get the value +000012B6 2286 +000012B6 2287 * the pointer was to a null entry +000012B6 4A2B 05E0 2288 TST.b Imode(a3) * test input mode flag, $00=INPUT, $98=READ +000012BA 6B72 2289 BMI.s LAB_19DD * branch if READ (go find the next statement) +000012BC 2290 +000012BC 2291 * else the mode was INPUT so get more +000012BC 6100 FF38 2292 BSR LAB_18E3 * print a "?" character +000012C0 6100 F7D2 2293 BSR LAB_INLN * print "? " and get BASIC input +000012C4 2294 * return a0 pointing to the buffer start +000012C4 2295 +000012C4 2296 * if you don't want a null response to INPUT to break the program then set the nobrk +000012C4 2297 * value at the top of this file to some non zero value +000012C4 2298 +000012C4 FALSE 2299 ifne nobrk +000012C4 2300 endc +000012C4 2301 +000012C4 2302 * if you do want a null response to INPUT to break the program then leave the nobrk +000012C4 2303 * value at the top of this file set to zero +000012C4 2304 +000012C4 TRUE 2305 ifeq nobrk 000012C4 2306 -000012C4 TRUE 2307 ifeq nobrk -000012C4 2308 -000012C4 4A10 2309 TST.b (a0) * test the first byte from the buffer -000012C6 6604 2310 BNE.s LAB_1984 * if not null input go handle it -000012C8 2311 -000012C8 6000 FB26 2312 BRA LAB_1647 * else go do the BREAK exit -000012CC 2313 -000012CC 2314 LAB_1984 -000012CC 2A48 2315 MOVEA.l a0,a5 * set the execute pointer to the buffer -000012CE 534D 2316 SUBQ.w #1,a5 * decrement the execute pointer +000012C4 4A10 2307 TST.b (a0) * test the first byte from the buffer +000012C6 6604 2308 BNE.s LAB_1984 * if not null input go handle it +000012C8 2309 +000012C8 6000 FB26 2310 BRA LAB_1647 * else go do the BREAK exit +000012CC 2311 +000012CC 2312 LAB_1984 +000012CC 2A48 2313 MOVEA.l a0,a5 * set the execute pointer to the buffer +000012CE 534D 2314 SUBQ.w #1,a5 * decrement the execute pointer +000012D0 2315 +000012D0 2316 endc 000012D0 2317 -000012D0 2318 endc -000012D0 2319 -000012D0 2320 LAB_1985 -000012D0 6100 02D6 2321 BSR LAB_IGBY * increment & scan memory -000012D4 2322 LAB_1986 -000012D4 4A2B 0E19 2323 TST.b Dtypef(a3) * test data type, $80=string, $40=integer, -000012D8 2324 * $00=float -000012D8 6A20 2325 BPL.s LAB_19B0 * branch if numeric -000012DA 2326 -000012DA 2327 * else get string -000012DA 1400 2328 MOVE.b d0,d2 * save search character -000012DC B03C 0022 2329 CMP.b #$22,d0 * was it " ? -000012E0 6706 2330 BEQ.s LAB_1999 * branch if so -000012E2 2331 -000012E2 743A 2332 MOVEQ #':',d2 * set new search character -000012E4 702C 2333 MOVEQ #',',d0 * other search character is "," -000012E6 534D 2334 SUBQ.w #1,a5 * decrement BASIC execute pointer -000012E8 2335 LAB_1999 -000012E8 524D 2336 ADDQ.w #1,a5 * increment BASIC execute pointer -000012EA 1600 2337 MOVE.b d0,d3 * set second search character -000012EC 204D 2338 MOVEA.l a5,a0 * BASIC execute pointer is source -000012EE 2339 -000012EE 6100 08D2 2340 BSR LAB_20B4 * print d2/d3 terminated string to FAC1 stack -000012F2 2341 * d2 = Srchc, d3 = Asrch, a0 is source -000012F2 2A4A 2342 MOVEA.l a2,a5 * copy end of string to BASIC execute pointer -000012F4 6100 FDD2 2343 BSR LAB_17D5 * go do string LET -000012F8 6010 2344 BRA.s LAB_19B6 * go check string terminator -000012FA 2345 -000012FA 2346 * get numeric INPUT -000012FA 2347 LAB_19B0 -000012FA 1F2B 0E19 2348 MOVE.b Dtypef(a3),-(sp) * save variable data type -000012FE 6100 1D98 2349 BSR LAB_2887 * get FAC1 from string -00001302 175F 0E19 2350 MOVE.b (sp)+,Dtypef(a3) * restore variable data type -00001306 6100 1080 2351 BSR LAB_PFAC * pack FAC1 into (Lvarpl) -0000130A 2352 LAB_19B6 -0000130A 6100 029E 2353 BSR LAB_GBYT * scan memory -0000130E 670A 2354 BEQ.s LAB_19C2 * branch if null (last entry) -00001310 2355 -00001310 B03C 002C 2356 CMP.b #',',d0 * else compare with "," -00001314 6600 FF38 2357 BNE LAB_1904 * if not "," go handle bad input data -00001318 2358 -00001318 524D 2359 ADDQ.w #1,a5 * else was "," so point to next chr -0000131A 2360 * got good input data -0000131A 2361 LAB_19C2 -0000131A 274D 0CCA 2362 MOVE.l a5,Rdptrl(a3) * save the read pointer for now -0000131E 2A5F 2363 MOVEA.l (sp)+,a5 * restore the execute pointer -00001320 6100 0288 2364 BSR LAB_GBYT * scan the memory -00001324 6736 2365 BEQ.s LAB_1A03 * if null go do extra ignored message -00001326 2366 -00001326 487A FF7A 2367 PEA LAB_195B(pc) * set return address -0000132A 6000 0272 2368 BRA LAB_1C01 * scan for "," else do syntax error/warm start -0000132E 2369 * then go INPUT next variable from list -0000132E 2370 -0000132E 2371 * find next DATA statement or do "Out of Data" -0000132E 2372 * error -0000132E 2373 LAB_19DD -0000132E 6100 FC04 2374 BSR LAB_SNBS * scan for next BASIC statement ([:] or [EOL]) -00001332 2375 * returns a0 as pointer to [:] or [EOL] -00001332 2A48 2376 MOVEA.l a0,a5 * add index, now = pointer to [EOL]/[EOS] -00001334 524D 2377 ADDQ.w #1,a5 * pointer to next character -00001336 B03C 003A 2378 CMP.b #':',d0 * was it statement end? -0000133A 6712 2379 BEQ.s LAB_19F6 * branch if [:] +000012D0 2318 LAB_1985 +000012D0 6100 02D6 2319 BSR LAB_IGBY * increment & scan memory +000012D4 2320 LAB_1986 +000012D4 4A2B 05B5 2321 TST.b Dtypef(a3) * test data type, $80=string, $40=integer, +000012D8 2322 * $00=float +000012D8 6A20 2323 BPL.s LAB_19B0 * branch if numeric +000012DA 2324 +000012DA 2325 * else get string +000012DA 1400 2326 MOVE.b d0,d2 * save search character +000012DC B03C 0022 2327 CMP.b #$22,d0 * was it " ? +000012E0 6706 2328 BEQ.s LAB_1999 * branch if so +000012E2 2329 +000012E2 743A 2330 MOVEQ #':',d2 * set new search character +000012E4 702C 2331 MOVEQ #',',d0 * other search character is "," +000012E6 534D 2332 SUBQ.w #1,a5 * decrement BASIC execute pointer +000012E8 2333 LAB_1999 +000012E8 524D 2334 ADDQ.w #1,a5 * increment BASIC execute pointer +000012EA 1600 2335 MOVE.b d0,d3 * set second search character +000012EC 204D 2336 MOVEA.l a5,a0 * BASIC execute pointer is source +000012EE 2337 +000012EE 6100 08D2 2338 BSR LAB_20B4 * print d2/d3 terminated string to FAC1 stack +000012F2 2339 * d2 = Srchc, d3 = Asrch, a0 is source +000012F2 2A4A 2340 MOVEA.l a2,a5 * copy end of string to BASIC execute pointer +000012F4 6100 FDD2 2341 BSR LAB_17D5 * go do string LET +000012F8 6010 2342 BRA.s LAB_19B6 * go check string terminator +000012FA 2343 +000012FA 2344 * get numeric INPUT +000012FA 2345 LAB_19B0 +000012FA 1F2B 05B5 2346 MOVE.b Dtypef(a3),-(sp) * save variable data type +000012FE 6100 1D98 2347 BSR LAB_2887 * get FAC1 from string +00001302 175F 05B5 2348 MOVE.b (sp)+,Dtypef(a3) * restore variable data type +00001306 6100 1080 2349 BSR LAB_PFAC * pack FAC1 into (Lvarpl) +0000130A 2350 LAB_19B6 +0000130A 6100 029E 2351 BSR LAB_GBYT * scan memory +0000130E 670A 2352 BEQ.s LAB_19C2 * branch if null (last entry) +00001310 2353 +00001310 B03C 002C 2354 CMP.b #',',d0 * else compare with "," +00001314 6600 FF38 2355 BNE LAB_1904 * if not "," go handle bad input data +00001318 2356 +00001318 524D 2357 ADDQ.w #1,a5 * else was "," so point to next chr +0000131A 2358 * got good input data +0000131A 2359 LAB_19C2 +0000131A 274D 0466 2360 MOVE.l a5,Rdptrl(a3) * save the read pointer for now +0000131E 2A5F 2361 MOVEA.l (sp)+,a5 * restore the execute pointer +00001320 6100 0288 2362 BSR LAB_GBYT * scan the memory +00001324 6736 2363 BEQ.s LAB_1A03 * if null go do extra ignored message +00001326 2364 +00001326 487A FF7A 2365 PEA LAB_195B(pc) * set return address +0000132A 6000 0272 2366 BRA LAB_1C01 * scan for "," else do syntax error/warm start +0000132E 2367 * then go INPUT next variable from list +0000132E 2368 +0000132E 2369 * find next DATA statement or do "Out of Data" +0000132E 2370 * error +0000132E 2371 LAB_19DD +0000132E 6100 FC04 2372 BSR LAB_SNBS * scan for next BASIC statement ([:] or [EOL]) +00001332 2373 * returns a0 as pointer to [:] or [EOL] +00001332 2A48 2374 MOVEA.l a0,a5 * add index, now = pointer to [EOL]/[EOS] +00001334 524D 2375 ADDQ.w #1,a5 * pointer to next character +00001336 B03C 003A 2376 CMP.b #':',d0 * was it statement end? +0000133A 6712 2377 BEQ.s LAB_19F6 * branch if [:] +0000133C 2378 +0000133C 2379 * was [EOL] so find next line 0000133C 2380 -0000133C 2381 * was [EOL] so find next line -0000133C 2382 -0000133C 320D 2383 MOVE.w a5,d1 * past pad byte(s) -0000133E C27C 0001 2384 AND.w #1,d1 * mask odd bit -00001342 DAC1 2385 ADD.w d1,a5 * add pointer -00001344 241D 2386 MOVE.l (a5)+,d2 * get next line pointer -00001346 6700 F61A 2387 BEQ LAB_ODER * branch if end of program -0000134A 2388 -0000134A 275D 0CC2 2389 MOVE.l (a5)+,Dlinel(a3) * save current DATA line -0000134E 2390 LAB_19F6 -0000134E 6100 025A 2391 BSR LAB_GBYT * scan memory -00001352 B03C 0083 2392 CMP.b #TK_DATA,d0 * compare with "DATA" token -00001356 6700 FF78 2393 BEQ LAB_1985 * was "DATA" so go do next READ -0000135A 2394 -0000135A 60D2 2395 BRA.s LAB_19DD * go find next statement if not "DATA" +0000133C 320D 2381 MOVE.w a5,d1 * past pad byte(s) +0000133E C27C 0001 2382 AND.w #1,d1 * mask odd bit +00001342 DAC1 2383 ADD.w d1,a5 * add pointer +00001344 241D 2384 MOVE.l (a5)+,d2 * get next line pointer +00001346 6700 F61A 2385 BEQ LAB_ODER * branch if end of program +0000134A 2386 +0000134A 275D 045E 2387 MOVE.l (a5)+,Dlinel(a3) * save current DATA line +0000134E 2388 LAB_19F6 +0000134E 6100 025A 2389 BSR LAB_GBYT * scan memory +00001352 B03C 0083 2390 CMP.b #TK_DATA,d0 * compare with "DATA" token +00001356 6700 FF78 2391 BEQ LAB_1985 * was "DATA" so go do next READ +0000135A 2392 +0000135A 60D2 2393 BRA.s LAB_19DD * go find next statement if not "DATA" +0000135C 2394 +0000135C 2395 * end of INPUT/READ routine 0000135C 2396 -0000135C 2397 * end of INPUT/READ routine -0000135C 2398 -0000135C 2399 LAB_1A03 -0000135C 206B 0CCA 2400 MOVEA.l Rdptrl(a3),a0 * get temp READ pointer -00001360 4A2B 0E44 2401 TST.b Imode(a3) * get input mode flag, $00=INPUT, $98=READ -00001364 6A06 2402 BPL.s LAB_1A0E * branch if INPUT -00001366 2403 -00001366 2748 0CC6 2404 MOVE.l a0,Dptrl(a3) * else save temp READ pointer as DATA pointer -0000136A 4E75 2405 RTS -0000136C 2406 -0000136C 2407 * we were getting INPUT -0000136C 2408 LAB_1A0E -0000136C 4A10 2409 TST.b (a0) * test next byte -0000136E 6602 2410 BNE.s LAB_1A1B * error if not end of INPUT -00001370 2411 -00001370 4E75 2412 RTS -00001372 2413 * user typed too much -00001372 2414 LAB_1A1B -00001372 41FA 2946 2415 LEA LAB_IMSG(pc),a0 * point to extra ignored message -00001376 6000 FE66 2416 BRA LAB_18C3 * print null terminated string from memory & RTS -0000137A 2417 -0000137A 2418 -0000137A 2419 ************************************************************************************* -0000137A 2420 * -0000137A 2421 * perform NEXT -0000137A 2422 -0000137A 2423 LAB_NEXT -0000137A 6610 2424 BNE.s LAB_1A46 * branch if NEXT var -0000137C 2425 -0000137C 584F 2426 ADDQ.w #4,sp * back past return address -0000137E 0C57 0081 2427 CMP.w #TK_FOR,(sp) * is FOR token on stack? -00001382 6600 F5EA 2428 BNE LAB_NFER * if not do NEXT without FOR err/warm start -00001386 2429 -00001386 206F 0002 2430 MOVEA.l 2(sp),a0 * get stacked FOR variable pointer -0000138A 601C 2431 BRA.s LAB_11BD * branch always (no variable to search for) +0000135C 2397 LAB_1A03 +0000135C 206B 0466 2398 MOVEA.l Rdptrl(a3),a0 * get temp READ pointer +00001360 4A2B 05E0 2399 TST.b Imode(a3) * get input mode flag, $00=INPUT, $98=READ +00001364 6A06 2400 BPL.s LAB_1A0E * branch if INPUT +00001366 2401 +00001366 2748 0462 2402 MOVE.l a0,Dptrl(a3) * else save temp READ pointer as DATA pointer +0000136A 4E75 2403 RTS +0000136C 2404 +0000136C 2405 * we were getting INPUT +0000136C 2406 LAB_1A0E +0000136C 4A10 2407 TST.b (a0) * test next byte +0000136E 6602 2408 BNE.s LAB_1A1B * error if not end of INPUT +00001370 2409 +00001370 4E75 2410 RTS +00001372 2411 * user typed too much +00001372 2412 LAB_1A1B +00001372 41FA 2946 2413 LEA LAB_IMSG(pc),a0 * point to extra ignored message +00001376 6000 FE66 2414 BRA LAB_18C3 * print null terminated string from memory & RTS +0000137A 2415 +0000137A 2416 +0000137A 2417 ************************************************************************************* +0000137A 2418 * +0000137A 2419 * perform NEXT +0000137A 2420 +0000137A 2421 LAB_NEXT +0000137A 6610 2422 BNE.s LAB_1A46 * branch if NEXT var +0000137C 2423 +0000137C 584F 2424 ADDQ.w #4,sp * back past return address +0000137E 0C57 0081 2425 CMP.w #TK_FOR,(sp) * is FOR token on stack? +00001382 6600 F5EA 2426 BNE LAB_NFER * if not do NEXT without FOR err/warm start +00001386 2427 +00001386 206F 0002 2428 MOVEA.l 2(sp),a0 * get stacked FOR variable pointer +0000138A 601C 2429 BRA.s LAB_11BD * branch always (no variable to search for) +0000138C 2430 +0000138C 2431 * NEXT var 0000138C 2432 -0000138C 2433 * NEXT var -0000138C 2434 -0000138C 2435 LAB_1A46 -0000138C 6100 042A 2436 BSR LAB_GVAR * get variable address in a0 -00001390 584F 2437 ADDQ.w #4,sp * back past return address -00001392 303C 0081 2438 MOVE.w #TK_FOR,d0 * set for FOR token -00001396 721C 2439 MOVEQ #$1C,d1 * set for FOR use size -00001398 6002 2440 BRA.s LAB_11A6 * enter loop for next variable search -0000139A 2441 -0000139A 2442 LAB_11A5 -0000139A DFC1 2443 ADDA.l d1,sp * add FOR stack use size -0000139C 2444 LAB_11A6 -0000139C B057 2445 CMP.w (sp),d0 * is FOR token on stack? -0000139E 6600 F5CE 2446 BNE LAB_NFER * if not found do NEXT without FOR error and -000013A2 2447 * warm start -000013A2 2448 -000013A2 2449 * was FOR token -000013A2 B1EF 0002 2450 CMPA.l 2(sp),a0 * compare var pointer with stacked var pointer -000013A6 66F2 2451 BNE.s LAB_11A5 * loop if no match found -000013A8 2452 -000013A8 2453 LAB_11BD -000013A8 376F 0006 0E00 2454 MOVE.w 6(sp),FAC2_e(a3) * get STEP value exponent and sign -000013AE 276F 0008 0DFC 2455 MOVE.l 8(sp),FAC2_m(a3) * get STEP value mantissa -000013B4 2456 -000013B4 176F 0012 0E19 2457 MOVE.b 18(sp),Dtypef(a3) * restore FOR variable data type -000013BA 6100 021C 2458 BSR LAB_1C19 * check type and unpack (a0) -000013BE 2459 -000013BE 176B 0E01 0E02 2460 MOVE.b FAC2_s(a3),FAC_sc(a3) * save FAC2 sign as sign compare -000013C4 102B 0DF9 2461 MOVE.b FAC1_s(a3),d0 * get FAC1 sign -000013C8 B12B 0E02 2462 EOR.b d0,FAC_sc(a3) * EOR to create sign compare -000013CC 2463 -000013CC 2748 0CD6 2464 MOVE.l a0,Lvarpl(a3) * save variable pointer -000013D0 6100 0CB6 2465 BSR LAB_ADD * add STEP value to FOR variable -000013D4 176F 0012 0E19 2466 MOVE.b 18(sp),Dtypef(a3) * restore FOR variable data type (again) -000013DA 6100 0FAC 2467 BSR LAB_PFAC * pack FAC1 into FOR variable (Lvarpl) -000013DE 2468 -000013DE 376F 000C 0E00 2469 MOVE.w 12(sp),FAC2_e(a3) * get TO value exponent and sign -000013E4 276F 000E 0DFC 2470 MOVE.l 14(sp),FAC2_m(a3) * get TO value mantissa -000013EA 2471 -000013EA 176B 0E01 0E02 2472 MOVE.b FAC2_s(a3),FAC_sc(a3) * save FAC2 sign as sign compare -000013F0 102B 0DF9 2473 MOVE.b FAC1_s(a3),d0 * get FAC1 sign -000013F4 B12B 0E02 2474 EOR.b d0,FAC_sc(a3) * EOR to create sign compare -000013F8 2475 -000013F8 6100 1038 2476 BSR LAB_27FA * compare FAC1 with FAC2 (TO value) -000013FC 2477 * returns d0=+1 if FAC1 > FAC2 -000013FC 2478 * returns d0= 0 if FAC1 = FAC2 -000013FC 2479 * returns d0=-1 if FAC1 < FAC2 -000013FC 2480 -000013FC 322F 0006 2481 MOVE.w 6(sp),d1 * get STEP value exponent and sign -00001400 B141 2482 EOR.w d0,d1 * EOR compare result with STEP exponent and sign -00001402 2483 -00001402 4A00 2484 TST.b d0 * test for = -00001404 6704 2485 BEQ.s LAB_1A90 * branch if = (loop INcomplete) -00001406 2486 -00001406 4A01 2487 TST.b d1 * test result -00001408 6A0E 2488 BPL.s LAB_1A9B * branch if > (loop complete) -0000140A 2489 -0000140A 2490 * loop back and do it all again -0000140A 2491 LAB_1A90 -0000140A 276F 0014 0CB6 2492 MOVE.l 20(sp),Clinel(a3) * reset current line -00001410 2A6F 0018 2493 MOVE.l 24(sp),a5 * reset BASIC execute pointer -00001414 6000 F976 2494 BRA LAB_15C2 * go do interpreter inner loop -00001418 2495 -00001418 2496 * loop complete so carry on -00001418 2497 LAB_1A9B -00001418 DEFC 001C 2498 ADDA.w #28,sp * add 28 to dump FOR structure -0000141C 6100 018C 2499 BSR LAB_GBYT * scan memory -00001420 B03C 002C 2500 CMP.b #$2C,d0 * compare with "," -00001424 6600 F966 2501 BNE LAB_15C2 * if not "," go do interpreter inner loop -00001428 2502 -00001428 2503 * was "," so another NEXT variable to do -00001428 6100 017E 2504 BSR LAB_IGBY * else increment & scan memory -0000142C 6100 FF5E 2505 BSR LAB_1A46 * do NEXT (var) -00001430 2506 -00001430 2507 -00001430 2508 ************************************************************************************* -00001430 2509 * -00001430 2510 * evaluate expression & check is numeric, else do type mismatch -00001430 2511 -00001430 2512 LAB_EVNM -00001430 6116 2513 BSR.s LAB_EVEX * evaluate expression -00001432 2514 -00001432 2515 -00001432 2516 ************************************************************************************* -00001432 2517 * -00001432 2518 * check if source is numeric, else do type mismatch -00001432 2519 -00001432 2520 LAB_CTNM -00001432 B040 2521 CMP.w d0,d0 * required type is numeric so clear carry -00001434 2522 -00001434 2523 -00001434 2524 ************************************************************************************* -00001434 2525 * -00001434 2526 * type match check, set C for string, clear C for numeric -00001434 2527 -00001434 2528 LAB_CKTM -00001434 082B 0007 0E19 2529 BTST.b #7,Dtypef(a3) * test data type flag, don't change carry -0000143A 6606 2530 BNE.s LAB_1ABA * branch if data type is string -0000143C 2531 -0000143C 2532 * else data type was numeric -0000143C 6500 F500 2533 BCS LAB_TMER * if required type is string do type mismatch -00001440 2534 * error -00001440 2535 -00001440 4E75 2536 RTS -00001442 2537 * data type was string, now check required type -00001442 2538 LAB_1ABA -00001442 6400 F4FA 2539 BCC LAB_TMER * if required type is numeric do type mismatch -00001446 2540 * error -00001446 4E75 2541 RTS -00001448 2542 -00001448 2543 -00001448 2544 ************************************************************************************* -00001448 2545 * -00001448 2546 * this routine evaluates any type of expression. first it pushes an end marker so -00001448 2547 * it knows when the expression has been evaluated, this is a precedence value of zero. -00001448 2548 * next the first value is evaluated, this can be an in line value, either numeric or -00001448 2549 * string, a variable or array element of any type, a function or even an expression -00001448 2550 * in parenthesis. this value is kept in FAC_1 -00001448 2551 * after the value is evaluated a test is made on the next BASIC program byte, if it -00001448 2552 * is a comparrison operator i.e. "<", "=" or ">", then the corresponding bit is set -00001448 2553 * in the comparison evaluation flag. this test loops until no more comparrison operators -00001448 2554 * are found or more than one of any type is found. in the last case an error is generated +0000138C 2433 LAB_1A46 +0000138C 6100 042A 2434 BSR LAB_GVAR * get variable address in a0 +00001390 584F 2435 ADDQ.w #4,sp * back past return address +00001392 303C 0081 2436 MOVE.w #TK_FOR,d0 * set for FOR token +00001396 721C 2437 MOVEQ #$1C,d1 * set for FOR use size +00001398 6002 2438 BRA.s LAB_11A6 * enter loop for next variable search +0000139A 2439 +0000139A 2440 LAB_11A5 +0000139A DFC1 2441 ADDA.l d1,sp * add FOR stack use size +0000139C 2442 LAB_11A6 +0000139C B057 2443 CMP.w (sp),d0 * is FOR token on stack? +0000139E 6600 F5CE 2444 BNE LAB_NFER * if not found do NEXT without FOR error and +000013A2 2445 * warm start +000013A2 2446 +000013A2 2447 * was FOR token +000013A2 B1EF 0002 2448 CMPA.l 2(sp),a0 * compare var pointer with stacked var pointer +000013A6 66F2 2449 BNE.s LAB_11A5 * loop if no match found +000013A8 2450 +000013A8 2451 LAB_11BD +000013A8 376F 0006 059C 2452 MOVE.w 6(sp),FAC2_e(a3) * get STEP value exponent and sign +000013AE 276F 0008 0598 2453 MOVE.l 8(sp),FAC2_m(a3) * get STEP value mantissa +000013B4 2454 +000013B4 176F 0012 05B5 2455 MOVE.b 18(sp),Dtypef(a3) * restore FOR variable data type +000013BA 6100 021C 2456 BSR LAB_1C19 * check type and unpack (a0) +000013BE 2457 +000013BE 176B 059D 059E 2458 MOVE.b FAC2_s(a3),FAC_sc(a3) * save FAC2 sign as sign compare +000013C4 102B 0595 2459 MOVE.b FAC1_s(a3),d0 * get FAC1 sign +000013C8 B12B 059E 2460 EOR.b d0,FAC_sc(a3) * EOR to create sign compare +000013CC 2461 +000013CC 2748 0472 2462 MOVE.l a0,Lvarpl(a3) * save variable pointer +000013D0 6100 0CB6 2463 BSR LAB_ADD * add STEP value to FOR variable +000013D4 176F 0012 05B5 2464 MOVE.b 18(sp),Dtypef(a3) * restore FOR variable data type (again) +000013DA 6100 0FAC 2465 BSR LAB_PFAC * pack FAC1 into FOR variable (Lvarpl) +000013DE 2466 +000013DE 376F 000C 059C 2467 MOVE.w 12(sp),FAC2_e(a3) * get TO value exponent and sign +000013E4 276F 000E 0598 2468 MOVE.l 14(sp),FAC2_m(a3) * get TO value mantissa +000013EA 2469 +000013EA 176B 059D 059E 2470 MOVE.b FAC2_s(a3),FAC_sc(a3) * save FAC2 sign as sign compare +000013F0 102B 0595 2471 MOVE.b FAC1_s(a3),d0 * get FAC1 sign +000013F4 B12B 059E 2472 EOR.b d0,FAC_sc(a3) * EOR to create sign compare +000013F8 2473 +000013F8 6100 1038 2474 BSR LAB_27FA * compare FAC1 with FAC2 (TO value) +000013FC 2475 * returns d0=+1 if FAC1 > FAC2 +000013FC 2476 * returns d0= 0 if FAC1 = FAC2 +000013FC 2477 * returns d0=-1 if FAC1 < FAC2 +000013FC 2478 +000013FC 322F 0006 2479 MOVE.w 6(sp),d1 * get STEP value exponent and sign +00001400 B141 2480 EOR.w d0,d1 * EOR compare result with STEP exponent and sign +00001402 2481 +00001402 4A00 2482 TST.b d0 * test for = +00001404 6704 2483 BEQ.s LAB_1A90 * branch if = (loop INcomplete) +00001406 2484 +00001406 4A01 2485 TST.b d1 * test result +00001408 6A0E 2486 BPL.s LAB_1A9B * branch if > (loop complete) +0000140A 2487 +0000140A 2488 * loop back and do it all again +0000140A 2489 LAB_1A90 +0000140A 276F 0014 0452 2490 MOVE.l 20(sp),Clinel(a3) * reset current line +00001410 2A6F 0018 2491 MOVE.l 24(sp),a5 * reset BASIC execute pointer +00001414 6000 F976 2492 BRA LAB_15C2 * go do interpreter inner loop +00001418 2493 +00001418 2494 * loop complete so carry on +00001418 2495 LAB_1A9B +00001418 DEFC 001C 2496 ADDA.w #28,sp * add 28 to dump FOR structure +0000141C 6100 018C 2497 BSR LAB_GBYT * scan memory +00001420 B03C 002C 2498 CMP.b #$2C,d0 * compare with "," +00001424 6600 F966 2499 BNE LAB_15C2 * if not "," go do interpreter inner loop +00001428 2500 +00001428 2501 * was "," so another NEXT variable to do +00001428 6100 017E 2502 BSR LAB_IGBY * else increment & scan memory +0000142C 6100 FF5E 2503 BSR LAB_1A46 * do NEXT (var) +00001430 2504 +00001430 2505 +00001430 2506 ************************************************************************************* +00001430 2507 * +00001430 2508 * evaluate expression & check is numeric, else do type mismatch +00001430 2509 +00001430 2510 LAB_EVNM +00001430 6116 2511 BSR.s LAB_EVEX * evaluate expression +00001432 2512 +00001432 2513 +00001432 2514 ************************************************************************************* +00001432 2515 * +00001432 2516 * check if source is numeric, else do type mismatch +00001432 2517 +00001432 2518 LAB_CTNM +00001432 B040 2519 CMP.w d0,d0 * required type is numeric so clear carry +00001434 2520 +00001434 2521 +00001434 2522 ************************************************************************************* +00001434 2523 * +00001434 2524 * type match check, set C for string, clear C for numeric +00001434 2525 +00001434 2526 LAB_CKTM +00001434 082B 0007 05B5 2527 BTST.b #7,Dtypef(a3) * test data type flag, don't change carry +0000143A 6606 2528 BNE.s LAB_1ABA * branch if data type is string +0000143C 2529 +0000143C 2530 * else data type was numeric +0000143C 6500 F500 2531 BCS LAB_TMER * if required type is string do type mismatch +00001440 2532 * error +00001440 2533 +00001440 4E75 2534 RTS +00001442 2535 * data type was string, now check required type +00001442 2536 LAB_1ABA +00001442 6400 F4FA 2537 BCC LAB_TMER * if required type is numeric do type mismatch +00001446 2538 * error +00001446 4E75 2539 RTS +00001448 2540 +00001448 2541 +00001448 2542 ************************************************************************************* +00001448 2543 * +00001448 2544 * this routine evaluates any type of expression. first it pushes an end marker so +00001448 2545 * it knows when the expression has been evaluated, this is a precedence value of zero. +00001448 2546 * next the first value is evaluated, this can be an in line value, either numeric or +00001448 2547 * string, a variable or array element of any type, a function or even an expression +00001448 2548 * in parenthesis. this value is kept in FAC_1 +00001448 2549 * after the value is evaluated a test is made on the next BASIC program byte, if it +00001448 2550 * is a comparrison operator i.e. "<", "=" or ">", then the corresponding bit is set +00001448 2551 * in the comparison evaluation flag. this test loops until no more comparrison operators +00001448 2552 * are found or more than one of any type is found. in the last case an error is generated +00001448 2553 +00001448 2554 * evaluate expression 00001448 2555 -00001448 2556 * evaluate expression -00001448 2557 -00001448 2558 LAB_EVEX -00001448 534D 2559 SUBQ.w #1,a5 * decrement BASIC execute pointer -0000144A 2560 LAB_EVEZ -0000144A 7200 2561 MOVEQ #0,d1 * clear precedence word -0000144C 1741 0E19 2562 MOVE.b d1,Dtypef(a3) * clear the data type, $80=string, $40=integer, -00001450 2563 * $00=float -00001450 601C 2564 BRA.s LAB_1ACD * enter loop +00001448 2556 LAB_EVEX +00001448 534D 2557 SUBQ.w #1,a5 * decrement BASIC execute pointer +0000144A 2558 LAB_EVEZ +0000144A 7200 2559 MOVEQ #0,d1 * clear precedence word +0000144C 1741 05B5 2560 MOVE.b d1,Dtypef(a3) * clear the data type, $80=string, $40=integer, +00001450 2561 * $00=float +00001450 601C 2562 BRA.s LAB_1ACD * enter loop +00001452 2563 +00001452 2564 * get vector, set up operator then continue evaluation 00001452 2565 -00001452 2566 * get vector, set up operator then continue evaluation -00001452 2567 -00001452 2568 LAB_1B43 * -00001452 41FA 22BC 2569 LEA LAB_OPPT(pc),a0 * point to operator vector table -00001456 3030 1002 2570 MOVE.w 2(a0,d1.w),d0 * get vector offset -0000145A 4870 0000 2571 PEA (a0,d0.w) * push vector -0000145E 2572 -0000145E 2F2B 0DF4 2573 MOVE.l FAC1_m(a3),-(sp) * push FAC1 mantissa -00001462 3F2B 0DF8 2574 MOVE.w FAC1_e(a3),-(sp) * push sign and exponent -00001466 1F2B 0E47 2575 MOVE.b comp_f(a3),-(sp) * push comparison evaluation flag -0000146A 2576 -0000146A 3230 1000 2577 MOVE.w (a0,d1.w),d1 * get precedence value -0000146E 2578 LAB_1ACD -0000146E 3F01 2579 MOVE.w d1,-(sp) * push precedence value -00001470 6100 00E4 2580 BSR LAB_GVAL * get value from line -00001474 177C 0000 0E47 2581 MOVE.b #$00,comp_f(a3) * clear compare function flag -0000147A 2582 LAB_1ADB -0000147A 6100 012E 2583 BSR LAB_GBYT * scan memory -0000147E 2584 LAB_1ADE -0000147E 0400 00BC 2585 SUB.b #TK_GT,d0 * subtract token for > (lowest compare function) -00001482 652A 2586 BCS.s LAB_1AFA * branch if < TK_GT -00001484 2587 -00001484 B03C 0003 2588 CMP.b #$03,d0 * compare with ">" to "<" tokens -00001488 650A 2589 BCS.s LAB_1AE0 * branch if <= TK_SGN (is compare function) -0000148A 2590 -0000148A 4A2B 0E47 2591 TST.b comp_f(a3) * test compare function flag -0000148E 6660 2592 BNE.s LAB_1B2A * branch if compare function -00001490 2593 -00001490 6000 0086 2594 BRA LAB_1B78 * go do functions -00001494 2595 -00001494 2596 * was token for > = or < (d0 = 0, 1 or 2) -00001494 2597 LAB_1AE0 -00001494 7201 2598 MOVEQ #1,d1 * set to 0000 0001 -00001496 E121 2599 ASL.b d0,d1 * 1 if >, 2 if =, 4 if < -00001498 102B 0E47 2600 MOVE.b comp_f(a3),d0 * copy old compare function flag -0000149C B32B 0E47 2601 EOR.b d1,comp_f(a3) * EOR in this compare function bit -000014A0 B02B 0E47 2602 CMP.b comp_f(a3),d0 * compare old with new compare function flag -000014A4 6400 F4C4 2603 BCC LAB_SNER * if new <= old comp_f do syntax error and warm -000014A8 2604 * start, there was more than one <, = or > -000014A8 6100 00FE 2605 BSR LAB_IGBY * increment & scan memory -000014AC 60D0 2606 BRA.s LAB_1ADE * go do next character -000014AE 2607 -000014AE 2608 * token is < ">" or > "<" tokens -000014AE 2609 LAB_1AFA -000014AE 4A2B 0E47 2610 TST.b comp_f(a3) * test compare function flag -000014B2 663C 2611 BNE.s LAB_1B2A * branch if compare function -000014B4 2612 -000014B4 2613 * was < TK_GT so is operator or lower -000014B4 0600 000A 2614 ADD.b #(TK_GT-TK_PLUS),d0 * add # of operators (+ - * / ^ AND OR EOR) -000014B8 645E 2615 BCC.s LAB_1B78 * branch if < + operator -000014BA 2616 -000014BA 6608 2617 BNE.s LAB_1B0B * branch if not + token -000014BC 2618 -000014BC 4A2B 0E19 2619 TST.b Dtypef(a3) * test data type, $80=string, $40=integer, -000014C0 2620 * $00=float -000014C0 6B00 087C 2621 BMI LAB_224D * type is string & token was + -000014C4 2622 -000014C4 2623 LAB_1B0B -000014C4 7200 2624 MOVEQ #0,d1 * clear longword -000014C6 D000 2625 ADD.b d0,d0 * *2 -000014C8 D000 2626 ADD.b d0,d0 * *4 -000014CA 1200 2627 MOVE.b d0,d1 * copy to index -000014CC 2628 LAB_1B13 -000014CC 301F 2629 MOVE.w (sp)+,d0 * pull previous precedence -000014CE 41FA 2240 2630 LEA LAB_OPPT(pc),a0 * set pointer to operator table -000014D2 B070 1000 2631 CMP.w (a0,d1.w),d0 * compare with this opperator precedence -000014D6 6446 2632 BCC.s LAB_1B7D * branch if previous precedence (d0) >= -000014D8 2633 -000014D8 6100 FF58 2634 BSR LAB_CTNM * check if source is numeric, else type mismatch -000014DC 2635 LAB_1B1C -000014DC 3F00 2636 MOVE.w d0,-(sp) * save precedence -000014DE 2637 LAB_1B1D -000014DE 6100 FF72 2638 BSR LAB_1B43 * get vector, set-up operator and continue -000014E2 2639 * evaluation -000014E2 301F 2640 MOVE.w (sp)+,d0 * restore precedence -000014E4 222B 0E3C 2641 MOVE.l prstk(a3),d1 * get stacked function pointer -000014E8 6A22 2642 BPL.s LAB_1B3C * branch if stacked values -000014EA 2643 -000014EA 3000 2644 MOVE.w d0,d0 * copy precedence (set flags) -000014EC 672E 2645 BEQ.s LAB_1B7B * exit if done -000014EE 2646 -000014EE 603C 2647 BRA.s LAB_1B86 * else pop FAC2 & return (do function) -000014F0 2648 -000014F0 2649 * was compare function (< = >) -000014F0 2650 LAB_1B2A -000014F0 102B 0E19 2651 MOVE.b Dtypef(a3),d0 * get data type flag -000014F4 122B 0E47 2652 MOVE.b comp_f(a3),d1 * get compare function flag -000014F8 D000 2653 ADD.b d0,d0 * string bit flag into X bit -000014FA D301 2654 ADDX.b d1,d1 * shift compare function flag -000014FC 2655 -000014FC 177C 0000 0E19 2656 MOVE.b #0,Dtypef(a3) * clear data type flag, $00=float -00001502 1741 0E47 2657 MOVE.b d1,comp_f(a3) * save new compare function flag -00001506 534D 2658 SUBQ.w #1,a5 * decrement BASIC execute pointer -00001508 7230 2659 MOVEQ #(TK_LT-TK_PLUS)*4,d1 * set offset to last operator entry -0000150A 60C0 2660 BRA.s LAB_1B13 * branch always -0000150C 2661 -0000150C 2662 LAB_1B3C -0000150C 41FA 2202 2663 LEA LAB_OPPT(pc),a0 * point to function vector table -00001510 B070 1000 2664 CMP.w (a0,d1.w),d0 * compare with this opperator precedence -00001514 6416 2665 BCC.s LAB_1B86 * branch if d0 >=, pop FAC2 & return -00001516 2666 -00001516 60C4 2667 BRA.s LAB_1B1C * branch always +00001452 2566 LAB_1B43 * +00001452 41FA 22BC 2567 LEA LAB_OPPT(pc),a0 * point to operator vector table +00001456 3030 1002 2568 MOVE.w 2(a0,d1.w),d0 * get vector offset +0000145A 4870 0000 2569 PEA (a0,d0.w) * push vector +0000145E 2570 +0000145E 2F2B 0590 2571 MOVE.l FAC1_m(a3),-(sp) * push FAC1 mantissa +00001462 3F2B 0594 2572 MOVE.w FAC1_e(a3),-(sp) * push sign and exponent +00001466 1F2B 05E3 2573 MOVE.b comp_f(a3),-(sp) * push comparison evaluation flag +0000146A 2574 +0000146A 3230 1000 2575 MOVE.w (a0,d1.w),d1 * get precedence value +0000146E 2576 LAB_1ACD +0000146E 3F01 2577 MOVE.w d1,-(sp) * push precedence value +00001470 6100 00E4 2578 BSR LAB_GVAL * get value from line +00001474 177C 0000 05E3 2579 MOVE.b #$00,comp_f(a3) * clear compare function flag +0000147A 2580 LAB_1ADB +0000147A 6100 012E 2581 BSR LAB_GBYT * scan memory +0000147E 2582 LAB_1ADE +0000147E 0400 00BC 2583 SUB.b #TK_GT,d0 * subtract token for > (lowest compare function) +00001482 652A 2584 BCS.s LAB_1AFA * branch if < TK_GT +00001484 2585 +00001484 B03C 0003 2586 CMP.b #$03,d0 * compare with ">" to "<" tokens +00001488 650A 2587 BCS.s LAB_1AE0 * branch if <= TK_SGN (is compare function) +0000148A 2588 +0000148A 4A2B 05E3 2589 TST.b comp_f(a3) * test compare function flag +0000148E 6660 2590 BNE.s LAB_1B2A * branch if compare function +00001490 2591 +00001490 6000 0086 2592 BRA LAB_1B78 * go do functions +00001494 2593 +00001494 2594 * was token for > = or < (d0 = 0, 1 or 2) +00001494 2595 LAB_1AE0 +00001494 7201 2596 MOVEQ #1,d1 * set to 0000 0001 +00001496 E121 2597 ASL.b d0,d1 * 1 if >, 2 if =, 4 if < +00001498 102B 05E3 2598 MOVE.b comp_f(a3),d0 * copy old compare function flag +0000149C B32B 05E3 2599 EOR.b d1,comp_f(a3) * EOR in this compare function bit +000014A0 B02B 05E3 2600 CMP.b comp_f(a3),d0 * compare old with new compare function flag +000014A4 6400 F4C4 2601 BCC LAB_SNER * if new <= old comp_f do syntax error and warm +000014A8 2602 * start, there was more than one <, = or > +000014A8 6100 00FE 2603 BSR LAB_IGBY * increment & scan memory +000014AC 60D0 2604 BRA.s LAB_1ADE * go do next character +000014AE 2605 +000014AE 2606 * token is < ">" or > "<" tokens +000014AE 2607 LAB_1AFA +000014AE 4A2B 05E3 2608 TST.b comp_f(a3) * test compare function flag +000014B2 663C 2609 BNE.s LAB_1B2A * branch if compare function +000014B4 2610 +000014B4 2611 * was < TK_GT so is operator or lower +000014B4 0600 000A 2612 ADD.b #(TK_GT-TK_PLUS),d0 * add # of operators (+ - * / ^ AND OR EOR) +000014B8 645E 2613 BCC.s LAB_1B78 * branch if < + operator +000014BA 2614 +000014BA 6608 2615 BNE.s LAB_1B0B * branch if not + token +000014BC 2616 +000014BC 4A2B 05B5 2617 TST.b Dtypef(a3) * test data type, $80=string, $40=integer, +000014C0 2618 * $00=float +000014C0 6B00 087C 2619 BMI LAB_224D * type is string & token was + +000014C4 2620 +000014C4 2621 LAB_1B0B +000014C4 7200 2622 MOVEQ #0,d1 * clear longword +000014C6 D000 2623 ADD.b d0,d0 * *2 +000014C8 D000 2624 ADD.b d0,d0 * *4 +000014CA 1200 2625 MOVE.b d0,d1 * copy to index +000014CC 2626 LAB_1B13 +000014CC 301F 2627 MOVE.w (sp)+,d0 * pull previous precedence +000014CE 41FA 2240 2628 LEA LAB_OPPT(pc),a0 * set pointer to operator table +000014D2 B070 1000 2629 CMP.w (a0,d1.w),d0 * compare with this opperator precedence +000014D6 6446 2630 BCC.s LAB_1B7D * branch if previous precedence (d0) >= +000014D8 2631 +000014D8 6100 FF58 2632 BSR LAB_CTNM * check if source is numeric, else type mismatch +000014DC 2633 LAB_1B1C +000014DC 3F00 2634 MOVE.w d0,-(sp) * save precedence +000014DE 2635 LAB_1B1D +000014DE 6100 FF72 2636 BSR LAB_1B43 * get vector, set-up operator and continue +000014E2 2637 * evaluation +000014E2 301F 2638 MOVE.w (sp)+,d0 * restore precedence +000014E4 222B 05D8 2639 MOVE.l prstk(a3),d1 * get stacked function pointer +000014E8 6A22 2640 BPL.s LAB_1B3C * branch if stacked values +000014EA 2641 +000014EA 3000 2642 MOVE.w d0,d0 * copy precedence (set flags) +000014EC 672E 2643 BEQ.s LAB_1B7B * exit if done +000014EE 2644 +000014EE 603C 2645 BRA.s LAB_1B86 * else pop FAC2 & return (do function) +000014F0 2646 +000014F0 2647 * was compare function (< = >) +000014F0 2648 LAB_1B2A +000014F0 102B 05B5 2649 MOVE.b Dtypef(a3),d0 * get data type flag +000014F4 122B 05E3 2650 MOVE.b comp_f(a3),d1 * get compare function flag +000014F8 D000 2651 ADD.b d0,d0 * string bit flag into X bit +000014FA D301 2652 ADDX.b d1,d1 * shift compare function flag +000014FC 2653 +000014FC 177C 0000 05B5 2654 MOVE.b #0,Dtypef(a3) * clear data type flag, $00=float +00001502 1741 05E3 2655 MOVE.b d1,comp_f(a3) * save new compare function flag +00001506 534D 2656 SUBQ.w #1,a5 * decrement BASIC execute pointer +00001508 7230 2657 MOVEQ #(TK_LT-TK_PLUS)*4,d1 * set offset to last operator entry +0000150A 60C0 2658 BRA.s LAB_1B13 * branch always +0000150C 2659 +0000150C 2660 LAB_1B3C +0000150C 41FA 2202 2661 LEA LAB_OPPT(pc),a0 * point to function vector table +00001510 B070 1000 2662 CMP.w (a0,d1.w),d0 * compare with this opperator precedence +00001514 6416 2663 BCC.s LAB_1B86 * branch if d0 >=, pop FAC2 & return +00001516 2664 +00001516 60C4 2665 BRA.s LAB_1B1C * branch always +00001518 2666 +00001518 2667 * do functions 00001518 2668 -00001518 2669 * do functions -00001518 2670 -00001518 2671 LAB_1B78 -00001518 72FF 2672 MOVEQ #-1,d1 * flag all done -0000151A 301F 2673 MOVE.w (sp)+,d0 * pull precedence word -0000151C 2674 LAB_1B7B -0000151C 6732 2675 BEQ.s LAB_1B9D * exit if done -0000151E 2676 -0000151E 2677 LAB_1B7D -0000151E B07C 0064 2678 CMP.w #$64,d0 * compare previous precedence with $64 -00001522 6704 2679 BEQ.s LAB_1B84 * branch if was $64 (< function can be string) -00001524 2680 -00001524 6100 FF0C 2681 BSR LAB_CTNM * check if source is numeric, else type mismatch -00001528 2682 LAB_1B84 -00001528 2741 0E3C 2683 MOVE.l d1,prstk(a3) * save current operator index -0000152C 2684 -0000152C 2685 * pop FAC2 & return -0000152C 2686 LAB_1B86 -0000152C 101F 2687 MOVE.b (sp)+,d0 * pop comparison evaluation flag -0000152E 1200 2688 MOVE.b d0,d1 * copy comparison evaluation flag -00001530 E208 2689 LSR.b #1,d0 * shift out comparison evaluation lowest bit -00001532 1740 0E45 2690 MOVE.b d0,Cflag(a3) * save comparison evaluation flag -00001536 375F 0E00 2691 MOVE.w (sp)+,FAC2_e(a3) * pop exponent and sign -0000153A 275F 0DFC 2692 MOVE.l (sp)+,FAC2_m(a3) * pop mantissa -0000153E 176B 0E01 0E02 2693 MOVE.b FAC2_s(a3),FAC_sc(a3) * copy FAC2 sign -00001544 102B 0DF9 2694 MOVE.b FAC1_s(a3),d0 * get FAC1 sign -00001548 B12B 0E02 2695 EOR.b d0,FAC_sc(a3) * EOR FAC1 sign and set sign compare -0000154C 2696 -0000154C E209 2697 LSR.b #1,d1 * type bit into X and C -0000154E 4E75 2698 RTS -00001550 2699 -00001550 2700 LAB_1B9D -00001550 102B 0DF8 2701 MOVE.b FAC1_e(a3),d0 * get FAC1 exponent -00001554 4E75 2702 RTS -00001556 2703 -00001556 2704 -00001556 2705 ************************************************************************************* -00001556 2706 * -00001556 2707 * get a value from the BASIC line -00001556 2708 -00001556 2709 LAB_GVAL -00001556 6150 2710 BSR.s LAB_IGBY * increment & scan memory -00001558 6500 1B3E 2711 BCS LAB_2887 * if numeric get FAC1 from string & return -0000155C 2712 -0000155C 4A00 2713 TST.b d0 * test byte -0000155E 6B00 008E 2714 BMI LAB_1BD0 * if -ve go test token values -00001562 2715 -00001562 2716 * else it is either a string, number, variable -00001562 2717 * or () -00001562 B03C 0024 2718 CMP.b #'$',d0 * compare with "$" -00001566 6700 1B30 2719 BEQ LAB_2887 * if "$" get hex number from string & return -0000156A 2720 -0000156A B03C 0025 2721 CMP.b #'%',d0 * else compare with "%" -0000156E 6700 1B28 2722 BEQ LAB_2887 * if "%" get binary number from string & return -00001572 2723 -00001572 B03C 002E 2724 CMP.b #$2E,d0 * compare with "." -00001576 6700 1B20 2725 BEQ LAB_2887 * if so get FAC1 from string and return -0000157A 2726 * (e.g. .123) -0000157A 2727 -0000157A 2728 * wasn't a number so ... -0000157A B03C 0022 2729 CMP.b #$22,d0 * compare with " -0000157E 660C 2730 BNE.s LAB_1BF3 * if not open quote it must be a variable or -00001580 2731 * open bracket +00001518 2669 LAB_1B78 +00001518 72FF 2670 MOVEQ #-1,d1 * flag all done +0000151A 301F 2671 MOVE.w (sp)+,d0 * pull precedence word +0000151C 2672 LAB_1B7B +0000151C 6732 2673 BEQ.s LAB_1B9D * exit if done +0000151E 2674 +0000151E 2675 LAB_1B7D +0000151E B07C 0064 2676 CMP.w #$64,d0 * compare previous precedence with $64 +00001522 6704 2677 BEQ.s LAB_1B84 * branch if was $64 (< function can be string) +00001524 2678 +00001524 6100 FF0C 2679 BSR LAB_CTNM * check if source is numeric, else type mismatch +00001528 2680 LAB_1B84 +00001528 2741 05D8 2681 MOVE.l d1,prstk(a3) * save current operator index +0000152C 2682 +0000152C 2683 * pop FAC2 & return +0000152C 2684 LAB_1B86 +0000152C 101F 2685 MOVE.b (sp)+,d0 * pop comparison evaluation flag +0000152E 1200 2686 MOVE.b d0,d1 * copy comparison evaluation flag +00001530 E208 2687 LSR.b #1,d0 * shift out comparison evaluation lowest bit +00001532 1740 05E1 2688 MOVE.b d0,Cflag(a3) * save comparison evaluation flag +00001536 375F 059C 2689 MOVE.w (sp)+,FAC2_e(a3) * pop exponent and sign +0000153A 275F 0598 2690 MOVE.l (sp)+,FAC2_m(a3) * pop mantissa +0000153E 176B 059D 059E 2691 MOVE.b FAC2_s(a3),FAC_sc(a3) * copy FAC2 sign +00001544 102B 0595 2692 MOVE.b FAC1_s(a3),d0 * get FAC1 sign +00001548 B12B 059E 2693 EOR.b d0,FAC_sc(a3) * EOR FAC1 sign and set sign compare +0000154C 2694 +0000154C E209 2695 LSR.b #1,d1 * type bit into X and C +0000154E 4E75 2696 RTS +00001550 2697 +00001550 2698 LAB_1B9D +00001550 102B 0594 2699 MOVE.b FAC1_e(a3),d0 * get FAC1 exponent +00001554 4E75 2700 RTS +00001556 2701 +00001556 2702 +00001556 2703 ************************************************************************************* +00001556 2704 * +00001556 2705 * get a value from the BASIC line +00001556 2706 +00001556 2707 LAB_GVAL +00001556 6150 2708 BSR.s LAB_IGBY * increment & scan memory +00001558 6500 1B3E 2709 BCS LAB_2887 * if numeric get FAC1 from string & return +0000155C 2710 +0000155C 4A00 2711 TST.b d0 * test byte +0000155E 6B00 008E 2712 BMI LAB_1BD0 * if -ve go test token values +00001562 2713 +00001562 2714 * else it is either a string, number, variable +00001562 2715 * or () +00001562 B03C 0024 2716 CMP.b #'$',d0 * compare with "$" +00001566 6700 1B30 2717 BEQ LAB_2887 * if "$" get hex number from string & return +0000156A 2718 +0000156A B03C 0025 2719 CMP.b #'%',d0 * else compare with "%" +0000156E 6700 1B28 2720 BEQ LAB_2887 * if "%" get binary number from string & return +00001572 2721 +00001572 B03C 002E 2722 CMP.b #$2E,d0 * compare with "." +00001576 6700 1B20 2723 BEQ LAB_2887 * if so get FAC1 from string and return +0000157A 2724 * (e.g. .123) +0000157A 2725 +0000157A 2726 * wasn't a number so ... +0000157A B03C 0022 2727 CMP.b #$22,d0 * compare with " +0000157E 660C 2728 BNE.s LAB_1BF3 * if not open quote it must be a variable or +00001580 2729 * open bracket +00001580 2730 +00001580 2731 * was open quote so get the enclosed string 00001580 2732 -00001580 2733 * was open quote so get the enclosed string +00001580 2733 * print "..." string to string stack 00001580 2734 -00001580 2735 * print "..." string to string stack -00001580 2736 -00001580 2737 LAB_1BC1 -00001580 101D 2738 MOVE.b (a5)+,d0 * increment BASIC execute pointer (past ") -00001582 2739 * fastest/shortest method -00001582 204D 2740 MOVEA.l a5,a0 * copy basic execute pointer (string start) -00001584 6100 0638 2741 BSR LAB_20AE * print " terminated string to stack -00001588 2A4A 2742 MOVEA.l a2,a5 * restore BASIC execute pointer from temp -0000158A 4E75 2743 RTS -0000158C 2744 -0000158C 2745 * get value from line .. continued -0000158C 2746 * wasn't any sort of number so ... -0000158C 2747 LAB_1BF3 -0000158C B03C 0028 2748 CMP.b #'(',d0 * compare with "(" -00001590 6642 2749 BNE.s LAB_1C18 * if not "(" get (var) and return value in FAC1 -00001592 2750 * and $ flag -00001592 2751 -00001592 2752 -00001592 2753 ************************************************************************************* -00001592 2754 * -00001592 2755 * evaluate expression within parentheses -00001592 2756 -00001592 2757 LAB_1BF7 -00001592 6100 FEB6 2758 BSR LAB_EVEZ * evaluate expression (no decrement) -00001596 2759 -00001596 2760 -00001596 2761 ************************************************************************************* -00001596 2762 * -00001596 2763 * all the 'scan for' routines return the character after the sought character +00001580 2735 LAB_1BC1 +00001580 101D 2736 MOVE.b (a5)+,d0 * increment BASIC execute pointer (past ") +00001582 2737 * fastest/shortest method +00001582 204D 2738 MOVEA.l a5,a0 * copy basic execute pointer (string start) +00001584 6100 0638 2739 BSR LAB_20AE * print " terminated string to stack +00001588 2A4A 2740 MOVEA.l a2,a5 * restore BASIC execute pointer from temp +0000158A 4E75 2741 RTS +0000158C 2742 +0000158C 2743 * get value from line .. continued +0000158C 2744 * wasn't any sort of number so ... +0000158C 2745 LAB_1BF3 +0000158C B03C 0028 2746 CMP.b #'(',d0 * compare with "(" +00001590 6642 2747 BNE.s LAB_1C18 * if not "(" get (var) and return value in FAC1 +00001592 2748 * and $ flag +00001592 2749 +00001592 2750 +00001592 2751 ************************************************************************************* +00001592 2752 * +00001592 2753 * evaluate expression within parentheses +00001592 2754 +00001592 2755 LAB_1BF7 +00001592 6100 FEB6 2756 BSR LAB_EVEZ * evaluate expression (no decrement) +00001596 2757 +00001596 2758 +00001596 2759 ************************************************************************************* +00001596 2760 * +00001596 2761 * all the 'scan for' routines return the character after the sought character +00001596 2762 +00001596 2763 * scan for ")", else do syntax error, then warm start 00001596 2764 -00001596 2765 * scan for ")", else do syntax error, then warm start -00001596 2766 -00001596 2767 LAB_1BFB -00001596 7029 2768 MOVEQ #$29,d0 * load d0 with ")" -00001598 6006 2769 BRA.s LAB_SCCA -0000159A 2770 -0000159A 2771 -0000159A 2772 ************************************************************************************* -0000159A 2773 * -0000159A 2774 * scan for "," and get byte, else do Syntax error then warm start -0000159A 2775 -0000159A 2776 LAB_SCGB -0000159A 487A 0976 2777 PEA LAB_GTBY(pc) * return address is to get byte parameter -0000159E 2778 -0000159E 2779 -0000159E 2780 ************************************************************************************* -0000159E 2781 * -0000159E 2782 * scan for ",", else do syntax error, then warm start -0000159E 2783 -0000159E 2784 LAB_1C01 -0000159E 702C 2785 MOVEQ #$2C,d0 * load d0 with "," -000015A0 2786 -000015A0 2787 -000015A0 2788 ************************************************************************************* -000015A0 2789 * -000015A0 2790 * scan for CHR$(d0) , else do syntax error, then warm start -000015A0 2791 -000015A0 2792 LAB_SCCA -000015A0 B01D 2793 CMP.b (a5)+,d0 * check next byte is = d0 -000015A2 6706 2794 BEQ.s LAB_GBYT * if so go get next -000015A4 2795 -000015A4 6000 F3C4 2796 BRA LAB_SNER * else do syntax error/warm start -000015A8 2797 -000015A8 2798 -000015A8 2799 ************************************************************************************* -000015A8 2800 * -000015A8 2801 * BASIC increment and scan memory routine -000015A8 2802 -000015A8 2803 LAB_IGBY -000015A8 101D 2804 MOVE.b (a5)+,d0 * get byte & increment pointer -000015AA 2805 -000015AA 2806 * scan memory routine, exit with Cb = 1 if numeric character -000015AA 2807 * also skips any spaces encountered -000015AA 2808 -000015AA 2809 LAB_GBYT -000015AA 1015 2810 MOVE.b (a5),d0 * get byte -000015AC 2811 -000015AC B03C 0020 2812 CMP.b #$20,d0 * compare with " " -000015B0 67F6 2813 BEQ.s LAB_IGBY * if " " go do next +00001596 2765 LAB_1BFB +00001596 7029 2766 MOVEQ #$29,d0 * load d0 with ")" +00001598 6006 2767 BRA.s LAB_SCCA +0000159A 2768 +0000159A 2769 +0000159A 2770 ************************************************************************************* +0000159A 2771 * +0000159A 2772 * scan for "," and get byte, else do Syntax error then warm start +0000159A 2773 +0000159A 2774 LAB_SCGB +0000159A 487A 0976 2775 PEA LAB_GTBY(pc) * return address is to get byte parameter +0000159E 2776 +0000159E 2777 +0000159E 2778 ************************************************************************************* +0000159E 2779 * +0000159E 2780 * scan for ",", else do syntax error, then warm start +0000159E 2781 +0000159E 2782 LAB_1C01 +0000159E 702C 2783 MOVEQ #$2C,d0 * load d0 with "," +000015A0 2784 +000015A0 2785 +000015A0 2786 ************************************************************************************* +000015A0 2787 * +000015A0 2788 * scan for CHR$(d0) , else do syntax error, then warm start +000015A0 2789 +000015A0 2790 LAB_SCCA +000015A0 B01D 2791 CMP.b (a5)+,d0 * check next byte is = d0 +000015A2 6706 2792 BEQ.s LAB_GBYT * if so go get next +000015A4 2793 +000015A4 6000 F3C4 2794 BRA LAB_SNER * else do syntax error/warm start +000015A8 2795 +000015A8 2796 +000015A8 2797 ************************************************************************************* +000015A8 2798 * +000015A8 2799 * BASIC increment and scan memory routine +000015A8 2800 +000015A8 2801 LAB_IGBY +000015A8 101D 2802 MOVE.b (a5)+,d0 * get byte & increment pointer +000015AA 2803 +000015AA 2804 * scan memory routine, exit with Cb = 1 if numeric character +000015AA 2805 * also skips any spaces encountered +000015AA 2806 +000015AA 2807 LAB_GBYT +000015AA 1015 2808 MOVE.b (a5),d0 * get byte +000015AC 2809 +000015AC B03C 0020 2810 CMP.b #$20,d0 * compare with " " +000015B0 67F6 2811 BEQ.s LAB_IGBY * if " " go do next +000015B2 2812 +000015B2 2813 * test current BASIC byte, exit with Cb = 1 if numeric character 000015B2 2814 -000015B2 2815 * test current BASIC byte, exit with Cb = 1 if numeric character -000015B2 2816 -000015B2 B03C 00A9 2817 CMP.b #TK_ELSE,d0 * compare with the token for ELSE -000015B6 640C 2818 BCC.s RTS_001 * exit if >= (not numeric, carry clear) -000015B8 2819 -000015B8 B03C 003A 2820 CMP.b #$3A,d0 * compare with ":" -000015BC 6406 2821 BCC.s RTS_001 * exit if >= (not numeric, carry clear) -000015BE 2822 -000015BE 7CD0 2823 MOVEQ #$D0,d6 * set -"0" -000015C0 D006 2824 ADD.b d6,d0 * add -"0" -000015C2 9006 2825 SUB.b d6,d0 * subtract -"0" -000015C4 2826 RTS_001 * carry set if byte = "0"-"9" -000015C4 4E75 2827 RTS -000015C6 2828 -000015C6 2829 -000015C6 2830 ************************************************************************************* -000015C6 2831 * -000015C6 2832 * set-up for - operator -000015C6 2833 -000015C6 2834 LAB_1C11 -000015C6 6100 FE6A 2835 BSR LAB_CTNM * check if source is numeric, else type mismatch -000015CA 7228 2836 MOVEQ #(TK_GT-TK_PLUS)*4,d1 * set offset from base to - operator -000015CC 2837 LAB_1C13 -000015CC 4FEF 0004 2838 LEA 4(sp),sp * dump GVAL return address -000015D0 6000 FF0C 2839 BRA LAB_1B1D * continue evaluating expression -000015D4 2840 -000015D4 2841 -000015D4 2842 ************************************************************************************* -000015D4 2843 * -000015D4 2844 * variable name set-up -000015D4 2845 * get (var), return value in FAC_1 & data type flag -000015D4 2846 -000015D4 2847 LAB_1C18 -000015D4 6100 01E2 2848 BSR LAB_GVAR * get variable address in a0 -000015D8 2849 -000015D8 2850 * if you want a non existant variable to return a null value then set the novar -000015D8 2851 * value at the top of this file to some non zero value -000015D8 2852 -000015D8 FALSE 2853 ifne novar -000015D8 2854 endc +000015B2 B03C 00A9 2815 CMP.b #TK_ELSE,d0 * compare with the token for ELSE +000015B6 640C 2816 BCC.s RTS_001 * exit if >= (not numeric, carry clear) +000015B8 2817 +000015B8 B03C 003A 2818 CMP.b #$3A,d0 * compare with ":" +000015BC 6406 2819 BCC.s RTS_001 * exit if >= (not numeric, carry clear) +000015BE 2820 +000015BE 7CD0 2821 MOVEQ #$D0,d6 * set -"0" +000015C0 D006 2822 ADD.b d6,d0 * add -"0" +000015C2 9006 2823 SUB.b d6,d0 * subtract -"0" +000015C4 2824 RTS_001 * carry set if byte = "0"-"9" +000015C4 4E75 2825 RTS +000015C6 2826 +000015C6 2827 +000015C6 2828 ************************************************************************************* +000015C6 2829 * +000015C6 2830 * set-up for - operator +000015C6 2831 +000015C6 2832 LAB_1C11 +000015C6 6100 FE6A 2833 BSR LAB_CTNM * check if source is numeric, else type mismatch +000015CA 7228 2834 MOVEQ #(TK_GT-TK_PLUS)*4,d1 * set offset from base to - operator +000015CC 2835 LAB_1C13 +000015CC 4FEF 0004 2836 LEA 4(sp),sp * dump GVAL return address +000015D0 6000 FF0C 2837 BRA LAB_1B1D * continue evaluating expression +000015D4 2838 +000015D4 2839 +000015D4 2840 ************************************************************************************* +000015D4 2841 * +000015D4 2842 * variable name set-up +000015D4 2843 * get (var), return value in FAC_1 & data type flag +000015D4 2844 +000015D4 2845 LAB_1C18 +000015D4 6100 01E2 2846 BSR LAB_GVAR * get variable address in a0 +000015D8 2847 +000015D8 2848 * if you want a non existant variable to return a null value then set the novar +000015D8 2849 * value at the top of this file to some non zero value +000015D8 2850 +000015D8 FALSE 2851 ifne novar +000015D8 2852 endc +000015D8 2853 +000015D8 2854 * return existing variable value 000015D8 2855 -000015D8 2856 * return existing variable value -000015D8 2857 -000015D8 2858 LAB_1C19 -000015D8 4A2B 0E19 2859 TST.b Dtypef(a3) * test data type, $80=string, $40=integer, -000015DC 2860 * $00=float -000015DC 6700 0D8E 2861 BEQ LAB_UFAC * if float unpack memory (a0) into FAC1 and -000015E0 2862 * return -000015E0 2863 -000015E0 6A06 2864 BPL.s LAB_1C1A * if integer unpack memory (a0) into FAC1 -000015E2 2865 * and return -000015E2 2866 -000015E2 2748 0DF4 2867 MOVE.l a0,FAC1_m(a3) * else save descriptor pointer in FAC1 -000015E6 4E75 2868 RTS -000015E8 2869 -000015E8 2870 LAB_1C1A -000015E8 2010 2871 MOVE.l (a0),d0 * get integer value -000015EA 6000 04BC 2872 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & return -000015EE 2873 -000015EE 2874 -000015EE 2875 ************************************************************************************* -000015EE 2876 * -000015EE 2877 * get value from line .. continued -000015EE 2878 * do tokens -000015EE 2879 -000015EE 2880 LAB_1BD0 -000015EE B03C 00B3 2881 CMP.b #TK_MINUS,d0 * compare with token for - -000015F2 67D2 2882 BEQ.s LAB_1C11 * branch if - token (do set-up for - operator) -000015F4 2883 -000015F4 2884 * wasn't -123 so ... -000015F4 B03C 00B2 2885 CMP.b #TK_PLUS,d0 * compare with token for + -000015F8 6700 FF5C 2886 BEQ LAB_GVAL * branch if + token (+n = n so ignore leading +) -000015FC 2887 -000015FC B03C 00AE 2888 CMP.b #TK_NOT,d0 * compare with token for NOT -00001600 6606 2889 BNE.s LAB_1BE7 * branch if not token for NOT -00001602 2890 -00001602 2891 * was NOT token -00001602 323C 002C 2892 MOVE.w #(TK_EQUAL-TK_PLUS)*4,d1 * offset to NOT function -00001606 60C4 2893 BRA.s LAB_1C13 * do set-up for function then execute -00001608 2894 -00001608 2895 * wasn't +, - or NOT so ... -00001608 2896 LAB_1BE7 -00001608 B03C 00AB 2897 CMP.b #TK_FN,d0 * compare with token for FN -0000160C 6700 0514 2898 BEQ LAB_201E * if FN go evaluate FNx -00001610 2899 -00001610 2900 * wasn't +, -, NOT or FN so ... -00001610 0400 00BF 2901 SUB.b #TK_SGN,d0 * compare with token for SGN & normalise -00001614 6500 F354 2902 BCS LAB_SNER * if < SGN token then do syntax error -00001618 2903 -00001618 2904 * get value from line .. continued -00001618 2905 * only functions left so set up function references -00001618 2906 -00001618 2907 * new for V2.0+ this replaces a lot of IF .. THEN .. ELSEIF .. THEN .. that was needed -00001618 2908 * to process function calls. now the function vector is computed and pushed on the stack -00001618 2909 * and the preprocess offset is read. if the preprocess offset is non zero then the vector -00001618 2910 * is calculated and the routine called, if not this routine just does RTS. whichever -00001618 2911 * happens the RTS at the end of this routine, or the preprocess routine calls, the -00001618 2912 * function code -00001618 2913 -00001618 2914 * this also removes some less than elegant code that was used to bypass type checking -00001618 2915 * for functions that returned strings -00001618 2916 -00001618 C07C 007F 2917 AND.w #$7F,d0 * mask byte -0000161C D040 2918 ADD.w d0,d0 * *2 (2 bytes per function offset) -0000161E 2919 -0000161E 41FA 20A4 2920 LEA LAB_FTBL(pc),a0 * pointer to functions vector table -00001622 3230 0000 2921 MOVE.w (a0,d0.w),d1 * get function vector offset -00001626 4870 1000 2922 PEA (a0,d1.w) * push function vector -0000162A 2923 -0000162A 41FA 204C 2924 LEA LAB_FTPP(pc),a0 * pointer to functions preprocess vector table -0000162E 3030 0000 2925 MOVE.w (a0,d0.w),d0 * get function preprocess vector offset -00001632 6712 2926 BEQ.s LAB_1C2A * no preprocess vector so go do function -00001634 2927 -00001634 41F0 0000 2928 LEA (a0,d0.w),a0 * get function preprocess vector -00001638 4ED0 2929 JMP (a0) * go do preprocess routine then function -0000163A 2930 -0000163A 2931 -0000163A 2932 ************************************************************************************* -0000163A 2933 * -0000163A 2934 * process string expression in parenthesis -0000163A 2935 -0000163A 2936 LAB_PPFS -0000163A 6100 FF56 2937 BSR LAB_1BF7 * process expression in parenthesis -0000163E 4A2B 0E19 2938 TST.b Dtypef(a3) * test data type -00001642 6A00 F2FA 2939 BPL LAB_TMER * if numeric do Type missmatch Error/warm start -00001646 2940 -00001646 2941 LAB_1C2A -00001646 4E75 2942 RTS * else do function -00001648 2943 -00001648 2944 -00001648 2945 ************************************************************************************* -00001648 2946 * -00001648 2947 * process numeric expression in parenthesis -00001648 2948 -00001648 2949 LAB_PPFN -00001648 6100 FF48 2950 BSR LAB_1BF7 * process expression in parenthesis -0000164C 4A2B 0E19 2951 TST.b Dtypef(a3) * test data type -00001650 6B00 F2EC 2952 BMI LAB_TMER * if string do Type missmatch Error/warm start -00001654 2953 -00001654 4E75 2954 RTS * else do function -00001656 2955 -00001656 2956 -00001656 2957 ************************************************************************************* -00001656 2958 * -00001656 2959 * set numeric data type and increment BASIC execute pointer -00001656 2960 -00001656 2961 LAB_PPBI -00001656 177C 0000 0E19 2962 MOVE.b #$00,Dtypef(a3) * clear data type flag, $00=float -0000165C 101D 2963 MOVE.b (a5)+,d0 * get next BASIC byte -0000165E 4E75 2964 RTS * do function -00001660 2965 -00001660 2966 -00001660 2967 ************************************************************************************* -00001660 2968 * -00001660 2969 * process string for LEFT$, RIGHT$ or MID$ -00001660 2970 -00001660 2971 LAB_LRMS -00001660 6100 FDE8 2972 BSR LAB_EVEZ * evaluate (should be string) expression -00001664 4A2B 0E19 2973 TST.b Dtypef(a3) * test data type flag -00001668 6A00 F2D4 2974 BPL LAB_TMER * if type is not string do type mismatch error -0000166C 2975 -0000166C 141D 2976 MOVE.b (a5)+,d2 * get BASIC byte -0000166E B43C 002C 2977 CMP.b #',',d2 * compare with comma -00001672 6600 F2F6 2978 BNE LAB_SNER * if not "," go do syntax error/warm start -00001676 2979 -00001676 2F2B 0DF4 2980 MOVE.l FAC1_m(a3),-(sp) * save descriptor pointer -0000167A 6100 08AA 2981 BSR LAB_GTWO * get word parameter, result in d0 and Itemp -0000167E 205F 2982 MOVEA.l (sp)+,a0 * restore descriptor pointer -00001680 4E75 2983 RTS * do function -00001682 2984 -00001682 2985 -00001682 2986 ************************************************************************************* -00001682 2987 * -00001682 2988 * process numeric expression(s) for BIN$ or HEX$ -00001682 2989 -00001682 2990 LAB_BHSS -00001682 6100 FDC6 2991 BSR LAB_EVEZ * evaluate expression (no decrement) -00001686 4A2B 0E19 2992 TST.b Dtypef(a3) * test data type -0000168A 6B00 F2B2 2993 BMI LAB_TMER * if string do Type missmatch Error/warm start -0000168E 2994 -0000168E 6100 0DCE 2995 BSR LAB_2831 * convert FAC1 floating to fixed -00001692 2996 * result in d0 and Itemp -00001692 7200 2997 MOVEQ #0,d1 * set default to no leading "0"s -00001694 141D 2998 MOVE.b (a5)+,d2 * get BASIC byte -00001696 B43C 002C 2999 CMP.b #',',d2 * compare with comma -0000169A 660C 3000 BNE.s LAB_BHCB * if not "," go check close bracket -0000169C 3001 -0000169C 2F00 3002 MOVE.l d0,-(sp) * copy number to stack -0000169E 6100 0872 3003 BSR LAB_GTBY * get byte value -000016A2 2200 3004 MOVE.l d0,d1 * copy leading 0s # -000016A4 201F 3005 MOVE.l (sp)+,d0 * restore number from stack -000016A6 141D 3006 MOVE.b (a5)+,d2 * get BASIC byte -000016A8 3007 LAB_BHCB -000016A8 B43C 0029 3008 CMP.b #')',d2 * compare with close bracket -000016AC 6600 F2BC 3009 BNE LAB_SNER * if not ")" do Syntax Error/warm start -000016B0 3010 -000016B0 4E75 3011 RTS * go do function -000016B2 3012 -000016B2 3013 -000016B2 3014 ************************************************************************************* -000016B2 3015 * -000016B2 3016 * perform EOR -000016B2 3017 -000016B2 3018 LAB_EOR -000016B2 6116 3019 BSR.s GetFirst * get two values for OR, AND or EOR -000016B4 3020 * first in d0, and Itemp, second in d2 -000016B4 B580 3021 EOR.l d2,d0 * EOR values -000016B6 6000 03F0 3022 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & RET -000016BA 3023 -000016BA 3024 -000016BA 3025 ************************************************************************************* -000016BA 3026 * -000016BA 3027 * perform OR -000016BA 3028 -000016BA 3029 LAB_OR -000016BA 610E 3030 BSR.s GetFirst * get two values for OR, AND or EOR -000016BC 3031 * first in d0, and Itemp, second in d2 -000016BC 8082 3032 OR.l d2,d0 * do OR -000016BE 6000 03E8 3033 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & RET -000016C2 3034 -000016C2 3035 -000016C2 3036 ************************************************************************************* -000016C2 3037 * -000016C2 3038 * perform AND -000016C2 3039 -000016C2 3040 LAB_AND -000016C2 6106 3041 BSR.s GetFirst * get two values for OR, AND or EOR -000016C4 3042 * first in d0, and Itemp, second in d2 -000016C4 C082 3043 AND.l d2,d0 * do AND -000016C6 6000 03E0 3044 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & RET -000016CA 3045 -000016CA 3046 -000016CA 3047 ************************************************************************************* -000016CA 3048 * -000016CA 3049 * get two values for OR, AND, EOR -000016CA 3050 * first in d0, second in d2 -000016CA 3051 -000016CA 3052 GetFirst -000016CA 6100 0228 3053 BSR LAB_EVIR * evaluate integer expression (no sign check) -000016CE 3054 * result in d0 and Itemp -000016CE 2400 3055 MOVE.l d0,d2 * copy second value -000016D0 6100 0CF4 3056 BSR LAB_279B * copy FAC2 to FAC1, get first value in -000016D4 3057 * expression -000016D4 6000 021E 3058 BRA LAB_EVIR * evaluate integer expression (no sign check) -000016D8 3059 * result in d0 and Itemp & return -000016D8 3060 -000016D8 3061 -000016D8 3062 ************************************************************************************* -000016D8 3063 * -000016D8 3064 * perform NOT -000016D8 3065 -000016D8 3066 LAB_EQUAL -000016D8 6100 021A 3067 BSR LAB_EVIR * evaluate integer expression (no sign check) -000016DC 3068 * result in d0 and Itemp -000016DC 4680 3069 NOT.l d0 * bitwise invert -000016DE 6000 03C8 3070 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & RET -000016E2 3071 -000016E2 3072 -000016E2 3073 ************************************************************************************* -000016E2 3074 * -000016E2 3075 * perform comparisons -000016E2 3076 * do < compare -000016E2 3077 -000016E2 3078 LAB_LTHAN -000016E2 6100 FD50 3079 BSR LAB_CKTM * type match check, set C for string -000016E6 6506 3080 BCS.s LAB_1CAE * branch if string -000016E8 3081 -000016E8 3082 * do numeric < compare -000016E8 6100 0D48 3083 BSR LAB_27FA * compare FAC1 with FAC2 -000016EC 3084 * returns d0=+1 if FAC1 > FAC2 -000016EC 3085 * returns d0= 0 if FAC1 = FAC2 -000016EC 3086 * returns d0=-1 if FAC1 < FAC2 -000016EC 6042 3087 BRA.s LAB_1CF2 * process result -000016EE 3088 -000016EE 3089 * do string < compare -000016EE 3090 LAB_1CAE -000016EE 177C 0000 0E19 3091 MOVE.b #$00,Dtypef(a3) * clear data type, $80=string, $40=integer, -000016F4 3092 * $00=float -000016F4 6100 06BC 3093 BSR LAB_22B6 * pop string off descriptor stack, or from top -000016F8 3094 * of string space returns d0 = length, -000016F8 3095 * a0 = pointer -000016F8 2248 3096 MOVEA.l a0,a1 * copy string 2 pointer -000016FA 2200 3097 MOVE.l d0,d1 * copy string 2 length -000016FC 206B 0DFC 3098 MOVEA.l FAC2_m(a3),a0 * get string 1 descriptor pointer -00001700 6100 06B4 3099 BSR LAB_22BA * pop (a0) descriptor, returns with .. -00001704 3100 * d0 = length, a0 = pointer -00001704 2400 3101 MOVE.l d0,d2 * copy length -00001706 6604 3102 BNE.s LAB_1CB5 * branch if not null string -00001708 3103 -00001708 4A81 3104 TST.l d1 * test if string 2 is null also -0000170A 6724 3105 BEQ.s LAB_1CF2 * if so do string 1 = string 2 -0000170C 3106 -0000170C 3107 LAB_1CB5 -0000170C 9481 3108 SUB.l d1,d2 * subtract string 2 length -0000170E 670C 3109 BEQ.s LAB_1CD5 * branch if strings = length -00001710 3110 -00001710 6504 3111 BCS.s LAB_1CD4 * branch if string 1 < string 2 -00001712 3112 -00001712 70FF 3113 MOVEQ #-1,d0 * set for string 1 > string 2 -00001714 6008 3114 BRA.s LAB_1CD6 * go do character comapare -00001716 3115 -00001716 3116 LAB_1CD4 -00001716 2200 3117 MOVE.l d0,d1 * string 1 length is compare length -00001718 7001 3118 MOVEQ #1,d0 * and set for string 1 < string 2 -0000171A 6002 3119 BRA.s LAB_1CD6 * go do character comapare -0000171C 3120 -0000171C 3121 LAB_1CD5 -0000171C 2002 3122 MOVE.l d2,d0 * set for string 1 = string 2 -0000171E 3123 LAB_1CD6 -0000171E 5381 3124 SUBQ.l #1,d1 * adjust length for DBcc loop -00001720 3125 -00001720 3126 * d1 is length to compare, d0 is <=> for length -00001720 3127 * a0 is string 1 pointer, a1 is string 2 pointer -00001720 3128 LAB_1CE6 -00001720 B308 3129 CMPM.b (a0)+,(a1)+ * compare string bytes (1 with 2) -00001722 56C9 FFFC 3130 DBNE d1,LAB_1CE6 * loop if same and not end yet -00001726 3131 -00001726 6708 3132 BEQ.s LAB_1CF2 * if = to here, then go use length compare -00001728 3133 -00001728 6404 3134 BCC.s LAB_1CDB * else branch if string 1 > string 2 -0000172A 3135 -0000172A 70FF 3136 MOVEQ #-1,d0 * else set for string 1 < string 2 -0000172C 6002 3137 BRA.s LAB_1CF2 * go set result -0000172E 3138 -0000172E 3139 LAB_1CDB -0000172E 7001 3140 MOVEQ #1,d0 * and set for string 1 > string 2 -00001730 3141 -00001730 3142 LAB_1CF2 -00001730 5200 3143 ADDQ.b #1,d0 * make result 0, 1 or 2 -00001732 1200 3144 MOVE.b d0,d1 * copy to d1 -00001734 7001 3145 MOVEQ #1,d0 * set d0 longword -00001736 E338 3146 ROL.b d1,d0 * make 1, 2 or 4 (result = flag bit) -00001738 C02B 0E45 3147 AND.b Cflag(a3),d0 * AND with comparison evaluation flag -0000173C 6700 0CDC 3148 BEQ LAB_27DB * exit if not a wanted result (i.e. false) -00001740 3149 -00001740 70FF 3150 MOVEQ #-1,d0 * else set -1 (true) -00001742 6000 0CD6 3151 BRA LAB_27DB * save d0 as integer & return -00001746 3152 -00001746 3153 -00001746 3154 LAB_1CFE -00001746 6100 FE56 3155 BSR LAB_1C01 * scan for ",", else do syntax error/warm start -0000174A 3156 -0000174A 3157 -0000174A 3158 ************************************************************************************* -0000174A 3159 * -0000174A 3160 * perform DIM -0000174A 3161 -0000174A 3162 LAB_DIM -0000174A 72FF 3163 MOVEQ #-1,d1 * set "DIM" flag -0000174C 6170 3164 BSR.s LAB_1D10 * search for or dimension a variable -0000174E 6100 FE5A 3165 BSR LAB_GBYT * scan memory -00001752 66F2 3166 BNE.s LAB_1CFE * loop and scan for "," if not null -00001754 3167 -00001754 4E75 3168 RTS -00001756 3169 -00001756 3170 -00001756 3171 ************************************************************************************* -00001756 3172 * -00001756 3173 * perform << (left shift) -00001756 3174 -00001756 3175 LAB_LSHIFT -00001756 612E 3176 BSR.s GetPair * get an integer and byte pair -00001758 3177 * byte is in d2, integer is in d0 and Itemp -00001758 6708 3178 BEQ.s NoShift * branch if byte zero -0000175A 3179 -0000175A B43C 0020 3180 CMP.b #$20,d2 * compare bit count with 32d -0000175E 6420 3181 BCC.s TooBig * branch if >= -00001760 3182 -00001760 E5A0 3183 ASL.l d2,d0 * shift longword -00001762 3184 NoShift -00001762 6000 0344 3185 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & RET -00001766 3186 -00001766 3187 -00001766 3188 ************************************************************************************* -00001766 3189 * -00001766 3190 * perform >> (right shift) -00001766 3191 -00001766 3192 LAB_RSHIFT -00001766 611E 3193 BSR.s GetPair * get an integer and byte pair -00001768 3194 * byte is in d2, integer is in d0 and Itemp -00001768 67F8 3195 BEQ.s NoShift * branch if byte zero -0000176A 3196 -0000176A B43C 0020 3197 CMP.b #$20,d2 * compare bit count with 32d -0000176E 650A 3198 BCS.s Not2Big * branch if >= (return shift) -00001770 3199 -00001770 4A80 3200 TST.l d0 * test sign bit -00001772 6A0C 3201 BPL.s TooBig * branch if +ve -00001774 3202 -00001774 70FF 3203 MOVEQ #-1,d0 * set longword -00001776 6000 0330 3204 BRA LAB_AYFC * convert d0 to longword in FAC1 & RET -0000177A 3205 -0000177A 3206 Not2Big -0000177A E4A0 3207 ASR.l d2,d0 * shift longword -0000177C 6000 032A 3208 BRA LAB_AYFC * convert d0 to longword in FAC1 & RET -00001780 3209 -00001780 3210 TooBig -00001780 7000 3211 MOVEQ #0,d0 * clear longword -00001782 6000 0324 3212 BRA LAB_AYFC * convert d0 to longword in FAC1 & RET -00001786 3213 -00001786 3214 -00001786 3215 ************************************************************************************* -00001786 3216 * -00001786 3217 * get an integer and byte pair -00001786 3218 * byte is in d2, integer is in d0 and Itemp -00001786 3219 -00001786 3220 GetPair -00001786 6100 078E 3221 BSR LAB_EVBY * evaluate byte expression, result in d0 and -0000178A 3222 * Itemp -0000178A 1400 3223 MOVE.b d0,d2 * save it -0000178C 6100 0C38 3224 BSR LAB_279B * copy FAC2 to FAC1, get first value in -00001790 3225 * expression -00001790 6100 0162 3226 BSR LAB_EVIR * evaluate integer expression (no sign check) -00001794 3227 * result in d0 and Itemp -00001794 4A02 3228 TST.b d2 * test byte value -00001796 4E75 3229 RTS -00001798 3230 -00001798 3231 -00001798 3232 ************************************************************************************* -00001798 3233 * -00001798 3234 * check alpha, return C=0 if<"A" or >"Z" or <"a" to "z"> -00001798 3235 -00001798 3236 LAB_CASC -00001798 B03C 0061 3237 CMP.b #$61,d0 * compare with "a" -0000179C 6410 3238 BCC.s LAB_1D83 * if >="a" go check =<"z" -0000179E 3239 -0000179E 3240 -0000179E 3241 ************************************************************************************* -0000179E 3242 * -0000179E 3243 * check alpha upper case, return C=0 if<"A" or >"Z" -0000179E 3244 -0000179E 3245 LAB_CAUC -0000179E B03C 0041 3246 CMP.b #$41,d0 * compare with "A" -000017A2 6404 3247 BCC.s LAB_1D8A * if >="A" go check =<"Z" -000017A4 3248 -000017A4 8040 3249 OR d0,d0 * make C=0 -000017A6 4E75 3250 RTS -000017A8 3251 -000017A8 3252 LAB_1D8A -000017A8 B03C 005B 3253 CMP.b #$5B,d0 * compare with "Z"+1 -000017AC 3254 * carry set if byte<="Z" -000017AC 4E75 3255 RTS -000017AE 3256 -000017AE 3257 LAB_1D83 -000017AE B03C 007B 3258 CMP.b #$7B,d0 * compare with "z"+1 -000017B2 3259 * carry set if byte<="z" -000017B2 4E75 3260 RTS -000017B4 3261 -000017B4 3262 -000017B4 3263 ************************************************************************************* -000017B4 3264 * -000017B4 3265 * search for or create variable. this is used to automatically create a variable if -000017B4 3266 * it is not found. any routines that need to create the variable call LAB_GVAR via -000017B4 3267 * this point and error generation is supressed and the variable will be created -000017B4 3268 * -000017B4 3269 * return pointer to variable in Cvaral and a0 -000017B4 3270 * set data type to variable type -000017B4 3271 -000017B4 3272 LAB_SVAR -000017B4 6102 3273 BSR.s LAB_GVAR * search for variable -000017B6 3274 LAB_FVAR -000017B6 4E75 3275 RTS -000017B8 3276 -000017B8 3277 -000017B8 3278 ************************************************************************************* -000017B8 3279 * -000017B8 3280 * search for variable. if this routine is called from anywhere but the above call and -000017B8 3281 * the variable searched for does not exist then an error will be returned -000017B8 3282 * -000017B8 3283 * DIM flag is in d1.b -000017B8 3284 * return pointer to variable in Cvaral and a0 -000017B8 3285 * set data type to variable type -000017B8 3286 -000017B8 3287 LAB_GVAR -000017B8 7200 3288 MOVEQ #$00,d1 * set DIM flag = $00 -000017BA 6100 FDEE 3289 BSR LAB_GBYT * scan memory (1st character) -000017BE 3290 LAB_1D10 -000017BE 1741 0E18 3291 MOVE.b d1,Defdim(a3) * save DIM flag +000015D8 2856 LAB_1C19 +000015D8 4A2B 05B5 2857 TST.b Dtypef(a3) * test data type, $80=string, $40=integer, +000015DC 2858 * $00=float +000015DC 6700 0D8E 2859 BEQ LAB_UFAC * if float unpack memory (a0) into FAC1 and +000015E0 2860 * return +000015E0 2861 +000015E0 6A06 2862 BPL.s LAB_1C1A * if integer unpack memory (a0) into FAC1 +000015E2 2863 * and return +000015E2 2864 +000015E2 2748 0590 2865 MOVE.l a0,FAC1_m(a3) * else save descriptor pointer in FAC1 +000015E6 4E75 2866 RTS +000015E8 2867 +000015E8 2868 LAB_1C1A +000015E8 2010 2869 MOVE.l (a0),d0 * get integer value +000015EA 6000 04BC 2870 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & return +000015EE 2871 +000015EE 2872 +000015EE 2873 ************************************************************************************* +000015EE 2874 * +000015EE 2875 * get value from line .. continued +000015EE 2876 * do tokens +000015EE 2877 +000015EE 2878 LAB_1BD0 +000015EE B03C 00B3 2879 CMP.b #TK_MINUS,d0 * compare with token for - +000015F2 67D2 2880 BEQ.s LAB_1C11 * branch if - token (do set-up for - operator) +000015F4 2881 +000015F4 2882 * wasn't -123 so ... +000015F4 B03C 00B2 2883 CMP.b #TK_PLUS,d0 * compare with token for + +000015F8 6700 FF5C 2884 BEQ LAB_GVAL * branch if + token (+n = n so ignore leading +) +000015FC 2885 +000015FC B03C 00AE 2886 CMP.b #TK_NOT,d0 * compare with token for NOT +00001600 6606 2887 BNE.s LAB_1BE7 * branch if not token for NOT +00001602 2888 +00001602 2889 * was NOT token +00001602 323C 002C 2890 MOVE.w #(TK_EQUAL-TK_PLUS)*4,d1 * offset to NOT function +00001606 60C4 2891 BRA.s LAB_1C13 * do set-up for function then execute +00001608 2892 +00001608 2893 * wasn't +, - or NOT so ... +00001608 2894 LAB_1BE7 +00001608 B03C 00AB 2895 CMP.b #TK_FN,d0 * compare with token for FN +0000160C 6700 0514 2896 BEQ LAB_201E * if FN go evaluate FNx +00001610 2897 +00001610 2898 * wasn't +, -, NOT or FN so ... +00001610 0400 00BF 2899 SUB.b #TK_SGN,d0 * compare with token for SGN & normalise +00001614 6500 F354 2900 BCS LAB_SNER * if < SGN token then do syntax error +00001618 2901 +00001618 2902 * get value from line .. continued +00001618 2903 * only functions left so set up function references +00001618 2904 +00001618 2905 * new for V2.0+ this replaces a lot of IF .. THEN .. ELSEIF .. THEN .. that was needed +00001618 2906 * to process function calls. now the function vector is computed and pushed on the stack +00001618 2907 * and the preprocess offset is read. if the preprocess offset is non zero then the vector +00001618 2908 * is calculated and the routine called, if not this routine just does RTS. whichever +00001618 2909 * happens the RTS at the end of this routine, or the preprocess routine calls, the +00001618 2910 * function code +00001618 2911 +00001618 2912 * this also removes some less than elegant code that was used to bypass type checking +00001618 2913 * for functions that returned strings +00001618 2914 +00001618 C07C 007F 2915 AND.w #$7F,d0 * mask byte +0000161C D040 2916 ADD.w d0,d0 * *2 (2 bytes per function offset) +0000161E 2917 +0000161E 41FA 20A4 2918 LEA LAB_FTBL(pc),a0 * pointer to functions vector table +00001622 3230 0000 2919 MOVE.w (a0,d0.w),d1 * get function vector offset +00001626 4870 1000 2920 PEA (a0,d1.w) * push function vector +0000162A 2921 +0000162A 41FA 204C 2922 LEA LAB_FTPP(pc),a0 * pointer to functions preprocess vector table +0000162E 3030 0000 2923 MOVE.w (a0,d0.w),d0 * get function preprocess vector offset +00001632 6712 2924 BEQ.s LAB_1C2A * no preprocess vector so go do function +00001634 2925 +00001634 41F0 0000 2926 LEA (a0,d0.w),a0 * get function preprocess vector +00001638 4ED0 2927 JMP (a0) * go do preprocess routine then function +0000163A 2928 +0000163A 2929 +0000163A 2930 ************************************************************************************* +0000163A 2931 * +0000163A 2932 * process string expression in parenthesis +0000163A 2933 +0000163A 2934 LAB_PPFS +0000163A 6100 FF56 2935 BSR LAB_1BF7 * process expression in parenthesis +0000163E 4A2B 05B5 2936 TST.b Dtypef(a3) * test data type +00001642 6A00 F2FA 2937 BPL LAB_TMER * if numeric do Type missmatch Error/warm start +00001646 2938 +00001646 2939 LAB_1C2A +00001646 4E75 2940 RTS * else do function +00001648 2941 +00001648 2942 +00001648 2943 ************************************************************************************* +00001648 2944 * +00001648 2945 * process numeric expression in parenthesis +00001648 2946 +00001648 2947 LAB_PPFN +00001648 6100 FF48 2948 BSR LAB_1BF7 * process expression in parenthesis +0000164C 4A2B 05B5 2949 TST.b Dtypef(a3) * test data type +00001650 6B00 F2EC 2950 BMI LAB_TMER * if string do Type missmatch Error/warm start +00001654 2951 +00001654 4E75 2952 RTS * else do function +00001656 2953 +00001656 2954 +00001656 2955 ************************************************************************************* +00001656 2956 * +00001656 2957 * set numeric data type and increment BASIC execute pointer +00001656 2958 +00001656 2959 LAB_PPBI +00001656 177C 0000 05B5 2960 MOVE.b #$00,Dtypef(a3) * clear data type flag, $00=float +0000165C 101D 2961 MOVE.b (a5)+,d0 * get next BASIC byte +0000165E 4E75 2962 RTS * do function +00001660 2963 +00001660 2964 +00001660 2965 ************************************************************************************* +00001660 2966 * +00001660 2967 * process string for LEFT$, RIGHT$ or MID$ +00001660 2968 +00001660 2969 LAB_LRMS +00001660 6100 FDE8 2970 BSR LAB_EVEZ * evaluate (should be string) expression +00001664 4A2B 05B5 2971 TST.b Dtypef(a3) * test data type flag +00001668 6A00 F2D4 2972 BPL LAB_TMER * if type is not string do type mismatch error +0000166C 2973 +0000166C 141D 2974 MOVE.b (a5)+,d2 * get BASIC byte +0000166E B43C 002C 2975 CMP.b #',',d2 * compare with comma +00001672 6600 F2F6 2976 BNE LAB_SNER * if not "," go do syntax error/warm start +00001676 2977 +00001676 2F2B 0590 2978 MOVE.l FAC1_m(a3),-(sp) * save descriptor pointer +0000167A 6100 08AA 2979 BSR LAB_GTWO * get word parameter, result in d0 and Itemp +0000167E 205F 2980 MOVEA.l (sp)+,a0 * restore descriptor pointer +00001680 4E75 2981 RTS * do function +00001682 2982 +00001682 2983 +00001682 2984 ************************************************************************************* +00001682 2985 * +00001682 2986 * process numeric expression(s) for BIN$ or HEX$ +00001682 2987 +00001682 2988 LAB_BHSS +00001682 6100 FDC6 2989 BSR LAB_EVEZ * evaluate expression (no decrement) +00001686 4A2B 05B5 2990 TST.b Dtypef(a3) * test data type +0000168A 6B00 F2B2 2991 BMI LAB_TMER * if string do Type missmatch Error/warm start +0000168E 2992 +0000168E 6100 0DCE 2993 BSR LAB_2831 * convert FAC1 floating to fixed +00001692 2994 * result in d0 and Itemp +00001692 7200 2995 MOVEQ #0,d1 * set default to no leading "0"s +00001694 141D 2996 MOVE.b (a5)+,d2 * get BASIC byte +00001696 B43C 002C 2997 CMP.b #',',d2 * compare with comma +0000169A 660C 2998 BNE.s LAB_BHCB * if not "," go check close bracket +0000169C 2999 +0000169C 2F00 3000 MOVE.l d0,-(sp) * copy number to stack +0000169E 6100 0872 3001 BSR LAB_GTBY * get byte value +000016A2 2200 3002 MOVE.l d0,d1 * copy leading 0s # +000016A4 201F 3003 MOVE.l (sp)+,d0 * restore number from stack +000016A6 141D 3004 MOVE.b (a5)+,d2 * get BASIC byte +000016A8 3005 LAB_BHCB +000016A8 B43C 0029 3006 CMP.b #')',d2 * compare with close bracket +000016AC 6600 F2BC 3007 BNE LAB_SNER * if not ")" do Syntax Error/warm start +000016B0 3008 +000016B0 4E75 3009 RTS * go do function +000016B2 3010 +000016B2 3011 +000016B2 3012 ************************************************************************************* +000016B2 3013 * +000016B2 3014 * perform EOR +000016B2 3015 +000016B2 3016 LAB_EOR +000016B2 6116 3017 BSR.s GetFirst * get two values for OR, AND or EOR +000016B4 3018 * first in d0, and Itemp, second in d2 +000016B4 B580 3019 EOR.l d2,d0 * EOR values +000016B6 6000 03F0 3020 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & RET +000016BA 3021 +000016BA 3022 +000016BA 3023 ************************************************************************************* +000016BA 3024 * +000016BA 3025 * perform OR +000016BA 3026 +000016BA 3027 LAB_OR +000016BA 610E 3028 BSR.s GetFirst * get two values for OR, AND or EOR +000016BC 3029 * first in d0, and Itemp, second in d2 +000016BC 8082 3030 OR.l d2,d0 * do OR +000016BE 6000 03E8 3031 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & RET +000016C2 3032 +000016C2 3033 +000016C2 3034 ************************************************************************************* +000016C2 3035 * +000016C2 3036 * perform AND +000016C2 3037 +000016C2 3038 LAB_AND +000016C2 6106 3039 BSR.s GetFirst * get two values for OR, AND or EOR +000016C4 3040 * first in d0, and Itemp, second in d2 +000016C4 C082 3041 AND.l d2,d0 * do AND +000016C6 6000 03E0 3042 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & RET +000016CA 3043 +000016CA 3044 +000016CA 3045 ************************************************************************************* +000016CA 3046 * +000016CA 3047 * get two values for OR, AND, EOR +000016CA 3048 * first in d0, second in d2 +000016CA 3049 +000016CA 3050 GetFirst +000016CA 6100 0228 3051 BSR LAB_EVIR * evaluate integer expression (no sign check) +000016CE 3052 * result in d0 and Itemp +000016CE 2400 3053 MOVE.l d0,d2 * copy second value +000016D0 6100 0CF4 3054 BSR LAB_279B * copy FAC2 to FAC1, get first value in +000016D4 3055 * expression +000016D4 6000 021E 3056 BRA LAB_EVIR * evaluate integer expression (no sign check) +000016D8 3057 * result in d0 and Itemp & return +000016D8 3058 +000016D8 3059 +000016D8 3060 ************************************************************************************* +000016D8 3061 * +000016D8 3062 * perform NOT +000016D8 3063 +000016D8 3064 LAB_EQUAL +000016D8 6100 021A 3065 BSR LAB_EVIR * evaluate integer expression (no sign check) +000016DC 3066 * result in d0 and Itemp +000016DC 4680 3067 NOT.l d0 * bitwise invert +000016DE 6000 03C8 3068 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & RET +000016E2 3069 +000016E2 3070 +000016E2 3071 ************************************************************************************* +000016E2 3072 * +000016E2 3073 * perform comparisons +000016E2 3074 * do < compare +000016E2 3075 +000016E2 3076 LAB_LTHAN +000016E2 6100 FD50 3077 BSR LAB_CKTM * type match check, set C for string +000016E6 6506 3078 BCS.s LAB_1CAE * branch if string +000016E8 3079 +000016E8 3080 * do numeric < compare +000016E8 6100 0D48 3081 BSR LAB_27FA * compare FAC1 with FAC2 +000016EC 3082 * returns d0=+1 if FAC1 > FAC2 +000016EC 3083 * returns d0= 0 if FAC1 = FAC2 +000016EC 3084 * returns d0=-1 if FAC1 < FAC2 +000016EC 6042 3085 BRA.s LAB_1CF2 * process result +000016EE 3086 +000016EE 3087 * do string < compare +000016EE 3088 LAB_1CAE +000016EE 177C 0000 05B5 3089 MOVE.b #$00,Dtypef(a3) * clear data type, $80=string, $40=integer, +000016F4 3090 * $00=float +000016F4 6100 06BC 3091 BSR LAB_22B6 * pop string off descriptor stack, or from top +000016F8 3092 * of string space returns d0 = length, +000016F8 3093 * a0 = pointer +000016F8 2248 3094 MOVEA.l a0,a1 * copy string 2 pointer +000016FA 2200 3095 MOVE.l d0,d1 * copy string 2 length +000016FC 206B 0598 3096 MOVEA.l FAC2_m(a3),a0 * get string 1 descriptor pointer +00001700 6100 06B4 3097 BSR LAB_22BA * pop (a0) descriptor, returns with .. +00001704 3098 * d0 = length, a0 = pointer +00001704 2400 3099 MOVE.l d0,d2 * copy length +00001706 6604 3100 BNE.s LAB_1CB5 * branch if not null string +00001708 3101 +00001708 4A81 3102 TST.l d1 * test if string 2 is null also +0000170A 6724 3103 BEQ.s LAB_1CF2 * if so do string 1 = string 2 +0000170C 3104 +0000170C 3105 LAB_1CB5 +0000170C 9481 3106 SUB.l d1,d2 * subtract string 2 length +0000170E 670C 3107 BEQ.s LAB_1CD5 * branch if strings = length +00001710 3108 +00001710 6504 3109 BCS.s LAB_1CD4 * branch if string 1 < string 2 +00001712 3110 +00001712 70FF 3111 MOVEQ #-1,d0 * set for string 1 > string 2 +00001714 6008 3112 BRA.s LAB_1CD6 * go do character comapare +00001716 3113 +00001716 3114 LAB_1CD4 +00001716 2200 3115 MOVE.l d0,d1 * string 1 length is compare length +00001718 7001 3116 MOVEQ #1,d0 * and set for string 1 < string 2 +0000171A 6002 3117 BRA.s LAB_1CD6 * go do character comapare +0000171C 3118 +0000171C 3119 LAB_1CD5 +0000171C 2002 3120 MOVE.l d2,d0 * set for string 1 = string 2 +0000171E 3121 LAB_1CD6 +0000171E 5381 3122 SUBQ.l #1,d1 * adjust length for DBcc loop +00001720 3123 +00001720 3124 * d1 is length to compare, d0 is <=> for length +00001720 3125 * a0 is string 1 pointer, a1 is string 2 pointer +00001720 3126 LAB_1CE6 +00001720 B308 3127 CMPM.b (a0)+,(a1)+ * compare string bytes (1 with 2) +00001722 56C9 FFFC 3128 DBNE d1,LAB_1CE6 * loop if same and not end yet +00001726 3129 +00001726 6708 3130 BEQ.s LAB_1CF2 * if = to here, then go use length compare +00001728 3131 +00001728 6404 3132 BCC.s LAB_1CDB * else branch if string 1 > string 2 +0000172A 3133 +0000172A 70FF 3134 MOVEQ #-1,d0 * else set for string 1 < string 2 +0000172C 6002 3135 BRA.s LAB_1CF2 * go set result +0000172E 3136 +0000172E 3137 LAB_1CDB +0000172E 7001 3138 MOVEQ #1,d0 * and set for string 1 > string 2 +00001730 3139 +00001730 3140 LAB_1CF2 +00001730 5200 3141 ADDQ.b #1,d0 * make result 0, 1 or 2 +00001732 1200 3142 MOVE.b d0,d1 * copy to d1 +00001734 7001 3143 MOVEQ #1,d0 * set d0 longword +00001736 E338 3144 ROL.b d1,d0 * make 1, 2 or 4 (result = flag bit) +00001738 C02B 05E1 3145 AND.b Cflag(a3),d0 * AND with comparison evaluation flag +0000173C 6700 0CDC 3146 BEQ LAB_27DB * exit if not a wanted result (i.e. false) +00001740 3147 +00001740 70FF 3148 MOVEQ #-1,d0 * else set -1 (true) +00001742 6000 0CD6 3149 BRA LAB_27DB * save d0 as integer & return +00001746 3150 +00001746 3151 +00001746 3152 LAB_1CFE +00001746 6100 FE56 3153 BSR LAB_1C01 * scan for ",", else do syntax error/warm start +0000174A 3154 +0000174A 3155 +0000174A 3156 ************************************************************************************* +0000174A 3157 * +0000174A 3158 * perform DIM +0000174A 3159 +0000174A 3160 LAB_DIM +0000174A 72FF 3161 MOVEQ #-1,d1 * set "DIM" flag +0000174C 6170 3162 BSR.s LAB_1D10 * search for or dimension a variable +0000174E 6100 FE5A 3163 BSR LAB_GBYT * scan memory +00001752 66F2 3164 BNE.s LAB_1CFE * loop and scan for "," if not null +00001754 3165 +00001754 4E75 3166 RTS +00001756 3167 +00001756 3168 +00001756 3169 ************************************************************************************* +00001756 3170 * +00001756 3171 * perform << (left shift) +00001756 3172 +00001756 3173 LAB_LSHIFT +00001756 612E 3174 BSR.s GetPair * get an integer and byte pair +00001758 3175 * byte is in d2, integer is in d0 and Itemp +00001758 6708 3176 BEQ.s NoShift * branch if byte zero +0000175A 3177 +0000175A B43C 0020 3178 CMP.b #$20,d2 * compare bit count with 32d +0000175E 6420 3179 BCC.s TooBig * branch if >= +00001760 3180 +00001760 E5A0 3181 ASL.l d2,d0 * shift longword +00001762 3182 NoShift +00001762 6000 0344 3183 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & RET +00001766 3184 +00001766 3185 +00001766 3186 ************************************************************************************* +00001766 3187 * +00001766 3188 * perform >> (right shift) +00001766 3189 +00001766 3190 LAB_RSHIFT +00001766 611E 3191 BSR.s GetPair * get an integer and byte pair +00001768 3192 * byte is in d2, integer is in d0 and Itemp +00001768 67F8 3193 BEQ.s NoShift * branch if byte zero +0000176A 3194 +0000176A B43C 0020 3195 CMP.b #$20,d2 * compare bit count with 32d +0000176E 650A 3196 BCS.s Not2Big * branch if >= (return shift) +00001770 3197 +00001770 4A80 3198 TST.l d0 * test sign bit +00001772 6A0C 3199 BPL.s TooBig * branch if +ve +00001774 3200 +00001774 70FF 3201 MOVEQ #-1,d0 * set longword +00001776 6000 0330 3202 BRA LAB_AYFC * convert d0 to longword in FAC1 & RET +0000177A 3203 +0000177A 3204 Not2Big +0000177A E4A0 3205 ASR.l d2,d0 * shift longword +0000177C 6000 032A 3206 BRA LAB_AYFC * convert d0 to longword in FAC1 & RET +00001780 3207 +00001780 3208 TooBig +00001780 7000 3209 MOVEQ #0,d0 * clear longword +00001782 6000 0324 3210 BRA LAB_AYFC * convert d0 to longword in FAC1 & RET +00001786 3211 +00001786 3212 +00001786 3213 ************************************************************************************* +00001786 3214 * +00001786 3215 * get an integer and byte pair +00001786 3216 * byte is in d2, integer is in d0 and Itemp +00001786 3217 +00001786 3218 GetPair +00001786 6100 078E 3219 BSR LAB_EVBY * evaluate byte expression, result in d0 and +0000178A 3220 * Itemp +0000178A 1400 3221 MOVE.b d0,d2 * save it +0000178C 6100 0C38 3222 BSR LAB_279B * copy FAC2 to FAC1, get first value in +00001790 3223 * expression +00001790 6100 0162 3224 BSR LAB_EVIR * evaluate integer expression (no sign check) +00001794 3225 * result in d0 and Itemp +00001794 4A02 3226 TST.b d2 * test byte value +00001796 4E75 3227 RTS +00001798 3228 +00001798 3229 +00001798 3230 ************************************************************************************* +00001798 3231 * +00001798 3232 * check alpha, return C=0 if<"A" or >"Z" or <"a" to "z"> +00001798 3233 +00001798 3234 LAB_CASC +00001798 B03C 0061 3235 CMP.b #$61,d0 * compare with "a" +0000179C 6410 3236 BCC.s LAB_1D83 * if >="a" go check =<"z" +0000179E 3237 +0000179E 3238 +0000179E 3239 ************************************************************************************* +0000179E 3240 * +0000179E 3241 * check alpha upper case, return C=0 if<"A" or >"Z" +0000179E 3242 +0000179E 3243 LAB_CAUC +0000179E B03C 0041 3244 CMP.b #$41,d0 * compare with "A" +000017A2 6404 3245 BCC.s LAB_1D8A * if >="A" go check =<"Z" +000017A4 3246 +000017A4 8040 3247 OR d0,d0 * make C=0 +000017A6 4E75 3248 RTS +000017A8 3249 +000017A8 3250 LAB_1D8A +000017A8 B03C 005B 3251 CMP.b #$5B,d0 * compare with "Z"+1 +000017AC 3252 * carry set if byte<="Z" +000017AC 4E75 3253 RTS +000017AE 3254 +000017AE 3255 LAB_1D83 +000017AE B03C 007B 3256 CMP.b #$7B,d0 * compare with "z"+1 +000017B2 3257 * carry set if byte<="z" +000017B2 4E75 3258 RTS +000017B4 3259 +000017B4 3260 +000017B4 3261 ************************************************************************************* +000017B4 3262 * +000017B4 3263 * search for or create variable. this is used to automatically create a variable if +000017B4 3264 * it is not found. any routines that need to create the variable call LAB_GVAR via +000017B4 3265 * this point and error generation is supressed and the variable will be created +000017B4 3266 * +000017B4 3267 * return pointer to variable in Cvaral and a0 +000017B4 3268 * set data type to variable type +000017B4 3269 +000017B4 3270 LAB_SVAR +000017B4 6102 3271 BSR.s LAB_GVAR * search for variable +000017B6 3272 LAB_FVAR +000017B6 4E75 3273 RTS +000017B8 3274 +000017B8 3275 +000017B8 3276 ************************************************************************************* +000017B8 3277 * +000017B8 3278 * search for variable. if this routine is called from anywhere but the above call and +000017B8 3279 * the variable searched for does not exist then an error will be returned +000017B8 3280 * +000017B8 3281 * DIM flag is in d1.b +000017B8 3282 * return pointer to variable in Cvaral and a0 +000017B8 3283 * set data type to variable type +000017B8 3284 +000017B8 3285 LAB_GVAR +000017B8 7200 3286 MOVEQ #$00,d1 * set DIM flag = $00 +000017BA 6100 FDEE 3287 BSR LAB_GBYT * scan memory (1st character) +000017BE 3288 LAB_1D10 +000017BE 1741 05B4 3289 MOVE.b d1,Defdim(a3) * save DIM flag +000017C2 3290 +000017C2 3291 * search for FN name entry point 000017C2 3292 -000017C2 3293 * search for FN name entry point -000017C2 3294 -000017C2 3295 LAB_1D12 -000017C2 61D4 3296 BSR.s LAB_CASC * check byte, return C=0 if<"A" or >"Z" -000017C4 6400 F1A4 3297 BCC LAB_SNER * if not, syntax error then warm start -000017C8 3298 -000017C8 3299 * it is a variable name so ... -000017C8 7200 3300 MOVEQ #$0,d1 * set index for name byte -000017CA 41EB 0CCE 3301 LEA Varname(a3),a0 * pointer to variable name -000017CE 2081 3302 MOVE.l d1,(a0) * clear the variable name -000017D0 1741 0E19 3303 MOVE.b d1,Dtypef(a3) * clear the data type, $80=string, $40=integer, -000017D4 3304 * $00=float -000017D4 3305 -000017D4 3306 LAB_1D2D -000017D4 B27C 0004 3307 CMP.w #$04,d1 * done all significant characters? -000017D8 6406 3308 BCC.s LAB_1D2E * if so go ignore any more -000017DA 3309 -000017DA 1180 1000 3310 MOVE.b d0,(a0,d1.w) * save the character -000017DE 5241 3311 ADDQ.w #1,d1 * increment index -000017E0 3312 LAB_1D2E -000017E0 6100 FDC6 3313 BSR LAB_IGBY * increment & scan memory (next character) -000017E4 65EE 3314 BCS.s LAB_1D2D * branch if character = "0"-"9" (ok) -000017E6 3315 -000017E6 3316 * character wasn't "0" to "9" so ... -000017E6 61B0 3317 BSR.s LAB_CASC * check byte, return C=0 if<"A" or >"Z" -000017E8 65EA 3318 BCS.s LAB_1D2D * branch if = "A"-"Z" (ok) -000017EA 3319 -000017EA 3320 * check if string variable -000017EA B03C 0024 3321 CMP.b #'$',d0 * compare with "$" -000017EE 660C 3322 BNE.s LAB_1D44 * branch if not string -000017F0 3323 -000017F0 3324 * type is string -000017F0 002B 0080 0CCF 3325 OR.b #$80,Varname+1(a3) * set top bit of 2nd character, indicate string -000017F6 6100 FDB0 3326 BSR LAB_IGBY * increment & scan memory -000017FA 6010 3327 BRA.s LAB_1D45 * skip integer check -000017FC 3328 -000017FC 3329 * check if integer variable -000017FC 3330 LAB_1D44 -000017FC B03C 0026 3331 CMP.b #'&',d0 * compare with "&" -00001800 660A 3332 BNE.s LAB_1D45 * branch if not integer -00001802 3333 -00001802 3334 * type is integer -00001802 002B 0080 0CD0 3335 OR.b #$80,Varname+2(a3) * set top bit of 3rd character, indicate integer -00001808 6100 FD9E 3336 BSR LAB_IGBY * increment & scan memory -0000180C 3337 -0000180C 3338 * after we have determined the variable type we need to determine -0000180C 3339 * if it's an array of type -0000180C 3340 -0000180C 3341 * gets here with character after var name in d0 -0000180C 3342 LAB_1D45 -0000180C 4A2B 0E43 3343 TST.b Sufnxf(a3) * test function name flag -00001810 670E 3344 BEQ.s LAB_1D48 * if not FN or FN variable continue -00001812 3345 -00001812 6A14 3346 BPL.s LAB_1D49 * if FN variable go find or create it -00001814 3347 -00001814 3348 * else was FN name -00001814 202B 0CCE 3349 MOVE.l Varname(a3),d0 * get whole function name -00001818 7208 3350 MOVEQ #8,d1 * set step to next function size -4 -0000181A 41EB 0C96 3351 LEA Sfncl(a3),a0 * get pointer to start of functions -0000181E 601C 3352 BRA.s LAB_1D4B * go find function -00001820 3353 -00001820 3354 LAB_1D48 -00001820 0400 0028 3355 SUB.b #'(',d0 * subtract "(" -00001824 6700 00F4 3356 BEQ LAB_1E17 * if "(" go find, or make, array -00001828 3357 -00001828 3358 * either find or create var -00001828 3359 * var name (1st four characters only!) is in Varname -00001828 3360 -00001828 3361 * variable name wasn't var( .. so look for -00001828 3362 * plain variable -00001828 3363 LAB_1D49 -00001828 202B 0CCE 3364 MOVE.l Varname(a3),d0 * get whole variable name -0000182C 3365 LAB_1D4A -0000182C 7204 3366 MOVEQ #4,d1 * set step to next variable size -4 -0000182E 41EB 0C9A 3367 LEA Svarl(a3),a0 * get pointer to start of variables -00001832 3368 -00001832 0800 0017 3369 BTST.l #23,d0 * test if string name -00001836 6704 3370 BEQ.s LAB_1D4B * branch if not -00001838 3371 -00001838 5441 3372 ADDQ.w #2,d1 * 6 bytes per string entry -0000183A 5848 3373 ADDQ.w #(Sstrl-Svarl),a0 * move to string area -0000183C 3374 -0000183C 3375 LAB_1D4B -0000183C 2268 0004 3376 MOVEA.l 4(a0),a1 * get end address -00001840 2050 3377 MOVEA.l (a0),a0 * get start address -00001842 6006 3378 BRA.s LAB_1D5E * enter loop at exit check -00001844 3379 -00001844 3380 LAB_1D5D -00001844 B098 3381 CMP.l (a0)+,d0 * compare this variable with name -00001846 6776 3382 BEQ.s LAB_1DD7 * branch if match (found var) -00001848 3383 -00001848 D1C1 3384 ADDA.l d1,a0 * add offset to next variable -0000184A 3385 LAB_1D5E -0000184A B1C9 3386 CMPA.l a1,a0 * compare address with variable space end -0000184C 66F6 3387 BNE.s LAB_1D5D * if not end go check next -0000184E 3388 -0000184E 4A2B 0E43 3389 TST.b Sufnxf(a3) * is it a function or function variable -00001852 660A 3390 BNE.s LAB_1D94 * if was go do DEF or function variable -00001854 3391 -00001854 3392 * reached end of variable mem without match -00001854 3393 * ... so create new variable, possibly -00001854 3394 -00001854 45FA FF60 3395 LEA LAB_FVAR(pc),a2 * get the address of the create if doesn't -00001858 3396 * exist call to LAB_GVAR -00001858 B5D7 3397 CMPA.l (sp),a2 * compare the return address with expected -0000185A 6600 F0CA 3398 BNE LAB_UVER * if not create go do error or return null +000017C2 3293 LAB_1D12 +000017C2 61D4 3294 BSR.s LAB_CASC * check byte, return C=0 if<"A" or >"Z" +000017C4 6400 F1A4 3295 BCC LAB_SNER * if not, syntax error then warm start +000017C8 3296 +000017C8 3297 * it is a variable name so ... +000017C8 7200 3298 MOVEQ #$0,d1 * set index for name byte +000017CA 41EB 046A 3299 LEA Varname(a3),a0 * pointer to variable name +000017CE 2081 3300 MOVE.l d1,(a0) * clear the variable name +000017D0 1741 05B5 3301 MOVE.b d1,Dtypef(a3) * clear the data type, $80=string, $40=integer, +000017D4 3302 * $00=float +000017D4 3303 +000017D4 3304 LAB_1D2D +000017D4 B27C 0004 3305 CMP.w #$04,d1 * done all significant characters? +000017D8 6406 3306 BCC.s LAB_1D2E * if so go ignore any more +000017DA 3307 +000017DA 1180 1000 3308 MOVE.b d0,(a0,d1.w) * save the character +000017DE 5241 3309 ADDQ.w #1,d1 * increment index +000017E0 3310 LAB_1D2E +000017E0 6100 FDC6 3311 BSR LAB_IGBY * increment & scan memory (next character) +000017E4 65EE 3312 BCS.s LAB_1D2D * branch if character = "0"-"9" (ok) +000017E6 3313 +000017E6 3314 * character wasn't "0" to "9" so ... +000017E6 61B0 3315 BSR.s LAB_CASC * check byte, return C=0 if<"A" or >"Z" +000017E8 65EA 3316 BCS.s LAB_1D2D * branch if = "A"-"Z" (ok) +000017EA 3317 +000017EA 3318 * check if string variable +000017EA B03C 0024 3319 CMP.b #'$',d0 * compare with "$" +000017EE 660C 3320 BNE.s LAB_1D44 * branch if not string +000017F0 3321 +000017F0 3322 * type is string +000017F0 002B 0080 046B 3323 OR.b #$80,Varname+1(a3) * set top bit of 2nd character, indicate string +000017F6 6100 FDB0 3324 BSR LAB_IGBY * increment & scan memory +000017FA 6010 3325 BRA.s LAB_1D45 * skip integer check +000017FC 3326 +000017FC 3327 * check if integer variable +000017FC 3328 LAB_1D44 +000017FC B03C 0026 3329 CMP.b #'&',d0 * compare with "&" +00001800 660A 3330 BNE.s LAB_1D45 * branch if not integer +00001802 3331 +00001802 3332 * type is integer +00001802 002B 0080 046C 3333 OR.b #$80,Varname+2(a3) * set top bit of 3rd character, indicate integer +00001808 6100 FD9E 3334 BSR LAB_IGBY * increment & scan memory +0000180C 3335 +0000180C 3336 * after we have determined the variable type we need to determine +0000180C 3337 * if it's an array of type +0000180C 3338 +0000180C 3339 * gets here with character after var name in d0 +0000180C 3340 LAB_1D45 +0000180C 4A2B 05DF 3341 TST.b Sufnxf(a3) * test function name flag +00001810 670E 3342 BEQ.s LAB_1D48 * if not FN or FN variable continue +00001812 3343 +00001812 6A14 3344 BPL.s LAB_1D49 * if FN variable go find or create it +00001814 3345 +00001814 3346 * else was FN name +00001814 202B 046A 3347 MOVE.l Varname(a3),d0 * get whole function name +00001818 7208 3348 MOVEQ #8,d1 * set step to next function size -4 +0000181A 41EB 0432 3349 LEA Sfncl(a3),a0 * get pointer to start of functions +0000181E 601C 3350 BRA.s LAB_1D4B * go find function +00001820 3351 +00001820 3352 LAB_1D48 +00001820 0400 0028 3353 SUB.b #'(',d0 * subtract "(" +00001824 6700 00F4 3354 BEQ LAB_1E17 * if "(" go find, or make, array +00001828 3355 +00001828 3356 * either find or create var +00001828 3357 * var name (1st four characters only!) is in Varname +00001828 3358 +00001828 3359 * variable name wasn't var( .. so look for +00001828 3360 * plain variable +00001828 3361 LAB_1D49 +00001828 202B 046A 3362 MOVE.l Varname(a3),d0 * get whole variable name +0000182C 3363 LAB_1D4A +0000182C 7204 3364 MOVEQ #4,d1 * set step to next variable size -4 +0000182E 41EB 0436 3365 LEA Svarl(a3),a0 * get pointer to start of variables +00001832 3366 +00001832 0800 0017 3367 BTST.l #23,d0 * test if string name +00001836 6704 3368 BEQ.s LAB_1D4B * branch if not +00001838 3369 +00001838 5441 3370 ADDQ.w #2,d1 * 6 bytes per string entry +0000183A 5848 3371 ADDQ.w #(Sstrl-Svarl),a0 * move to string area +0000183C 3372 +0000183C 3373 LAB_1D4B +0000183C 2268 0004 3374 MOVEA.l 4(a0),a1 * get end address +00001840 2050 3375 MOVEA.l (a0),a0 * get start address +00001842 6006 3376 BRA.s LAB_1D5E * enter loop at exit check +00001844 3377 +00001844 3378 LAB_1D5D +00001844 B098 3379 CMP.l (a0)+,d0 * compare this variable with name +00001846 6776 3380 BEQ.s LAB_1DD7 * branch if match (found var) +00001848 3381 +00001848 D1C1 3382 ADDA.l d1,a0 * add offset to next variable +0000184A 3383 LAB_1D5E +0000184A B1C9 3384 CMPA.l a1,a0 * compare address with variable space end +0000184C 66F6 3385 BNE.s LAB_1D5D * if not end go check next +0000184E 3386 +0000184E 4A2B 05DF 3387 TST.b Sufnxf(a3) * is it a function or function variable +00001852 660A 3388 BNE.s LAB_1D94 * if was go do DEF or function variable +00001854 3389 +00001854 3390 * reached end of variable mem without match +00001854 3391 * ... so create new variable, possibly +00001854 3392 +00001854 45FA FF60 3393 LEA LAB_FVAR(pc),a2 * get the address of the create if doesn't +00001858 3394 * exist call to LAB_GVAR +00001858 B5D7 3395 CMPA.l (sp),a2 * compare the return address with expected +0000185A 6600 F0CA 3396 BNE LAB_UVER * if not create go do error or return null +0000185E 3397 +0000185E 3398 * this will only branch if the call to LAB_GVAR wasn't from LAB_SVAR 0000185E 3399 -0000185E 3400 * this will only branch if the call to LAB_GVAR wasn't from LAB_SVAR -0000185E 3401 -0000185E 3402 LAB_1D94 -0000185E 082B 0000 0E43 3403 BTST.b #0,Sufnxf(a3) * test function search flag -00001864 6600 F0C8 3404 BNE LAB_UFER * if not doing DEF then go do undefined -00001868 3405 * function error -00001868 3406 -00001868 3407 * else create new variable/function -00001868 3408 LAB_1D98 -00001868 246B 0CA6 3409 MOVEA.l Earryl(a3),a2 * get end of block to move -0000186C 240A 3410 MOVE.l a2,d2 * copy end of block to move -0000186E 9489 3411 SUB.l a1,d2 * calculate block to move size -00001870 3412 -00001870 204A 3413 MOVEA.l a2,a0 * copy end of block to move -00001872 5881 3414 ADDQ.l #4,d1 * space for one variable/function + name -00001874 D5C1 3415 ADDA.l d1,a2 * add space for one variable/function -00001876 274A 0CA6 3416 MOVE.l a2,Earryl(a3) * set new array mem end -0000187A E28A 3417 LSR.l #1,d2 * /2 for word copy -0000187C 6712 3418 BEQ.s LAB_1DAF * skip move if zero length block -0000187E 3419 -0000187E 5382 3420 SUBQ.l #1,d2 * -1 for DFB loop -00001880 4842 3421 SWAP d2 * swap high word to low word -00001882 3422 LAB_1DAC -00001882 4842 3423 SWAP d2 * swap high word to low word -00001884 3424 LAB_1DAE -00001884 3520 3425 MOVE.w -(a0),-(a2) * copy word -00001886 51CA FFFC 3426 DBF d2,LAB_1DAE * loop until done -0000188A 3427 -0000188A 4842 3428 SWAP d2 * swap high word to low word -0000188C 51CA FFF4 3429 DBF d2,LAB_1DAC * decrement high count and loop until done -00001890 3430 -00001890 3431 * get here after creating either a function, variable or string -00001890 3432 * if function set variables start, string start, array start -00001890 3433 * if variable set string start, array start -00001890 3434 * if string set array start -00001890 3435 -00001890 3436 LAB_1DAF -00001890 4A2B 0E43 3437 TST.b Sufnxf(a3) * was it function -00001894 6B08 3438 BMI.s LAB_1DB0 * branch if was FN -00001896 3439 -00001896 0800 0017 3440 BTST.l #23,d0 * was it string -0000189A 660A 3441 BNE.s LAB_1DB2 * branch if string -0000189C 3442 -0000189C 6004 3443 BRA.s LAB_1DB1 * branch if was plain variable -0000189E 3444 -0000189E 3445 LAB_1DB0 -0000189E D3AB 0C9A 3446 ADD.l d1,Svarl(a3) * set new variable memory start -000018A2 3447 LAB_1DB1 -000018A2 D3AB 0C9E 3448 ADD.l d1,Sstrl(a3) * set new start of strings -000018A6 3449 LAB_1DB2 -000018A6 D3AB 0CA2 3450 ADD.l d1,Sarryl(a3) * set new array memory start -000018AA 20C0 3451 MOVE.l d0,(a0)+ * save variable/function name -000018AC 20BC 00000000 3452 MOVE.l #$00,(a0) * initialise variable -000018B2 0800 0017 3453 BTST.l #23,d0 * was it string -000018B6 6706 3454 BEQ.s LAB_1DD7 * branch if not string -000018B8 3455 -000018B8 317C 0000 0004 3456 MOVE.w #$00,4(a0) * else initialise string length -000018BE 3457 -000018BE 3458 * found a match for var ((Vrschl) = ptr) -000018BE 3459 LAB_1DD7 -000018BE 2200 3460 MOVE.l d0,d1 * ........ $....... &....... ........ -000018C0 D281 3461 ADD.l d1,d1 * .......$ .......& ........ .......0 -000018C2 4841 3462 SWAP d1 * ........ .......0 .......$ .......& -000018C4 E219 3463 ROR.b #1,d1 * ........ .......0 .......$ &....... -000018C6 E249 3464 LSR.w #1,d1 * ........ .......0 0....... $&.....­. -000018C8 C23C 00C0 3465 AND.b #$C0,d1 * mask the type bits -000018CC 1741 0E19 3466 MOVE.b d1,Dtypef(a3) * save the data type -000018D0 3467 -000018D0 177C 0000 0E43 3468 MOVE.b #$00,Sufnxf(a3) * clear FN flag byte -000018D6 3469 -000018D6 3470 * if you want a non existant variable to return a null value then set the novar -000018D6 3471 * value at the top of this file to some non zero value -000018D6 3472 -000018D6 FALSE 3473 ifne novar -000018D6 3474 endc -000018D6 3475 -000018D6 4E75 3476 RTS -000018D8 3477 -000018D8 3478 -000018D8 3479 ************************************************************************************* -000018D8 3480 * -000018D8 3481 * set-up array pointer, d0, to first element in array -000018D8 3482 * set d0 to (a0)+2*(Dimcnt)+$0A -000018D8 3483 -000018D8 3484 LAB_1DE6 -000018D8 7005 3485 MOVEQ #5,d0 * set d0 to 5 (*2 = 10, later) -000018DA D02B 0E3F 3486 ADD.b Dimcnt(a3),d0 * add # of dimensions (1, 2 or 3) -000018DE D080 3487 ADD.l d0,d0 * *2 (bytes per dimension size) -000018E0 D088 3488 ADD.l a0,d0 * add array start pointer -000018E2 4E75 3489 RTS -000018E4 3490 -000018E4 3491 -000018E4 3492 ************************************************************************************* -000018E4 3493 * -000018E4 3494 * evaluate unsigned integer expression -000018E4 3495 -000018E4 3496 LAB_EVIN -000018E4 6100 FCC2 3497 BSR LAB_IGBY * increment & scan memory -000018E8 6100 FB46 3498 BSR LAB_EVNM * evaluate expression & check is numeric, -000018EC 3499 * else do type mismatch -000018EC 3500 -000018EC 3501 -000018EC 3502 ************************************************************************************* -000018EC 3503 * -000018EC 3504 * evaluate positive integer expression, result in d0 and Itemp -000018EC 3505 -000018EC 3506 LAB_EVPI -000018EC 4A2B 0DF9 3507 TST.b FAC1_s(a3) * test FAC1 sign (b7) -000018F0 6B00 F06C 3508 BMI LAB_FCER * do function call error if -ve -000018F4 3509 -000018F4 3510 -000018F4 3511 ************************************************************************************* -000018F4 3512 * -000018F4 3513 * evaluate integer expression, no sign check -000018F4 3514 * result in d0 and Itemp, exit with flags set correctly -000018F4 3515 -000018F4 3516 LAB_EVIR -000018F4 0C2B 00A0 0DF8 3517 CMPI.b #$A0,FAC1_e(a3) * compare exponent with exponent = 2^32 (n>2^31) -000018FA 6500 0B62 3518 BCS LAB_2831 * convert FAC1 floating to fixed -000018FE 3519 * result in d0 and Itemp -000018FE 6600 F05E 3520 BNE LAB_FCER * if > do function call error, then warm start -00001902 3521 -00001902 4A2B 0DF9 3522 TST.b FAC1_s(a3) * test sign of FAC1 -00001906 6A00 0B56 3523 BPL LAB_2831 * if +ve then ok -0000190A 3524 -0000190A 202B 0DF4 3525 MOVE.l FAC1_m(a3),d0 * get mantissa -0000190E 4480 3526 NEG.l d0 * do -d0 -00001910 6800 F04C 3527 BVC LAB_FCER * if not $80000000 do FC error, then warm start -00001914 3528 -00001914 2740 0C8E 3529 MOVE.l d0,Itemp(a3) * else just set it -00001918 4E75 3530 RTS -0000191A 3531 -0000191A 3532 -0000191A 3533 ************************************************************************************* -0000191A 3534 * -0000191A 3535 * find or make array -0000191A 3536 -0000191A 3537 LAB_1E17 -0000191A 3F2B 0E18 3538 MOVE.w Defdim(a3),-(sp) * get DIM flag and data type flag (word in mem) -0000191E 7200 3539 MOVEQ #0,d1 * clear dimensions count +0000185E 3400 LAB_1D94 +0000185E 082B 0000 05DF 3401 BTST.b #0,Sufnxf(a3) * test function search flag +00001864 6600 F0C8 3402 BNE LAB_UFER * if not doing DEF then go do undefined +00001868 3403 * function error +00001868 3404 +00001868 3405 * else create new variable/function +00001868 3406 LAB_1D98 +00001868 246B 0442 3407 MOVEA.l Earryl(a3),a2 * get end of block to move +0000186C 240A 3408 MOVE.l a2,d2 * copy end of block to move +0000186E 9489 3409 SUB.l a1,d2 * calculate block to move size +00001870 3410 +00001870 204A 3411 MOVEA.l a2,a0 * copy end of block to move +00001872 5881 3412 ADDQ.l #4,d1 * space for one variable/function + name +00001874 D5C1 3413 ADDA.l d1,a2 * add space for one variable/function +00001876 274A 0442 3414 MOVE.l a2,Earryl(a3) * set new array mem end +0000187A E28A 3415 LSR.l #1,d2 * /2 for word copy +0000187C 6712 3416 BEQ.s LAB_1DAF * skip move if zero length block +0000187E 3417 +0000187E 5382 3418 SUBQ.l #1,d2 * -1 for DFB loop +00001880 4842 3419 SWAP d2 * swap high word to low word +00001882 3420 LAB_1DAC +00001882 4842 3421 SWAP d2 * swap high word to low word +00001884 3422 LAB_1DAE +00001884 3520 3423 MOVE.w -(a0),-(a2) * copy word +00001886 51CA FFFC 3424 DBF d2,LAB_1DAE * loop until done +0000188A 3425 +0000188A 4842 3426 SWAP d2 * swap high word to low word +0000188C 51CA FFF4 3427 DBF d2,LAB_1DAC * decrement high count and loop until done +00001890 3428 +00001890 3429 * get here after creating either a function, variable or string +00001890 3430 * if function set variables start, string start, array start +00001890 3431 * if variable set string start, array start +00001890 3432 * if string set array start +00001890 3433 +00001890 3434 LAB_1DAF +00001890 4A2B 05DF 3435 TST.b Sufnxf(a3) * was it function +00001894 6B08 3436 BMI.s LAB_1DB0 * branch if was FN +00001896 3437 +00001896 0800 0017 3438 BTST.l #23,d0 * was it string +0000189A 660A 3439 BNE.s LAB_1DB2 * branch if string +0000189C 3440 +0000189C 6004 3441 BRA.s LAB_1DB1 * branch if was plain variable +0000189E 3442 +0000189E 3443 LAB_1DB0 +0000189E D3AB 0436 3444 ADD.l d1,Svarl(a3) * set new variable memory start +000018A2 3445 LAB_1DB1 +000018A2 D3AB 043A 3446 ADD.l d1,Sstrl(a3) * set new start of strings +000018A6 3447 LAB_1DB2 +000018A6 D3AB 043E 3448 ADD.l d1,Sarryl(a3) * set new array memory start +000018AA 20C0 3449 MOVE.l d0,(a0)+ * save variable/function name +000018AC 20BC 00000000 3450 MOVE.l #$00,(a0) * initialise variable +000018B2 0800 0017 3451 BTST.l #23,d0 * was it string +000018B6 6706 3452 BEQ.s LAB_1DD7 * branch if not string +000018B8 3453 +000018B8 317C 0000 0004 3454 MOVE.w #$00,4(a0) * else initialise string length +000018BE 3455 +000018BE 3456 * found a match for var ((Vrschl) = ptr) +000018BE 3457 LAB_1DD7 +000018BE 2200 3458 MOVE.l d0,d1 * ........ $....... &....... ........ +000018C0 D281 3459 ADD.l d1,d1 * .......$ .......& ........ .......0 +000018C2 4841 3460 SWAP d1 * ........ .......0 .......$ .......& +000018C4 E219 3461 ROR.b #1,d1 * ........ .......0 .......$ &....... +000018C6 E249 3462 LSR.w #1,d1 * ........ .......0 0....... $&.....?. +000018C8 C23C 00C0 3463 AND.b #$C0,d1 * mask the type bits +000018CC 1741 05B5 3464 MOVE.b d1,Dtypef(a3) * save the data type +000018D0 3465 +000018D0 177C 0000 05DF 3466 MOVE.b #$00,Sufnxf(a3) * clear FN flag byte +000018D6 3467 +000018D6 3468 * if you want a non existant variable to return a null value then set the novar +000018D6 3469 * value at the top of this file to some non zero value +000018D6 3470 +000018D6 FALSE 3471 ifne novar +000018D6 3472 endc +000018D6 3473 +000018D6 4E75 3474 RTS +000018D8 3475 +000018D8 3476 +000018D8 3477 ************************************************************************************* +000018D8 3478 * +000018D8 3479 * set-up array pointer, d0, to first element in array +000018D8 3480 * set d0 to (a0)+2*(Dimcnt)+$0A +000018D8 3481 +000018D8 3482 LAB_1DE6 +000018D8 7005 3483 MOVEQ #5,d0 * set d0 to 5 (*2 = 10, later) +000018DA D02B 05DB 3484 ADD.b Dimcnt(a3),d0 * add # of dimensions (1, 2 or 3) +000018DE D080 3485 ADD.l d0,d0 * *2 (bytes per dimension size) +000018E0 D088 3486 ADD.l a0,d0 * add array start pointer +000018E2 4E75 3487 RTS +000018E4 3488 +000018E4 3489 +000018E4 3490 ************************************************************************************* +000018E4 3491 * +000018E4 3492 * evaluate unsigned integer expression +000018E4 3493 +000018E4 3494 LAB_EVIN +000018E4 6100 FCC2 3495 BSR LAB_IGBY * increment & scan memory +000018E8 6100 FB46 3496 BSR LAB_EVNM * evaluate expression & check is numeric, +000018EC 3497 * else do type mismatch +000018EC 3498 +000018EC 3499 +000018EC 3500 ************************************************************************************* +000018EC 3501 * +000018EC 3502 * evaluate positive integer expression, result in d0 and Itemp +000018EC 3503 +000018EC 3504 LAB_EVPI +000018EC 4A2B 0595 3505 TST.b FAC1_s(a3) * test FAC1 sign (b7) +000018F0 6B00 F06C 3506 BMI LAB_FCER * do function call error if -ve +000018F4 3507 +000018F4 3508 +000018F4 3509 ************************************************************************************* +000018F4 3510 * +000018F4 3511 * evaluate integer expression, no sign check +000018F4 3512 * result in d0 and Itemp, exit with flags set correctly +000018F4 3513 +000018F4 3514 LAB_EVIR +000018F4 0C2B 00A0 0594 3515 CMPI.b #$A0,FAC1_e(a3) * compare exponent with exponent = 2^32 (n>2^31) +000018FA 6500 0B62 3516 BCS LAB_2831 * convert FAC1 floating to fixed +000018FE 3517 * result in d0 and Itemp +000018FE 6600 F05E 3518 BNE LAB_FCER * if > do function call error, then warm start +00001902 3519 +00001902 4A2B 0595 3520 TST.b FAC1_s(a3) * test sign of FAC1 +00001906 6A00 0B56 3521 BPL LAB_2831 * if +ve then ok +0000190A 3522 +0000190A 202B 0590 3523 MOVE.l FAC1_m(a3),d0 * get mantissa +0000190E 4480 3524 NEG.l d0 * do -d0 +00001910 6800 F04C 3525 BVC LAB_FCER * if not $80000000 do FC error, then warm start +00001914 3526 +00001914 2740 042A 3527 MOVE.l d0,Itemp(a3) * else just set it +00001918 4E75 3528 RTS +0000191A 3529 +0000191A 3530 +0000191A 3531 ************************************************************************************* +0000191A 3532 * +0000191A 3533 * find or make array +0000191A 3534 +0000191A 3535 LAB_1E17 +0000191A 3F2B 05B4 3536 MOVE.w Defdim(a3),-(sp) * get DIM flag and data type flag (word in mem) +0000191E 7200 3537 MOVEQ #0,d1 * clear dimensions count +00001920 3538 +00001920 3539 * now get the array dimension(s) and stack it (them) before the data type and DIM flag 00001920 3540 -00001920 3541 * now get the array dimension(s) and stack it (them) before the data type and DIM flag -00001920 3542 -00001920 3543 LAB_1E1F -00001920 3F01 3544 MOVE.w d1,-(sp) * save dimensions count -00001922 2F2B 0CCE 3545 MOVE.l Varname(a3),-(sp) * save variable name -00001926 61BC 3546 BSR.s LAB_EVIN * evaluate integer expression -00001928 3547 -00001928 4840 3548 SWAP d0 * swap high word to low word -0000192A 4A40 3549 TST.w d0 * test swapped high word -0000192C 6600 F020 3550 BNE LAB_ABER * if too big do array bounds error -00001930 3551 -00001930 275F 0CCE 3552 MOVE.l (sp)+,Varname(a3) * restore variable name -00001934 321F 3553 MOVE.w (sp)+,d1 * restore dimensions count -00001936 301F 3554 MOVE.w (sp)+,d0 * restore DIM and data type flags -00001938 3F2B 0C90 3555 MOVE.w Itemp+2(a3),-(sp) * stack this dimension size -0000193C 3F00 3556 MOVE.w d0,-(sp) * save DIM and data type flags -0000193E 5241 3557 ADDQ.w #1,d1 * increment dimensions count -00001940 6100 FC68 3558 BSR LAB_GBYT * scan memory -00001944 B03C 002C 3559 CMP.b #$2C,d0 * compare with "," -00001948 67D6 3560 BEQ.s LAB_1E1F * if found go do next dimension -0000194A 3561 -0000194A 1741 0E3F 3562 MOVE.b d1,Dimcnt(a3) * store dimensions count -0000194E 6100 FC46 3563 BSR LAB_1BFB * scan for ")", else do syntax error/warm start -00001952 375F 0E18 3564 MOVE.w (sp)+,Defdim(a3) * restore DIM and data type flags (word in mem) -00001956 206B 0CA2 3565 MOVEA.l Sarryl(a3),a0 * get array mem start -0000195A 3566 -0000195A 3567 * now check to see if we are at the end of array memory (we would be if there were -0000195A 3568 * no arrays). -0000195A 3569 -0000195A 3570 LAB_1E5C -0000195A 2748 0E10 3571 MOVE.l a0,Astrtl(a3) * save as array start pointer -0000195E B1EB 0CA6 3572 CMPA.l Earryl(a3),a0 * compare with array mem end -00001962 672E 3573 BEQ.s LAB_1EA1 * go build array if not found -00001964 3574 -00001964 3575 * search for array -00001964 2010 3576 MOVE.l (a0),d0 * get this array name -00001966 B0AB 0CCE 3577 CMP.l Varname(a3),d0 * compare with array name -0000196A 670A 3578 BEQ.s LAB_1E8D * array found so branch -0000196C 3579 -0000196C 3580 * no match -0000196C 2068 0004 3581 MOVEA.l 4(a0),a0 * get this array size -00001970 D1EB 0E10 3582 ADDA.l Astrtl(a3),a0 * add to array start pointer -00001974 60E4 3583 BRA.s LAB_1E5C * go check next array -00001976 3584 -00001976 3585 * found array, are we trying to dimension it? -00001976 3586 LAB_1E8D -00001976 4A2B 0E18 3587 TST.b Defdim(a3) * are we trying to dimension it? -0000197A 6600 EFCE 3588 BNE LAB_DDER * if so do double dimension error/warm start +00001920 3541 LAB_1E1F +00001920 3F01 3542 MOVE.w d1,-(sp) * save dimensions count +00001922 2F2B 046A 3543 MOVE.l Varname(a3),-(sp) * save variable name +00001926 61BC 3544 BSR.s LAB_EVIN * evaluate integer expression +00001928 3545 +00001928 4840 3546 SWAP d0 * swap high word to low word +0000192A 4A40 3547 TST.w d0 * test swapped high word +0000192C 6600 F020 3548 BNE LAB_ABER * if too big do array bounds error +00001930 3549 +00001930 275F 046A 3550 MOVE.l (sp)+,Varname(a3) * restore variable name +00001934 321F 3551 MOVE.w (sp)+,d1 * restore dimensions count +00001936 301F 3552 MOVE.w (sp)+,d0 * restore DIM and data type flags +00001938 3F2B 042C 3553 MOVE.w Itemp+2(a3),-(sp) * stack this dimension size +0000193C 3F00 3554 MOVE.w d0,-(sp) * save DIM and data type flags +0000193E 5241 3555 ADDQ.w #1,d1 * increment dimensions count +00001940 6100 FC68 3556 BSR LAB_GBYT * scan memory +00001944 B03C 002C 3557 CMP.b #$2C,d0 * compare with "," +00001948 67D6 3558 BEQ.s LAB_1E1F * if found go do next dimension +0000194A 3559 +0000194A 1741 05DB 3560 MOVE.b d1,Dimcnt(a3) * store dimensions count +0000194E 6100 FC46 3561 BSR LAB_1BFB * scan for ")", else do syntax error/warm start +00001952 375F 05B4 3562 MOVE.w (sp)+,Defdim(a3) * restore DIM and data type flags (word in mem) +00001956 206B 043E 3563 MOVEA.l Sarryl(a3),a0 * get array mem start +0000195A 3564 +0000195A 3565 * now check to see if we are at the end of array memory (we would be if there were +0000195A 3566 * no arrays). +0000195A 3567 +0000195A 3568 LAB_1E5C +0000195A 2748 05AC 3569 MOVE.l a0,Astrtl(a3) * save as array start pointer +0000195E B1EB 0442 3570 CMPA.l Earryl(a3),a0 * compare with array mem end +00001962 672E 3571 BEQ.s LAB_1EA1 * go build array if not found +00001964 3572 +00001964 3573 * search for array +00001964 2010 3574 MOVE.l (a0),d0 * get this array name +00001966 B0AB 046A 3575 CMP.l Varname(a3),d0 * compare with array name +0000196A 670A 3576 BEQ.s LAB_1E8D * array found so branch +0000196C 3577 +0000196C 3578 * no match +0000196C 2068 0004 3579 MOVEA.l 4(a0),a0 * get this array size +00001970 D1EB 05AC 3580 ADDA.l Astrtl(a3),a0 * add to array start pointer +00001974 60E4 3581 BRA.s LAB_1E5C * go check next array +00001976 3582 +00001976 3583 * found array, are we trying to dimension it? +00001976 3584 LAB_1E8D +00001976 4A2B 05B4 3585 TST.b Defdim(a3) * are we trying to dimension it? +0000197A 6600 EFCE 3586 BNE LAB_DDER * if so do double dimension error/warm start +0000197E 3587 +0000197E 3588 * found the array and we're not dimensioning it so we must find an element in it 0000197E 3589 -0000197E 3590 * found the array and we're not dimensioning it so we must find an element in it -0000197E 3591 -0000197E 6100 FF58 3592 BSR LAB_1DE6 * set data pointer, d0, to the first element -00001982 3593 * in the array -00001982 5048 3594 ADDQ.w #8,a0 * index to dimension count -00001984 3018 3595 MOVE.w (a0)+,d0 * get no of dimensions -00001986 B02B 0E3F 3596 CMP.b Dimcnt(a3),d0 * compare with dimensions count -0000198A 6700 0094 3597 BEQ LAB_1F28 * found array so go get element -0000198E 3598 -0000198E 6000 EF8E 3599 BRA LAB_WDER * else wrong so do "Wrong dimensions" error -00001992 3600 -00001992 3601 * array not found, so possibly build it -00001992 3602 LAB_1EA1 -00001992 4A2B 0E18 3603 TST.b Defdim(a3) * test the default DIM flag -00001996 6700 EF8A 3604 BEQ LAB_UDER * if default flag is clear then we are not -0000199A 3605 * explicitly dimensioning an array so go -0000199A 3606 * do an "Undimensioned array" error -0000199A 3607 -0000199A 6100 FF3C 3608 BSR LAB_1DE6 * set data pointer, d0, to the first element -0000199E 3609 * in the array -0000199E 202B 0CCE 3610 MOVE.l Varname(a3),d0 * get array name -000019A2 20C0 3611 MOVE.l d0,(a0)+ * save array name -000019A4 7204 3612 MOVEQ #4,d1 * set 4 bytes per element -000019A6 0800 0017 3613 BTST.l #23,d0 * test if string array -000019AA 6702 3614 BEQ.s LAB_1EDF * branch if not string -000019AC 3615 -000019AC 7206 3616 MOVEQ #6,d1 * else 6 bytes per element -000019AE 3617 LAB_1EDF -000019AE 2741 0E0C 3618 MOVE.l d1,Asptl(a3) * set array data size (bytes per element) -000019B2 122B 0E3F 3619 MOVE.b Dimcnt(a3),d1 * get dimensions count -000019B6 5848 3620 ADDQ.w #4,a0 * skip the array size now (don't know it yet!) -000019B8 30C1 3621 MOVE.w d1,(a0)+ * set array's dimensions count +0000197E 6100 FF58 3590 BSR LAB_1DE6 * set data pointer, d0, to the first element +00001982 3591 * in the array +00001982 5048 3592 ADDQ.w #8,a0 * index to dimension count +00001984 3018 3593 MOVE.w (a0)+,d0 * get no of dimensions +00001986 B02B 05DB 3594 CMP.b Dimcnt(a3),d0 * compare with dimensions count +0000198A 6700 0094 3595 BEQ LAB_1F28 * found array so go get element +0000198E 3596 +0000198E 6000 EF8E 3597 BRA LAB_WDER * else wrong so do "Wrong dimensions" error +00001992 3598 +00001992 3599 * array not found, so possibly build it +00001992 3600 LAB_1EA1 +00001992 4A2B 05B4 3601 TST.b Defdim(a3) * test the default DIM flag +00001996 6700 EF8A 3602 BEQ LAB_UDER * if default flag is clear then we are not +0000199A 3603 * explicitly dimensioning an array so go +0000199A 3604 * do an "Undimensioned array" error +0000199A 3605 +0000199A 6100 FF3C 3606 BSR LAB_1DE6 * set data pointer, d0, to the first element +0000199E 3607 * in the array +0000199E 202B 046A 3608 MOVE.l Varname(a3),d0 * get array name +000019A2 20C0 3609 MOVE.l d0,(a0)+ * save array name +000019A4 7204 3610 MOVEQ #4,d1 * set 4 bytes per element +000019A6 0800 0017 3611 BTST.l #23,d0 * test if string array +000019AA 6702 3612 BEQ.s LAB_1EDF * branch if not string +000019AC 3613 +000019AC 7206 3614 MOVEQ #6,d1 * else 6 bytes per element +000019AE 3615 LAB_1EDF +000019AE 2741 05A8 3616 MOVE.l d1,Asptl(a3) * set array data size (bytes per element) +000019B2 122B 05DB 3617 MOVE.b Dimcnt(a3),d1 * get dimensions count +000019B6 5848 3618 ADDQ.w #4,a0 * skip the array size now (don't know it yet!) +000019B8 30C1 3619 MOVE.w d1,(a0)+ * set array's dimensions count +000019BA 3620 +000019BA 3621 * now calculate the array data space size 000019BA 3622 -000019BA 3623 * now calculate the array data space size +000019BA 3623 LAB_1EC0 000019BA 3624 -000019BA 3625 LAB_1EC0 -000019BA 3626 -000019BA 3627 * If you want arrays to dimension themselves by default then comment out the test -000019BA 3628 * above and uncomment the next three code lines and the label LAB_1ED0 -000019BA 3629 -000019BA 3630 * MOVE.w #$0A,d1 * set default dimension value, allow 0 to 9 -000019BA 3631 * TST.b Defdim(a3) * test default DIM flag -000019BA 3632 * BNE.s LAB_1ED0 * branch if b6 of Defdim is clear -000019BA 3633 -000019BA 321F 3634 MOVE.w (sp)+,d1 * get dimension size -000019BC 3635 *LAB_1ED0 -000019BC 30C1 3636 MOVE.w d1,(a0)+ * save to array header -000019BE 6100 00AE 3637 BSR LAB_1F7C * do this dimension size+1 * array size -000019C2 3638 * (d1+1)*(Asptl), result in d0 -000019C2 2740 0E0C 3639 MOVE.l d0,Asptl(a3) * save array data size -000019C6 532B 0E3F 3640 SUBQ.b #1,Dimcnt(a3) * decrement dimensions count -000019CA 66EE 3641 BNE.s LAB_1EC0 * loop while not = 0 -000019CC 3642 -000019CC D1EB 0E0C 3643 ADDA.l Asptl(a3),a0 * add size to first element address -000019D0 6500 EF84 3644 BCS LAB_OMER * if overflow go do "Out of memory" error -000019D4 3645 -000019D4 B1EB 0CAA 3646 CMPA.l Sstorl(a3),a0 * compare with bottom of string memory -000019D8 650C 3647 BCS.s LAB_1ED6 * branch if less (is ok) -000019DA 3648 -000019DA 6100 028E 3649 BSR LAB_GARB * do garbage collection routine -000019DE B1EB 0CAA 3650 CMPA.l Sstorl(a3),a0 * compare with bottom of string memory -000019E2 6400 EF72 3651 BCC LAB_OMER * if Sstorl <= a0 do "Out of memory" -000019E6 3652 * error then warm start -000019E6 3653 -000019E6 3654 LAB_1ED6 * ok exit, carry set -000019E6 2748 0CA6 3655 MOVE.l a0,Earryl(a3) * save array mem end -000019EA 7000 3656 MOVEQ #0,d0 * zero d0 -000019EC 222B 0E0C 3657 MOVE.l Asptl(a3),d1 * get size in bytes -000019F0 E289 3658 LSR.l #1,d1 * /2 for word fill (may be odd # words) -000019F2 5341 3659 SUBQ.w #1,d1 * adjust for DBF loop -000019F4 3660 LAB_1ED8 -000019F4 3100 3661 MOVE.w d0,-(a0) * decrement pointer and clear word -000019F6 51C9 FFFC 3662 DBF d1,LAB_1ED8 * decrement & loop until low word done -000019FA 3663 -000019FA 4841 3664 SWAP d1 * swap words -000019FC 4A41 3665 TST.w d1 * test high word -000019FE 6706 3666 BEQ.s LAB_1F07 * exit if done -00001A00 3667 -00001A00 5341 3668 SUBQ.w #1,d1 * decrement low (high) word -00001A02 4841 3669 SWAP d1 * swap back -00001A04 60EE 3670 BRA.s LAB_1ED8 * go do a whole block +000019BA 3625 * If you want arrays to dimension themselves by default then comment out the test +000019BA 3626 * above and uncomment the next three code lines and the label LAB_1ED0 +000019BA 3627 +000019BA 3628 * MOVE.w #$0A,d1 * set default dimension value, allow 0 to 9 +000019BA 3629 * TST.b Defdim(a3) * test default DIM flag +000019BA 3630 * BNE.s LAB_1ED0 * branch if b6 of Defdim is clear +000019BA 3631 +000019BA 321F 3632 MOVE.w (sp)+,d1 * get dimension size +000019BC 3633 *LAB_1ED0 +000019BC 30C1 3634 MOVE.w d1,(a0)+ * save to array header +000019BE 6100 00AE 3635 BSR LAB_1F7C * do this dimension size+1 * array size +000019C2 3636 * (d1+1)*(Asptl), result in d0 +000019C2 2740 05A8 3637 MOVE.l d0,Asptl(a3) * save array data size +000019C6 532B 05DB 3638 SUBQ.b #1,Dimcnt(a3) * decrement dimensions count +000019CA 66EE 3639 BNE.s LAB_1EC0 * loop while not = 0 +000019CC 3640 +000019CC D1EB 05A8 3641 ADDA.l Asptl(a3),a0 * add size to first element address +000019D0 6500 EF84 3642 BCS LAB_OMER * if overflow go do "Out of memory" error +000019D4 3643 +000019D4 B1EB 0446 3644 CMPA.l Sstorl(a3),a0 * compare with bottom of string memory +000019D8 650C 3645 BCS.s LAB_1ED6 * branch if less (is ok) +000019DA 3646 +000019DA 6100 028E 3647 BSR LAB_GARB * do garbage collection routine +000019DE B1EB 0446 3648 CMPA.l Sstorl(a3),a0 * compare with bottom of string memory +000019E2 6400 EF72 3649 BCC LAB_OMER * if Sstorl <= a0 do "Out of memory" +000019E6 3650 * error then warm start +000019E6 3651 +000019E6 3652 LAB_1ED6 * ok exit, carry set +000019E6 2748 0442 3653 MOVE.l a0,Earryl(a3) * save array mem end +000019EA 7000 3654 MOVEQ #0,d0 * zero d0 +000019EC 222B 05A8 3655 MOVE.l Asptl(a3),d1 * get size in bytes +000019F0 E289 3656 LSR.l #1,d1 * /2 for word fill (may be odd # words) +000019F2 5341 3657 SUBQ.w #1,d1 * adjust for DBF loop +000019F4 3658 LAB_1ED8 +000019F4 3100 3659 MOVE.w d0,-(a0) * decrement pointer and clear word +000019F6 51C9 FFFC 3660 DBF d1,LAB_1ED8 * decrement & loop until low word done +000019FA 3661 +000019FA 4841 3662 SWAP d1 * swap words +000019FC 4A41 3663 TST.w d1 * test high word +000019FE 6706 3664 BEQ.s LAB_1F07 * exit if done +00001A00 3665 +00001A00 5341 3666 SUBQ.w #1,d1 * decrement low (high) word +00001A02 4841 3667 SWAP d1 * swap back +00001A04 60EE 3668 BRA.s LAB_1ED8 * go do a whole block +00001A06 3669 +00001A06 3670 * now we need to calculate the array size by doing Earryl - Astrtl 00001A06 3671 -00001A06 3672 * now we need to calculate the array size by doing Earryl - Astrtl -00001A06 3673 -00001A06 3674 LAB_1F07 -00001A06 206B 0E10 3675 MOVEA.l Astrtl(a3),a0 * get for calculation and as pointer -00001A0A 202B 0CA6 3676 MOVE.l Earryl(a3),d0 * get array memory end -00001A0E 9088 3677 SUB.l a0,d0 * calculate array size -00001A10 2140 0004 3678 MOVE.l d0,4(a0) * save size to array -00001A14 4A2B 0E18 3679 TST.b Defdim(a3) * test default DIM flag -00001A18 6652 3680 BNE.s RTS_011 * exit (RET) if this was a DIM command -00001A1A 3681 -00001A1A 3682 * else, find element -00001A1A 5048 3683 ADDQ.w #8,a0 * index to dimension count -00001A1C 3758 0E3F 3684 MOVE.w (a0)+,Dimcnt(a3) * get array's dimension count +00001A06 3672 LAB_1F07 +00001A06 206B 05AC 3673 MOVEA.l Astrtl(a3),a0 * get for calculation and as pointer +00001A0A 202B 0442 3674 MOVE.l Earryl(a3),d0 * get array memory end +00001A0E 9088 3675 SUB.l a0,d0 * calculate array size +00001A10 2140 0004 3676 MOVE.l d0,4(a0) * save size to array +00001A14 4A2B 05B4 3677 TST.b Defdim(a3) * test default DIM flag +00001A18 6652 3678 BNE.s RTS_011 * exit (RET) if this was a DIM command +00001A1A 3679 +00001A1A 3680 * else, find element +00001A1A 5048 3681 ADDQ.w #8,a0 * index to dimension count +00001A1C 3758 05DB 3682 MOVE.w (a0)+,Dimcnt(a3) * get array's dimension count +00001A20 3683 +00001A20 3684 * we have found, or built, the array. now we need to find the element 00001A20 3685 -00001A20 3686 * we have found, or built, the array. now we need to find the element -00001A20 3687 -00001A20 3688 LAB_1F28 -00001A20 7000 3689 MOVEQ #0,d0 * clear first result -00001A22 2740 0E0C 3690 MOVE.l d0,Asptl(a3) * clear array data pointer -00001A26 3691 -00001A26 3692 * compare nth dimension bound (a0) with nth index (sp)+ -00001A26 3693 * if greater do array bounds error -00001A26 3694 -00001A26 3695 LAB_1F2C -00001A26 3218 3696 MOVE.w (a0)+,d1 * get nth dimension bound -00001A28 B257 3697 CMP.w (sp),d1 * compare nth index with nth dimension bound -00001A2A 6500 EF22 3698 BCS LAB_ABER * if d1 less or = do array bounds error +00001A20 3686 LAB_1F28 +00001A20 7000 3687 MOVEQ #0,d0 * clear first result +00001A22 2740 05A8 3688 MOVE.l d0,Asptl(a3) * clear array data pointer +00001A26 3689 +00001A26 3690 * compare nth dimension bound (a0) with nth index (sp)+ +00001A26 3691 * if greater do array bounds error +00001A26 3692 +00001A26 3693 LAB_1F2C +00001A26 3218 3694 MOVE.w (a0)+,d1 * get nth dimension bound +00001A28 B257 3695 CMP.w (sp),d1 * compare nth index with nth dimension bound +00001A2A 6500 EF22 3696 BCS LAB_ABER * if d1 less or = do array bounds error +00001A2E 3697 +00001A2E 3698 * now do pointer = pointer * nth dimension + nth index 00001A2E 3699 -00001A2E 3700 * now do pointer = pointer * nth dimension + nth index -00001A2E 3701 -00001A2E 4A80 3702 TST.l d0 * test pointer -00001A30 6702 3703 BEQ.s LAB_1F5A * skip multiply if last result = null -00001A32 3704 -00001A32 613A 3705 BSR.s LAB_1F7C * do this dimension size+1 * array size -00001A34 3706 LAB_1F5A -00001A34 7200 3707 MOVEQ #0,d1 * clear longword -00001A36 321F 3708 MOVE.w (sp)+,d1 * get nth dimension index -00001A38 D081 3709 ADD.l d1,d0 * add index to size -00001A3A 2740 0E0C 3710 MOVE.l d0,Asptl(a3) * save array data pointer -00001A3E 3711 -00001A3E 532B 0E3F 3712 SUBQ.b #1,Dimcnt(a3) * decrement dimensions count -00001A42 66E2 3713 BNE.s LAB_1F2C * loop if dimensions still to do -00001A44 3714 -00001A44 177C 0000 0E19 3715 MOVE.b #0,Dtypef(a3) * set data type to float -00001A4A 7203 3716 MOVEQ #3,d1 * set for numeric array -00001A4C 4A2B 0CCF 3717 TST.b Varname+1(a3) * test if string array -00001A50 6A0A 3718 BPL.s LAB_1F6A * branch if not string -00001A52 3719 -00001A52 7205 3720 MOVEQ #5,d1 * else set for string array -00001A54 177C 0080 0E19 3721 MOVE.b #$80,Dtypef(a3) * and set data type to string -00001A5A 600C 3722 BRA.s LAB_1F6B * skip integer test -00001A5C 3723 -00001A5C 3724 LAB_1F6A -00001A5C 4A2B 0CD0 3725 TST.b Varname+2(a3) * test if integer array -00001A60 6A06 3726 BPL.s LAB_1F6B * branch if not integer -00001A62 3727 -00001A62 177C 0040 0E19 3728 MOVE.b #$40,Dtypef(a3) * else set data type to integer -00001A68 3729 LAB_1F6B -00001A68 6104 3730 BSR.s LAB_1F7C * do element size (d1) * array size (Asptl) -00001A6A D1C0 3731 ADDA.l d0,a0 * add array data start pointer -00001A6C 3732 RTS_011 -00001A6C 4E75 3733 RTS -00001A6E 3734 -00001A6E 3735 -00001A6E 3736 ************************************************************************************* -00001A6E 3737 * -00001A6E 3738 * do this dimension size (d1) * array data size (Asptl) -00001A6E 3739 -00001A6E 3740 * do a 16 x 32 bit multiply -00001A6E 3741 * d1 holds the 16 bit multiplier -00001A6E 3742 * Asptl holds the 32 bit multiplicand -00001A6E 3743 -00001A6E 3744 * d0 bbbb bbbb -00001A6E 3745 * d1 0000 aaaa -00001A6E 3746 * ---------- -00001A6E 3747 * d0 rrrr rrrr -00001A6E 3748 -00001A6E 3749 LAB_1F7C -00001A6E 202B 0E0C 3750 MOVE.l Asptl(a3),d0 * get result -00001A72 2400 3751 MOVE.l d0,d2 * copy it -00001A74 4842 3752 SWAP d2 * shift high word to low word -00001A76 C0C1 3753 MULU.w d1,d0 * d1 * low word = low result -00001A78 C4C1 3754 MULU.w d1,d2 * d1 * high word = high result -00001A7A 4842 3755 SWAP d2 * align words for test -00001A7C 4A42 3756 TST.w d2 * must be zero -00001A7E 6600 EED6 3757 BNE LAB_OMER * if overflow go do "Out of memory" error -00001A82 3758 -00001A82 D082 3759 ADD.l d2,d0 * calculate result -00001A84 6500 EED0 3760 BCS LAB_OMER * if overflow go do "Out of memory" error -00001A88 3761 -00001A88 D0AB 0E0C 3762 ADD.l Asptl(a3),d0 * add original -00001A8C 6500 EEC8 3763 BCS LAB_OMER * if overflow go do "Out of memory" error -00001A90 3764 -00001A90 4E75 3765 RTS -00001A92 3766 -00001A92 3767 -00001A92 3768 ************************************************************************************* -00001A92 3769 * -00001A92 3770 * perform FRE() -00001A92 3771 -00001A92 3772 LAB_FRE -00001A92 4A2B 0E19 3773 TST.b Dtypef(a3) * test data type, $80=string, $40=integer, -00001A96 3774 * $00=float -00001A96 6A04 3775 BPL.s LAB_1FB4 * branch if numeric -00001A98 3776 -00001A98 6100 0318 3777 BSR LAB_22B6 * pop string off descriptor stack, or from -00001A9C 3778 * top of string space, returns d0 = length, -00001A9C 3779 * a0 = pointer -00001A9C 3780 -00001A9C 3781 * FRE(n) was numeric so do this -00001A9C 3782 LAB_1FB4 -00001A9C 6100 01CC 3783 BSR LAB_GARB * go do garbage collection -00001AA0 202B 0CAA 3784 MOVE.l Sstorl(a3),d0 * get bottom of string space -00001AA4 90AB 0CA6 3785 SUB.l Earryl(a3),d0 * subtract array mem end -00001AA8 3786 -00001AA8 3787 -00001AA8 3788 ************************************************************************************* -00001AA8 3789 * -00001AA8 3790 * convert d0 to signed longword in FAC1 -00001AA8 3791 -00001AA8 3792 LAB_AYFC -00001AA8 177C 0000 0E19 3793 MOVE.b #$00,Dtypef(a3) * clear data type, $80=string, $40=integer, -00001AAE 3794 * $00=float -00001AAE 377C A000 0DF8 3795 MOVE.w #$A000,FAC1_e(a3) * set FAC1 exponent and clear sign (b7) -00001AB4 2740 0DF4 3796 MOVE.l d0,FAC1_m(a3) * save FAC1 mantissa -00001AB8 6A00 063E 3797 BPL LAB_24D0 * convert if +ve -00001ABC 3798 -00001ABC 003C 0001 3799 ORI.b #1,CCR * else set carry -00001AC0 6000 0636 3800 BRA LAB_24D0 * do +/- (carry is sign) & normalise FAC1 -00001AC4 3801 -00001AC4 3802 -00001AC4 3803 ************************************************************************************* -00001AC4 3804 * -00001AC4 3805 * remember if the line length is zero (infinite line) then POS(n) will return -00001AC4 3806 * position MOD tabsize +00001A2E 4A80 3700 TST.l d0 * test pointer +00001A30 6702 3701 BEQ.s LAB_1F5A * skip multiply if last result = null +00001A32 3702 +00001A32 613A 3703 BSR.s LAB_1F7C * do this dimension size+1 * array size +00001A34 3704 LAB_1F5A +00001A34 7200 3705 MOVEQ #0,d1 * clear longword +00001A36 321F 3706 MOVE.w (sp)+,d1 * get nth dimension index +00001A38 D081 3707 ADD.l d1,d0 * add index to size +00001A3A 2740 05A8 3708 MOVE.l d0,Asptl(a3) * save array data pointer +00001A3E 3709 +00001A3E 532B 05DB 3710 SUBQ.b #1,Dimcnt(a3) * decrement dimensions count +00001A42 66E2 3711 BNE.s LAB_1F2C * loop if dimensions still to do +00001A44 3712 +00001A44 177C 0000 05B5 3713 MOVE.b #0,Dtypef(a3) * set data type to float +00001A4A 7203 3714 MOVEQ #3,d1 * set for numeric array +00001A4C 4A2B 046B 3715 TST.b Varname+1(a3) * test if string array +00001A50 6A0A 3716 BPL.s LAB_1F6A * branch if not string +00001A52 3717 +00001A52 7205 3718 MOVEQ #5,d1 * else set for string array +00001A54 177C 0080 05B5 3719 MOVE.b #$80,Dtypef(a3) * and set data type to string +00001A5A 600C 3720 BRA.s LAB_1F6B * skip integer test +00001A5C 3721 +00001A5C 3722 LAB_1F6A +00001A5C 4A2B 046C 3723 TST.b Varname+2(a3) * test if integer array +00001A60 6A06 3724 BPL.s LAB_1F6B * branch if not integer +00001A62 3725 +00001A62 177C 0040 05B5 3726 MOVE.b #$40,Dtypef(a3) * else set data type to integer +00001A68 3727 LAB_1F6B +00001A68 6104 3728 BSR.s LAB_1F7C * do element size (d1) * array size (Asptl) +00001A6A D1C0 3729 ADDA.l d0,a0 * add array data start pointer +00001A6C 3730 RTS_011 +00001A6C 4E75 3731 RTS +00001A6E 3732 +00001A6E 3733 +00001A6E 3734 ************************************************************************************* +00001A6E 3735 * +00001A6E 3736 * do this dimension size (d1) * array data size (Asptl) +00001A6E 3737 +00001A6E 3738 * do a 16 x 32 bit multiply +00001A6E 3739 * d1 holds the 16 bit multiplier +00001A6E 3740 * Asptl holds the 32 bit multiplicand +00001A6E 3741 +00001A6E 3742 * d0 bbbb bbbb +00001A6E 3743 * d1 0000 aaaa +00001A6E 3744 * ---------- +00001A6E 3745 * d0 rrrr rrrr +00001A6E 3746 +00001A6E 3747 LAB_1F7C +00001A6E 202B 05A8 3748 MOVE.l Asptl(a3),d0 * get result +00001A72 2400 3749 MOVE.l d0,d2 * copy it +00001A74 4842 3750 SWAP d2 * shift high word to low word +00001A76 C0C1 3751 MULU.w d1,d0 * d1 * low word = low result +00001A78 C4C1 3752 MULU.w d1,d2 * d1 * high word = high result +00001A7A 4842 3753 SWAP d2 * align words for test +00001A7C 4A42 3754 TST.w d2 * must be zero +00001A7E 6600 EED6 3755 BNE LAB_OMER * if overflow go do "Out of memory" error +00001A82 3756 +00001A82 D082 3757 ADD.l d2,d0 * calculate result +00001A84 6500 EED0 3758 BCS LAB_OMER * if overflow go do "Out of memory" error +00001A88 3759 +00001A88 D0AB 05A8 3760 ADD.l Asptl(a3),d0 * add original +00001A8C 6500 EEC8 3761 BCS LAB_OMER * if overflow go do "Out of memory" error +00001A90 3762 +00001A90 4E75 3763 RTS +00001A92 3764 +00001A92 3765 +00001A92 3766 ************************************************************************************* +00001A92 3767 * +00001A92 3768 * perform FRE() +00001A92 3769 +00001A92 3770 LAB_FRE +00001A92 4A2B 05B5 3771 TST.b Dtypef(a3) * test data type, $80=string, $40=integer, +00001A96 3772 * $00=float +00001A96 6A04 3773 BPL.s LAB_1FB4 * branch if numeric +00001A98 3774 +00001A98 6100 0318 3775 BSR LAB_22B6 * pop string off descriptor stack, or from +00001A9C 3776 * top of string space, returns d0 = length, +00001A9C 3777 * a0 = pointer +00001A9C 3778 +00001A9C 3779 * FRE(n) was numeric so do this +00001A9C 3780 LAB_1FB4 +00001A9C 6100 01CC 3781 BSR LAB_GARB * go do garbage collection +00001AA0 202B 0446 3782 MOVE.l Sstorl(a3),d0 * get bottom of string space +00001AA4 90AB 0442 3783 SUB.l Earryl(a3),d0 * subtract array mem end +00001AA8 3784 +00001AA8 3785 +00001AA8 3786 ************************************************************************************* +00001AA8 3787 * +00001AA8 3788 * convert d0 to signed longword in FAC1 +00001AA8 3789 +00001AA8 3790 LAB_AYFC +00001AA8 177C 0000 05B5 3791 MOVE.b #$00,Dtypef(a3) * clear data type, $80=string, $40=integer, +00001AAE 3792 * $00=float +00001AAE 377C A000 0594 3793 MOVE.w #$A000,FAC1_e(a3) * set FAC1 exponent and clear sign (b7) +00001AB4 2740 0590 3794 MOVE.l d0,FAC1_m(a3) * save FAC1 mantissa +00001AB8 6A00 063E 3795 BPL LAB_24D0 * convert if +ve +00001ABC 3796 +00001ABC 003C 0001 3797 ORI.b #1,CCR * else set carry +00001AC0 6000 0636 3798 BRA LAB_24D0 * do +/- (carry is sign) & normalise FAC1 +00001AC4 3799 +00001AC4 3800 +00001AC4 3801 ************************************************************************************* +00001AC4 3802 * +00001AC4 3803 * remember if the line length is zero (infinite line) then POS(n) will return +00001AC4 3804 * position MOD tabsize +00001AC4 3805 +00001AC4 3806 * perform POS() 00001AC4 3807 -00001AC4 3808 * perform POS() -00001AC4 3809 -00001AC4 3810 LAB_POS -00001AC4 102B 0E49 3811 MOVE.b TPos(a3),d0 * get terminal position +00001AC4 3808 LAB_POS +00001AC4 102B 05E5 3809 MOVE.b TPos(a3),d0 * get terminal position +00001AC8 3810 +00001AC8 3811 * convert d0 to unsigned byte in FAC1 00001AC8 3812 -00001AC8 3813 * convert d0 to unsigned byte in FAC1 -00001AC8 3814 -00001AC8 3815 LAB_1FD0 -00001AC8 C0BC 000000FF 3816 AND.l #$FF,d0 * clear high bits -00001ACE 60D8 3817 BRA.s LAB_AYFC * convert d0 to signed longword in FAC1 & RET +00001AC8 3813 LAB_1FD0 +00001AC8 C0BC 000000FF 3814 AND.l #$FF,d0 * clear high bits +00001ACE 60D8 3815 BRA.s LAB_AYFC * convert d0 to signed longword in FAC1 & RET +00001AD0 3816 +00001AD0 3817 * check not direct (used by DEF and INPUT) 00001AD0 3818 -00001AD0 3819 * check not direct (used by DEF and INPUT) -00001AD0 3820 -00001AD0 3821 LAB_CKRN -00001AD0 4A2B 0CB6 3822 TST.b Clinel(a3) * test current line # -00001AD4 6B00 EE6C 3823 BMI LAB_IDER * if -ve go do illegal direct error then warm -00001AD8 3824 * start -00001AD8 3825 -00001AD8 4E75 3826 RTS * can continue so return -00001ADA 3827 -00001ADA 3828 -00001ADA 3829 ************************************************************************************* -00001ADA 3830 * -00001ADA 3831 * perform DEF -00001ADA 3832 -00001ADA 3833 LAB_DEF -00001ADA 70AB 3834 MOVEQ #TK_FN-$100,d0 * get FN token -00001ADC 6100 FAC2 3835 BSR LAB_SCCA * scan for CHR$(d0), else syntax error and -00001AE0 3836 * warm start -00001AE0 3837 * return character after d0 -00001AE0 177C 0080 0E43 3838 MOVE.b #$80,Sufnxf(a3) * set FN flag bit -00001AE6 6100 FCDA 3839 BSR LAB_1D12 * get FN name -00001AEA 2748 0E14 3840 MOVE.l a0,func_l(a3) * save function pointer -00001AEE 3841 -00001AEE 61E0 3842 BSR.s LAB_CKRN * check not direct (back here if ok) -00001AF0 0C1D 0028 3843 CMP.b #$28,(a5)+ * check next byte is "(" and increment -00001AF4 6600 EE74 3844 BNE LAB_SNER * else do syntax error/warm start -00001AF8 3845 -00001AF8 177C 007E 0E43 3846 MOVE.b #$7E,Sufnxf(a3) * set FN variable flag bits -00001AFE 6100 FCB4 3847 BSR LAB_SVAR * search for or create a variable -00001B02 3848 * return the variable address in a0 -00001B02 6100 FA92 3849 BSR LAB_1BFB * scan for ")", else do syntax error/warm start -00001B06 70BD 3850 MOVEQ #TK_EQUAL-$100,d0 * = token -00001B08 6100 FA96 3851 BSR LAB_SCCA * scan for CHR$(A), else syntax error/warm start -00001B0C 3852 * return character after d0 -00001B0C 2F2B 0CCE 3853 MOVE.l Varname(a3),-(sp) * push current variable name -00001B10 2F0D 3854 MOVE.l a5,-(sp) * push BASIC execute pointer -00001B12 6100 F41A 3855 BSR LAB_DATA * go perform DATA, find end of DEF FN statement -00001B16 206B 0E14 3856 MOVEA.l func_l(a3),a0 * get the function pointer -00001B1A 209F 3857 MOVE.l (sp)+,(a0) * save BASIC execute pointer to function -00001B1C 215F 0004 3858 MOVE.l (sp)+,4(a0) * save current variable name to function -00001B20 4E75 3859 RTS -00001B22 3860 -00001B22 3861 -00001B22 3862 ************************************************************************************* -00001B22 3863 * -00001B22 3864 * evaluate FNx -00001B22 3865 -00001B22 3866 LAB_201E -00001B22 177C 0081 0E43 3867 MOVE.b #$81,Sufnxf(a3) * set FN flag (find not create) -00001B28 6100 FA7E 3868 BSR LAB_IGBY * increment & scan memory -00001B2C 6100 FC94 3869 BSR LAB_1D12 * get FN name -00001B30 1F2B 0E19 3870 MOVE.b Dtypef(a3),-(sp) * push data type flag (function type) -00001B34 2F08 3871 MOVE.l a0,-(sp) * push function pointer -00001B36 0C15 0028 3872 CMP.b #$28,(a5) * check next byte is "(", no increment -00001B3A 6600 EE2E 3873 BNE LAB_SNER * else do syntax error/warm start -00001B3E 3874 -00001B3E 6100 FA52 3875 BSR LAB_1BF7 * evaluate expression within parentheses -00001B42 205F 3876 MOVEA.l (sp)+,a0 * pop function pointer -00001B44 2748 0E14 3877 MOVE.l a0,func_l(a3) * set function pointer -00001B48 1F2B 0E19 3878 MOVE.b Dtypef(a3),-(sp) * push data type flag (function expression type) -00001B4C 3879 -00001B4C 2028 0004 3880 MOVE.l 4(a0),d0 * get function variable name -00001B50 6100 FCDA 3881 BSR LAB_1D4A * go find function variable (already created) -00001B54 3882 -00001B54 3883 * now check type match for variable -00001B54 101F 3884 MOVE.b (sp)+,d0 * pop data type flag (function expression type) -00001B56 E318 3885 ROL.b #1,d0 * set carry if type = string -00001B58 6100 F8DA 3886 BSR LAB_CKTM * type match check, set C for string -00001B5C 3887 -00001B5C 3888 * now stack the function variable value before -00001B5C 3889 * use -00001B5C 6712 3890 BEQ.s LAB_2043 * branch if not string -00001B5E 3891 -00001B5E 43EB 0CDA 3892 LEA des_sk_e(a3),a1 * get string stack pointer max+1 -00001B62 B9C9 3893 CMPA.l a1,a4 * compare string stack pointer with max+1 -00001B64 6700 EDD0 3894 BEQ LAB_SCER * if no space on the stack go do string too -00001B68 3895 * complex error -00001B68 3896 -00001B68 3928 0004 3897 MOVE.w 4(a0),-(a4) * string length on descriptor stack -00001B6C 2910 3898 MOVE.l (a0),-(a4) * string address on stack -00001B6E 6002 3899 BRA.s LAB_204S * skip var push -00001B70 3900 -00001B70 3901 LAB_2043 -00001B70 2F10 3902 MOVE.l (a0),-(sp) * push variable -00001B72 3903 LAB_204S -00001B72 2F08 3904 MOVE.l a0,-(sp) * push variable address -00001B74 1F2B 0E19 3905 MOVE.b Dtypef(a3),-(sp) * push variable data type -00001B78 3906 -00001B78 6132 3907 BSR.s LAB_2045 * pack function expression value into (a0) -00001B7A 3908 * (function variable) -00001B7A 2F0D 3909 MOVE.l a5,-(sp) * push BASIC execute pointer -00001B7C 206B 0E14 3910 MOVEA.l func_l(a3),a0 * get function pointer -00001B80 2A50 3911 MOVEA.l (a0),a5 * save function execute ptr as BASIC execute ptr -00001B82 6100 F8C4 3912 BSR LAB_EVEX * evaluate expression -00001B86 6100 FA22 3913 BSR LAB_GBYT * scan memory -00001B8A 6600 EDDE 3914 BNE LAB_SNER * if not [EOL] or [EOS] do syntax error and -00001B8E 3915 * warm start -00001B8E 3916 -00001B8E 2A5F 3917 MOVE.l (sp)+,a5 * restore BASIC execute pointer +00001AD0 3819 LAB_CKRN +00001AD0 4A2B 0452 3820 TST.b Clinel(a3) * test current line # +00001AD4 6B00 EE6C 3821 BMI LAB_IDER * if -ve go do illegal direct error then warm +00001AD8 3822 * start +00001AD8 3823 +00001AD8 4E75 3824 RTS * can continue so return +00001ADA 3825 +00001ADA 3826 +00001ADA 3827 ************************************************************************************* +00001ADA 3828 * +00001ADA 3829 * perform DEF +00001ADA 3830 +00001ADA 3831 LAB_DEF +00001ADA 70AB 3832 MOVEQ #TK_FN-$100,d0 * get FN token +00001ADC 6100 FAC2 3833 BSR LAB_SCCA * scan for CHR$(d0), else syntax error and +00001AE0 3834 * warm start +00001AE0 3835 * return character after d0 +00001AE0 177C 0080 05DF 3836 MOVE.b #$80,Sufnxf(a3) * set FN flag bit +00001AE6 6100 FCDA 3837 BSR LAB_1D12 * get FN name +00001AEA 2748 05B0 3838 MOVE.l a0,func_l(a3) * save function pointer +00001AEE 3839 +00001AEE 61E0 3840 BSR.s LAB_CKRN * check not direct (back here if ok) +00001AF0 0C1D 0028 3841 CMP.b #$28,(a5)+ * check next byte is "(" and increment +00001AF4 6600 EE74 3842 BNE LAB_SNER * else do syntax error/warm start +00001AF8 3843 +00001AF8 177C 007E 05DF 3844 MOVE.b #$7E,Sufnxf(a3) * set FN variable flag bits +00001AFE 6100 FCB4 3845 BSR LAB_SVAR * search for or create a variable +00001B02 3846 * return the variable address in a0 +00001B02 6100 FA92 3847 BSR LAB_1BFB * scan for ")", else do syntax error/warm start +00001B06 70BD 3848 MOVEQ #TK_EQUAL-$100,d0 * = token +00001B08 6100 FA96 3849 BSR LAB_SCCA * scan for CHR$(A), else syntax error/warm start +00001B0C 3850 * return character after d0 +00001B0C 2F2B 046A 3851 MOVE.l Varname(a3),-(sp) * push current variable name +00001B10 2F0D 3852 MOVE.l a5,-(sp) * push BASIC execute pointer +00001B12 6100 F41A 3853 BSR LAB_DATA * go perform DATA, find end of DEF FN statement +00001B16 206B 05B0 3854 MOVEA.l func_l(a3),a0 * get the function pointer +00001B1A 209F 3855 MOVE.l (sp)+,(a0) * save BASIC execute pointer to function +00001B1C 215F 0004 3856 MOVE.l (sp)+,4(a0) * save current variable name to function +00001B20 4E75 3857 RTS +00001B22 3858 +00001B22 3859 +00001B22 3860 ************************************************************************************* +00001B22 3861 * +00001B22 3862 * evaluate FNx +00001B22 3863 +00001B22 3864 LAB_201E +00001B22 177C 0081 05DF 3865 MOVE.b #$81,Sufnxf(a3) * set FN flag (find not create) +00001B28 6100 FA7E 3866 BSR LAB_IGBY * increment & scan memory +00001B2C 6100 FC94 3867 BSR LAB_1D12 * get FN name +00001B30 1F2B 05B5 3868 MOVE.b Dtypef(a3),-(sp) * push data type flag (function type) +00001B34 2F08 3869 MOVE.l a0,-(sp) * push function pointer +00001B36 0C15 0028 3870 CMP.b #$28,(a5) * check next byte is "(", no increment +00001B3A 6600 EE2E 3871 BNE LAB_SNER * else do syntax error/warm start +00001B3E 3872 +00001B3E 6100 FA52 3873 BSR LAB_1BF7 * evaluate expression within parentheses +00001B42 205F 3874 MOVEA.l (sp)+,a0 * pop function pointer +00001B44 2748 05B0 3875 MOVE.l a0,func_l(a3) * set function pointer +00001B48 1F2B 05B5 3876 MOVE.b Dtypef(a3),-(sp) * push data type flag (function expression type) +00001B4C 3877 +00001B4C 2028 0004 3878 MOVE.l 4(a0),d0 * get function variable name +00001B50 6100 FCDA 3879 BSR LAB_1D4A * go find function variable (already created) +00001B54 3880 +00001B54 3881 * now check type match for variable +00001B54 101F 3882 MOVE.b (sp)+,d0 * pop data type flag (function expression type) +00001B56 E318 3883 ROL.b #1,d0 * set carry if type = string +00001B58 6100 F8DA 3884 BSR LAB_CKTM * type match check, set C for string +00001B5C 3885 +00001B5C 3886 * now stack the function variable value before +00001B5C 3887 * use +00001B5C 6712 3888 BEQ.s LAB_2043 * branch if not string +00001B5E 3889 +00001B5E 43EB 0476 3890 LEA des_sk_e(a3),a1 * get string stack pointer max+1 +00001B62 B9C9 3891 CMPA.l a1,a4 * compare string stack pointer with max+1 +00001B64 6700 EDD0 3892 BEQ LAB_SCER * if no space on the stack go do string too +00001B68 3893 * complex error +00001B68 3894 +00001B68 3928 0004 3895 MOVE.w 4(a0),-(a4) * string length on descriptor stack +00001B6C 2910 3896 MOVE.l (a0),-(a4) * string address on stack +00001B6E 6002 3897 BRA.s LAB_204S * skip var push +00001B70 3898 +00001B70 3899 LAB_2043 +00001B70 2F10 3900 MOVE.l (a0),-(sp) * push variable +00001B72 3901 LAB_204S +00001B72 2F08 3902 MOVE.l a0,-(sp) * push variable address +00001B74 1F2B 05B5 3903 MOVE.b Dtypef(a3),-(sp) * push variable data type +00001B78 3904 +00001B78 6132 3905 BSR.s LAB_2045 * pack function expression value into (a0) +00001B7A 3906 * (function variable) +00001B7A 2F0D 3907 MOVE.l a5,-(sp) * push BASIC execute pointer +00001B7C 206B 05B0 3908 MOVEA.l func_l(a3),a0 * get function pointer +00001B80 2A50 3909 MOVEA.l (a0),a5 * save function execute ptr as BASIC execute ptr +00001B82 6100 F8C4 3910 BSR LAB_EVEX * evaluate expression +00001B86 6100 FA22 3911 BSR LAB_GBYT * scan memory +00001B8A 6600 EDDE 3912 BNE LAB_SNER * if not [EOL] or [EOS] do syntax error and +00001B8E 3913 * warm start +00001B8E 3914 +00001B8E 2A5F 3915 MOVE.l (sp)+,a5 * restore BASIC execute pointer +00001B90 3916 +00001B90 3917 * restore variable from stack and test data type 00001B90 3918 -00001B90 3919 * restore variable from stack and test data type -00001B90 3920 -00001B90 101F 3921 MOVE.b (sp)+,d0 * pull variable data type -00001B92 205F 3922 MOVEA.l (sp)+,a0 * pull variable address -00001B94 4A00 3923 TST.b d0 * test variable data type -00001B96 6A08 3924 BPL.s LAB_204T * branch if not string -00001B98 3925 -00001B98 209C 3926 MOVE.l (a4)+,(a0) * string address from descriptor stack -00001B9A 315C 0004 3927 MOVE.w (a4)+,4(a0) * string length from descriptor stack -00001B9E 6002 3928 BRA.s LAB_2044 * skip variable pull -00001BA0 3929 -00001BA0 3930 LAB_204T -00001BA0 209F 3931 MOVE.l (sp)+,(a0) * restore variable from stack -00001BA2 3932 LAB_2044 -00001BA2 101F 3933 MOVE.b (sp)+,d0 * pop data type flag (function type) -00001BA4 E318 3934 ROL.b #1,d0 * set carry if type = string -00001BA6 6100 F88C 3935 BSR LAB_CKTM * type match check, set C for string -00001BAA 4E75 3936 RTS -00001BAC 3937 -00001BAC 3938 LAB_2045 -00001BAC 4A2B 0E19 3939 TST.b Dtypef(a3) * test data type -00001BB0 6A00 07EE 3940 BPL LAB_2778 * if numeric pack FAC1 into variable (a0) -00001BB4 3941 * and return -00001BB4 3942 -00001BB4 2448 3943 MOVEA.l a0,a2 * copy variable pointer -00001BB6 6000 F514 3944 BRA LAB_17D6 * go do string LET & return +00001B90 101F 3919 MOVE.b (sp)+,d0 * pull variable data type +00001B92 205F 3920 MOVEA.l (sp)+,a0 * pull variable address +00001B94 4A00 3921 TST.b d0 * test variable data type +00001B96 6A08 3922 BPL.s LAB_204T * branch if not string +00001B98 3923 +00001B98 209C 3924 MOVE.l (a4)+,(a0) * string address from descriptor stack +00001B9A 315C 0004 3925 MOVE.w (a4)+,4(a0) * string length from descriptor stack +00001B9E 6002 3926 BRA.s LAB_2044 * skip variable pull +00001BA0 3927 +00001BA0 3928 LAB_204T +00001BA0 209F 3929 MOVE.l (sp)+,(a0) * restore variable from stack +00001BA2 3930 LAB_2044 +00001BA2 101F 3931 MOVE.b (sp)+,d0 * pop data type flag (function type) +00001BA4 E318 3932 ROL.b #1,d0 * set carry if type = string +00001BA6 6100 F88C 3933 BSR LAB_CKTM * type match check, set C for string +00001BAA 4E75 3934 RTS +00001BAC 3935 +00001BAC 3936 LAB_2045 +00001BAC 4A2B 05B5 3937 TST.b Dtypef(a3) * test data type +00001BB0 6A00 07EE 3938 BPL LAB_2778 * if numeric pack FAC1 into variable (a0) +00001BB4 3939 * and return +00001BB4 3940 +00001BB4 2448 3941 MOVEA.l a0,a2 * copy variable pointer +00001BB6 6000 F514 3942 BRA LAB_17D6 * go do string LET & return +00001BBA 3943 +00001BBA 3944 00001BBA 3945 -00001BBA 3946 -00001BBA 3947 -00001BBA 3948 ************************************************************************************* -00001BBA 3949 * -00001BBA 3950 * perform STR$() -00001BBA 3951 -00001BBA 3952 LAB_STRS -00001BBA 6100 094A 3953 BSR LAB_2970 * convert FAC1 to string -00001BBE 3954 -00001BBE 3955 * scan, set up string -00001BBE 3956 * print " terminated string to FAC1 stack -00001BBE 3957 -00001BBE 3958 LAB_20AE -00001BBE 7422 3959 MOVEQ #$22,d2 * set Srchc character (terminator 1) -00001BC0 3602 3960 MOVE.w d2,d3 * set Asrch character (terminator 2) -00001BC2 3961 -00001BC2 3962 * print d2/d3 terminated string to FAC1 stack -00001BC2 3963 * d2 = Srchc, d3 = Asrch, a0 is source -00001BC2 3964 * a6 is temp -00001BC2 3965 -00001BC2 3966 LAB_20B4 -00001BC2 7200 3967 MOVEQ #0,d1 * clear longword -00001BC4 5341 3968 SUBQ.w #1,d1 * set length to -1 -00001BC6 2448 3969 MOVEA.l a0,a2 * copy start to calculate end -00001BC8 3970 LAB_20BE -00001BC8 5241 3971 ADDQ.w #1,d1 * increment length -00001BCA 1030 1000 3972 MOVE.b (a0,d1.w),d0 * get byte from string -00001BCE 6710 3973 BEQ.s LAB_20D0 * exit loop if null byte [EOS] -00001BD0 3974 -00001BD0 B002 3975 CMP.b d2,d0 * compare with search character (terminator 1) -00001BD2 6704 3976 BEQ.s LAB_20CB * branch if terminator -00001BD4 3977 -00001BD4 B003 3978 CMP.b d3,d0 * compare with terminator 2 -00001BD6 66F0 3979 BNE.s LAB_20BE * loop if not terminator 2 (or null string) -00001BD8 3980 -00001BD8 3981 LAB_20CB -00001BD8 B03C 0022 3982 CMP.b #$22,d0 * compare with " -00001BDC 6602 3983 BNE.s LAB_20D0 * branch if not " -00001BDE 3984 -00001BDE 524A 3985 ADDQ.w #1,a2 * else increment string start (skip " at end) -00001BE0 3986 LAB_20D0 -00001BE0 D5C1 3987 ADDA.l d1,a2 * add longowrd length to make string end+1 -00001BE2 3988 -00001BE2 B1CB 3989 CMPA.l a3,a0 * is string in ram -00001BE4 651E 3990 BCS.s LAB_RTST * if not go push descriptor on stack & exit -00001BE6 3991 * (could be message string from ROM) -00001BE6 3992 -00001BE6 B1EB 0C92 3993 CMPA.l Smeml(a3),a0 * is string in utility ram -00001BEA 6418 3994 BCC.s LAB_RTST * if not go push descriptor on stack & exit -00001BEC 3995 * (is in string or program space) -00001BEC 3996 -00001BEC 3997 * (else) copy string to string memory -00001BEC 3998 LAB_20C9 -00001BEC 2248 3999 MOVEA.l a0,a1 * copy descriptor pointer -00001BEE 2001 4000 MOVE.l d1,d0 * copy longword length -00001BF0 6604 4001 BNE.s LAB_20D8 * branch if not null string -00001BF2 4002 -00001BF2 2041 4003 MOVEA.l d1,a0 * make null pointer -00001BF4 600E 4004 BRA.s LAB_RTST * go push descriptor on stack & exit -00001BF6 4005 -00001BF6 4006 LAB_20D8 -00001BF6 6126 4007 BSR.s LAB_2115 * make string space d1 bytes long -00001BF8 D1C1 4008 ADDA.l d1,a0 * new string end -00001BFA D3C1 4009 ADDA.l d1,a1 * old string end -00001BFC 5340 4010 SUBQ.w #1,d0 * -1 for DBF loop -00001BFE 4011 LAB_20E0 -00001BFE 1121 4012 MOVE.b -(a1),-(a0) * copy byte (source can be odd aligned) -00001C00 51C8 FFFC 4013 DBF d0,LAB_20E0 * loop until done +00001BBA 3946 ************************************************************************************* +00001BBA 3947 * +00001BBA 3948 * perform STR$() +00001BBA 3949 +00001BBA 3950 LAB_STRS +00001BBA 6100 094A 3951 BSR LAB_2970 * convert FAC1 to string +00001BBE 3952 +00001BBE 3953 * scan, set up string +00001BBE 3954 * print " terminated string to FAC1 stack +00001BBE 3955 +00001BBE 3956 LAB_20AE +00001BBE 7422 3957 MOVEQ #$22,d2 * set Srchc character (terminator 1) +00001BC0 3602 3958 MOVE.w d2,d3 * set Asrch character (terminator 2) +00001BC2 3959 +00001BC2 3960 * print d2/d3 terminated string to FAC1 stack +00001BC2 3961 * d2 = Srchc, d3 = Asrch, a0 is source +00001BC2 3962 * a6 is temp +00001BC2 3963 +00001BC2 3964 LAB_20B4 +00001BC2 7200 3965 MOVEQ #0,d1 * clear longword +00001BC4 5341 3966 SUBQ.w #1,d1 * set length to -1 +00001BC6 2448 3967 MOVEA.l a0,a2 * copy start to calculate end +00001BC8 3968 LAB_20BE +00001BC8 5241 3969 ADDQ.w #1,d1 * increment length +00001BCA 1030 1000 3970 MOVE.b (a0,d1.w),d0 * get byte from string +00001BCE 6710 3971 BEQ.s LAB_20D0 * exit loop if null byte [EOS] +00001BD0 3972 +00001BD0 B002 3973 CMP.b d2,d0 * compare with search character (terminator 1) +00001BD2 6704 3974 BEQ.s LAB_20CB * branch if terminator +00001BD4 3975 +00001BD4 B003 3976 CMP.b d3,d0 * compare with terminator 2 +00001BD6 66F0 3977 BNE.s LAB_20BE * loop if not terminator 2 (or null string) +00001BD8 3978 +00001BD8 3979 LAB_20CB +00001BD8 B03C 0022 3980 CMP.b #$22,d0 * compare with " +00001BDC 6602 3981 BNE.s LAB_20D0 * branch if not " +00001BDE 3982 +00001BDE 524A 3983 ADDQ.w #1,a2 * else increment string start (skip " at end) +00001BE0 3984 LAB_20D0 +00001BE0 D5C1 3985 ADDA.l d1,a2 * add longowrd length to make string end+1 +00001BE2 3986 +00001BE2 B1CB 3987 CMPA.l a3,a0 * is string in ram +00001BE4 651E 3988 BCS.s LAB_RTST * if not go push descriptor on stack & exit +00001BE6 3989 * (could be message string from ROM) +00001BE6 3990 +00001BE6 B1EB 042E 3991 CMPA.l Smeml(a3),a0 * is string in utility ram +00001BEA 6418 3992 BCC.s LAB_RTST * if not go push descriptor on stack & exit +00001BEC 3993 * (is in string or program space) +00001BEC 3994 +00001BEC 3995 * (else) copy string to string memory +00001BEC 3996 LAB_20C9 +00001BEC 2248 3997 MOVEA.l a0,a1 * copy descriptor pointer +00001BEE 2001 3998 MOVE.l d1,d0 * copy longword length +00001BF0 6604 3999 BNE.s LAB_20D8 * branch if not null string +00001BF2 4000 +00001BF2 2041 4001 MOVEA.l d1,a0 * make null pointer +00001BF4 600E 4002 BRA.s LAB_RTST * go push descriptor on stack & exit +00001BF6 4003 +00001BF6 4004 LAB_20D8 +00001BF6 6126 4005 BSR.s LAB_2115 * make string space d1 bytes long +00001BF8 D1C1 4006 ADDA.l d1,a0 * new string end +00001BFA D3C1 4007 ADDA.l d1,a1 * old string end +00001BFC 5340 4008 SUBQ.w #1,d0 * -1 for DBF loop +00001BFE 4009 LAB_20E0 +00001BFE 1121 4010 MOVE.b -(a1),-(a0) * copy byte (source can be odd aligned) +00001C00 51C8 FFFC 4011 DBF d0,LAB_20E0 * loop until done +00001C04 4012 +00001C04 4013 00001C04 4014 -00001C04 4015 -00001C04 4016 -00001C04 4017 ************************************************************************************* -00001C04 4018 * -00001C04 4019 * check for space on descriptor stack then ... -00001C04 4020 * put string address and length on descriptor stack & update stack pointers -00001C04 4021 * start is in a0, length is in d1 -00001C04 4022 -00001C04 4023 LAB_RTST -00001C04 43EB 0CDA 4024 LEA des_sk_e(a3),a1 * get string stack pointer max+1 -00001C08 B9C9 4025 CMPA.l a1,a4 * compare string stack pointer with max+1 -00001C0A 6700 ED2A 4026 BEQ LAB_SCER * if no space on string stack .. -00001C0E 4027 * .. go do 'string too complex' error -00001C0E 4028 -00001C0E 4029 * push string & update pointers -00001C0E 3901 4030 MOVE.w d1,-(a4) * string length on descriptor stack -00001C10 2908 4031 MOVE.l a0,-(a4) * string address on stack -00001C12 274C 0DF4 4032 MOVE.l a4,FAC1_m(a3) * string descriptor pointer in FAC1 -00001C16 177C 0080 0E19 4033 MOVE.b #$80,Dtypef(a3) * save data type flag, $80=string -00001C1C 4E75 4034 RTS -00001C1E 4035 -00001C1E 4036 -00001C1E 4037 ************************************************************************************* -00001C1E 4038 * -00001C1E 4039 * build descriptor a0/d1 -00001C1E 4040 * make space in string memory for string d1.w long -00001C1E 4041 * return pointer in a0/Sutill -00001C1E 4042 -00001C1E 4043 LAB_2115 -00001C1E 4A41 4044 TST.w d1 * test length -00001C20 672E 4045 BEQ.s LAB_2128 * branch if user wants null string -00001C22 4046 -00001C22 4047 * make space for string d1 long -00001C22 2F00 4048 MOVE.l d0,-(sp) * save d0 -00001C24 7000 4049 MOVEQ #0,d0 * clear longword -00001C26 1740 0E42 4050 MOVE.b d0,Gclctd(a3) * clear garbage collected flag (b7) -00001C2A 7001 4051 MOVEQ #1,d0 * +1 to possibly round up -00001C2C C041 4052 AND.w d1,d0 * mask odd bit -00001C2E D041 4053 ADD.w d1,d0 * ensure d0 is even length -00001C30 6404 4054 BCC.s LAB_2117 * branch if no overflow -00001C32 4055 -00001C32 7001 4056 MOVEQ #1,d0 * set to allocate 65536 bytes -00001C34 4840 4057 SWAP d0 * makes $00010000 -00001C36 4058 LAB_2117 -00001C36 206B 0CAA 4059 MOVEA.l Sstorl(a3),a0 * get bottom of string space -00001C3A 91C0 4060 SUBA.l d0,a0 * subtract string length -00001C3C B1EB 0CA6 4061 CMPA.l Earryl(a3),a0 * compare with top of array space -00001C40 6512 4062 BCS.s LAB_2137 * if less do out of memory error -00001C42 4063 -00001C42 2748 0CAA 4064 MOVE.l a0,Sstorl(a3) * save bottom of string space -00001C46 2748 0CB2 4065 MOVE.l a0,Sutill(a3) * save string utility pointer -00001C4A 201F 4066 MOVE.l (sp)+,d0 * restore d0 -00001C4C 4A41 4067 TST.w d1 * set flags on length -00001C4E 4E75 4068 RTS -00001C50 4069 -00001C50 4070 LAB_2128 -00001C50 3041 4071 MOVEA.w d1,a0 * make null pointer -00001C52 4E75 4072 RTS -00001C54 4073 -00001C54 4074 LAB_2137 -00001C54 4A2B 0E42 4075 TST.b Gclctd(a3) * get garbage collected flag -00001C58 6B00 ECFC 4076 BMI LAB_OMER * do "Out of memory" error, then warm start -00001C5C 4077 -00001C5C 2F09 4078 MOVE.l a1,-(sp) * save a1 -00001C5E 610A 4079 BSR.s LAB_GARB * else go do garbage collection -00001C60 225F 4080 MOVEA.l (sp)+,a1 * restore a1 -00001C62 177C 0080 0E42 4081 MOVE.b #$80,Gclctd(a3) * set garbage collected flag -00001C68 60CC 4082 BRA.s LAB_2117 * go try again -00001C6A 4083 -00001C6A 4084 -00001C6A 4085 ************************************************************************************* -00001C6A 4086 * -00001C6A 4087 * garbage collection routine -00001C6A 4088 -00001C6A 4089 LAB_GARB -00001C6A 48E7 E0E0 4090 MOVEM.l d0-d2/a0-a2,-(sp) * save registers -00001C6E 276B 0CAE 0CAA 4091 MOVE.l Ememl(a3),Sstorl(a3) * start with no strings -00001C74 4092 -00001C74 4093 * re-run routine from last ending -00001C74 4094 LAB_214B -00001C74 222B 0CA6 4095 MOVE.l Earryl(a3),d1 * set highest uncollected string so far -00001C78 7000 4096 MOVEQ #0,d0 * clear longword -00001C7A 2240 4097 MOVEA.l d0,a1 * clear string to move pointer -00001C7C 206B 0C9E 4098 MOVEA.l Sstrl(a3),a0 * set pointer to start of strings -00001C80 41E8 0004 4099 LEA 4(a0),a0 * index to string pointer -00001C84 246B 0CA2 4100 MOVEA.l Sarryl(a3),a2 * set end pointer to start of arrays (end of -00001C88 4101 * strings) -00001C88 6008 4102 BRA.s LAB_2176 * branch into loop at end loop test -00001C8A 4103 -00001C8A 4104 LAB_2161 -00001C8A 6100 0084 4105 BSR LAB_2206 * test and set if this is the highest string -00001C8E 41E8 000A 4106 LEA 10(a0),a0 * increment to next string -00001C92 4107 LAB_2176 -00001C92 B1CA 4108 CMPA.l a2,a0 * compare end of area with pointer -00001C94 65F4 4109 BCS.s LAB_2161 * go do next if not at end +00001C04 4015 ************************************************************************************* +00001C04 4016 * +00001C04 4017 * check for space on descriptor stack then ... +00001C04 4018 * put string address and length on descriptor stack & update stack pointers +00001C04 4019 * start is in a0, length is in d1 +00001C04 4020 +00001C04 4021 LAB_RTST +00001C04 43EB 0476 4022 LEA des_sk_e(a3),a1 * get string stack pointer max+1 +00001C08 B9C9 4023 CMPA.l a1,a4 * compare string stack pointer with max+1 +00001C0A 6700 ED2A 4024 BEQ LAB_SCER * if no space on string stack .. +00001C0E 4025 * .. go do 'string too complex' error +00001C0E 4026 +00001C0E 4027 * push string & update pointers +00001C0E 3901 4028 MOVE.w d1,-(a4) * string length on descriptor stack +00001C10 2908 4029 MOVE.l a0,-(a4) * string address on stack +00001C12 274C 0590 4030 MOVE.l a4,FAC1_m(a3) * string descriptor pointer in FAC1 +00001C16 177C 0080 05B5 4031 MOVE.b #$80,Dtypef(a3) * save data type flag, $80=string +00001C1C 4E75 4032 RTS +00001C1E 4033 +00001C1E 4034 +00001C1E 4035 ************************************************************************************* +00001C1E 4036 * +00001C1E 4037 * build descriptor a0/d1 +00001C1E 4038 * make space in string memory for string d1.w long +00001C1E 4039 * return pointer in a0/Sutill +00001C1E 4040 +00001C1E 4041 LAB_2115 +00001C1E 4A41 4042 TST.w d1 * test length +00001C20 672E 4043 BEQ.s LAB_2128 * branch if user wants null string +00001C22 4044 +00001C22 4045 * make space for string d1 long +00001C22 2F00 4046 MOVE.l d0,-(sp) * save d0 +00001C24 7000 4047 MOVEQ #0,d0 * clear longword +00001C26 1740 05DE 4048 MOVE.b d0,Gclctd(a3) * clear garbage collected flag (b7) +00001C2A 7001 4049 MOVEQ #1,d0 * +1 to possibly round up +00001C2C C041 4050 AND.w d1,d0 * mask odd bit +00001C2E D041 4051 ADD.w d1,d0 * ensure d0 is even length +00001C30 6404 4052 BCC.s LAB_2117 * branch if no overflow +00001C32 4053 +00001C32 7001 4054 MOVEQ #1,d0 * set to allocate 65536 bytes +00001C34 4840 4055 SWAP d0 * makes $00010000 +00001C36 4056 LAB_2117 +00001C36 206B 0446 4057 MOVEA.l Sstorl(a3),a0 * get bottom of string space +00001C3A 91C0 4058 SUBA.l d0,a0 * subtract string length +00001C3C B1EB 0442 4059 CMPA.l Earryl(a3),a0 * compare with top of array space +00001C40 6512 4060 BCS.s LAB_2137 * if less do out of memory error +00001C42 4061 +00001C42 2748 0446 4062 MOVE.l a0,Sstorl(a3) * save bottom of string space +00001C46 2748 044E 4063 MOVE.l a0,Sutill(a3) * save string utility pointer +00001C4A 201F 4064 MOVE.l (sp)+,d0 * restore d0 +00001C4C 4A41 4065 TST.w d1 * set flags on length +00001C4E 4E75 4066 RTS +00001C50 4067 +00001C50 4068 LAB_2128 +00001C50 3041 4069 MOVEA.w d1,a0 * make null pointer +00001C52 4E75 4070 RTS +00001C54 4071 +00001C54 4072 LAB_2137 +00001C54 4A2B 05DE 4073 TST.b Gclctd(a3) * get garbage collected flag +00001C58 6B00 ECFC 4074 BMI LAB_OMER * do "Out of memory" error, then warm start +00001C5C 4075 +00001C5C 2F09 4076 MOVE.l a1,-(sp) * save a1 +00001C5E 610A 4077 BSR.s LAB_GARB * else go do garbage collection +00001C60 225F 4078 MOVEA.l (sp)+,a1 * restore a1 +00001C62 177C 0080 05DE 4079 MOVE.b #$80,Gclctd(a3) * set garbage collected flag +00001C68 60CC 4080 BRA.s LAB_2117 * go try again +00001C6A 4081 +00001C6A 4082 +00001C6A 4083 ************************************************************************************* +00001C6A 4084 * +00001C6A 4085 * garbage collection routine +00001C6A 4086 +00001C6A 4087 LAB_GARB +00001C6A 48E7 E0E0 4088 MOVEM.l d0-d2/a0-a2,-(sp) * save registers +00001C6E 276B 044A 0446 4089 MOVE.l Ememl(a3),Sstorl(a3) * start with no strings +00001C74 4090 +00001C74 4091 * re-run routine from last ending +00001C74 4092 LAB_214B +00001C74 222B 0442 4093 MOVE.l Earryl(a3),d1 * set highest uncollected string so far +00001C78 7000 4094 MOVEQ #0,d0 * clear longword +00001C7A 2240 4095 MOVEA.l d0,a1 * clear string to move pointer +00001C7C 206B 043A 4096 MOVEA.l Sstrl(a3),a0 * set pointer to start of strings +00001C80 41E8 0004 4097 LEA 4(a0),a0 * index to string pointer +00001C84 246B 043E 4098 MOVEA.l Sarryl(a3),a2 * set end pointer to start of arrays (end of +00001C88 4099 * strings) +00001C88 6008 4100 BRA.s LAB_2176 * branch into loop at end loop test +00001C8A 4101 +00001C8A 4102 LAB_2161 +00001C8A 6100 0084 4103 BSR LAB_2206 * test and set if this is the highest string +00001C8E 41E8 000A 4104 LEA 10(a0),a0 * increment to next string +00001C92 4105 LAB_2176 +00001C92 B1CA 4106 CMPA.l a2,a0 * compare end of area with pointer +00001C94 65F4 4107 BCS.s LAB_2161 * go do next if not at end +00001C96 4108 +00001C96 4109 * done strings, now do arrays. 00001C96 4110 -00001C96 4111 * done strings, now do arrays. -00001C96 4112 -00001C96 41E8 FFFC 4113 LEA -4(a0),a0 * decrement pointer to start of arrays -00001C9A 246B 0CA6 4114 MOVEA.l Earryl(a3),a2 * set end pointer to end of arrays -00001C9E 6024 4115 BRA.s LAB_218F * branch into loop at end loop test -00001CA0 4116 -00001CA0 4117 LAB_217E -00001CA0 2428 0004 4118 MOVE.l 4(a0),d2 * get array size -00001CA4 D488 4119 ADD.l a0,d2 * makes start of next array -00001CA6 4120 -00001CA6 2010 4121 MOVE.l (a0),d0 * get array name -00001CA8 0800 0017 4122 BTST #23,d0 * test string flag -00001CAC 6714 4123 BEQ.s LAB_218B * branch if not string -00001CAE 4124 -00001CAE 3028 0008 4125 MOVE.w 8(a0),d0 * get # of dimensions -00001CB2 D040 4126 ADD.w d0,d0 * *2 -00001CB4 D0C0 4127 ADDA.w d0,a0 * add to skip dimension size(s) -00001CB6 41E8 000A 4128 LEA 10(a0),a0 * increment to first element -00001CBA 4129 LAB_2183 -00001CBA 6154 4130 BSR.s LAB_2206 * test and set if this is the highest string -00001CBC 5C48 4131 ADDQ.w #6,a0 * increment to next element -00001CBE B1C2 4132 CMPA.l d2,a0 * compare with start of next array -00001CC0 66F8 4133 BNE.s LAB_2183 * go do next if not at end of array -00001CC2 4134 -00001CC2 4135 LAB_218B -00001CC2 2042 4136 MOVEA.l d2,a0 * pointer to next array -00001CC4 4137 LAB_218F -00001CC4 B5C8 4138 CMPA.l a0,a2 * compare pointer with array end -00001CC6 66D8 4139 BNE.s LAB_217E * go do next if not at end +00001C96 41E8 FFFC 4111 LEA -4(a0),a0 * decrement pointer to start of arrays +00001C9A 246B 0442 4112 MOVEA.l Earryl(a3),a2 * set end pointer to end of arrays +00001C9E 6024 4113 BRA.s LAB_218F * branch into loop at end loop test +00001CA0 4114 +00001CA0 4115 LAB_217E +00001CA0 2428 0004 4116 MOVE.l 4(a0),d2 * get array size +00001CA4 D488 4117 ADD.l a0,d2 * makes start of next array +00001CA6 4118 +00001CA6 2010 4119 MOVE.l (a0),d0 * get array name +00001CA8 0800 0017 4120 BTST #23,d0 * test string flag +00001CAC 6714 4121 BEQ.s LAB_218B * branch if not string +00001CAE 4122 +00001CAE 3028 0008 4123 MOVE.w 8(a0),d0 * get # of dimensions +00001CB2 D040 4124 ADD.w d0,d0 * *2 +00001CB4 D0C0 4125 ADDA.w d0,a0 * add to skip dimension size(s) +00001CB6 41E8 000A 4126 LEA 10(a0),a0 * increment to first element +00001CBA 4127 LAB_2183 +00001CBA 6154 4128 BSR.s LAB_2206 * test and set if this is the highest string +00001CBC 5C48 4129 ADDQ.w #6,a0 * increment to next element +00001CBE B1C2 4130 CMPA.l d2,a0 * compare with start of next array +00001CC0 66F8 4131 BNE.s LAB_2183 * go do next if not at end of array +00001CC2 4132 +00001CC2 4133 LAB_218B +00001CC2 2042 4134 MOVEA.l d2,a0 * pointer to next array +00001CC4 4135 LAB_218F +00001CC4 B5C8 4136 CMPA.l a0,a2 * compare pointer with array end +00001CC6 66D8 4137 BNE.s LAB_217E * go do next if not at end +00001CC8 4138 +00001CC8 4139 * done arrays and variables, now just the descriptor stack to do 00001CC8 4140 -00001CC8 4141 * done arrays and variables, now just the descriptor stack to do -00001CC8 4142 -00001CC8 204C 4143 MOVEA.l a4,a0 * get descriptor stack pointer -00001CCA 45EB 0CF2 4144 LEA des_sk(a3),a2 * set end pointer to end of stack -00001CCE 6006 4145 BRA.s LAB_21C4 * branch into loop at end loop test -00001CD0 4146 -00001CD0 4147 LAB_21C2 -00001CD0 613E 4148 BSR.s LAB_2206 * test and set if this is the highest string -00001CD2 41E8 0006 4149 LEA 6(a0),a0 * increment to next string -00001CD6 4150 LAB_21C4 -00001CD6 B5C8 4151 CMPA.l a0,a2 * compare pointer with stack end -00001CD8 66F6 4152 BNE.s LAB_21C2 * go do next if not at end +00001CC8 204C 4141 MOVEA.l a4,a0 * get descriptor stack pointer +00001CCA 45EB 048E 4142 LEA des_sk(a3),a2 * set end pointer to end of stack +00001CCE 6006 4143 BRA.s LAB_21C4 * branch into loop at end loop test +00001CD0 4144 +00001CD0 4145 LAB_21C2 +00001CD0 613E 4146 BSR.s LAB_2206 * test and set if this is the highest string +00001CD2 41E8 0006 4147 LEA 6(a0),a0 * increment to next string +00001CD6 4148 LAB_21C4 +00001CD6 B5C8 4149 CMPA.l a0,a2 * compare pointer with stack end +00001CD8 66F6 4150 BNE.s LAB_21C2 * go do next if not at end +00001CDA 4151 +00001CDA 4152 * descriptor search complete, now either exit or set-up and move string 00001CDA 4153 -00001CDA 4154 * descriptor search complete, now either exit or set-up and move string -00001CDA 4155 -00001CDA 2009 4156 MOVE.l a1,d0 * set the flags (a1 is move string) -00001CDC 672C 4157 BEQ.s LAB_21D1 * go tidy up and exit if no move -00001CDE 4158 -00001CDE 2051 4159 MOVEA.l (a1),a0 * a0 is now string start -00001CE0 7200 4160 MOVEQ #0,d1 * clear d1 -00001CE2 3229 0004 4161 MOVE.w 4(a1),d1 * d1 is string length -00001CE6 5281 4162 ADDQ.l #1,d1 * +1 -00001CE8 C23C 00FE 4163 AND.b #$FE,d1 * make even length -00001CEC D1C1 4164 ADDA.l d1,a0 * pointer is now to string end+1 -00001CEE 246B 0CAA 4165 MOVEA.l Sstorl(a3),a2 * is destination end+1 -00001CF2 B1CA 4166 CMPA.l a2,a0 * does the string need moving -00001CF4 670C 4167 BEQ.s LAB_2240 * branch if not -00001CF6 4168 -00001CF6 E289 4169 LSR.l #1,d1 * word move so do /2 -00001CF8 5341 4170 SUBQ.w #1,d1 * -1 for DBF loop -00001CFA 4171 LAB_2216 -00001CFA 3520 4172 MOVE.w -(a0),-(a2) * copy word -00001CFC 51C9 FFFC 4173 DBF d1,LAB_2216 * loop until done -00001D00 4174 -00001D00 228A 4175 MOVE.l a2,(a1) * save new string start -00001D02 4176 LAB_2240 -00001D02 2751 0CAA 4177 MOVE.l (a1),Sstorl(a3) * string start is new string mem start -00001D06 6000 FF6C 4178 BRA LAB_214B * re-run routine from last ending -00001D0A 4179 * (but don't collect this string) -00001D0A 4180 -00001D0A 4181 LAB_21D1 -00001D0A 4CDF 0707 4182 MOVEM.l (sp)+,d0-d2/a0-a2 * restore registers -00001D0E 4E75 4183 RTS +00001CDA 2009 4154 MOVE.l a1,d0 * set the flags (a1 is move string) +00001CDC 672C 4155 BEQ.s LAB_21D1 * go tidy up and exit if no move +00001CDE 4156 +00001CDE 2051 4157 MOVEA.l (a1),a0 * a0 is now string start +00001CE0 7200 4158 MOVEQ #0,d1 * clear d1 +00001CE2 3229 0004 4159 MOVE.w 4(a1),d1 * d1 is string length +00001CE6 5281 4160 ADDQ.l #1,d1 * +1 +00001CE8 C23C 00FE 4161 AND.b #$FE,d1 * make even length +00001CEC D1C1 4162 ADDA.l d1,a0 * pointer is now to string end+1 +00001CEE 246B 0446 4163 MOVEA.l Sstorl(a3),a2 * is destination end+1 +00001CF2 B1CA 4164 CMPA.l a2,a0 * does the string need moving +00001CF4 670C 4165 BEQ.s LAB_2240 * branch if not +00001CF6 4166 +00001CF6 E289 4167 LSR.l #1,d1 * word move so do /2 +00001CF8 5341 4168 SUBQ.w #1,d1 * -1 for DBF loop +00001CFA 4169 LAB_2216 +00001CFA 3520 4170 MOVE.w -(a0),-(a2) * copy word +00001CFC 51C9 FFFC 4171 DBF d1,LAB_2216 * loop until done +00001D00 4172 +00001D00 228A 4173 MOVE.l a2,(a1) * save new string start +00001D02 4174 LAB_2240 +00001D02 2751 0446 4175 MOVE.l (a1),Sstorl(a3) * string start is new string mem start +00001D06 6000 FF6C 4176 BRA LAB_214B * re-run routine from last ending +00001D0A 4177 * (but don't collect this string) +00001D0A 4178 +00001D0A 4179 LAB_21D1 +00001D0A 4CDF 0707 4180 MOVEM.l (sp)+,d0-d2/a0-a2 * restore registers +00001D0E 4E75 4181 RTS +00001D10 4182 +00001D10 4183 * test and set if this is the highest string 00001D10 4184 -00001D10 4185 * test and set if this is the highest string -00001D10 4186 -00001D10 4187 LAB_2206 -00001D10 2010 4188 MOVE.l (a0),d0 * get this string pointer -00001D12 6728 4189 BEQ.s RTS_012 * exit if null string -00001D14 4190 -00001D14 B280 4191 CMP.l d0,d1 * compare with highest uncollected string so far -00001D16 6424 4192 BCC.s RTS_012 * exit if <= with highest so far -00001D18 4193 -00001D18 B0AB 0CAA 4194 CMP.l Sstorl(a3),d0 * compare with bottom of string space -00001D1C 641E 4195 BCC.s RTS_012 * exit if >= bottom of string space -00001D1E 4196 -00001D1E 70FF 4197 MOVEQ #-1,d0 * d0 = $FFFFFFFF -00001D20 3028 0004 4198 MOVE.w 4(a0),d0 * d0 is string length -00001D24 4440 4199 NEG.w d0 * make -ve -00001D26 C03C 00FE 4200 AND.b #$FE,d0 * make -ve even length -00001D2A D0AB 0CAA 4201 ADD.l Sstorl(a3),d0 * add string store to -ve length -00001D2E B090 4202 CMP.l (a0),d0 * compare with string address -00001D30 6706 4203 BEQ.s LAB_2212 * if = go move string store pointer down -00001D32 4204 -00001D32 2210 4205 MOVE.l (a0),d1 * highest = current -00001D34 2248 4206 MOVEA.l a0,a1 * string to move = current -00001D36 4E75 4207 RTS -00001D38 4208 -00001D38 4209 LAB_2212 -00001D38 2740 0CAA 4210 MOVE.l d0,Sstorl(a3) * set new string store start -00001D3C 4211 RTS_012 -00001D3C 4E75 4212 RTS -00001D3E 4213 -00001D3E 4214 -00001D3E 4215 ************************************************************************************* -00001D3E 4216 * -00001D3E 4217 * concatenate - add strings -00001D3E 4218 * string descriptor 1 is in FAC1_m, string 2 is in line -00001D3E 4219 -00001D3E 4220 LAB_224D -00001D3E 487A F73A 4221 PEA LAB_1ADB(pc) * continue evaluation after concatenate -00001D42 2F2B 0DF4 4222 MOVE.l FAC1_m(a3),-(sp) * stack descriptor pointer for string 1 -00001D46 4223 -00001D46 6100 F80E 4224 BSR LAB_GVAL * get value from line -00001D4A 4A2B 0E19 4225 TST.b Dtypef(a3) * test data type flag -00001D4E 6A00 EBEE 4226 BPL LAB_TMER * if type is not string do type mismatch error -00001D52 4227 -00001D52 205F 4228 MOVEA.l (sp)+,a0 * restore descriptor pointer for string 1 -00001D54 4229 -00001D54 4230 ************************************************************************************* -00001D54 4231 * -00001D54 4232 * concatenate -00001D54 4233 * string descriptor 1 is in a0, string descriptor 2 is in FAC1_m -00001D54 4234 -00001D54 4235 LAB_224E -00001D54 226B 0DF4 4236 MOVEA.l FAC1_m(a3),a1 * copy descriptor pointer 2 -00001D58 3228 0004 4237 MOVE.w 4(a0),d1 * get length 1 -00001D5C D269 0004 4238 ADD.w 4(a1),d1 * add length 2 -00001D60 6500 EBD8 4239 BCS LAB_SLER * if overflow go do 'string too long' error -00001D64 4240 -00001D64 2F08 4241 MOVE.l a0,-(sp) * save descriptor pointer 1 -00001D66 6100 FEB6 4242 BSR LAB_2115 * make space d1 bytes long -00001D6A 2748 0DFC 4243 MOVE.l a0,FAC2_m(a3) * save new string start pointer -00001D6E 2057 4244 MOVEA.l (sp),a0 * copy descriptor pointer 1 from stack -00001D70 3028 0004 4245 MOVE.w 4(a0),d0 * get length -00001D74 2050 4246 MOVEA.l (a0),a0 * get string pointer -00001D76 6120 4247 BSR.s LAB_229E * copy string d0 bytes long from a0 to Sutill -00001D78 4248 * return with a0 = pointer, d1 = length -00001D78 4249 -00001D78 206B 0DF4 4250 MOVEA.l FAC1_m(a3),a0 * get descriptor pointer for string 2 -00001D7C 6138 4251 BSR.s LAB_22BA * pop (a0) descriptor, returns with .. -00001D7E 4252 * a0 = pointer, d0 = length -00001D7E 6118 4253 BSR.s LAB_229E * copy string d0 bytes long from a0 to Sutill -00001D80 4254 * return with a0 = pointer, d1 = length -00001D80 4255 -00001D80 205F 4256 MOVEA.l (sp)+,a0 * get descriptor pointer for string 1 -00001D82 6132 4257 BSR.s LAB_22BA * pop (a0) descriptor, returns with .. -00001D84 4258 * d0 = length, a0 = pointer -00001D84 4259 -00001D84 206B 0DFC 4260 MOVEA.l FAC2_m(a3),a0 * retreive the result string pointer -00001D88 2208 4261 MOVE.l a0,d1 * copy the result string pointer -00001D8A 6700 FE78 4262 BEQ LAB_RTST * if it is a null string just return it -00001D8E 4263 * a0 = pointer, d1 = length -00001D8E 4264 -00001D8E 4481 4265 NEG.l d1 * else make the start pointer negative -00001D90 D2AB 0CB2 4266 ADD.l Sutill(a3),d1 * add the end pointert to give the length -00001D94 6000 FE6E 4267 BRA LAB_RTST * push string on descriptor stack -00001D98 4268 * a0 = pointer, d1 = length -00001D98 4269 -00001D98 4270 -00001D98 4271 ************************************************************************************* -00001D98 4272 * -00001D98 4273 * copy string d0 bytes long from a0 to Sutill -00001D98 4274 * return with a0 = pointer, d1 = length -00001D98 4275 -00001D98 4276 LAB_229E -00001D98 3200 4277 MOVE.w d0,d1 * copy and check length -00001D9A 6714 4278 BEQ.s RTS_013 * skip copy if null -00001D9C 4279 -00001D9C 226B 0CB2 4280 MOVEA.l Sutill(a3),a1 * get destination pointer -00001DA0 2F09 4281 MOVE.l a1,-(sp) * save destination string pointer -00001DA2 5340 4282 SUBQ.w #1,d0 * subtract for DBF loop -00001DA4 4283 LAB_22A0 -00001DA4 12D8 4284 MOVE.b (a0)+,(a1)+ * copy byte -00001DA6 51C8 FFFC 4285 DBF d0,LAB_22A0 * loop if not done -00001DAA 4286 -00001DAA 2749 0CB2 4287 MOVE.l a1,Sutill(a3) * update Sutill to end of copied string -00001DAE 205F 4288 MOVEA.l (sp)+,a0 * restore destination string pointer -00001DB0 4289 RTS_013 -00001DB0 4E75 4290 RTS -00001DB2 4291 -00001DB2 4292 -00001DB2 4293 ************************************************************************************* -00001DB2 4294 * -00001DB2 4295 * pop string off descriptor stack, or from top of string space -00001DB2 4296 * returns with d0.l = length, a0 = pointer -00001DB2 4297 -00001DB2 4298 LAB_22B6 -00001DB2 206B 0DF4 4299 MOVEA.l FAC1_m(a3),a0 * get descriptor pointer -00001DB6 4300 -00001DB6 4301 -00001DB6 4302 ************************************************************************************* -00001DB6 4303 * -00001DB6 4304 * pop (a0) descriptor off stack or from string space -00001DB6 4305 * returns with d0.l = length, a0 = pointer -00001DB6 4306 -00001DB6 4307 LAB_22BA -00001DB6 48E7 4040 4308 MOVEM.l a1/d1,-(sp) * save other regs -00001DBA B9C8 4309 CMPA.l a0,a4 * is string on the descriptor stack -00001DBC 6602 4310 BNE.s LAB_22BD * skip pop if not -00001DBE 4311 -00001DBE 5C4C 4312 ADDQ.w #$06,a4 * else update stack pointer -00001DC0 4313 LAB_22BD -00001DC0 7000 4314 MOVEQ #0,d0 * clear string length longword -00001DC2 2258 4315 MOVEA.l (a0)+,a1 * get string address -00001DC4 3018 4316 MOVE.w (a0)+,d0 * get string length -00001DC6 4317 -00001DC6 B9C8 4318 CMPA.l a0,a4 * was it on the descriptor stack -00001DC8 6610 4319 BNE.s LAB_22E6 * branch if it wasn't -00001DCA 4320 -00001DCA B3EB 0CAA 4321 CMPA.l Sstorl(a3),a1 * compare string address with bottom of string -00001DCE 4322 * space -00001DCE 660A 4323 BNE.s LAB_22E6 * branch if <> -00001DD0 4324 -00001DD0 7201 4325 MOVEQ #1,d1 * mask for odd bit -00001DD2 C240 4326 AND.w d0,d1 * AND length -00001DD4 D280 4327 ADD.l d0,d1 * make it fit word aligned length -00001DD6 4328 -00001DD6 D3AB 0CAA 4329 ADD.l d1,Sstorl(a3) * add to bottom of string space -00001DDA 4330 LAB_22E6 -00001DDA 2049 4331 MOVEA.l a1,a0 * copy to a0 -00001DDC 4CDF 0202 4332 MOVEM.l (sp)+,a1/d1 * restore other regs -00001DE0 4A80 4333 TST.l d0 * set flags on length -00001DE2 4E75 4334 RTS -00001DE4 4335 -00001DE4 4336 -00001DE4 4337 ************************************************************************************* -00001DE4 4338 * -00001DE4 4339 * perform CHR$() -00001DE4 4340 -00001DE4 4341 LAB_CHRS -00001DE4 6100 0130 4342 BSR LAB_EVBY * evaluate byte expression, result in d0 and -00001DE8 4343 * Itemp -00001DE8 4344 LAB_MKCHR -00001DE8 7201 4345 MOVEQ #1,d1 * string is single byte -00001DEA 6100 FE32 4346 BSR LAB_2115 * make string space d1 bytes long -00001DEE 4347 * return a0/Sutill = pointer, others unchanged -00001DEE 1080 4348 MOVE.b d0,(a0) * save byte in string (byte IS string!) -00001DF0 6000 FE12 4349 BRA LAB_RTST * push string on descriptor stack -00001DF4 4350 * a0 = pointer, d1 = length -00001DF4 4351 -00001DF4 4352 -00001DF4 4353 ************************************************************************************* -00001DF4 4354 * -00001DF4 4355 * perform LEFT$() +00001D10 4185 LAB_2206 +00001D10 2010 4186 MOVE.l (a0),d0 * get this string pointer +00001D12 6728 4187 BEQ.s RTS_012 * exit if null string +00001D14 4188 +00001D14 B280 4189 CMP.l d0,d1 * compare with highest uncollected string so far +00001D16 6424 4190 BCC.s RTS_012 * exit if <= with highest so far +00001D18 4191 +00001D18 B0AB 0446 4192 CMP.l Sstorl(a3),d0 * compare with bottom of string space +00001D1C 641E 4193 BCC.s RTS_012 * exit if >= bottom of string space +00001D1E 4194 +00001D1E 70FF 4195 MOVEQ #-1,d0 * d0 = $FFFFFFFF +00001D20 3028 0004 4196 MOVE.w 4(a0),d0 * d0 is string length +00001D24 4440 4197 NEG.w d0 * make -ve +00001D26 C03C 00FE 4198 AND.b #$FE,d0 * make -ve even length +00001D2A D0AB 0446 4199 ADD.l Sstorl(a3),d0 * add string store to -ve length +00001D2E B090 4200 CMP.l (a0),d0 * compare with string address +00001D30 6706 4201 BEQ.s LAB_2212 * if = go move string store pointer down +00001D32 4202 +00001D32 2210 4203 MOVE.l (a0),d1 * highest = current +00001D34 2248 4204 MOVEA.l a0,a1 * string to move = current +00001D36 4E75 4205 RTS +00001D38 4206 +00001D38 4207 LAB_2212 +00001D38 2740 0446 4208 MOVE.l d0,Sstorl(a3) * set new string store start +00001D3C 4209 RTS_012 +00001D3C 4E75 4210 RTS +00001D3E 4211 +00001D3E 4212 +00001D3E 4213 ************************************************************************************* +00001D3E 4214 * +00001D3E 4215 * concatenate - add strings +00001D3E 4216 * string descriptor 1 is in FAC1_m, string 2 is in line +00001D3E 4217 +00001D3E 4218 LAB_224D +00001D3E 487A F73A 4219 PEA LAB_1ADB(pc) * continue evaluation after concatenate +00001D42 2F2B 0590 4220 MOVE.l FAC1_m(a3),-(sp) * stack descriptor pointer for string 1 +00001D46 4221 +00001D46 6100 F80E 4222 BSR LAB_GVAL * get value from line +00001D4A 4A2B 05B5 4223 TST.b Dtypef(a3) * test data type flag +00001D4E 6A00 EBEE 4224 BPL LAB_TMER * if type is not string do type mismatch error +00001D52 4225 +00001D52 205F 4226 MOVEA.l (sp)+,a0 * restore descriptor pointer for string 1 +00001D54 4227 +00001D54 4228 ************************************************************************************* +00001D54 4229 * +00001D54 4230 * concatenate +00001D54 4231 * string descriptor 1 is in a0, string descriptor 2 is in FAC1_m +00001D54 4232 +00001D54 4233 LAB_224E +00001D54 226B 0590 4234 MOVEA.l FAC1_m(a3),a1 * copy descriptor pointer 2 +00001D58 3228 0004 4235 MOVE.w 4(a0),d1 * get length 1 +00001D5C D269 0004 4236 ADD.w 4(a1),d1 * add length 2 +00001D60 6500 EBD8 4237 BCS LAB_SLER * if overflow go do 'string too long' error +00001D64 4238 +00001D64 2F08 4239 MOVE.l a0,-(sp) * save descriptor pointer 1 +00001D66 6100 FEB6 4240 BSR LAB_2115 * make space d1 bytes long +00001D6A 2748 0598 4241 MOVE.l a0,FAC2_m(a3) * save new string start pointer +00001D6E 2057 4242 MOVEA.l (sp),a0 * copy descriptor pointer 1 from stack +00001D70 3028 0004 4243 MOVE.w 4(a0),d0 * get length +00001D74 2050 4244 MOVEA.l (a0),a0 * get string pointer +00001D76 6120 4245 BSR.s LAB_229E * copy string d0 bytes long from a0 to Sutill +00001D78 4246 * return with a0 = pointer, d1 = length +00001D78 4247 +00001D78 206B 0590 4248 MOVEA.l FAC1_m(a3),a0 * get descriptor pointer for string 2 +00001D7C 6138 4249 BSR.s LAB_22BA * pop (a0) descriptor, returns with .. +00001D7E 4250 * a0 = pointer, d0 = length +00001D7E 6118 4251 BSR.s LAB_229E * copy string d0 bytes long from a0 to Sutill +00001D80 4252 * return with a0 = pointer, d1 = length +00001D80 4253 +00001D80 205F 4254 MOVEA.l (sp)+,a0 * get descriptor pointer for string 1 +00001D82 6132 4255 BSR.s LAB_22BA * pop (a0) descriptor, returns with .. +00001D84 4256 * d0 = length, a0 = pointer +00001D84 4257 +00001D84 206B 0598 4258 MOVEA.l FAC2_m(a3),a0 * retreive the result string pointer +00001D88 2208 4259 MOVE.l a0,d1 * copy the result string pointer +00001D8A 6700 FE78 4260 BEQ LAB_RTST * if it is a null string just return it +00001D8E 4261 * a0 = pointer, d1 = length +00001D8E 4262 +00001D8E 4481 4263 NEG.l d1 * else make the start pointer negative +00001D90 D2AB 044E 4264 ADD.l Sutill(a3),d1 * add the end pointert to give the length +00001D94 6000 FE6E 4265 BRA LAB_RTST * push string on descriptor stack +00001D98 4266 * a0 = pointer, d1 = length +00001D98 4267 +00001D98 4268 +00001D98 4269 ************************************************************************************* +00001D98 4270 * +00001D98 4271 * copy string d0 bytes long from a0 to Sutill +00001D98 4272 * return with a0 = pointer, d1 = length +00001D98 4273 +00001D98 4274 LAB_229E +00001D98 3200 4275 MOVE.w d0,d1 * copy and check length +00001D9A 6714 4276 BEQ.s RTS_013 * skip copy if null +00001D9C 4277 +00001D9C 226B 044E 4278 MOVEA.l Sutill(a3),a1 * get destination pointer +00001DA0 2F09 4279 MOVE.l a1,-(sp) * save destination string pointer +00001DA2 5340 4280 SUBQ.w #1,d0 * subtract for DBF loop +00001DA4 4281 LAB_22A0 +00001DA4 12D8 4282 MOVE.b (a0)+,(a1)+ * copy byte +00001DA6 51C8 FFFC 4283 DBF d0,LAB_22A0 * loop if not done +00001DAA 4284 +00001DAA 2749 044E 4285 MOVE.l a1,Sutill(a3) * update Sutill to end of copied string +00001DAE 205F 4286 MOVEA.l (sp)+,a0 * restore destination string pointer +00001DB0 4287 RTS_013 +00001DB0 4E75 4288 RTS +00001DB2 4289 +00001DB2 4290 +00001DB2 4291 ************************************************************************************* +00001DB2 4292 * +00001DB2 4293 * pop string off descriptor stack, or from top of string space +00001DB2 4294 * returns with d0.l = length, a0 = pointer +00001DB2 4295 +00001DB2 4296 LAB_22B6 +00001DB2 206B 0590 4297 MOVEA.l FAC1_m(a3),a0 * get descriptor pointer +00001DB6 4298 +00001DB6 4299 +00001DB6 4300 ************************************************************************************* +00001DB6 4301 * +00001DB6 4302 * pop (a0) descriptor off stack or from string space +00001DB6 4303 * returns with d0.l = length, a0 = pointer +00001DB6 4304 +00001DB6 4305 LAB_22BA +00001DB6 48E7 4040 4306 MOVEM.l a1/d1,-(sp) * save other regs +00001DBA B9C8 4307 CMPA.l a0,a4 * is string on the descriptor stack +00001DBC 6602 4308 BNE.s LAB_22BD * skip pop if not +00001DBE 4309 +00001DBE 5C4C 4310 ADDQ.w #$06,a4 * else update stack pointer +00001DC0 4311 LAB_22BD +00001DC0 7000 4312 MOVEQ #0,d0 * clear string length longword +00001DC2 2258 4313 MOVEA.l (a0)+,a1 * get string address +00001DC4 3018 4314 MOVE.w (a0)+,d0 * get string length +00001DC6 4315 +00001DC6 B9C8 4316 CMPA.l a0,a4 * was it on the descriptor stack +00001DC8 6610 4317 BNE.s LAB_22E6 * branch if it wasn't +00001DCA 4318 +00001DCA B3EB 0446 4319 CMPA.l Sstorl(a3),a1 * compare string address with bottom of string +00001DCE 4320 * space +00001DCE 660A 4321 BNE.s LAB_22E6 * branch if <> +00001DD0 4322 +00001DD0 7201 4323 MOVEQ #1,d1 * mask for odd bit +00001DD2 C240 4324 AND.w d0,d1 * AND length +00001DD4 D280 4325 ADD.l d0,d1 * make it fit word aligned length +00001DD6 4326 +00001DD6 D3AB 0446 4327 ADD.l d1,Sstorl(a3) * add to bottom of string space +00001DDA 4328 LAB_22E6 +00001DDA 2049 4329 MOVEA.l a1,a0 * copy to a0 +00001DDC 4CDF 0202 4330 MOVEM.l (sp)+,a1/d1 * restore other regs +00001DE0 4A80 4331 TST.l d0 * set flags on length +00001DE2 4E75 4332 RTS +00001DE4 4333 +00001DE4 4334 +00001DE4 4335 ************************************************************************************* +00001DE4 4336 * +00001DE4 4337 * perform CHR$() +00001DE4 4338 +00001DE4 4339 LAB_CHRS +00001DE4 6100 0130 4340 BSR LAB_EVBY * evaluate byte expression, result in d0 and +00001DE8 4341 * Itemp +00001DE8 4342 LAB_MKCHR +00001DE8 7201 4343 MOVEQ #1,d1 * string is single byte +00001DEA 6100 FE32 4344 BSR LAB_2115 * make string space d1 bytes long +00001DEE 4345 * return a0/Sutill = pointer, others unchanged +00001DEE 1080 4346 MOVE.b d0,(a0) * save byte in string (byte IS string!) +00001DF0 6000 FE12 4347 BRA LAB_RTST * push string on descriptor stack +00001DF4 4348 * a0 = pointer, d1 = length +00001DF4 4349 +00001DF4 4350 +00001DF4 4351 ************************************************************************************* +00001DF4 4352 * +00001DF4 4353 * perform LEFT$() +00001DF4 4354 +00001DF4 4355 * enter with a0 is descriptor, d0 & Itemp is word 1 00001DF4 4356 -00001DF4 4357 * enter with a0 is descriptor, d0 & Itemp is word 1 -00001DF4 4358 -00001DF4 4359 LAB_LEFT -00001DF4 C141 4360 EXG d0,d1 * word in d1 -00001DF6 6100 F79E 4361 BSR LAB_1BFB * scan for ")", else do syntax error/warm start -00001DFA 4362 -00001DFA 4A81 4363 TST.l d1 * test returned length -00001DFC 6722 4364 BEQ.s LAB_231C * branch if null return -00001DFE 4365 -00001DFE 7000 4366 MOVEQ #0,d0 * clear start offset -00001E00 B268 0004 4367 CMP.w 4(a0),d1 * compare word parameter with string length -00001E04 651A 4368 BCS.s LAB_231C * branch if string length > word parameter -00001E06 4369 -00001E06 6014 4370 BRA.s LAB_2317 * go copy whole string -00001E08 4371 -00001E08 4372 -00001E08 4373 ************************************************************************************* -00001E08 4374 * -00001E08 4375 * perform RIGHT$() +00001DF4 4357 LAB_LEFT +00001DF4 C141 4358 EXG d0,d1 * word in d1 +00001DF6 6100 F79E 4359 BSR LAB_1BFB * scan for ")", else do syntax error/warm start +00001DFA 4360 +00001DFA 4A81 4361 TST.l d1 * test returned length +00001DFC 6722 4362 BEQ.s LAB_231C * branch if null return +00001DFE 4363 +00001DFE 7000 4364 MOVEQ #0,d0 * clear start offset +00001E00 B268 0004 4365 CMP.w 4(a0),d1 * compare word parameter with string length +00001E04 651A 4366 BCS.s LAB_231C * branch if string length > word parameter +00001E06 4367 +00001E06 6014 4368 BRA.s LAB_2317 * go copy whole string +00001E08 4369 +00001E08 4370 +00001E08 4371 ************************************************************************************* +00001E08 4372 * +00001E08 4373 * perform RIGHT$() +00001E08 4374 +00001E08 4375 * enter with a0 is descriptor, d0 & Itemp is word 1 00001E08 4376 -00001E08 4377 * enter with a0 is descriptor, d0 & Itemp is word 1 -00001E08 4378 -00001E08 4379 LAB_RIGHT -00001E08 C141 4380 EXG d0,d1 * word in d1 -00001E0A 6100 F78A 4381 BSR LAB_1BFB * scan for ")", else do syntax error/warm start -00001E0E 4382 -00001E0E 4A81 4383 TST.l d1 * test returned length -00001E10 670E 4384 BEQ.s LAB_231C * branch if null return -00001E12 4385 -00001E12 3028 0004 4386 MOVE.w 4(a0),d0 * get string length -00001E16 9081 4387 SUB.l d1,d0 * subtract word -00001E18 6406 4388 BCC.s LAB_231C * branch if string length > word parameter -00001E1A 4389 -00001E1A 4390 * else copy whole string -00001E1A 4391 LAB_2316 -00001E1A 7000 4392 MOVEQ #0,d0 * clear start offset -00001E1C 4393 LAB_2317 -00001E1C 3228 0004 4394 MOVE.w 4(a0),d1 * else make parameter = length -00001E20 4395 -00001E20 4396 * get here with ... -00001E20 4397 * a0 - points to descriptor -00001E20 4398 * d0 - is offset from string start -00001E20 4399 * d1 - is required string length -00001E20 4400 -00001E20 4401 LAB_231C -00001E20 2248 4402 MOVEA.l a0,a1 * save string descriptor pointer -00001E22 6100 FDFA 4403 BSR LAB_2115 * make string space d1 bytes long -00001E26 4404 * return a0/Sutill = pointer, others unchanged -00001E26 2049 4405 MOVEA.l a1,a0 * restore string descriptor pointer -00001E28 2F00 4406 MOVE.l d0,-(sp) * save start offset (longword) -00001E2A 618A 4407 BSR.s LAB_22BA * pop (a0) descriptor, returns with .. -00001E2C 4408 * d0 = length, a0 = pointer -00001E2C D1DF 4409 ADDA.l (sp)+,a0 * adjust pointer to start of wanted string -00001E2E 3001 4410 MOVE.w d1,d0 * length to d0 -00001E30 6100 FF66 4411 BSR LAB_229E * store string d0 bytes long from (a0) to -00001E34 4412 * (Sutill) return with a0 = pointer, -00001E34 4413 * d1 = length -00001E34 6000 FDCE 4414 BRA LAB_RTST * push string on descriptor stack -00001E38 4415 * a0 = pointer, d1 = length -00001E38 4416 -00001E38 4417 -00001E38 4418 ************************************************************************************* -00001E38 4419 * -00001E38 4420 * perform MID$() +00001E08 4377 LAB_RIGHT +00001E08 C141 4378 EXG d0,d1 * word in d1 +00001E0A 6100 F78A 4379 BSR LAB_1BFB * scan for ")", else do syntax error/warm start +00001E0E 4380 +00001E0E 4A81 4381 TST.l d1 * test returned length +00001E10 670E 4382 BEQ.s LAB_231C * branch if null return +00001E12 4383 +00001E12 3028 0004 4384 MOVE.w 4(a0),d0 * get string length +00001E16 9081 4385 SUB.l d1,d0 * subtract word +00001E18 6406 4386 BCC.s LAB_231C * branch if string length > word parameter +00001E1A 4387 +00001E1A 4388 * else copy whole string +00001E1A 4389 LAB_2316 +00001E1A 7000 4390 MOVEQ #0,d0 * clear start offset +00001E1C 4391 LAB_2317 +00001E1C 3228 0004 4392 MOVE.w 4(a0),d1 * else make parameter = length +00001E20 4393 +00001E20 4394 * get here with ... +00001E20 4395 * a0 - points to descriptor +00001E20 4396 * d0 - is offset from string start +00001E20 4397 * d1 - is required string length +00001E20 4398 +00001E20 4399 LAB_231C +00001E20 2248 4400 MOVEA.l a0,a1 * save string descriptor pointer +00001E22 6100 FDFA 4401 BSR LAB_2115 * make string space d1 bytes long +00001E26 4402 * return a0/Sutill = pointer, others unchanged +00001E26 2049 4403 MOVEA.l a1,a0 * restore string descriptor pointer +00001E28 2F00 4404 MOVE.l d0,-(sp) * save start offset (longword) +00001E2A 618A 4405 BSR.s LAB_22BA * pop (a0) descriptor, returns with .. +00001E2C 4406 * d0 = length, a0 = pointer +00001E2C D1DF 4407 ADDA.l (sp)+,a0 * adjust pointer to start of wanted string +00001E2E 3001 4408 MOVE.w d1,d0 * length to d0 +00001E30 6100 FF66 4409 BSR LAB_229E * store string d0 bytes long from (a0) to +00001E34 4410 * (Sutill) return with a0 = pointer, +00001E34 4411 * d1 = length +00001E34 6000 FDCE 4412 BRA LAB_RTST * push string on descriptor stack +00001E38 4413 * a0 = pointer, d1 = length +00001E38 4414 +00001E38 4415 +00001E38 4416 ************************************************************************************* +00001E38 4417 * +00001E38 4418 * perform MID$() +00001E38 4419 +00001E38 4420 * enter with a0 is descriptor, d0 & Itemp is word 1 00001E38 4421 -00001E38 4422 * enter with a0 is descriptor, d0 & Itemp is word 1 -00001E38 4423 -00001E38 4424 LAB_MIDS -00001E38 7E00 4425 MOVEQ #0,d7 * clear longword -00001E3A 5347 4426 SUBQ.w #1,d7 * set default length = 65535 -00001E3C 2F00 4427 MOVE.l d0,-(sp) * save word 1 -00001E3E 6100 F76A 4428 BSR LAB_GBYT * scan memory -00001E42 B03C 002C 4429 CMP.b #',',d0 * was it "," -00001E46 660C 4430 BNE.s LAB_2358 * branch if not "," (skip second byte get) -00001E48 4431 -00001E48 101D 4432 MOVE.b (a5)+,d0 * increment pointer past "," -00001E4A 2F08 4433 MOVE.l a0,-(sp) * save descriptor pointer -00001E4C 6100 00D8 4434 BSR LAB_GTWO * get word parameter, result in d0 and Itemp -00001E50 205F 4435 MOVEA.l (sp)+,a0 * restore descriptor pointer -00001E52 2E00 4436 MOVE.l d0,d7 * copy length -00001E54 4437 LAB_2358 -00001E54 6100 F740 4438 BSR LAB_1BFB * scan for ")", else do syntax error then warm -00001E58 4439 * start -00001E58 201F 4440 MOVE.l (sp)+,d0 * restore word 1 -00001E5A 7200 4441 MOVEQ #0,d1 * null length -00001E5C 5380 4442 SUBQ.l #1,d0 * decrement start index (word 1) -00001E5E 6B00 EAFE 4443 BMI LAB_FCER * if was null do function call error then warm -00001E62 4444 * start -00001E62 4445 -00001E62 B068 0004 4446 CMP.w 4(a0),d0 * compare string length with start index -00001E66 64B8 4447 BCC.s LAB_231C * if start not in string do null string (d1=0) -00001E68 4448 -00001E68 2207 4449 MOVE.l d7,d1 * get length back -00001E6A DE40 4450 ADD.w d0,d7 * d7 now = MID$() end -00001E6C 6506 4451 BCS.s LAB_2368 * already too long so do RIGHT$ equivalent -00001E6E 4452 -00001E6E BE68 0004 4453 CMP.w 4(a0),d7 * compare string length with start index+length -00001E72 65AC 4454 BCS.s LAB_231C * if end in string go do string -00001E74 4455 -00001E74 4456 LAB_2368 -00001E74 3228 0004 4457 MOVE.w 4(a0),d1 * get string length -00001E78 9240 4458 SUB.w d0,d1 * subtract start offset -00001E7A 60A4 4459 BRA.s LAB_231C * go do string (effectively RIGHT$) -00001E7C 4460 -00001E7C 4461 -00001E7C 4462 ************************************************************************************* -00001E7C 4463 * -00001E7C 4464 * perform LCASE$() -00001E7C 4465 -00001E7C 4466 LAB_LCASE -00001E7C 6100 FF34 4467 BSR LAB_22B6 * pop string off descriptor stack or from memory -00001E80 4468 * returns with d0 = length, a0 = pointer -00001E80 2200 4469 MOVE.l d0,d1 * copy the string length -00001E82 6756 4470 BEQ.s NoString * if null go return a null string +00001E38 4422 LAB_MIDS +00001E38 7E00 4423 MOVEQ #0,d7 * clear longword +00001E3A 5347 4424 SUBQ.w #1,d7 * set default length = 65535 +00001E3C 2F00 4425 MOVE.l d0,-(sp) * save word 1 +00001E3E 6100 F76A 4426 BSR LAB_GBYT * scan memory +00001E42 B03C 002C 4427 CMP.b #',',d0 * was it "," +00001E46 660C 4428 BNE.s LAB_2358 * branch if not "," (skip second byte get) +00001E48 4429 +00001E48 101D 4430 MOVE.b (a5)+,d0 * increment pointer past "," +00001E4A 2F08 4431 MOVE.l a0,-(sp) * save descriptor pointer +00001E4C 6100 00D8 4432 BSR LAB_GTWO * get word parameter, result in d0 and Itemp +00001E50 205F 4433 MOVEA.l (sp)+,a0 * restore descriptor pointer +00001E52 2E00 4434 MOVE.l d0,d7 * copy length +00001E54 4435 LAB_2358 +00001E54 6100 F740 4436 BSR LAB_1BFB * scan for ")", else do syntax error then warm +00001E58 4437 * start +00001E58 201F 4438 MOVE.l (sp)+,d0 * restore word 1 +00001E5A 7200 4439 MOVEQ #0,d1 * null length +00001E5C 5380 4440 SUBQ.l #1,d0 * decrement start index (word 1) +00001E5E 6B00 EAFE 4441 BMI LAB_FCER * if was null do function call error then warm +00001E62 4442 * start +00001E62 4443 +00001E62 B068 0004 4444 CMP.w 4(a0),d0 * compare string length with start index +00001E66 64B8 4445 BCC.s LAB_231C * if start not in string do null string (d1=0) +00001E68 4446 +00001E68 2207 4447 MOVE.l d7,d1 * get length back +00001E6A DE40 4448 ADD.w d0,d7 * d7 now = MID$() end +00001E6C 6506 4449 BCS.s LAB_2368 * already too long so do RIGHT$ equivalent +00001E6E 4450 +00001E6E BE68 0004 4451 CMP.w 4(a0),d7 * compare string length with start index+length +00001E72 65AC 4452 BCS.s LAB_231C * if end in string go do string +00001E74 4453 +00001E74 4454 LAB_2368 +00001E74 3228 0004 4455 MOVE.w 4(a0),d1 * get string length +00001E78 9240 4456 SUB.w d0,d1 * subtract start offset +00001E7A 60A4 4457 BRA.s LAB_231C * go do string (effectively RIGHT$) +00001E7C 4458 +00001E7C 4459 +00001E7C 4460 ************************************************************************************* +00001E7C 4461 * +00001E7C 4462 * perform LCASE$() +00001E7C 4463 +00001E7C 4464 LAB_LCASE +00001E7C 6100 FF34 4465 BSR LAB_22B6 * pop string off descriptor stack or from memory +00001E80 4466 * returns with d0 = length, a0 = pointer +00001E80 2200 4467 MOVE.l d0,d1 * copy the string length +00001E82 6756 4468 BEQ.s NoString * if null go return a null string +00001E84 4469 +00001E84 4470 * else copy and change the string 00001E84 4471 -00001E84 4472 * else copy and change the string -00001E84 4473 -00001E84 2248 4474 MOVEA.l a0,a1 * copy the string address -00001E86 6100 FD96 4475 BSR LAB_2115 * make a string space d1 bytes long -00001E8A D1C1 4476 ADDA.l d1,a0 * new string end -00001E8C D3C1 4477 ADDA.l d1,a1 * old string end -00001E8E 3401 4478 MOVE.w d1,d2 * copy length for loop -00001E90 5342 4479 SUBQ.w #1,d2 * -1 for DBF loop -00001E92 4480 LC_loop -00001E92 1021 4481 MOVE.b -(a1),d0 * get byte from string -00001E94 4482 -00001E94 B03C 005B 4483 CMP.b #$5B,d0 * compare with "Z"+1 -00001E98 640A 4484 BCC.s NoUcase * if > "Z" skip change -00001E9A 4485 -00001E9A B03C 0041 4486 CMP.b #$41,d0 * compare with "A" -00001E9E 6504 4487 BCS.s NoUcase * if < "A" skip change -00001EA0 4488 -00001EA0 0000 0020 4489 ORI.b #$20,d0 * convert upper case to lower case -00001EA4 4490 NoUcase -00001EA4 1100 4491 MOVE.b d0,-(a0) * copy upper case byte back to string -00001EA6 51CA FFEA 4492 DBF d2,LC_loop * decrement and loop if not all done -00001EAA 4493 -00001EAA 602E 4494 BRA.s NoString * tidy up & exit (branch always) -00001EAC 4495 -00001EAC 4496 -00001EAC 4497 ************************************************************************************* -00001EAC 4498 * -00001EAC 4499 * perform UCASE$() -00001EAC 4500 -00001EAC 4501 LAB_UCASE -00001EAC 6100 FF04 4502 BSR LAB_22B6 * pop string off descriptor stack or from memory -00001EB0 4503 * returns with d0 = length, a0 = pointer -00001EB0 2200 4504 MOVE.l d0,d1 * copy the string length -00001EB2 6726 4505 BEQ.s NoString * if null go return a null string +00001E84 2248 4472 MOVEA.l a0,a1 * copy the string address +00001E86 6100 FD96 4473 BSR LAB_2115 * make a string space d1 bytes long +00001E8A D1C1 4474 ADDA.l d1,a0 * new string end +00001E8C D3C1 4475 ADDA.l d1,a1 * old string end +00001E8E 3401 4476 MOVE.w d1,d2 * copy length for loop +00001E90 5342 4477 SUBQ.w #1,d2 * -1 for DBF loop +00001E92 4478 LC_loop +00001E92 1021 4479 MOVE.b -(a1),d0 * get byte from string +00001E94 4480 +00001E94 B03C 005B 4481 CMP.b #$5B,d0 * compare with "Z"+1 +00001E98 640A 4482 BCC.s NoUcase * if > "Z" skip change +00001E9A 4483 +00001E9A B03C 0041 4484 CMP.b #$41,d0 * compare with "A" +00001E9E 6504 4485 BCS.s NoUcase * if < "A" skip change +00001EA0 4486 +00001EA0 0000 0020 4487 ORI.b #$20,d0 * convert upper case to lower case +00001EA4 4488 NoUcase +00001EA4 1100 4489 MOVE.b d0,-(a0) * copy upper case byte back to string +00001EA6 51CA FFEA 4490 DBF d2,LC_loop * decrement and loop if not all done +00001EAA 4491 +00001EAA 602E 4492 BRA.s NoString * tidy up & exit (branch always) +00001EAC 4493 +00001EAC 4494 +00001EAC 4495 ************************************************************************************* +00001EAC 4496 * +00001EAC 4497 * perform UCASE$() +00001EAC 4498 +00001EAC 4499 LAB_UCASE +00001EAC 6100 FF04 4500 BSR LAB_22B6 * pop string off descriptor stack or from memory +00001EB0 4501 * returns with d0 = length, a0 = pointer +00001EB0 2200 4502 MOVE.l d0,d1 * copy the string length +00001EB2 6726 4503 BEQ.s NoString * if null go return a null string +00001EB4 4504 +00001EB4 4505 * else copy and change the string 00001EB4 4506 -00001EB4 4507 * else copy and change the string -00001EB4 4508 -00001EB4 2248 4509 MOVEA.l a0,a1 * copy the string address -00001EB6 6100 FD66 4510 BSR LAB_2115 * make a string space d1 bytes long -00001EBA D1C1 4511 ADDA.l d1,a0 * new string end -00001EBC D3C1 4512 ADDA.l d1,a1 * old string end -00001EBE 3401 4513 MOVE.w d1,d2 * copy length for loop -00001EC0 5342 4514 SUBQ.w #1,d2 * -1 for DBF loop -00001EC2 4515 UC_loop -00001EC2 1021 4516 MOVE.b -(a1),d0 * get a byte from the string -00001EC4 4517 -00001EC4 B03C 0061 4518 CMP.b #$61,d0 * compare with "a" -00001EC8 650A 4519 BCS.s NoLcase * if < "a" skip change -00001ECA 4520 -00001ECA B03C 007B 4521 CMP.b #$7B,d0 * compare with "z"+1 -00001ECE 6404 4522 BCC.s NoLcase * if > "z" skip change -00001ED0 4523 -00001ED0 0200 00DF 4524 ANDI.b #$DF,d0 * convert lower case to upper case -00001ED4 4525 NoLcase -00001ED4 1100 4526 MOVE.b d0,-(a0) * copy upper case byte back to string -00001ED6 51CA FFEA 4527 DBF d2,UC_loop * decrement and loop if not all done -00001EDA 4528 -00001EDA 4529 NoString -00001EDA 6000 FD28 4530 BRA LAB_RTST * push string on descriptor stack -00001EDE 4531 * a0 = pointer, d1 = length -00001EDE 4532 -00001EDE 4533 -00001EDE 4534 ************************************************************************************* -00001EDE 4535 * -00001EDE 4536 * perform SADD() -00001EDE 4537 -00001EDE 4538 LAB_SADD -00001EDE 101D 4539 MOVE.b (a5)+,d0 * increment pointer -00001EE0 6100 F8D6 4540 BSR LAB_GVAR * get variable address in a0 -00001EE4 6100 F6B0 4541 BSR LAB_1BFB * scan for ")", else do syntax error/warm start -00001EE8 4A2B 0E19 4542 TST.b Dtypef(a3) * test data type flag -00001EEC 6A00 EA50 4543 BPL LAB_TMER * if numeric do Type missmatch Error -00001EF0 4544 -00001EF0 4545 * if you want a non existant variable to return a null value then set the novar -00001EF0 4546 * value at the top of this file to some non zero value -00001EF0 4547 -00001EF0 FALSE 4548 ifne novar -00001EF0 4549 endc -00001EF0 4550 -00001EF0 2010 4551 MOVE.l (a0),d0 * get string address -00001EF2 6000 FBB4 4552 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & return -00001EF6 4553 -00001EF6 4554 -00001EF6 4555 ************************************************************************************* -00001EF6 4556 * -00001EF6 4557 * perform LEN() -00001EF6 4558 -00001EF6 4559 LAB_LENS -00001EF6 487A FBB0 4560 PEA LAB_AYFC(pc) * set return address to convert d0 to signed -00001EFA 4561 * longword in FAC1 -00001EFA 6000 FEB6 4562 BRA LAB_22B6 * pop string off descriptor stack or from memory -00001EFE 4563 * returns with d0 = length, a0 = pointer -00001EFE 4564 -00001EFE 4565 -00001EFE 4566 ************************************************************************************* -00001EFE 4567 * -00001EFE 4568 * perform ASC() -00001EFE 4569 -00001EFE 4570 LAB_ASC -00001EFE 6100 FEB2 4571 BSR LAB_22B6 * pop string off descriptor stack or from memory -00001F02 4572 * returns with d0 = length, a0 = pointer -00001F02 4A40 4573 TST.w d0 * test length -00001F04 6700 EA58 4574 BEQ LAB_FCER * if null do function call error then warm start -00001F08 4575 -00001F08 1010 4576 MOVE.b (a0),d0 * get first character byte -00001F0A 6000 FBBC 4577 BRA LAB_1FD0 * convert d0 to unsigned byte in FAC1 & return -00001F0E 4578 -00001F0E 4579 -00001F0E 4580 ************************************************************************************* -00001F0E 4581 * -00001F0E 4582 * increment and get byte, result in d0 and Itemp -00001F0E 4583 -00001F0E 4584 LAB_SGBY -00001F0E 6100 F698 4585 BSR LAB_IGBY * increment & scan memory -00001F12 4586 -00001F12 4587 -00001F12 4588 ************************************************************************************* -00001F12 4589 * -00001F12 4590 * get byte parameter, result in d0 and Itemp -00001F12 4591 -00001F12 4592 LAB_GTBY -00001F12 6100 F51C 4593 BSR LAB_EVNM * evaluate expression & check is numeric, -00001F16 4594 * else do type mismatch -00001F16 4595 -00001F16 4596 -00001F16 4597 ************************************************************************************* -00001F16 4598 * -00001F16 4599 * evaluate byte expression, result in d0 and Itemp -00001F16 4600 -00001F16 4601 LAB_EVBY -00001F16 6100 F9D4 4602 BSR LAB_EVPI * evaluate positive integer expression -00001F1A 4603 * result in d0 and Itemp -00001F1A 7280 4604 MOVEQ #$80,d1 * set mask/2 -00001F1C D281 4605 ADD.l d1,d1 * =$FFFFFF00 -00001F1E C280 4606 AND.l d0,d1 * check top 24 bits -00001F20 6600 EA3C 4607 BNE LAB_FCER * if <> 0 do function call error/warm start -00001F24 4608 -00001F24 4E75 4609 RTS -00001F26 4610 -00001F26 4611 -00001F26 4612 ************************************************************************************* -00001F26 4613 * -00001F26 4614 * get word parameter, result in d0 and Itemp -00001F26 4615 -00001F26 4616 LAB_GTWO -00001F26 6100 F508 4617 BSR LAB_EVNM * evaluate expression & check is numeric, -00001F2A 4618 * else do type mismatch -00001F2A 6100 F9C0 4619 BSR LAB_EVPI * evaluate positive integer expression -00001F2E 4620 * result in d0 and Itemp -00001F2E 4840 4621 SWAP d0 * copy high word to low word -00001F30 4A40 4622 TST.w d0 * set flags -00001F32 6600 EA2A 4623 BNE LAB_FCER * if <> 0 do function call error/warm start -00001F36 4624 -00001F36 4840 4625 SWAP d0 * copy high word to low word -00001F38 4E75 4626 RTS -00001F3A 4627 -00001F3A 4628 -00001F3A 4629 ************************************************************************************* -00001F3A 4630 * -00001F3A 4631 * perform VAL() -00001F3A 4632 -00001F3A 4633 LAB_VAL -00001F3A 6100 FE76 4634 BSR LAB_22B6 * pop string off descriptor stack or from memory -00001F3E 4635 * returns with d0 = length, a0 = pointer -00001F3E 6722 4636 BEQ.s LAB_VALZ * string was null so set result = $00 -00001F40 4637 * clear FAC1 exponent & sign & return -00001F40 4638 -00001F40 2C4D 4639 MOVEA.l a5,a6 * save BASIC execute pointer -00001F42 2A48 4640 MOVEA.l a0,a5 * copy string pointer to execute pointer -00001F44 D1C0 4641 ADDA.l d0,a0 * string end+1 -00001F46 1010 4642 MOVE.b (a0),d0 * get byte from string+1 -00001F48 3F00 4643 MOVE.w d0,-(sp) * save it -00001F4A 2F08 4644 MOVE.l a0,-(sp) * save address -00001F4C 10BC 0000 4645 MOVE.b #0,(a0) * null terminate string -00001F50 6100 F658 4646 BSR LAB_GBYT * scan memory -00001F54 6100 1142 4647 BSR LAB_2887 * get FAC1 from string -00001F58 205F 4648 MOVEA.l (sp)+,a0 * restore pointer -00001F5A 301F 4649 MOVE.w (sp)+,d0 * pop byte -00001F5C 1080 4650 MOVE.b d0,(a0) * restore to memory -00001F5E 2A4E 4651 MOVEA.l a6,a5 * restore BASIC execute pointer -00001F60 4E75 4652 RTS -00001F62 4653 -00001F62 4654 LAB_VALZ -00001F62 3740 0DF8 4655 MOVE.w d0,FAC1_e(a3) * clear FAC1 exponent & sign -00001F66 4E75 4656 RTS -00001F68 4657 -00001F68 4658 -00001F68 4659 ************************************************************************************* -00001F68 4660 * -00001F68 4661 * get two parameters for POKE or WAIT, first parameter in a0, second in d0 -00001F68 4662 -00001F68 4663 LAB_GADB -00001F68 6100 F4C6 4664 BSR LAB_EVNM * evaluate expression & check is numeric, -00001F6C 4665 * else do type mismatch -00001F6C 6100 F986 4666 BSR LAB_EVIR * evaluate integer expression -00001F70 4667 * (does FC error not OF error if out of range) -00001F70 2F00 4668 MOVE.l d0,-(sp) * copy to stack -00001F72 6100 F62A 4669 BSR LAB_1C01 * scan for ",", else do syntax error/warm start -00001F76 619A 4670 BSR.s LAB_GTBY * get byte parameter, result in d0 and Itemp -00001F78 205F 4671 MOVEA.l (sp)+,a0 * pull address -00001F7A 4E75 4672 RTS -00001F7C 4673 -00001F7C 4674 -00001F7C 4675 ************************************************************************************* -00001F7C 4676 * -00001F7C 4677 * get two parameters for DOKE or WAITW, first parameter in a0, second in d0 -00001F7C 4678 -00001F7C 4679 LAB_GADW -00001F7C 611E 4680 BSR.s LAB_GEAD * get even address for word/long memory actions -00001F7E 4681 * address returned in d0 and on the stack -00001F7E 6100 F61E 4682 BSR LAB_1C01 * scan for ",", else do syntax error/warm start -00001F82 6100 F4AC 4683 BSR LAB_EVNM * evaluate expression & check is numeric, -00001F86 4684 * else do type mismatch -00001F86 6100 F96C 4685 BSR LAB_EVIR * evaluate integer expression -00001F8A 4686 * result in d0 and Itemp -00001F8A 4840 4687 SWAP d0 * swap words -00001F8C 4A40 4688 TST.w d0 * test high word -00001F8E 6706 4689 BEQ.s LAB_XGADW * exit if null -00001F90 4690 -00001F90 5240 4691 ADDQ.w #1,d0 * increment word -00001F92 6600 E9CA 4692 BNE LAB_FCER * if <> 0 do function call error/warm start -00001F96 4693 -00001F96 4694 LAB_XGADW -00001F96 4840 4695 SWAP d0 * swap words back -00001F98 205F 4696 MOVEA.l (sp)+,a0 * pull address -00001F9A 4E75 4697 RTS -00001F9C 4698 -00001F9C 4699 -00001F9C 4700 ************************************************************************************* -00001F9C 4701 * -00001F9C 4702 * get even address (for word or longword memory actions) -00001F9C 4703 * address returned in d0 and on the stack -00001F9C 4704 * does address error if the address is odd -00001F9C 4705 -00001F9C 4706 LAB_GEAD -00001F9C 6100 F492 4707 BSR LAB_EVNM * evaluate expression & check is numeric, -00001FA0 4708 * else do type mismatch -00001FA0 6100 F952 4709 BSR LAB_EVIR * evaluate integer expression -00001FA4 4710 * (does FC error not OF error if out of range) -00001FA4 0800 0000 4711 BTST #0,d0 * test low bit of longword -00001FA8 6600 E970 4712 BNE LAB_ADER * if address is odd do address error/warm start -00001FAC 4713 -00001FAC 2057 4714 MOVEA.l (sp),a0 * copy return address -00001FAE 2E80 4715 MOVE.l d0,(sp) * even address on stack -00001FB0 4ED0 4716 JMP (a0) * effectively RTS -00001FB2 4717 -00001FB2 4718 -00001FB2 4719 ************************************************************************************* -00001FB2 4720 * -00001FB2 4721 * perform PEEK() -00001FB2 4722 -00001FB2 4723 LAB_PEEK -00001FB2 6100 F940 4724 BSR LAB_EVIR * evaluate integer expression -00001FB6 4725 * (does FC error not OF error if out of range) -00001FB6 2040 4726 MOVEA.l d0,a0 * copy to address register -00001FB8 1010 4727 MOVE.b (a0),d0 * get byte -00001FBA 6000 FB0C 4728 BRA LAB_1FD0 * convert d0 to unsigned byte in FAC1 & return -00001FBE 4729 -00001FBE 4730 -00001FBE 4731 ************************************************************************************* -00001FBE 4732 * -00001FBE 4733 * perform POKE -00001FBE 4734 -00001FBE 4735 LAB_POKE -00001FBE 61A8 4736 BSR.s LAB_GADB * get two parameters for POKE or WAIT -00001FC0 4737 * first parameter in a0, second in d0 -00001FC0 1080 4738 MOVE.b d0,(a0) * put byte in memory -00001FC2 4E75 4739 RTS -00001FC4 4740 -00001FC4 4741 -00001FC4 4742 ************************************************************************************* -00001FC4 4743 * -00001FC4 4744 * perform DEEK() -00001FC4 4745 -00001FC4 4746 LAB_DEEK -00001FC4 6100 F92E 4747 BSR LAB_EVIR * evaluate integer expression -00001FC8 4748 * (does FC error not OF error if out of range) -00001FC8 E208 4749 LSR.b #1,d0 * shift bit 0 to carry -00001FCA 6500 E94E 4750 BCS LAB_ADER * if address is odd do address error/warm start -00001FCE 4751 -00001FCE D000 4752 ADD.b d0,d0 * shift byte back -00001FD0 C188 4753 EXG d0,a0 * copy to address register -00001FD2 7000 4754 MOVEQ #0,d0 * clear top bits -00001FD4 3010 4755 MOVE.w (a0),d0 * get word -00001FD6 6000 FAD0 4756 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & return -00001FDA 4757 -00001FDA 4758 -00001FDA 4759 ************************************************************************************* -00001FDA 4760 * -00001FDA 4761 * perform LEEK() -00001FDA 4762 -00001FDA 4763 LAB_LEEK -00001FDA 6100 F918 4764 BSR LAB_EVIR * evaluate integer expression -00001FDE 4765 * (does FC error not OF error if out of range) -00001FDE E208 4766 LSR.b #1,d0 * shift bit 0 to carry -00001FE0 6500 E938 4767 BCS LAB_ADER * if address is odd do address error/warm start -00001FE4 4768 -00001FE4 D000 4769 ADD.b d0,d0 * shift byte back -00001FE6 C188 4770 EXG d0,a0 * copy to address register -00001FE8 2010 4771 MOVE.l (a0),d0 * get longword -00001FEA 6000 FABC 4772 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & return -00001FEE 4773 -00001FEE 4774 -00001FEE 4775 ************************************************************************************* -00001FEE 4776 * -00001FEE 4777 * perform DOKE -00001FEE 4778 -00001FEE 4779 LAB_DOKE -00001FEE 618C 4780 BSR.s LAB_GADW * get two parameters for DOKE or WAIT -00001FF0 4781 * first parameter in a0, second in d0 -00001FF0 3080 4782 MOVE.w d0,(a0) * put word in memory -00001FF2 4E75 4783 RTS -00001FF4 4784 -00001FF4 4785 -00001FF4 4786 ************************************************************************************* -00001FF4 4787 * -00001FF4 4788 * perform LOKE -00001FF4 4789 -00001FF4 4790 LAB_LOKE -00001FF4 61A6 4791 BSR.s LAB_GEAD * get even address for word/long memory actions -00001FF6 4792 * address returned in d0 and on the stack -00001FF6 6100 F5A6 4793 BSR LAB_1C01 * scan for ",", else do syntax error/warm start -00001FFA 6100 F434 4794 BSR LAB_EVNM * evaluate expression & check is numeric, -00001FFE 4795 * else do type mismatch -00001FFE 6100 F8F4 4796 BSR LAB_EVIR * evaluate integer value (no sign check) -00002002 205F 4797 MOVEA.l (sp)+,a0 * pull address -00002004 2080 4798 MOVE.l d0,(a0) * put longword in memory -00002006 4799 RTS_015 -00002006 4E75 4800 RTS -00002008 4801 -00002008 4802 -00002008 4803 ************************************************************************************* -00002008 4804 * -00002008 4805 * perform SWAP -00002008 4806 -00002008 4807 LAB_SWAP -00002008 6100 F7AE 4808 BSR LAB_GVAR * get variable 1 address in a0 -0000200C 2F08 4809 MOVE.l a0,-(sp) * save variable 1 address -0000200E 182B 0E19 4810 MOVE.b Dtypef(a3),d4 * copy variable 1 data type, $80=string, -00002012 4811 * $40=inetger, $00=float -00002012 4812 -00002012 6100 F58A 4813 BSR LAB_1C01 * scan for ",", else do syntax error/warm start -00002016 6100 F7A0 4814 BSR LAB_GVAR * get variable 2 address in a0 -0000201A 245F 4815 MOVEA.l (sp)+,a2 * restore variable 1 address -0000201C B82B 0E19 4816 CMP.b Dtypef(a3),d4 * compare variable 1 data type with variable 2 -00002020 4817 * data type -00002020 6600 E91C 4818 BNE LAB_TMER * if not both the same type do "Type mismatch" -00002024 4819 * error then warm start -00002024 4820 -00002024 4821 * if you do want a non existant variable to return an error then leave the novar -00002024 4822 * value at the top of this file set to zero +00001EB4 2248 4507 MOVEA.l a0,a1 * copy the string address +00001EB6 6100 FD66 4508 BSR LAB_2115 * make a string space d1 bytes long +00001EBA D1C1 4509 ADDA.l d1,a0 * new string end +00001EBC D3C1 4510 ADDA.l d1,a1 * old string end +00001EBE 3401 4511 MOVE.w d1,d2 * copy length for loop +00001EC0 5342 4512 SUBQ.w #1,d2 * -1 for DBF loop +00001EC2 4513 UC_loop +00001EC2 1021 4514 MOVE.b -(a1),d0 * get a byte from the string +00001EC4 4515 +00001EC4 B03C 0061 4516 CMP.b #$61,d0 * compare with "a" +00001EC8 650A 4517 BCS.s NoLcase * if < "a" skip change +00001ECA 4518 +00001ECA B03C 007B 4519 CMP.b #$7B,d0 * compare with "z"+1 +00001ECE 6404 4520 BCC.s NoLcase * if > "z" skip change +00001ED0 4521 +00001ED0 0200 00DF 4522 ANDI.b #$DF,d0 * convert lower case to upper case +00001ED4 4523 NoLcase +00001ED4 1100 4524 MOVE.b d0,-(a0) * copy upper case byte back to string +00001ED6 51CA FFEA 4525 DBF d2,UC_loop * decrement and loop if not all done +00001EDA 4526 +00001EDA 4527 NoString +00001EDA 6000 FD28 4528 BRA LAB_RTST * push string on descriptor stack +00001EDE 4529 * a0 = pointer, d1 = length +00001EDE 4530 +00001EDE 4531 +00001EDE 4532 ************************************************************************************* +00001EDE 4533 * +00001EDE 4534 * perform SADD() +00001EDE 4535 +00001EDE 4536 LAB_SADD +00001EDE 101D 4537 MOVE.b (a5)+,d0 * increment pointer +00001EE0 6100 F8D6 4538 BSR LAB_GVAR * get variable address in a0 +00001EE4 6100 F6B0 4539 BSR LAB_1BFB * scan for ")", else do syntax error/warm start +00001EE8 4A2B 05B5 4540 TST.b Dtypef(a3) * test data type flag +00001EEC 6A00 EA50 4541 BPL LAB_TMER * if numeric do Type missmatch Error +00001EF0 4542 +00001EF0 4543 * if you want a non existant variable to return a null value then set the novar +00001EF0 4544 * value at the top of this file to some non zero value +00001EF0 4545 +00001EF0 FALSE 4546 ifne novar +00001EF0 4547 endc +00001EF0 4548 +00001EF0 2010 4549 MOVE.l (a0),d0 * get string address +00001EF2 6000 FBB4 4550 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & return +00001EF6 4551 +00001EF6 4552 +00001EF6 4553 ************************************************************************************* +00001EF6 4554 * +00001EF6 4555 * perform LEN() +00001EF6 4556 +00001EF6 4557 LAB_LENS +00001EF6 487A FBB0 4558 PEA LAB_AYFC(pc) * set return address to convert d0 to signed +00001EFA 4559 * longword in FAC1 +00001EFA 6000 FEB6 4560 BRA LAB_22B6 * pop string off descriptor stack or from memory +00001EFE 4561 * returns with d0 = length, a0 = pointer +00001EFE 4562 +00001EFE 4563 +00001EFE 4564 ************************************************************************************* +00001EFE 4565 * +00001EFE 4566 * perform ASC() +00001EFE 4567 +00001EFE 4568 LAB_ASC +00001EFE 6100 FEB2 4569 BSR LAB_22B6 * pop string off descriptor stack or from memory +00001F02 4570 * returns with d0 = length, a0 = pointer +00001F02 4A40 4571 TST.w d0 * test length +00001F04 6700 EA58 4572 BEQ LAB_FCER * if null do function call error then warm start +00001F08 4573 +00001F08 1010 4574 MOVE.b (a0),d0 * get first character byte +00001F0A 6000 FBBC 4575 BRA LAB_1FD0 * convert d0 to unsigned byte in FAC1 & return +00001F0E 4576 +00001F0E 4577 +00001F0E 4578 ************************************************************************************* +00001F0E 4579 * +00001F0E 4580 * increment and get byte, result in d0 and Itemp +00001F0E 4581 +00001F0E 4582 LAB_SGBY +00001F0E 6100 F698 4583 BSR LAB_IGBY * increment & scan memory +00001F12 4584 +00001F12 4585 +00001F12 4586 ************************************************************************************* +00001F12 4587 * +00001F12 4588 * get byte parameter, result in d0 and Itemp +00001F12 4589 +00001F12 4590 LAB_GTBY +00001F12 6100 F51C 4591 BSR LAB_EVNM * evaluate expression & check is numeric, +00001F16 4592 * else do type mismatch +00001F16 4593 +00001F16 4594 +00001F16 4595 ************************************************************************************* +00001F16 4596 * +00001F16 4597 * evaluate byte expression, result in d0 and Itemp +00001F16 4598 +00001F16 4599 LAB_EVBY +00001F16 6100 F9D4 4600 BSR LAB_EVPI * evaluate positive integer expression +00001F1A 4601 * result in d0 and Itemp +00001F1A 7280 4602 MOVEQ #$80,d1 * set mask/2 +00001F1C D281 4603 ADD.l d1,d1 * =$FFFFFF00 +00001F1E C280 4604 AND.l d0,d1 * check top 24 bits +00001F20 6600 EA3C 4605 BNE LAB_FCER * if <> 0 do function call error/warm start +00001F24 4606 +00001F24 4E75 4607 RTS +00001F26 4608 +00001F26 4609 +00001F26 4610 ************************************************************************************* +00001F26 4611 * +00001F26 4612 * get word parameter, result in d0 and Itemp +00001F26 4613 +00001F26 4614 LAB_GTWO +00001F26 6100 F508 4615 BSR LAB_EVNM * evaluate expression & check is numeric, +00001F2A 4616 * else do type mismatch +00001F2A 6100 F9C0 4617 BSR LAB_EVPI * evaluate positive integer expression +00001F2E 4618 * result in d0 and Itemp +00001F2E 4840 4619 SWAP d0 * copy high word to low word +00001F30 4A40 4620 TST.w d0 * set flags +00001F32 6600 EA2A 4621 BNE LAB_FCER * if <> 0 do function call error/warm start +00001F36 4622 +00001F36 4840 4623 SWAP d0 * copy high word to low word +00001F38 4E75 4624 RTS +00001F3A 4625 +00001F3A 4626 +00001F3A 4627 ************************************************************************************* +00001F3A 4628 * +00001F3A 4629 * perform VAL() +00001F3A 4630 +00001F3A 4631 LAB_VAL +00001F3A 6100 FE76 4632 BSR LAB_22B6 * pop string off descriptor stack or from memory +00001F3E 4633 * returns with d0 = length, a0 = pointer +00001F3E 6722 4634 BEQ.s LAB_VALZ * string was null so set result = $00 +00001F40 4635 * clear FAC1 exponent & sign & return +00001F40 4636 +00001F40 2C4D 4637 MOVEA.l a5,a6 * save BASIC execute pointer +00001F42 2A48 4638 MOVEA.l a0,a5 * copy string pointer to execute pointer +00001F44 D1C0 4639 ADDA.l d0,a0 * string end+1 +00001F46 1010 4640 MOVE.b (a0),d0 * get byte from string+1 +00001F48 3F00 4641 MOVE.w d0,-(sp) * save it +00001F4A 2F08 4642 MOVE.l a0,-(sp) * save address +00001F4C 10BC 0000 4643 MOVE.b #0,(a0) * null terminate string +00001F50 6100 F658 4644 BSR LAB_GBYT * scan memory +00001F54 6100 1142 4645 BSR LAB_2887 * get FAC1 from string +00001F58 205F 4646 MOVEA.l (sp)+,a0 * restore pointer +00001F5A 301F 4647 MOVE.w (sp)+,d0 * pop byte +00001F5C 1080 4648 MOVE.b d0,(a0) * restore to memory +00001F5E 2A4E 4649 MOVEA.l a6,a5 * restore BASIC execute pointer +00001F60 4E75 4650 RTS +00001F62 4651 +00001F62 4652 LAB_VALZ +00001F62 3740 0594 4653 MOVE.w d0,FAC1_e(a3) * clear FAC1 exponent & sign +00001F66 4E75 4654 RTS +00001F68 4655 +00001F68 4656 +00001F68 4657 ************************************************************************************* +00001F68 4658 * +00001F68 4659 * get two parameters for POKE or WAIT, first parameter in a0, second in d0 +00001F68 4660 +00001F68 4661 LAB_GADB +00001F68 6100 F4C6 4662 BSR LAB_EVNM * evaluate expression & check is numeric, +00001F6C 4663 * else do type mismatch +00001F6C 6100 F986 4664 BSR LAB_EVIR * evaluate integer expression +00001F70 4665 * (does FC error not OF error if out of range) +00001F70 2F00 4666 MOVE.l d0,-(sp) * copy to stack +00001F72 6100 F62A 4667 BSR LAB_1C01 * scan for ",", else do syntax error/warm start +00001F76 619A 4668 BSR.s LAB_GTBY * get byte parameter, result in d0 and Itemp +00001F78 205F 4669 MOVEA.l (sp)+,a0 * pull address +00001F7A 4E75 4670 RTS +00001F7C 4671 +00001F7C 4672 +00001F7C 4673 ************************************************************************************* +00001F7C 4674 * +00001F7C 4675 * get two parameters for DOKE or WAITW, first parameter in a0, second in d0 +00001F7C 4676 +00001F7C 4677 LAB_GADW +00001F7C 611E 4678 BSR.s LAB_GEAD * get even address for word/long memory actions +00001F7E 4679 * address returned in d0 and on the stack +00001F7E 6100 F61E 4680 BSR LAB_1C01 * scan for ",", else do syntax error/warm start +00001F82 6100 F4AC 4681 BSR LAB_EVNM * evaluate expression & check is numeric, +00001F86 4682 * else do type mismatch +00001F86 6100 F96C 4683 BSR LAB_EVIR * evaluate integer expression +00001F8A 4684 * result in d0 and Itemp +00001F8A 4840 4685 SWAP d0 * swap words +00001F8C 4A40 4686 TST.w d0 * test high word +00001F8E 6706 4687 BEQ.s LAB_XGADW * exit if null +00001F90 4688 +00001F90 5240 4689 ADDQ.w #1,d0 * increment word +00001F92 6600 E9CA 4690 BNE LAB_FCER * if <> 0 do function call error/warm start +00001F96 4691 +00001F96 4692 LAB_XGADW +00001F96 4840 4693 SWAP d0 * swap words back +00001F98 205F 4694 MOVEA.l (sp)+,a0 * pull address +00001F9A 4E75 4695 RTS +00001F9C 4696 +00001F9C 4697 +00001F9C 4698 ************************************************************************************* +00001F9C 4699 * +00001F9C 4700 * get even address (for word or longword memory actions) +00001F9C 4701 * address returned in d0 and on the stack +00001F9C 4702 * does address error if the address is odd +00001F9C 4703 +00001F9C 4704 LAB_GEAD +00001F9C 6100 F492 4705 BSR LAB_EVNM * evaluate expression & check is numeric, +00001FA0 4706 * else do type mismatch +00001FA0 6100 F952 4707 BSR LAB_EVIR * evaluate integer expression +00001FA4 4708 * (does FC error not OF error if out of range) +00001FA4 0800 0000 4709 BTST #0,d0 * test low bit of longword +00001FA8 6600 E970 4710 BNE LAB_ADER * if address is odd do address error/warm start +00001FAC 4711 +00001FAC 2057 4712 MOVEA.l (sp),a0 * copy return address +00001FAE 2E80 4713 MOVE.l d0,(sp) * even address on stack +00001FB0 4ED0 4714 JMP (a0) * effectively RTS +00001FB2 4715 +00001FB2 4716 +00001FB2 4717 ************************************************************************************* +00001FB2 4718 * +00001FB2 4719 * perform PEEK() +00001FB2 4720 +00001FB2 4721 LAB_PEEK +00001FB2 6100 F940 4722 BSR LAB_EVIR * evaluate integer expression +00001FB6 4723 * (does FC error not OF error if out of range) +00001FB6 2040 4724 MOVEA.l d0,a0 * copy to address register +00001FB8 1010 4725 MOVE.b (a0),d0 * get byte +00001FBA 6000 FB0C 4726 BRA LAB_1FD0 * convert d0 to unsigned byte in FAC1 & return +00001FBE 4727 +00001FBE 4728 +00001FBE 4729 ************************************************************************************* +00001FBE 4730 * +00001FBE 4731 * perform POKE +00001FBE 4732 +00001FBE 4733 LAB_POKE +00001FBE 61A8 4734 BSR.s LAB_GADB * get two parameters for POKE or WAIT +00001FC0 4735 * first parameter in a0, second in d0 +00001FC0 1080 4736 MOVE.b d0,(a0) * put byte in memory +00001FC2 4E75 4737 RTS +00001FC4 4738 +00001FC4 4739 +00001FC4 4740 ************************************************************************************* +00001FC4 4741 * +00001FC4 4742 * perform DEEK() +00001FC4 4743 +00001FC4 4744 LAB_DEEK +00001FC4 6100 F92E 4745 BSR LAB_EVIR * evaluate integer expression +00001FC8 4746 * (does FC error not OF error if out of range) +00001FC8 E208 4747 LSR.b #1,d0 * shift bit 0 to carry +00001FCA 6500 E94E 4748 BCS LAB_ADER * if address is odd do address error/warm start +00001FCE 4749 +00001FCE D000 4750 ADD.b d0,d0 * shift byte back +00001FD0 C188 4751 EXG d0,a0 * copy to address register +00001FD2 7000 4752 MOVEQ #0,d0 * clear top bits +00001FD4 3010 4753 MOVE.w (a0),d0 * get word +00001FD6 6000 FAD0 4754 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & return +00001FDA 4755 +00001FDA 4756 +00001FDA 4757 ************************************************************************************* +00001FDA 4758 * +00001FDA 4759 * perform LEEK() +00001FDA 4760 +00001FDA 4761 LAB_LEEK +00001FDA 6100 F918 4762 BSR LAB_EVIR * evaluate integer expression +00001FDE 4763 * (does FC error not OF error if out of range) +00001FDE E208 4764 LSR.b #1,d0 * shift bit 0 to carry +00001FE0 6500 E938 4765 BCS LAB_ADER * if address is odd do address error/warm start +00001FE4 4766 +00001FE4 D000 4767 ADD.b d0,d0 * shift byte back +00001FE6 C188 4768 EXG d0,a0 * copy to address register +00001FE8 2010 4769 MOVE.l (a0),d0 * get longword +00001FEA 6000 FABC 4770 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & return +00001FEE 4771 +00001FEE 4772 +00001FEE 4773 ************************************************************************************* +00001FEE 4774 * +00001FEE 4775 * perform DOKE +00001FEE 4776 +00001FEE 4777 LAB_DOKE +00001FEE 618C 4778 BSR.s LAB_GADW * get two parameters for DOKE or WAIT +00001FF0 4779 * first parameter in a0, second in d0 +00001FF0 3080 4780 MOVE.w d0,(a0) * put word in memory +00001FF2 4E75 4781 RTS +00001FF4 4782 +00001FF4 4783 +00001FF4 4784 ************************************************************************************* +00001FF4 4785 * +00001FF4 4786 * perform LOKE +00001FF4 4787 +00001FF4 4788 LAB_LOKE +00001FF4 61A6 4789 BSR.s LAB_GEAD * get even address for word/long memory actions +00001FF6 4790 * address returned in d0 and on the stack +00001FF6 6100 F5A6 4791 BSR LAB_1C01 * scan for ",", else do syntax error/warm start +00001FFA 6100 F434 4792 BSR LAB_EVNM * evaluate expression & check is numeric, +00001FFE 4793 * else do type mismatch +00001FFE 6100 F8F4 4794 BSR LAB_EVIR * evaluate integer value (no sign check) +00002002 205F 4795 MOVEA.l (sp)+,a0 * pull address +00002004 2080 4796 MOVE.l d0,(a0) * put longword in memory +00002006 4797 RTS_015 +00002006 4E75 4798 RTS +00002008 4799 +00002008 4800 +00002008 4801 ************************************************************************************* +00002008 4802 * +00002008 4803 * perform SWAP +00002008 4804 +00002008 4805 LAB_SWAP +00002008 6100 F7AE 4806 BSR LAB_GVAR * get variable 1 address in a0 +0000200C 2F08 4807 MOVE.l a0,-(sp) * save variable 1 address +0000200E 182B 05B5 4808 MOVE.b Dtypef(a3),d4 * copy variable 1 data type, $80=string, +00002012 4809 * $40=inetger, $00=float +00002012 4810 +00002012 6100 F58A 4811 BSR LAB_1C01 * scan for ",", else do syntax error/warm start +00002016 6100 F7A0 4812 BSR LAB_GVAR * get variable 2 address in a0 +0000201A 245F 4813 MOVEA.l (sp)+,a2 * restore variable 1 address +0000201C B82B 05B5 4814 CMP.b Dtypef(a3),d4 * compare variable 1 data type with variable 2 +00002020 4815 * data type +00002020 6600 E91C 4816 BNE LAB_TMER * if not both the same type do "Type mismatch" +00002024 4817 * error then warm start +00002024 4818 +00002024 4819 * if you do want a non existant variable to return an error then leave the novar +00002024 4820 * value at the top of this file set to zero +00002024 4821 +00002024 TRUE 4822 ifeq novar 00002024 4823 -00002024 TRUE 4824 ifeq novar -00002024 4825 -00002024 2010 4826 MOVE.l (a0),d0 * get variable 2 -00002026 20D2 4827 MOVE.l (a2),(a0)+ * copy variable 1 to variable 2 -00002028 24C0 4828 MOVE.l d0,(a2)+ * save variable 2 to variable 1 -0000202A 4829 -0000202A 4A04 4830 TST.b d4 * check data type -0000202C 6AD8 4831 BPL.s RTS_015 * exit if not string -0000202E 4832 -0000202E 3010 4833 MOVE.w (a0),d0 * get string 2 length -00002030 3092 4834 MOVE.w (a2),(a0) * copy string 1 length to string 2 length -00002032 3480 4835 MOVE.w d0,(a2) * save string 2 length to string 1 length +00002024 2010 4824 MOVE.l (a0),d0 * get variable 2 +00002026 20D2 4825 MOVE.l (a2),(a0)+ * copy variable 1 to variable 2 +00002028 24C0 4826 MOVE.l d0,(a2)+ * save variable 2 to variable 1 +0000202A 4827 +0000202A 4A04 4828 TST.b d4 * check data type +0000202C 6AD8 4829 BPL.s RTS_015 * exit if not string +0000202E 4830 +0000202E 3010 4831 MOVE.w (a0),d0 * get string 2 length +00002030 3092 4832 MOVE.w (a2),(a0) * copy string 1 length to string 2 length +00002032 3480 4833 MOVE.w d0,(a2) * save string 2 length to string 1 length +00002034 4834 +00002034 4835 endc 00002034 4836 -00002034 4837 endc -00002034 4838 -00002034 4839 -00002034 4840 * if you want a non existant variable to return a null value then set the novar -00002034 4841 * value at the top of this file to some non zero value -00002034 4842 -00002034 FALSE 4843 ifne novar -00002034 4844 * value get -00002034 4845 * value get and the new value save -00002034 4846 * new length save -00002034 4847 * new value save -00002034 4848 endc -00002034 4849 -00002034 4E75 4850 RTS -00002036 4851 -00002036 4852 -00002036 4853 ************************************************************************************* -00002036 4854 * -00002036 4855 * perform USR -00002036 4856 -00002036 4857 LAB_USR -00002036 4EAB 0C6A 4858 JSR Usrjmp(a3) * do user vector -0000203A 6000 F55A 4859 BRA LAB_1BFB * scan for ")", else do syntax error/warm start -0000203E 4860 -0000203E 4861 -0000203E 4862 ************************************************************************************* -0000203E 4863 * -0000203E 4864 * perform LOAD -0000203E 4865 -0000203E 4866 LAB_LOAD -0000203E 4EEB 0C7C 4867 JMP V_LOAD(a3) * do load vector -00002042 4868 -00002042 4869 -00002042 4870 ************************************************************************************* -00002042 4871 * -00002042 4872 * perform SAVE -00002042 4873 -00002042 4874 LAB_SAVE -00002042 4EEB 0C82 4875 JMP V_SAVE(a3) * do save vector -00002046 4876 -00002046 4877 -00002046 4878 ************************************************************************************* -00002046 4879 * -00002046 4880 * perform CALL -00002046 4881 -00002046 4882 LAB_CALL -00002046 487A F562 4883 PEA LAB_GBYT(pc) * put return address on stack -0000204A 6100 FF50 4884 BSR LAB_GEAD * get even address for word/long memory actions -0000204E 4885 * address returned in d0 and on the stack -0000204E 4E75 4886 RTS * effectively calls the routine -00002050 4887 -00002050 4888 * if the called routine exits correctly then it will return via the get byte routine. -00002050 4889 * this will then get the next byte for the interpreter and return -00002050 4890 -00002050 4891 -00002050 4892 ************************************************************************************* -00002050 4893 * -00002050 4894 * perform WAIT -00002050 4895 -00002050 4896 LAB_WAIT -00002050 6100 FF16 4897 BSR LAB_GADB * get two parameters for POKE or WAIT -00002054 4898 * first parameter in a0, second in d0 -00002054 2F08 4899 MOVE.l a0,-(sp) * save address -00002056 3F00 4900 MOVE.w d0,-(sp) * save byte -00002058 7400 4901 MOVEQ #0,d2 * clear mask -0000205A 6100 F54E 4902 BSR LAB_GBYT * scan memory -0000205E 6706 4903 BEQ.s LAB_2441 * skip if no third argument -00002060 4904 -00002060 6100 F538 4905 BSR LAB_SCGB * scan for "," & get byte, -00002064 4906 * else do syntax error/warm start -00002064 2400 4907 MOVE.l d0,d2 * copy mask -00002066 4908 LAB_2441 -00002066 321F 4909 MOVE.w (sp)+,d1 * get byte -00002068 205F 4910 MOVEA.l (sp)+,a0 * get address -0000206A 4911 LAB_2445 -0000206A 1010 4912 MOVE.b (a0),d0 * read memory byte -0000206C B500 4913 EOR.b d2,d0 * EOR with second argument (mask) -0000206E C001 4914 AND.b d1,d0 * AND with first argument (byte) -00002070 67F8 4915 BEQ.s LAB_2445 * loop if result is zero -00002072 4916 -00002072 4E75 4917 RTS -00002074 4918 -00002074 4919 -00002074 4920 ************************************************************************************* -00002074 4921 * -00002074 4922 * perform subtraction, FAC1 from FAC2 -00002074 4923 -00002074 4924 LAB_SUBTRACT -00002074 0A2B 0080 0DF9 4925 EORI.b #$80,FAC1_s(a3) * complement FAC1 sign -0000207A 176B 0E01 0E02 4926 MOVE.b FAC2_s(a3),FAC_sc(a3) * copy FAC2 sign byte -00002080 4927 -00002080 102B 0DF9 4928 MOVE.b FAC1_s(a3),d0 * get FAC1 sign byte -00002084 B12B 0E02 4929 EOR.b d0,FAC_sc(a3) * EOR with FAC2 sign -00002088 4930 -00002088 4931 -00002088 4932 ************************************************************************************* -00002088 4933 * -00002088 4934 * add FAC2 to FAC1 -00002088 4935 -00002088 4936 LAB_ADD -00002088 102B 0DF8 4937 MOVE.b FAC1_e(a3),d0 * get exponent -0000208C 6700 0338 4938 BEQ LAB_279B * FAC1 was zero so copy FAC2 to FAC1 & return -00002090 4939 -00002090 4940 * FAC1 is non zero -00002090 41EB 0DFC 4941 LEA FAC2_m(a3),a0 * set pointer1 to FAC2 mantissa -00002094 102B 0E00 4942 MOVE.b FAC2_e(a3),d0 * get FAC2 exponent -00002098 6746 4943 BEQ.s RTS_016 * exit if zero -0000209A 4944 -0000209A 902B 0DF8 4945 SUB.b FAC1_e(a3),d0 * subtract FAC1 exponent -0000209E 6722 4946 BEQ.s LAB_24A8 * branch if = (go add mantissa) -000020A0 4947 -000020A0 650A 4948 BCS.s LAB_249C * branch if FAC2 < FAC1 -000020A2 4949 -000020A2 4950 * FAC2 > FAC1 -000020A2 376B 0E00 0DF8 4951 MOVE.w FAC2_e(a3),FAC1_e(a3) * copy sign and exponent of FAC2 -000020A8 4400 4952 NEG.b d0 * negate exponent difference (make diff -ve) -000020AA 5148 4953 SUBQ.w #8,a0 * pointer1 to FAC1 -000020AC 4954 -000020AC 4955 LAB_249C -000020AC 4400 4956 NEG.b d0 * negate exponent difference (make diff +ve) -000020AE 2F01 4957 MOVE.l d1,-(sp) * save d1 -000020B0 B03C 0020 4958 CMP.b #32,d0 * compare exponent diff with 32 -000020B4 6D04 4959 BLT.s LAB_2467 * branch if range >= 32 -000020B6 4960 -000020B6 7200 4961 MOVEQ #0,d1 * clear d1 -000020B8 6004 4962 BRA.s LAB_2468 * go clear smaller mantissa -000020BA 4963 -000020BA 4964 LAB_2467 -000020BA 2210 4965 MOVE.l (a0),d1 * get FACx mantissa -000020BC E0A9 4966 LSR.l d0,d1 * shift d0 times right -000020BE 4967 LAB_2468 -000020BE 2081 4968 MOVE.l d1,(a0) * save it back -000020C0 221F 4969 MOVE.l (sp)+,d1 * restore d1 -000020C2 4970 -000020C2 4971 * exponents are equal now do mantissa add or -000020C2 4972 * subtract -000020C2 4973 LAB_24A8 -000020C2 4A2B 0E02 4974 TST.b FAC_sc(a3) * test sign compare (FAC1 EOR FAC2) -000020C6 6B1A 4975 BMI.s LAB_24F8 * if <> go do subtract -000020C8 4976 -000020C8 202B 0DFC 4977 MOVE.l FAC2_m(a3),d0 * get FAC2 mantissa -000020CC D0AB 0DF4 4978 ADD.l FAC1_m(a3),d0 * add FAC1 mantissa -000020D0 640A 4979 BCC.s LAB_24F7 * save and exit if no carry (FAC1 is normal) -000020D2 4980 -000020D2 E290 4981 ROXR.l #1,d0 * else shift carry back into mantissa -000020D4 522B 0DF8 4982 ADDQ.b #1,FAC1_e(a3) * increment FAC1 exponent -000020D8 6500 E880 4983 BCS LAB_OFER * if carry do overflow error & warm start -000020DC 4984 -000020DC 4985 LAB_24F7 -000020DC 2740 0DF4 4986 MOVE.l d0,FAC1_m(a3) * save mantissa -000020E0 4987 RTS_016 -000020E0 4E75 4988 RTS -000020E2 4989 * signs are different -000020E2 4990 LAB_24F8 -000020E2 43EB 0DF4 4991 LEA FAC1_m(a3),a1 * pointer 2 to FAC1 -000020E6 B3C8 4992 CMPA.l a0,a1 * compare pointers -000020E8 6602 4993 BNE.s LAB_24B4 * branch if <> -000020EA 4994 -000020EA 5049 4995 ADDQ.w #8,a1 * else pointer2 to FAC2 -000020EC 4996 -000020EC 4997 * take smaller from bigger (take sign of bigger) -000020EC 4998 LAB_24B4 -000020EC 2011 4999 MOVE.l (a1),d0 * get larger mantissa -000020EE 2210 5000 MOVE.l (a0),d1 * get smaller mantissa -000020F0 2740 0DF4 5001 MOVE.l d0,FAC1_m(a3) * save larger mantissa -000020F4 93AB 0DF4 5002 SUB.l d1,FAC1_m(a3) * subtract smaller -000020F8 5003 -000020F8 5004 -000020F8 5005 ************************************************************************************* -000020F8 5006 * -000020F8 5007 * do +/- (carry is sign) & normalise FAC1 -000020F8 5008 -000020F8 5009 LAB_24D0 -000020F8 640A 5010 BCC.s LAB_24D5 * branch if result is +ve -000020FA 5011 -000020FA 5012 * erk! subtract is the wrong way round so -000020FA 5013 * negate everything -000020FA 0A2B 00FF 0DF9 5014 EORI.b #$FF,FAC1_s(a3) * complement FAC1 sign -00002100 44AB 0DF4 5015 NEG.l FAC1_m(a3) * negate FAC1 mantissa -00002104 5016 -00002104 5017 -00002104 5018 ************************************************************************************* -00002104 5019 * -00002104 5020 * normalise FAC1 -00002104 5021 -00002104 5022 LAB_24D5 -00002104 202B 0DF4 5023 MOVE.l FAC1_m(a3),d0 * get mantissa -00002108 6B2E 5024 BMI.s LAB_24DA * mantissa is normal so just exit -0000210A 5025 -0000210A 6606 5026 BNE.s LAB_24D9 * mantissa is not zero so go normalise FAC1 -0000210C 5027 -0000210C 3740 0DF8 5028 MOVE.w d0,FAC1_e(a3) * else make FAC1 = +zero -00002110 4E75 5029 RTS -00002112 5030 -00002112 5031 LAB_24D9 -00002112 2F01 5032 MOVE.l d1,-(sp) * save d1 -00002114 2200 5033 MOVE.l d0,d1 * mantissa to d1 -00002116 7000 5034 MOVEQ #0,d0 * clear d0 -00002118 102B 0DF8 5035 MOVE.b FAC1_e(a3),d0 * get exponent byte -0000211C 6714 5036 BEQ.s LAB_24D8 * if exponent is zero then clean up and exit -0000211E 5037 LAB_24D6 -0000211E D281 5038 ADD.l d1,d1 * shift mantissa, ADD is quicker for a single -00002120 5039 * shift -00002120 5BC8 FFFC 5040 DBMI d0,LAB_24D6 * decrement exponent and loop if mantissa and -00002124 5041 * exponent +ve -00002124 5042 -00002124 4A40 5043 TST.w d0 * test exponent -00002126 670A 5044 BEQ.s LAB_24D8 * if exponent is zero make FAC1 zero -00002128 5045 -00002128 6A02 5046 BPL.s LAB_24D7 * if exponent is >zero go save FAC1 -0000212A 5047 -0000212A 7001 5048 MOVEQ #1,d0 * else set for zero after correction -0000212C 5049 LAB_24D7 -0000212C 5300 5050 SUBQ.b #1,d0 * adjust exponent for loop -0000212E 2741 0DF4 5051 MOVE.l d1,FAC1_m(a3) * save normalised mantissa -00002132 5052 LAB_24D8 -00002132 221F 5053 MOVE.l (sp)+,d1 * restore d1 -00002134 1740 0DF8 5054 MOVE.b d0,FAC1_e(a3) * save corrected exponent -00002138 5055 LAB_24DA -00002138 4E75 5056 RTS -0000213A 5057 -0000213A 5058 -0000213A 5059 ************************************************************************************* -0000213A 5060 * -0000213A 5061 * perform LOG() -0000213A 5062 -0000213A 5063 LAB_LOG -0000213A 4A2B 0DF9 5064 TST.b FAC1_s(a3) * test sign -0000213E 6B00 E81E 5065 BMI LAB_FCER * if -ve do function call error/warm start -00002142 5066 -00002142 7E00 5067 MOVEQ #0,d7 * clear d7 -00002144 1747 0E02 5068 MOVE.b d7,FAC_sc(a3) * clear sign compare -00002148 1E2B 0DF8 5069 MOVE.b FAC1_e(a3),d7 * get exponent -0000214C 6700 E810 5070 BEQ LAB_FCER * if 0 do function call error/warm start -00002150 5071 -00002150 0487 00000081 5072 SUB.l #$81,d7 * normalise exponent -00002156 177C 0081 0DF8 5073 MOVE.b #$81,FAC1_e(a3) * force a value between 1 and 2 -0000215C 2C2B 0DF4 5074 MOVE.l FAC1_m(a3),d6 * copy mantissa -00002160 5075 -00002160 277C 80000000 0DFC 5076 MOVE.l #$80000000,FAC2_m(a3) * set mantissa for 1 -00002168 377C 8100 0E00 5077 MOVE.w #$8100,FAC2_e(a3) * set exponent for 1 -0000216E 6100 FF18 5078 BSR LAB_ADD * find arg+1 -00002172 7000 5079 MOVEQ #0,d0 * setup for calc skip -00002174 3740 0E00 5080 MOVE.w d0,FAC2_e(a3) * set FAC1 for zero result -00002178 DC86 5081 ADD.l d6,d6 * shift 1 bit out -0000217A 2746 0DFC 5082 MOVE.l d6,FAC2_m(a3) * put back FAC2 -0000217E 6758 5083 BEQ.s LAB_LONN * if 0 skip calculation -00002180 5084 -00002180 377C 8000 0E00 5085 MOVE.w #$8000,FAC2_e(a3) * set exponent for .5 -00002186 6100 0130 5086 BSR LAB_DIVIDE * do (arg-1)/(arg+1) -0000218A 4A2B 0DF8 5087 TST.b FAC1_e(a3) * test exponent -0000218E 6748 5088 BEQ.s LAB_LONN * if 0 skip calculation -00002190 5089 -00002190 122B 0DF8 5090 MOVE.b FAC1_e(a3),d1 * get exponent -00002194 0401 0082 5091 SUB.b #$82,d1 * normalise and two integer bits -00002198 4401 5092 NEG.b d1 * negate for shift -0000219A 5093 ** CMP.b #$1F,d1 * will mantissa vanish? -0000219A 5094 ** BGT.s LAB_dunno * if so do ??? -0000219A 5095 -0000219A 202B 0DF4 5096 MOVE.l FAC1_m(a3),d0 * get mantissa -0000219E E2A8 5097 LSR.l d1,d0 * shift in two integer bits -000021A0 5098 -000021A0 5099 * d0 = arg -000021A0 5100 * d0 = x, d1 = y -000021A0 5101 * d2 = x1, d3 = y1 -000021A0 5102 * d4 = shift count -000021A0 5103 * d5 = loop count -000021A0 5104 * d6 = z -000021A0 5105 * a0 = table pointer -000021A0 5106 -000021A0 7C00 5107 MOVEQ #0,d6 * z = 0 -000021A2 223C 40000000 5108 MOVE.l #1<<30,d1 * y = 1 -000021A8 41FA 13FE 5109 LEA TAB_HTHET(pc),a0 * get pointer to hyperbolic tangent table -000021AC 7A1E 5110 MOVEQ #30,d5 * loop 31 times -000021AE 7801 5111 MOVEQ #1,d4 * set shift count -000021B0 6006 5112 BRA.s LAB_LOCC * entry point for loop -000021B2 5113 -000021B2 5114 LAB_LAAD -000021B2 E8A2 5115 ASR.l d4,d2 * x1 >> i -000021B4 9282 5116 SUB.l d2,d1 * y = y - x1 -000021B6 DC90 5117 ADD.l (a0),d6 * z = z + tanh(i) -000021B8 5118 LAB_LOCC -000021B8 2400 5119 MOVE.l d0,d2 * x1 = x -000021BA 2601 5120 MOVE.l d1,d3 * y1 = Y -000021BC E8A3 5121 ASR.l d4,d3 * y1 >> i -000021BE 6402 5122 BCC.s LAB_LOLP -000021C0 5123 -000021C0 5283 5124 ADDQ.l #1,d3 -000021C2 5125 LAB_LOLP -000021C2 9083 5126 SUB.l d3,d0 * x = x - y1 -000021C4 6AEC 5127 BPL.s LAB_LAAD * branch if > 0 -000021C6 5128 -000021C6 2002 5129 MOVE.l d2,d0 * get x back -000021C8 5848 5130 ADDQ.w #4,a0 * next entry -000021CA 5284 5131 ADDQ.l #1,d4 * next i -000021CC E28B 5132 LSR.l #1,d3 * /2 -000021CE 6704 5133 BEQ.s LAB_LOCX * branch y1 = 0 -000021D0 5134 -000021D0 51CD FFF0 5135 DBF d5,LAB_LOLP * decrement and loop if not done -000021D4 5136 -000021D4 5137 * now sort out the result -000021D4 5138 LAB_LOCX -000021D4 DC86 5139 ADD.l d6,d6 * *2 -000021D6 2006 5140 MOVE.l d6,d0 * setup for d7 = 0 -000021D8 5141 LAB_LONN -000021D8 2800 5142 MOVE.l d0,d4 * save cordic result -000021DA 7A00 5143 MOVEQ #0,d5 * set default exponent sign -000021DC 4A87 5144 TST.l d7 * check original exponent sign -000021DE 6716 5145 BEQ.s LAB_LOXO * branch if original was 0 -000021E0 5146 -000021E0 6A04 5147 BPL.s LAB_LOXP * branch if was +ve -000021E2 5148 -000021E2 4487 5149 NEG.l d7 * make original exponent +ve -000021E4 7A80 5150 MOVEQ #$80-$100,d5 * make sign -ve -000021E6 5151 LAB_LOXP -000021E6 1745 0DF9 5152 MOVE.b d5,FAC1_s(a3) * save original exponent sign -000021EA 4847 5153 SWAP d7 * 16 bit shift -000021EC E18F 5154 LSL.l #8,d7 * easy first part -000021EE 7A88 5155 MOVEQ #$88-$100,d5 * start with byte -000021F0 5156 LAB_LONE -000021F0 5385 5157 SUBQ.l #1,d5 * decrement exponent -000021F2 DE87 5158 ADD.l d7,d7 * shift mantissa -000021F4 6AFA 5159 BPL.s LAB_LONE * loop if not normal -000021F6 5160 -000021F6 5161 LAB_LOXO -000021F6 2747 0DF4 5162 MOVE.l d7,FAC1_m(a3) * save original exponent as mantissa -000021FA 1745 0DF8 5163 MOVE.b d5,FAC1_e(a3) * save exponent for this -000021FE 277C B17217F8 0DFC 5164 MOVE.l #$B17217F8,FAC2_m(a3) * LOG(2) mantissa -00002206 377C 8000 0E00 5165 MOVE.w #$8000,FAC2_e(a3) * LOG(2) exponent & sign -0000220C 176B 0DF9 0E02 5166 MOVE.b FAC1_s(a3),FAC_sc(a3) * make sign compare = FAC1 sign -00002212 6118 5167 BSR.s LAB_MULTIPLY * do multiply -00002214 2744 0DFC 5168 MOVE.l d4,FAC2_m(a3) * save cordic result -00002218 6710 5169 BEQ.s LAB_LOWZ * branch if zero -0000221A 5170 -0000221A 377C 8200 0E00 5171 MOVE.w #$8200,FAC2_e(a3) * set exponent & sign -00002220 176B 0DF9 0E02 5172 MOVE.b FAC1_s(a3),FAC_sc(a3) * clear sign compare -00002226 6100 FE60 5173 BSR LAB_ADD * and add for final result -0000222A 5174 -0000222A 5175 LAB_LOWZ -0000222A 4E75 5176 RTS -0000222C 5177 -0000222C 5178 -0000222C 5179 ************************************************************************************* -0000222C 5180 * -0000222C 5181 * multiply FAC1 by FAC2 -0000222C 5182 -0000222C 5183 LAB_MULTIPLY -0000222C 48E7 F800 5184 MOVEM.l d0-d4,-(sp) * save registers -00002230 4A2B 0DF8 5185 TST.b FAC1_e(a3) * test FAC1 exponent -00002234 6776 5186 BEQ.s LAB_MUUF * if exponent zero go make result zero -00002236 5187 -00002236 102B 0E00 5188 MOVE.b FAC2_e(a3),d0 * get FAC2 exponent -0000223A 6770 5189 BEQ.s LAB_MUUF * if exponent zero go make result zero -0000223C 5190 -0000223C 176B 0E02 0DF9 5191 MOVE.b FAC_sc(a3),FAC1_s(a3) * sign compare becomes sign -00002242 5192 -00002242 D02B 0DF8 5193 ADD.b FAC1_e(a3),d0 * multiply exponents by adding -00002246 640A 5194 BCC.s LAB_MNOC * branch if no carry -00002248 5195 -00002248 0400 0080 5196 SUB.b #$80,d0 * normalise result -0000224C 6400 E70C 5197 BCC LAB_OFER * if no carry do overflow -00002250 5198 -00002250 6006 5199 BRA.s LAB_MADD * branch -00002252 5200 -00002252 5201 * no carry for exponent add -00002252 5202 LAB_MNOC -00002252 0400 0080 5203 SUB.b #$80,d0 * normalise result -00002256 6554 5204 BCS.s LAB_MUUF * return zero if underflow -00002258 5205 -00002258 5206 LAB_MADD -00002258 1740 0DF8 5207 MOVE.b d0,FAC1_e(a3) * save exponent -0000225C 5208 -0000225C 5209 * d1 (FAC1) x d2 (FAC2) -0000225C 222B 0DF4 5210 MOVE.l FAC1_m(a3),d1 * get FAC1 mantissa -00002260 242B 0DFC 5211 MOVE.l FAC2_m(a3),d2 * get FAC2 mantissa -00002264 5212 -00002264 3801 5213 MOVE.w d1,d4 * copy low word FAC1 -00002266 2001 5214 MOVE.l d1,d0 * copy long word FAC1 -00002268 4840 5215 SWAP d0 * high word FAC1 to low word FAC1 -0000226A 3600 5216 MOVE.w d0,d3 * copy high word FAC1 -0000226C 5217 -0000226C C2C2 5218 MULU d2,d1 * low word FAC2 x low word FAC1 -0000226E C0C2 5219 MULU d2,d0 * low word FAC2 x high word FAC1 -00002270 4842 5220 SWAP d2 * high word FAC2 to low word FAC2 -00002272 C8C2 5221 MULU d2,d4 * high word FAC2 x low word FAC1 -00002274 C6C2 5222 MULU d2,d3 * high word FAC2 x high word FAC1 +00002034 4837 +00002034 4838 * if you want a non existant variable to return a null value then set the novar +00002034 4839 * value at the top of this file to some non zero value +00002034 4840 +00002034 FALSE 4841 ifne novar +00002034 4842 * value get +00002034 4843 * value get and the new value save +00002034 4844 * new length save +00002034 4845 * new value save +00002034 4846 endc +00002034 4847 +00002034 4E75 4848 RTS +00002036 4849 +00002036 4850 +00002036 4851 ************************************************************************************* +00002036 4852 * +00002036 4853 * perform USR +00002036 4854 +00002036 4855 LAB_USR +00002036 4EAB 0406 4856 JSR Usrjmp(a3) * do user vector +0000203A 6000 F55A 4857 BRA LAB_1BFB * scan for ")", else do syntax error/warm start +0000203E 4858 +0000203E 4859 +0000203E 4860 ************************************************************************************* +0000203E 4861 * +0000203E 4862 * perform LOAD +0000203E 4863 +0000203E 4864 LAB_LOAD +0000203E 4EEB 0418 4865 JMP V_LOAD(a3) * do load vector +00002042 4866 +00002042 4867 +00002042 4868 ************************************************************************************* +00002042 4869 * +00002042 4870 * perform SAVE +00002042 4871 +00002042 4872 LAB_SAVE +00002042 4EEB 041E 4873 JMP V_SAVE(a3) * do save vector +00002046 4874 +00002046 4875 +00002046 4876 ************************************************************************************* +00002046 4877 * +00002046 4878 * perform CALL +00002046 4879 +00002046 4880 LAB_CALL +00002046 487A F562 4881 PEA LAB_GBYT(pc) * put return address on stack +0000204A 6100 FF50 4882 BSR LAB_GEAD * get even address for word/long memory actions +0000204E 4883 * address returned in d0 and on the stack +0000204E 4E75 4884 RTS * effectively calls the routine +00002050 4885 +00002050 4886 * if the called routine exits correctly then it will return via the get byte routine. +00002050 4887 * this will then get the next byte for the interpreter and return +00002050 4888 +00002050 4889 +00002050 4890 ************************************************************************************* +00002050 4891 * +00002050 4892 * perform WAIT +00002050 4893 +00002050 4894 LAB_WAIT +00002050 6100 FF16 4895 BSR LAB_GADB * get two parameters for POKE or WAIT +00002054 4896 * first parameter in a0, second in d0 +00002054 2F08 4897 MOVE.l a0,-(sp) * save address +00002056 3F00 4898 MOVE.w d0,-(sp) * save byte +00002058 7400 4899 MOVEQ #0,d2 * clear mask +0000205A 6100 F54E 4900 BSR LAB_GBYT * scan memory +0000205E 6706 4901 BEQ.s LAB_2441 * skip if no third argument +00002060 4902 +00002060 6100 F538 4903 BSR LAB_SCGB * scan for "," & get byte, +00002064 4904 * else do syntax error/warm start +00002064 2400 4905 MOVE.l d0,d2 * copy mask +00002066 4906 LAB_2441 +00002066 321F 4907 MOVE.w (sp)+,d1 * get byte +00002068 205F 4908 MOVEA.l (sp)+,a0 * get address +0000206A 4909 LAB_2445 +0000206A 1010 4910 MOVE.b (a0),d0 * read memory byte +0000206C B500 4911 EOR.b d2,d0 * EOR with second argument (mask) +0000206E C001 4912 AND.b d1,d0 * AND with first argument (byte) +00002070 67F8 4913 BEQ.s LAB_2445 * loop if result is zero +00002072 4914 +00002072 4E75 4915 RTS +00002074 4916 +00002074 4917 +00002074 4918 ************************************************************************************* +00002074 4919 * +00002074 4920 * perform subtraction, FAC1 from FAC2 +00002074 4921 +00002074 4922 LAB_SUBTRACT +00002074 0A2B 0080 0595 4923 EORI.b #$80,FAC1_s(a3) * complement FAC1 sign +0000207A 176B 059D 059E 4924 MOVE.b FAC2_s(a3),FAC_sc(a3) * copy FAC2 sign byte +00002080 4925 +00002080 102B 0595 4926 MOVE.b FAC1_s(a3),d0 * get FAC1 sign byte +00002084 B12B 059E 4927 EOR.b d0,FAC_sc(a3) * EOR with FAC2 sign +00002088 4928 +00002088 4929 +00002088 4930 ************************************************************************************* +00002088 4931 * +00002088 4932 * add FAC2 to FAC1 +00002088 4933 +00002088 4934 LAB_ADD +00002088 102B 0594 4935 MOVE.b FAC1_e(a3),d0 * get exponent +0000208C 6700 0338 4936 BEQ LAB_279B * FAC1 was zero so copy FAC2 to FAC1 & return +00002090 4937 +00002090 4938 * FAC1 is non zero +00002090 41EB 0598 4939 LEA FAC2_m(a3),a0 * set pointer1 to FAC2 mantissa +00002094 102B 059C 4940 MOVE.b FAC2_e(a3),d0 * get FAC2 exponent +00002098 6746 4941 BEQ.s RTS_016 * exit if zero +0000209A 4942 +0000209A 902B 0594 4943 SUB.b FAC1_e(a3),d0 * subtract FAC1 exponent +0000209E 6722 4944 BEQ.s LAB_24A8 * branch if = (go add mantissa) +000020A0 4945 +000020A0 650A 4946 BCS.s LAB_249C * branch if FAC2 < FAC1 +000020A2 4947 +000020A2 4948 * FAC2 > FAC1 +000020A2 376B 059C 0594 4949 MOVE.w FAC2_e(a3),FAC1_e(a3) * copy sign and exponent of FAC2 +000020A8 4400 4950 NEG.b d0 * negate exponent difference (make diff -ve) +000020AA 5148 4951 SUBQ.w #8,a0 * pointer1 to FAC1 +000020AC 4952 +000020AC 4953 LAB_249C +000020AC 4400 4954 NEG.b d0 * negate exponent difference (make diff +ve) +000020AE 2F01 4955 MOVE.l d1,-(sp) * save d1 +000020B0 B03C 0020 4956 CMP.b #32,d0 * compare exponent diff with 32 +000020B4 6D04 4957 BLT.s LAB_2467 * branch if range >= 32 +000020B6 4958 +000020B6 7200 4959 MOVEQ #0,d1 * clear d1 +000020B8 6004 4960 BRA.s LAB_2468 * go clear smaller mantissa +000020BA 4961 +000020BA 4962 LAB_2467 +000020BA 2210 4963 MOVE.l (a0),d1 * get FACx mantissa +000020BC E0A9 4964 LSR.l d0,d1 * shift d0 times right +000020BE 4965 LAB_2468 +000020BE 2081 4966 MOVE.l d1,(a0) * save it back +000020C0 221F 4967 MOVE.l (sp)+,d1 * restore d1 +000020C2 4968 +000020C2 4969 * exponents are equal now do mantissa add or +000020C2 4970 * subtract +000020C2 4971 LAB_24A8 +000020C2 4A2B 059E 4972 TST.b FAC_sc(a3) * test sign compare (FAC1 EOR FAC2) +000020C6 6B1A 4973 BMI.s LAB_24F8 * if <> go do subtract +000020C8 4974 +000020C8 202B 0598 4975 MOVE.l FAC2_m(a3),d0 * get FAC2 mantissa +000020CC D0AB 0590 4976 ADD.l FAC1_m(a3),d0 * add FAC1 mantissa +000020D0 640A 4977 BCC.s LAB_24F7 * save and exit if no carry (FAC1 is normal) +000020D2 4978 +000020D2 E290 4979 ROXR.l #1,d0 * else shift carry back into mantissa +000020D4 522B 0594 4980 ADDQ.b #1,FAC1_e(a3) * increment FAC1 exponent +000020D8 6500 E880 4981 BCS LAB_OFER * if carry do overflow error & warm start +000020DC 4982 +000020DC 4983 LAB_24F7 +000020DC 2740 0590 4984 MOVE.l d0,FAC1_m(a3) * save mantissa +000020E0 4985 RTS_016 +000020E0 4E75 4986 RTS +000020E2 4987 * signs are different +000020E2 4988 LAB_24F8 +000020E2 43EB 0590 4989 LEA FAC1_m(a3),a1 * pointer 2 to FAC1 +000020E6 B3C8 4990 CMPA.l a0,a1 * compare pointers +000020E8 6602 4991 BNE.s LAB_24B4 * branch if <> +000020EA 4992 +000020EA 5049 4993 ADDQ.w #8,a1 * else pointer2 to FAC2 +000020EC 4994 +000020EC 4995 * take smaller from bigger (take sign of bigger) +000020EC 4996 LAB_24B4 +000020EC 2011 4997 MOVE.l (a1),d0 * get larger mantissa +000020EE 2210 4998 MOVE.l (a0),d1 * get smaller mantissa +000020F0 2740 0590 4999 MOVE.l d0,FAC1_m(a3) * save larger mantissa +000020F4 93AB 0590 5000 SUB.l d1,FAC1_m(a3) * subtract smaller +000020F8 5001 +000020F8 5002 +000020F8 5003 ************************************************************************************* +000020F8 5004 * +000020F8 5005 * do +/- (carry is sign) & normalise FAC1 +000020F8 5006 +000020F8 5007 LAB_24D0 +000020F8 640A 5008 BCC.s LAB_24D5 * branch if result is +ve +000020FA 5009 +000020FA 5010 * erk! subtract is the wrong way round so +000020FA 5011 * negate everything +000020FA 0A2B 00FF 0595 5012 EORI.b #$FF,FAC1_s(a3) * complement FAC1 sign +00002100 44AB 0590 5013 NEG.l FAC1_m(a3) * negate FAC1 mantissa +00002104 5014 +00002104 5015 +00002104 5016 ************************************************************************************* +00002104 5017 * +00002104 5018 * normalise FAC1 +00002104 5019 +00002104 5020 LAB_24D5 +00002104 202B 0590 5021 MOVE.l FAC1_m(a3),d0 * get mantissa +00002108 6B2E 5022 BMI.s LAB_24DA * mantissa is normal so just exit +0000210A 5023 +0000210A 6606 5024 BNE.s LAB_24D9 * mantissa is not zero so go normalise FAC1 +0000210C 5025 +0000210C 3740 0594 5026 MOVE.w d0,FAC1_e(a3) * else make FAC1 = +zero +00002110 4E75 5027 RTS +00002112 5028 +00002112 5029 LAB_24D9 +00002112 2F01 5030 MOVE.l d1,-(sp) * save d1 +00002114 2200 5031 MOVE.l d0,d1 * mantissa to d1 +00002116 7000 5032 MOVEQ #0,d0 * clear d0 +00002118 102B 0594 5033 MOVE.b FAC1_e(a3),d0 * get exponent byte +0000211C 6714 5034 BEQ.s LAB_24D8 * if exponent is zero then clean up and exit +0000211E 5035 LAB_24D6 +0000211E D281 5036 ADD.l d1,d1 * shift mantissa, ADD is quicker for a single +00002120 5037 * shift +00002120 5BC8 FFFC 5038 DBMI d0,LAB_24D6 * decrement exponent and loop if mantissa and +00002124 5039 * exponent +ve +00002124 5040 +00002124 4A40 5041 TST.w d0 * test exponent +00002126 670A 5042 BEQ.s LAB_24D8 * if exponent is zero make FAC1 zero +00002128 5043 +00002128 6A02 5044 BPL.s LAB_24D7 * if exponent is >zero go save FAC1 +0000212A 5045 +0000212A 7001 5046 MOVEQ #1,d0 * else set for zero after correction +0000212C 5047 LAB_24D7 +0000212C 5300 5048 SUBQ.b #1,d0 * adjust exponent for loop +0000212E 2741 0590 5049 MOVE.l d1,FAC1_m(a3) * save normalised mantissa +00002132 5050 LAB_24D8 +00002132 221F 5051 MOVE.l (sp)+,d1 * restore d1 +00002134 1740 0594 5052 MOVE.b d0,FAC1_e(a3) * save corrected exponent +00002138 5053 LAB_24DA +00002138 4E75 5054 RTS +0000213A 5055 +0000213A 5056 +0000213A 5057 ************************************************************************************* +0000213A 5058 * +0000213A 5059 * perform LOG() +0000213A 5060 +0000213A 5061 LAB_LOG +0000213A 4A2B 0595 5062 TST.b FAC1_s(a3) * test sign +0000213E 6B00 E81E 5063 BMI LAB_FCER * if -ve do function call error/warm start +00002142 5064 +00002142 7E00 5065 MOVEQ #0,d7 * clear d7 +00002144 1747 059E 5066 MOVE.b d7,FAC_sc(a3) * clear sign compare +00002148 1E2B 0594 5067 MOVE.b FAC1_e(a3),d7 * get exponent +0000214C 6700 E810 5068 BEQ LAB_FCER * if 0 do function call error/warm start +00002150 5069 +00002150 0487 00000081 5070 SUB.l #$81,d7 * normalise exponent +00002156 177C 0081 0594 5071 MOVE.b #$81,FAC1_e(a3) * force a value between 1 and 2 +0000215C 2C2B 0590 5072 MOVE.l FAC1_m(a3),d6 * copy mantissa +00002160 5073 +00002160 277C 80000000 0598 5074 MOVE.l #$80000000,FAC2_m(a3) * set mantissa for 1 +00002168 377C 8100 059C 5075 MOVE.w #$8100,FAC2_e(a3) * set exponent for 1 +0000216E 6100 FF18 5076 BSR LAB_ADD * find arg+1 +00002172 7000 5077 MOVEQ #0,d0 * setup for calc skip +00002174 3740 059C 5078 MOVE.w d0,FAC2_e(a3) * set FAC1 for zero result +00002178 DC86 5079 ADD.l d6,d6 * shift 1 bit out +0000217A 2746 0598 5080 MOVE.l d6,FAC2_m(a3) * put back FAC2 +0000217E 6758 5081 BEQ.s LAB_LONN * if 0 skip calculation +00002180 5082 +00002180 377C 8000 059C 5083 MOVE.w #$8000,FAC2_e(a3) * set exponent for .5 +00002186 6100 0130 5084 BSR LAB_DIVIDE * do (arg-1)/(arg+1) +0000218A 4A2B 0594 5085 TST.b FAC1_e(a3) * test exponent +0000218E 6748 5086 BEQ.s LAB_LONN * if 0 skip calculation +00002190 5087 +00002190 122B 0594 5088 MOVE.b FAC1_e(a3),d1 * get exponent +00002194 0401 0082 5089 SUB.b #$82,d1 * normalise and two integer bits +00002198 4401 5090 NEG.b d1 * negate for shift +0000219A 5091 ** CMP.b #$1F,d1 * will mantissa vanish? +0000219A 5092 ** BGT.s LAB_dunno * if so do ??? +0000219A 5093 +0000219A 202B 0590 5094 MOVE.l FAC1_m(a3),d0 * get mantissa +0000219E E2A8 5095 LSR.l d1,d0 * shift in two integer bits +000021A0 5096 +000021A0 5097 * d0 = arg +000021A0 5098 * d0 = x, d1 = y +000021A0 5099 * d2 = x1, d3 = y1 +000021A0 5100 * d4 = shift count +000021A0 5101 * d5 = loop count +000021A0 5102 * d6 = z +000021A0 5103 * a0 = table pointer +000021A0 5104 +000021A0 7C00 5105 MOVEQ #0,d6 * z = 0 +000021A2 223C 40000000 5106 MOVE.l #1<<30,d1 * y = 1 +000021A8 41FA 13FE 5107 LEA TAB_HTHET(pc),a0 * get pointer to hyperbolic tangent table +000021AC 7A1E 5108 MOVEQ #30,d5 * loop 31 times +000021AE 7801 5109 MOVEQ #1,d4 * set shift count +000021B0 6006 5110 BRA.s LAB_LOCC * entry point for loop +000021B2 5111 +000021B2 5112 LAB_LAAD +000021B2 E8A2 5113 ASR.l d4,d2 * x1 >> i +000021B4 9282 5114 SUB.l d2,d1 * y = y - x1 +000021B6 DC90 5115 ADD.l (a0),d6 * z = z + tanh(i) +000021B8 5116 LAB_LOCC +000021B8 2400 5117 MOVE.l d0,d2 * x1 = x +000021BA 2601 5118 MOVE.l d1,d3 * y1 = Y +000021BC E8A3 5119 ASR.l d4,d3 * y1 >> i +000021BE 6402 5120 BCC.s LAB_LOLP +000021C0 5121 +000021C0 5283 5122 ADDQ.l #1,d3 +000021C2 5123 LAB_LOLP +000021C2 9083 5124 SUB.l d3,d0 * x = x - y1 +000021C4 6AEC 5125 BPL.s LAB_LAAD * branch if > 0 +000021C6 5126 +000021C6 2002 5127 MOVE.l d2,d0 * get x back +000021C8 5848 5128 ADDQ.w #4,a0 * next entry +000021CA 5284 5129 ADDQ.l #1,d4 * next i +000021CC E28B 5130 LSR.l #1,d3 * /2 +000021CE 6704 5131 BEQ.s LAB_LOCX * branch y1 = 0 +000021D0 5132 +000021D0 51CD FFF0 5133 DBF d5,LAB_LOLP * decrement and loop if not done +000021D4 5134 +000021D4 5135 * now sort out the result +000021D4 5136 LAB_LOCX +000021D4 DC86 5137 ADD.l d6,d6 * *2 +000021D6 2006 5138 MOVE.l d6,d0 * setup for d7 = 0 +000021D8 5139 LAB_LONN +000021D8 2800 5140 MOVE.l d0,d4 * save cordic result +000021DA 7A00 5141 MOVEQ #0,d5 * set default exponent sign +000021DC 4A87 5142 TST.l d7 * check original exponent sign +000021DE 6716 5143 BEQ.s LAB_LOXO * branch if original was 0 +000021E0 5144 +000021E0 6A04 5145 BPL.s LAB_LOXP * branch if was +ve +000021E2 5146 +000021E2 4487 5147 NEG.l d7 * make original exponent +ve +000021E4 7A80 5148 MOVEQ #$80-$100,d5 * make sign -ve +000021E6 5149 LAB_LOXP +000021E6 1745 0595 5150 MOVE.b d5,FAC1_s(a3) * save original exponent sign +000021EA 4847 5151 SWAP d7 * 16 bit shift +000021EC E18F 5152 LSL.l #8,d7 * easy first part +000021EE 7A88 5153 MOVEQ #$88-$100,d5 * start with byte +000021F0 5154 LAB_LONE +000021F0 5385 5155 SUBQ.l #1,d5 * decrement exponent +000021F2 DE87 5156 ADD.l d7,d7 * shift mantissa +000021F4 6AFA 5157 BPL.s LAB_LONE * loop if not normal +000021F6 5158 +000021F6 5159 LAB_LOXO +000021F6 2747 0590 5160 MOVE.l d7,FAC1_m(a3) * save original exponent as mantissa +000021FA 1745 0594 5161 MOVE.b d5,FAC1_e(a3) * save exponent for this +000021FE 277C B17217F8 0598 5162 MOVE.l #$B17217F8,FAC2_m(a3) * LOG(2) mantissa +00002206 377C 8000 059C 5163 MOVE.w #$8000,FAC2_e(a3) * LOG(2) exponent & sign +0000220C 176B 0595 059E 5164 MOVE.b FAC1_s(a3),FAC_sc(a3) * make sign compare = FAC1 sign +00002212 6118 5165 BSR.s LAB_MULTIPLY * do multiply +00002214 2744 0598 5166 MOVE.l d4,FAC2_m(a3) * save cordic result +00002218 6710 5167 BEQ.s LAB_LOWZ * branch if zero +0000221A 5168 +0000221A 377C 8200 059C 5169 MOVE.w #$8200,FAC2_e(a3) * set exponent & sign +00002220 176B 0595 059E 5170 MOVE.b FAC1_s(a3),FAC_sc(a3) * clear sign compare +00002226 6100 FE60 5171 BSR LAB_ADD * and add for final result +0000222A 5172 +0000222A 5173 LAB_LOWZ +0000222A 4E75 5174 RTS +0000222C 5175 +0000222C 5176 +0000222C 5177 ************************************************************************************* +0000222C 5178 * +0000222C 5179 * multiply FAC1 by FAC2 +0000222C 5180 +0000222C 5181 LAB_MULTIPLY +0000222C 48E7 F800 5182 MOVEM.l d0-d4,-(sp) * save registers +00002230 4A2B 0594 5183 TST.b FAC1_e(a3) * test FAC1 exponent +00002234 6776 5184 BEQ.s LAB_MUUF * if exponent zero go make result zero +00002236 5185 +00002236 102B 059C 5186 MOVE.b FAC2_e(a3),d0 * get FAC2 exponent +0000223A 6770 5187 BEQ.s LAB_MUUF * if exponent zero go make result zero +0000223C 5188 +0000223C 176B 059E 0595 5189 MOVE.b FAC_sc(a3),FAC1_s(a3) * sign compare becomes sign +00002242 5190 +00002242 D02B 0594 5191 ADD.b FAC1_e(a3),d0 * multiply exponents by adding +00002246 640A 5192 BCC.s LAB_MNOC * branch if no carry +00002248 5193 +00002248 0400 0080 5194 SUB.b #$80,d0 * normalise result +0000224C 6400 E70C 5195 BCC LAB_OFER * if no carry do overflow +00002250 5196 +00002250 6006 5197 BRA.s LAB_MADD * branch +00002252 5198 +00002252 5199 * no carry for exponent add +00002252 5200 LAB_MNOC +00002252 0400 0080 5201 SUB.b #$80,d0 * normalise result +00002256 6554 5202 BCS.s LAB_MUUF * return zero if underflow +00002258 5203 +00002258 5204 LAB_MADD +00002258 1740 0594 5205 MOVE.b d0,FAC1_e(a3) * save exponent +0000225C 5206 +0000225C 5207 * d1 (FAC1) x d2 (FAC2) +0000225C 222B 0590 5208 MOVE.l FAC1_m(a3),d1 * get FAC1 mantissa +00002260 242B 0598 5209 MOVE.l FAC2_m(a3),d2 * get FAC2 mantissa +00002264 5210 +00002264 3801 5211 MOVE.w d1,d4 * copy low word FAC1 +00002266 2001 5212 MOVE.l d1,d0 * copy long word FAC1 +00002268 4840 5213 SWAP d0 * high word FAC1 to low word FAC1 +0000226A 3600 5214 MOVE.w d0,d3 * copy high word FAC1 +0000226C 5215 +0000226C C2C2 5216 MULU d2,d1 * low word FAC2 x low word FAC1 +0000226E C0C2 5217 MULU d2,d0 * low word FAC2 x high word FAC1 +00002270 4842 5218 SWAP d2 * high word FAC2 to low word FAC2 +00002272 C8C2 5219 MULU d2,d4 * high word FAC2 x low word FAC1 +00002274 C6C2 5220 MULU d2,d3 * high word FAC2 x high word FAC1 +00002276 5221 +00002276 5222 * done multiply, now add partial products 00002276 5223 -00002276 5224 * done multiply, now add partial products -00002276 5225 -00002276 5226 * d1 = aaaa ---- FAC2_L x FAC1_L -00002276 5227 * d0 = bbbb aaaa FAC2_L x FAC1_H -00002276 5228 * d4 = bbbb aaaa FAC2_H x FAC1_L -00002276 5229 * d3 = cccc bbbb FAC2_H x FAC1_H -00002276 5230 * product = mmmm mmmm -00002276 5231 -00002276 0681 00008000 5232 ADD.L #$8000,d1 * round up lowest word -0000227C 4241 5233 CLR.w d1 * clear low word, don't need it -0000227E 4841 5234 SWAP d1 * align high word -00002280 D280 5235 ADD.l d0,d1 * add FAC2_L x FAC1_H (can't be carry) -00002282 5236 LAB_MUF1 -00002282 D284 5237 ADD.l d4,d1 * now add intermediate (FAC2_H x FAC1_L) -00002284 6406 5238 BCC.s LAB_MUF2 * branch if no carry -00002286 5239 -00002286 0683 00010000 5240 ADD.l #$10000,d3 * else correct result -0000228C 5241 LAB_MUF2 -0000228C 0681 00008000 5242 ADD.l #$8000,d1 * round up low word -00002292 4241 5243 CLR.w d1 * clear low word -00002294 4841 5244 SWAP d1 * align for final add -00002296 D283 5245 ADD.l d3,d1 * add FAC2_H x FAC1_H, result -00002298 6B08 5246 BMI.s LAB_MUF3 * branch if normalisation not needed -0000229A 5247 -0000229A D281 5248 ADD.l d1,d1 * shift mantissa -0000229C 532B 0DF8 5249 SUBQ.b #1,FAC1_e(a3) * adjust exponent -000022A0 670A 5250 BEQ.s LAB_MUUF * branch if underflow -000022A2 5251 -000022A2 5252 LAB_MUF3 -000022A2 2741 0DF4 5253 MOVE.l d1,FAC1_m(a3) * save mantissa -000022A6 5254 LAB_MUEX -000022A6 4CDF 001F 5255 MOVEM.l (sp)+,d0-d4 * restore registers -000022AA 4E75 5256 RTS -000022AC 5257 * either zero or underflow result -000022AC 5258 LAB_MUUF -000022AC 7000 5259 MOVEQ #0,d0 * quick clear -000022AE 2740 0DF4 5260 MOVE.l d0,FAC1_m(a3) * clear mantissa -000022B2 3740 0DF8 5261 MOVE.w d0,FAC1_e(a3) * clear sign and exponent -000022B6 60EE 5262 BRA.s LAB_MUEX * restore regs & exit -000022B8 5263 -000022B8 5264 -000022B8 5265 ************************************************************************************* -000022B8 5266 * -000022B8 5267 * do FAC2/FAC1, result in FAC1 -000022B8 5268 * fast hardware divide version -000022B8 5269 -000022B8 5270 LAB_DIVIDE -000022B8 2F07 5271 MOVE.l d7,-(sp) * save d7 -000022BA 7000 5272 MOVEQ #0,d0 * clear FAC2 exponent -000022BC 2400 5273 MOVE.l d0,d2 * clear FAC1 exponent -000022BE 5274 -000022BE 142B 0DF8 5275 MOVE.b FAC1_e(a3),d2 * get FAC1 exponent -000022C2 6700 E682 5276 BEQ LAB_DZER * if zero go do /0 error -000022C6 5277 -000022C6 102B 0E00 5278 MOVE.b FAC2_e(a3),d0 * get FAC2 exponent -000022CA 6766 5279 BEQ.s LAB_DIV0 * if zero return zero -000022CC 5280 -000022CC 9042 5281 SUB.w d2,d0 * get result exponent by subtracting -000022CE 0640 0080 5282 ADD.w #$80,d0 * correct 16 bit exponent result -000022D2 5283 -000022D2 176B 0E02 0DF9 5284 MOVE.b FAC_sc(a3),FAC1_s(a3) * sign compare is result sign +00002276 5224 * d1 = aaaa ---- FAC2_L x FAC1_L +00002276 5225 * d0 = bbbb aaaa FAC2_L x FAC1_H +00002276 5226 * d4 = bbbb aaaa FAC2_H x FAC1_L +00002276 5227 * d3 = cccc bbbb FAC2_H x FAC1_H +00002276 5228 * product = mmmm mmmm +00002276 5229 +00002276 0681 00008000 5230 ADD.L #$8000,d1 * round up lowest word +0000227C 4241 5231 CLR.w d1 * clear low word, don't need it +0000227E 4841 5232 SWAP d1 * align high word +00002280 D280 5233 ADD.l d0,d1 * add FAC2_L x FAC1_H (can't be carry) +00002282 5234 LAB_MUF1 +00002282 D284 5235 ADD.l d4,d1 * now add intermediate (FAC2_H x FAC1_L) +00002284 6406 5236 BCC.s LAB_MUF2 * branch if no carry +00002286 5237 +00002286 0683 00010000 5238 ADD.l #$10000,d3 * else correct result +0000228C 5239 LAB_MUF2 +0000228C 0681 00008000 5240 ADD.l #$8000,d1 * round up low word +00002292 4241 5241 CLR.w d1 * clear low word +00002294 4841 5242 SWAP d1 * align for final add +00002296 D283 5243 ADD.l d3,d1 * add FAC2_H x FAC1_H, result +00002298 6B08 5244 BMI.s LAB_MUF3 * branch if normalisation not needed +0000229A 5245 +0000229A D281 5246 ADD.l d1,d1 * shift mantissa +0000229C 532B 0594 5247 SUBQ.b #1,FAC1_e(a3) * adjust exponent +000022A0 670A 5248 BEQ.s LAB_MUUF * branch if underflow +000022A2 5249 +000022A2 5250 LAB_MUF3 +000022A2 2741 0590 5251 MOVE.l d1,FAC1_m(a3) * save mantissa +000022A6 5252 LAB_MUEX +000022A6 4CDF 001F 5253 MOVEM.l (sp)+,d0-d4 * restore registers +000022AA 4E75 5254 RTS +000022AC 5255 * either zero or underflow result +000022AC 5256 LAB_MUUF +000022AC 7000 5257 MOVEQ #0,d0 * quick clear +000022AE 2740 0590 5258 MOVE.l d0,FAC1_m(a3) * clear mantissa +000022B2 3740 0594 5259 MOVE.w d0,FAC1_e(a3) * clear sign and exponent +000022B6 60EE 5260 BRA.s LAB_MUEX * restore regs & exit +000022B8 5261 +000022B8 5262 +000022B8 5263 ************************************************************************************* +000022B8 5264 * +000022B8 5265 * do FAC2/FAC1, result in FAC1 +000022B8 5266 * fast hardware divide version +000022B8 5267 +000022B8 5268 LAB_DIVIDE +000022B8 2F07 5269 MOVE.l d7,-(sp) * save d7 +000022BA 7000 5270 MOVEQ #0,d0 * clear FAC2 exponent +000022BC 2400 5271 MOVE.l d0,d2 * clear FAC1 exponent +000022BE 5272 +000022BE 142B 0594 5273 MOVE.b FAC1_e(a3),d2 * get FAC1 exponent +000022C2 6700 E682 5274 BEQ LAB_DZER * if zero go do /0 error +000022C6 5275 +000022C6 102B 059C 5276 MOVE.b FAC2_e(a3),d0 * get FAC2 exponent +000022CA 6766 5277 BEQ.s LAB_DIV0 * if zero return zero +000022CC 5278 +000022CC 9042 5279 SUB.w d2,d0 * get result exponent by subtracting +000022CE 0640 0080 5280 ADD.w #$80,d0 * correct 16 bit exponent result +000022D2 5281 +000022D2 176B 059E 0595 5282 MOVE.b FAC_sc(a3),FAC1_s(a3) * sign compare is result sign +000022D8 5283 +000022D8 5284 * now to do 32/32 bit mantissa divide 000022D8 5285 -000022D8 5286 * now to do 32/32 bit mantissa divide -000022D8 5287 -000022D8 422B 0E03 5288 CLR.b flag(a3) * clear 'flag' byte -000022DC 262B 0DF4 5289 MOVE.l FAC1_m(a3),d3 * get FAC1 mantissa -000022E0 282B 0DFC 5290 MOVE.l FAC2_m(a3),d4 * get FAC2 mantissa -000022E4 B883 5291 CMP.l d3,d4 * compare FAC2 with FAC1 mantissa -000022E6 6744 5292 BEQ.s LAB_MAN1 * set mantissa result = 1 if equal -000022E8 5293 -000022E8 6506 5294 BCS.s AC1gtAC2 * branch if FAC1 > FAC2 -000022EA 5295 -000022EA 9883 5296 SUB.l d3,d4 * subtract FAC1 from FAC2, result now must be <1 -000022EC 562B 0E03 5297 ADDQ.b #3,flag(a3) * FAC2>FAC1 so set 'flag' byte -000022F0 5298 AC1gtAC2 -000022F0 6146 5299 BSR.s LAB_32_16 * do 32/16 divide -000022F2 4841 5300 SWAP d1 * move 16 bit result to high word -000022F4 2802 5301 MOVE.l d2,d4 * copy remainder longword -000022F6 6142 5302 BSR.s LAB_3216 * do 32/16 divide again (skip copy d4 to d2) -000022F8 84C5 5303 DIVU.w d5,d2 * now divide remainder to make guard word -000022FA 1E2B 0E03 5304 MOVE.b flag(a3),d7 * now normalise, get flag byte back -000022FE 6708 5305 BEQ.s LAB_DIVX * skip add if null +000022D8 422B 059F 5286 CLR.b flag(a3) * clear 'flag' byte +000022DC 262B 0590 5287 MOVE.l FAC1_m(a3),d3 * get FAC1 mantissa +000022E0 282B 0598 5288 MOVE.l FAC2_m(a3),d4 * get FAC2 mantissa +000022E4 B883 5289 CMP.l d3,d4 * compare FAC2 with FAC1 mantissa +000022E6 6744 5290 BEQ.s LAB_MAN1 * set mantissa result = 1 if equal +000022E8 5291 +000022E8 6506 5292 BCS.s AC1gtAC2 * branch if FAC1 > FAC2 +000022EA 5293 +000022EA 9883 5294 SUB.l d3,d4 * subtract FAC1 from FAC2, result now must be <1 +000022EC 562B 059F 5295 ADDQ.b #3,flag(a3) * FAC2>FAC1 so set 'flag' byte +000022F0 5296 AC1gtAC2 +000022F0 6146 5297 BSR.s LAB_32_16 * do 32/16 divide +000022F2 4841 5298 SWAP d1 * move 16 bit result to high word +000022F4 2802 5299 MOVE.l d2,d4 * copy remainder longword +000022F6 6142 5300 BSR.s LAB_3216 * do 32/16 divide again (skip copy d4 to d2) +000022F8 84C5 5301 DIVU.w d5,d2 * now divide remainder to make guard word +000022FA 1E2B 059F 5302 MOVE.b flag(a3),d7 * now normalise, get flag byte back +000022FE 6708 5303 BEQ.s LAB_DIVX * skip add if null +00002300 5304 +00002300 5305 * else result was >1 so we need to add 1 to result mantissa and adjust exponent 00002300 5306 -00002300 5307 * else result was >1 so we need to add 1 to result mantissa and adjust exponent -00002300 5308 -00002300 E20F 5309 LSR.b #1,d7 * shift 1 into eXtend -00002302 E291 5310 ROXR.l #1,d1 * shift extend result >> -00002304 E252 5311 ROXR.w #1,d2 * shift extend guard word >> -00002306 5200 5312 ADDQ.b #1,d0 * adjust exponent +00002300 E20F 5307 LSR.b #1,d7 * shift 1 into eXtend +00002302 E291 5308 ROXR.l #1,d1 * shift extend result >> +00002304 E252 5309 ROXR.w #1,d2 * shift extend guard word >> +00002306 5200 5310 ADDQ.b #1,d0 * adjust exponent +00002308 5311 +00002308 5312 * now round result to 32 bits 00002308 5313 -00002308 5314 * now round result to 32 bits -00002308 5315 -00002308 5316 LAB_DIVX -00002308 D442 5317 ADD.w d2,d2 * guard bit into eXtend bit -0000230A 6408 5318 BCC.s L_DIVRND * branch if guard=0 -0000230C 5319 -0000230C 5281 5320 ADDQ.l #1,d1 * add guard to mantissa -0000230E 6404 5321 BCC.s L_DIVRND * branch if no overflow -00002310 5322 -00002310 5323 LAB_SET1 -00002310 E291 5324 ROXR.l #1,d1 * shift extend result >> -00002312 5240 5325 ADDQ.w #1,d0 * adjust exponent -00002314 5326 -00002314 5327 * test for over/under flow -00002314 5328 L_DIVRND -00002314 3600 5329 MOVE.w d0,d3 * copy exponent -00002316 6B1A 5330 BMI.s LAB_DIV0 * if -ve return zero -00002318 5331 -00002318 0243 FF00 5332 ANDI.w #$FF00,d3 * mask word high byte -0000231C 6600 E63C 5333 BNE LAB_OFER * branch if overflow -00002320 5334 -00002320 5335 * move result into FAC1 -00002320 5336 LAB_XDIV -00002320 2E1F 5337 MOVE.l (sp)+,d7 * restore d7 -00002322 1740 0DF8 5338 MOVE.b d0,FAC1_e(a3) * save result exponent -00002326 2741 0DF4 5339 MOVE.l d1,FAC1_m(a3) * save result mantissa -0000232A 4E75 5340 RTS +00002308 5314 LAB_DIVX +00002308 D442 5315 ADD.w d2,d2 * guard bit into eXtend bit +0000230A 6408 5316 BCC.s L_DIVRND * branch if guard=0 +0000230C 5317 +0000230C 5281 5318 ADDQ.l #1,d1 * add guard to mantissa +0000230E 6404 5319 BCC.s L_DIVRND * branch if no overflow +00002310 5320 +00002310 5321 LAB_SET1 +00002310 E291 5322 ROXR.l #1,d1 * shift extend result >> +00002312 5240 5323 ADDQ.w #1,d0 * adjust exponent +00002314 5324 +00002314 5325 * test for over/under flow +00002314 5326 L_DIVRND +00002314 3600 5327 MOVE.w d0,d3 * copy exponent +00002316 6B1A 5328 BMI.s LAB_DIV0 * if -ve return zero +00002318 5329 +00002318 0243 FF00 5330 ANDI.w #$FF00,d3 * mask word high byte +0000231C 6600 E63C 5331 BNE LAB_OFER * branch if overflow +00002320 5332 +00002320 5333 * move result into FAC1 +00002320 5334 LAB_XDIV +00002320 2E1F 5335 MOVE.l (sp)+,d7 * restore d7 +00002322 1740 0594 5336 MOVE.b d0,FAC1_e(a3) * save result exponent +00002326 2741 0590 5337 MOVE.l d1,FAC1_m(a3) * save result mantissa +0000232A 4E75 5338 RTS +0000232C 5339 +0000232C 5340 * FAC1 mantissa = FAC2 mantissa so set result mantissa 0000232C 5341 -0000232C 5342 * FAC1 mantissa = FAC2 mantissa so set result mantissa -0000232C 5343 -0000232C 5344 LAB_MAN1 -0000232C 7201 5345 MOVEQ #1,d1 * set bit -0000232E E2A9 5346 LSR.l d1,d1 * bit into eXtend -00002330 60DE 5347 BRA.s LAB_SET1 * set mantissa, adjust exponent and exit +0000232C 5342 LAB_MAN1 +0000232C 7201 5343 MOVEQ #1,d1 * set bit +0000232E E2A9 5344 LSR.l d1,d1 * bit into eXtend +00002330 60DE 5345 BRA.s LAB_SET1 * set mantissa, adjust exponent and exit +00002332 5346 +00002332 5347 * result is zero 00002332 5348 -00002332 5349 * result is zero -00002332 5350 -00002332 5351 LAB_DIV0 -00002332 7000 5352 MOVEQ #0,d0 * zero exponent & sign -00002334 2200 5353 MOVE.l d0,d1 * zero mantissa -00002336 60E8 5354 BRA LAB_XDIV * exit divide -00002338 5355 -00002338 5356 * divide 16 bits into 32, AB/Ex -00002338 5357 * -00002338 5358 * d4 AAAA BBBB * 32 bit numerator -00002338 5359 * d3 EEEE xxxx * 16 bit denominator +00002332 5349 LAB_DIV0 +00002332 7000 5350 MOVEQ #0,d0 * zero exponent & sign +00002334 2200 5351 MOVE.l d0,d1 * zero mantissa +00002336 60E8 5352 BRA LAB_XDIV * exit divide +00002338 5353 +00002338 5354 * divide 16 bits into 32, AB/Ex +00002338 5355 * +00002338 5356 * d4 AAAA BBBB * 32 bit numerator +00002338 5357 * d3 EEEE xxxx * 16 bit denominator +00002338 5358 * +00002338 5359 * returns - 00002338 5360 * -00002338 5361 * returns - -00002338 5362 * -00002338 5363 * d1 xxxx DDDD * 16 bit result -00002338 5364 * d2 HHHH IIII * 32 bit remainder -00002338 5365 -00002338 5366 LAB_32_16 -00002338 2404 5367 MOVE.l d4,d2 * copy FAC2 mantissa (AB) -0000233A 5368 LAB_3216 -0000233A 2A03 5369 MOVE.l d3,d5 * copy FAC1 mantissa (EF) -0000233C 4245 5370 CLR.w d5 * clear low word d1 (Ex) -0000233E 4845 5371 SWAP d5 * swap high word to low word (xE) -00002340 5372 -00002340 5373 * d3 EEEE FFFF * denominator copy -00002340 5374 * d5 0000 EEEE * denominator high word -00002340 5375 * d2 AAAA BBBB * numerator copy -00002340 5376 * d4 AAAA BBBB * numerator -00002340 5377 -00002340 88C5 5378 DIVU.w d5,d4 * do FAC2/FAC1 high word (AB/E) -00002342 6802 5379 BVC.s LAB_LT_1 * if no overflow DIV was ok -00002344 5380 -00002344 78FF 5381 MOVEQ #-1,d4 * else set default value +00002338 5361 * d1 xxxx DDDD * 16 bit result +00002338 5362 * d2 HHHH IIII * 32 bit remainder +00002338 5363 +00002338 5364 LAB_32_16 +00002338 2404 5365 MOVE.l d4,d2 * copy FAC2 mantissa (AB) +0000233A 5366 LAB_3216 +0000233A 2A03 5367 MOVE.l d3,d5 * copy FAC1 mantissa (EF) +0000233C 4245 5368 CLR.w d5 * clear low word d1 (Ex) +0000233E 4845 5369 SWAP d5 * swap high word to low word (xE) +00002340 5370 +00002340 5371 * d3 EEEE FFFF * denominator copy +00002340 5372 * d5 0000 EEEE * denominator high word +00002340 5373 * d2 AAAA BBBB * numerator copy +00002340 5374 * d4 AAAA BBBB * numerator +00002340 5375 +00002340 88C5 5376 DIVU.w d5,d4 * do FAC2/FAC1 high word (AB/E) +00002342 6802 5377 BVC.s LAB_LT_1 * if no overflow DIV was ok +00002344 5378 +00002344 78FF 5379 MOVEQ #-1,d4 * else set default value +00002346 5380 +00002346 5381 * done the divide, now check the result, we have ... 00002346 5382 -00002346 5383 * done the divide, now check the result, we have ... -00002346 5384 -00002346 5385 * d3 EEEE FFFF * denominator copy -00002346 5386 * d5 0000 EEEE * denominator high word -00002346 5387 * d2 AAAA BBBB * numerator copy -00002346 5388 * d4 MMMM DDDD * result MOD and DIV -00002346 5389 -00002346 5390 LAB_LT_1 -00002346 3C04 5391 MOVE.w d4,d6 * copy 16 bit result -00002348 3204 5392 MOVE.w d4,d1 * copy 16 bit result again -0000234A 5393 -0000234A 5394 * we now have .. -0000234A 5395 * d3 EEEE FFFF * denominator copy -0000234A 5396 * d5 0000 EEEE * denominator high word -0000234A 5397 * d6 xxxx DDDD * result DIV copy -0000234A 5398 * d1 xxxx DDDD * result DIV copy -0000234A 5399 * d2 AAAA BBBB * numerator copy -0000234A 5400 * d4 MMMM DDDD * result MOD and DIV -0000234A 5401 -0000234A 5402 * now multiply out 32 bit denominator by 16 bit result -0000234A 5403 * QRS = AB*D -0000234A 5404 -0000234A CCC3 5405 MULU.w d3,d6 * FFFF * DDDD = rrrr SSSS -0000234C C8C5 5406 MULU.w d5,d4 * EEEE * DDDD = QQQQ rrrr -0000234E 5407 -0000234E 5408 * we now have .. -0000234E 5409 * d3 EEEE FFFF * denominator copy -0000234E 5410 * d5 0000 EEEE * denominator high word -0000234E 5411 * d6 rrrr SSSS * 48 bit result partial low -0000234E 5412 * d1 xxxx DDDD * result DIV copy -0000234E 5413 * d2 AAAA BBBB * numerator copy -0000234E 5414 * d4 QQQQ rrrr * 48 bit result partial -0000234E 5415 -0000234E 3E06 5416 MOVE.w d6,d7 * copy low word of low multiply +00002346 5383 * d3 EEEE FFFF * denominator copy +00002346 5384 * d5 0000 EEEE * denominator high word +00002346 5385 * d2 AAAA BBBB * numerator copy +00002346 5386 * d4 MMMM DDDD * result MOD and DIV +00002346 5387 +00002346 5388 LAB_LT_1 +00002346 3C04 5389 MOVE.w d4,d6 * copy 16 bit result +00002348 3204 5390 MOVE.w d4,d1 * copy 16 bit result again +0000234A 5391 +0000234A 5392 * we now have .. +0000234A 5393 * d3 EEEE FFFF * denominator copy +0000234A 5394 * d5 0000 EEEE * denominator high word +0000234A 5395 * d6 xxxx DDDD * result DIV copy +0000234A 5396 * d1 xxxx DDDD * result DIV copy +0000234A 5397 * d2 AAAA BBBB * numerator copy +0000234A 5398 * d4 MMMM DDDD * result MOD and DIV +0000234A 5399 +0000234A 5400 * now multiply out 32 bit denominator by 16 bit result +0000234A 5401 * QRS = AB*D +0000234A 5402 +0000234A CCC3 5403 MULU.w d3,d6 * FFFF * DDDD = rrrr SSSS +0000234C C8C5 5404 MULU.w d5,d4 * EEEE * DDDD = QQQQ rrrr +0000234E 5405 +0000234E 5406 * we now have .. +0000234E 5407 * d3 EEEE FFFF * denominator copy +0000234E 5408 * d5 0000 EEEE * denominator high word +0000234E 5409 * d6 rrrr SSSS * 48 bit result partial low +0000234E 5410 * d1 xxxx DDDD * result DIV copy +0000234E 5411 * d2 AAAA BBBB * numerator copy +0000234E 5412 * d4 QQQQ rrrr * 48 bit result partial +0000234E 5413 +0000234E 3E06 5414 MOVE.w d6,d7 * copy low word of low multiply +00002350 5415 +00002350 5416 * d7 xxxx SSSS * 48 bit result partial low 00002350 5417 -00002350 5418 * d7 xxxx SSSS * 48 bit result partial low -00002350 5419 -00002350 4246 5420 CLR.w d6 * clear low word of low multiply -00002352 4846 5421 SWAP d6 * high word of low multiply to low word +00002350 4246 5418 CLR.w d6 * clear low word of low multiply +00002352 4846 5419 SWAP d6 * high word of low multiply to low word +00002354 5420 +00002354 5421 * d6 0000 rrrr * high word of 48 bit result partial low 00002354 5422 -00002354 5423 * d6 0000 rrrr * high word of 48 bit result partial low -00002354 5424 -00002354 D886 5425 ADD.l d6,d4 +00002354 D886 5423 ADD.l d6,d4 +00002356 5424 +00002356 5425 * d4 QQQQ RRRR * 48 bit result partial high longword 00002356 5426 -00002356 5427 * d4 QQQQ RRRR * 48 bit result partial high longword -00002356 5428 -00002356 7C00 5429 MOVEQ #0,d6 * clear to extend numerator to 48 bits +00002356 7C00 5427 MOVEQ #0,d6 * clear to extend numerator to 48 bits +00002358 5428 +00002358 5429 * now do GHI = AB0 - QRS (which is the remainder) 00002358 5430 -00002358 5431 * now do GHI = AB0 - QRS (which is the remainder) -00002358 5432 -00002358 9C47 5433 SUB.w d7,d6 * low word subtract +00002358 9C47 5431 SUB.w d7,d6 * low word subtract +0000235A 5432 +0000235A 5433 * d6 xxxx IIII * remainder low word 0000235A 5434 -0000235A 5435 * d6 xxxx IIII * remainder low word -0000235A 5436 -0000235A 9584 5437 SUBX.l d4,d2 * high longword subtract +0000235A 9584 5435 SUBX.l d4,d2 * high longword subtract +0000235C 5436 +0000235C 5437 * d2 GGGG HHHH * remainder high longword 0000235C 5438 -0000235C 5439 * d2 GGGG HHHH * remainder high longword +0000235C 5439 * now if we got the divide correct then the remainder high longword will be +ve 0000235C 5440 -0000235C 5441 * now if we got the divide correct then the remainder high longword will be +ve -0000235C 5442 -0000235C 6A08 5443 BPL.s L_DDIV * branch if result is ok ( FAC2 -00002432 5639 * returns d0= 0 Cb=0 if FAC1 = FAC2 -00002432 5640 * returns d0=-1 Cb=1 if FAC1 < FAC2 -00002432 5641 -00002432 5642 LAB_27FA -00002432 122B 0E00 5643 MOVE.b FAC2_e(a3),d1 * get FAC2 exponent -00002436 67C8 5644 BEQ.s LAB_27CA * branch if FAC2 exponent=0 & get FAC1 sign -00002438 5645 * d0=-1,C=1/-ve d0=+1,C=0/+ve -00002438 5646 -00002438 102B 0E02 5647 MOVE.b FAC_sc(a3),d0 * get FAC sign compare -0000243C 6BCA 5648 BMI.s LAB_27CE * if signs <> do return d0=-1,C=1/-ve -0000243E 5649 * d0=+1,C=0/+ve & return -0000243E 5650 -0000243E 102B 0DF9 5651 MOVE.b FAC1_s(a3),d0 * get FAC1 sign -00002442 B22B 0DF8 5652 CMP.b FAC1_e(a3),d1 * compare FAC1 exponent with FAC2 exponent -00002446 660A 5653 BNE.s LAB_2828 * branch if different -00002448 5654 -00002448 222B 0DFC 5655 MOVE.l FAC2_m(a3),d1 * get FAC2 mantissa -0000244C B2AB 0DF4 5656 CMP.l FAC1_m(a3),d1 * compare mantissas -00002450 6708 5657 BEQ.s LAB_282F * exit if mantissas equal +00002368 3406 5466 MOVE.w d6,d2 * remainder in high word +0000236A 5467 +0000236A 5468 * d2 HHHH IIII * now is 32 bit remainder +0000236A 5469 * d1 xxxx DDDD * 16 bit result +0000236A 5470 +0000236A 4E75 5471 RTS +0000236C 5472 +0000236C 5473 +0000236C 5474 ************************************************************************************* +0000236C 5475 * +0000236C 5476 * unpack memory (a0) into FAC1 +0000236C 5477 +0000236C 5478 LAB_UFAC +0000236C 2010 5479 MOVE.l (a0),d0 * get packed value +0000236E 4840 5480 SWAP d0 * exponent and sign into least significant word +00002370 3740 0594 5481 MOVE.w d0,FAC1_e(a3) * save exponent and sign +00002374 6708 5482 BEQ.s LAB_NB1T * branch if exponent (and the rest) zero +00002376 5483 +00002376 807C 0080 5484 OR.w #$80,d0 * set MSb +0000237A 4840 5485 SWAP d0 * word order back to normal +0000237C E180 5486 ASL.l #8,d0 * shift exponent & clear guard byte +0000237E 5487 LAB_NB1T +0000237E 2740 0590 5488 MOVE.l d0,FAC1_m(a3) * move into FAC1 +00002382 5489 +00002382 102B 0594 5490 MOVE.b FAC1_e(a3),d0 * get FAC1 exponent +00002386 4E75 5491 RTS +00002388 5492 +00002388 5493 +00002388 5494 ************************************************************************************* +00002388 5495 * +00002388 5496 * set numeric variable, pack FAC1 into Lvarpl +00002388 5497 +00002388 5498 LAB_PFAC +00002388 2F08 5499 MOVE.l a0,-(sp) * save pointer +0000238A 206B 0472 5500 MOVEA.l Lvarpl(a3),a0 * get destination pointer +0000238E 082B 0006 05B5 5501 BTST #6,Dtypef(a3) * test data type +00002394 670C 5502 BEQ.s LAB_277C * branch if floating +00002396 5503 +00002396 6100 00C6 5504 BSR LAB_2831 * convert FAC1 floating to fixed +0000239A 5505 * result in d0 and Itemp +0000239A 2080 5506 MOVE.l d0,(a0) * save in var +0000239C 205F 5507 MOVE.l (sp)+,a0 * restore pointer +0000239E 4E75 5508 RTS +000023A0 5509 +000023A0 5510 +000023A0 5511 ************************************************************************************* +000023A0 5512 * +000023A0 5513 * normalise round and pack FAC1 into (a0) +000023A0 5514 +000023A0 5515 LAB_2778 +000023A0 2F08 5516 MOVE.l a0,-(sp) * save pointer +000023A2 5517 LAB_277C +000023A2 6100 FD60 5518 BSR LAB_24D5 * normalise FAC1 +000023A6 612C 5519 BSR.s LAB_27BA * round FAC1 +000023A8 202B 0590 5520 MOVE.l FAC1_m(a3),d0 * get FAC1 mantissa +000023AC E098 5521 ROR.l #8,d0 * align 24/32 bit mantissa +000023AE 4840 5522 SWAP d0 * exponent/sign into 0-15 +000023B0 C07C 007F 5523 AND.w #$7F,d0 * clear exponent and sign bit +000023B4 022B 0080 0595 5524 ANDI.b #$80,FAC1_s(a3) * clear non sign bits in sign +000023BA 806B 0594 5525 OR.w FAC1_e(a3),d0 * OR in exponent and sign +000023BE 4840 5526 SWAP d0 * move exponent and sign back to 16-31 +000023C0 2080 5527 MOVE.l d0,(a0) * store in destination +000023C2 205F 5528 MOVE.l (sp)+,a0 * restore pointer +000023C4 4E75 5529 RTS +000023C6 5530 +000023C6 5531 +000023C6 5532 ************************************************************************************* +000023C6 5533 * +000023C6 5534 * copy FAC2 to FAC1 +000023C6 5535 +000023C6 5536 LAB_279B +000023C6 376B 059C 0594 5537 MOVE.w FAC2_e(a3),FAC1_e(a3) * copy exponent & sign +000023CC 276B 0598 0590 5538 MOVE.l FAC2_m(a3),FAC1_m(a3) * copy mantissa +000023D2 4E75 5539 RTS +000023D4 5540 +000023D4 5541 +000023D4 5542 ************************************************************************************* +000023D4 5543 * +000023D4 5544 * round FAC1 +000023D4 5545 +000023D4 5546 LAB_27BA +000023D4 102B 0594 5547 MOVE.b FAC1_e(a3),d0 * get FAC1 exponent +000023D8 6720 5548 BEQ.s LAB_27C4 * branch if zero +000023DA 5549 +000023DA 202B 0590 5550 MOVE.l FAC1_m(a3),d0 * get FAC1 +000023DE 0680 00000080 5551 ADD.l #$80,d0 * round to 24 bit +000023E4 640A 5552 BCC.s LAB_27C3 * branch if no overflow +000023E6 5553 +000023E6 E290 5554 ROXR.l #1,d0 * shift FAC1 mantissa +000023E8 522B 0594 5555 ADDQ.b #1,FAC1_e(a3) * correct exponent +000023EC 6500 E56C 5556 BCS LAB_OFER * if carry do overflow error & warm start +000023F0 5557 +000023F0 5558 LAB_27C3 +000023F0 C03C 0000 5559 AND.b #$00,d0 * clear guard byte +000023F4 2740 0590 5560 MOVE.l d0,FAC1_m(a3) * save back to FAC1 +000023F8 4E75 5561 RTS +000023FA 5562 +000023FA 5563 LAB_27C4 +000023FA 1740 0595 5564 MOVE.b d0,FAC1_s(a3) * make zero always +ve +000023FE 5565 RTS_017 +000023FE 4E75 5566 RTS +00002400 5567 +00002400 5568 +00002400 5569 ************************************************************************************* +00002400 5570 * +00002400 5571 * get FAC1 sign +00002400 5572 * return d0=-1,C=1/-ve d0=+1,C=0/+ve +00002400 5573 +00002400 5574 LAB_27CA +00002400 7000 5575 MOVEQ #0,d0 * clear d0 +00002402 102B 0594 5576 MOVE.b FAC1_e(a3),d0 * get FAC1 exponent +00002406 67F6 5577 BEQ.s RTS_017 * exit if zero (already correct SGN(0)=0) +00002408 5578 +00002408 5579 +00002408 5580 ************************************************************************************* +00002408 5581 * +00002408 5582 * return d0=-1,C=1/-ve d0=+1,C=0/+ve +00002408 5583 * no = 0 check +00002408 5584 +00002408 5585 LAB_27CE +00002408 102B 0595 5586 MOVE.b FAC1_s(a3),d0 * else get FAC1 sign (b7) +0000240C 5587 +0000240C 5588 +0000240C 5589 ************************************************************************************* +0000240C 5590 * +0000240C 5591 * return d0=-1,C=1/-ve d0=+1,C=0/+ve +0000240C 5592 * no = 0 check, sign in d0 +0000240C 5593 +0000240C 5594 LAB_27D0 +0000240C 4880 5595 EXT.w d0 * make word +0000240E 48C0 5596 EXT.l d0 * make longword +00002410 E080 5597 ASR.l #8,d0 * move sign bit through byte to carry +00002412 65EA 5598 BCS.s RTS_017 * exit if carry set +00002414 5599 +00002414 7001 5600 MOVEQ #1,d0 * set result for +ve sign +00002416 4E75 5601 RTS +00002418 5602 +00002418 5603 +00002418 5604 ************************************************************************************* +00002418 5605 * +00002418 5606 * perform SGN() +00002418 5607 +00002418 5608 LAB_SGN +00002418 61E6 5609 BSR.s LAB_27CA * get FAC1 sign +0000241A 5610 * return d0=-1/-ve d0=+1/+ve +0000241A 5611 +0000241A 5612 +0000241A 5613 ************************************************************************************* +0000241A 5614 * +0000241A 5615 * save d0 as integer longword +0000241A 5616 +0000241A 5617 LAB_27DB +0000241A 2740 0590 5618 MOVE.l d0,FAC1_m(a3) * save FAC1 mantissa +0000241E 377C A000 0594 5619 MOVE.w #$A000,FAC1_e(a3) * set FAC1 exponent & sign +00002424 D080 5620 ADD.l d0,d0 * top bit into carry +00002426 6000 FCD0 5621 BRA LAB_24D0 * do +/- (carry is sign) & normalise FAC1 +0000242A 5622 +0000242A 5623 +0000242A 5624 ************************************************************************************* +0000242A 5625 * +0000242A 5626 * perform ABS() +0000242A 5627 +0000242A 5628 LAB_ABS +0000242A 177C 0000 0595 5629 MOVE.b #0,FAC1_s(a3) * clear FAC1 sign +00002430 4E75 5630 RTS +00002432 5631 +00002432 5632 +00002432 5633 ************************************************************************************* +00002432 5634 * +00002432 5635 * compare FAC1 with FAC2 +00002432 5636 * returns d0=+1 Cb=0 if FAC1 > FAC2 +00002432 5637 * returns d0= 0 Cb=0 if FAC1 = FAC2 +00002432 5638 * returns d0=-1 Cb=1 if FAC1 < FAC2 +00002432 5639 +00002432 5640 LAB_27FA +00002432 122B 059C 5641 MOVE.b FAC2_e(a3),d1 * get FAC2 exponent +00002436 67C8 5642 BEQ.s LAB_27CA * branch if FAC2 exponent=0 & get FAC1 sign +00002438 5643 * d0=-1,C=1/-ve d0=+1,C=0/+ve +00002438 5644 +00002438 102B 059E 5645 MOVE.b FAC_sc(a3),d0 * get FAC sign compare +0000243C 6BCA 5646 BMI.s LAB_27CE * if signs <> do return d0=-1,C=1/-ve +0000243E 5647 * d0=+1,C=0/+ve & return +0000243E 5648 +0000243E 102B 0595 5649 MOVE.b FAC1_s(a3),d0 * get FAC1 sign +00002442 B22B 0594 5650 CMP.b FAC1_e(a3),d1 * compare FAC1 exponent with FAC2 exponent +00002446 660A 5651 BNE.s LAB_2828 * branch if different +00002448 5652 +00002448 222B 0598 5653 MOVE.l FAC2_m(a3),d1 * get FAC2 mantissa +0000244C B2AB 0590 5654 CMP.l FAC1_m(a3),d1 * compare mantissas +00002450 6708 5655 BEQ.s LAB_282F * exit if mantissas equal +00002452 5656 +00002452 5657 * gets here if number <> FAC1 00002452 5658 -00002452 5659 * gets here if number <> FAC1 -00002452 5660 -00002452 5661 LAB_2828 -00002452 65B8 5662 BCS.s LAB_27D0 * if FAC1 > FAC2 return d0=-1,C=1/-ve d0=+1, -00002454 5663 * C=0/+ve -00002454 5664 -00002454 0A00 0080 5665 EORI.b #$80,d0 * else toggle FAC1 sign -00002458 5666 LAB_282E -00002458 60B2 5667 BRA.s LAB_27D0 * return d0=-1,C=1/-ve d0=+1,C=0/+ve -0000245A 5668 -0000245A 5669 LAB_282F -0000245A 7000 5670 MOVEQ #0,d0 * clear result -0000245C 4E75 5671 RTS -0000245E 5672 -0000245E 5673 -0000245E 5674 ************************************************************************************* -0000245E 5675 * -0000245E 5676 * convert FAC1 floating to fixed -0000245E 5677 * result in d0 and Itemp, sets flags correctly -0000245E 5678 -0000245E 5679 LAB_2831 -0000245E 202B 0DF4 5680 MOVE.l FAC1_m(a3),d0 * copy mantissa -00002462 6730 5681 BEQ.s LAB_284J * branch if mantissa = 0 -00002464 5682 -00002464 2F01 5683 MOVE.l d1,-(sp) * save d1 -00002466 72A0 5684 MOVEQ #$A0,d1 * set for no floating bits -00002468 922B 0DF8 5685 SUB.b FAC1_e(a3),d1 * subtract FAC1 exponent -0000246C 6500 E4EC 5686 BCS LAB_OFER * do overflow if too big -00002470 5687 -00002470 660E 5688 BNE.s LAB_284G * branch if exponent was not $A0 -00002472 5689 -00002472 4A2B 0DF9 5690 TST.b FAC1_s(a3) * test FAC1 sign -00002476 6A1A 5691 BPL.s LAB_284H * branch if FAC1 +ve -00002478 5692 -00002478 4480 5693 NEG.l d0 -0000247A 6916 5694 BVS.s LAB_284H * branch if was $80000000 -0000247C 5695 -0000247C 6000 E4DC 5696 BRA LAB_OFER * do overflow if too big -00002480 5697 -00002480 5698 LAB_284G -00002480 B23C 0020 5699 CMP.b #$20,d1 * compare with minimum result for integer -00002484 6502 5700 BCS.s LAB_284L * if < minimum just do shift -00002486 5701 -00002486 7000 5702 MOVEQ #0,d0 * else return zero -00002488 5703 LAB_284L -00002488 E2A8 5704 LSR.l d1,d0 * shift integer -0000248A 5705 -0000248A 4A2B 0DF9 5706 TST.b FAC1_s(a3) * test FAC1 sign (b7) -0000248E 6A02 5707 BPL.s LAB_284H * branch if FAC1 +ve -00002490 5708 -00002490 4480 5709 NEG.l d0 * negate integer value -00002492 5710 LAB_284H -00002492 221F 5711 MOVE.l (sp)+,d1 * restore d1 -00002494 5712 LAB_284J -00002494 2740 0C8E 5713 MOVE.l d0,Itemp(a3) * save result to Itemp -00002498 4E75 5714 RTS -0000249A 5715 -0000249A 5716 -0000249A 5717 ************************************************************************************* -0000249A 5718 * -0000249A 5719 * perform INT() -0000249A 5720 -0000249A 5721 LAB_INT -0000249A 70A0 5722 MOVEQ #$A0,d0 * set for no floating bits -0000249C 902B 0DF8 5723 SUB.b FAC1_e(a3),d0 * subtract FAC1 exponent -000024A0 6310 5724 BLS.s LAB_IRTS * exit if exponent >= $A0 -000024A2 5725 * (too big for fraction part!) -000024A2 5726 -000024A2 B03C 0020 5727 CMP.b #$20,d0 * compare with minimum result for integer -000024A6 6400 025E 5728 BCC LAB_POZE * if >= minimum go return 0 -000024AA 5729 * (too small for integer part!) -000024AA 5730 -000024AA 72FF 5731 MOVEQ #-1,d1 * set integer mask -000024AC E1A1 5732 ASL.l d0,d1 * shift mask [8+2*d0] -000024AE C3AB 0DF4 5733 AND.l d1,FAC1_m(a3) * mask mantissa -000024B2 5734 LAB_IRTS -000024B2 4E75 5735 RTS -000024B4 5736 -000024B4 5737 -000024B4 5738 ************************************************************************************* -000024B4 5739 * -000024B4 5740 * print " in line [LINE #]" -000024B4 5741 -000024B4 5742 LAB_2953 -000024B4 41FA 17FA 5743 LEA LAB_LMSG(pc),a0 * point to " in line " message -000024B8 6100 ED24 5744 BSR LAB_18C3 * print null terminated string -000024BC 5745 -000024BC 5746 * Print Basic line # -000024BC 202B 0CB6 5747 MOVE.l Clinel(a3),d0 * get current line -000024C0 5748 -000024C0 5749 -000024C0 5750 ************************************************************************************* -000024C0 5751 * -000024C0 5752 * print d0 as unsigned integer -000024C0 5753 -000024C0 5754 LAB_295E -000024C0 43FA 0DE8 5755 LEA Bin2dec(pc),a1 * get table address -000024C4 7200 5756 MOVEQ #0,d1 * table index -000024C6 41EB 0E30 5757 LEA Usdss(a3),a0 * output string start -000024CA 2401 5758 MOVE.l d1,d2 * output string index -000024CC 5759 LAB_2967 -000024CC 2631 1000 5760 MOVE.l (a1,d1.w),d3 * get table value -000024D0 6714 5761 BEQ.s LAB_2969 * exit if end marker -000024D2 5762 -000024D2 782F 5763 MOVEQ #'0'-1,d4 * set character to "0"-1 -000024D4 5764 LAB_2968 -000024D4 5244 5765 ADDQ.w #1,d4 * next numeric character -000024D6 9083 5766 SUB.l d3,d0 * subtract table value -000024D8 6AFA 5767 BPL.s LAB_2968 * not overdone so loop -000024DA 5768 -000024DA D083 5769 ADD.l d3,d0 * correct value -000024DC 1184 2000 5770 MOVE.b d4,(a0,d2.w) * character out to string -000024E0 5841 5771 ADDQ.w #4,d1 * increment table pointer -000024E2 5242 5772 ADDQ.w #1,d2 * increment output string pointer -000024E4 60E6 5773 BRA.s LAB_2967 * loop -000024E6 5774 -000024E6 5775 LAB_2969 -000024E6 0600 0030 5776 ADD.b #'0',d0 * make last character -000024EA 1180 2000 5777 MOVE.b d0,(a0,d2.w) * character out to string -000024EE 5348 5778 SUBQ.w #1,a0 * decrement a0 (allow simple loop) -000024F0 5779 -000024F0 5780 * now find non zero start of string -000024F0 5781 LAB_296A -000024F0 5248 5782 ADDQ.w #1,a0 * increment a0 (this will never carry to b16) -000024F2 43EB 0E39 5783 LEA BHsend-1(a3),a1 * get string end -000024F6 B1C9 5784 CMPA.l a1,a0 * are we at end -000024F8 6700 ECE4 5785 BEQ LAB_18C3 * if so print null terminated string and RETURN -000024FC 5786 -000024FC 0C10 0030 5787 CMPI.b #'0',(a0) * is character "0" ? -00002500 67EE 5788 BEQ.s LAB_296A * loop if so -00002502 5789 -00002502 6000 ECDA 5790 BRA LAB_18C3 * print null terminated string from memory & RET -00002506 5791 -00002506 5792 -00002506 5793 ************************************************************************************* -00002506 5794 * -00002506 5795 * convert FAC1 to ASCII string result in (a0) -00002506 5796 * STR$() function enters here +00002452 5659 LAB_2828 +00002452 65B8 5660 BCS.s LAB_27D0 * if FAC1 > FAC2 return d0=-1,C=1/-ve d0=+1, +00002454 5661 * C=0/+ve +00002454 5662 +00002454 0A00 0080 5663 EORI.b #$80,d0 * else toggle FAC1 sign +00002458 5664 LAB_282E +00002458 60B2 5665 BRA.s LAB_27D0 * return d0=-1,C=1/-ve d0=+1,C=0/+ve +0000245A 5666 +0000245A 5667 LAB_282F +0000245A 7000 5668 MOVEQ #0,d0 * clear result +0000245C 4E75 5669 RTS +0000245E 5670 +0000245E 5671 +0000245E 5672 ************************************************************************************* +0000245E 5673 * +0000245E 5674 * convert FAC1 floating to fixed +0000245E 5675 * result in d0 and Itemp, sets flags correctly +0000245E 5676 +0000245E 5677 LAB_2831 +0000245E 202B 0590 5678 MOVE.l FAC1_m(a3),d0 * copy mantissa +00002462 6730 5679 BEQ.s LAB_284J * branch if mantissa = 0 +00002464 5680 +00002464 2F01 5681 MOVE.l d1,-(sp) * save d1 +00002466 72A0 5682 MOVEQ #$A0,d1 * set for no floating bits +00002468 922B 0594 5683 SUB.b FAC1_e(a3),d1 * subtract FAC1 exponent +0000246C 6500 E4EC 5684 BCS LAB_OFER * do overflow if too big +00002470 5685 +00002470 660E 5686 BNE.s LAB_284G * branch if exponent was not $A0 +00002472 5687 +00002472 4A2B 0595 5688 TST.b FAC1_s(a3) * test FAC1 sign +00002476 6A1A 5689 BPL.s LAB_284H * branch if FAC1 +ve +00002478 5690 +00002478 4480 5691 NEG.l d0 +0000247A 6916 5692 BVS.s LAB_284H * branch if was $80000000 +0000247C 5693 +0000247C 6000 E4DC 5694 BRA LAB_OFER * do overflow if too big +00002480 5695 +00002480 5696 LAB_284G +00002480 B23C 0020 5697 CMP.b #$20,d1 * compare with minimum result for integer +00002484 6502 5698 BCS.s LAB_284L * if < minimum just do shift +00002486 5699 +00002486 7000 5700 MOVEQ #0,d0 * else return zero +00002488 5701 LAB_284L +00002488 E2A8 5702 LSR.l d1,d0 * shift integer +0000248A 5703 +0000248A 4A2B 0595 5704 TST.b FAC1_s(a3) * test FAC1 sign (b7) +0000248E 6A02 5705 BPL.s LAB_284H * branch if FAC1 +ve +00002490 5706 +00002490 4480 5707 NEG.l d0 * negate integer value +00002492 5708 LAB_284H +00002492 221F 5709 MOVE.l (sp)+,d1 * restore d1 +00002494 5710 LAB_284J +00002494 2740 042A 5711 MOVE.l d0,Itemp(a3) * save result to Itemp +00002498 4E75 5712 RTS +0000249A 5713 +0000249A 5714 +0000249A 5715 ************************************************************************************* +0000249A 5716 * +0000249A 5717 * perform INT() +0000249A 5718 +0000249A 5719 LAB_INT +0000249A 70A0 5720 MOVEQ #$A0,d0 * set for no floating bits +0000249C 902B 0594 5721 SUB.b FAC1_e(a3),d0 * subtract FAC1 exponent +000024A0 6310 5722 BLS.s LAB_IRTS * exit if exponent >= $A0 +000024A2 5723 * (too big for fraction part!) +000024A2 5724 +000024A2 B03C 0020 5725 CMP.b #$20,d0 * compare with minimum result for integer +000024A6 6400 025E 5726 BCC LAB_POZE * if >= minimum go return 0 +000024AA 5727 * (too small for integer part!) +000024AA 5728 +000024AA 72FF 5729 MOVEQ #-1,d1 * set integer mask +000024AC E1A1 5730 ASL.l d0,d1 * shift mask [8+2*d0] +000024AE C3AB 0590 5731 AND.l d1,FAC1_m(a3) * mask mantissa +000024B2 5732 LAB_IRTS +000024B2 4E75 5733 RTS +000024B4 5734 +000024B4 5735 +000024B4 5736 ************************************************************************************* +000024B4 5737 * +000024B4 5738 * print " in line [LINE #]" +000024B4 5739 +000024B4 5740 LAB_2953 +000024B4 41FA 17FA 5741 LEA LAB_LMSG(pc),a0 * point to " in line " message +000024B8 6100 ED24 5742 BSR LAB_18C3 * print null terminated string +000024BC 5743 +000024BC 5744 * Print Basic line # +000024BC 202B 0452 5745 MOVE.l Clinel(a3),d0 * get current line +000024C0 5746 +000024C0 5747 +000024C0 5748 ************************************************************************************* +000024C0 5749 * +000024C0 5750 * print d0 as unsigned integer +000024C0 5751 +000024C0 5752 LAB_295E +000024C0 43FA 0DE8 5753 LEA Bin2dec(pc),a1 * get table address +000024C4 7200 5754 MOVEQ #0,d1 * table index +000024C6 41EB 05CC 5755 LEA Usdss(a3),a0 * output string start +000024CA 2401 5756 MOVE.l d1,d2 * output string index +000024CC 5757 LAB_2967 +000024CC 2631 1000 5758 MOVE.l (a1,d1.w),d3 * get table value +000024D0 6714 5759 BEQ.s LAB_2969 * exit if end marker +000024D2 5760 +000024D2 782F 5761 MOVEQ #'0'-1,d4 * set character to "0"-1 +000024D4 5762 LAB_2968 +000024D4 5244 5763 ADDQ.w #1,d4 * next numeric character +000024D6 9083 5764 SUB.l d3,d0 * subtract table value +000024D8 6AFA 5765 BPL.s LAB_2968 * not overdone so loop +000024DA 5766 +000024DA D083 5767 ADD.l d3,d0 * correct value +000024DC 1184 2000 5768 MOVE.b d4,(a0,d2.w) * character out to string +000024E0 5841 5769 ADDQ.w #4,d1 * increment table pointer +000024E2 5242 5770 ADDQ.w #1,d2 * increment output string pointer +000024E4 60E6 5771 BRA.s LAB_2967 * loop +000024E6 5772 +000024E6 5773 LAB_2969 +000024E6 0600 0030 5774 ADD.b #'0',d0 * make last character +000024EA 1180 2000 5775 MOVE.b d0,(a0,d2.w) * character out to string +000024EE 5348 5776 SUBQ.w #1,a0 * decrement a0 (allow simple loop) +000024F0 5777 +000024F0 5778 * now find non zero start of string +000024F0 5779 LAB_296A +000024F0 5248 5780 ADDQ.w #1,a0 * increment a0 (this will never carry to b16) +000024F2 43EB 05D5 5781 LEA BHsend-1(a3),a1 * get string end +000024F6 B1C9 5782 CMPA.l a1,a0 * are we at end +000024F8 6700 ECE4 5783 BEQ LAB_18C3 * if so print null terminated string and RETURN +000024FC 5784 +000024FC 0C10 0030 5785 CMPI.b #'0',(a0) * is character "0" ? +00002500 67EE 5786 BEQ.s LAB_296A * loop if so +00002502 5787 +00002502 6000 ECDA 5788 BRA LAB_18C3 * print null terminated string from memory & RET +00002506 5789 +00002506 5790 +00002506 5791 ************************************************************************************* +00002506 5792 * +00002506 5793 * convert FAC1 to ASCII string result in (a0) +00002506 5794 * STR$() function enters here +00002506 5795 +00002506 5796 * now outputs 7 significant digits 00002506 5797 -00002506 5798 * now outputs 7 significant digits -00002506 5799 -00002506 5800 * d0 is character out -00002506 5801 * d1 is save index -00002506 5802 * d2 is gash +00002506 5798 * d0 is character out +00002506 5799 * d1 is save index +00002506 5800 * d2 is gash +00002506 5801 +00002506 5802 * a0 is output string pointer 00002506 5803 -00002506 5804 * a0 is output string pointer -00002506 5805 -00002506 5806 LAB_2970 -00002506 43EB 0E2A 5807 LEA Decss(a3),a1 * set output string start -0000250A 5808 -0000250A 7420 5809 MOVEQ #' ',d2 * character = " ", assume +ve -0000250C 08AB 0007 0DF9 5810 BCLR.b #7,FAC1_s(a3) * test and clear FAC1 sign (b7) -00002512 6702 5811 BEQ.s LAB_2978 * branch if +ve -00002514 5812 -00002514 742D 5813 MOVEQ #'-',d2 * else character = "-" -00002516 5814 LAB_2978 -00002516 1282 5815 MOVE.b d2,(a1) * save the sign character -00002518 142B 0DF8 5816 MOVE.b FAC1_e(a3),d2 * get FAC1 exponent -0000251C 6608 5817 BNE.s LAB_2989 * branch if FAC1<>0 -0000251E 5818 -0000251E 5819 * exponent was $00 so FAC1 is 0 -0000251E 7030 5820 MOVEQ #'0',d0 * set character = "0" -00002520 7201 5821 MOVEQ #1,d1 * set output string index -00002522 6000 01A4 5822 BRA LAB_2A89 * save last character, [EOT] & exit -00002526 5823 -00002526 5824 * FAC1 is some non zero value -00002526 5825 LAB_2989 -00002526 177C 0000 0E10 5826 MOVE.b #0,numexp(a3) * clear number exponent count -0000252C B43C 0081 5827 CMP.b #$81,d2 * compare FAC1 exponent with $81 (>1.00000) -00002530 5828 -00002530 6448 5829 BCC.s LAB_299C * branch if FAC1=>1 -00002532 5830 -00002532 5831 * else FAC1 < 1 -00002532 277C 98968000 0DFC 5832 MOVE.l #$98968000,FAC2_m(a3) * 10000000 mantissa -0000253A 377C 9800 0E00 5833 MOVE.w #$9800,FAC2_e(a3) * 10000000 exponent & sign -00002540 176B 0DF9 0E02 5834 MOVE.b FAC1_s(a3),FAC_sc(a3) * make FAC1 sign sign compare -00002546 6100 FCE4 5835 BSR LAB_MULTIPLY * do FAC2*FAC1 -0000254A 5836 -0000254A 177C 00F9 0E10 5837 MOVE.b #$F9,numexp(a3) * set number exponent count (-7) -00002550 6028 5838 BRA.s LAB_299C * go test for fit -00002552 5839 -00002552 5840 LAB_29B9 -00002552 376B 0DF8 0E00 5841 MOVE.w FAC1_e(a3),FAC2_e(a3) * copy exponent & sign from FAC1 to FAC2 -00002558 276B 0DF4 0DFC 5842 MOVE.l FAC1_m(a3),FAC2_m(a3) * copy FAC1 mantissa to FAC2 mantissa -0000255E 176B 0DF9 0E02 5843 MOVE.b FAC1_s(a3),FAC_sc(a3) * save FAC1_s as sign compare -00002564 5844 -00002564 277C CCCCCCCD 0DF4 5845 MOVE.l #$CCCCCCCD,FAC1_m(a3) * 1/10 mantissa -0000256C 377C 7D00 0DF8 5846 MOVE.w #$7D00,FAC1_e(a3) * 1/10 exponent & sign -00002572 6100 FCB8 5847 BSR LAB_MULTIPLY * do FAC2*FAC1, effectively divide by 10 but -00002576 5848 * faster -00002576 5849 -00002576 522B 0E10 5850 ADDQ.b #1,numexp(a3) * increment number exponent count -0000257A 5851 LAB_299C -0000257A 277C 98967F70 0DFC 5852 MOVE.l #$98967F70,FAC2_m(a3) * 9999999.4375 mantissa -00002582 377C 9800 0E00 5853 MOVE.w #$9800,FAC2_e(a3) * 9999999.4375 exponent & sign -00002588 5854 * (max before scientific notation) -00002588 6100 014C 5855 BSR LAB_27F0 * fast compare FAC1 with FAC2 -0000258C 5856 * returns d0=+1 C=0 if FAC1 > FAC2 -0000258C 5857 * returns d0= 0 C=0 if FAC1 = FAC2 -0000258C 5858 * returns d0=-1 C=1 if FAC1 < FAC2 -0000258C 62C4 5859 BHI.s LAB_29B9 * go do /10 if FAC1 > 9999999.4375 -0000258E 5860 -0000258E 6750 5861 BEQ.s LAB_29C3 * branch if FAC1 = 9999999.4375 -00002590 5862 -00002590 5863 * FAC1 < 9999999.4375 -00002590 277C F423F800 0DFC 5864 MOVE.l #$F423F800,FAC2_m(a3) * set mantissa for 999999.5 -00002598 377C 9400 0E00 5865 MOVE.w #$9400,FAC2_e(a3) * set exponent for 999999.5 -0000259E 5866 -0000259E 41EB 0DF4 5867 LEA FAC1_m(a3),a0 * set pointer for x10 -000025A2 5868 LAB_29A7 -000025A2 6100 0132 5869 BSR LAB_27F0 * fast compare FAC1 with FAC2 -000025A6 5870 * returns d0=+1 C=0 if FAC1 > FAC2 -000025A6 5871 * returns d0= 0 C=0 if FAC1 = FAC2 -000025A6 5872 * returns d0=-1 C=1 if FAC1 < FAC2 -000025A6 6220 5873 BHI.s LAB_29C0 * branch if FAC1 > 99999.9375,no decimal places -000025A8 5874 -000025A8 5875 * FAC1 <= 999999.5 so do x 10 -000025A8 2010 5876 MOVE.l (a0),d0 * get FAC1 mantissa -000025AA 1228 0004 5877 MOVE.b 4(a0),d1 * get FAC1 exponent -000025AE 2400 5878 MOVE.l d0,d2 * copy it -000025B0 E488 5879 LSR.l #2,d0 * /4 -000025B2 D082 5880 ADD.l d2,d0 * add FAC1 (x1.125) -000025B4 6404 5881 BCC.s LAB_29B7 * branch if no carry -000025B6 5882 -000025B6 E290 5883 ROXR.l #1,d0 * shift carry back in -000025B8 5201 5884 ADDQ.b #1,d1 * increment exponent (never overflows) -000025BA 5885 LAB_29B7 -000025BA 5601 5886 ADDQ.b #3,d1 * correct exponent ( 8 x 1.125 = 10 ) -000025BC 5887 * (never overflows) -000025BC 2080 5888 MOVE.l d0,(a0) * save new mantissa -000025BE 1141 0004 5889 MOVE.b d1,4(a0) * save new exponent -000025C2 532B 0E10 5890 SUBQ.b #1,numexp(a3) * decrement number exponent count -000025C6 60DA 5891 BRA.s LAB_29A7 * go test again -000025C8 5892 -000025C8 5893 * now we have just the digits to do -000025C8 5894 LAB_29C0 -000025C8 277C 80000000 0DFC 5895 MOVE.l #$80000000,FAC2_m(a3) * set mantissa for 0.5 -000025D0 377C 8000 0E00 5896 MOVE.w #$8000,FAC2_e(a3) * set exponent for 0.5 -000025D6 176B 0DF9 0E02 5897 MOVE.b FAC1_s(a3),FAC_sc(a3) * sign compare = sign -000025DC 6100 FAAA 5898 BSR LAB_ADD * add the 0.5 to FAC1 (round FAC1) -000025E0 5899 -000025E0 5900 LAB_29C3 -000025E0 6100 FE7C 5901 BSR LAB_2831 * convert FAC1 floating to fixed -000025E4 5902 * result in d0 and Itemp -000025E4 7401 5903 MOVEQ #$01,d2 * set default digits before dp = 1 -000025E6 102B 0E10 5904 MOVE.b numexp(a3),d0 * get number exponent count -000025EA 5000 5905 ADD.b #8,d0 * allow 7 digits before point -000025EC 6B0C 5906 BMI.s LAB_29D9 * if -ve then 1 digit before dp -000025EE 5907 -000025EE B03C 0009 5908 CMP.b #$09,d0 * d0>=9 if n>=1E7 -000025F2 6406 5909 BCC.s LAB_29D9 * branch if >= $09 -000025F4 5910 -000025F4 5911 * < $08 -000025F4 5300 5912 SUBQ.b #1,d0 * take 1 from digit count -000025F6 1400 5913 MOVE.b d0,d2 * copy byte -000025F8 7002 5914 MOVEQ #$02,d0 * set exponent adjust -000025FA 5915 LAB_29D9 -000025FA 7200 5916 MOVEQ #0,d1 * set output string index -000025FC 5500 5917 SUBQ.b #2,d0 * -2 -000025FE 1740 0E11 5918 MOVE.b d0,expcnt(a3) * save exponent adjust -00002602 1742 0E10 5919 MOVE.b d2,numexp(a3) * save digits before dp count -00002606 1002 5920 MOVE.b d2,d0 * copy digits before dp count -00002608 6702 5921 BEQ.s LAB_29E4 * branch if no digits before dp -0000260A 5922 -0000260A 6A14 5923 BPL.s LAB_29F7 * branch if digits before dp -0000260C 5924 -0000260C 5925 LAB_29E4 -0000260C 5281 5926 ADDQ.l #1,d1 * increment index -0000260E 13BC 002E 1000 5927 MOVE.b #'.',(a1,d1.w) * save to output string -00002614 5928 -00002614 4A02 5929 TST.b d2 * test digits before dp count -00002616 6708 5930 BEQ.s LAB_29F7 * branch if no digits before dp -00002618 5931 -00002618 5281 5932 ADDQ.l #1,d1 * increment index -0000261A 13BC 0030 1000 5933 MOVE.b #'0',(a1,d1.w) * save to output string -00002620 5934 LAB_29F7 -00002620 7400 5935 MOVEQ #0,d2 * clear index (point to 1,000,000) -00002622 7080 5936 MOVEQ #$80-$100,d0 * set output character -00002624 5937 LAB_29FB -00002624 41FA 111E 5938 LEA LAB_2A9A(pc),a0 * get base of table -00002628 2630 2000 5939 MOVE.l (a0,d2.w),d3 * get table value -0000262C 5940 LAB_29FD -0000262C 5200 5941 ADDQ.b #1,d0 * increment output character -0000262E D7AB 0C8E 5942 ADD.l d3,Itemp(a3) * add to (now fixed) mantissa -00002632 0800 0007 5943 BTST #7,d0 * set test sense (z flag only) -00002636 6504 5944 BCS.s LAB_2A18 * did carry so has wrapped past zero -00002638 5945 -00002638 67F2 5946 BEQ.s LAB_29FD * no wrap and +ve test so try again -0000263A 5947 -0000263A 6002 5948 BRA.s LAB_2A1A * found this digit -0000263C 5949 -0000263C 5950 LAB_2A18 -0000263C 66EE 5951 BNE.s LAB_29FD * wrap and -ve test so try again -0000263E 5952 -0000263E 5953 LAB_2A1A -0000263E 6406 5954 BCC.s LAB_2A21 * branch if +ve test result -00002640 5955 -00002640 4400 5956 NEG.b d0 * negate the digit number -00002642 0600 000B 5957 ADD.b #$0B,d0 * and subtract from 11 decimal -00002646 5958 LAB_2A21 -00002646 0600 002F 5959 ADD.b #$2F,d0 * add "0"-1 to result -0000264A 5842 5960 ADDQ.w #4,d2 * increment index to next less power of ten -0000264C 5241 5961 ADDQ.w #1,d1 * increment output string index -0000264E 1600 5962 MOVE.b d0,d3 * copy character to d3 -00002650 C63C 007F 5963 AND.b #$7F,d3 * mask out top bit -00002654 1383 1000 5964 MOVE.b d3,(a1,d1.w) * save to output string -00002658 532B 0E10 5965 SUB.b #1,numexp(a3) * decrement # of characters before the dp -0000265C 6608 5966 BNE.s LAB_2A3B * branch if still characters to do -0000265E 5967 -0000265E 5968 * else output the point -0000265E 5281 5969 ADDQ.l #1,d1 * increment index -00002660 13BC 002E 1000 5970 MOVE.b #'.',(a1,d1.w) * save to output string -00002666 5971 LAB_2A3B -00002666 C03C 0080 5972 AND.b #$80,d0 * mask test sense bit -0000266A 0A00 0080 5973 EORI.b #$80,d0 * invert it -0000266E B43C 001C 5974 CMP.b #LAB_2A9B-LAB_2A9A,d2 * compare table index with max+4 -00002672 66B0 5975 BNE.s LAB_29FB * loop if not max -00002674 5976 -00002674 5977 * now remove trailing zeroes -00002674 5978 LAB_2A4B -00002674 1031 1000 5979 MOVE.b (a1,d1.w),d0 * get character from output string -00002678 5381 5980 SUBQ.l #1,d1 * decrement output string index -0000267A B03C 0030 5981 CMP.b #'0',d0 * compare with "0" -0000267E 67F4 5982 BEQ.s LAB_2A4B * loop until non "0" character found -00002680 5983 -00002680 B03C 002E 5984 CMP.b #'.',d0 * compare with "." -00002684 6702 5985 BEQ.s LAB_2A58 * branch if was dp -00002686 5986 -00002686 5987 * else restore last character -00002686 5281 5988 ADDQ.l #1,d1 * increment output string index -00002688 5989 LAB_2A58 -00002688 13BC 002B 1002 5990 MOVE.b #'+',2(a1,d1.w) * save character "+" to output string -0000268E 4A2B 0E11 5991 TST.b expcnt(a3) * test exponent count -00002692 6738 5992 BEQ.s LAB_2A8C * if zero go set null terminator & exit -00002694 5993 -00002694 5994 * exponent isn't zero so write exponent -00002694 6A0A 5995 BPL.s LAB_2A68 * branch if exponent count +ve -00002696 5996 -00002696 13BC 002D 1002 5997 MOVE.b #'-',2(a1,d1.w) * save character "-" to output string -0000269C 442B 0E11 5998 NEG.b expcnt(a3) * convert -ve to +ve -000026A0 5999 LAB_2A68 -000026A0 13BC 0045 1001 6000 MOVE.b #'E',1(a1,d1.w) * save character "E" to output string -000026A6 142B 0E11 6001 MOVE.b expcnt(a3),d2 * get exponent count -000026AA 702F 6002 MOVEQ #$2F,d0 * one less than "0" character -000026AC 6003 LAB_2A74 -000026AC 5200 6004 ADDQ.b #1,d0 * increment 10's character -000026AE 0402 000A 6005 SUB.b #$0A,d2 * subtract 10 from exponent count -000026B2 64F8 6006 BCC.s LAB_2A74 * loop while still >= 0 -000026B4 6007 -000026B4 0602 003A 6008 ADD.b #$3A,d2 * add character ":", $30+$0A, result is 10-value -000026B8 1380 1003 6009 MOVE.b d0,3(a1,d1.w) * save 10's character to output string -000026BC 1382 1004 6010 MOVE.b d2,4(a1,d1.w) * save 1's character to output string -000026C0 13BC 0000 1005 6011 MOVE.b #0,5(a1,d1.w) * save null terminator after last character -000026C6 600A 6012 BRA.s LAB_2A91 * go set string pointer (a0) and exit -000026C8 6013 -000026C8 6014 LAB_2A89 -000026C8 1380 1000 6015 MOVE.b d0,(a1,d1.w) * save last character to output string -000026CC 6016 LAB_2A8C -000026CC 13BC 0000 1001 6017 MOVE.b #0,1(a1,d1.w) * save null terminator after last character -000026D2 6018 LAB_2A91 -000026D2 2049 6019 MOVEA.l a1,a0 * set result string pointer (a0) -000026D4 4E75 6020 RTS -000026D6 6021 -000026D6 6022 -000026D6 6023 ************************************************************************************* -000026D6 6024 * -000026D6 6025 * fast compare FAC1 with FAC2 -000026D6 6026 * assumes both are +ve and FAC2>0 -000026D6 6027 * returns d0=+1 C=0 if FAC1 > FAC2 -000026D6 6028 * returns d0= 0 C=0 if FAC1 = FAC2 -000026D6 6029 * returns d0=-1 C=1 if FAC1 < FAC2 -000026D6 6030 -000026D6 6031 LAB_27F0 -000026D6 7000 6032 MOVEQ #0,d0 * set for FAC1 = FAC2 -000026D8 122B 0E00 6033 MOVE.b FAC2_e(a3),d1 * get FAC2 exponent -000026DC B22B 0DF8 6034 CMP.b FAC1_e(a3),d1 * compare FAC1 exponent with FAC2 exponent -000026E0 660A 6035 BNE.s LAB_27F1 * branch if different -000026E2 6036 -000026E2 222B 0DFC 6037 MOVE.l FAC2_m(a3),d1 * get FAC2 mantissa -000026E6 B2AB 0DF4 6038 CMP.l FAC1_m(a3),d1 * compare mantissas -000026EA 6708 6039 BEQ.s LAB_27F3 * exit if mantissas equal -000026EC 6040 -000026EC 6041 LAB_27F1 -000026EC 6504 6042 BCS.s LAB_27F2 * if FAC1 > FAC2 return d0=+1,C=0 -000026EE 6043 -000026EE 5380 6044 SUBQ.l #1,d0 * else FAC1 < FAC2 return d0=-1,C=1 -000026F0 4E75 6045 RTS -000026F2 6046 -000026F2 6047 LAB_27F2 -000026F2 5280 6048 ADDQ.l #1,d0 -000026F4 6049 LAB_27F3 -000026F4 4E75 6050 RTS -000026F6 6051 -000026F6 6052 -000026F6 6053 ************************************************************************************* -000026F6 6054 * -000026F6 6055 * make FAC1 = 1 -000026F6 6056 -000026F6 6057 LAB_POON -000026F6 277C 80000000 0DF4 6058 MOVE.l #$80000000,FAC1_m(a3) * 1 mantissa -000026FE 377C 8100 0DF8 6059 MOVE.w #$8100,FAC1_e(a3) * 1 exonent & sign -00002704 4E75 6060 RTS -00002706 6061 -00002706 6062 -00002706 6063 ************************************************************************************* -00002706 6064 * -00002706 6065 * make FAC1 = 0 -00002706 6066 -00002706 6067 LAB_POZE -00002706 7000 6068 MOVEQ #0,d0 * clear longword -00002708 2740 0DF4 6069 MOVE.l d0,FAC1_m(a3) * 0 mantissa -0000270C 3740 0DF8 6070 MOVE.w d0,FAC1_e(a3) * 0 exonent & sign -00002710 4E75 6071 RTS -00002712 6072 -00002712 6073 -00002712 6074 ************************************************************************************* -00002712 6075 * -00002712 6076 * perform power function -00002712 6077 * the number is in FAC2, the power is in FAC1 -00002712 6078 * no longer trashes Itemp -00002712 6079 -00002712 6080 LAB_POWER -00002712 4A2B 0DF8 6081 TST.b FAC1_e(a3) * test power -00002716 67DE 6082 BEQ.s LAB_POON * if zero go return 1 -00002718 6083 -00002718 4A2B 0E00 6084 TST.b FAC2_e(a3) * test number -0000271C 67E8 6085 BEQ.s LAB_POZE * if zero go return 0 -0000271E 6086 -0000271E 1F2B 0E01 6087 MOVE.b FAC2_s(a3),-(sp) * save number sign -00002722 6A20 6088 BPL.s LAB_POWP * power of positive number -00002724 6089 -00002724 7200 6090 MOVEQ #0,d1 * clear d1 -00002726 1741 0E01 6091 MOVE.b d1,FAC2_s(a3) * make sign +ve -0000272A 6092 -0000272A 6093 * number sign was -ve and can only be raised to -0000272A 6094 * an integer power which gives an x +j0 result, -0000272A 6095 * else do 'function call' error -0000272A 122B 0DF8 6096 MOVE.b FAC1_e(a3),d1 * get power exponent -0000272E 0441 0080 6097 SUB.w #$80,d1 * normalise to .5 -00002732 6300 E22A 6098 BLS LAB_FCER * if 0INT(power) then do 'function call' -00002740 6104 * error -00002740 6105 -00002740 6502 6106 BCS.s LAB_POWP * if integer value odd then leave result -ve -00002742 6107 -00002742 1E80 6108 MOVE.b d0,(sp) * save result sign +ve -00002744 6109 LAB_POWP -00002744 2F2B 0DF4 6110 MOVE.l FAC1_m(a3),-(sp) * save power mantissa -00002748 3F2B 0DF8 6111 MOVE.w FAC1_e(a3),-(sp) * save power sign & exponent -0000274C 6112 -0000274C 6100 FC78 6113 BSR LAB_279B * copy number to FAC1 -00002750 6100 F9E8 6114 BSR LAB_LOG * find log of number -00002754 6115 -00002754 301F 6116 MOVE.w (sp)+,d0 * get power sign & exponent -00002756 275F 0DFC 6117 MOVE.l (sp)+,FAC2_m(a3) * get power mantissa -0000275A 3740 0E00 6118 MOVE.w d0,FAC2_e(a3) * save sign & exponent to FAC2 -0000275E 1740 0E02 6119 MOVE.b d0,FAC_sc(a3) * save sign as sign compare -00002762 102B 0DF9 6120 MOVE.b FAC1_s(a3),d0 * get FAC1 sign -00002766 B12B 0E02 6121 EOR.b d0,FAC_sc(a3) * make sign compare (FAC1_s EOR FAC2_s) -0000276A 6122 -0000276A 6100 FAC0 6123 BSR LAB_MULTIPLY * multiply by power -0000276E 6158 6124 BSR.s LAB_EXP * find exponential -00002770 175F 0DF9 6125 MOVE.b (sp)+,FAC1_s(a3) * restore number sign -00002774 4E75 6126 RTS -00002776 6127 -00002776 6128 -00002776 6129 ************************************************************************************* -00002776 6130 * -00002776 6131 * do - FAC1 -00002776 6132 -00002776 6133 LAB_GTHAN -00002776 4A2B 0DF8 6134 TST.b FAC1_e(a3) * test for non zero FAC1 -0000277A 6706 6135 BEQ.s RTS_020 * branch if null -0000277C 6136 -0000277C 0A2B 0080 0DF9 6137 EORI.b #$80,FAC1_s(a3) * (else) toggle FAC1 sign bit -00002782 6138 RTS_020 -00002782 4E75 6139 RTS -00002784 6140 -00002784 6141 -00002784 6142 ************************************************************************************* -00002784 6143 * -00002784 6144 * return +1 -00002784 6145 LAB_EX1 -00002784 277C 80000000 0DF4 6146 MOVE.l #$80000000,FAC1_m(a3) * +1 mantissa -0000278C 377C 8100 0DF8 6147 MOVE.w #$8100,FAC1_e(a3) * +1 sign & exponent -00002792 4E75 6148 RTS -00002794 6149 * do over/under flow -00002794 6150 LAB_EXOU -00002794 4A2B 0DF9 6151 TST.b FAC1_s(a3) * test sign -00002798 6A00 E1C0 6152 BPL LAB_OFER * was +ve so do overflow error -0000279C 6153 -0000279C 6154 * else underflow so return zero -0000279C 7000 6155 MOVEQ #0,d0 * clear longword -0000279E 2740 0DF4 6156 MOVE.l d0,FAC1_m(a3) * 0 mantissa -000027A2 3740 0DF8 6157 MOVE.w d0,FAC1_e(a3) * 0 sign & exponent -000027A6 4E75 6158 RTS -000027A8 6159 * fraction was zero so do 2^n -000027A8 6160 LAB_EXOF -000027A8 277C 80000000 0DF4 6161 MOVE.l #$80000000,FAC1_m(a3) * +n mantissa -000027B0 177C 0000 0DF9 6162 MOVE.b #0,FAC1_s(a3) * clear sign -000027B6 4A2B 0E18 6163 TST.b cosout(a3) * test sign flag -000027BA 6A02 6164 BPL.s LAB_EXOL * branch if +ve -000027BC 6165 -000027BC 4481 6166 NEG.l d1 * else do 1/2^n -000027BE 6167 LAB_EXOL -000027BE 0601 0081 6168 ADD.b #$81,d1 * adjust exponent -000027C2 1741 0DF8 6169 MOVE.b d1,FAC1_e(a3) * save exponent -000027C6 4E75 6170 RTS -000027C8 6171 -000027C8 6172 * perform EXP() (x^e) -000027C8 6173 * valid input range is -88 to +88 -000027C8 6174 -000027C8 6175 LAB_EXP -000027C8 102B 0DF8 6176 MOVE.b FAC1_e(a3),d0 * get exponent -000027CC 67B6 6177 BEQ.s LAB_EX1 * return 1 for zero in -000027CE 6178 -000027CE B03C 0064 6179 CMP.b #$64,d0 * compare exponent with min -000027D2 65B0 6180 BCS.s LAB_EX1 * if smaller just return 1 -000027D4 6181 -000027D4 6182 ** MOVEM.l d1-d6/a0,-(sp) * save the registers -000027D4 177C 0000 0E18 6183 MOVE.b #0,cosout(a3) * flag +ve number -000027DA 222B 0DF4 6184 MOVE.l FAC1_m(a3),d1 * get mantissa -000027DE B03C 0087 6185 CMP.b #$87,d0 * compare exponent with max -000027E2 62B0 6186 BHI.s LAB_EXOU * go do over/under flow if greater -000027E4 6187 -000027E4 6608 6188 BNE.s LAB_EXCM * branch if less -000027E6 6189 -000027E6 6190 * else is 2^7 -000027E6 B2BC B00F33C7 6191 CMP.l #$B00F33C7,d1 * compare mantissa with n*2^7 max -000027EC 64A6 6192 BCC.s LAB_EXOU * if => go over/underflow -000027EE 6193 -000027EE 6194 LAB_EXCM -000027EE 4A2B 0DF9 6195 TST.b FAC1_s(a3) * test sign -000027F2 6A0C 6196 BPL.s LAB_EXPS * branch if arg +ve -000027F4 6197 -000027F4 177C 00FF 0E18 6198 MOVE.b #$FF,cosout(a3) * flag -ve number -000027FA 177C 0000 0DF9 6199 MOVE.b #0,FAC1_s(a3) * take absolute value -00002800 6200 LAB_EXPS -00002800 6201 * now do n/LOG(2) -00002800 277C B8AA3B29 0DFC 6202 MOVE.l #$B8AA3B29,FAC2_m(a3) * 1/LOG(2) mantissa -00002808 377C 8100 0E00 6203 MOVE.w #$8100,FAC2_e(a3) * 1/LOG(2) exponent & sign -0000280E 177C 0000 0E02 6204 MOVE.b #0,FAC_sc(a3) * we know they're both +ve -00002814 6100 FA16 6205 BSR LAB_MULTIPLY * effectively divide by log(2) -00002818 6206 -00002818 6207 * max here is +/- 127 -00002818 6208 * now separate integer and fraction -00002818 177C 0000 0E3D 6209 MOVE.b #0,tpower(a3) * clear exponent add byte -0000281E 1A2B 0DF8 6210 MOVE.b FAC1_e(a3),d5 * get exponent -00002822 0405 0080 6211 SUB.b #$80,d5 * normalise -00002826 6324 6212 BLS.s LAB_ESML * branch if < 1 (d5 is 0 or -ve) -00002828 6213 -00002828 6214 * result is > 1 -00002828 202B 0DF4 6215 MOVE.l FAC1_m(a3),d0 * get mantissa -0000282C 2200 6216 MOVE.l d0,d1 * copy it -0000282E 2C05 6217 MOVE.l d5,d6 * copy normalised exponent -00002830 6218 -00002830 4446 6219 NEG.w d6 * make -ve -00002832 0646 0020 6220 ADD.w #32,d6 * is now 32-d6 -00002836 ECA9 6221 LSR.l d6,d1 * just integer bits -00002838 1741 0E3D 6222 MOVE.b d1,tpower(a3) * set exponent add byte -0000283C 6223 -0000283C EBA8 6224 LSL.l d5,d0 * shift out integer bits -0000283E 6700 FF68 6225 BEQ LAB_EXOF * fraction is zero so do 2^n -00002842 6226 -00002842 2740 0DF4 6227 MOVE.l d0,FAC1_m(a3) * fraction to FAC1 -00002846 377C 8000 0DF8 6228 MOVE.w #$8000,FAC1_e(a3) * set exponent & sign -0000284C 6229 -0000284C 6230 * multiple was < 1 -0000284C 6231 LAB_ESML -0000284C 277C B17217F8 0DFC 6232 MOVE.l #$B17217F8,FAC2_m(a3) * LOG(2) mantissa -00002854 377C 8000 0E00 6233 MOVE.w #$8000,FAC2_e(a3) * LOG(2) exponent & sign -0000285A 177C 0000 0E02 6234 MOVE.b #0,FAC_sc(a3) * clear sign compare -00002860 6100 F9CA 6235 BSR LAB_MULTIPLY * multiply by log(2) -00002864 6236 -00002864 202B 0DF4 6237 MOVE.l FAC1_m(a3),d0 * get mantissa -00002868 1A2B 0DF8 6238 MOVE.b FAC1_e(a3),d5 * get exponent -0000286C 0445 0082 6239 SUB.w #$82,d5 * normalise and -2 (result is -1 to -30) -00002870 4445 6240 NEG.w d5 * make +ve -00002872 EAA8 6241 LSR.l d5,d0 * shift for 2 integer bits -00002874 6242 -00002874 6243 * d0 = arg -00002874 6244 * d6 = x, d1 = y -00002874 6245 * d2 = x1, d3 = y1 -00002874 6246 * d4 = shift count -00002874 6247 * d5 = loop count -00002874 6248 * now do cordic set-up -00002874 7200 6249 MOVEQ #0,d1 * y = 0 -00002876 2C3C 26A3D110 6250 MOVE.l #KFCTSEED,d6 * x = 1 with jkh inverse factored out -0000287C 41FA 0D2A 6251 LEA TAB_HTHET(pc),a0 * get pointer to hyperbolic arctan table -00002880 7800 6252 MOVEQ #0,d4 * clear shift count -00002882 6253 -00002882 6254 * cordic loop, shifts 4 and 13 (and 39 -00002882 6255 * if it went that far) need to be repeated -00002882 7A03 6256 MOVEQ #3,d5 * 4 loops -00002884 6136 6257 BSR.s LAB_EXCC * do loops 1 through 4 -00002886 5948 6258 SUBQ.w #4,a0 * do table entry again -00002888 5384 6259 SUBQ.l #1,d4 * do shift count again -0000288A 7A09 6260 MOVEQ #9,d5 * 10 loops -0000288C 612E 6261 BSR.s LAB_EXCC * do loops 4 (again) through 13 -0000288E 5948 6262 SUBQ.w #4,a0 * do table entry again -00002890 5384 6263 SUBQ.l #1,d4 * do shift count again -00002892 7A12 6264 MOVEQ #18,d5 * 19 loops -00002894 6126 6265 BSR.s LAB_EXCC * do loops 13 (again) through 31 -00002896 6266 -00002896 6267 * now get the result -00002896 4A2B 0E18 6268 TST.b cosout(a3) * test sign flag -0000289A 6A06 6269 BPL.s LAB_EXPL * branch if +ve -0000289C 6270 -0000289C 4481 6271 NEG.l d1 * do -y -0000289E 442B 0E3D 6272 NEG.b tpower(a3) * do -exp -000028A2 6273 LAB_EXPL -000028A2 7083 6274 MOVEQ #$83-$100,d0 * set exponent -000028A4 DC81 6275 ADD.l d1,d6 * y = y +/- x -000028A6 6B06 6276 BMI.s LAB_EXRN * branch if result normal -000028A8 6277 -000028A8 6278 LAB_EXNN -000028A8 5380 6279 SUBQ.l #1,d0 * decrement exponent -000028AA DC86 6280 ADD.l d6,d6 * shift mantissa -000028AC 6AFA 6281 BPL.s LAB_EXNN * loop if not normal -000028AE 6282 -000028AE 6283 LAB_EXRN -000028AE 2746 0DF4 6284 MOVE.l d6,FAC1_m(a3) * save exponent result -000028B2 D02B 0E3D 6285 ADD.b tpower(a3),d0 * add integer part -000028B6 1740 0DF8 6286 MOVE.b d0,FAC1_e(a3) * save exponent -000028BA 6287 ** MOVEM.l (sp)+,d1-d6/a0 * restore registers -000028BA 4E75 6288 RTS -000028BC 6289 -000028BC 6290 * cordic loop -000028BC 6291 LAB_EXCC -000028BC 5284 6292 ADDQ.l #1,d4 * increment shift count -000028BE 2406 6293 MOVE.l d6,d2 * x1 = x -000028C0 E8A2 6294 ASR.l d4,d2 * x1 >> n -000028C2 2601 6295 MOVE.l d1,d3 * y1 = y -000028C4 E8A3 6296 ASR.l d4,d3 * y1 >> n -000028C6 4A80 6297 TST.l d0 * test arg -000028C8 6B0C 6298 BMI.s LAB_EXAD * branch if -ve -000028CA 6299 -000028CA D282 6300 ADD.l d2,d1 * y = y + x1 -000028CC DC83 6301 ADD.l d3,d6 * x = x + y1 -000028CE 9098 6302 SUB.l (a0)+,d0 * arg = arg - atnh(a0) -000028D0 51CD FFEA 6303 DBF d5,LAB_EXCC * decrement and loop if not done -000028D4 6304 -000028D4 4E75 6305 RTS -000028D6 6306 -000028D6 6307 LAB_EXAD -000028D6 9282 6308 SUB.l d2,d1 * y = y - x1 -000028D8 9C83 6309 SUB.l d3,d6 * x = x + y1 -000028DA D098 6310 ADD.l (a0)+,d0 * arg = arg + atnh(a0) -000028DC 51CD FFDE 6311 DBF d5,LAB_EXCC * decrement and loop if not done -000028E0 6312 -000028E0 4E75 6313 RTS -000028E2 6314 -000028E2 6315 -000028E2 6316 ************************************************************************************* -000028E2 6317 * -000028E2 6318 * RND(n), 32 bit Galois version. make n=0 for 19th next number in sequence or n<>0 -000028E2 6319 * to get 19th next number in sequence after seed n. This version of the PRNG uses -000028E2 6320 * the Galois method and a sample of 65536 bytes produced gives the following values. -000028E2 6321 -000028E2 6322 * Entropy = 7.997442 bits per byte -000028E2 6323 * Optimum compression would reduce these 65536 bytes by 0 percent -000028E2 6324 -000028E2 6325 * Chi square distribution for 65536 samples is 232.01, and -000028E2 6326 * randomly would exceed this value 75.00 percent of the time -000028E2 6327 -000028E2 6328 * Arithmetic mean value of data bytes is 127.6724, 127.5 would be random -000028E2 6329 * Monte Carlo value for Pi is 3.122871269, error 0.60 percent -000028E2 6330 * Serial correlation coefficient is -0.000370, totally uncorrelated would be 0.0 -000028E2 6331 -000028E2 6332 LAB_RND -000028E2 4A2B 0DF8 6333 TST.b FAC1_e(a3) * get FAC1 exponent -000028E6 6708 6334 BEQ.s NextPRN * do next random number if zero -000028E8 6335 -000028E8 6336 * else get seed into random number store -000028E8 41EB 0E04 6337 LEA PRNlword(a3),a0 * set PRNG pointer -000028EC 6100 FAB2 6338 BSR LAB_2778 * pack FAC1 into (a0) -000028F0 6339 NextPRN -000028F0 72AF 6340 MOVEQ #$AF-$100,d1 * set EOR value -000028F2 7412 6341 MOVEQ #18,d2 * do this 19 times -000028F4 202B 0E04 6342 MOVE.l PRNlword(a3),d0 * get current -000028F8 6343 Ninc0 -000028F8 D080 6344 ADD.l d0,d0 * shift left 1 bit -000028FA 6402 6345 BCC.s Ninc1 * branch if bit 32 not set -000028FC 6346 -000028FC B300 6347 EOR.b d1,d0 * do Galois LFSR feedback -000028FE 6348 Ninc1 -000028FE 51CA FFF8 6349 DBF d2,Ninc0 * loop -00002902 6350 -00002902 2740 0E04 6351 MOVE.l d0,PRNlword(a3) * save back to seed word -00002906 2740 0DF4 6352 MOVE.l d0,FAC1_m(a3) * copy to FAC1 mantissa -0000290A 377C 8000 0DF8 6353 MOVE.w #$8000,FAC1_e(a3) * set the exponent and clear the sign -00002910 6000 F7F2 6354 BRA LAB_24D5 * normalise FAC1 & return -00002914 6355 -00002914 6356 -00002914 6357 ************************************************************************************* -00002914 6358 * -00002914 6359 * cordic TAN(x) routine, TAN(x) = SIN(x)/COS(x) -00002914 6360 * x = angle in radians -00002914 6361 -00002914 6362 LAB_TAN -00002914 6138 6363 BSR.s LAB_SIN * go do SIN/COS cordic compute -00002916 376B 0DF8 0E00 6364 MOVE.w FAC1_e(a3),FAC2_e(a3) * copy exponent & sign from FAC1 to FAC2 -0000291C 276B 0DF4 0DFC 6365 MOVE.l FAC1_m(a3),FAC2_m(a3) * copy FAC1 mantissa to FAC2 mantissa -00002922 2741 0DF4 6366 MOVE.l d1,FAC1_m(a3) * get COS(x) mantissa -00002926 1743 0DF8 6367 MOVE.b d3,FAC1_e(a3) * get COS(x) exponent -0000292A 6700 E02E 6368 BEQ LAB_OFER * do overflow if COS = 0 -0000292E 6369 -0000292E 6100 F7D4 6370 BSR LAB_24D5 * normalise FAC1 -00002932 6000 F984 6371 BRA LAB_DIVIDE * do FAC2/FAC1 and return, FAC_sc set by SIN -00002936 6372 * COS calculation -00002936 6373 -00002936 6374 -00002936 6375 ************************************************************************************* -00002936 6376 * -00002936 6377 * cordic SIN(x), COS(x) routine -00002936 6378 * x = angle in radians -00002936 6379 -00002936 6380 LAB_COS -00002936 277C C90FDAA3 0DFC 6381 MOVE.l #$C90FDAA3,FAC2_m(a3) * pi/2 mantissa (LSB is rounded up so -0000293E 6382 * COS(PI/2)=0) -0000293E 377C 8100 0E00 6383 MOVE.w #$8100,FAC2_e(a3) * pi/2 exponent and sign -00002944 176B 0DF9 0E02 6384 MOVE.b FAC1_s(a3),FAC_sc(a3) * sign = FAC1 sign (b7) -0000294A 6100 F73C 6385 BSR LAB_ADD * add FAC2 to FAC1, adjust for COS(x) -0000294E 6386 -0000294E 6387 -0000294E 6388 ************************************************************************************* -0000294E 6389 * -0000294E 6390 * SIN/COS cordic calculator -0000294E 6391 -0000294E 6392 LAB_SIN -0000294E 177C 0000 0E18 6393 MOVE.b #0,cosout(a3) * set needed result -00002954 6394 -00002954 277C A2F9836F 0DFC 6395 MOVE.l #$A2F9836F,FAC2_m(a3) * 1/pi mantissa (LSB is rounded up so SIN(PI)=0) -0000295C 377C 7F00 0E00 6396 MOVE.w #$7F00,FAC2_e(a3) * 1/pi exponent & sign -00002962 176B 0DF9 0E02 6397 MOVE.b FAC1_s(a3),FAC_sc(a3) * sign = FAC1 sign (b7) -00002968 6100 F8C2 6398 BSR LAB_MULTIPLY * multiply by 1/pi -0000296C 6399 -0000296C 102B 0DF8 6400 MOVE.b FAC1_e(a3),d0 * get FAC1 exponent -00002970 671C 6401 BEQ.s LAB_SCZE * branch if zero -00002972 6402 -00002972 41FA 0B34 6403 LEA TAB_SNCO(pc),a0 * get pointer to constants table -00002976 2C2B 0DF4 6404 MOVE.l FAC1_m(a3),d6 * get FAC1 mantissa -0000297A 5300 6405 SUBQ.b #1,d0 * 2 radians in 360 degrees so /2 -0000297C 6710 6406 BEQ.s LAB_SCZE * branch if zero -0000297E 6407 -0000297E 0400 0080 6408 SUB.b #$80,d0 * normalise exponent -00002982 6B18 6409 BMI.s LAB_SCL0 * branch if < 1 -00002984 6410 -00002984 6411 * X is > 1 -00002984 B03C 0020 6412 CMP.b #$20,d0 * is it >= 2^32 -00002988 6404 6413 BCC.s LAB_SCZE * may as well do zero -0000298A 6414 -0000298A E1AE 6415 LSL.l d0,d6 * shift out integer part bits -0000298C 6618 6416 BNE.s LAB_CORD * if fraction go test quadrant and adjust -0000298E 6417 -0000298E 6418 * else no fraction so do zero -0000298E 6419 LAB_SCZE -0000298E 7481 6420 MOVEQ #$81-$100,d2 * set exponent for 1.0 -00002990 7600 6421 MOVEQ #0,d3 * set exponent for 0.0 -00002992 203C 80000000 6422 MOVE.l #$80000000,d0 * mantissa for 1.0 -00002998 2203 6423 MOVE.l d3,d1 * mantissa for 0.0 -0000299A 6062 6424 BRA.s outloop * go output it -0000299C 6425 -0000299C 6426 * x is < 1 -0000299C 6427 LAB_SCL0 -0000299C 4400 6428 NEG.b d0 * make +ve -0000299E B03C 001E 6429 CMP.b #$1E,d0 * is it <= 2^-30 -000029A2 64EA 6430 BCC.s LAB_SCZE * may as well do zero -000029A4 6431 -000029A4 E0AE 6432 LSR.l d0,d6 * shift out <= 2^-32 bits -000029A6 6433 -000029A6 6434 * cordic calculator, argument in d6 -000029A6 6435 * table pointer in a0, returns in d0-d3 -000029A6 6436 -000029A6 6437 LAB_CORD -000029A6 176B 0DF9 0E02 6438 MOVE.b FAC1_s(a3),FAC_sc(a3) * copy as sign compare for TAN -000029AC DC86 6439 ADD.l d6,d6 * shift 0.5 bit into carry -000029AE 6406 6440 BCC.s LAB_LTPF * branch if less than 0.5 -000029B0 6441 -000029B0 0A2B 00FF 0DF9 6442 EORI.b #$FF,FAC1_s(a3) * toggle result sign -000029B6 6443 LAB_LTPF -000029B6 DC86 6444 ADD.l d6,d6 * shift 0.25 bit into carry -000029B8 640C 6445 BCC.s LAB_LTPT * branch if less than 0.25 -000029BA 6446 -000029BA 0A2B 00FF 0E18 6447 EORI.b #$FF,cosout(a3) * toggle needed result -000029C0 0A2B 00FF 0E02 6448 EORI.b #$FF,FAC_sc(a3) * toggle sign compare for TAN -000029C6 6449 -000029C6 6450 LAB_LTPT -000029C6 E48E 6451 LSR.l #2,d6 * shift the bits back (clear integer bits) -000029C8 67C4 6452 BEQ.s LAB_SCZE * no fraction so go do zero -000029CA 6453 -000029CA 6454 * set start values -000029CA 7A01 6455 MOVEQ #1,d5 * set bit count -000029CC 2028 FFFC 6456 MOVE.l -4(a0),d0 * get multiply constant (1st itteration d0) -000029D0 2200 6457 MOVE.l d0,d1 * 1st itteration d1 -000029D2 9C98 6458 SUB.l (a0)+,d6 * 1st always +ve so do 1st step -000029D4 6008 6459 BRA.s mainloop * jump into routine -000029D6 6460 -000029D6 6461 subloop -000029D6 9C98 6462 SUB.l (a0)+,d6 * z = z - arctan(i)/2pi -000029D8 9083 6463 SUB.l d3,d0 * x = x - y1 -000029DA D282 6464 ADD.l d2,d1 * y = y + x1 -000029DC 6012 6465 BRA.s nexta * back to main loop -000029DE 6466 -000029DE 6467 mainloop -000029DE 2400 6468 MOVE.l d0,d2 * x1 = x -000029E0 EAA2 6469 ASR.l d5,d2 * / (2 ^ i) -000029E2 2601 6470 MOVE.l d1,d3 * y1 = y -000029E4 EAA3 6471 ASR.l d5,d3 * / (2 ^ i) -000029E6 4A86 6472 TST.l d6 * test sign (is 2^0 bit) -000029E8 6AEC 6473 BPL.s subloop * go do subtract if > 1 -000029EA 6474 -000029EA DC98 6475 ADD.l (a0)+,d6 * z = z + arctan(i)/2pi -000029EC D083 6476 ADD.l d3,d0 * x = x + y1 -000029EE 9282 6477 SUB.l d2,d1 * y = y + x1 -000029F0 6478 nexta -000029F0 5285 6479 ADDQ.l #1,d5 * i = i + 1 -000029F2 BABC 0000001E 6480 CMP.l #$1E,d5 * check end condition -000029F8 66E4 6481 BNE.s mainloop * loop if not all done -000029FA 6482 -000029FA 6483 * now untangle output value -000029FA 7481 6484 MOVEQ #$81-$100,d2 * set exponent for 0 to .99 rec. -000029FC 2602 6485 MOVE.l d2,d3 * copy it for cos output -000029FE 6486 outloop -000029FE 4A2B 0E18 6487 TST.b cosout(a3) * did we want cos output? -00002A02 6B04 6488 BMI.s subexit * if so skip -00002A04 6489 -00002A04 C141 6490 EXG d0,d1 * swap SIN and COS mantissas -00002A06 C543 6491 EXG d2,d3 * swap SIN and COS exponents -00002A08 6492 subexit -00002A08 2740 0DF4 6493 MOVE.l d0,FAC1_m(a3) * set result mantissa -00002A0C 1742 0DF8 6494 MOVE.b d2,FAC1_e(a3) * set result exponent -00002A10 6000 F6F2 6495 BRA LAB_24D5 * normalise FAC1 & return +00002506 5804 LAB_2970 +00002506 43EB 05C6 5805 LEA Decss(a3),a1 * set output string start +0000250A 5806 +0000250A 7420 5807 MOVEQ #' ',d2 * character = " ", assume +ve +0000250C 08AB 0007 0595 5808 BCLR.b #7,FAC1_s(a3) * test and clear FAC1 sign (b7) +00002512 6702 5809 BEQ.s LAB_2978 * branch if +ve +00002514 5810 +00002514 742D 5811 MOVEQ #'-',d2 * else character = "-" +00002516 5812 LAB_2978 +00002516 1282 5813 MOVE.b d2,(a1) * save the sign character +00002518 142B 0594 5814 MOVE.b FAC1_e(a3),d2 * get FAC1 exponent +0000251C 6608 5815 BNE.s LAB_2989 * branch if FAC1<>0 +0000251E 5816 +0000251E 5817 * exponent was $00 so FAC1 is 0 +0000251E 7030 5818 MOVEQ #'0',d0 * set character = "0" +00002520 7201 5819 MOVEQ #1,d1 * set output string index +00002522 6000 01A4 5820 BRA LAB_2A89 * save last character, [EOT] & exit +00002526 5821 +00002526 5822 * FAC1 is some non zero value +00002526 5823 LAB_2989 +00002526 177C 0000 05AC 5824 MOVE.b #0,numexp(a3) * clear number exponent count +0000252C B43C 0081 5825 CMP.b #$81,d2 * compare FAC1 exponent with $81 (>1.00000) +00002530 5826 +00002530 6448 5827 BCC.s LAB_299C * branch if FAC1=>1 +00002532 5828 +00002532 5829 * else FAC1 < 1 +00002532 277C 98968000 0598 5830 MOVE.l #$98968000,FAC2_m(a3) * 10000000 mantissa +0000253A 377C 9800 059C 5831 MOVE.w #$9800,FAC2_e(a3) * 10000000 exponent & sign +00002540 176B 0595 059E 5832 MOVE.b FAC1_s(a3),FAC_sc(a3) * make FAC1 sign sign compare +00002546 6100 FCE4 5833 BSR LAB_MULTIPLY * do FAC2*FAC1 +0000254A 5834 +0000254A 177C 00F9 05AC 5835 MOVE.b #$F9,numexp(a3) * set number exponent count (-7) +00002550 6028 5836 BRA.s LAB_299C * go test for fit +00002552 5837 +00002552 5838 LAB_29B9 +00002552 376B 0594 059C 5839 MOVE.w FAC1_e(a3),FAC2_e(a3) * copy exponent & sign from FAC1 to FAC2 +00002558 276B 0590 0598 5840 MOVE.l FAC1_m(a3),FAC2_m(a3) * copy FAC1 mantissa to FAC2 mantissa +0000255E 176B 0595 059E 5841 MOVE.b FAC1_s(a3),FAC_sc(a3) * save FAC1_s as sign compare +00002564 5842 +00002564 277C CCCCCCCD 0590 5843 MOVE.l #$CCCCCCCD,FAC1_m(a3) * 1/10 mantissa +0000256C 377C 7D00 0594 5844 MOVE.w #$7D00,FAC1_e(a3) * 1/10 exponent & sign +00002572 6100 FCB8 5845 BSR LAB_MULTIPLY * do FAC2*FAC1, effectively divide by 10 but +00002576 5846 * faster +00002576 5847 +00002576 522B 05AC 5848 ADDQ.b #1,numexp(a3) * increment number exponent count +0000257A 5849 LAB_299C +0000257A 277C 98967F70 0598 5850 MOVE.l #$98967F70,FAC2_m(a3) * 9999999.4375 mantissa +00002582 377C 9800 059C 5851 MOVE.w #$9800,FAC2_e(a3) * 9999999.4375 exponent & sign +00002588 5852 * (max before scientific notation) +00002588 6100 014C 5853 BSR LAB_27F0 * fast compare FAC1 with FAC2 +0000258C 5854 * returns d0=+1 C=0 if FAC1 > FAC2 +0000258C 5855 * returns d0= 0 C=0 if FAC1 = FAC2 +0000258C 5856 * returns d0=-1 C=1 if FAC1 < FAC2 +0000258C 62C4 5857 BHI.s LAB_29B9 * go do /10 if FAC1 > 9999999.4375 +0000258E 5858 +0000258E 6750 5859 BEQ.s LAB_29C3 * branch if FAC1 = 9999999.4375 +00002590 5860 +00002590 5861 * FAC1 < 9999999.4375 +00002590 277C F423F800 0598 5862 MOVE.l #$F423F800,FAC2_m(a3) * set mantissa for 999999.5 +00002598 377C 9400 059C 5863 MOVE.w #$9400,FAC2_e(a3) * set exponent for 999999.5 +0000259E 5864 +0000259E 41EB 0590 5865 LEA FAC1_m(a3),a0 * set pointer for x10 +000025A2 5866 LAB_29A7 +000025A2 6100 0132 5867 BSR LAB_27F0 * fast compare FAC1 with FAC2 +000025A6 5868 * returns d0=+1 C=0 if FAC1 > FAC2 +000025A6 5869 * returns d0= 0 C=0 if FAC1 = FAC2 +000025A6 5870 * returns d0=-1 C=1 if FAC1 < FAC2 +000025A6 6220 5871 BHI.s LAB_29C0 * branch if FAC1 > 99999.9375,no decimal places +000025A8 5872 +000025A8 5873 * FAC1 <= 999999.5 so do x 10 +000025A8 2010 5874 MOVE.l (a0),d0 * get FAC1 mantissa +000025AA 1228 0004 5875 MOVE.b 4(a0),d1 * get FAC1 exponent +000025AE 2400 5876 MOVE.l d0,d2 * copy it +000025B0 E488 5877 LSR.l #2,d0 * /4 +000025B2 D082 5878 ADD.l d2,d0 * add FAC1 (x1.125) +000025B4 6404 5879 BCC.s LAB_29B7 * branch if no carry +000025B6 5880 +000025B6 E290 5881 ROXR.l #1,d0 * shift carry back in +000025B8 5201 5882 ADDQ.b #1,d1 * increment exponent (never overflows) +000025BA 5883 LAB_29B7 +000025BA 5601 5884 ADDQ.b #3,d1 * correct exponent ( 8 x 1.125 = 10 ) +000025BC 5885 * (never overflows) +000025BC 2080 5886 MOVE.l d0,(a0) * save new mantissa +000025BE 1141 0004 5887 MOVE.b d1,4(a0) * save new exponent +000025C2 532B 05AC 5888 SUBQ.b #1,numexp(a3) * decrement number exponent count +000025C6 60DA 5889 BRA.s LAB_29A7 * go test again +000025C8 5890 +000025C8 5891 * now we have just the digits to do +000025C8 5892 LAB_29C0 +000025C8 277C 80000000 0598 5893 MOVE.l #$80000000,FAC2_m(a3) * set mantissa for 0.5 +000025D0 377C 8000 059C 5894 MOVE.w #$8000,FAC2_e(a3) * set exponent for 0.5 +000025D6 176B 0595 059E 5895 MOVE.b FAC1_s(a3),FAC_sc(a3) * sign compare = sign +000025DC 6100 FAAA 5896 BSR LAB_ADD * add the 0.5 to FAC1 (round FAC1) +000025E0 5897 +000025E0 5898 LAB_29C3 +000025E0 6100 FE7C 5899 BSR LAB_2831 * convert FAC1 floating to fixed +000025E4 5900 * result in d0 and Itemp +000025E4 7401 5901 MOVEQ #$01,d2 * set default digits before dp = 1 +000025E6 102B 05AC 5902 MOVE.b numexp(a3),d0 * get number exponent count +000025EA 5000 5903 ADD.b #8,d0 * allow 7 digits before point +000025EC 6B0C 5904 BMI.s LAB_29D9 * if -ve then 1 digit before dp +000025EE 5905 +000025EE B03C 0009 5906 CMP.b #$09,d0 * d0>=9 if n>=1E7 +000025F2 6406 5907 BCC.s LAB_29D9 * branch if >= $09 +000025F4 5908 +000025F4 5909 * < $08 +000025F4 5300 5910 SUBQ.b #1,d0 * take 1 from digit count +000025F6 1400 5911 MOVE.b d0,d2 * copy byte +000025F8 7002 5912 MOVEQ #$02,d0 * set exponent adjust +000025FA 5913 LAB_29D9 +000025FA 7200 5914 MOVEQ #0,d1 * set output string index +000025FC 5500 5915 SUBQ.b #2,d0 * -2 +000025FE 1740 05AD 5916 MOVE.b d0,expcnt(a3) * save exponent adjust +00002602 1742 05AC 5917 MOVE.b d2,numexp(a3) * save digits before dp count +00002606 1002 5918 MOVE.b d2,d0 * copy digits before dp count +00002608 6702 5919 BEQ.s LAB_29E4 * branch if no digits before dp +0000260A 5920 +0000260A 6A14 5921 BPL.s LAB_29F7 * branch if digits before dp +0000260C 5922 +0000260C 5923 LAB_29E4 +0000260C 5281 5924 ADDQ.l #1,d1 * increment index +0000260E 13BC 002E 1000 5925 MOVE.b #'.',(a1,d1.w) * save to output string +00002614 5926 +00002614 4A02 5927 TST.b d2 * test digits before dp count +00002616 6708 5928 BEQ.s LAB_29F7 * branch if no digits before dp +00002618 5929 +00002618 5281 5930 ADDQ.l #1,d1 * increment index +0000261A 13BC 0030 1000 5931 MOVE.b #'0',(a1,d1.w) * save to output string +00002620 5932 LAB_29F7 +00002620 7400 5933 MOVEQ #0,d2 * clear index (point to 1,000,000) +00002622 7080 5934 MOVEQ #$80-$100,d0 * set output character +00002624 5935 LAB_29FB +00002624 41FA 111E 5936 LEA LAB_2A9A(pc),a0 * get base of table +00002628 2630 2000 5937 MOVE.l (a0,d2.w),d3 * get table value +0000262C 5938 LAB_29FD +0000262C 5200 5939 ADDQ.b #1,d0 * increment output character +0000262E D7AB 042A 5940 ADD.l d3,Itemp(a3) * add to (now fixed) mantissa +00002632 0800 0007 5941 BTST #7,d0 * set test sense (z flag only) +00002636 6504 5942 BCS.s LAB_2A18 * did carry so has wrapped past zero +00002638 5943 +00002638 67F2 5944 BEQ.s LAB_29FD * no wrap and +ve test so try again +0000263A 5945 +0000263A 6002 5946 BRA.s LAB_2A1A * found this digit +0000263C 5947 +0000263C 5948 LAB_2A18 +0000263C 66EE 5949 BNE.s LAB_29FD * wrap and -ve test so try again +0000263E 5950 +0000263E 5951 LAB_2A1A +0000263E 6406 5952 BCC.s LAB_2A21 * branch if +ve test result +00002640 5953 +00002640 4400 5954 NEG.b d0 * negate the digit number +00002642 0600 000B 5955 ADD.b #$0B,d0 * and subtract from 11 decimal +00002646 5956 LAB_2A21 +00002646 0600 002F 5957 ADD.b #$2F,d0 * add "0"-1 to result +0000264A 5842 5958 ADDQ.w #4,d2 * increment index to next less power of ten +0000264C 5241 5959 ADDQ.w #1,d1 * increment output string index +0000264E 1600 5960 MOVE.b d0,d3 * copy character to d3 +00002650 C63C 007F 5961 AND.b #$7F,d3 * mask out top bit +00002654 1383 1000 5962 MOVE.b d3,(a1,d1.w) * save to output string +00002658 532B 05AC 5963 SUB.b #1,numexp(a3) * decrement # of characters before the dp +0000265C 6608 5964 BNE.s LAB_2A3B * branch if still characters to do +0000265E 5965 +0000265E 5966 * else output the point +0000265E 5281 5967 ADDQ.l #1,d1 * increment index +00002660 13BC 002E 1000 5968 MOVE.b #'.',(a1,d1.w) * save to output string +00002666 5969 LAB_2A3B +00002666 C03C 0080 5970 AND.b #$80,d0 * mask test sense bit +0000266A 0A00 0080 5971 EORI.b #$80,d0 * invert it +0000266E B43C 001C 5972 CMP.b #LAB_2A9B-LAB_2A9A,d2 * compare table index with max+4 +00002672 66B0 5973 BNE.s LAB_29FB * loop if not max +00002674 5974 +00002674 5975 * now remove trailing zeroes +00002674 5976 LAB_2A4B +00002674 1031 1000 5977 MOVE.b (a1,d1.w),d0 * get character from output string +00002678 5381 5978 SUBQ.l #1,d1 * decrement output string index +0000267A B03C 0030 5979 CMP.b #'0',d0 * compare with "0" +0000267E 67F4 5980 BEQ.s LAB_2A4B * loop until non "0" character found +00002680 5981 +00002680 B03C 002E 5982 CMP.b #'.',d0 * compare with "." +00002684 6702 5983 BEQ.s LAB_2A58 * branch if was dp +00002686 5984 +00002686 5985 * else restore last character +00002686 5281 5986 ADDQ.l #1,d1 * increment output string index +00002688 5987 LAB_2A58 +00002688 13BC 002B 1002 5988 MOVE.b #'+',2(a1,d1.w) * save character "+" to output string +0000268E 4A2B 05AD 5989 TST.b expcnt(a3) * test exponent count +00002692 6738 5990 BEQ.s LAB_2A8C * if zero go set null terminator & exit +00002694 5991 +00002694 5992 * exponent isn't zero so write exponent +00002694 6A0A 5993 BPL.s LAB_2A68 * branch if exponent count +ve +00002696 5994 +00002696 13BC 002D 1002 5995 MOVE.b #'-',2(a1,d1.w) * save character "-" to output string +0000269C 442B 05AD 5996 NEG.b expcnt(a3) * convert -ve to +ve +000026A0 5997 LAB_2A68 +000026A0 13BC 0045 1001 5998 MOVE.b #'E',1(a1,d1.w) * save character "E" to output string +000026A6 142B 05AD 5999 MOVE.b expcnt(a3),d2 * get exponent count +000026AA 702F 6000 MOVEQ #$2F,d0 * one less than "0" character +000026AC 6001 LAB_2A74 +000026AC 5200 6002 ADDQ.b #1,d0 * increment 10's character +000026AE 0402 000A 6003 SUB.b #$0A,d2 * subtract 10 from exponent count +000026B2 64F8 6004 BCC.s LAB_2A74 * loop while still >= 0 +000026B4 6005 +000026B4 0602 003A 6006 ADD.b #$3A,d2 * add character ":", $30+$0A, result is 10-value +000026B8 1380 1003 6007 MOVE.b d0,3(a1,d1.w) * save 10's character to output string +000026BC 1382 1004 6008 MOVE.b d2,4(a1,d1.w) * save 1's character to output string +000026C0 13BC 0000 1005 6009 MOVE.b #0,5(a1,d1.w) * save null terminator after last character +000026C6 600A 6010 BRA.s LAB_2A91 * go set string pointer (a0) and exit +000026C8 6011 +000026C8 6012 LAB_2A89 +000026C8 1380 1000 6013 MOVE.b d0,(a1,d1.w) * save last character to output string +000026CC 6014 LAB_2A8C +000026CC 13BC 0000 1001 6015 MOVE.b #0,1(a1,d1.w) * save null terminator after last character +000026D2 6016 LAB_2A91 +000026D2 2049 6017 MOVEA.l a1,a0 * set result string pointer (a0) +000026D4 4E75 6018 RTS +000026D6 6019 +000026D6 6020 +000026D6 6021 ************************************************************************************* +000026D6 6022 * +000026D6 6023 * fast compare FAC1 with FAC2 +000026D6 6024 * assumes both are +ve and FAC2>0 +000026D6 6025 * returns d0=+1 C=0 if FAC1 > FAC2 +000026D6 6026 * returns d0= 0 C=0 if FAC1 = FAC2 +000026D6 6027 * returns d0=-1 C=1 if FAC1 < FAC2 +000026D6 6028 +000026D6 6029 LAB_27F0 +000026D6 7000 6030 MOVEQ #0,d0 * set for FAC1 = FAC2 +000026D8 122B 059C 6031 MOVE.b FAC2_e(a3),d1 * get FAC2 exponent +000026DC B22B 0594 6032 CMP.b FAC1_e(a3),d1 * compare FAC1 exponent with FAC2 exponent +000026E0 660A 6033 BNE.s LAB_27F1 * branch if different +000026E2 6034 +000026E2 222B 0598 6035 MOVE.l FAC2_m(a3),d1 * get FAC2 mantissa +000026E6 B2AB 0590 6036 CMP.l FAC1_m(a3),d1 * compare mantissas +000026EA 6708 6037 BEQ.s LAB_27F3 * exit if mantissas equal +000026EC 6038 +000026EC 6039 LAB_27F1 +000026EC 6504 6040 BCS.s LAB_27F2 * if FAC1 > FAC2 return d0=+1,C=0 +000026EE 6041 +000026EE 5380 6042 SUBQ.l #1,d0 * else FAC1 < FAC2 return d0=-1,C=1 +000026F0 4E75 6043 RTS +000026F2 6044 +000026F2 6045 LAB_27F2 +000026F2 5280 6046 ADDQ.l #1,d0 +000026F4 6047 LAB_27F3 +000026F4 4E75 6048 RTS +000026F6 6049 +000026F6 6050 +000026F6 6051 ************************************************************************************* +000026F6 6052 * +000026F6 6053 * make FAC1 = 1 +000026F6 6054 +000026F6 6055 LAB_POON +000026F6 277C 80000000 0590 6056 MOVE.l #$80000000,FAC1_m(a3) * 1 mantissa +000026FE 377C 8100 0594 6057 MOVE.w #$8100,FAC1_e(a3) * 1 exonent & sign +00002704 4E75 6058 RTS +00002706 6059 +00002706 6060 +00002706 6061 ************************************************************************************* +00002706 6062 * +00002706 6063 * make FAC1 = 0 +00002706 6064 +00002706 6065 LAB_POZE +00002706 7000 6066 MOVEQ #0,d0 * clear longword +00002708 2740 0590 6067 MOVE.l d0,FAC1_m(a3) * 0 mantissa +0000270C 3740 0594 6068 MOVE.w d0,FAC1_e(a3) * 0 exonent & sign +00002710 4E75 6069 RTS +00002712 6070 +00002712 6071 +00002712 6072 ************************************************************************************* +00002712 6073 * +00002712 6074 * perform power function +00002712 6075 * the number is in FAC2, the power is in FAC1 +00002712 6076 * no longer trashes Itemp +00002712 6077 +00002712 6078 LAB_POWER +00002712 4A2B 0594 6079 TST.b FAC1_e(a3) * test power +00002716 67DE 6080 BEQ.s LAB_POON * if zero go return 1 +00002718 6081 +00002718 4A2B 059C 6082 TST.b FAC2_e(a3) * test number +0000271C 67E8 6083 BEQ.s LAB_POZE * if zero go return 0 +0000271E 6084 +0000271E 1F2B 059D 6085 MOVE.b FAC2_s(a3),-(sp) * save number sign +00002722 6A20 6086 BPL.s LAB_POWP * power of positive number +00002724 6087 +00002724 7200 6088 MOVEQ #0,d1 * clear d1 +00002726 1741 059D 6089 MOVE.b d1,FAC2_s(a3) * make sign +ve +0000272A 6090 +0000272A 6091 * number sign was -ve and can only be raised to +0000272A 6092 * an integer power which gives an x +j0 result, +0000272A 6093 * else do 'function call' error +0000272A 122B 0594 6094 MOVE.b FAC1_e(a3),d1 * get power exponent +0000272E 0441 0080 6095 SUB.w #$80,d1 * normalise to .5 +00002732 6300 E22A 6096 BLS LAB_FCER * if 0INT(power) then do 'function call' +00002740 6102 * error +00002740 6103 +00002740 6502 6104 BCS.s LAB_POWP * if integer value odd then leave result -ve +00002742 6105 +00002742 1E80 6106 MOVE.b d0,(sp) * save result sign +ve +00002744 6107 LAB_POWP +00002744 2F2B 0590 6108 MOVE.l FAC1_m(a3),-(sp) * save power mantissa +00002748 3F2B 0594 6109 MOVE.w FAC1_e(a3),-(sp) * save power sign & exponent +0000274C 6110 +0000274C 6100 FC78 6111 BSR LAB_279B * copy number to FAC1 +00002750 6100 F9E8 6112 BSR LAB_LOG * find log of number +00002754 6113 +00002754 301F 6114 MOVE.w (sp)+,d0 * get power sign & exponent +00002756 275F 0598 6115 MOVE.l (sp)+,FAC2_m(a3) * get power mantissa +0000275A 3740 059C 6116 MOVE.w d0,FAC2_e(a3) * save sign & exponent to FAC2 +0000275E 1740 059E 6117 MOVE.b d0,FAC_sc(a3) * save sign as sign compare +00002762 102B 0595 6118 MOVE.b FAC1_s(a3),d0 * get FAC1 sign +00002766 B12B 059E 6119 EOR.b d0,FAC_sc(a3) * make sign compare (FAC1_s EOR FAC2_s) +0000276A 6120 +0000276A 6100 FAC0 6121 BSR LAB_MULTIPLY * multiply by power +0000276E 6158 6122 BSR.s LAB_EXP * find exponential +00002770 175F 0595 6123 MOVE.b (sp)+,FAC1_s(a3) * restore number sign +00002774 4E75 6124 RTS +00002776 6125 +00002776 6126 +00002776 6127 ************************************************************************************* +00002776 6128 * +00002776 6129 * do - FAC1 +00002776 6130 +00002776 6131 LAB_GTHAN +00002776 4A2B 0594 6132 TST.b FAC1_e(a3) * test for non zero FAC1 +0000277A 6706 6133 BEQ.s RTS_020 * branch if null +0000277C 6134 +0000277C 0A2B 0080 0595 6135 EORI.b #$80,FAC1_s(a3) * (else) toggle FAC1 sign bit +00002782 6136 RTS_020 +00002782 4E75 6137 RTS +00002784 6138 +00002784 6139 +00002784 6140 ************************************************************************************* +00002784 6141 * +00002784 6142 * return +1 +00002784 6143 LAB_EX1 +00002784 277C 80000000 0590 6144 MOVE.l #$80000000,FAC1_m(a3) * +1 mantissa +0000278C 377C 8100 0594 6145 MOVE.w #$8100,FAC1_e(a3) * +1 sign & exponent +00002792 4E75 6146 RTS +00002794 6147 * do over/under flow +00002794 6148 LAB_EXOU +00002794 4A2B 0595 6149 TST.b FAC1_s(a3) * test sign +00002798 6A00 E1C0 6150 BPL LAB_OFER * was +ve so do overflow error +0000279C 6151 +0000279C 6152 * else underflow so return zero +0000279C 7000 6153 MOVEQ #0,d0 * clear longword +0000279E 2740 0590 6154 MOVE.l d0,FAC1_m(a3) * 0 mantissa +000027A2 3740 0594 6155 MOVE.w d0,FAC1_e(a3) * 0 sign & exponent +000027A6 4E75 6156 RTS +000027A8 6157 * fraction was zero so do 2^n +000027A8 6158 LAB_EXOF +000027A8 277C 80000000 0590 6159 MOVE.l #$80000000,FAC1_m(a3) * +n mantissa +000027B0 177C 0000 0595 6160 MOVE.b #0,FAC1_s(a3) * clear sign +000027B6 4A2B 05B4 6161 TST.b cosout(a3) * test sign flag +000027BA 6A02 6162 BPL.s LAB_EXOL * branch if +ve +000027BC 6163 +000027BC 4481 6164 NEG.l d1 * else do 1/2^n +000027BE 6165 LAB_EXOL +000027BE 0601 0081 6166 ADD.b #$81,d1 * adjust exponent +000027C2 1741 0594 6167 MOVE.b d1,FAC1_e(a3) * save exponent +000027C6 4E75 6168 RTS +000027C8 6169 +000027C8 6170 * perform EXP() (x^e) +000027C8 6171 * valid input range is -88 to +88 +000027C8 6172 +000027C8 6173 LAB_EXP +000027C8 102B 0594 6174 MOVE.b FAC1_e(a3),d0 * get exponent +000027CC 67B6 6175 BEQ.s LAB_EX1 * return 1 for zero in +000027CE 6176 +000027CE B03C 0064 6177 CMP.b #$64,d0 * compare exponent with min +000027D2 65B0 6178 BCS.s LAB_EX1 * if smaller just return 1 +000027D4 6179 +000027D4 6180 ** MOVEM.l d1-d6/a0,-(sp) * save the registers +000027D4 177C 0000 05B4 6181 MOVE.b #0,cosout(a3) * flag +ve number +000027DA 222B 0590 6182 MOVE.l FAC1_m(a3),d1 * get mantissa +000027DE B03C 0087 6183 CMP.b #$87,d0 * compare exponent with max +000027E2 62B0 6184 BHI.s LAB_EXOU * go do over/under flow if greater +000027E4 6185 +000027E4 6608 6186 BNE.s LAB_EXCM * branch if less +000027E6 6187 +000027E6 6188 * else is 2^7 +000027E6 B2BC B00F33C7 6189 CMP.l #$B00F33C7,d1 * compare mantissa with n*2^7 max +000027EC 64A6 6190 BCC.s LAB_EXOU * if => go over/underflow +000027EE 6191 +000027EE 6192 LAB_EXCM +000027EE 4A2B 0595 6193 TST.b FAC1_s(a3) * test sign +000027F2 6A0C 6194 BPL.s LAB_EXPS * branch if arg +ve +000027F4 6195 +000027F4 177C 00FF 05B4 6196 MOVE.b #$FF,cosout(a3) * flag -ve number +000027FA 177C 0000 0595 6197 MOVE.b #0,FAC1_s(a3) * take absolute value +00002800 6198 LAB_EXPS +00002800 6199 * now do n/LOG(2) +00002800 277C B8AA3B29 0598 6200 MOVE.l #$B8AA3B29,FAC2_m(a3) * 1/LOG(2) mantissa +00002808 377C 8100 059C 6201 MOVE.w #$8100,FAC2_e(a3) * 1/LOG(2) exponent & sign +0000280E 177C 0000 059E 6202 MOVE.b #0,FAC_sc(a3) * we know they're both +ve +00002814 6100 FA16 6203 BSR LAB_MULTIPLY * effectively divide by log(2) +00002818 6204 +00002818 6205 * max here is +/- 127 +00002818 6206 * now separate integer and fraction +00002818 177C 0000 05D9 6207 MOVE.b #0,tpower(a3) * clear exponent add byte +0000281E 1A2B 0594 6208 MOVE.b FAC1_e(a3),d5 * get exponent +00002822 0405 0080 6209 SUB.b #$80,d5 * normalise +00002826 6324 6210 BLS.s LAB_ESML * branch if < 1 (d5 is 0 or -ve) +00002828 6211 +00002828 6212 * result is > 1 +00002828 202B 0590 6213 MOVE.l FAC1_m(a3),d0 * get mantissa +0000282C 2200 6214 MOVE.l d0,d1 * copy it +0000282E 2C05 6215 MOVE.l d5,d6 * copy normalised exponent +00002830 6216 +00002830 4446 6217 NEG.w d6 * make -ve +00002832 0646 0020 6218 ADD.w #32,d6 * is now 32-d6 +00002836 ECA9 6219 LSR.l d6,d1 * just integer bits +00002838 1741 05D9 6220 MOVE.b d1,tpower(a3) * set exponent add byte +0000283C 6221 +0000283C EBA8 6222 LSL.l d5,d0 * shift out integer bits +0000283E 6700 FF68 6223 BEQ LAB_EXOF * fraction is zero so do 2^n +00002842 6224 +00002842 2740 0590 6225 MOVE.l d0,FAC1_m(a3) * fraction to FAC1 +00002846 377C 8000 0594 6226 MOVE.w #$8000,FAC1_e(a3) * set exponent & sign +0000284C 6227 +0000284C 6228 * multiple was < 1 +0000284C 6229 LAB_ESML +0000284C 277C B17217F8 0598 6230 MOVE.l #$B17217F8,FAC2_m(a3) * LOG(2) mantissa +00002854 377C 8000 059C 6231 MOVE.w #$8000,FAC2_e(a3) * LOG(2) exponent & sign +0000285A 177C 0000 059E 6232 MOVE.b #0,FAC_sc(a3) * clear sign compare +00002860 6100 F9CA 6233 BSR LAB_MULTIPLY * multiply by log(2) +00002864 6234 +00002864 202B 0590 6235 MOVE.l FAC1_m(a3),d0 * get mantissa +00002868 1A2B 0594 6236 MOVE.b FAC1_e(a3),d5 * get exponent +0000286C 0445 0082 6237 SUB.w #$82,d5 * normalise and -2 (result is -1 to -30) +00002870 4445 6238 NEG.w d5 * make +ve +00002872 EAA8 6239 LSR.l d5,d0 * shift for 2 integer bits +00002874 6240 +00002874 6241 * d0 = arg +00002874 6242 * d6 = x, d1 = y +00002874 6243 * d2 = x1, d3 = y1 +00002874 6244 * d4 = shift count +00002874 6245 * d5 = loop count +00002874 6246 * now do cordic set-up +00002874 7200 6247 MOVEQ #0,d1 * y = 0 +00002876 2C3C 26A3D110 6248 MOVE.l #KFCTSEED,d6 * x = 1 with jkh inverse factored out +0000287C 41FA 0D2A 6249 LEA TAB_HTHET(pc),a0 * get pointer to hyperbolic arctan table +00002880 7800 6250 MOVEQ #0,d4 * clear shift count +00002882 6251 +00002882 6252 * cordic loop, shifts 4 and 13 (and 39 +00002882 6253 * if it went that far) need to be repeated +00002882 7A03 6254 MOVEQ #3,d5 * 4 loops +00002884 6136 6255 BSR.s LAB_EXCC * do loops 1 through 4 +00002886 5948 6256 SUBQ.w #4,a0 * do table entry again +00002888 5384 6257 SUBQ.l #1,d4 * do shift count again +0000288A 7A09 6258 MOVEQ #9,d5 * 10 loops +0000288C 612E 6259 BSR.s LAB_EXCC * do loops 4 (again) through 13 +0000288E 5948 6260 SUBQ.w #4,a0 * do table entry again +00002890 5384 6261 SUBQ.l #1,d4 * do shift count again +00002892 7A12 6262 MOVEQ #18,d5 * 19 loops +00002894 6126 6263 BSR.s LAB_EXCC * do loops 13 (again) through 31 +00002896 6264 +00002896 6265 * now get the result +00002896 4A2B 05B4 6266 TST.b cosout(a3) * test sign flag +0000289A 6A06 6267 BPL.s LAB_EXPL * branch if +ve +0000289C 6268 +0000289C 4481 6269 NEG.l d1 * do -y +0000289E 442B 05D9 6270 NEG.b tpower(a3) * do -exp +000028A2 6271 LAB_EXPL +000028A2 7083 6272 MOVEQ #$83-$100,d0 * set exponent +000028A4 DC81 6273 ADD.l d1,d6 * y = y +/- x +000028A6 6B06 6274 BMI.s LAB_EXRN * branch if result normal +000028A8 6275 +000028A8 6276 LAB_EXNN +000028A8 5380 6277 SUBQ.l #1,d0 * decrement exponent +000028AA DC86 6278 ADD.l d6,d6 * shift mantissa +000028AC 6AFA 6279 BPL.s LAB_EXNN * loop if not normal +000028AE 6280 +000028AE 6281 LAB_EXRN +000028AE 2746 0590 6282 MOVE.l d6,FAC1_m(a3) * save exponent result +000028B2 D02B 05D9 6283 ADD.b tpower(a3),d0 * add integer part +000028B6 1740 0594 6284 MOVE.b d0,FAC1_e(a3) * save exponent +000028BA 6285 ** MOVEM.l (sp)+,d1-d6/a0 * restore registers +000028BA 4E75 6286 RTS +000028BC 6287 +000028BC 6288 * cordic loop +000028BC 6289 LAB_EXCC +000028BC 5284 6290 ADDQ.l #1,d4 * increment shift count +000028BE 2406 6291 MOVE.l d6,d2 * x1 = x +000028C0 E8A2 6292 ASR.l d4,d2 * x1 >> n +000028C2 2601 6293 MOVE.l d1,d3 * y1 = y +000028C4 E8A3 6294 ASR.l d4,d3 * y1 >> n +000028C6 4A80 6295 TST.l d0 * test arg +000028C8 6B0C 6296 BMI.s LAB_EXAD * branch if -ve +000028CA 6297 +000028CA D282 6298 ADD.l d2,d1 * y = y + x1 +000028CC DC83 6299 ADD.l d3,d6 * x = x + y1 +000028CE 9098 6300 SUB.l (a0)+,d0 * arg = arg - atnh(a0) +000028D0 51CD FFEA 6301 DBF d5,LAB_EXCC * decrement and loop if not done +000028D4 6302 +000028D4 4E75 6303 RTS +000028D6 6304 +000028D6 6305 LAB_EXAD +000028D6 9282 6306 SUB.l d2,d1 * y = y - x1 +000028D8 9C83 6307 SUB.l d3,d6 * x = x + y1 +000028DA D098 6308 ADD.l (a0)+,d0 * arg = arg + atnh(a0) +000028DC 51CD FFDE 6309 DBF d5,LAB_EXCC * decrement and loop if not done +000028E0 6310 +000028E0 4E75 6311 RTS +000028E2 6312 +000028E2 6313 +000028E2 6314 ************************************************************************************* +000028E2 6315 * +000028E2 6316 * RND(n), 32 bit Galois version. make n=0 for 19th next number in sequence or n<>0 +000028E2 6317 * to get 19th next number in sequence after seed n. This version of the PRNG uses +000028E2 6318 * the Galois method and a sample of 65536 bytes produced gives the following values. +000028E2 6319 +000028E2 6320 * Entropy = 7.997442 bits per byte +000028E2 6321 * Optimum compression would reduce these 65536 bytes by 0 percent +000028E2 6322 +000028E2 6323 * Chi square distribution for 65536 samples is 232.01, and +000028E2 6324 * randomly would exceed this value 75.00 percent of the time +000028E2 6325 +000028E2 6326 * Arithmetic mean value of data bytes is 127.6724, 127.5 would be random +000028E2 6327 * Monte Carlo value for Pi is 3.122871269, error 0.60 percent +000028E2 6328 * Serial correlation coefficient is -0.000370, totally uncorrelated would be 0.0 +000028E2 6329 +000028E2 6330 LAB_RND +000028E2 4A2B 0594 6331 TST.b FAC1_e(a3) * get FAC1 exponent +000028E6 6708 6332 BEQ.s NextPRN * do next random number if zero +000028E8 6333 +000028E8 6334 * else get seed into random number store +000028E8 41EB 05A0 6335 LEA PRNlword(a3),a0 * set PRNG pointer +000028EC 6100 FAB2 6336 BSR LAB_2778 * pack FAC1 into (a0) +000028F0 6337 NextPRN +000028F0 72AF 6338 MOVEQ #$AF-$100,d1 * set EOR value +000028F2 7412 6339 MOVEQ #18,d2 * do this 19 times +000028F4 202B 05A0 6340 MOVE.l PRNlword(a3),d0 * get current +000028F8 6341 Ninc0 +000028F8 D080 6342 ADD.l d0,d0 * shift left 1 bit +000028FA 6402 6343 BCC.s Ninc1 * branch if bit 32 not set +000028FC 6344 +000028FC B300 6345 EOR.b d1,d0 * do Galois LFSR feedback +000028FE 6346 Ninc1 +000028FE 51CA FFF8 6347 DBF d2,Ninc0 * loop +00002902 6348 +00002902 2740 05A0 6349 MOVE.l d0,PRNlword(a3) * save back to seed word +00002906 2740 0590 6350 MOVE.l d0,FAC1_m(a3) * copy to FAC1 mantissa +0000290A 377C 8000 0594 6351 MOVE.w #$8000,FAC1_e(a3) * set the exponent and clear the sign +00002910 6000 F7F2 6352 BRA LAB_24D5 * normalise FAC1 & return +00002914 6353 +00002914 6354 +00002914 6355 ************************************************************************************* +00002914 6356 * +00002914 6357 * cordic TAN(x) routine, TAN(x) = SIN(x)/COS(x) +00002914 6358 * x = angle in radians +00002914 6359 +00002914 6360 LAB_TAN +00002914 6138 6361 BSR.s LAB_SIN * go do SIN/COS cordic compute +00002916 376B 0594 059C 6362 MOVE.w FAC1_e(a3),FAC2_e(a3) * copy exponent & sign from FAC1 to FAC2 +0000291C 276B 0590 0598 6363 MOVE.l FAC1_m(a3),FAC2_m(a3) * copy FAC1 mantissa to FAC2 mantissa +00002922 2741 0590 6364 MOVE.l d1,FAC1_m(a3) * get COS(x) mantissa +00002926 1743 0594 6365 MOVE.b d3,FAC1_e(a3) * get COS(x) exponent +0000292A 6700 E02E 6366 BEQ LAB_OFER * do overflow if COS = 0 +0000292E 6367 +0000292E 6100 F7D4 6368 BSR LAB_24D5 * normalise FAC1 +00002932 6000 F984 6369 BRA LAB_DIVIDE * do FAC2/FAC1 and return, FAC_sc set by SIN +00002936 6370 * COS calculation +00002936 6371 +00002936 6372 +00002936 6373 ************************************************************************************* +00002936 6374 * +00002936 6375 * cordic SIN(x), COS(x) routine +00002936 6376 * x = angle in radians +00002936 6377 +00002936 6378 LAB_COS +00002936 277C C90FDAA3 0598 6379 MOVE.l #$C90FDAA3,FAC2_m(a3) * pi/2 mantissa (LSB is rounded up so +0000293E 6380 * COS(PI/2)=0) +0000293E 377C 8100 059C 6381 MOVE.w #$8100,FAC2_e(a3) * pi/2 exponent and sign +00002944 176B 0595 059E 6382 MOVE.b FAC1_s(a3),FAC_sc(a3) * sign = FAC1 sign (b7) +0000294A 6100 F73C 6383 BSR LAB_ADD * add FAC2 to FAC1, adjust for COS(x) +0000294E 6384 +0000294E 6385 +0000294E 6386 ************************************************************************************* +0000294E 6387 * +0000294E 6388 * SIN/COS cordic calculator +0000294E 6389 +0000294E 6390 LAB_SIN +0000294E 177C 0000 05B4 6391 MOVE.b #0,cosout(a3) * set needed result +00002954 6392 +00002954 277C A2F9836F 0598 6393 MOVE.l #$A2F9836F,FAC2_m(a3) * 1/pi mantissa (LSB is rounded up so SIN(PI)=0) +0000295C 377C 7F00 059C 6394 MOVE.w #$7F00,FAC2_e(a3) * 1/pi exponent & sign +00002962 176B 0595 059E 6395 MOVE.b FAC1_s(a3),FAC_sc(a3) * sign = FAC1 sign (b7) +00002968 6100 F8C2 6396 BSR LAB_MULTIPLY * multiply by 1/pi +0000296C 6397 +0000296C 102B 0594 6398 MOVE.b FAC1_e(a3),d0 * get FAC1 exponent +00002970 671C 6399 BEQ.s LAB_SCZE * branch if zero +00002972 6400 +00002972 41FA 0B34 6401 LEA TAB_SNCO(pc),a0 * get pointer to constants table +00002976 2C2B 0590 6402 MOVE.l FAC1_m(a3),d6 * get FAC1 mantissa +0000297A 5300 6403 SUBQ.b #1,d0 * 2 radians in 360 degrees so /2 +0000297C 6710 6404 BEQ.s LAB_SCZE * branch if zero +0000297E 6405 +0000297E 0400 0080 6406 SUB.b #$80,d0 * normalise exponent +00002982 6B18 6407 BMI.s LAB_SCL0 * branch if < 1 +00002984 6408 +00002984 6409 * X is > 1 +00002984 B03C 0020 6410 CMP.b #$20,d0 * is it >= 2^32 +00002988 6404 6411 BCC.s LAB_SCZE * may as well do zero +0000298A 6412 +0000298A E1AE 6413 LSL.l d0,d6 * shift out integer part bits +0000298C 6618 6414 BNE.s LAB_CORD * if fraction go test quadrant and adjust +0000298E 6415 +0000298E 6416 * else no fraction so do zero +0000298E 6417 LAB_SCZE +0000298E 7481 6418 MOVEQ #$81-$100,d2 * set exponent for 1.0 +00002990 7600 6419 MOVEQ #0,d3 * set exponent for 0.0 +00002992 203C 80000000 6420 MOVE.l #$80000000,d0 * mantissa for 1.0 +00002998 2203 6421 MOVE.l d3,d1 * mantissa for 0.0 +0000299A 6062 6422 BRA.s outloop * go output it +0000299C 6423 +0000299C 6424 * x is < 1 +0000299C 6425 LAB_SCL0 +0000299C 4400 6426 NEG.b d0 * make +ve +0000299E B03C 001E 6427 CMP.b #$1E,d0 * is it <= 2^-30 +000029A2 64EA 6428 BCC.s LAB_SCZE * may as well do zero +000029A4 6429 +000029A4 E0AE 6430 LSR.l d0,d6 * shift out <= 2^-32 bits +000029A6 6431 +000029A6 6432 * cordic calculator, argument in d6 +000029A6 6433 * table pointer in a0, returns in d0-d3 +000029A6 6434 +000029A6 6435 LAB_CORD +000029A6 176B 0595 059E 6436 MOVE.b FAC1_s(a3),FAC_sc(a3) * copy as sign compare for TAN +000029AC DC86 6437 ADD.l d6,d6 * shift 0.5 bit into carry +000029AE 6406 6438 BCC.s LAB_LTPF * branch if less than 0.5 +000029B0 6439 +000029B0 0A2B 00FF 0595 6440 EORI.b #$FF,FAC1_s(a3) * toggle result sign +000029B6 6441 LAB_LTPF +000029B6 DC86 6442 ADD.l d6,d6 * shift 0.25 bit into carry +000029B8 640C 6443 BCC.s LAB_LTPT * branch if less than 0.25 +000029BA 6444 +000029BA 0A2B 00FF 05B4 6445 EORI.b #$FF,cosout(a3) * toggle needed result +000029C0 0A2B 00FF 059E 6446 EORI.b #$FF,FAC_sc(a3) * toggle sign compare for TAN +000029C6 6447 +000029C6 6448 LAB_LTPT +000029C6 E48E 6449 LSR.l #2,d6 * shift the bits back (clear integer bits) +000029C8 67C4 6450 BEQ.s LAB_SCZE * no fraction so go do zero +000029CA 6451 +000029CA 6452 * set start values +000029CA 7A01 6453 MOVEQ #1,d5 * set bit count +000029CC 2028 FFFC 6454 MOVE.l -4(a0),d0 * get multiply constant (1st itteration d0) +000029D0 2200 6455 MOVE.l d0,d1 * 1st itteration d1 +000029D2 9C98 6456 SUB.l (a0)+,d6 * 1st always +ve so do 1st step +000029D4 6008 6457 BRA.s mainloop * jump into routine +000029D6 6458 +000029D6 6459 subloop +000029D6 9C98 6460 SUB.l (a0)+,d6 * z = z - arctan(i)/2pi +000029D8 9083 6461 SUB.l d3,d0 * x = x - y1 +000029DA D282 6462 ADD.l d2,d1 * y = y + x1 +000029DC 6012 6463 BRA.s nexta * back to main loop +000029DE 6464 +000029DE 6465 mainloop +000029DE 2400 6466 MOVE.l d0,d2 * x1 = x +000029E0 EAA2 6467 ASR.l d5,d2 * / (2 ^ i) +000029E2 2601 6468 MOVE.l d1,d3 * y1 = y +000029E4 EAA3 6469 ASR.l d5,d3 * / (2 ^ i) +000029E6 4A86 6470 TST.l d6 * test sign (is 2^0 bit) +000029E8 6AEC 6471 BPL.s subloop * go do subtract if > 1 +000029EA 6472 +000029EA DC98 6473 ADD.l (a0)+,d6 * z = z + arctan(i)/2pi +000029EC D083 6474 ADD.l d3,d0 * x = x + y1 +000029EE 9282 6475 SUB.l d2,d1 * y = y + x1 +000029F0 6476 nexta +000029F0 5285 6477 ADDQ.l #1,d5 * i = i + 1 +000029F2 BABC 0000001E 6478 CMP.l #$1E,d5 * check end condition +000029F8 66E4 6479 BNE.s mainloop * loop if not all done +000029FA 6480 +000029FA 6481 * now untangle output value +000029FA 7481 6482 MOVEQ #$81-$100,d2 * set exponent for 0 to .99 rec. +000029FC 2602 6483 MOVE.l d2,d3 * copy it for cos output +000029FE 6484 outloop +000029FE 4A2B 05B4 6485 TST.b cosout(a3) * did we want cos output? +00002A02 6B04 6486 BMI.s subexit * if so skip +00002A04 6487 +00002A04 C141 6488 EXG d0,d1 * swap SIN and COS mantissas +00002A06 C543 6489 EXG d2,d3 * swap SIN and COS exponents +00002A08 6490 subexit +00002A08 2740 0590 6491 MOVE.l d0,FAC1_m(a3) * set result mantissa +00002A0C 1742 0594 6492 MOVE.b d2,FAC1_e(a3) * set result exponent +00002A10 6000 F6F2 6493 BRA LAB_24D5 * normalise FAC1 & return +00002A14 6494 +00002A14 6495 00002A14 6496 -00002A14 6497 -00002A14 6498 -00002A14 6499 ************************************************************************************* -00002A14 6500 * -00002A14 6501 * perform ATN() -00002A14 6502 -00002A14 6503 LAB_ATN -00002A14 102B 0DF8 6504 MOVE.b FAC1_e(a3),d0 * get FAC1 exponent -00002A18 6700 00AA 6505 BEQ RTS_021 * ATN(0) = 0 so skip calculation -00002A1C 6506 -00002A1C 177C 0000 0E18 6507 MOVE.b #0,cosout(a3) * set result needed -00002A22 B03C 0081 6508 CMP.b #$81,d0 * compare exponent with 1 -00002A26 6528 6509 BCS.s LAB_ATLE * branch if n<1 -00002A28 6510 -00002A28 6608 6511 BNE.s LAB_ATGO * branch if n>1 -00002A2A 6512 -00002A2A 202B 0DF4 6513 MOVE.l FAC1_m(a3),d0 * get mantissa -00002A2E D080 6514 ADD.l d0,d0 * shift left -00002A30 671E 6515 BEQ.s LAB_ATLE * branch if n=1 -00002A32 6516 -00002A32 6517 LAB_ATGO -00002A32 277C 80000000 0DFC 6518 MOVE.l #$80000000,FAC2_m(a3) * set mantissa for 1 -00002A3A 377C 8100 0E00 6519 MOVE.w #$8100,FAC2_e(a3) * set exponent for 1 -00002A40 176B 0DF9 0E02 6520 MOVE.b FAC1_s(a3),FAC_sc(a3) * sign compare = sign -00002A46 6100 F870 6521 BSR LAB_DIVIDE * do 1/n -00002A4A 177C 00FF 0E18 6522 MOVE.b #$FF,cosout(a3) * set inverse result needed -00002A50 6523 LAB_ATLE -00002A50 202B 0DF4 6524 MOVE.l FAC1_m(a3),d0 * get FAC1 mantissa -00002A54 7282 6525 MOVEQ #$82,d1 * set to correct exponent -00002A56 922B 0DF8 6526 SUB.b FAC1_e(a3),d1 * subtract FAC1 exponent (always <= 1) -00002A5A E2A8 6527 LSR.l d1,d0 * shift in two integer part bits -00002A5C 41FA 0ACA 6528 LEA TAB_ATNC(pc),a0 * get pointer to arctan table -00002A60 7C00 6529 MOVEQ #0,d6 * Z = 0 -00002A62 223C 40000000 6530 MOVE.l #1<<30,d1 * y = 1 -00002A68 7A1D 6531 MOVEQ #29,d5 * loop 30 times -00002A6A 7801 6532 MOVEQ #1,d4 * shift counter -00002A6C 6006 6533 BRA.s LAB_ATCD * enter loop -00002A6E 6534 -00002A6E 6535 LAB_ATNP -00002A6E E8A2 6536 ASR.l d4,d2 * x1 / 2^i -00002A70 D282 6537 ADD.l d2,d1 * y = y + x1 -00002A72 DC90 6538 ADD.l (a0),d6 * z = z + atn(i) -00002A74 6539 LAB_ATCD -00002A74 2400 6540 MOVE.l d0,d2 * x1 = x -00002A76 2601 6541 MOVE.l d1,d3 * y1 = y -00002A78 E8A3 6542 ASR.l d4,d3 * y1 / 2^i -00002A7A 6543 LAB_CATN -00002A7A 9083 6544 SUB.l d3,d0 * x = x - y1 -00002A7C 6AF0 6545 BPL.s LAB_ATNP * branch if x >= 0 -00002A7E 6546 -00002A7E 2002 6547 MOVE.l d2,d0 * else get x back -00002A80 5848 6548 ADDQ.w #4,a0 * increment pointer -00002A82 5284 6549 ADDQ.l #1,d4 * increment i -00002A84 E283 6550 ASR.l #1,d3 * y1 / 2^i -00002A86 51CD FFF2 6551 DBF d5,LAB_CATN * decrement and loop if not done -00002A8A 6552 -00002A8A 177C 0082 0DF8 6553 MOVE.b #$82,FAC1_e(a3) * set new exponent -00002A90 2746 0DF4 6554 MOVE.l d6,FAC1_m(a3) * save mantissa -00002A94 6100 F66E 6555 BSR LAB_24D5 * normalise FAC1 -00002A98 6556 -00002A98 4A2B 0E18 6557 TST.b cosout(a3) * was it > 1 ? -00002A9C 6A26 6558 BPL.s RTS_021 * branch if not -00002A9E 6559 -00002A9E 1E2B 0DF9 6560 MOVE.b FAC1_s(a3),d7 * get sign -00002AA2 177C 0000 0DF9 6561 MOVE.b #0,FAC1_s(a3) * clear sign -00002AA8 277C C90FDAA2 0DFC 6562 MOVE.l #$C90FDAA2,FAC2_m(a3) * set -(pi/2) -00002AB0 377C 8180 0E00 6563 MOVE.w #$8180,FAC2_e(a3) * set exponent and sign -00002AB6 177C 00FF 0E02 6564 MOVE.b #$FF,FAC_sc(a3) * set sign compare -00002ABC 6100 F5CA 6565 BSR LAB_ADD * perform addition, FAC2 to FAC1 -00002AC0 1747 0DF9 6566 MOVE.b d7,FAC1_s(a3) * restore sign -00002AC4 6567 RTS_021 -00002AC4 4E75 6568 RTS -00002AC6 6569 -00002AC6 6570 -00002AC6 6571 ************************************************************************************* -00002AC6 6572 * -00002AC6 6573 * perform BITSET -00002AC6 6574 -00002AC6 6575 LAB_BITSET -00002AC6 6100 F4A0 6576 BSR LAB_GADB * get two parameters for POKE or WAIT -00002ACA 6577 * first parameter in a0, second in d0 -00002ACA B03C 0008 6578 CMP.b #$08,d0 * only 0 to 7 are allowed -00002ACE 6400 DE8E 6579 BCC LAB_FCER * branch if > 7 -00002AD2 6580 -00002AD2 01D0 6581 BSET d0,(a0) * set bit -00002AD4 4E75 6582 RTS -00002AD6 6583 -00002AD6 6584 -00002AD6 6585 ************************************************************************************* -00002AD6 6586 * -00002AD6 6587 * perform BITCLR -00002AD6 6588 -00002AD6 6589 LAB_BITCLR -00002AD6 6100 F490 6590 BSR LAB_GADB * get two parameters for POKE or WAIT -00002ADA 6591 * first parameter in a0, second in d0 -00002ADA B03C 0008 6592 CMP.b #$08,d0 * only 0 to 7 are allowed -00002ADE 6400 DE7E 6593 BCC LAB_FCER * branch if > 7 -00002AE2 6594 -00002AE2 0190 6595 BCLR d0,(a0) * clear bit -00002AE4 4E75 6596 RTS -00002AE6 6597 -00002AE6 6598 -00002AE6 6599 ************************************************************************************* -00002AE6 6600 * -00002AE6 6601 * perform BITTST() -00002AE6 6602 -00002AE6 6603 LAB_BTST -00002AE6 101D 6604 MOVE.b (a5)+,d0 * increment BASIC pointer -00002AE8 6100 F47E 6605 BSR LAB_GADB * get two parameters for POKE or WAIT -00002AEC 6606 * first parameter in a0, second in d0 -00002AEC B03C 0008 6607 CMP.b #$08,d0 * only 0 to 7 are allowed -00002AF0 6400 DE6C 6608 BCC LAB_FCER * branch if > 7 -00002AF4 6609 -00002AF4 2200 6610 MOVE.l d0,d1 * copy bit # to test -00002AF6 6100 EAB2 6611 BSR LAB_GBYT * get next BASIC byte -00002AFA B03C 0029 6612 CMP.b #')',d0 * is next character ")" -00002AFE 6600 DE6A 6613 BNE LAB_SNER * if not ")" go do syntax error, then warm start -00002B02 6614 -00002B02 6100 EAA4 6615 BSR LAB_IGBY * update execute pointer (to character past ")") -00002B06 7000 6616 MOVEQ #0,d0 * set the result as zero -00002B08 0310 6617 BTST d1,(a0) * test bit -00002B0A 6700 F90E 6618 BEQ LAB_27DB * branch if zero (already correct) -00002B0E 6619 -00002B0E 70FF 6620 MOVEQ #-1,d0 * set for -1 result -00002B10 6000 F908 6621 BRA LAB_27DB * go do SGN tail -00002B14 6622 -00002B14 6623 -00002B14 6624 ************************************************************************************* -00002B14 6625 * -00002B14 6626 * perform USING$() -00002B14 6627 -00002B14 =00000000 6628 fsd EQU 0 * (sp) format string descriptor pointer -00002B14 =00000004 6629 fsti EQU 4 * 4(sp) format string this index -00002B14 =00000006 6630 fsli EQU 6 * 6(sp) format string last index -00002B14 =00000008 6631 fsdpi EQU 8 * 8(sp) format string decimal point index -00002B14 =0000000A 6632 fsdc EQU 10 * 10(sp) format string decimal characters -00002B14 =00000008 6633 fend EQU 12-4 * x(sp) end-4, fsd is popped by itself +00002A14 6497 ************************************************************************************* +00002A14 6498 * +00002A14 6499 * perform ATN() +00002A14 6500 +00002A14 6501 LAB_ATN +00002A14 102B 0594 6502 MOVE.b FAC1_e(a3),d0 * get FAC1 exponent +00002A18 6700 00AA 6503 BEQ RTS_021 * ATN(0) = 0 so skip calculation +00002A1C 6504 +00002A1C 177C 0000 05B4 6505 MOVE.b #0,cosout(a3) * set result needed +00002A22 B03C 0081 6506 CMP.b #$81,d0 * compare exponent with 1 +00002A26 6528 6507 BCS.s LAB_ATLE * branch if n<1 +00002A28 6508 +00002A28 6608 6509 BNE.s LAB_ATGO * branch if n>1 +00002A2A 6510 +00002A2A 202B 0590 6511 MOVE.l FAC1_m(a3),d0 * get mantissa +00002A2E D080 6512 ADD.l d0,d0 * shift left +00002A30 671E 6513 BEQ.s LAB_ATLE * branch if n=1 +00002A32 6514 +00002A32 6515 LAB_ATGO +00002A32 277C 80000000 0598 6516 MOVE.l #$80000000,FAC2_m(a3) * set mantissa for 1 +00002A3A 377C 8100 059C 6517 MOVE.w #$8100,FAC2_e(a3) * set exponent for 1 +00002A40 176B 0595 059E 6518 MOVE.b FAC1_s(a3),FAC_sc(a3) * sign compare = sign +00002A46 6100 F870 6519 BSR LAB_DIVIDE * do 1/n +00002A4A 177C 00FF 05B4 6520 MOVE.b #$FF,cosout(a3) * set inverse result needed +00002A50 6521 LAB_ATLE +00002A50 202B 0590 6522 MOVE.l FAC1_m(a3),d0 * get FAC1 mantissa +00002A54 7282 6523 MOVEQ #$82,d1 * set to correct exponent +00002A56 922B 0594 6524 SUB.b FAC1_e(a3),d1 * subtract FAC1 exponent (always <= 1) +00002A5A E2A8 6525 LSR.l d1,d0 * shift in two integer part bits +00002A5C 41FA 0ACA 6526 LEA TAB_ATNC(pc),a0 * get pointer to arctan table +00002A60 7C00 6527 MOVEQ #0,d6 * Z = 0 +00002A62 223C 40000000 6528 MOVE.l #1<<30,d1 * y = 1 +00002A68 7A1D 6529 MOVEQ #29,d5 * loop 30 times +00002A6A 7801 6530 MOVEQ #1,d4 * shift counter +00002A6C 6006 6531 BRA.s LAB_ATCD * enter loop +00002A6E 6532 +00002A6E 6533 LAB_ATNP +00002A6E E8A2 6534 ASR.l d4,d2 * x1 / 2^i +00002A70 D282 6535 ADD.l d2,d1 * y = y + x1 +00002A72 DC90 6536 ADD.l (a0),d6 * z = z + atn(i) +00002A74 6537 LAB_ATCD +00002A74 2400 6538 MOVE.l d0,d2 * x1 = x +00002A76 2601 6539 MOVE.l d1,d3 * y1 = y +00002A78 E8A3 6540 ASR.l d4,d3 * y1 / 2^i +00002A7A 6541 LAB_CATN +00002A7A 9083 6542 SUB.l d3,d0 * x = x - y1 +00002A7C 6AF0 6543 BPL.s LAB_ATNP * branch if x >= 0 +00002A7E 6544 +00002A7E 2002 6545 MOVE.l d2,d0 * else get x back +00002A80 5848 6546 ADDQ.w #4,a0 * increment pointer +00002A82 5284 6547 ADDQ.l #1,d4 * increment i +00002A84 E283 6548 ASR.l #1,d3 * y1 / 2^i +00002A86 51CD FFF2 6549 DBF d5,LAB_CATN * decrement and loop if not done +00002A8A 6550 +00002A8A 177C 0082 0594 6551 MOVE.b #$82,FAC1_e(a3) * set new exponent +00002A90 2746 0590 6552 MOVE.l d6,FAC1_m(a3) * save mantissa +00002A94 6100 F66E 6553 BSR LAB_24D5 * normalise FAC1 +00002A98 6554 +00002A98 4A2B 05B4 6555 TST.b cosout(a3) * was it > 1 ? +00002A9C 6A26 6556 BPL.s RTS_021 * branch if not +00002A9E 6557 +00002A9E 1E2B 0595 6558 MOVE.b FAC1_s(a3),d7 * get sign +00002AA2 177C 0000 0595 6559 MOVE.b #0,FAC1_s(a3) * clear sign +00002AA8 277C C90FDAA2 0598 6560 MOVE.l #$C90FDAA2,FAC2_m(a3) * set -(pi/2) +00002AB0 377C 8180 059C 6561 MOVE.w #$8180,FAC2_e(a3) * set exponent and sign +00002AB6 177C 00FF 059E 6562 MOVE.b #$FF,FAC_sc(a3) * set sign compare +00002ABC 6100 F5CA 6563 BSR LAB_ADD * perform addition, FAC2 to FAC1 +00002AC0 1747 0595 6564 MOVE.b d7,FAC1_s(a3) * restore sign +00002AC4 6565 RTS_021 +00002AC4 4E75 6566 RTS +00002AC6 6567 +00002AC6 6568 +00002AC6 6569 ************************************************************************************* +00002AC6 6570 * +00002AC6 6571 * perform BITSET +00002AC6 6572 +00002AC6 6573 LAB_BITSET +00002AC6 6100 F4A0 6574 BSR LAB_GADB * get two parameters for POKE or WAIT +00002ACA 6575 * first parameter in a0, second in d0 +00002ACA B03C 0008 6576 CMP.b #$08,d0 * only 0 to 7 are allowed +00002ACE 6400 DE8E 6577 BCC LAB_FCER * branch if > 7 +00002AD2 6578 +00002AD2 01D0 6579 BSET d0,(a0) * set bit +00002AD4 4E75 6580 RTS +00002AD6 6581 +00002AD6 6582 +00002AD6 6583 ************************************************************************************* +00002AD6 6584 * +00002AD6 6585 * perform BITCLR +00002AD6 6586 +00002AD6 6587 LAB_BITCLR +00002AD6 6100 F490 6588 BSR LAB_GADB * get two parameters for POKE or WAIT +00002ADA 6589 * first parameter in a0, second in d0 +00002ADA B03C 0008 6590 CMP.b #$08,d0 * only 0 to 7 are allowed +00002ADE 6400 DE7E 6591 BCC LAB_FCER * branch if > 7 +00002AE2 6592 +00002AE2 0190 6593 BCLR d0,(a0) * clear bit +00002AE4 4E75 6594 RTS +00002AE6 6595 +00002AE6 6596 +00002AE6 6597 ************************************************************************************* +00002AE6 6598 * +00002AE6 6599 * perform BITTST() +00002AE6 6600 +00002AE6 6601 LAB_BTST +00002AE6 101D 6602 MOVE.b (a5)+,d0 * increment BASIC pointer +00002AE8 6100 F47E 6603 BSR LAB_GADB * get two parameters for POKE or WAIT +00002AEC 6604 * first parameter in a0, second in d0 +00002AEC B03C 0008 6605 CMP.b #$08,d0 * only 0 to 7 are allowed +00002AF0 6400 DE6C 6606 BCC LAB_FCER * branch if > 7 +00002AF4 6607 +00002AF4 2200 6608 MOVE.l d0,d1 * copy bit # to test +00002AF6 6100 EAB2 6609 BSR LAB_GBYT * get next BASIC byte +00002AFA B03C 0029 6610 CMP.b #')',d0 * is next character ")" +00002AFE 6600 DE6A 6611 BNE LAB_SNER * if not ")" go do syntax error, then warm start +00002B02 6612 +00002B02 6100 EAA4 6613 BSR LAB_IGBY * update execute pointer (to character past ")") +00002B06 7000 6614 MOVEQ #0,d0 * set the result as zero +00002B08 0310 6615 BTST d1,(a0) * test bit +00002B0A 6700 F90E 6616 BEQ LAB_27DB * branch if zero (already correct) +00002B0E 6617 +00002B0E 70FF 6618 MOVEQ #-1,d0 * set for -1 result +00002B10 6000 F908 6619 BRA LAB_27DB * go do SGN tail +00002B14 6620 +00002B14 6621 +00002B14 6622 ************************************************************************************* +00002B14 6623 * +00002B14 6624 * perform USING$() +00002B14 6625 +00002B14 =00000000 6626 fsd EQU 0 * (sp) format string descriptor pointer +00002B14 =00000004 6627 fsti EQU 4 * 4(sp) format string this index +00002B14 =00000006 6628 fsli EQU 6 * 6(sp) format string last index +00002B14 =00000008 6629 fsdpi EQU 8 * 8(sp) format string decimal point index +00002B14 =0000000A 6630 fsdc EQU 10 * 10(sp) format string decimal characters +00002B14 =00000008 6631 fend EQU 12-4 * x(sp) end-4, fsd is popped by itself +00002B14 6632 +00002B14 =00000023 6633 ofchr EQU '#' * the overflow character 00002B14 6634 -00002B14 =00000023 6635 ofchr EQU '#' * the overflow character -00002B14 6636 -00002B14 6637 LAB_USINGS -00002B14 4A2B 0E19 6638 TST.b Dtypef(a3) * test data type, $80=string -00002B18 6A00 DDFC 6639 BPL LAB_FOER * if not string type go do format error -00002B1C 6640 -00002B1C 246B 0DF4 6641 MOVEA.l FAC1_m(a3),a2 * get the format string descriptor pointer -00002B20 3E2A 0004 6642 MOVE.w 4(a2),d7 * get the format string length -00002B24 6700 DDF0 6643 BEQ LAB_FOER * if null string go do format error +00002B14 6635 LAB_USINGS +00002B14 4A2B 05B5 6636 TST.b Dtypef(a3) * test data type, $80=string +00002B18 6A00 DDFC 6637 BPL LAB_FOER * if not string type go do format error +00002B1C 6638 +00002B1C 246B 0590 6639 MOVEA.l FAC1_m(a3),a2 * get the format string descriptor pointer +00002B20 3E2A 0004 6640 MOVE.w 4(a2),d7 * get the format string length +00002B24 6700 DDF0 6641 BEQ LAB_FOER * if null string go do format error +00002B28 6642 +00002B28 6643 * clear the format string values 00002B28 6644 -00002B28 6645 * clear the format string values -00002B28 6646 -00002B28 7000 6647 MOVEQ #0,d0 * clear d0 -00002B2A 3F00 6648 MOVE.w d0,-(sp) * clear the format string decimal characters -00002B2C 3F00 6649 MOVE.w d0,-(sp) * clear the format string decimal point index -00002B2E 3F00 6650 MOVE.w d0,-(sp) * clear the format string last index -00002B30 3F00 6651 MOVE.w d0,-(sp) * clear the format string this index -00002B32 2F0A 6652 MOVE.l a2,-(sp) * save the format string descriptor pointer +00002B28 7000 6645 MOVEQ #0,d0 * clear d0 +00002B2A 3F00 6646 MOVE.w d0,-(sp) * clear the format string decimal characters +00002B2C 3F00 6647 MOVE.w d0,-(sp) * clear the format string decimal point index +00002B2E 3F00 6648 MOVE.w d0,-(sp) * clear the format string last index +00002B30 3F00 6649 MOVE.w d0,-(sp) * clear the format string this index +00002B32 2F0A 6650 MOVE.l a2,-(sp) * save the format string descriptor pointer +00002B34 6651 +00002B34 6652 * make a null return string for the first string add 00002B34 6653 -00002B34 6654 * make a null return string for the first string add -00002B34 6655 -00002B34 7200 6656 MOVEQ #0,d1 * make a null string -00002B36 2041 6657 MOVEA.l d1,a0 * with a null pointer -00002B38 6100 F0CA 6658 BSR LAB_RTST * push a string on the descriptor stack -00002B3C 6659 * a0 = pointer, d1 = length +00002B34 7200 6654 MOVEQ #0,d1 * make a null string +00002B36 2041 6655 MOVEA.l d1,a0 * with a null pointer +00002B38 6100 F0CA 6656 BSR LAB_RTST * push a string on the descriptor stack +00002B3C 6657 * a0 = pointer, d1 = length +00002B3C 6658 +00002B3C 6659 * do the USING$() function next value 00002B3C 6660 -00002B3C 6661 * do the USING$() function next value -00002B3C 6662 -00002B3C 101D 6663 MOVE.b (a5)+,d0 * get the next BASIC byte -00002B3E 6664 LAB_U002 -00002B3E B03C 002C 6665 CMP.b #',',d0 * compare with comma -00002B42 6600 DE26 6666 BNE LAB_SNER * if not "," go do syntax error -00002B46 6667 -00002B46 6100 028E 6668 BSR LAB_ProcFo * process the format string -00002B4A 4A02 6669 TST.b d2 * test the special characters flag -00002B4C 6700 DDC8 6670 BEQ LAB_FOER * if no special characters go do format error -00002B50 6671 -00002B50 6100 E8F6 6672 BSR LAB_EVEX * evaluate the expression -00002B54 4A2B 0E19 6673 TST.b Dtypef(a3) * test the data type -00002B58 6B00 DDE4 6674 BMI LAB_TMER * if string type go do type missmatch error -00002B5C 6675 -00002B5C 4A2B 0DF8 6676 TST.b FAC1_e(a3) * test FAC1 exponent -00002B60 6732 6677 BEQ.s LAB_U004 * if FAC1 = 0 skip the rounding -00002B62 6678 -00002B62 322F 000A 6679 MOVE.w fsdc(sp),d1 * get the format string decimal character count -00002B66 B27C 0008 6680 CMP.w #8,d1 * compare the fraction digit count with 8 -00002B6A 6428 6681 BCC.s LAB_U004 * if >= 8 skip the rounding -00002B6C 6682 -00002B6C 3001 6683 MOVE.w d1,d0 * else copy the fraction digit count -00002B6E D241 6684 ADD.w d1,d1 * * 2 -00002B70 D240 6685 ADD.w d0,d1 * * 3 -00002B72 D241 6686 ADD.w d1,d1 * * 6 -00002B74 41FA 0844 6687 LEA LAB_P_10(pc),a0 * get the rounding table base -00002B78 2770 1002 0DFC 6688 MOVE.l 2(a0,d1.w),FAC2_m(a3) * get the rounding mantissa -00002B7E 3030 1000 6689 MOVE.w (a0,d1.w),d0 * get the rounding exponent -00002B82 0440 0100 6690 SUB.w #$100,d0 * effectively divide the mantissa by 2 -00002B86 3740 0E00 6691 MOVE.w d0,FAC2_e(a3) * save the rounding exponent -00002B8A 177C 0000 0E02 6692 MOVE.b #$00,FAC_sc(a3) * clear the sign compare -00002B90 6100 F4F6 6693 BSR LAB_ADD * round the value to n places -00002B94 6694 LAB_U004 -00002B94 6100 F970 6695 BSR LAB_2970 * convert FAC1 to string - not on stack -00002B98 6696 -00002B98 6100 01FE 6697 BSR LAB_DupFmt * duplicate the processed format string section -00002B9C 6698 * returns length in d1, pointer in a0 +00002B3C 101D 6661 MOVE.b (a5)+,d0 * get the next BASIC byte +00002B3E 6662 LAB_U002 +00002B3E B03C 002C 6663 CMP.b #',',d0 * compare with comma +00002B42 6600 DE26 6664 BNE LAB_SNER * if not "," go do syntax error +00002B46 6665 +00002B46 6100 028E 6666 BSR LAB_ProcFo * process the format string +00002B4A 4A02 6667 TST.b d2 * test the special characters flag +00002B4C 6700 DDC8 6668 BEQ LAB_FOER * if no special characters go do format error +00002B50 6669 +00002B50 6100 E8F6 6670 BSR LAB_EVEX * evaluate the expression +00002B54 4A2B 05B5 6671 TST.b Dtypef(a3) * test the data type +00002B58 6B00 DDE4 6672 BMI LAB_TMER * if string type go do type missmatch error +00002B5C 6673 +00002B5C 4A2B 0594 6674 TST.b FAC1_e(a3) * test FAC1 exponent +00002B60 6732 6675 BEQ.s LAB_U004 * if FAC1 = 0 skip the rounding +00002B62 6676 +00002B62 322F 000A 6677 MOVE.w fsdc(sp),d1 * get the format string decimal character count +00002B66 B27C 0008 6678 CMP.w #8,d1 * compare the fraction digit count with 8 +00002B6A 6428 6679 BCC.s LAB_U004 * if >= 8 skip the rounding +00002B6C 6680 +00002B6C 3001 6681 MOVE.w d1,d0 * else copy the fraction digit count +00002B6E D241 6682 ADD.w d1,d1 * * 2 +00002B70 D240 6683 ADD.w d0,d1 * * 3 +00002B72 D241 6684 ADD.w d1,d1 * * 6 +00002B74 41FA 0844 6685 LEA LAB_P_10(pc),a0 * get the rounding table base +00002B78 2770 1002 0598 6686 MOVE.l 2(a0,d1.w),FAC2_m(a3) * get the rounding mantissa +00002B7E 3030 1000 6687 MOVE.w (a0,d1.w),d0 * get the rounding exponent +00002B82 0440 0100 6688 SUB.w #$100,d0 * effectively divide the mantissa by 2 +00002B86 3740 059C 6689 MOVE.w d0,FAC2_e(a3) * save the rounding exponent +00002B8A 177C 0000 059E 6690 MOVE.b #$00,FAC_sc(a3) * clear the sign compare +00002B90 6100 F4F6 6691 BSR LAB_ADD * round the value to n places +00002B94 6692 LAB_U004 +00002B94 6100 F970 6693 BSR LAB_2970 * convert FAC1 to string - not on stack +00002B98 6694 +00002B98 6100 01FE 6695 BSR LAB_DupFmt * duplicate the processed format string section +00002B9C 6696 * returns length in d1, pointer in a0 +00002B9C 6697 +00002B9C 6698 * process the number string, length in d6, decimal point index in d2 00002B9C 6699 -00002B9C 6700 * process the number string, length in d6, decimal point index in d2 -00002B9C 6701 -00002B9C 45EB 0E2A 6702 LEA Decss(a3),a2 * set the number string start -00002BA0 7C00 6703 MOVEQ #0,d6 * clear the number string index -00002BA2 782E 6704 MOVEQ #'.',d4 * set the decimal point character -00002BA4 6705 LAB_U005 -00002BA4 3406 6706 MOVE.w d6,d2 * save the index to flag the decimal point -00002BA6 6707 LAB_U006 -00002BA6 5246 6708 ADDQ.w #1,d6 * increment the number string index -00002BA8 1032 6000 6709 MOVE.b (a2,d6.w),d0 * get a number string character -00002BAC 677A 6710 BEQ.s LAB_U010 * if null then number complete -00002BAE 6711 -00002BAE B03C 0045 6712 CMP.b #'E',d0 * compare the character with an "E" -00002BB2 6706 6713 BEQ.s LAB_U008 * was sx[.x]Esxx so go handle sci notation -00002BB4 6714 -00002BB4 B004 6715 CMP.b d4,d0 * compare the character with "." -00002BB6 66EE 6716 BNE.s LAB_U006 * if not decimal point go get the next digit -00002BB8 6717 -00002BB8 60EA 6718 BRA.s LAB_U005 * go save the index and get the next digit +00002B9C 45EB 05C6 6700 LEA Decss(a3),a2 * set the number string start +00002BA0 7C00 6701 MOVEQ #0,d6 * clear the number string index +00002BA2 782E 6702 MOVEQ #'.',d4 * set the decimal point character +00002BA4 6703 LAB_U005 +00002BA4 3406 6704 MOVE.w d6,d2 * save the index to flag the decimal point +00002BA6 6705 LAB_U006 +00002BA6 5246 6706 ADDQ.w #1,d6 * increment the number string index +00002BA8 1032 6000 6707 MOVE.b (a2,d6.w),d0 * get a number string character +00002BAC 677A 6708 BEQ.s LAB_U010 * if null then number complete +00002BAE 6709 +00002BAE B03C 0045 6710 CMP.b #'E',d0 * compare the character with an "E" +00002BB2 6706 6711 BEQ.s LAB_U008 * was sx[.x]Esxx so go handle sci notation +00002BB4 6712 +00002BB4 B004 6713 CMP.b d4,d0 * compare the character with "." +00002BB6 66EE 6714 BNE.s LAB_U006 * if not decimal point go get the next digit +00002BB8 6715 +00002BB8 60EA 6716 BRA.s LAB_U005 * go save the index and get the next digit +00002BBA 6717 +00002BBA 6718 * have found an sx[.x]Esxx number, the [.x] will not be present for a single digit 00002BBA 6719 -00002BBA 6720 * have found an sx[.x]Esxx number, the [.x] will not be present for a single digit -00002BBA 6721 -00002BBA 6722 LAB_U008 -00002BBA 3606 6723 MOVE.w d6,d3 * copy the index to the "E" -00002BBC 5343 6724 SUBQ.w #1,d3 * -1 gives the last digit index -00002BBE 6725 -00002BBE 5246 6726 ADDQ.w #1,d6 * increment the index to the exponent sign -00002BC0 1032 6000 6727 MOVE.b (a2,d6.w),d0 * get the exponent sign character -00002BC4 B03C 002D 6728 CMP.b #'-',d0 * compare the exponent sign with "-" -00002BC8 6600 DD94 6729 BNE LAB_FCER * if it wasn't sx[.x]E-xx go do function -00002BCC 6730 * call error +00002BBA 6720 LAB_U008 +00002BBA 3606 6721 MOVE.w d6,d3 * copy the index to the "E" +00002BBC 5343 6722 SUBQ.w #1,d3 * -1 gives the last digit index +00002BBE 6723 +00002BBE 5246 6724 ADDQ.w #1,d6 * increment the index to the exponent sign +00002BC0 1032 6000 6725 MOVE.b (a2,d6.w),d0 * get the exponent sign character +00002BC4 B03C 002D 6726 CMP.b #'-',d0 * compare the exponent sign with "-" +00002BC8 6600 DD94 6727 BNE LAB_FCER * if it wasn't sx[.x]E-xx go do function +00002BCC 6728 * call error +00002BCC 6729 +00002BCC 6730 * found an sx[.x]E-xx number so check the exponent magnitude 00002BCC 6731 -00002BCC 6732 * found an sx[.x]E-xx number so check the exponent magnitude -00002BCC 6733 -00002BCC 5246 6734 ADDQ.w #1,d6 * increment the index to the exponent 10s -00002BCE 1032 6000 6735 MOVE.b (a2,d6.w),d0 * get the exponent 10s character -00002BD2 B03C 0030 6736 CMP.b #'0',d0 * compare the exponent 10s with "0" -00002BD6 6704 6737 BEQ.s LAB_U009 * if it was sx[.x]E-0x go get the exponent -00002BD8 6738 * 1s character -00002BD8 6739 -00002BD8 700A 6740 MOVEQ #10,d0 * else start writing at index 10 -00002BDA 6008 6741 BRA.s LAB_U00A * go copy the digits +00002BCC 5246 6732 ADDQ.w #1,d6 * increment the index to the exponent 10s +00002BCE 1032 6000 6733 MOVE.b (a2,d6.w),d0 * get the exponent 10s character +00002BD2 B03C 0030 6734 CMP.b #'0',d0 * compare the exponent 10s with "0" +00002BD6 6704 6735 BEQ.s LAB_U009 * if it was sx[.x]E-0x go get the exponent +00002BD8 6736 * 1s character +00002BD8 6737 +00002BD8 700A 6738 MOVEQ #10,d0 * else start writing at index 10 +00002BDA 6008 6739 BRA.s LAB_U00A * go copy the digits +00002BDC 6740 +00002BDC 6741 * found an sx[.x]E-0x number so get the exponent magnitude 00002BDC 6742 -00002BDC 6743 * found an sx[.x]E-0x number so get the exponent magnitude -00002BDC 6744 -00002BDC 6745 LAB_U009 -00002BDC 5246 6746 ADDQ.w #1,d6 * increment the index to the exponent 1s -00002BDE 700F 6747 MOVEQ #$0F,d0 * set the mask for the exponent 1s digit -00002BE0 C032 6000 6748 AND.b (a2,d6.w),d0 * get and convert the exponent 1s digit -00002BE4 6749 LAB_U00A -00002BE4 3403 6750 MOVE.w d3,d2 * copy the number last digit index -00002BE6 0C42 0001 6751 CMPI.w #1,d2 * is the number of the form sxE-0x -00002BEA 6602 6752 BNE.s LAB_U00B * if it is sx.xE-0x skip the increment -00002BEC 6753 -00002BEC 6754 * else make room for the decimal point -00002BEC 5242 6755 ADDQ.w #1,d2 * add 1 to the write index -00002BEE 6756 LAB_U00B -00002BEE D440 6757 ADD.w d0,d2 * add the exponent 1s to the write index -00002BF0 700A 6758 MOVEQ #10,d0 * set the maximum write index -00002BF2 9042 6759 SUB.w d2,d0 * compare the index with the maximum -00002BF4 6E0C 6760 BGT.s LAB_U00C * if the index < the maximum continue -00002BF6 6761 -00002BF6 D440 6762 ADD.w d0,d2 * else set the index to the maximum -00002BF8 D640 6763 ADD.w d0,d3 * adjust the read index -00002BFA 0C43 0001 6764 CMPI.w #1,d3 * compare the adjusted index with 1 -00002BFE 6E02 6765 BGT.s LAB_U00C * if > 1 continue -00002C00 6766 -00002C00 7600 6767 MOVEQ #0,d3 * else allow for the decimal point -00002C02 6768 LAB_U00C -00002C02 3C02 6769 MOVE.w d2,d6 * copy the write index as the number -00002C04 6770 * string length -00002C04 7000 6771 MOVEQ #0,d0 * clear d0 to null terminate the number -00002C06 6772 * string -00002C06 6773 LAB_U00D -00002C06 1580 2000 6774 MOVE.b d0,(a2,d2.w) * save the character to the number string -00002C0A 5342 6775 SUBQ.w #1,d2 * decrement the number write index -00002C0C 0C42 0001 6776 CMPI.w #1,d2 * compare the number write index with 1 -00002C10 6712 6777 BEQ.s LAB_U00F * if at the decimal point go save it -00002C12 6778 -00002C12 6779 * else write a digit to the number string -00002C12 7030 6780 MOVEQ #'0',d0 * default to "0" -00002C14 4A43 6781 TST.w d3 * test the number read index -00002C16 67EE 6782 BEQ.s LAB_U00D * if zero just go save the "0" -00002C18 6783 -00002C18 6784 LAB_U00E -00002C18 1032 3000 6785 MOVE.b (a2,d3.w),d0 * read the next number digit -00002C1C 5343 6786 SUBQ.w #1,d3 * decrement the read index -00002C1E B004 6787 CMP.b d4,d0 * compare the digit with "." -00002C20 66E4 6788 BNE.s LAB_U00D * if not "." go save the digit -00002C22 6789 -00002C22 60F4 6790 BRA.s LAB_U00E * else go get the next digit -00002C24 6791 -00002C24 6792 LAB_U00F -00002C24 1584 2000 6793 MOVE.b d4,(a2,d2.w) * save the decimal point -00002C28 6794 LAB_U010 -00002C28 4A42 6795 TST.w d2 * test the number string decimal point index -00002C2A 6602 6796 BNE.s LAB_U014 * if dp present skip the reset -00002C2C 6797 -00002C2C 3406 6798 MOVE.w d6,d2 * make the decimal point index = the length +00002BDC 6743 LAB_U009 +00002BDC 5246 6744 ADDQ.w #1,d6 * increment the index to the exponent 1s +00002BDE 700F 6745 MOVEQ #$0F,d0 * set the mask for the exponent 1s digit +00002BE0 C032 6000 6746 AND.b (a2,d6.w),d0 * get and convert the exponent 1s digit +00002BE4 6747 LAB_U00A +00002BE4 3403 6748 MOVE.w d3,d2 * copy the number last digit index +00002BE6 0C42 0001 6749 CMPI.w #1,d2 * is the number of the form sxE-0x +00002BEA 6602 6750 BNE.s LAB_U00B * if it is sx.xE-0x skip the increment +00002BEC 6751 +00002BEC 6752 * else make room for the decimal point +00002BEC 5242 6753 ADDQ.w #1,d2 * add 1 to the write index +00002BEE 6754 LAB_U00B +00002BEE D440 6755 ADD.w d0,d2 * add the exponent 1s to the write index +00002BF0 700A 6756 MOVEQ #10,d0 * set the maximum write index +00002BF2 9042 6757 SUB.w d2,d0 * compare the index with the maximum +00002BF4 6E0C 6758 BGT.s LAB_U00C * if the index < the maximum continue +00002BF6 6759 +00002BF6 D440 6760 ADD.w d0,d2 * else set the index to the maximum +00002BF8 D640 6761 ADD.w d0,d3 * adjust the read index +00002BFA 0C43 0001 6762 CMPI.w #1,d3 * compare the adjusted index with 1 +00002BFE 6E02 6763 BGT.s LAB_U00C * if > 1 continue +00002C00 6764 +00002C00 7600 6765 MOVEQ #0,d3 * else allow for the decimal point +00002C02 6766 LAB_U00C +00002C02 3C02 6767 MOVE.w d2,d6 * copy the write index as the number +00002C04 6768 * string length +00002C04 7000 6769 MOVEQ #0,d0 * clear d0 to null terminate the number +00002C06 6770 * string +00002C06 6771 LAB_U00D +00002C06 1580 2000 6772 MOVE.b d0,(a2,d2.w) * save the character to the number string +00002C0A 5342 6773 SUBQ.w #1,d2 * decrement the number write index +00002C0C 0C42 0001 6774 CMPI.w #1,d2 * compare the number write index with 1 +00002C10 6712 6775 BEQ.s LAB_U00F * if at the decimal point go save it +00002C12 6776 +00002C12 6777 * else write a digit to the number string +00002C12 7030 6778 MOVEQ #'0',d0 * default to "0" +00002C14 4A43 6779 TST.w d3 * test the number read index +00002C16 67EE 6780 BEQ.s LAB_U00D * if zero just go save the "0" +00002C18 6781 +00002C18 6782 LAB_U00E +00002C18 1032 3000 6783 MOVE.b (a2,d3.w),d0 * read the next number digit +00002C1C 5343 6784 SUBQ.w #1,d3 * decrement the read index +00002C1E B004 6785 CMP.b d4,d0 * compare the digit with "." +00002C20 66E4 6786 BNE.s LAB_U00D * if not "." go save the digit +00002C22 6787 +00002C22 60F4 6788 BRA.s LAB_U00E * else go get the next digit +00002C24 6789 +00002C24 6790 LAB_U00F +00002C24 1584 2000 6791 MOVE.b d4,(a2,d2.w) * save the decimal point +00002C28 6792 LAB_U010 +00002C28 4A42 6793 TST.w d2 * test the number string decimal point index +00002C2A 6602 6794 BNE.s LAB_U014 * if dp present skip the reset +00002C2C 6795 +00002C2C 3406 6796 MOVE.w d6,d2 * make the decimal point index = the length +00002C2E 6797 +00002C2E 6798 * copy the fractional digit characters from the number string 00002C2E 6799 -00002C2E 6800 * copy the fractional digit characters from the number string -00002C2E 6801 -00002C2E 6802 LAB_U014 -00002C2E 3602 6803 MOVE.w d2,d3 * copy the number string decimal point index -00002C30 5243 6804 ADDQ.w #1,d3 * increment the number string index -00002C32 382F 0008 6805 MOVE.w fsdpi(sp),d4 * get the new format string decimal point index -00002C36 6806 LAB_U018 -00002C36 5244 6807 ADDQ.w #1,d4 * increment the new format string index -00002C38 B244 6808 CMP.w d4,d1 * compare it with the new format string length -00002C3A 6322 6809 BLS.s LAB_U022 * if done the fraction digits go do integer -00002C3C 6810 -00002C3C 1030 4000 6811 MOVE.b (a0,d4.w),d0 * get a new format string character -00002C40 B03C 0025 6812 CMP.b #'%',d0 * compare it with "%" -00002C44 6706 6813 BEQ.s LAB_U01C * if "%" go copy a number character -00002C46 6814 -00002C46 B03C 0023 6815 CMP.b #'#',d0 * compare it with "#" -00002C4A 66EA 6816 BNE.s LAB_U018 * if not "#" go do the next new format character -00002C4C 6817 -00002C4C 6818 LAB_U01C -00002C4C 7030 6819 MOVEQ #'0',d0 * default to "0" character -00002C4E BC43 6820 CMP.w d3,d6 * compare the number string index with length -00002C50 6306 6821 BLS.s LAB_U020 * if there skip the character get -00002C52 6822 -00002C52 1032 3000 6823 MOVE.b (a2,d3.w),d0 * get a character from the number string -00002C56 5243 6824 ADDQ.w #1,d3 * increment the number string index -00002C58 6825 LAB_U020 -00002C58 1180 4000 6826 MOVE.b d0,(a0,d4.w) * save the number character to the new format -00002C5C 6827 * string -00002C5C 60D8 6828 BRA.s LAB_U018 * go do the next new format character +00002C2E 6800 LAB_U014 +00002C2E 3602 6801 MOVE.w d2,d3 * copy the number string decimal point index +00002C30 5243 6802 ADDQ.w #1,d3 * increment the number string index +00002C32 382F 0008 6803 MOVE.w fsdpi(sp),d4 * get the new format string decimal point index +00002C36 6804 LAB_U018 +00002C36 5244 6805 ADDQ.w #1,d4 * increment the new format string index +00002C38 B244 6806 CMP.w d4,d1 * compare it with the new format string length +00002C3A 6322 6807 BLS.s LAB_U022 * if done the fraction digits go do integer +00002C3C 6808 +00002C3C 1030 4000 6809 MOVE.b (a0,d4.w),d0 * get a new format string character +00002C40 B03C 0025 6810 CMP.b #'%',d0 * compare it with "%" +00002C44 6706 6811 BEQ.s LAB_U01C * if "%" go copy a number character +00002C46 6812 +00002C46 B03C 0023 6813 CMP.b #'#',d0 * compare it with "#" +00002C4A 66EA 6814 BNE.s LAB_U018 * if not "#" go do the next new format character +00002C4C 6815 +00002C4C 6816 LAB_U01C +00002C4C 7030 6817 MOVEQ #'0',d0 * default to "0" character +00002C4E BC43 6818 CMP.w d3,d6 * compare the number string index with length +00002C50 6306 6819 BLS.s LAB_U020 * if there skip the character get +00002C52 6820 +00002C52 1032 3000 6821 MOVE.b (a2,d3.w),d0 * get a character from the number string +00002C56 5243 6822 ADDQ.w #1,d3 * increment the number string index +00002C58 6823 LAB_U020 +00002C58 1180 4000 6824 MOVE.b d0,(a0,d4.w) * save the number character to the new format +00002C5C 6825 * string +00002C5C 60D8 6826 BRA.s LAB_U018 * go do the next new format character +00002C5E 6827 +00002C5E 6828 * now copy the integer digit characters from the number string 00002C5E 6829 -00002C5E 6830 * now copy the integer digit characters from the number string -00002C5E 6831 -00002C5E 6832 LAB_U022 -00002C5E 7C00 6833 MOVEQ #0,d6 * clear the sign done flag -00002C60 7A00 6834 MOVEQ #0,d5 * clear the sign present flag -00002C62 5342 6835 SUBQ.w #1,d2 * decrement the number string index -00002C64 6608 6836 BNE.s LAB_U026 * if not now at sign continue -00002C66 6837 -00002C66 7401 6838 MOVEQ #1,d2 * increment the number string index -00002C68 15BC 0030 2000 6839 MOVE.b #'0',(a2,d2.w) * replace the point with a zero -00002C6E 6840 LAB_U026 -00002C6E 382F 0008 6841 MOVE.w fsdpi(sp),d4 * get the new format string decimal point index -00002C72 B244 6842 CMP.w d4,d1 * compare it with the new format string length -00002C74 6402 6843 BCC.s LAB_U02A * if within the string go use the index -00002C76 6844 -00002C76 3801 6845 MOVE.w d1,d4 * else set the index to the end of the string -00002C78 6846 LAB_U02A -00002C78 5344 6847 SUBQ.w #1,d4 * decrement the new format string index -00002C7A 6B62 6848 BMI.s LAB_U03E * if all done go test for any overflow -00002C7C 6849 -00002C7C 1030 4000 6850 MOVE.b (a0,d4.w),d0 * else get a new format string character -00002C80 6851 -00002C80 7E30 6852 MOVEQ #'0',d7 * default to "0" character -00002C82 B03C 0025 6853 CMP.b #'%',d0 * compare it with "%" -00002C86 6708 6854 BEQ.s LAB_U02B * if "%" go copy a number character -00002C88 6855 -00002C88 7E20 6856 MOVEQ #' ',d7 * default to " " character -00002C8A B03C 0023 6857 CMP.b #'#',d0 * compare it with "#" -00002C8E 6606 6858 BNE.s LAB_U02C * if not "#" go try "," -00002C90 6859 -00002C90 6860 LAB_U02B -00002C90 4A42 6861 TST.w d2 * test the number string index -00002C92 6634 6862 BNE.s LAB_U036 * if not at the sign go get a number character -00002C94 6863 -00002C94 6042 6864 BRA.s LAB_U03C * else go save the default character -00002C96 6865 -00002C96 6866 LAB_U02C -00002C96 B03C 002C 6867 CMP.b #',',d0 * compare it with "," -00002C9A 6610 6868 BNE.s LAB_U030 * if not "," go try the sign characters -00002C9C 6869 -00002C9C 4A42 6870 TST.w d2 * test the number string index -00002C9E 6608 6871 BNE.s LAB_U02E * if not at the sign keep the "," -00002CA0 6872 -00002CA0 0C30 0025 40FF 6873 CMP.b #'%',-1(a0,d4.w) * else compare the next format string character -00002CA6 6874 * with "%" -00002CA6 6630 6875 BNE.s LAB_U03C * if not "%" keep the default character -00002CA8 6876 -00002CA8 6877 LAB_U02E -00002CA8 1E00 6878 MOVE.b d0,d7 * else use the "," character -00002CAA 602C 6879 BRA.s LAB_U03C * go save the character to the string -00002CAC 6880 -00002CAC 6881 LAB_U030 -00002CAC B03C 002D 6882 CMP.b #'-',d0 * compare it with "-" -00002CB0 6710 6883 BEQ.s LAB_U034 * if "-" go do the sign character -00002CB2 6884 -00002CB2 B03C 002B 6885 CMP.b #'+',d0 * compare it with "+" -00002CB6 66C0 6886 BNE.s LAB_U02A * if not "+" go do the next new format character -00002CB8 6887 -00002CB8 0C12 002D 6888 CMP.b #'-',(a2) * compare the sign character with "-" -00002CBC 6704 6889 BEQ.s LAB_U034 * if "-" don't change the sign character -00002CBE 6890 -00002CBE 14BC 002B 6891 MOVE.b #'+',(a2) * else make the sign character "+" -00002CC2 6892 LAB_U034 -00002CC2 1A00 6893 MOVE.b d0,d5 * set the sign present flag -00002CC4 4A42 6894 TST.w d2 * test the number string index -00002CC6 6708 6895 BEQ.s LAB_U038 * if at the sign keep the default character -00002CC8 6896 -00002CC8 6897 LAB_U036 -00002CC8 1E32 2000 6898 MOVE.b (a2,d2.w),d7 * else get a character from the number string -00002CCC 5342 6899 SUBQ.w #1,d2 * decrement the number string index -00002CCE 6008 6900 BRA.s LAB_U03C * go save the character -00002CD0 6901 -00002CD0 6902 LAB_U038 -00002CD0 4A06 6903 TST.b d6 * test the sign done flag -00002CD2 6604 6904 BNE.s LAB_U03C * if the sign has been done go use the space -00002CD4 6905 * character -00002CD4 6906 -00002CD4 1E12 6907 MOVE.b (a2),d7 * else get the sign character -00002CD6 1C07 6908 MOVE.b d7,d6 * flag that the sign has been done -00002CD8 6909 LAB_U03C -00002CD8 1187 4000 6910 MOVE.b d7,(a0,d4.w) * save the number character to the new format -00002CDC 6911 * string -00002CDC 609A 6912 BRA.s LAB_U02A * go do the next new format character +00002C5E 6830 LAB_U022 +00002C5E 7C00 6831 MOVEQ #0,d6 * clear the sign done flag +00002C60 7A00 6832 MOVEQ #0,d5 * clear the sign present flag +00002C62 5342 6833 SUBQ.w #1,d2 * decrement the number string index +00002C64 6608 6834 BNE.s LAB_U026 * if not now at sign continue +00002C66 6835 +00002C66 7401 6836 MOVEQ #1,d2 * increment the number string index +00002C68 15BC 0030 2000 6837 MOVE.b #'0',(a2,d2.w) * replace the point with a zero +00002C6E 6838 LAB_U026 +00002C6E 382F 0008 6839 MOVE.w fsdpi(sp),d4 * get the new format string decimal point index +00002C72 B244 6840 CMP.w d4,d1 * compare it with the new format string length +00002C74 6402 6841 BCC.s LAB_U02A * if within the string go use the index +00002C76 6842 +00002C76 3801 6843 MOVE.w d1,d4 * else set the index to the end of the string +00002C78 6844 LAB_U02A +00002C78 5344 6845 SUBQ.w #1,d4 * decrement the new format string index +00002C7A 6B62 6846 BMI.s LAB_U03E * if all done go test for any overflow +00002C7C 6847 +00002C7C 1030 4000 6848 MOVE.b (a0,d4.w),d0 * else get a new format string character +00002C80 6849 +00002C80 7E30 6850 MOVEQ #'0',d7 * default to "0" character +00002C82 B03C 0025 6851 CMP.b #'%',d0 * compare it with "%" +00002C86 6708 6852 BEQ.s LAB_U02B * if "%" go copy a number character +00002C88 6853 +00002C88 7E20 6854 MOVEQ #' ',d7 * default to " " character +00002C8A B03C 0023 6855 CMP.b #'#',d0 * compare it with "#" +00002C8E 6606 6856 BNE.s LAB_U02C * if not "#" go try "," +00002C90 6857 +00002C90 6858 LAB_U02B +00002C90 4A42 6859 TST.w d2 * test the number string index +00002C92 6634 6860 BNE.s LAB_U036 * if not at the sign go get a number character +00002C94 6861 +00002C94 6042 6862 BRA.s LAB_U03C * else go save the default character +00002C96 6863 +00002C96 6864 LAB_U02C +00002C96 B03C 002C 6865 CMP.b #',',d0 * compare it with "," +00002C9A 6610 6866 BNE.s LAB_U030 * if not "," go try the sign characters +00002C9C 6867 +00002C9C 4A42 6868 TST.w d2 * test the number string index +00002C9E 6608 6869 BNE.s LAB_U02E * if not at the sign keep the "," +00002CA0 6870 +00002CA0 0C30 0025 40FF 6871 CMP.b #'%',-1(a0,d4.w) * else compare the next format string character +00002CA6 6872 * with "%" +00002CA6 6630 6873 BNE.s LAB_U03C * if not "%" keep the default character +00002CA8 6874 +00002CA8 6875 LAB_U02E +00002CA8 1E00 6876 MOVE.b d0,d7 * else use the "," character +00002CAA 602C 6877 BRA.s LAB_U03C * go save the character to the string +00002CAC 6878 +00002CAC 6879 LAB_U030 +00002CAC B03C 002D 6880 CMP.b #'-',d0 * compare it with "-" +00002CB0 6710 6881 BEQ.s LAB_U034 * if "-" go do the sign character +00002CB2 6882 +00002CB2 B03C 002B 6883 CMP.b #'+',d0 * compare it with "+" +00002CB6 66C0 6884 BNE.s LAB_U02A * if not "+" go do the next new format character +00002CB8 6885 +00002CB8 0C12 002D 6886 CMP.b #'-',(a2) * compare the sign character with "-" +00002CBC 6704 6887 BEQ.s LAB_U034 * if "-" don't change the sign character +00002CBE 6888 +00002CBE 14BC 002B 6889 MOVE.b #'+',(a2) * else make the sign character "+" +00002CC2 6890 LAB_U034 +00002CC2 1A00 6891 MOVE.b d0,d5 * set the sign present flag +00002CC4 4A42 6892 TST.w d2 * test the number string index +00002CC6 6708 6893 BEQ.s LAB_U038 * if at the sign keep the default character +00002CC8 6894 +00002CC8 6895 LAB_U036 +00002CC8 1E32 2000 6896 MOVE.b (a2,d2.w),d7 * else get a character from the number string +00002CCC 5342 6897 SUBQ.w #1,d2 * decrement the number string index +00002CCE 6008 6898 BRA.s LAB_U03C * go save the character +00002CD0 6899 +00002CD0 6900 LAB_U038 +00002CD0 4A06 6901 TST.b d6 * test the sign done flag +00002CD2 6604 6902 BNE.s LAB_U03C * if the sign has been done go use the space +00002CD4 6903 * character +00002CD4 6904 +00002CD4 1E12 6905 MOVE.b (a2),d7 * else get the sign character +00002CD6 1C07 6906 MOVE.b d7,d6 * flag that the sign has been done +00002CD8 6907 LAB_U03C +00002CD8 1187 4000 6908 MOVE.b d7,(a0,d4.w) * save the number character to the new format +00002CDC 6909 * string +00002CDC 609A 6910 BRA.s LAB_U02A * go do the next new format character +00002CDE 6911 +00002CDE 6912 * test for overflow conditions 00002CDE 6913 -00002CDE 6914 * test for overflow conditions -00002CDE 6915 -00002CDE 6916 LAB_U03E -00002CDE 4A42 6917 TST.w d2 * test the number string index -00002CE0 6614 6918 BNE.s LAB_U040 * if all the digits aren't done go output -00002CE2 6919 * an overflow indication +00002CDE 6914 LAB_U03E +00002CDE 4A42 6915 TST.w d2 * test the number string index +00002CE0 6614 6916 BNE.s LAB_U040 * if all the digits aren't done go output +00002CE2 6917 * an overflow indication +00002CE2 6918 +00002CE2 6919 * test for sign overflows 00002CE2 6920 -00002CE2 6921 * test for sign overflows -00002CE2 6922 -00002CE2 4A05 6923 TST.b d5 * test the sign present flag -00002CE4 6754 6924 BEQ.s LAB_U04A * if no sign present go add the string +00002CE2 4A05 6921 TST.b d5 * test the sign present flag +00002CE4 6754 6922 BEQ.s LAB_U04A * if no sign present go add the string +00002CE6 6923 +00002CE6 6924 * there was a sign in the format string 00002CE6 6925 -00002CE6 6926 * there was a sign in the format string -00002CE6 6927 -00002CE6 4A06 6928 TST.b d6 * test the sign done flag -00002CE8 6650 6929 BNE.s LAB_U04A * if the sign is done go add the string +00002CE6 4A06 6926 TST.b d6 * test the sign done flag +00002CE8 6650 6927 BNE.s LAB_U04A * if the sign is done go add the string +00002CEA 6928 +00002CEA 6929 * the sign isn't done so see if it was mandatory 00002CEA 6930 -00002CEA 6931 * the sign isn't done so see if it was mandatory -00002CEA 6932 -00002CEA 0C05 002B 6933 CMPI.b #'+',d5 * compare the sign with "+" -00002CEE 6706 6934 BEQ.s LAB_U040 * if it was "+" go output an overflow -00002CF0 6935 * indication +00002CEA 0C05 002B 6931 CMPI.b #'+',d5 * compare the sign with "+" +00002CEE 6706 6932 BEQ.s LAB_U040 * if it was "+" go output an overflow +00002CF0 6933 * indication +00002CF0 6934 +00002CF0 6935 * the sign wasn't mandatory but the number may have been negative 00002CF0 6936 -00002CF0 6937 * the sign wasn't mandatory but the number may have been negative -00002CF0 6938 -00002CF0 0C12 002D 6939 CMP.b #'-',(a2) * compare the sign character with "-" -00002CF4 6644 6940 BNE.s LAB_U04A * if it wasn't "-" go add the string +00002CF0 0C12 002D 6937 CMP.b #'-',(a2) * compare the sign character with "-" +00002CF4 6644 6938 BNE.s LAB_U04A * if it wasn't "-" go add the string +00002CF6 6939 +00002CF6 6940 * else the sign was "-" and a sign hasn't been output so .. 00002CF6 6941 -00002CF6 6942 * else the sign was "-" and a sign hasn't been output so .. -00002CF6 6943 -00002CF6 6944 * the number overflowed the format string so replace all the special format characters -00002CF6 6945 * with the overflow character -00002CF6 6946 -00002CF6 6947 LAB_U040 -00002CF6 7A23 6948 MOVEQ #ofchr,d5 * set the overflow character -00002CF8 3E01 6949 MOVE.w d1,d7 * copy the new format string length -00002CFA 5347 6950 SUBQ.w #1,d7 * adjust for the loop type -00002CFC 3C2F 0004 6951 MOVE.w fsti(sp),d6 * copy the new format string last index -00002D00 5346 6952 SUBQ.w #1,d6 * -1 gives the last character of this string -00002D02 6E02 6953 BGT.s LAB_U044 * if not zero continue -00002D04 6954 -00002D04 3C07 6955 MOVE.w d7,d6 * else set the format string index to the end -00002D06 6956 LAB_U044 -00002D06 1031 6000 6957 MOVE.b (a1,d6.w),d0 * get a character from the format string -00002D0A 0C00 0023 6958 CMPI.b #'#',d0 * compare it with "#" special format character -00002D0E 671E 6959 BEQ.s LAB_U046 * if "#" go use the overflow character -00002D10 6960 -00002D10 0C00 0025 6961 CMPI.b #'%',d0 * compare it with "%" special format character -00002D14 6718 6962 BEQ.s LAB_U046 * if "%" go use the overflow character -00002D16 6963 -00002D16 0C00 002C 6964 CMPI.b #',',d0 * compare it with "," special format character -00002D1A 6712 6965 BEQ.s LAB_U046 * if "," go use the overflow character -00002D1C 6966 -00002D1C 0C00 002B 6967 CMPI.b #'+',d0 * compare it with "+" special format character -00002D20 670C 6968 BEQ.s LAB_U046 * if "+" go use the overflow character -00002D22 6969 -00002D22 0C00 002D 6970 CMPI.b #'-',d0 * compare it with "-" special format character -00002D26 6706 6971 BEQ.s LAB_U046 * if "-" go use the overflow character -00002D28 6972 -00002D28 0C00 002E 6973 CMPI.b #'.',d0 * compare it with "." special format character -00002D2C 6602 6974 BNE.s LAB_U048 * if not "." skip the using overflow character -00002D2E 6975 -00002D2E 6976 LAB_U046 -00002D2E 1005 6977 MOVE.b d5,d0 * use the overflow character -00002D30 6978 LAB_U048 -00002D30 1180 7000 6979 MOVE.b d0,(a0,d7.w) * save the character to the new format string -00002D34 5346 6980 SUBQ.w #1,d6 * decrement the format string index -00002D36 51CF FFCE 6981 DBF d7,LAB_U044 * decrement the count and loop if not all done +00002CF6 6942 * the number overflowed the format string so replace all the special format characters +00002CF6 6943 * with the overflow character +00002CF6 6944 +00002CF6 6945 LAB_U040 +00002CF6 7A23 6946 MOVEQ #ofchr,d5 * set the overflow character +00002CF8 3E01 6947 MOVE.w d1,d7 * copy the new format string length +00002CFA 5347 6948 SUBQ.w #1,d7 * adjust for the loop type +00002CFC 3C2F 0004 6949 MOVE.w fsti(sp),d6 * copy the new format string last index +00002D00 5346 6950 SUBQ.w #1,d6 * -1 gives the last character of this string +00002D02 6E02 6951 BGT.s LAB_U044 * if not zero continue +00002D04 6952 +00002D04 3C07 6953 MOVE.w d7,d6 * else set the format string index to the end +00002D06 6954 LAB_U044 +00002D06 1031 6000 6955 MOVE.b (a1,d6.w),d0 * get a character from the format string +00002D0A 0C00 0023 6956 CMPI.b #'#',d0 * compare it with "#" special format character +00002D0E 671E 6957 BEQ.s LAB_U046 * if "#" go use the overflow character +00002D10 6958 +00002D10 0C00 0025 6959 CMPI.b #'%',d0 * compare it with "%" special format character +00002D14 6718 6960 BEQ.s LAB_U046 * if "%" go use the overflow character +00002D16 6961 +00002D16 0C00 002C 6962 CMPI.b #',',d0 * compare it with "," special format character +00002D1A 6712 6963 BEQ.s LAB_U046 * if "," go use the overflow character +00002D1C 6964 +00002D1C 0C00 002B 6965 CMPI.b #'+',d0 * compare it with "+" special format character +00002D20 670C 6966 BEQ.s LAB_U046 * if "+" go use the overflow character +00002D22 6967 +00002D22 0C00 002D 6968 CMPI.b #'-',d0 * compare it with "-" special format character +00002D26 6706 6969 BEQ.s LAB_U046 * if "-" go use the overflow character +00002D28 6970 +00002D28 0C00 002E 6971 CMPI.b #'.',d0 * compare it with "." special format character +00002D2C 6602 6972 BNE.s LAB_U048 * if not "." skip the using overflow character +00002D2E 6973 +00002D2E 6974 LAB_U046 +00002D2E 1005 6975 MOVE.b d5,d0 * use the overflow character +00002D30 6976 LAB_U048 +00002D30 1180 7000 6977 MOVE.b d0,(a0,d7.w) * save the character to the new format string +00002D34 5346 6978 SUBQ.w #1,d6 * decrement the format string index +00002D36 51CF FFCE 6979 DBF d7,LAB_U044 * decrement the count and loop if not all done +00002D3A 6980 +00002D3A 6981 * add the new string to the previous string 00002D3A 6982 -00002D3A 6983 * add the new string to the previous string -00002D3A 6984 -00002D3A 6985 LAB_U04A -00002D3A 41EC 0006 6986 LEA 6(a4),a0 * get the descriptor pointer for string 1 -00002D3E 274C 0DF4 6987 MOVE.l a4,FAC1_m(a3) * save the descriptor pointer for string 2 -00002D42 6100 F010 6988 BSR LAB_224E * concatenate the strings +00002D3A 6983 LAB_U04A +00002D3A 41EC 0006 6984 LEA 6(a4),a0 * get the descriptor pointer for string 1 +00002D3E 274C 0590 6985 MOVE.l a4,FAC1_m(a3) * save the descriptor pointer for string 2 +00002D42 6100 F010 6986 BSR LAB_224E * concatenate the strings +00002D46 6987 +00002D46 6988 * now check for any tail on the format string 00002D46 6989 -00002D46 6990 * now check for any tail on the format string -00002D46 6991 -00002D46 302F 0004 6992 MOVE.w fsti(sp),d0 * get this index -00002D4A 6720 6993 BEQ.s LAB_U04C * if at start of string skip the output -00002D4C 6994 -00002D4C 3F40 0006 6995 MOVE.w d0,fsli(sp) * save this index to the last index -00002D50 6100 0084 6996 BSR LAB_ProcFo * now process the format string -00002D54 4A02 6997 TST.b d2 * test the special characters flag -00002D56 6614 6998 BNE.s LAB_U04C * if special characters present skip the output +00002D46 302F 0004 6990 MOVE.w fsti(sp),d0 * get this index +00002D4A 6720 6991 BEQ.s LAB_U04C * if at start of string skip the output +00002D4C 6992 +00002D4C 3F40 0006 6993 MOVE.w d0,fsli(sp) * save this index to the last index +00002D50 6100 0084 6994 BSR LAB_ProcFo * now process the format string +00002D54 4A02 6995 TST.b d2 * test the special characters flag +00002D56 6614 6996 BNE.s LAB_U04C * if special characters present skip the output +00002D58 6997 +00002D58 6998 * else output the new string part 00002D58 6999 -00002D58 7000 * else output the new string part -00002D58 7001 -00002D58 613E 7002 BSR.s LAB_DupFmt * duplicate the processed format string section -00002D5A 3F6F 0004 0006 7003 MOVE.w fsti(sp),fsli(sp) * copy this index to the last index +00002D58 613E 7000 BSR.s LAB_DupFmt * duplicate the processed format string section +00002D5A 3F6F 0004 0006 7001 MOVE.w fsti(sp),fsli(sp) * copy this index to the last index +00002D60 7002 +00002D60 7003 * add the new string to the previous string 00002D60 7004 -00002D60 7005 * add the new string to the previous string -00002D60 7006 -00002D60 41EC 0006 7007 LEA 6(a4),a0 * get the descriptor pointer for string 1 -00002D64 274C 0DF4 7008 MOVE.l a4,FAC1_m(a3) * save the descriptor pointer for string 2 -00002D68 6100 EFEA 7009 BSR LAB_224E * concatenate the strings +00002D60 41EC 0006 7005 LEA 6(a4),a0 * get the descriptor pointer for string 1 +00002D64 274C 0590 7006 MOVE.l a4,FAC1_m(a3) * save the descriptor pointer for string 2 +00002D68 6100 EFEA 7007 BSR LAB_224E * concatenate the strings +00002D6C 7008 +00002D6C 7009 * check for another value or end of function 00002D6C 7010 -00002D6C 7011 * check for another value or end of function -00002D6C 7012 -00002D6C 7013 LAB_U04C -00002D6C 101D 7014 MOVE.b (a5)+,d0 * get the next BASIC byte -00002D6E B03C 0029 7015 CMP.b #')',d0 * compare with close bracket -00002D72 6600 FDCA 7016 BNE LAB_U002 * if not ")" go do next value +00002D6C 7011 LAB_U04C +00002D6C 101D 7012 MOVE.b (a5)+,d0 * get the next BASIC byte +00002D6E B03C 0029 7013 CMP.b #')',d0 * compare with close bracket +00002D72 6600 FDCA 7014 BNE LAB_U002 * if not ")" go do next value +00002D76 7015 +00002D76 7016 * pop the result string off the descriptor stack 00002D76 7017 -00002D76 7018 * pop the result string off the descriptor stack -00002D76 7019 -00002D76 204C 7020 MOVEA.l a4,a0 * copy the result string descriptor pointer -00002D78 222B 0CAA 7021 MOVE.l Sstorl(a3),d1 * save the bottom of string space -00002D7C 6100 F038 7022 BSR LAB_22BA * pop (a0) descriptor, returns with .. -00002D80 7023 * d0 = length, a0 = pointer -00002D80 2741 0CAA 7024 MOVE.l d1,Sstorl(a3) * restore the bottom of string space -00002D84 2248 7025 MOVEA.l a0,a1 * copy the string result pointer -00002D86 3200 7026 MOVE.w d0,d1 * copy the string result length +00002D76 204C 7018 MOVEA.l a4,a0 * copy the result string descriptor pointer +00002D78 222B 0446 7019 MOVE.l Sstorl(a3),d1 * save the bottom of string space +00002D7C 6100 F038 7020 BSR LAB_22BA * pop (a0) descriptor, returns with .. +00002D80 7021 * d0 = length, a0 = pointer +00002D80 2741 0446 7022 MOVE.l d1,Sstorl(a3) * restore the bottom of string space +00002D84 2248 7023 MOVEA.l a0,a1 * copy the string result pointer +00002D86 3200 7024 MOVE.w d0,d1 * copy the string result length +00002D88 7025 +00002D88 7026 * pop the format string off the descriptor stack 00002D88 7027 -00002D88 7028 * pop the format string off the descriptor stack -00002D88 7029 -00002D88 205F 7030 MOVEA.l (sp)+,a0 * pull the format string descriptor pointer -00002D8A 6100 F02A 7031 BSR LAB_22BA * pop (a0) descriptor, returns with .. -00002D8E 7032 * d0 = length, a0 = pointer -00002D8E 7033 -00002D8E 4FEF 0008 7034 LEA fend(sp),sp * dump the saved values +00002D88 205F 7028 MOVEA.l (sp)+,a0 * pull the format string descriptor pointer +00002D8A 6100 F02A 7029 BSR LAB_22BA * pop (a0) descriptor, returns with .. +00002D8E 7030 * d0 = length, a0 = pointer +00002D8E 7031 +00002D8E 4FEF 0008 7032 LEA fend(sp),sp * dump the saved values +00002D92 7033 +00002D92 7034 * push the result string back on the descriptor stack and return 00002D92 7035 -00002D92 7036 * push the result string back on the descriptor stack and return -00002D92 7037 -00002D92 2049 7038 MOVEA.l a1,a0 * copy the result string pointer back -00002D94 6000 EE6E 7039 BRA LAB_RTST * push a string on the descriptor stack and -00002D98 7040 * return. a0 = pointer, d1 = length -00002D98 7041 -00002D98 7042 -00002D98 7043 ************************************************************************************* -00002D98 7044 * -00002D98 7045 * duplicate the processed format string section -00002D98 7046 -00002D98 7047 * make a string as long as the format string -00002D98 7048 LAB_DupFmt -00002D98 226F 0004 7049 MOVEA.l 4+fsd(sp),a1 * get the format string descriptor pointer -00002D9C 3E29 0004 7050 MOVE.w 4(a1),d7 * get the format string length -00002DA0 342F 000A 7051 MOVE.w 4+fsli(sp),d2 * get the format string last index -00002DA4 3C2F 0008 7052 MOVE.w 4+fsti(sp),d6 * get the format string this index -00002DA8 3206 7053 MOVE.w d6,d1 * copy the format string this index -00002DAA 9242 7054 SUB.w d2,d1 * subtract the format string last index -00002DAC 6202 7055 BHI.s LAB_D002 * if > 0 skip the correction -00002DAE 7056 -00002DAE D247 7057 ADD.w d7,d1 * else add the format string length as the -00002DB0 7058 * correction -00002DB0 7059 LAB_D002 -00002DB0 6100 EE6C 7060 BSR LAB_2115 * make string space d1 bytes long -00002DB4 7061 * return a0/Sutill = pointer, others unchanged +00002D92 2049 7036 MOVEA.l a1,a0 * copy the result string pointer back +00002D94 6000 EE6E 7037 BRA LAB_RTST * push a string on the descriptor stack and +00002D98 7038 * return. a0 = pointer, d1 = length +00002D98 7039 +00002D98 7040 +00002D98 7041 ************************************************************************************* +00002D98 7042 * +00002D98 7043 * duplicate the processed format string section +00002D98 7044 +00002D98 7045 * make a string as long as the format string +00002D98 7046 LAB_DupFmt +00002D98 226F 0004 7047 MOVEA.l 4+fsd(sp),a1 * get the format string descriptor pointer +00002D9C 3E29 0004 7048 MOVE.w 4(a1),d7 * get the format string length +00002DA0 342F 000A 7049 MOVE.w 4+fsli(sp),d2 * get the format string last index +00002DA4 3C2F 0008 7050 MOVE.w 4+fsti(sp),d6 * get the format string this index +00002DA8 3206 7051 MOVE.w d6,d1 * copy the format string this index +00002DAA 9242 7052 SUB.w d2,d1 * subtract the format string last index +00002DAC 6202 7053 BHI.s LAB_D002 * if > 0 skip the correction +00002DAE 7054 +00002DAE D247 7055 ADD.w d7,d1 * else add the format string length as the +00002DB0 7056 * correction +00002DB0 7057 LAB_D002 +00002DB0 6100 EE6C 7058 BSR LAB_2115 * make string space d1 bytes long +00002DB4 7059 * return a0/Sutill = pointer, others unchanged +00002DB4 7060 +00002DB4 7061 * push the new string on the descriptor stack 00002DB4 7062 -00002DB4 7063 * push the new string on the descriptor stack -00002DB4 7064 -00002DB4 6100 EE4E 7065 BSR LAB_RTST * push a string on the descriptor stack and -00002DB8 7066 * return. a0 = pointer, d1 = length +00002DB4 6100 EE4E 7063 BSR LAB_RTST * push a string on the descriptor stack and +00002DB8 7064 * return. a0 = pointer, d1 = length +00002DB8 7065 +00002DB8 7066 * copy the characters from the format string 00002DB8 7067 -00002DB8 7068 * copy the characters from the format string -00002DB8 7069 -00002DB8 226F 0004 7070 MOVEA.l 4+fsd(sp),a1 * get the format string descriptor pointer -00002DBC 2251 7071 MOVEA.l (a1),a1 * get the format string pointer -00002DBE 7800 7072 MOVEQ #0,d4 * clear the new string index -00002DC0 7073 LAB_D00A -00002DC0 11B1 2000 4000 7074 MOVE.b (a1,d2.w),(a0,d4.w) * get a character from the format string and -00002DC6 7075 * save it to the new string -00002DC6 5244 7076 ADDQ.w #1,d4 * increment the new string index -00002DC8 5242 7077 ADDQ.w #1,d2 * increment the format string index -00002DCA BE42 7078 CMP.w d2,d7 * compare the format index with the length -00002DCC 6602 7079 BNE.s LAB_D00E * if not there skip the reset -00002DCE 7080 -00002DCE 7400 7081 MOVEQ #0,d2 * else reset the format string index -00002DD0 7082 LAB_D00E -00002DD0 BC42 7083 CMP.w d2,d6 * compare the index with this index -00002DD2 66EC 7084 BNE.s LAB_D00A * if not equal go do the next character -00002DD4 7085 -00002DD4 4E75 7086 RTS -00002DD6 7087 -00002DD6 7088 -00002DD6 7089 ************************************************************************************** -00002DD6 7090 * -00002DD6 7091 * process the format string -00002DD6 7092 -00002DD6 7093 LAB_ProcFo -00002DD6 226F 0004 7094 MOVEA.l 4+fsd(sp),a1 * get the format string descriptor pointer -00002DDA 3E29 0004 7095 MOVE.w 4(a1),d7 * get the format string length -00002DDE 2251 7096 MOVEA.l (a1),a1 * get the format string pointer -00002DE0 3C2F 000A 7097 MOVE.w 4+fsli(sp),d6 * get the format string last index -00002DE4 7098 -00002DE4 3F47 000C 7099 MOVE.w d7,4+fsdpi(sp) * set the format string decimal point index -00002DE8 7100 *## MOVE.w #-1,4+fsdpi(sp) * set the format string decimal point index -00002DE8 7A00 7101 MOVEQ #0,d5 * no decimal point -00002DEA 7600 7102 MOVEQ #0,d3 * no decimal characters -00002DEC 7400 7103 MOVEQ #0,d2 * no special characters -00002DEE 7104 LAB_P004 -00002DEE 1031 6000 7105 MOVE.b (a1,d6.w),d0 * get a format string byte -00002DF2 7106 -00002DF2 B03C 002C 7107 CMP.b #',',d0 * compare it with "," -00002DF6 6742 7108 BEQ.s LAB_P01A * if "," go do the next format string byte -00002DF8 7109 -00002DF8 B03C 0023 7110 CMP.b #'#',d0 * compare it with "#" -00002DFC 6706 7111 BEQ.s LAB_P008 * if "#" go flag special characters -00002DFE 7112 -00002DFE B03C 0025 7113 CMP.b #'%',d0 * compare it with "%" -00002E02 6608 7114 BNE.s LAB_P00C * if not "%" go try "+" -00002E04 7115 -00002E04 7116 LAB_P008 -00002E04 4A85 7117 TST.l d5 * test the decimal point flag -00002E06 6A10 7118 BPL.s LAB_P00E * if no point skip counting decimal characters -00002E08 7119 -00002E08 5243 7120 ADDQ.w #1,d3 * else increment the decimal character count -00002E0A 602E 7121 BRA.s LAB_P01A * go do the next character -00002E0C 7122 -00002E0C 7123 LAB_P00C -00002E0C B03C 002B 7124 CMP.b #'+',d0 * compare it with "+" -00002E10 6706 7125 BEQ.s LAB_P00E * if "+" go flag special characters -00002E12 7126 -00002E12 B03C 002D 7127 CMP.b #'-',d0 * compare it with "-" -00002E16 6604 7128 BNE.s LAB_P010 * if not "-" go check decimal point -00002E18 7129 -00002E18 7130 LAB_P00E -00002E18 8400 7131 OR.b d0,d2 * flag special characters -00002E1A 601E 7132 BRA.s LAB_P01A * go do the next character -00002E1C 7133 -00002E1C 7134 LAB_P010 -00002E1C B03C 002E 7135 CMP.b #'.',d0 * compare it with "." -00002E20 6614 7136 BNE.s LAB_P018 * if not "." go check next +00002DB8 226F 0004 7068 MOVEA.l 4+fsd(sp),a1 * get the format string descriptor pointer +00002DBC 2251 7069 MOVEA.l (a1),a1 * get the format string pointer +00002DBE 7800 7070 MOVEQ #0,d4 * clear the new string index +00002DC0 7071 LAB_D00A +00002DC0 11B1 2000 4000 7072 MOVE.b (a1,d2.w),(a0,d4.w) * get a character from the format string and +00002DC6 7073 * save it to the new string +00002DC6 5244 7074 ADDQ.w #1,d4 * increment the new string index +00002DC8 5242 7075 ADDQ.w #1,d2 * increment the format string index +00002DCA BE42 7076 CMP.w d2,d7 * compare the format index with the length +00002DCC 6602 7077 BNE.s LAB_D00E * if not there skip the reset +00002DCE 7078 +00002DCE 7400 7079 MOVEQ #0,d2 * else reset the format string index +00002DD0 7080 LAB_D00E +00002DD0 BC42 7081 CMP.w d2,d6 * compare the index with this index +00002DD2 66EC 7082 BNE.s LAB_D00A * if not equal go do the next character +00002DD4 7083 +00002DD4 4E75 7084 RTS +00002DD6 7085 +00002DD6 7086 +00002DD6 7087 ************************************************************************************** +00002DD6 7088 * +00002DD6 7089 * process the format string +00002DD6 7090 +00002DD6 7091 LAB_ProcFo +00002DD6 226F 0004 7092 MOVEA.l 4+fsd(sp),a1 * get the format string descriptor pointer +00002DDA 3E29 0004 7093 MOVE.w 4(a1),d7 * get the format string length +00002DDE 2251 7094 MOVEA.l (a1),a1 * get the format string pointer +00002DE0 3C2F 000A 7095 MOVE.w 4+fsli(sp),d6 * get the format string last index +00002DE4 7096 +00002DE4 3F47 000C 7097 MOVE.w d7,4+fsdpi(sp) * set the format string decimal point index +00002DE8 7098 *## MOVE.w #-1,4+fsdpi(sp) * set the format string decimal point index +00002DE8 7A00 7099 MOVEQ #0,d5 * no decimal point +00002DEA 7600 7100 MOVEQ #0,d3 * no decimal characters +00002DEC 7400 7101 MOVEQ #0,d2 * no special characters +00002DEE 7102 LAB_P004 +00002DEE 1031 6000 7103 MOVE.b (a1,d6.w),d0 * get a format string byte +00002DF2 7104 +00002DF2 B03C 002C 7105 CMP.b #',',d0 * compare it with "," +00002DF6 6742 7106 BEQ.s LAB_P01A * if "," go do the next format string byte +00002DF8 7107 +00002DF8 B03C 0023 7108 CMP.b #'#',d0 * compare it with "#" +00002DFC 6706 7109 BEQ.s LAB_P008 * if "#" go flag special characters +00002DFE 7110 +00002DFE B03C 0025 7111 CMP.b #'%',d0 * compare it with "%" +00002E02 6608 7112 BNE.s LAB_P00C * if not "%" go try "+" +00002E04 7113 +00002E04 7114 LAB_P008 +00002E04 4A85 7115 TST.l d5 * test the decimal point flag +00002E06 6A10 7116 BPL.s LAB_P00E * if no point skip counting decimal characters +00002E08 7117 +00002E08 5243 7118 ADDQ.w #1,d3 * else increment the decimal character count +00002E0A 602E 7119 BRA.s LAB_P01A * go do the next character +00002E0C 7120 +00002E0C 7121 LAB_P00C +00002E0C B03C 002B 7122 CMP.b #'+',d0 * compare it with "+" +00002E10 6706 7123 BEQ.s LAB_P00E * if "+" go flag special characters +00002E12 7124 +00002E12 B03C 002D 7125 CMP.b #'-',d0 * compare it with "-" +00002E16 6604 7126 BNE.s LAB_P010 * if not "-" go check decimal point +00002E18 7127 +00002E18 7128 LAB_P00E +00002E18 8400 7129 OR.b d0,d2 * flag special characters +00002E1A 601E 7130 BRA.s LAB_P01A * go do the next character +00002E1C 7131 +00002E1C 7132 LAB_P010 +00002E1C B03C 002E 7133 CMP.b #'.',d0 * compare it with "." +00002E20 6614 7134 BNE.s LAB_P018 * if not "." go check next +00002E22 7135 +00002E22 7136 * "." a decimal point 00002E22 7137 -00002E22 7138 * "." a decimal point -00002E22 7139 -00002E22 4A85 7140 TST.l d5 * if there is already a decimal point -00002E24 6B14 7141 BMI.s LAB_P01A * go do the next character -00002E26 7142 -00002E26 3006 7143 MOVE.w d6,d0 * copy the decimal point index -00002E28 906F 000A 7144 SUB.w 4+fsli(sp),d0 * calculate it from the scan start -00002E2C 3F40 000C 7145 MOVE.w d0,4+fsdpi(sp) * save the decimal point index -00002E30 7AFF 7146 MOVEQ #-1,d5 * flag decimal point -00002E32 8400 7147 OR.b d0,d2 * flag special characters -00002E34 6004 7148 BRA.s LAB_P01A * go do the next character +00002E22 4A85 7138 TST.l d5 * if there is already a decimal point +00002E24 6B14 7139 BMI.s LAB_P01A * go do the next character +00002E26 7140 +00002E26 3006 7141 MOVE.w d6,d0 * copy the decimal point index +00002E28 906F 000A 7142 SUB.w 4+fsli(sp),d0 * calculate it from the scan start +00002E2C 3F40 000C 7143 MOVE.w d0,4+fsdpi(sp) * save the decimal point index +00002E30 7AFF 7144 MOVEQ #-1,d5 * flag decimal point +00002E32 8400 7145 OR.b d0,d2 * flag special characters +00002E34 6004 7146 BRA.s LAB_P01A * go do the next character +00002E36 7147 +00002E36 7148 * was not a special character 00002E36 7149 -00002E36 7150 * was not a special character -00002E36 7151 -00002E36 7152 LAB_P018 -00002E36 4A02 7153 TST.b d2 * test if there have been special characters -00002E38 6608 7154 BNE.s LAB_P01E * if so exit the format string process -00002E3A 7155 -00002E3A 7156 LAB_P01A -00002E3A 5246 7157 ADDQ.w #1,d6 * increment the format string index -00002E3C BE46 7158 CMP.w d6,d7 * compare it with the format string length -00002E3E 62AE 7159 BHI.s LAB_P004 * if length > index go get the next character -00002E40 7160 -00002E40 7C00 7161 MOVEQ #0,d6 * length = index so reset the format string -00002E42 7162 * index -00002E42 7163 LAB_P01E -00002E42 3F46 0008 7164 MOVE.w d6,4+fsti(sp) * save the format string this index -00002E46 3F43 000E 7165 MOVE.w d3,4+fsdc(sp) * save the format string decimal characters -00002E4A 7166 -00002E4A 4E75 7167 RTS -00002E4C 7168 -00002E4C 7169 -00002E4C 7170 ************************************************************************************* -00002E4C 7171 * -00002E4C 7172 * perform BIN$() -00002E4C 7173 * # of leading 0s is in d1, the number is in d0 -00002E4C 7174 -00002E4C 7175 LAB_BINS -00002E4C B23C 0021 7176 CMP.b #$21,d1 * max + 1 -00002E50 6400 DB0C 7177 BCC LAB_FCER * exit if too big ( > or = ) -00002E54 7178 -00002E54 741F 7179 MOVEQ #$1F,d2 * bit count-1 -00002E56 41EB 0E1A 7180 LEA Binss(a3),a0 * point to string -00002E5A 7830 7181 MOVEQ #$30,d4 * "0" character for ADDX -00002E5C 7182 NextB1 -00002E5C 7600 7183 MOVEQ #0,d3 * clear byte -00002E5E E288 7184 LSR.l #1,d0 * shift bit into Xb -00002E60 D704 7185 ADDX.b d4,d3 * add carry and character to zero -00002E62 1183 2000 7186 MOVE.b d3,(a0,d2.w) * save character to string -00002E66 51CA FFF4 7187 DBF d2,NextB1 * decrement and loop if not done +00002E36 7150 LAB_P018 +00002E36 4A02 7151 TST.b d2 * test if there have been special characters +00002E38 6608 7152 BNE.s LAB_P01E * if so exit the format string process +00002E3A 7153 +00002E3A 7154 LAB_P01A +00002E3A 5246 7155 ADDQ.w #1,d6 * increment the format string index +00002E3C BE46 7156 CMP.w d6,d7 * compare it with the format string length +00002E3E 62AE 7157 BHI.s LAB_P004 * if length > index go get the next character +00002E40 7158 +00002E40 7C00 7159 MOVEQ #0,d6 * length = index so reset the format string +00002E42 7160 * index +00002E42 7161 LAB_P01E +00002E42 3F46 0008 7162 MOVE.w d6,4+fsti(sp) * save the format string this index +00002E46 3F43 000E 7163 MOVE.w d3,4+fsdc(sp) * save the format string decimal characters +00002E4A 7164 +00002E4A 4E75 7165 RTS +00002E4C 7166 +00002E4C 7167 +00002E4C 7168 ************************************************************************************* +00002E4C 7169 * +00002E4C 7170 * perform BIN$() +00002E4C 7171 * # of leading 0s is in d1, the number is in d0 +00002E4C 7172 +00002E4C 7173 LAB_BINS +00002E4C B23C 0021 7174 CMP.b #$21,d1 * max + 1 +00002E50 6400 DB0C 7175 BCC LAB_FCER * exit if too big ( > or = ) +00002E54 7176 +00002E54 741F 7177 MOVEQ #$1F,d2 * bit count-1 +00002E56 41EB 05B6 7178 LEA Binss(a3),a0 * point to string +00002E5A 7830 7179 MOVEQ #$30,d4 * "0" character for ADDX +00002E5C 7180 NextB1 +00002E5C 7600 7181 MOVEQ #0,d3 * clear byte +00002E5E E288 7182 LSR.l #1,d0 * shift bit into Xb +00002E60 D704 7183 ADDX.b d4,d3 * add carry and character to zero +00002E62 1183 2000 7184 MOVE.b d3,(a0,d2.w) * save character to string +00002E66 51CA FFF4 7185 DBF d2,NextB1 * decrement and loop if not done +00002E6A 7186 +00002E6A 7187 * this is the exit code and is also used by HEX$() 00002E6A 7188 -00002E6A 7189 * this is the exit code and is also used by HEX$() -00002E6A 7190 -00002E6A 7191 EndBHS -00002E6A 177C 0000 0E3A 7192 MOVE.b #0,BHsend(a3) * null terminate the string -00002E70 4A01 7193 TST.b d1 * test # of characters -00002E72 670E 7194 BEQ.s NextB2 * go truncate string -00002E74 7195 -00002E74 4481 7196 NEG.l d1 * make -ve -00002E76 0681 00000E3A 7197 ADD.l #BHsend,d1 * effectively (end-length) -00002E7C 41F3 1000 7198 LEA 0(a3,d1.w),a0 * effectively add (end-length) to pointer -00002E80 600E 7199 BRA.s BinPr * go print string +00002E6A 7189 EndBHS +00002E6A 177C 0000 05D6 7190 MOVE.b #0,BHsend(a3) * null terminate the string +00002E70 4A01 7191 TST.b d1 * test # of characters +00002E72 670E 7192 BEQ.s NextB2 * go truncate string +00002E74 7193 +00002E74 4481 7194 NEG.l d1 * make -ve +00002E76 0681 000005D6 7195 ADD.l #BHsend,d1 * effectively (end-length) +00002E7C 41F3 1000 7196 LEA 0(a3,d1.w),a0 * effectively add (end-length) to pointer +00002E80 600E 7197 BRA.s BinPr * go print string +00002E82 7198 +00002E82 7199 * truncate string to remove leading "0"s 00002E82 7200 -00002E82 7201 * truncate string to remove leading "0"s -00002E82 7202 -00002E82 7203 NextB2 -00002E82 1010 7204 MOVE.b (a0),d0 * get byte -00002E84 670A 7205 BEQ.s BinPr * if null then end of string so add 1 and go -00002E86 7206 * print it -00002E86 7207 -00002E86 B03C 0030 7208 CMP.b #'0',d0 * compare with "0" -00002E8A 660E 7209 BNE.s GoPr * if not "0" then go print string from here -00002E8C 7210 -00002E8C 5248 7211 ADDQ.w #1,a0 * else increment pointer -00002E8E 60F2 7212 BRA.s NextB2 * loop always +00002E82 7201 NextB2 +00002E82 1010 7202 MOVE.b (a0),d0 * get byte +00002E84 670A 7203 BEQ.s BinPr * if null then end of string so add 1 and go +00002E86 7204 * print it +00002E86 7205 +00002E86 B03C 0030 7206 CMP.b #'0',d0 * compare with "0" +00002E8A 660E 7207 BNE.s GoPr * if not "0" then go print string from here +00002E8C 7208 +00002E8C 5248 7209 ADDQ.w #1,a0 * else increment pointer +00002E8E 60F2 7210 BRA.s NextB2 * loop always +00002E90 7211 +00002E90 7212 * make fixed length output string - ignore overflows! 00002E90 7213 -00002E90 7214 * make fixed length output string - ignore overflows! -00002E90 7215 -00002E90 7216 BinPr -00002E90 43EB 0E3A 7217 LEA BHsend(a3),a1 * get string end -00002E94 B1C9 7218 CMPA.l a1,a0 * are we at the string end -00002E96 6602 7219 BNE.s GoPr * branch if not -00002E98 7220 -00002E98 5348 7221 SUBQ.w #1,a0 * else need at least one zero -00002E9A 7222 GoPr -00002E9A 6000 ED22 7223 BRA LAB_20AE * print " terminated string to FAC1, stack & RET -00002E9E 7224 -00002E9E 7225 -00002E9E 7226 ************************************************************************************* -00002E9E 7227 * -00002E9E 7228 * perform HEX$() -00002E9E 7229 * # of leading 0s is in d1, the number is in d0 -00002E9E 7230 -00002E9E 7231 LAB_HEXS -00002E9E B23C 0009 7232 CMP.b #$09,d1 * max + 1 -00002EA2 6400 DABA 7233 BCC LAB_FCER * exit if too big ( > or = ) -00002EA6 7234 -00002EA6 7407 7235 MOVEQ #$07,d2 * nibble count-1 -00002EA8 41EB 0E32 7236 LEA Hexss(a3),a0 * point to string -00002EAC 7830 7237 MOVEQ #$30,d4 * "0" character for ABCD -00002EAE 7238 NextH1 -00002EAE 1600 7239 MOVE.b d0,d3 * copy lowest byte -00002EB0 E898 7240 ROR.l #4,d0 * shift nibble into 0-3 -00002EB2 C63C 000F 7241 AND.b #$0F,d3 * just this nibble -00002EB6 1A03 7242 MOVE.b d3,d5 * copy it -00002EB8 0605 00F6 7243 ADD.b #$F6,d5 * set extend bit -00002EBC C704 7244 ABCD d4,d3 * decimal add extend and character to zero -00002EBE 1183 2000 7245 MOVE.b d3,(a0,d2.w) * save character to string -00002EC2 51CA FFEA 7246 DBF d2,NextH1 * decrement and loop if not done -00002EC6 7247 -00002EC6 60A2 7248 BRA.s EndBHS * go process string -00002EC8 7249 -00002EC8 7250 -00002EC8 7251 ************************************************************************************* -00002EC8 7252 * -00002EC8 7253 * ctrl-c check routine. includes limited "life" byte save for INGET routine -00002EC8 7254 -00002EC8 7255 VEC_CC -00002EC8 4A2B 0E4C 7256 TST.b ccflag(a3) * check [CTRL-C] check flag -00002ECC 661E 7257 BNE.s RTS_022 * exit if [CTRL-C] check inhibited -00002ECE 7258 -00002ECE 4EAB 0C70 7259 JSR V_INPT(a3) * scan input device -00002ED2 640E 7260 BCC.s LAB_FBA0 * exit if buffer empty -00002ED4 7261 -00002ED4 1740 0E4D 7262 MOVE.b d0,ccbyte(a3) * save received byte -00002ED8 177C 0020 0E4E 7263 MOVE.b #$20,ccnull(a3) * set "life" timer for bytes countdown -00002EDE 6000 DEF2 7264 BRA LAB_1636 * return to BASIC -00002EE2 7265 -00002EE2 7266 LAB_FBA0 -00002EE2 4A2B 0E4E 7267 TST.b ccnull(a3) * get countdown byte -00002EE6 6704 7268 BEQ.s RTS_022 * exit if finished -00002EE8 7269 -00002EE8 532B 0E4E 7270 SUBQ.b #1,ccnull(a3) * else decrement countdown -00002EEC 7271 RTS_022 -00002EEC 4E75 7272 RTS -00002EEE 7273 -00002EEE 7274 -00002EEE 7275 ************************************************************************************* -00002EEE 7276 * -00002EEE 7277 * get byte from input device, no waiting -00002EEE 7278 * returns with carry set if byte in A -00002EEE 7279 -00002EEE 7280 INGET -00002EEE 4EAB 0C70 7281 JSR V_INPT(a3) * call scan input device -00002EF2 650A 7282 BCS.s LAB_FB95 * if byte go reset timer -00002EF4 7283 -00002EF4 102B 0E4E 7284 MOVE.b ccnull(a3),d0 * get countdown -00002EF8 67F2 7285 BEQ.s RTS_022 * exit if empty -00002EFA 7286 -00002EFA 102B 0E4D 7287 MOVE.b ccbyte(a3),d0 * get last received byte -00002EFE 7288 LAB_FB95 -00002EFE 177C 0000 0E4E 7289 MOVE.b #$00,ccnull(a3) * clear timer because we got a byte -00002F04 003C 0001 7290 ORI.b #1,CCR * set carry, flag we got a byte -00002F08 4E75 7291 RTS -00002F0A 7292 -00002F0A 7293 -00002F0A 7294 ************************************************************************************* -00002F0A 7295 * -00002F0A 7296 * perform MAX() -00002F0A 7297 -00002F0A 7298 LAB_MAX -00002F0A 6100 E53E 7299 BSR LAB_EVEZ * evaluate expression (no decrement) -00002F0E 4A2B 0E19 7300 TST.b Dtypef(a3) * test data type -00002F12 6B00 DA2A 7301 BMI LAB_TMER * if string do Type missmatch Error/warm start -00002F16 7302 -00002F16 7303 LAB_MAXN -00002F16 612E 7304 BSR.s LAB_PHFA * push FAC1, evaluate expression, -00002F18 7305 * pull FAC2 & compare with FAC1 -00002F18 64FC 7306 BCC.s LAB_MAXN * branch if no swap to do -00002F1A 7307 -00002F1A 6100 F4AA 7308 BSR LAB_279B * copy FAC2 to FAC1 -00002F1E 60F6 7309 BRA.s LAB_MAXN * go do next -00002F20 7310 -00002F20 7311 -00002F20 7312 ************************************************************************************* -00002F20 7313 * -00002F20 7314 * perform MIN() -00002F20 7315 -00002F20 7316 LAB_MIN -00002F20 6100 E528 7317 BSR LAB_EVEZ * evaluate expression (no decrement) -00002F24 4A2B 0E19 7318 TST.b Dtypef(a3) * test data type -00002F28 6B00 DA14 7319 BMI LAB_TMER * if string do Type missmatch Error/warm start -00002F2C 7320 -00002F2C 7321 LAB_MINN -00002F2C 6118 7322 BSR.s LAB_PHFA * push FAC1, evaluate expression, -00002F2E 7323 * pull FAC2 & compare with FAC1 -00002F2E 63FC 7324 BLS.s LAB_MINN * branch if no swap to do -00002F30 7325 -00002F30 6100 F494 7326 BSR LAB_279B * copy FAC2 to FAC1 -00002F34 60F6 7327 BRA.s LAB_MINN * go do next (branch always) -00002F36 7328 -00002F36 7329 * exit routine. don't bother returning to the loop code -00002F36 7330 * check for correct exit, else so syntax error -00002F36 7331 -00002F36 7332 LAB_MMEC -00002F36 B03C 0029 7333 CMP.b #')',d0 * is it end of function? -00002F3A 6600 DA2E 7334 BNE LAB_SNER * if not do MAX MIN syntax error -00002F3E 7335 -00002F3E 4FEF 0004 7336 LEA 4(sp),sp * dump return address (faster) -00002F42 6000 E664 7337 BRA LAB_IGBY * update BASIC execute pointer (to chr past ")") -00002F46 7338 * and return -00002F46 7339 -00002F46 7340 * check for next, evaluate & return or exit -00002F46 7341 * this is the routine that does most of the work -00002F46 7342 -00002F46 7343 LAB_PHFA -00002F46 6100 E662 7344 BSR LAB_GBYT * get next BASIC byte -00002F4A B03C 002C 7345 CMP.b #',',d0 * is there more ? -00002F4E 66E6 7346 BNE.s LAB_MMEC * if not go do end check -00002F50 7347 -00002F50 3F2B 0DF8 7348 MOVE.w FAC1_e(a3),-(sp) * push exponent and sign -00002F54 2F2B 0DF4 7349 MOVE.l FAC1_m(a3),-(sp) * push mantissa -00002F58 7350 -00002F58 6100 E4F0 7351 BSR LAB_EVEZ * evaluate expression (no decrement) -00002F5C 4A2B 0E19 7352 TST.b Dtypef(a3) * test data type -00002F60 6B00 D9DC 7353 BMI LAB_TMER * if string do Type missmatch Error/warm start -00002F64 7354 -00002F64 7355 -00002F64 7356 * pop FAC2 (MAX/MIN expression so far) -00002F64 275F 0DFC 7357 MOVE.l (sp)+,FAC2_m(a3) * pop mantissa -00002F68 7358 -00002F68 301F 7359 MOVE.w (sp)+,d0 * pop exponent and sign -00002F6A 3740 0E00 7360 MOVE.w d0,FAC2_e(a3) * save exponent and sign -00002F6E 176B 0DF9 0E02 7361 MOVE.b FAC1_s(a3),FAC_sc(a3) * get FAC1 sign -00002F74 B12B 0E02 7362 EOR.b d0,FAC_sc(a3) * EOR to create sign compare -00002F78 6000 F4B8 7363 BRA LAB_27FA * compare FAC1 with FAC2 & return -00002F7C 7364 * returns d0=+1 Cb=0 if FAC1 > FAC2 -00002F7C 7365 * returns d0= 0 Cb=0 if FAC1 = FAC2 -00002F7C 7366 * returns d0=-1 Cb=1 if FAC1 < FAC2 -00002F7C 7367 -00002F7C 7368 -00002F7C 7369 ************************************************************************************* -00002F7C 7370 * -00002F7C 7371 * perform WIDTH -00002F7C 7372 -00002F7C 7373 LAB_WDTH -00002F7C B03C 002C 7374 CMP.b #',',d0 * is next byte "," -00002F80 672C 7375 BEQ.s LAB_TBSZ * if so do tab size -00002F82 7376 -00002F82 6100 EF8E 7377 BSR LAB_GTBY * get byte parameter, result in d0 and Itemp -00002F86 4A00 7378 TST.b d0 * test result -00002F88 6712 7379 BEQ.s LAB_NSTT * branch if set for infinite line -00002F8A 7380 -00002F8A B03C 0010 7381 CMP.b #$10,d0 * else make min width = 16d -00002F8E 6500 D9CE 7382 BCS LAB_FCER * if less do function call error & exit -00002F92 7383 -00002F92 7384 * this next compare ensures that we can't exit WIDTH via an error leaving the -00002F92 7385 * tab size greater than the line length. -00002F92 7386 -00002F92 B02B 0E46 7387 CMP.b TabSiz(a3),d0 * compare with tab size -00002F96 6404 7388 BCC.s LAB_NSTT * branch if >= tab size -00002F98 7389 -00002F98 1740 0E46 7390 MOVE.b d0,TabSiz(a3) * else make tab size = terminal width -00002F9C 7391 LAB_NSTT -00002F9C 1740 0E4A 7392 MOVE.b d0,TWidth(a3) * set the terminal width -00002FA0 6100 E608 7393 BSR LAB_GBYT * get BASIC byte back -00002FA4 672C 7394 BEQ.s WExit * exit if no following -00002FA6 7395 -00002FA6 B03C 002C 7396 CMP.b #',',d0 * else is it "," -00002FAA 6600 D9BE 7397 BNE LAB_SNER * if not do syntax error -00002FAE 7398 -00002FAE 7399 LAB_TBSZ -00002FAE 6100 EF5E 7400 BSR LAB_SGBY * increment and get byte, result in d0 and Itemp -00002FB2 4A00 7401 TST.b d0 * test TAB size -00002FB4 6B00 D9A8 7402 BMI LAB_FCER * if >127 do function call error & exit -00002FB8 7403 -00002FB8 B03C 0001 7404 CMP.b #1,d0 * compare with min-1 -00002FBC 6500 D9A0 7405 BCS LAB_FCER * if <=1 do function call error & exit -00002FC0 7406 -00002FC0 122B 0E4A 7407 MOVE.b TWidth(a3),d1 * set flags for width -00002FC4 6708 7408 BEQ.s LAB_SVTB * skip check if infinite line -00002FC6 7409 -00002FC6 B02B 0E4A 7410 CMP.b TWidth(a3),d0 * compare TAB with width -00002FCA 6E00 D992 7411 BGT LAB_FCER * branch if too big -00002FCE 7412 -00002FCE 7413 LAB_SVTB -00002FCE 1740 0E46 7414 MOVE.b d0,TabSiz(a3) * save TAB size -00002FD2 7415 -00002FD2 7416 * calculate tab column limit from TAB size. The Iclim is set to the last tab -00002FD2 7417 * position on a line that still has at least one whole tab width between it -00002FD2 7418 * and the end of the line. -00002FD2 7419 -00002FD2 7420 WExit -00002FD2 102B 0E4A 7421 MOVE.b TWidth(a3),d0 * get width -00002FD6 670A 7422 BEQ.s LAB_WDLP * branch if infinite line -00002FD8 7423 -00002FD8 B02B 0E46 7424 CMP.b TabSiz(a3),d0 * compare with tab size -00002FDC 6404 7425 BCC.s LAB_WDLP * branch if >= tab size -00002FDE 7426 -00002FDE 1740 0E46 7427 MOVE.b d0,TabSiz(a3) * else make tab size = terminal width -00002FE2 7428 LAB_WDLP -00002FE2 902B 0E46 7429 SUB.b TabSiz(a3),d0 * subtract tab size -00002FE6 64FA 7430 BCC.s LAB_WDLP * loop while no borrow -00002FE8 7431 -00002FE8 D02B 0E46 7432 ADD.b TabSiz(a3),d0 * add tab size back -00002FEC D02B 0E46 7433 ADD.b TabSiz(a3),d0 * add tab size back again -00002FF0 7434 -00002FF0 4400 7435 NEG.b d0 * make -ve -00002FF2 D02B 0E4A 7436 ADD.b TWidth(a3),d0 * subtract remainder from width -00002FF6 1740 0E4B 7437 MOVE.b d0,Iclim(a3) * save tab column limit -00002FFA 7438 RTS_023 -00002FFA 4E75 7439 RTS -00002FFC 7440 -00002FFC 7441 -00002FFC 7442 ************************************************************************************* -00002FFC 7443 * -00002FFC 7444 * perform SQR() -00002FFC 7445 -00002FFC 7446 * d0 is number to find the root of -00002FFC 7447 * d1 is the root result -00002FFC 7448 * d2 is the remainder -00002FFC 7449 * d3 is a counter -00002FFC 7450 * d4 is temp -00002FFC 7451 -00002FFC 7452 LAB_SQR -00002FFC 4A2B 0DF9 7453 TST.b FAC1_s(a3) * test FAC1 sign -00003000 6B00 D95C 7454 BMI LAB_FCER * if -ve do function call error -00003004 7455 -00003004 4A2B 0DF8 7456 TST.b FAC1_e(a3) * test exponent -00003008 67F0 7457 BEQ.s RTS_023 * exit if zero -0000300A 7458 -0000300A 48E7 7800 7459 MOVEM.l d1-d4,-(sp) * save registers -0000300E 202B 0DF4 7460 MOVE.l FAC1_m(a3),d0 * copy FAC1 -00003012 7400 7461 MOVEQ #0,d2 * clear remainder -00003014 2202 7462 MOVE.l d2,d1 * clear root -00003016 7463 -00003016 761F 7464 MOVEQ #$1F,d3 * $1F for DBF, 64 pairs of bits to -00003018 7465 * do for a 32 bit result -00003018 082B 0000 0DF8 7466 BTST #0,FAC1_e(a3) * test exponent odd/even -0000301E 6606 7467 BNE.s LAB_SQE2 * if odd only 1 shift first time -00003020 7468 -00003020 7469 LAB_SQE1 -00003020 D080 7470 ADD.l d0,d0 * shift highest bit of number .. -00003022 D582 7471 ADDX.l d2,d2 * .. into remainder .. never overflows -00003024 D281 7472 ADD.l d1,d1 * root = root * 2 .. never overflows -00003026 7473 LAB_SQE2 -00003026 D080 7474 ADD.l d0,d0 * shift highest bit of number .. -00003028 D582 7475 ADDX.l d2,d2 * .. into remainder .. never overflows -0000302A 7476 -0000302A 2801 7477 MOVE.l d1,d4 * copy root -0000302C D884 7478 ADD.l d4,d4 * 2n -0000302E 5284 7479 ADDQ.l #1,d4 * 2n+1 -00003030 7480 -00003030 B484 7481 CMP.l d4,d2 * compare 2n+1 to remainder -00003032 6504 7482 BCS.s LAB_SQNS * skip sub if remainder smaller -00003034 7483 -00003034 9484 7484 SUB.l d4,d2 * subtract temp from remainder -00003036 5281 7485 ADDQ.l #1,d1 * increment root -00003038 7486 LAB_SQNS -00003038 51CB FFE6 7487 DBF d3,LAB_SQE1 * loop if not all done -0000303C 7488 -0000303C 2741 0DF4 7489 MOVE.l d1,FAC1_m(a3) * save result mantissa -00003040 102B 0DF8 7490 MOVE.b FAC1_e(a3),d0 * get exponent (d0 is clear here) -00003044 0440 0080 7491 SUB.w #$80,d0 * normalise -00003048 E248 7492 LSR.w #1,d0 * /2 -0000304A 6402 7493 BCC.s LAB_SQNA * skip increment if carry clear -0000304C 7494 -0000304C 5240 7495 ADDQ.w #1,d0 * add bit zero back in (allow for half shift) -0000304E 7496 LAB_SQNA -0000304E 0640 0080 7497 ADD.w #$80,d0 * re-bias to $80 -00003052 1740 0DF8 7498 MOVE.b d0,FAC1_e(a3) * save it -00003056 4CDF 001E 7499 MOVEM.l (sp)+,d1-d4 * restore registers -0000305A 6000 F0A8 7500 BRA LAB_24D5 * normalise FAC1 & return -0000305E 7501 -0000305E 7502 -0000305E 7503 ************************************************************************************* -0000305E 7504 * -0000305E 7505 * perform VARPTR() -0000305E 7506 -0000305E 7507 LAB_VARPTR -0000305E 101D 7508 MOVE.b (a5)+,d0 * increment pointer -00003060 7509 LAB_VARCALL -00003060 6100 E756 7510 BSR LAB_GVAR * get variable address in a0 -00003064 6100 E530 7511 BSR LAB_1BFB * scan for ")", else do syntax error/warm start -00003068 2008 7512 MOVE.l a0,d0 * copy the variable address -0000306A 6000 EA3C 7513 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & return -0000306E 7514 -0000306E 7515 -0000306E 7516 ************************************************************************************* -0000306E 7517 * -0000306E 7518 * perform RAMBASE -0000306E 7519 -0000306E 7520 LAB_RAM -0000306E 41EB 0C64 7521 LEA ram_base(a3),a0 * get start of EhBASIC RAM -00003072 2008 7522 MOVE.l a0,d0 * copy it -00003074 6000 EA32 7523 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & return -00003078 7524 -00003078 7525 -00003078 7526 ************************************************************************************* -00003078 7527 * -00003078 7528 * perform PI -00003078 7529 -00003078 7530 LAB_PI -00003078 277C C90FDAA2 0DF4 7531 MOVE.l #$C90FDAA2,FAC1_m(a3) * pi mantissa (32 bit) -00003080 377C 8200 0DF8 7532 MOVE.w #$8200,FAC1_e(a3) * pi exponent and sign -00003086 4E75 7533 RTS -00003088 7534 -00003088 7535 -00003088 7536 ************************************************************************************* -00003088 7537 * -00003088 7538 * perform TWOPI -00003088 7539 -00003088 7540 LAB_TWOPI -00003088 277C C90FDAA2 0DF4 7541 MOVE.l #$C90FDAA2,FAC1_m(a3) * 2pi mantissa (32 bit) -00003090 377C 8300 0DF8 7542 MOVE.w #$8300,FAC1_e(a3) * 2pi exponent and sign -00003096 4E75 7543 RTS -00003098 7544 -00003098 7545 -00003098 7546 ************************************************************************************* -00003098 7547 * -00003098 7548 * get ASCII string equivalent into FAC1 as integer32 or float -00003098 7549 -00003098 7550 * entry is with a5 pointing to the first character of the string -00003098 7551 * exit with a5 pointing to the first character after the string -00003098 7552 -00003098 7553 * d0 is character -00003098 7554 * d1 is mantissa -00003098 7555 * d2 is partial and table mantissa -00003098 7556 * d3 is mantissa exponent (decimal & binary) -00003098 7557 * d4 is decimal exponent -00003098 7558 -00003098 7559 * get FAC1 from string -00003098 7560 * this routine now handles hex and binary values from strings -00003098 7561 * starting with "$" and "%" respectively -00003098 7562 -00003098 7563 LAB_2887 -00003098 48E7 7C00 7564 MOVEM.l d1-d5,-(sp) * save registers -0000309C 7200 7565 MOVEQ #$00,d1 * clear temp accumulator -0000309E 2601 7566 MOVE.l d1,d3 * set mantissa decimal exponent count -000030A0 2801 7567 MOVE.l d1,d4 * clear decimal exponent -000030A2 1741 0DF9 7568 MOVE.b d1,FAC1_s(a3) * clear sign byte -000030A6 1741 0E19 7569 MOVE.b d1,Dtypef(a3) * set float data type -000030AA 1741 0E13 7570 MOVE.b d1,expneg(a3) * clear exponent sign -000030AE 6100 E4FA 7571 BSR LAB_GBYT * get first byte back -000030B2 653C 7572 BCS.s LAB_28FE * go get floating if 1st character numeric -000030B4 7573 -000030B4 B03C 002D 7574 CMP.b #'-',d0 * or is it -ve number -000030B8 6608 7575 BNE.s LAB_289A * branch if not -000030BA 7576 -000030BA 177C 00FF 0DF9 7577 MOVE.b #$FF,FAC1_s(a3) * set sign byte -000030C0 6006 7578 BRA.s LAB_289C * now go scan & check for hex/bin/int -000030C2 7579 -000030C2 7580 LAB_289A -000030C2 7581 * first character wasn't numeric or - -000030C2 B03C 002B 7582 CMP.b #'+',d0 * compare with '+' -000030C6 6606 7583 BNE.s LAB_289D * branch if not '+' (go check for '.'/hex/binary -000030C8 7584 * /integer) -000030C8 7585 -000030C8 7586 LAB_289C -000030C8 7587 * was "+" or "-" to start, so get next character -000030C8 6100 E4DE 7588 BSR LAB_IGBY * increment & scan memory -000030CC 6522 7589 BCS.s LAB_28FE * branch if numeric character -000030CE 7590 -000030CE 7591 LAB_289D -000030CE B03C 002E 7592 CMP.b #'.',d0 * else compare with '.' -000030D2 6700 0092 7593 BEQ LAB_2904 * branch if '.' -000030D6 7594 -000030D6 7595 * code here for hex/binary/integer numbers -000030D6 B03C 0024 7596 CMP.b #'$',d0 * compare with '$' -000030DA 6700 010A 7597 BEQ LAB_CHEX * branch if '$' -000030DE 7598 -000030DE B03C 0025 7599 CMP.b #'%',d0 * else compare with '%' -000030E2 6700 0164 7600 BEQ LAB_CBIN * branch if '%' -000030E6 7601 -000030E6 6000 008C 7602 BRA LAB_2Y01 * not #.$%& so return 0 -000030EA 7603 -000030EA 7604 LAB_28FD -000030EA 6100 E4BC 7605 BSR LAB_IGBY * get next character -000030EE 646C 7606 BCC.s LAB_2902 * exit loop if not a digit -000030F0 7607 -000030F0 7608 LAB_28FE -000030F0 6100 01A8 7609 BSR d1x10 * multiply d1 by 10 and add character -000030F4 64F4 7610 BCC.s LAB_28FD * loop for more if no overflow -000030F6 7611 -000030F6 7612 LAB_28FF -000030F6 7613 * overflowed mantissa, count 10s exponent -000030F6 5283 7614 ADDQ.l #1,d3 * increment mantissa decimal exponent count -000030F8 6100 E4AE 7615 BSR LAB_IGBY * get next character -000030FC 65F8 7616 BCS.s LAB_28FF * loop while numeric character -000030FE 7617 -000030FE 7618 * done overflow, now flush fraction or do E -000030FE B03C 002E 7619 CMP.b #'.',d0 * else compare with '.' -00003102 6606 7620 BNE.s LAB_2901 * branch if not '.' -00003104 7621 -00003104 7622 LAB_2900 -00003104 7623 * flush remaining fraction digits -00003104 6100 E4A2 7624 BSR LAB_IGBY * get next character -00003108 65FA 7625 BCS LAB_2900 * loop while numeric character -0000310A 7626 -0000310A 7627 LAB_2901 -0000310A 7628 * done number, only (possible) exponent remains -0000310A B03C 0045 7629 CMP.b #'E',d0 * else compare with 'E' -0000310E 6664 7630 BNE.s LAB_2Y01 * if not 'E' all done, go evaluate -00003110 7631 -00003110 7632 * process exponent -00003110 6100 E496 7633 BSR LAB_IGBY * get next character -00003114 6528 7634 BCS.s LAB_2X04 * branch if digit -00003116 7635 -00003116 B03C 002D 7636 CMP.b #'-',d0 * or is it -ve number -0000311A 6706 7637 BEQ.s LAB_2X01 * branch if so -0000311C 7638 -0000311C B03C 00B3 7639 CMP.b #TK_MINUS,d0 * or is it -ve number -00003120 6608 7640 BNE.s LAB_2X02 * branch if not -00003122 7641 -00003122 7642 LAB_2X01 -00003122 177C 00FF 0E13 7643 MOVE.b #$FF,expneg(a3) * set exponent sign -00003128 600E 7644 BRA.s LAB_2X03 * now go scan & check exponent -0000312A 7645 -0000312A 7646 LAB_2X02 -0000312A B03C 002B 7647 CMP.b #'+',d0 * or is it +ve number -0000312E 6708 7648 BEQ.s LAB_2X03 * branch if so -00003130 7649 -00003130 B03C 00B2 7650 CMP.b #TK_PLUS,d0 * or is it +ve number -00003134 6600 D834 7651 BNE LAB_SNER * wasn't - + TK_MINUS TK_PLUS or # so do error -00003138 7652 -00003138 7653 LAB_2X03 -00003138 6100 E46E 7654 BSR LAB_IGBY * get next character -0000313C 6436 7655 BCC.s LAB_2Y01 * if not digit all done, go evaluate -0000313E 7656 LAB_2X04 -0000313E C8FC 000A 7657 MULU #10,d4 * multiply decimal exponent by 10 -00003142 C0BC 000000FF 7658 AND.l #$FF,d0 * mask character -00003148 0400 0030 7659 SUB.b #'0',d0 * convert to value -0000314C D880 7660 ADD.l d0,d4 * add to decimal exponent -0000314E B83C 0030 7661 CMP.b #48,d4 * compare with decimal exponent limit+10 -00003152 6FE4 7662 BLE.s LAB_2X03 * loop if no overflow/underflow -00003154 7663 -00003154 7664 LAB_2X05 -00003154 7665 * exponent value has overflowed -00003154 6100 E452 7666 BSR LAB_IGBY * get next character -00003158 65FA 7667 BCS.s LAB_2X05 * loop while numeric digit -0000315A 7668 -0000315A 6018 7669 BRA.s LAB_2Y01 * all done, go evaluate -0000315C 7670 -0000315C 7671 LAB_2902 -0000315C B03C 002E 7672 CMP.b #'.',d0 * else compare with '.' -00003160 6704 7673 BEQ.s LAB_2904 * branch if was '.' -00003162 7674 -00003162 60A6 7675 BRA.s LAB_2901 * branch if not '.' (go check/do 'E') -00003164 7676 -00003164 7677 LAB_2903 -00003164 5383 7678 SUBQ.l #1,d3 * decrement mantissa decimal exponent -00003166 7679 LAB_2904 -00003166 7680 * was dp so get fraction part -00003166 6100 E440 7681 BSR LAB_IGBY * get next character -0000316A 649E 7682 BCC.s LAB_2901 * exit loop if not a digit (go check/do 'E') -0000316C 7683 -0000316C 6100 012C 7684 BSR d1x10 * multiply d1 by 10 and add character -00003170 64F2 7685 BCC.s LAB_2903 * loop for more if no overflow -00003172 7686 -00003172 6090 7687 BRA.s LAB_2900 * else go flush remaining fraction part -00003174 7688 -00003174 7689 LAB_2Y01 -00003174 7690 * now evaluate result -00003174 4A2B 0E13 7691 TST.b expneg(a3) * test exponent sign -00003178 6A02 7692 BPL.s LAB_2Y02 * branch if sign positive -0000317A 7693 -0000317A 4484 7694 NEG.l d4 * negate decimal exponent -0000317C 7695 LAB_2Y02 -0000317C D883 7696 ADD.l d3,d4 * add mantissa decimal exponent -0000317E 7620 7697 MOVEQ #32,d3 * set up max binary exponent -00003180 4A81 7698 TST.l d1 * test mantissa -00003182 6752 7699 BEQ.s LAB_rtn0 * if mantissa=0 return 0 -00003184 7700 -00003184 6B08 7701 BMI.s LAB_2Y04 * branch if already mormalised -00003186 7702 -00003186 5383 7703 SUBQ.l #1,d3 * decrement bianry exponent for DBMI loop -00003188 7704 LAB_2Y03 -00003188 D281 7705 ADD.l d1,d1 * shift mantissa -0000318A 5BCB FFFC 7706 DBMI d3,LAB_2Y03 * decrement & loop if not normalised -0000318E 7707 -0000318E 7708 * ensure not too big or small -0000318E 7709 LAB_2Y04 -0000318E B8BC 00000026 7710 CMP.l #38,d4 * compare decimal exponent with max exponent -00003194 6E00 D7C4 7711 BGT LAB_OFER * if greater do overflow error and warm start -00003198 7712 -00003198 B8BC FFFFFFDA 7713 CMP.l #-38,d4 * compare decimal exponent with min exponent -0000319E 6D34 7714 BLT.s LAB_ret0 * if less just return zero -000031A0 7715 -000031A0 4484 7716 NEG.l d4 * negate decimal exponent to go right way -000031A2 C9FC 0006 7717 MULS #6,d4 * 6 bytes per entry -000031A6 2F08 7718 MOVE.l a0,-(sp) * save register -000031A8 41FA 0210 7719 LEA LAB_P_10(pc),a0 * point to table -000031AC 1770 4000 0E00 7720 MOVE.b (a0,d4.w),FAC2_e(a3) * copy exponent for multiply -000031B2 2770 4002 0DFC 7721 MOVE.l 2(a0,d4.w),FAC2_m(a3) * copy table mantissa -000031B8 205F 7722 MOVE.l (sp)+,a0 * restore register -000031BA 7723 -000031BA 0A03 0080 7724 EORI.b #$80,d3 * normalise input exponent -000031BE 2741 0DF4 7725 MOVE.l d1,FAC1_m(a3) * save input mantissa -000031C2 1743 0DF8 7726 MOVE.b d3,FAC1_e(a3) * save input exponent -000031C6 176B 0DF9 0E02 7727 MOVE.b FAC1_s(a3),FAC_sc(a3) * set sign as sign compare -000031CC 7728 -000031CC 4CDF 003E 7729 MOVEM.l (sp)+,d1-d5 * restore registers -000031D0 6000 F05A 7730 BRA LAB_MULTIPLY * go multiply input by table -000031D4 7731 -000031D4 7732 LAB_ret0 -000031D4 7200 7733 MOVEQ #0,d1 * clear mantissa -000031D6 7734 LAB_rtn0 -000031D6 2601 7735 MOVE.l d1,d3 * clear exponent -000031D8 1743 0DF8 7736 MOVE.b d3,FAC1_e(a3) * save exponent -000031DC 2741 0DF4 7737 MOVE.l d1,FAC1_m(a3) * save mantissa -000031E0 4CDF 003E 7738 MOVEM.l (sp)+,d1-d5 * restore registers -000031E4 4E75 7739 RTS -000031E6 7740 -000031E6 7741 -000031E6 7742 ************************************************************************************* -000031E6 7743 * -000031E6 7744 * $ for hex add-on -000031E6 7745 -000031E6 7746 * gets here if the first character was "$" for hex -000031E6 7747 * get hex number -000031E6 7748 -000031E6 7749 LAB_CHEX -000031E6 177C 0040 0E19 7750 MOVE.b #$40,Dtypef(a3) * set integer numeric data type -000031EC 7620 7751 MOVEQ #32,d3 * set up max binary exponent -000031EE 7752 LAB_CHXX -000031EE 6100 E3B8 7753 BSR LAB_IGBY * increment & scan memory -000031F2 6514 7754 BCS.s LAB_ISHN * branch if numeric character -000031F4 7755 -000031F4 803C 0020 7756 OR.b #$20,d0 * case convert, allow "A" to "F" and "a" to "f" -000031F8 0400 0061 7757 SUB.b #'a',d0 * subtract "a" -000031FC 652A 7758 BCS.s LAB_CHX3 * exit if <"a" -000031FE 7759 -000031FE B03C 0006 7760 CMP.b #$06,d0 * compare normalised with $06 (max+1) -00003202 6424 7761 BCC.s LAB_CHX3 * exit if >"f" -00003204 7762 -00003204 0600 003A 7763 ADD.b #$3A,d0 * convert to nibble+"0" -00003208 7764 LAB_ISHN -00003208 616C 7765 BSR.s d1x16 * multiply d1 by 16 and add the character -0000320A 64E2 7766 BCC.s LAB_CHXX * loop for more if no overflow -0000320C 7767 -0000320C 7768 * overflowed mantissa, count 16s exponent -0000320C 7769 LAB_CHX1 -0000320C 5883 7770 ADDQ.l #4,d3 * increment mantissa exponent count -0000320E 6900 D74A 7771 BVS LAB_OFER * do overflow error if overflowed -00003212 7772 -00003212 6100 E394 7773 BSR LAB_IGBY * get next character -00003216 65F4 7774 BCS.s LAB_CHX1 * loop while numeric character -00003218 7775 -00003218 803C 0020 7776 OR.b #$20,d0 * case convert, allow "A" to "F" and "a" to "f" -0000321C 0400 0061 7777 SUB.b #'a',d0 * subtract "a" -00003220 6506 7778 BCS.s LAB_CHX3 * exit if <"a" -00003222 7779 -00003222 B03C 0006 7780 CMP.b #$06,d0 * compare normalised with $06 (max+1) -00003226 65E4 7781 BCS.s LAB_CHX1 * loop if <="f" -00003228 7782 -00003228 7783 * now return value -00003228 7784 LAB_CHX3 -00003228 4A81 7785 TST.l d1 * test mantissa -0000322A 67AA 7786 BEQ.s LAB_rtn0 * if mantissa=0 return 0 -0000322C 7787 -0000322C 6B08 7788 BMI.s LAB_exxf * branch if already mormalised -0000322E 7789 -0000322E 5383 7790 SUBQ.l #1,d3 * decrement bianry exponent for DBMI loop -00003230 7791 LAB_CHX2 -00003230 D281 7792 ADD.l d1,d1 * shift mantissa -00003232 5BCB FFFC 7793 DBMI d3,LAB_CHX2 * decrement & loop if not normalised -00003236 7794 -00003236 7795 LAB_exxf -00003236 0A03 0080 7796 EORI.b #$80,d3 * normalise exponent -0000323A 1743 0DF8 7797 MOVE.b d3,FAC1_e(a3) * save exponent -0000323E 2741 0DF4 7798 MOVE.l d1,FAC1_m(a3) * save mantissa -00003242 4CDF 003E 7799 MOVEM.l (sp)+,d1-d5 * restore registers -00003246 7800 RTS_024 -00003246 4E75 7801 RTS -00003248 7802 -00003248 7803 -00003248 7804 ************************************************************************************* -00003248 7805 * -00003248 7806 * % for binary add-on -00003248 7807 -00003248 7808 * gets here if the first character was "%" for binary -00003248 7809 * get binary number -00003248 7810 -00003248 7811 LAB_CBIN -00003248 177C 0040 0E19 7812 MOVE.b #$40,Dtypef(a3) * set integer numeric data type -0000324E 7620 7813 MOVEQ #32,d3 * set up max binary exponent -00003250 7814 LAB_CBXN -00003250 6100 E356 7815 BSR LAB_IGBY * increment & scan memory -00003254 64D2 7816 BCC.s LAB_CHX3 * if not numeric character go return value -00003256 7817 -00003256 B03C 0032 7818 CMP.b #'2',d0 * compare with "2" (max+1) -0000325A 64CC 7819 BCC.s LAB_CHX3 * if >="2" go return value -0000325C 7820 -0000325C 2401 7821 MOVE.l d1,d2 * copy value -0000325E 6124 7822 BSR.s d1x02 * multiply d1 by 2 and add character -00003260 64EE 7823 BCC.s LAB_CBXN * loop for more if no overflow -00003262 7824 -00003262 7825 * overflowed mantissa, count 2s exponent -00003262 7826 LAB_CBX1 -00003262 5283 7827 ADDQ.l #1,d3 * increment mantissa exponent count -00003264 6900 D6F4 7828 BVS LAB_OFER * do overflow error if overflowed -00003268 7829 -00003268 6100 E33E 7830 BSR LAB_IGBY * get next character -0000326C 64BA 7831 BCC.s LAB_CHX3 * if not numeric character go return value -0000326E 7832 -0000326E B03C 0032 7833 CMP.b #'2',d0 * compare with "2" (max+1) -00003272 65EE 7834 BCS.s LAB_CBX1 * loop if <"2" -00003274 7835 -00003274 60B2 7836 BRA.s LAB_CHX3 * if not numeric character go return value +00002E90 7214 BinPr +00002E90 43EB 05D6 7215 LEA BHsend(a3),a1 * get string end +00002E94 B1C9 7216 CMPA.l a1,a0 * are we at the string end +00002E96 6602 7217 BNE.s GoPr * branch if not +00002E98 7218 +00002E98 5348 7219 SUBQ.w #1,a0 * else need at least one zero +00002E9A 7220 GoPr +00002E9A 6000 ED22 7221 BRA LAB_20AE * print " terminated string to FAC1, stack & RET +00002E9E 7222 +00002E9E 7223 +00002E9E 7224 ************************************************************************************* +00002E9E 7225 * +00002E9E 7226 * perform HEX$() +00002E9E 7227 * # of leading 0s is in d1, the number is in d0 +00002E9E 7228 +00002E9E 7229 LAB_HEXS +00002E9E B23C 0009 7230 CMP.b #$09,d1 * max + 1 +00002EA2 6400 DABA 7231 BCC LAB_FCER * exit if too big ( > or = ) +00002EA6 7232 +00002EA6 7407 7233 MOVEQ #$07,d2 * nibble count-1 +00002EA8 41EB 05CE 7234 LEA Hexss(a3),a0 * point to string +00002EAC 7830 7235 MOVEQ #$30,d4 * "0" character for ABCD +00002EAE 7236 NextH1 +00002EAE 1600 7237 MOVE.b d0,d3 * copy lowest byte +00002EB0 E898 7238 ROR.l #4,d0 * shift nibble into 0-3 +00002EB2 C63C 000F 7239 AND.b #$0F,d3 * just this nibble +00002EB6 1A03 7240 MOVE.b d3,d5 * copy it +00002EB8 0605 00F6 7241 ADD.b #$F6,d5 * set extend bit +00002EBC C704 7242 ABCD d4,d3 * decimal add extend and character to zero +00002EBE 1183 2000 7243 MOVE.b d3,(a0,d2.w) * save character to string +00002EC2 51CA FFEA 7244 DBF d2,NextH1 * decrement and loop if not done +00002EC6 7245 +00002EC6 60A2 7246 BRA.s EndBHS * go process string +00002EC8 7247 +00002EC8 7248 +00002EC8 7249 ************************************************************************************* +00002EC8 7250 * +00002EC8 7251 * ctrl-c check routine. includes limited "life" byte save for INGET routine +00002EC8 7252 +00002EC8 7253 VEC_CC +00002EC8 4A2B 05E8 7254 TST.b ccflag(a3) * check [CTRL-C] check flag +00002ECC 661E 7255 BNE.s RTS_022 * exit if [CTRL-C] check inhibited +00002ECE 7256 +00002ECE 4EAB 040C 7257 JSR V_INPT(a3) * scan input device +00002ED2 640E 7258 BCC.s LAB_FBA0 * exit if buffer empty +00002ED4 7259 +00002ED4 1740 05E9 7260 MOVE.b d0,ccbyte(a3) * save received byte +00002ED8 177C 0020 05EA 7261 MOVE.b #$20,ccnull(a3) * set "life" timer for bytes countdown +00002EDE 6000 DEF2 7262 BRA LAB_1636 * return to BASIC +00002EE2 7263 +00002EE2 7264 LAB_FBA0 +00002EE2 4A2B 05EA 7265 TST.b ccnull(a3) * get countdown byte +00002EE6 6704 7266 BEQ.s RTS_022 * exit if finished +00002EE8 7267 +00002EE8 532B 05EA 7268 SUBQ.b #1,ccnull(a3) * else decrement countdown +00002EEC 7269 RTS_022 +00002EEC 4E75 7270 RTS +00002EEE 7271 +00002EEE 7272 +00002EEE 7273 ************************************************************************************* +00002EEE 7274 * +00002EEE 7275 * get byte from input device, no waiting +00002EEE 7276 * returns with carry set if byte in A +00002EEE 7277 +00002EEE 7278 INGET +00002EEE 4EAB 040C 7279 JSR V_INPT(a3) * call scan input device +00002EF2 650A 7280 BCS.s LAB_FB95 * if byte go reset timer +00002EF4 7281 +00002EF4 102B 05EA 7282 MOVE.b ccnull(a3),d0 * get countdown +00002EF8 67F2 7283 BEQ.s RTS_022 * exit if empty +00002EFA 7284 +00002EFA 102B 05E9 7285 MOVE.b ccbyte(a3),d0 * get last received byte +00002EFE 7286 LAB_FB95 +00002EFE 177C 0000 05EA 7287 MOVE.b #$00,ccnull(a3) * clear timer because we got a byte +00002F04 003C 0001 7288 ORI.b #1,CCR * set carry, flag we got a byte +00002F08 4E75 7289 RTS +00002F0A 7290 +00002F0A 7291 +00002F0A 7292 ************************************************************************************* +00002F0A 7293 * +00002F0A 7294 * perform MAX() +00002F0A 7295 +00002F0A 7296 LAB_MAX +00002F0A 6100 E53E 7297 BSR LAB_EVEZ * evaluate expression (no decrement) +00002F0E 4A2B 05B5 7298 TST.b Dtypef(a3) * test data type +00002F12 6B00 DA2A 7299 BMI LAB_TMER * if string do Type missmatch Error/warm start +00002F16 7300 +00002F16 7301 LAB_MAXN +00002F16 612E 7302 BSR.s LAB_PHFA * push FAC1, evaluate expression, +00002F18 7303 * pull FAC2 & compare with FAC1 +00002F18 64FC 7304 BCC.s LAB_MAXN * branch if no swap to do +00002F1A 7305 +00002F1A 6100 F4AA 7306 BSR LAB_279B * copy FAC2 to FAC1 +00002F1E 60F6 7307 BRA.s LAB_MAXN * go do next +00002F20 7308 +00002F20 7309 +00002F20 7310 ************************************************************************************* +00002F20 7311 * +00002F20 7312 * perform MIN() +00002F20 7313 +00002F20 7314 LAB_MIN +00002F20 6100 E528 7315 BSR LAB_EVEZ * evaluate expression (no decrement) +00002F24 4A2B 05B5 7316 TST.b Dtypef(a3) * test data type +00002F28 6B00 DA14 7317 BMI LAB_TMER * if string do Type missmatch Error/warm start +00002F2C 7318 +00002F2C 7319 LAB_MINN +00002F2C 6118 7320 BSR.s LAB_PHFA * push FAC1, evaluate expression, +00002F2E 7321 * pull FAC2 & compare with FAC1 +00002F2E 63FC 7322 BLS.s LAB_MINN * branch if no swap to do +00002F30 7323 +00002F30 6100 F494 7324 BSR LAB_279B * copy FAC2 to FAC1 +00002F34 60F6 7325 BRA.s LAB_MINN * go do next (branch always) +00002F36 7326 +00002F36 7327 * exit routine. don't bother returning to the loop code +00002F36 7328 * check for correct exit, else so syntax error +00002F36 7329 +00002F36 7330 LAB_MMEC +00002F36 B03C 0029 7331 CMP.b #')',d0 * is it end of function? +00002F3A 6600 DA2E 7332 BNE LAB_SNER * if not do MAX MIN syntax error +00002F3E 7333 +00002F3E 4FEF 0004 7334 LEA 4(sp),sp * dump return address (faster) +00002F42 6000 E664 7335 BRA LAB_IGBY * update BASIC execute pointer (to chr past ")") +00002F46 7336 * and return +00002F46 7337 +00002F46 7338 * check for next, evaluate & return or exit +00002F46 7339 * this is the routine that does most of the work +00002F46 7340 +00002F46 7341 LAB_PHFA +00002F46 6100 E662 7342 BSR LAB_GBYT * get next BASIC byte +00002F4A B03C 002C 7343 CMP.b #',',d0 * is there more ? +00002F4E 66E6 7344 BNE.s LAB_MMEC * if not go do end check +00002F50 7345 +00002F50 3F2B 0594 7346 MOVE.w FAC1_e(a3),-(sp) * push exponent and sign +00002F54 2F2B 0590 7347 MOVE.l FAC1_m(a3),-(sp) * push mantissa +00002F58 7348 +00002F58 6100 E4F0 7349 BSR LAB_EVEZ * evaluate expression (no decrement) +00002F5C 4A2B 05B5 7350 TST.b Dtypef(a3) * test data type +00002F60 6B00 D9DC 7351 BMI LAB_TMER * if string do Type missmatch Error/warm start +00002F64 7352 +00002F64 7353 +00002F64 7354 * pop FAC2 (MAX/MIN expression so far) +00002F64 275F 0598 7355 MOVE.l (sp)+,FAC2_m(a3) * pop mantissa +00002F68 7356 +00002F68 301F 7357 MOVE.w (sp)+,d0 * pop exponent and sign +00002F6A 3740 059C 7358 MOVE.w d0,FAC2_e(a3) * save exponent and sign +00002F6E 176B 0595 059E 7359 MOVE.b FAC1_s(a3),FAC_sc(a3) * get FAC1 sign +00002F74 B12B 059E 7360 EOR.b d0,FAC_sc(a3) * EOR to create sign compare +00002F78 6000 F4B8 7361 BRA LAB_27FA * compare FAC1 with FAC2 & return +00002F7C 7362 * returns d0=+1 Cb=0 if FAC1 > FAC2 +00002F7C 7363 * returns d0= 0 Cb=0 if FAC1 = FAC2 +00002F7C 7364 * returns d0=-1 Cb=1 if FAC1 < FAC2 +00002F7C 7365 +00002F7C 7366 +00002F7C 7367 ************************************************************************************* +00002F7C 7368 * +00002F7C 7369 * perform WIDTH +00002F7C 7370 +00002F7C 7371 LAB_WDTH +00002F7C B03C 002C 7372 CMP.b #',',d0 * is next byte "," +00002F80 672C 7373 BEQ.s LAB_TBSZ * if so do tab size +00002F82 7374 +00002F82 6100 EF8E 7375 BSR LAB_GTBY * get byte parameter, result in d0 and Itemp +00002F86 4A00 7376 TST.b d0 * test result +00002F88 6712 7377 BEQ.s LAB_NSTT * branch if set for infinite line +00002F8A 7378 +00002F8A B03C 0010 7379 CMP.b #$10,d0 * else make min width = 16d +00002F8E 6500 D9CE 7380 BCS LAB_FCER * if less do function call error & exit +00002F92 7381 +00002F92 7382 * this next compare ensures that we can't exit WIDTH via an error leaving the +00002F92 7383 * tab size greater than the line length. +00002F92 7384 +00002F92 B02B 05E2 7385 CMP.b TabSiz(a3),d0 * compare with tab size +00002F96 6404 7386 BCC.s LAB_NSTT * branch if >= tab size +00002F98 7387 +00002F98 1740 05E2 7388 MOVE.b d0,TabSiz(a3) * else make tab size = terminal width +00002F9C 7389 LAB_NSTT +00002F9C 1740 05E6 7390 MOVE.b d0,TWidth(a3) * set the terminal width +00002FA0 6100 E608 7391 BSR LAB_GBYT * get BASIC byte back +00002FA4 672C 7392 BEQ.s WExit * exit if no following +00002FA6 7393 +00002FA6 B03C 002C 7394 CMP.b #',',d0 * else is it "," +00002FAA 6600 D9BE 7395 BNE LAB_SNER * if not do syntax error +00002FAE 7396 +00002FAE 7397 LAB_TBSZ +00002FAE 6100 EF5E 7398 BSR LAB_SGBY * increment and get byte, result in d0 and Itemp +00002FB2 4A00 7399 TST.b d0 * test TAB size +00002FB4 6B00 D9A8 7400 BMI LAB_FCER * if >127 do function call error & exit +00002FB8 7401 +00002FB8 B03C 0001 7402 CMP.b #1,d0 * compare with min-1 +00002FBC 6500 D9A0 7403 BCS LAB_FCER * if <=1 do function call error & exit +00002FC0 7404 +00002FC0 122B 05E6 7405 MOVE.b TWidth(a3),d1 * set flags for width +00002FC4 6708 7406 BEQ.s LAB_SVTB * skip check if infinite line +00002FC6 7407 +00002FC6 B02B 05E6 7408 CMP.b TWidth(a3),d0 * compare TAB with width +00002FCA 6E00 D992 7409 BGT LAB_FCER * branch if too big +00002FCE 7410 +00002FCE 7411 LAB_SVTB +00002FCE 1740 05E2 7412 MOVE.b d0,TabSiz(a3) * save TAB size +00002FD2 7413 +00002FD2 7414 * calculate tab column limit from TAB size. The Iclim is set to the last tab +00002FD2 7415 * position on a line that still has at least one whole tab width between it +00002FD2 7416 * and the end of the line. +00002FD2 7417 +00002FD2 7418 WExit +00002FD2 102B 05E6 7419 MOVE.b TWidth(a3),d0 * get width +00002FD6 670A 7420 BEQ.s LAB_WDLP * branch if infinite line +00002FD8 7421 +00002FD8 B02B 05E2 7422 CMP.b TabSiz(a3),d0 * compare with tab size +00002FDC 6404 7423 BCC.s LAB_WDLP * branch if >= tab size +00002FDE 7424 +00002FDE 1740 05E2 7425 MOVE.b d0,TabSiz(a3) * else make tab size = terminal width +00002FE2 7426 LAB_WDLP +00002FE2 902B 05E2 7427 SUB.b TabSiz(a3),d0 * subtract tab size +00002FE6 64FA 7428 BCC.s LAB_WDLP * loop while no borrow +00002FE8 7429 +00002FE8 D02B 05E2 7430 ADD.b TabSiz(a3),d0 * add tab size back +00002FEC D02B 05E2 7431 ADD.b TabSiz(a3),d0 * add tab size back again +00002FF0 7432 +00002FF0 4400 7433 NEG.b d0 * make -ve +00002FF2 D02B 05E6 7434 ADD.b TWidth(a3),d0 * subtract remainder from width +00002FF6 1740 05E7 7435 MOVE.b d0,Iclim(a3) * save tab column limit +00002FFA 7436 RTS_023 +00002FFA 4E75 7437 RTS +00002FFC 7438 +00002FFC 7439 +00002FFC 7440 ************************************************************************************* +00002FFC 7441 * +00002FFC 7442 * perform SQR() +00002FFC 7443 +00002FFC 7444 * d0 is number to find the root of +00002FFC 7445 * d1 is the root result +00002FFC 7446 * d2 is the remainder +00002FFC 7447 * d3 is a counter +00002FFC 7448 * d4 is temp +00002FFC 7449 +00002FFC 7450 LAB_SQR +00002FFC 4A2B 0595 7451 TST.b FAC1_s(a3) * test FAC1 sign +00003000 6B00 D95C 7452 BMI LAB_FCER * if -ve do function call error +00003004 7453 +00003004 4A2B 0594 7454 TST.b FAC1_e(a3) * test exponent +00003008 67F0 7455 BEQ.s RTS_023 * exit if zero +0000300A 7456 +0000300A 48E7 7800 7457 MOVEM.l d1-d4,-(sp) * save registers +0000300E 202B 0590 7458 MOVE.l FAC1_m(a3),d0 * copy FAC1 +00003012 7400 7459 MOVEQ #0,d2 * clear remainder +00003014 2202 7460 MOVE.l d2,d1 * clear root +00003016 7461 +00003016 761F 7462 MOVEQ #$1F,d3 * $1F for DBF, 64 pairs of bits to +00003018 7463 * do for a 32 bit result +00003018 082B 0000 0594 7464 BTST #0,FAC1_e(a3) * test exponent odd/even +0000301E 6606 7465 BNE.s LAB_SQE2 * if odd only 1 shift first time +00003020 7466 +00003020 7467 LAB_SQE1 +00003020 D080 7468 ADD.l d0,d0 * shift highest bit of number .. +00003022 D582 7469 ADDX.l d2,d2 * .. into remainder .. never overflows +00003024 D281 7470 ADD.l d1,d1 * root = root * 2 .. never overflows +00003026 7471 LAB_SQE2 +00003026 D080 7472 ADD.l d0,d0 * shift highest bit of number .. +00003028 D582 7473 ADDX.l d2,d2 * .. into remainder .. never overflows +0000302A 7474 +0000302A 2801 7475 MOVE.l d1,d4 * copy root +0000302C D884 7476 ADD.l d4,d4 * 2n +0000302E 5284 7477 ADDQ.l #1,d4 * 2n+1 +00003030 7478 +00003030 B484 7479 CMP.l d4,d2 * compare 2n+1 to remainder +00003032 6504 7480 BCS.s LAB_SQNS * skip sub if remainder smaller +00003034 7481 +00003034 9484 7482 SUB.l d4,d2 * subtract temp from remainder +00003036 5281 7483 ADDQ.l #1,d1 * increment root +00003038 7484 LAB_SQNS +00003038 51CB FFE6 7485 DBF d3,LAB_SQE1 * loop if not all done +0000303C 7486 +0000303C 2741 0590 7487 MOVE.l d1,FAC1_m(a3) * save result mantissa +00003040 102B 0594 7488 MOVE.b FAC1_e(a3),d0 * get exponent (d0 is clear here) +00003044 0440 0080 7489 SUB.w #$80,d0 * normalise +00003048 E248 7490 LSR.w #1,d0 * /2 +0000304A 6402 7491 BCC.s LAB_SQNA * skip increment if carry clear +0000304C 7492 +0000304C 5240 7493 ADDQ.w #1,d0 * add bit zero back in (allow for half shift) +0000304E 7494 LAB_SQNA +0000304E 0640 0080 7495 ADD.w #$80,d0 * re-bias to $80 +00003052 1740 0594 7496 MOVE.b d0,FAC1_e(a3) * save it +00003056 4CDF 001E 7497 MOVEM.l (sp)+,d1-d4 * restore registers +0000305A 6000 F0A8 7498 BRA LAB_24D5 * normalise FAC1 & return +0000305E 7499 +0000305E 7500 +0000305E 7501 ************************************************************************************* +0000305E 7502 * +0000305E 7503 * perform VARPTR() +0000305E 7504 +0000305E 7505 LAB_VARPTR +0000305E 101D 7506 MOVE.b (a5)+,d0 * increment pointer +00003060 7507 LAB_VARCALL +00003060 6100 E756 7508 BSR LAB_GVAR * get variable address in a0 +00003064 6100 E530 7509 BSR LAB_1BFB * scan for ")", else do syntax error/warm start +00003068 2008 7510 MOVE.l a0,d0 * copy the variable address +0000306A 6000 EA3C 7511 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & return +0000306E 7512 +0000306E 7513 +0000306E 7514 ************************************************************************************* +0000306E 7515 * +0000306E 7516 * perform RAMBASE +0000306E 7517 +0000306E 7518 LAB_RAM +0000306E 41EB 0400 7519 LEA ram_base(a3),a0 * get start of EhBASIC RAM +00003072 2008 7520 MOVE.l a0,d0 * copy it +00003074 6000 EA32 7521 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & return +00003078 7522 +00003078 7523 +00003078 7524 ************************************************************************************* +00003078 7525 * +00003078 7526 * perform PI +00003078 7527 +00003078 7528 LAB_PI +00003078 277C C90FDAA2 0590 7529 MOVE.l #$C90FDAA2,FAC1_m(a3) * pi mantissa (32 bit) +00003080 377C 8200 0594 7530 MOVE.w #$8200,FAC1_e(a3) * pi exponent and sign +00003086 4E75 7531 RTS +00003088 7532 +00003088 7533 +00003088 7534 ************************************************************************************* +00003088 7535 * +00003088 7536 * perform TWOPI +00003088 7537 +00003088 7538 LAB_TWOPI +00003088 277C C90FDAA2 0590 7539 MOVE.l #$C90FDAA2,FAC1_m(a3) * 2pi mantissa (32 bit) +00003090 377C 8300 0594 7540 MOVE.w #$8300,FAC1_e(a3) * 2pi exponent and sign +00003096 4E75 7541 RTS +00003098 7542 +00003098 7543 +00003098 7544 ************************************************************************************* +00003098 7545 * +00003098 7546 * get ASCII string equivalent into FAC1 as integer32 or float +00003098 7547 +00003098 7548 * entry is with a5 pointing to the first character of the string +00003098 7549 * exit with a5 pointing to the first character after the string +00003098 7550 +00003098 7551 * d0 is character +00003098 7552 * d1 is mantissa +00003098 7553 * d2 is partial and table mantissa +00003098 7554 * d3 is mantissa exponent (decimal & binary) +00003098 7555 * d4 is decimal exponent +00003098 7556 +00003098 7557 * get FAC1 from string +00003098 7558 * this routine now handles hex and binary values from strings +00003098 7559 * starting with "$" and "%" respectively +00003098 7560 +00003098 7561 LAB_2887 +00003098 48E7 7C00 7562 MOVEM.l d1-d5,-(sp) * save registers +0000309C 7200 7563 MOVEQ #$00,d1 * clear temp accumulator +0000309E 2601 7564 MOVE.l d1,d3 * set mantissa decimal exponent count +000030A0 2801 7565 MOVE.l d1,d4 * clear decimal exponent +000030A2 1741 0595 7566 MOVE.b d1,FAC1_s(a3) * clear sign byte +000030A6 1741 05B5 7567 MOVE.b d1,Dtypef(a3) * set float data type +000030AA 1741 05AF 7568 MOVE.b d1,expneg(a3) * clear exponent sign +000030AE 6100 E4FA 7569 BSR LAB_GBYT * get first byte back +000030B2 653C 7570 BCS.s LAB_28FE * go get floating if 1st character numeric +000030B4 7571 +000030B4 B03C 002D 7572 CMP.b #'-',d0 * or is it -ve number +000030B8 6608 7573 BNE.s LAB_289A * branch if not +000030BA 7574 +000030BA 177C 00FF 0595 7575 MOVE.b #$FF,FAC1_s(a3) * set sign byte +000030C0 6006 7576 BRA.s LAB_289C * now go scan & check for hex/bin/int +000030C2 7577 +000030C2 7578 LAB_289A +000030C2 7579 * first character wasn't numeric or - +000030C2 B03C 002B 7580 CMP.b #'+',d0 * compare with '+' +000030C6 6606 7581 BNE.s LAB_289D * branch if not '+' (go check for '.'/hex/binary +000030C8 7582 * /integer) +000030C8 7583 +000030C8 7584 LAB_289C +000030C8 7585 * was "+" or "-" to start, so get next character +000030C8 6100 E4DE 7586 BSR LAB_IGBY * increment & scan memory +000030CC 6522 7587 BCS.s LAB_28FE * branch if numeric character +000030CE 7588 +000030CE 7589 LAB_289D +000030CE B03C 002E 7590 CMP.b #'.',d0 * else compare with '.' +000030D2 6700 0092 7591 BEQ LAB_2904 * branch if '.' +000030D6 7592 +000030D6 7593 * code here for hex/binary/integer numbers +000030D6 B03C 0024 7594 CMP.b #'$',d0 * compare with '$' +000030DA 6700 010A 7595 BEQ LAB_CHEX * branch if '$' +000030DE 7596 +000030DE B03C 0025 7597 CMP.b #'%',d0 * else compare with '%' +000030E2 6700 0164 7598 BEQ LAB_CBIN * branch if '%' +000030E6 7599 +000030E6 6000 008C 7600 BRA LAB_2Y01 * not #.$%& so return 0 +000030EA 7601 +000030EA 7602 LAB_28FD +000030EA 6100 E4BC 7603 BSR LAB_IGBY * get next character +000030EE 646C 7604 BCC.s LAB_2902 * exit loop if not a digit +000030F0 7605 +000030F0 7606 LAB_28FE +000030F0 6100 01A8 7607 BSR d1x10 * multiply d1 by 10 and add character +000030F4 64F4 7608 BCC.s LAB_28FD * loop for more if no overflow +000030F6 7609 +000030F6 7610 LAB_28FF +000030F6 7611 * overflowed mantissa, count 10s exponent +000030F6 5283 7612 ADDQ.l #1,d3 * increment mantissa decimal exponent count +000030F8 6100 E4AE 7613 BSR LAB_IGBY * get next character +000030FC 65F8 7614 BCS.s LAB_28FF * loop while numeric character +000030FE 7615 +000030FE 7616 * done overflow, now flush fraction or do E +000030FE B03C 002E 7617 CMP.b #'.',d0 * else compare with '.' +00003102 6606 7618 BNE.s LAB_2901 * branch if not '.' +00003104 7619 +00003104 7620 LAB_2900 +00003104 7621 * flush remaining fraction digits +00003104 6100 E4A2 7622 BSR LAB_IGBY * get next character +00003108 65FA 7623 BCS LAB_2900 * loop while numeric character +0000310A 7624 +0000310A 7625 LAB_2901 +0000310A 7626 * done number, only (possible) exponent remains +0000310A B03C 0045 7627 CMP.b #'E',d0 * else compare with 'E' +0000310E 6664 7628 BNE.s LAB_2Y01 * if not 'E' all done, go evaluate +00003110 7629 +00003110 7630 * process exponent +00003110 6100 E496 7631 BSR LAB_IGBY * get next character +00003114 6528 7632 BCS.s LAB_2X04 * branch if digit +00003116 7633 +00003116 B03C 002D 7634 CMP.b #'-',d0 * or is it -ve number +0000311A 6706 7635 BEQ.s LAB_2X01 * branch if so +0000311C 7636 +0000311C B03C 00B3 7637 CMP.b #TK_MINUS,d0 * or is it -ve number +00003120 6608 7638 BNE.s LAB_2X02 * branch if not +00003122 7639 +00003122 7640 LAB_2X01 +00003122 177C 00FF 05AF 7641 MOVE.b #$FF,expneg(a3) * set exponent sign +00003128 600E 7642 BRA.s LAB_2X03 * now go scan & check exponent +0000312A 7643 +0000312A 7644 LAB_2X02 +0000312A B03C 002B 7645 CMP.b #'+',d0 * or is it +ve number +0000312E 6708 7646 BEQ.s LAB_2X03 * branch if so +00003130 7647 +00003130 B03C 00B2 7648 CMP.b #TK_PLUS,d0 * or is it +ve number +00003134 6600 D834 7649 BNE LAB_SNER * wasn't - + TK_MINUS TK_PLUS or # so do error +00003138 7650 +00003138 7651 LAB_2X03 +00003138 6100 E46E 7652 BSR LAB_IGBY * get next character +0000313C 6436 7653 BCC.s LAB_2Y01 * if not digit all done, go evaluate +0000313E 7654 LAB_2X04 +0000313E C8FC 000A 7655 MULU #10,d4 * multiply decimal exponent by 10 +00003142 C0BC 000000FF 7656 AND.l #$FF,d0 * mask character +00003148 0400 0030 7657 SUB.b #'0',d0 * convert to value +0000314C D880 7658 ADD.l d0,d4 * add to decimal exponent +0000314E B83C 0030 7659 CMP.b #48,d4 * compare with decimal exponent limit+10 +00003152 6FE4 7660 BLE.s LAB_2X03 * loop if no overflow/underflow +00003154 7661 +00003154 7662 LAB_2X05 +00003154 7663 * exponent value has overflowed +00003154 6100 E452 7664 BSR LAB_IGBY * get next character +00003158 65FA 7665 BCS.s LAB_2X05 * loop while numeric digit +0000315A 7666 +0000315A 6018 7667 BRA.s LAB_2Y01 * all done, go evaluate +0000315C 7668 +0000315C 7669 LAB_2902 +0000315C B03C 002E 7670 CMP.b #'.',d0 * else compare with '.' +00003160 6704 7671 BEQ.s LAB_2904 * branch if was '.' +00003162 7672 +00003162 60A6 7673 BRA.s LAB_2901 * branch if not '.' (go check/do 'E') +00003164 7674 +00003164 7675 LAB_2903 +00003164 5383 7676 SUBQ.l #1,d3 * decrement mantissa decimal exponent +00003166 7677 LAB_2904 +00003166 7678 * was dp so get fraction part +00003166 6100 E440 7679 BSR LAB_IGBY * get next character +0000316A 649E 7680 BCC.s LAB_2901 * exit loop if not a digit (go check/do 'E') +0000316C 7681 +0000316C 6100 012C 7682 BSR d1x10 * multiply d1 by 10 and add character +00003170 64F2 7683 BCC.s LAB_2903 * loop for more if no overflow +00003172 7684 +00003172 6090 7685 BRA.s LAB_2900 * else go flush remaining fraction part +00003174 7686 +00003174 7687 LAB_2Y01 +00003174 7688 * now evaluate result +00003174 4A2B 05AF 7689 TST.b expneg(a3) * test exponent sign +00003178 6A02 7690 BPL.s LAB_2Y02 * branch if sign positive +0000317A 7691 +0000317A 4484 7692 NEG.l d4 * negate decimal exponent +0000317C 7693 LAB_2Y02 +0000317C D883 7694 ADD.l d3,d4 * add mantissa decimal exponent +0000317E 7620 7695 MOVEQ #32,d3 * set up max binary exponent +00003180 4A81 7696 TST.l d1 * test mantissa +00003182 6752 7697 BEQ.s LAB_rtn0 * if mantissa=0 return 0 +00003184 7698 +00003184 6B08 7699 BMI.s LAB_2Y04 * branch if already mormalised +00003186 7700 +00003186 5383 7701 SUBQ.l #1,d3 * decrement bianry exponent for DBMI loop +00003188 7702 LAB_2Y03 +00003188 D281 7703 ADD.l d1,d1 * shift mantissa +0000318A 5BCB FFFC 7704 DBMI d3,LAB_2Y03 * decrement & loop if not normalised +0000318E 7705 +0000318E 7706 * ensure not too big or small +0000318E 7707 LAB_2Y04 +0000318E B8BC 00000026 7708 CMP.l #38,d4 * compare decimal exponent with max exponent +00003194 6E00 D7C4 7709 BGT LAB_OFER * if greater do overflow error and warm start +00003198 7710 +00003198 B8BC FFFFFFDA 7711 CMP.l #-38,d4 * compare decimal exponent with min exponent +0000319E 6D34 7712 BLT.s LAB_ret0 * if less just return zero +000031A0 7713 +000031A0 4484 7714 NEG.l d4 * negate decimal exponent to go right way +000031A2 C9FC 0006 7715 MULS #6,d4 * 6 bytes per entry +000031A6 2F08 7716 MOVE.l a0,-(sp) * save register +000031A8 41FA 0210 7717 LEA LAB_P_10(pc),a0 * point to table +000031AC 1770 4000 059C 7718 MOVE.b (a0,d4.w),FAC2_e(a3) * copy exponent for multiply +000031B2 2770 4002 0598 7719 MOVE.l 2(a0,d4.w),FAC2_m(a3) * copy table mantissa +000031B8 205F 7720 MOVE.l (sp)+,a0 * restore register +000031BA 7721 +000031BA 0A03 0080 7722 EORI.b #$80,d3 * normalise input exponent +000031BE 2741 0590 7723 MOVE.l d1,FAC1_m(a3) * save input mantissa +000031C2 1743 0594 7724 MOVE.b d3,FAC1_e(a3) * save input exponent +000031C6 176B 0595 059E 7725 MOVE.b FAC1_s(a3),FAC_sc(a3) * set sign as sign compare +000031CC 7726 +000031CC 4CDF 003E 7727 MOVEM.l (sp)+,d1-d5 * restore registers +000031D0 6000 F05A 7728 BRA LAB_MULTIPLY * go multiply input by table +000031D4 7729 +000031D4 7730 LAB_ret0 +000031D4 7200 7731 MOVEQ #0,d1 * clear mantissa +000031D6 7732 LAB_rtn0 +000031D6 2601 7733 MOVE.l d1,d3 * clear exponent +000031D8 1743 0594 7734 MOVE.b d3,FAC1_e(a3) * save exponent +000031DC 2741 0590 7735 MOVE.l d1,FAC1_m(a3) * save mantissa +000031E0 4CDF 003E 7736 MOVEM.l (sp)+,d1-d5 * restore registers +000031E4 4E75 7737 RTS +000031E6 7738 +000031E6 7739 +000031E6 7740 ************************************************************************************* +000031E6 7741 * +000031E6 7742 * $ for hex add-on +000031E6 7743 +000031E6 7744 * gets here if the first character was "$" for hex +000031E6 7745 * get hex number +000031E6 7746 +000031E6 7747 LAB_CHEX +000031E6 177C 0040 05B5 7748 MOVE.b #$40,Dtypef(a3) * set integer numeric data type +000031EC 7620 7749 MOVEQ #32,d3 * set up max binary exponent +000031EE 7750 LAB_CHXX +000031EE 6100 E3B8 7751 BSR LAB_IGBY * increment & scan memory +000031F2 6514 7752 BCS.s LAB_ISHN * branch if numeric character +000031F4 7753 +000031F4 803C 0020 7754 OR.b #$20,d0 * case convert, allow "A" to "F" and "a" to "f" +000031F8 0400 0061 7755 SUB.b #'a',d0 * subtract "a" +000031FC 652A 7756 BCS.s LAB_CHX3 * exit if <"a" +000031FE 7757 +000031FE B03C 0006 7758 CMP.b #$06,d0 * compare normalised with $06 (max+1) +00003202 6424 7759 BCC.s LAB_CHX3 * exit if >"f" +00003204 7760 +00003204 0600 003A 7761 ADD.b #$3A,d0 * convert to nibble+"0" +00003208 7762 LAB_ISHN +00003208 616C 7763 BSR.s d1x16 * multiply d1 by 16 and add the character +0000320A 64E2 7764 BCC.s LAB_CHXX * loop for more if no overflow +0000320C 7765 +0000320C 7766 * overflowed mantissa, count 16s exponent +0000320C 7767 LAB_CHX1 +0000320C 5883 7768 ADDQ.l #4,d3 * increment mantissa exponent count +0000320E 6900 D74A 7769 BVS LAB_OFER * do overflow error if overflowed +00003212 7770 +00003212 6100 E394 7771 BSR LAB_IGBY * get next character +00003216 65F4 7772 BCS.s LAB_CHX1 * loop while numeric character +00003218 7773 +00003218 803C 0020 7774 OR.b #$20,d0 * case convert, allow "A" to "F" and "a" to "f" +0000321C 0400 0061 7775 SUB.b #'a',d0 * subtract "a" +00003220 6506 7776 BCS.s LAB_CHX3 * exit if <"a" +00003222 7777 +00003222 B03C 0006 7778 CMP.b #$06,d0 * compare normalised with $06 (max+1) +00003226 65E4 7779 BCS.s LAB_CHX1 * loop if <="f" +00003228 7780 +00003228 7781 * now return value +00003228 7782 LAB_CHX3 +00003228 4A81 7783 TST.l d1 * test mantissa +0000322A 67AA 7784 BEQ.s LAB_rtn0 * if mantissa=0 return 0 +0000322C 7785 +0000322C 6B08 7786 BMI.s LAB_exxf * branch if already mormalised +0000322E 7787 +0000322E 5383 7788 SUBQ.l #1,d3 * decrement bianry exponent for DBMI loop +00003230 7789 LAB_CHX2 +00003230 D281 7790 ADD.l d1,d1 * shift mantissa +00003232 5BCB FFFC 7791 DBMI d3,LAB_CHX2 * decrement & loop if not normalised +00003236 7792 +00003236 7793 LAB_exxf +00003236 0A03 0080 7794 EORI.b #$80,d3 * normalise exponent +0000323A 1743 0594 7795 MOVE.b d3,FAC1_e(a3) * save exponent +0000323E 2741 0590 7796 MOVE.l d1,FAC1_m(a3) * save mantissa +00003242 4CDF 003E 7797 MOVEM.l (sp)+,d1-d5 * restore registers +00003246 7798 RTS_024 +00003246 4E75 7799 RTS +00003248 7800 +00003248 7801 +00003248 7802 ************************************************************************************* +00003248 7803 * +00003248 7804 * % for binary add-on +00003248 7805 +00003248 7806 * gets here if the first character was "%" for binary +00003248 7807 * get binary number +00003248 7808 +00003248 7809 LAB_CBIN +00003248 177C 0040 05B5 7810 MOVE.b #$40,Dtypef(a3) * set integer numeric data type +0000324E 7620 7811 MOVEQ #32,d3 * set up max binary exponent +00003250 7812 LAB_CBXN +00003250 6100 E356 7813 BSR LAB_IGBY * increment & scan memory +00003254 64D2 7814 BCC.s LAB_CHX3 * if not numeric character go return value +00003256 7815 +00003256 B03C 0032 7816 CMP.b #'2',d0 * compare with "2" (max+1) +0000325A 64CC 7817 BCC.s LAB_CHX3 * if >="2" go return value +0000325C 7818 +0000325C 2401 7819 MOVE.l d1,d2 * copy value +0000325E 6124 7820 BSR.s d1x02 * multiply d1 by 2 and add character +00003260 64EE 7821 BCC.s LAB_CBXN * loop for more if no overflow +00003262 7822 +00003262 7823 * overflowed mantissa, count 2s exponent +00003262 7824 LAB_CBX1 +00003262 5283 7825 ADDQ.l #1,d3 * increment mantissa exponent count +00003264 6900 D6F4 7826 BVS LAB_OFER * do overflow error if overflowed +00003268 7827 +00003268 6100 E33E 7828 BSR LAB_IGBY * get next character +0000326C 64BA 7829 BCC.s LAB_CHX3 * if not numeric character go return value +0000326E 7830 +0000326E B03C 0032 7831 CMP.b #'2',d0 * compare with "2" (max+1) +00003272 65EE 7832 BCS.s LAB_CBX1 * loop if <"2" +00003274 7833 +00003274 60B2 7834 BRA.s LAB_CHX3 * if not numeric character go return value +00003276 7835 +00003276 7836 * half way decent times 16 and times 2 with overflow checks 00003276 7837 -00003276 7838 * half way decent times 16 and times 2 with overflow checks -00003276 7839 -00003276 7840 d1x16 -00003276 2401 7841 MOVE.l d1,d2 * copy value -00003278 D482 7842 ADD.l d2,d2 * times two -0000327A 65CA 7843 BCS.s RTS_024 * return if overflow -0000327C 7844 -0000327C D482 7845 ADD.l d2,d2 * times four -0000327E 65C6 7846 BCS.s RTS_024 * return if overflow -00003280 7847 -00003280 D482 7848 ADD.l d2,d2 * times eight -00003282 65C2 7849 BCS.s RTS_024 * return if overflow -00003284 7850 -00003284 7851 d1x02 -00003284 D482 7852 ADD.l d2,d2 * times sixteen (ten/two) -00003286 65BE 7853 BCS.s RTS_024 * return if overflow +00003276 7838 d1x16 +00003276 2401 7839 MOVE.l d1,d2 * copy value +00003278 D482 7840 ADD.l d2,d2 * times two +0000327A 65CA 7841 BCS.s RTS_024 * return if overflow +0000327C 7842 +0000327C D482 7843 ADD.l d2,d2 * times four +0000327E 65C6 7844 BCS.s RTS_024 * return if overflow +00003280 7845 +00003280 D482 7846 ADD.l d2,d2 * times eight +00003282 65C2 7847 BCS.s RTS_024 * return if overflow +00003284 7848 +00003284 7849 d1x02 +00003284 D482 7850 ADD.l d2,d2 * times sixteen (ten/two) +00003286 65BE 7851 BCS.s RTS_024 * return if overflow +00003288 7852 +00003288 7853 * now add in new digit 00003288 7854 -00003288 7855 * now add in new digit -00003288 7856 -00003288 C0BC 000000FF 7857 AND.l #$FF,d0 * mask character -0000328E 0400 0030 7858 SUB.b #'0',d0 * convert to value -00003292 D480 7859 ADD.l d0,d2 * add to result -00003294 65B0 7860 BCS.s RTS_024 * return if overflow, it should never ever do -00003296 7861 * this -00003296 7862 -00003296 2202 7863 MOVE.l d2,d1 * copy result -00003298 4E75 7864 RTS +00003288 C0BC 000000FF 7855 AND.l #$FF,d0 * mask character +0000328E 0400 0030 7856 SUB.b #'0',d0 * convert to value +00003292 D480 7857 ADD.l d0,d2 * add to result +00003294 65B0 7858 BCS.s RTS_024 * return if overflow, it should never ever do +00003296 7859 * this +00003296 7860 +00003296 2202 7861 MOVE.l d2,d1 * copy result +00003298 4E75 7862 RTS +0000329A 7863 +0000329A 7864 * half way decent times 10 with overflow checks 0000329A 7865 -0000329A 7866 * half way decent times 10 with overflow checks -0000329A 7867 -0000329A 7868 d1x10 -0000329A 2401 7869 MOVE.l d1,d2 * copy value -0000329C D482 7870 ADD.l d2,d2 * times two -0000329E 6508 7871 BCS.s RTS_025 * return if overflow -000032A0 7872 -000032A0 D482 7873 ADD.l d2,d2 * times four -000032A2 6504 7874 BCS.s RTS_025 * return if overflow -000032A4 7875 -000032A4 D481 7876 ADD.l d1,d2 * times five -000032A6 64DC 7877 BCC.s d1x02 * do times two and add in new digit if ok -000032A8 7878 -000032A8 7879 RTS_025 -000032A8 4E75 7880 RTS -000032AA 7881 -000032AA 7882 -000032AA 7883 ************************************************************************************* -000032AA 7884 * -000032AA 7885 * token values needed for BASIC -000032AA 7886 -000032AA =00000080 7887 TK_END EQU $80 * $80 -000032AA =00000081 7888 TK_FOR EQU TK_END+1 * $81 -000032AA =00000082 7889 TK_NEXT EQU TK_FOR+1 * $82 -000032AA =00000083 7890 TK_DATA EQU TK_NEXT+1 * $83 -000032AA =00000084 7891 TK_INPUT EQU TK_DATA+1 * $84 -000032AA =00000085 7892 TK_DIM EQU TK_INPUT+1 * $85 -000032AA =00000086 7893 TK_READ EQU TK_DIM+1 * $86 -000032AA =00000087 7894 TK_LET EQU TK_READ+1 * $87 -000032AA =00000088 7895 TK_DEC EQU TK_LET+1 * $88 -000032AA =00000089 7896 TK_GOTO EQU TK_DEC+1 * $89 -000032AA =0000008A 7897 TK_RUN EQU TK_GOTO+1 * $8A -000032AA =0000008B 7898 TK_IF EQU TK_RUN+1 * $8B -000032AA =0000008C 7899 TK_RESTORE EQU TK_IF+1 * $8C -000032AA =0000008D 7900 TK_GOSUB EQU TK_RESTORE+1 * $8D -000032AA =0000008E 7901 TK_RETURN EQU TK_GOSUB+1 * $8E -000032AA =0000008F 7902 TK_REM EQU TK_RETURN+1 * $8F -000032AA =00000090 7903 TK_STOP EQU TK_REM+1 * $90 -000032AA =00000091 7904 TK_ON EQU TK_STOP+1 * $91 -000032AA =00000092 7905 TK_NULL EQU TK_ON+1 * $92 -000032AA =00000093 7906 TK_INC EQU TK_NULL+1 * $93 -000032AA =00000094 7907 TK_WAIT EQU TK_INC+1 * $94 -000032AA =00000095 7908 TK_LOAD EQU TK_WAIT+1 * $95 -000032AA =00000096 7909 TK_SAVE EQU TK_LOAD+1 * $96 -000032AA =00000097 7910 TK_DEF EQU TK_SAVE+1 * $97 -000032AA =00000098 7911 TK_POKE EQU TK_DEF+1 * $98 -000032AA =00000099 7912 TK_DOKE EQU TK_POKE+1 * $99 -000032AA =0000009A 7913 TK_LOKE EQU TK_DOKE+1 * $9A -000032AA =0000009B 7914 TK_CALL EQU TK_LOKE+1 * $9B -000032AA =0000009C 7915 TK_DO EQU TK_CALL+1 * $9C -000032AA =0000009D 7916 TK_LOOP EQU TK_DO+1 * $9D -000032AA =0000009E 7917 TK_PRINT EQU TK_LOOP+1 * $9E -000032AA =0000009F 7918 TK_CONT EQU TK_PRINT+1 * $9F -000032AA =000000A0 7919 TK_LIST EQU TK_CONT+1 * $A0 -000032AA =000000A1 7920 TK_CLEAR EQU TK_LIST+1 * $A1 -000032AA =000000A2 7921 TK_NEW EQU TK_CLEAR+1 * $A2 -000032AA =000000A3 7922 TK_WIDTH EQU TK_NEW+1 * $A3 -000032AA =000000A4 7923 TK_GET EQU TK_WIDTH+1 * $A4 -000032AA =000000A5 7924 TK_SWAP EQU TK_GET+1 * $A5 -000032AA =000000A6 7925 TK_BITSET EQU TK_SWAP+1 * $A6 -000032AA =000000A7 7926 TK_BITCLR EQU TK_BITSET+1 * $A7 -000032AA =000000A8 7927 TK_TAB EQU TK_BITCLR+1 * $A8 -000032AA =000000A9 7928 TK_ELSE EQU TK_TAB+1 * $A9 -000032AA =000000AA 7929 TK_TO EQU TK_ELSE+1 * $AA -000032AA =000000AB 7930 TK_FN EQU TK_TO+1 * $AB -000032AA =000000AC 7931 TK_SPC EQU TK_FN+1 * $AC -000032AA =000000AD 7932 TK_THEN EQU TK_SPC+1 * $AD -000032AA =000000AE 7933 TK_NOT EQU TK_THEN+1 * $AE -000032AA =000000AF 7934 TK_STEP EQU TK_NOT+1 * $AF -000032AA =000000B0 7935 TK_UNTIL EQU TK_STEP+1 * $B0 -000032AA =000000B1 7936 TK_WHILE EQU TK_UNTIL+1 * $B1 -000032AA =000000B2 7937 TK_PLUS EQU TK_WHILE+1 * $B2 -000032AA =000000B3 7938 TK_MINUS EQU TK_PLUS+1 * $B3 -000032AA =000000B4 7939 TK_MULT EQU TK_MINUS+1 * $B4 -000032AA =000000B5 7940 TK_DIV EQU TK_MULT+1 * $B5 -000032AA =000000B6 7941 TK_POWER EQU TK_DIV+1 * $B6 -000032AA =000000B7 7942 TK_AND EQU TK_POWER+1 * $B7 -000032AA =000000B8 7943 TK_EOR EQU TK_AND+1 * $B8 -000032AA =000000B9 7944 TK_OR EQU TK_EOR+1 * $B9 -000032AA =000000BA 7945 TK_RSHIFT EQU TK_OR+1 * $BA -000032AA =000000BB 7946 TK_LSHIFT EQU TK_RSHIFT+1 * $BB -000032AA =000000BC 7947 TK_GT EQU TK_LSHIFT+1 * $BC -000032AA =000000BD 7948 TK_EQUAL EQU TK_GT+1 * $BD -000032AA =000000BE 7949 TK_LT EQU TK_EQUAL+1 * $BE -000032AA =000000BF 7950 TK_SGN EQU TK_LT+1 * $BF -000032AA =000000C0 7951 TK_INT EQU TK_SGN+1 * $C0 -000032AA =000000C1 7952 TK_ABS EQU TK_INT+1 * $C1 -000032AA =000000C2 7953 TK_USR EQU TK_ABS+1 * $C2 -000032AA =000000C3 7954 TK_FRE EQU TK_USR+1 * $C3 -000032AA =000000C4 7955 TK_POS EQU TK_FRE+1 * $C4 -000032AA =000000C5 7956 TK_SQR EQU TK_POS+1 * $C5 -000032AA =000000C6 7957 TK_RND EQU TK_SQR+1 * $C6 -000032AA =000000C7 7958 TK_LOG EQU TK_RND+1 * $C7 -000032AA =000000C8 7959 TK_EXP EQU TK_LOG+1 * $C8 -000032AA =000000C9 7960 TK_COS EQU TK_EXP+1 * $C9 -000032AA =000000CA 7961 TK_SIN EQU TK_COS+1 * $CA -000032AA =000000CB 7962 TK_TAN EQU TK_SIN+1 * $CB -000032AA =000000CC 7963 TK_ATN EQU TK_TAN+1 * $CC -000032AA =000000CD 7964 TK_PEEK EQU TK_ATN+1 * $CD -000032AA =000000CE 7965 TK_DEEK EQU TK_PEEK+1 * $CE -000032AA =000000CF 7966 TK_LEEK EQU TK_DEEK+1 * $CF -000032AA =000000D0 7967 TK_LEN EQU TK_LEEK+1 * $D0 -000032AA =000000D1 7968 TK_STRS EQU TK_LEN+1 * $D1 -000032AA =000000D2 7969 TK_VAL EQU TK_STRS+1 * $D2 -000032AA =000000D3 7970 TK_ASC EQU TK_VAL+1 * $D3 -000032AA =000000D4 7971 TK_UCASES EQU TK_ASC+1 * $D4 -000032AA =000000D5 7972 TK_LCASES EQU TK_UCASES+1 * $D5 -000032AA =000000D6 7973 TK_CHRS EQU TK_LCASES+1 * $D6 -000032AA =000000D7 7974 TK_HEXS EQU TK_CHRS+1 * $D7 -000032AA =000000D8 7975 TK_BINS EQU TK_HEXS+1 * $D8 -000032AA =000000D9 7976 TK_BITTST EQU TK_BINS+1 * $D9 -000032AA =000000DA 7977 TK_MAX EQU TK_BITTST+1 * $DA -000032AA =000000DB 7978 TK_MIN EQU TK_MAX+1 * $DB -000032AA =000000DC 7979 TK_RAM EQU TK_MIN+1 * $DC -000032AA =000000DD 7980 TK_PI EQU TK_RAM+1 * $DD -000032AA =000000DE 7981 TK_TWOPI EQU TK_PI+1 * $DE -000032AA =000000DF 7982 TK_VPTR EQU TK_TWOPI+1 * $DF -000032AA =000000E0 7983 TK_SADD EQU TK_VPTR+1 * $E0 -000032AA =000000E1 7984 TK_LEFTS EQU TK_SADD+1 * $E1 -000032AA =000000E2 7985 TK_RIGHTS EQU TK_LEFTS+1 * $E2 -000032AA =000000E3 7986 TK_MIDS EQU TK_RIGHTS+1 * $E3 -000032AA =000000E4 7987 TK_USINGS EQU TK_MIDS+1 * $E4 -000032AA 7988 -000032AA 7989 -000032AA 7990 ************************************************************************************* -000032AA 7991 * -000032AA 7992 * binary to unsigned decimal table -000032AA 7993 -000032AA 7994 Bin2dec -000032AA= 3B9ACA00 7995 dc.l $3B9ACA00 * 1000000000 -000032AE= 05F5E100 7996 dc.l $05F5E100 * 100000000 -000032B2= 00989680 7997 dc.l $00989680 * 10000000 -000032B6= 000F4240 7998 dc.l $000F4240 * 1000000 -000032BA= 000186A0 7999 dc.l $000186A0 * 100000 -000032BE= 00002710 8000 dc.l $00002710 * 10000 -000032C2= 000003E8 8001 dc.l $000003E8 * 1000 -000032C6= 00000064 8002 dc.l $00000064 * 100 -000032CA= 0000000A 8003 dc.l $0000000A * 10 -000032CE= 00000000 8004 dc.l $00000000 * 0 end marker -000032D2 8005 -000032D2 8006 LAB_RSED -000032D2= 332E3232 8007 dc.l $332E3232 * 858665522 +0000329A 7866 d1x10 +0000329A 2401 7867 MOVE.l d1,d2 * copy value +0000329C D482 7868 ADD.l d2,d2 * times two +0000329E 6508 7869 BCS.s RTS_025 * return if overflow +000032A0 7870 +000032A0 D482 7871 ADD.l d2,d2 * times four +000032A2 6504 7872 BCS.s RTS_025 * return if overflow +000032A4 7873 +000032A4 D481 7874 ADD.l d1,d2 * times five +000032A6 64DC 7875 BCC.s d1x02 * do times two and add in new digit if ok +000032A8 7876 +000032A8 7877 RTS_025 +000032A8 4E75 7878 RTS +000032AA 7879 +000032AA 7880 +000032AA 7881 ************************************************************************************* +000032AA 7882 * +000032AA 7883 * token values needed for BASIC +000032AA 7884 +000032AA =00000080 7885 TK_END EQU $80 * $80 +000032AA =00000081 7886 TK_FOR EQU TK_END+1 * $81 +000032AA =00000082 7887 TK_NEXT EQU TK_FOR+1 * $82 +000032AA =00000083 7888 TK_DATA EQU TK_NEXT+1 * $83 +000032AA =00000084 7889 TK_INPUT EQU TK_DATA+1 * $84 +000032AA =00000085 7890 TK_DIM EQU TK_INPUT+1 * $85 +000032AA =00000086 7891 TK_READ EQU TK_DIM+1 * $86 +000032AA =00000087 7892 TK_LET EQU TK_READ+1 * $87 +000032AA =00000088 7893 TK_DEC EQU TK_LET+1 * $88 +000032AA =00000089 7894 TK_GOTO EQU TK_DEC+1 * $89 +000032AA =0000008A 7895 TK_RUN EQU TK_GOTO+1 * $8A +000032AA =0000008B 7896 TK_IF EQU TK_RUN+1 * $8B +000032AA =0000008C 7897 TK_RESTORE EQU TK_IF+1 * $8C +000032AA =0000008D 7898 TK_GOSUB EQU TK_RESTORE+1 * $8D +000032AA =0000008E 7899 TK_RETURN EQU TK_GOSUB+1 * $8E +000032AA =0000008F 7900 TK_REM EQU TK_RETURN+1 * $8F +000032AA =00000090 7901 TK_STOP EQU TK_REM+1 * $90 +000032AA =00000091 7902 TK_ON EQU TK_STOP+1 * $91 +000032AA =00000092 7903 TK_NULL EQU TK_ON+1 * $92 +000032AA =00000093 7904 TK_INC EQU TK_NULL+1 * $93 +000032AA =00000094 7905 TK_WAIT EQU TK_INC+1 * $94 +000032AA =00000095 7906 TK_LOAD EQU TK_WAIT+1 * $95 +000032AA =00000096 7907 TK_SAVE EQU TK_LOAD+1 * $96 +000032AA =00000097 7908 TK_DEF EQU TK_SAVE+1 * $97 +000032AA =00000098 7909 TK_POKE EQU TK_DEF+1 * $98 +000032AA =00000099 7910 TK_DOKE EQU TK_POKE+1 * $99 +000032AA =0000009A 7911 TK_LOKE EQU TK_DOKE+1 * $9A +000032AA =0000009B 7912 TK_CALL EQU TK_LOKE+1 * $9B +000032AA =0000009C 7913 TK_DO EQU TK_CALL+1 * $9C +000032AA =0000009D 7914 TK_LOOP EQU TK_DO+1 * $9D +000032AA =0000009E 7915 TK_PRINT EQU TK_LOOP+1 * $9E +000032AA =0000009F 7916 TK_CONT EQU TK_PRINT+1 * $9F +000032AA =000000A0 7917 TK_LIST EQU TK_CONT+1 * $A0 +000032AA =000000A1 7918 TK_CLEAR EQU TK_LIST+1 * $A1 +000032AA =000000A2 7919 TK_NEW EQU TK_CLEAR+1 * $A2 +000032AA =000000A3 7920 TK_WIDTH EQU TK_NEW+1 * $A3 +000032AA =000000A4 7921 TK_GET EQU TK_WIDTH+1 * $A4 +000032AA =000000A5 7922 TK_SWAP EQU TK_GET+1 * $A5 +000032AA =000000A6 7923 TK_BITSET EQU TK_SWAP+1 * $A6 +000032AA =000000A7 7924 TK_BITCLR EQU TK_BITSET+1 * $A7 +000032AA =000000A8 7925 TK_TAB EQU TK_BITCLR+1 * $A8 +000032AA =000000A9 7926 TK_ELSE EQU TK_TAB+1 * $A9 +000032AA =000000AA 7927 TK_TO EQU TK_ELSE+1 * $AA +000032AA =000000AB 7928 TK_FN EQU TK_TO+1 * $AB +000032AA =000000AC 7929 TK_SPC EQU TK_FN+1 * $AC +000032AA =000000AD 7930 TK_THEN EQU TK_SPC+1 * $AD +000032AA =000000AE 7931 TK_NOT EQU TK_THEN+1 * $AE +000032AA =000000AF 7932 TK_STEP EQU TK_NOT+1 * $AF +000032AA =000000B0 7933 TK_UNTIL EQU TK_STEP+1 * $B0 +000032AA =000000B1 7934 TK_WHILE EQU TK_UNTIL+1 * $B1 +000032AA =000000B2 7935 TK_PLUS EQU TK_WHILE+1 * $B2 +000032AA =000000B3 7936 TK_MINUS EQU TK_PLUS+1 * $B3 +000032AA =000000B4 7937 TK_MULT EQU TK_MINUS+1 * $B4 +000032AA =000000B5 7938 TK_DIV EQU TK_MULT+1 * $B5 +000032AA =000000B6 7939 TK_POWER EQU TK_DIV+1 * $B6 +000032AA =000000B7 7940 TK_AND EQU TK_POWER+1 * $B7 +000032AA =000000B8 7941 TK_EOR EQU TK_AND+1 * $B8 +000032AA =000000B9 7942 TK_OR EQU TK_EOR+1 * $B9 +000032AA =000000BA 7943 TK_RSHIFT EQU TK_OR+1 * $BA +000032AA =000000BB 7944 TK_LSHIFT EQU TK_RSHIFT+1 * $BB +000032AA =000000BC 7945 TK_GT EQU TK_LSHIFT+1 * $BC +000032AA =000000BD 7946 TK_EQUAL EQU TK_GT+1 * $BD +000032AA =000000BE 7947 TK_LT EQU TK_EQUAL+1 * $BE +000032AA =000000BF 7948 TK_SGN EQU TK_LT+1 * $BF +000032AA =000000C0 7949 TK_INT EQU TK_SGN+1 * $C0 +000032AA =000000C1 7950 TK_ABS EQU TK_INT+1 * $C1 +000032AA =000000C2 7951 TK_USR EQU TK_ABS+1 * $C2 +000032AA =000000C3 7952 TK_FRE EQU TK_USR+1 * $C3 +000032AA =000000C4 7953 TK_POS EQU TK_FRE+1 * $C4 +000032AA =000000C5 7954 TK_SQR EQU TK_POS+1 * $C5 +000032AA =000000C6 7955 TK_RND EQU TK_SQR+1 * $C6 +000032AA =000000C7 7956 TK_LOG EQU TK_RND+1 * $C7 +000032AA =000000C8 7957 TK_EXP EQU TK_LOG+1 * $C8 +000032AA =000000C9 7958 TK_COS EQU TK_EXP+1 * $C9 +000032AA =000000CA 7959 TK_SIN EQU TK_COS+1 * $CA +000032AA =000000CB 7960 TK_TAN EQU TK_SIN+1 * $CB +000032AA =000000CC 7961 TK_ATN EQU TK_TAN+1 * $CC +000032AA =000000CD 7962 TK_PEEK EQU TK_ATN+1 * $CD +000032AA =000000CE 7963 TK_DEEK EQU TK_PEEK+1 * $CE +000032AA =000000CF 7964 TK_LEEK EQU TK_DEEK+1 * $CF +000032AA =000000D0 7965 TK_LEN EQU TK_LEEK+1 * $D0 +000032AA =000000D1 7966 TK_STRS EQU TK_LEN+1 * $D1 +000032AA =000000D2 7967 TK_VAL EQU TK_STRS+1 * $D2 +000032AA =000000D3 7968 TK_ASC EQU TK_VAL+1 * $D3 +000032AA =000000D4 7969 TK_UCASES EQU TK_ASC+1 * $D4 +000032AA =000000D5 7970 TK_LCASES EQU TK_UCASES+1 * $D5 +000032AA =000000D6 7971 TK_CHRS EQU TK_LCASES+1 * $D6 +000032AA =000000D7 7972 TK_HEXS EQU TK_CHRS+1 * $D7 +000032AA =000000D8 7973 TK_BINS EQU TK_HEXS+1 * $D8 +000032AA =000000D9 7974 TK_BITTST EQU TK_BINS+1 * $D9 +000032AA =000000DA 7975 TK_MAX EQU TK_BITTST+1 * $DA +000032AA =000000DB 7976 TK_MIN EQU TK_MAX+1 * $DB +000032AA =000000DC 7977 TK_RAM EQU TK_MIN+1 * $DC +000032AA =000000DD 7978 TK_PI EQU TK_RAM+1 * $DD +000032AA =000000DE 7979 TK_TWOPI EQU TK_PI+1 * $DE +000032AA =000000DF 7980 TK_VPTR EQU TK_TWOPI+1 * $DF +000032AA =000000E0 7981 TK_SADD EQU TK_VPTR+1 * $E0 +000032AA =000000E1 7982 TK_LEFTS EQU TK_SADD+1 * $E1 +000032AA =000000E2 7983 TK_RIGHTS EQU TK_LEFTS+1 * $E2 +000032AA =000000E3 7984 TK_MIDS EQU TK_RIGHTS+1 * $E3 +000032AA =000000E4 7985 TK_USINGS EQU TK_MIDS+1 * $E4 +000032AA 7986 +000032AA 7987 +000032AA 7988 ************************************************************************************* +000032AA 7989 * +000032AA 7990 * binary to unsigned decimal table +000032AA 7991 +000032AA 7992 Bin2dec +000032AA= 3B9ACA00 7993 dc.l $3B9ACA00 * 1000000000 +000032AE= 05F5E100 7994 dc.l $05F5E100 * 100000000 +000032B2= 00989680 7995 dc.l $00989680 * 10000000 +000032B6= 000F4240 7996 dc.l $000F4240 * 1000000 +000032BA= 000186A0 7997 dc.l $000186A0 * 100000 +000032BE= 00002710 7998 dc.l $00002710 * 10000 +000032C2= 000003E8 7999 dc.l $000003E8 * 1000 +000032C6= 00000064 8000 dc.l $00000064 * 100 +000032CA= 0000000A 8001 dc.l $0000000A * 10 +000032CE= 00000000 8002 dc.l $00000000 * 0 end marker +000032D2 8003 +000032D2 8004 LAB_RSED +000032D2= 332E3232 8005 dc.l $332E3232 * 858665522 +000032D6 8006 +000032D6 8007 * string to value exponent table 000032D6 8008 -000032D6 8009 * string to value exponent table -000032D6 8010 -000032D6= FF00 8011 dc.w 255<<8 * 10**38 -000032D8= 96769951 8012 dc.l $96769951 -000032DC= FB00 8013 dc.w 251<<8 * 10**37 -000032DE= F0BDC21B 8014 dc.l $F0BDC21B -000032E2= F800 8015 dc.w 248<<8 * 10**36 -000032E4= C097CE7C 8016 dc.l $C097CE7C -000032E8= F500 8017 dc.w 245<<8 * 10**35 -000032EA= 9A130B96 8018 dc.l $9A130B96 -000032EE= F100 8019 dc.w 241<<8 * 10**34 -000032F0= F684DF57 8020 dc.l $F684DF57 -000032F4= EE00 8021 dc.w 238<<8 * 10**33 -000032F6= C5371912 8022 dc.l $C5371912 -000032FA= EB00 8023 dc.w 235<<8 * 10**32 -000032FC= 9DC5ADA8 8024 dc.l $9DC5ADA8 -00003300= E700 8025 dc.w 231<<8 * 10**31 -00003302= FC6F7C40 8026 dc.l $FC6F7C40 -00003306= E400 8027 dc.w 228<<8 * 10**30 -00003308= C9F2C9CD 8028 dc.l $C9F2C9CD -0000330C= E100 8029 dc.w 225<<8 * 10**29 -0000330E= A18F07D7 8030 dc.l $A18F07D7 -00003312= DE00 8031 dc.w 222<<8 * 10**28 -00003314= 813F3979 8032 dc.l $813F3979 -00003318= DA00 8033 dc.w 218<<8 * 10**27 -0000331A= CECB8F28 8034 dc.l $CECB8F28 -0000331E= D700 8035 dc.w 215<<8 * 10**26 -00003320= A56FA5BA 8036 dc.l $A56FA5BA -00003324= D400 8037 dc.w 212<<8 * 10**25 -00003326= 84595161 8038 dc.l $84595161 -0000332A= D000 8039 dc.w 208<<8 * 10**24 -0000332C= D3C21BCF 8040 dc.l $D3C21BCF -00003330= CD00 8041 dc.w 205<<8 * 10**23 -00003332= A968163F 8042 dc.l $A968163F -00003336= CA00 8043 dc.w 202<<8 * 10**22 -00003338= 87867832 8044 dc.l $87867832 -0000333C= C600 8045 dc.w 198<<8 * 10**21 -0000333E= D8D726B7 8046 dc.l $D8D726B7 -00003342= C300 8047 dc.w 195<<8 * 10**20 -00003344= AD78EBC6 8048 dc.l $AD78EBC6 -00003348= C000 8049 dc.w 192<<8 * 10**19 -0000334A= 8AC72305 8050 dc.l $8AC72305 -0000334E= BC00 8051 dc.w 188<<8 * 10**18 -00003350= DE0B6B3A 8052 dc.l $DE0B6B3A -00003354= B900 8053 dc.w 185<<8 * 10**17 -00003356= B1A2BC2F 8054 dc.l $B1A2BC2F -0000335A= B600 8055 dc.w 182<<8 * 10**16 -0000335C= 8E1BC9BF 8056 dc.l $8E1BC9BF -00003360= B200 8057 dc.w 178<<8 * 10**15 -00003362= E35FA932 8058 dc.l $E35FA932 -00003366= AF00 8059 dc.w 175<<8 * 10**14 -00003368= B5E620F5 8060 dc.l $B5E620F5 -0000336C= AC00 8061 dc.w 172<<8 * 10**13 -0000336E= 9184E72A 8062 dc.l $9184E72A -00003372= A800 8063 dc.w 168<<8 * 10**12 -00003374= E8D4A510 8064 dc.l $E8D4A510 -00003378= A500 8065 dc.w 165<<8 * 10**11 -0000337A= BA43B740 8066 dc.l $BA43B740 -0000337E= A200 8067 dc.w 162<<8 * 10**10 -00003380= 9502F900 8068 dc.l $9502F900 -00003384= 9E00 8069 dc.w 158<<8 * 10**9 -00003386= EE6B2800 8070 dc.l $EE6B2800 -0000338A= 9B00 8071 dc.w 155<<8 * 10**8 -0000338C= BEBC2000 8072 dc.l $BEBC2000 -00003390= 9800 8073 dc.w 152<<8 * 10**7 -00003392= 98968000 8074 dc.l $98968000 -00003396= 9400 8075 dc.w 148<<8 * 10**6 -00003398= F4240000 8076 dc.l $F4240000 -0000339C= 9100 8077 dc.w 145<<8 * 10**5 -0000339E= C3500000 8078 dc.l $C3500000 -000033A2= 8E00 8079 dc.w 142<<8 * 10**4 -000033A4= 9C400000 8080 dc.l $9C400000 -000033A8= 8A00 8081 dc.w 138<<8 * 10**3 -000033AA= FA000000 8082 dc.l $FA000000 -000033AE= 8700 8083 dc.w 135<<8 * 10**2 -000033B0= C8000000 8084 dc.l $C8000000 -000033B4= 8400 8085 dc.w 132<<8 * 10**1 -000033B6= A0000000 8086 dc.l $A0000000 -000033BA 8087 LAB_P_10 -000033BA= 8100 8088 dc.w 129<<8 * 10**0 -000033BC= 80000000 8089 dc.l $80000000 -000033C0= 7D00 8090 dc.w 125<<8 * 10**-1 -000033C2= CCCCCCCD 8091 dc.l $CCCCCCCD -000033C6= 7A00 8092 dc.w 122<<8 * 10**-2 -000033C8= A3D70A3D 8093 dc.l $A3D70A3D -000033CC= 7700 8094 dc.w 119<<8 * 10**-3 -000033CE= 83126E98 8095 dc.l $83126E98 -000033D2= 7300 8096 dc.w 115<<8 * 10**-4 -000033D4= D1B71759 8097 dc.l $D1B71759 -000033D8= 7000 8098 dc.w 112<<8 * 10**-5 -000033DA= A7C5AC47 8099 dc.l $A7C5AC47 -000033DE= 6D00 8100 dc.w 109<<8 * 10**-6 -000033E0= 8637BD06 8101 dc.l $8637BD06 -000033E4= 6900 8102 dc.w 105<<8 * 10**-7 -000033E6= D6BF94D6 8103 dc.l $D6BF94D6 -000033EA= 6600 8104 dc.w 102<<8 * 10**-8 -000033EC= ABCC7712 8105 dc.l $ABCC7712 -000033F0= 6300 8106 dc.w 99<<8 * 10**-9 -000033F2= 89705F41 8107 dc.l $89705F41 -000033F6= 5F00 8108 dc.w 95<<8 * 10**-10 -000033F8= DBE6FECF 8109 dc.l $DBE6FECF -000033FC= 5C00 8110 dc.w 92<<8 * 10**-11 -000033FE= AFEBFF0C 8111 dc.l $AFEBFF0C -00003402= 5900 8112 dc.w 89<<8 * 10**-12 -00003404= 8CBCCC09 8113 dc.l $8CBCCC09 -00003408= 5500 8114 dc.w 85<<8 * 10**-13 -0000340A= E12E1342 8115 dc.l $E12E1342 -0000340E= 5200 8116 dc.w 82<<8 * 10**-14 -00003410= B424DC35 8117 dc.l $B424DC35 -00003414= 4F00 8118 dc.w 79<<8 * 10**-15 -00003416= 901D7CF7 8119 dc.l $901D7CF7 -0000341A= 4B00 8120 dc.w 75<<8 * 10**-16 -0000341C= E69594BF 8121 dc.l $E69594BF -00003420= 4800 8122 dc.w 72<<8 * 10**-17 -00003422= B877AA32 8123 dc.l $B877AA32 -00003426= 4500 8124 dc.w 69<<8 * 10**-18 -00003428= 9392EE8F 8125 dc.l $9392EE8F -0000342C= 4100 8126 dc.w 65<<8 * 10**-19 -0000342E= EC1E4A7E 8127 dc.l $EC1E4A7E -00003432= 3E00 8128 dc.w 62<<8 * 10**-20 -00003434= BCE50865 8129 dc.l $BCE50865 -00003438= 3B00 8130 dc.w 59<<8 * 10**-21 -0000343A= 971DA050 8131 dc.l $971DA050 -0000343E= 3700 8132 dc.w 55<<8 * 10**-22 -00003440= F1C90081 8133 dc.l $F1C90081 -00003444= 3400 8134 dc.w 52<<8 * 10**-23 -00003446= C16D9A01 8135 dc.l $C16D9A01 -0000344A= 3100 8136 dc.w 49<<8 * 10**-24 -0000344C= 9ABE14CD 8137 dc.l $9ABE14CD -00003450= 2D00 8138 dc.w 45<<8 * 10**-25 -00003452= F79687AE 8139 dc.l $F79687AE -00003456= 2A00 8140 dc.w 42<<8 * 10**-26 -00003458= C6120625 8141 dc.l $C6120625 -0000345C= 2700 8142 dc.w 39<<8 * 10**-27 -0000345E= 9E74D1B8 8143 dc.l $9E74D1B8 -00003462= 2300 8144 dc.w 35<<8 * 10**-28 -00003464= FD87B5F3 8145 dc.l $FD87B5F3 -00003468= 2000 8146 dc.w 32<<8 * 10**-29 -0000346A= CAD2F7F5 8147 dc.l $CAD2F7F5 -0000346E= 1D00 8148 dc.w 29<<8 * 10**-30 -00003470= A2425FF7 8149 dc.l $A2425FF7 -00003474= 1A00 8150 dc.w 26<<8 * 10**-31 -00003476= 81CEB32C 8151 dc.l $81CEB32C -0000347A= 1600 8152 dc.w 22<<8 * 10**-32 -0000347C= CFB11EAD 8153 dc.l $CFB11EAD -00003480= 1300 8154 dc.w 19<<8 * 10**-33 -00003482= A6274BBE 8155 dc.l $A6274BBE -00003486= 1000 8156 dc.w 16<<8 * 10**-34 -00003488= 84EC3C98 8157 dc.l $84EC3C98 -0000348C= 0C00 8158 dc.w 12<<8 * 10**-35 -0000348E= D4AD2DC0 8159 dc.l $D4AD2DC0 -00003492= 0900 8160 dc.w 9<<8 * 10**-36 -00003494= AA242499 8161 dc.l $AA242499 -00003498= 0600 8162 dc.w 6<<8 * 10**-37 -0000349A= 881CEA14 8163 dc.l $881CEA14 -0000349E= 0200 8164 dc.w 2<<8 * 10**-38 -000034A0= D9C7DCED 8165 dc.l $D9C7DCED -000034A4 8166 -000034A4 8167 -000034A4 8168 ************************************************************************************* -000034A4 8169 * -000034A4 8170 * table of constants for cordic SIN/COS/TAN calculations -000034A4 8171 * constants are un normalised fractions and are atn(2^-i)/2pi -000034A4 8172 -000034A4= 4DBA76D4 8173 dc.l $4DBA76D4 * SIN/COS multiply constant -000034A8 8174 TAB_SNCO -000034A8= 20000000 8175 dc.l $20000000 * atn(2^0)/2pi -000034AC= 12E4051E 8176 dc.l $12E4051E * atn(2^1)/2pi -000034B0= 09FB385C 8177 dc.l $09FB385C * atn(2^2)/2pi -000034B4= 051111D5 8178 dc.l $051111D5 * atn(2^3)/2pi -000034B8= 028B0D44 8179 dc.l $028B0D44 * atn(2^4)/2pi -000034BC= 0145D7E2 8180 dc.l $0145D7E2 * atn(2^5)/2pi -000034C0= 00A2F61F 8181 dc.l $00A2F61F * atn(2^6)/2pi -000034C4= 00517C56 8182 dc.l $00517C56 * atn(2^7)/2pi -000034C8= 0028BE54 8183 dc.l $0028BE54 * atn(2^8)/2pi -000034CC= 00145F2F 8184 dc.l $00145F2F * atn(2^9)/2pi -000034D0= 000A2F99 8185 dc.l $000A2F99 * atn(2^10)/2pi -000034D4= 000517CD 8186 dc.l $000517CD * atn(2^11)/2pi -000034D8= 00028BE7 8187 dc.l $00028BE7 * atn(2^12)/2pi -000034DC= 000145F4 8188 dc.l $000145F4 * atn(2^13)/2pi -000034E0= 0000A2FA 8189 dc.l $0000A2FA * atn(2^14)/2pi -000034E4= 0000517D 8190 dc.l $0000517D * atn(2^15)/2pi -000034E8= 000028BF 8191 dc.l $000028BF * atn(2^16)/2pi -000034EC= 00001460 8192 dc.l $00001460 * atn(2^17)/2pi -000034F0= 00000A30 8193 dc.l $00000A30 * atn(2^18)/2pi -000034F4= 00000518 8194 dc.l $00000518 * atn(2^19)/2pi -000034F8= 0000028C 8195 dc.l $0000028C * atn(2^20)/2pi -000034FC= 00000146 8196 dc.l $00000146 * atn(2^21)/2pi -00003500= 000000A3 8197 dc.l $000000A3 * atn(2^22)/2pi -00003504= 00000052 8198 dc.l $00000052 * atn(2^23)/2pi -00003508= 00000029 8199 dc.l $00000029 * atn(2^24)/2pi -0000350C= 00000015 8200 dc.l $00000015 * atn(2^25)/2pi -00003510= 0000000B 8201 dc.l $0000000B * atn(2^26)/2pi -00003514= 00000006 8202 dc.l $00000006 * atn(2^27)/2pi -00003518= 00000003 8203 dc.l $00000003 * atn(2^28)/2pi -0000351C= 00000002 8204 dc.l $00000002 * atn(2^29)/2pi -00003520= 00000001 8205 dc.l $00000001 * atn(2^30)/2pi -00003524= 00000001 8206 dc.l $00000001 * atn(2^31)/2pi -00003528 8207 -00003528 8208 -00003528 8209 ************************************************************************************* -00003528 8210 * -00003528 8211 * table of constants for cordic ATN calculation -00003528 8212 * constants are normalised to two integer bits and are atn(2^-i) -00003528 8213 -00003528 8214 TAB_ATNC -00003528= 1DAC6705 8215 dc.l $1DAC6705 * atn(2^-1) -0000352C= 0FADBAFD 8216 dc.l $0FADBAFD * atn(2^-2) -00003530= 07F56EA7 8217 dc.l $07F56EA7 * atn(2^-3) -00003534= 03FEAB77 8218 dc.l $03FEAB77 * atn(2^-4) -00003538= 01FFD55C 8219 dc.l $01FFD55C * atn(2^-5) -0000353C= 00FFFAAB 8220 dc.l $00FFFAAB * atn(2^-6) -00003540= 007FFF55 8221 dc.l $007FFF55 * atn(2^-7) -00003544= 003FFFEB 8222 dc.l $003FFFEB * atn(2^-8) -00003548= 001FFFFD 8223 dc.l $001FFFFD * atn(2^-9) -0000354C= 00100000 8224 dc.l $00100000 * atn(2^-10) -00003550= 00080000 8225 dc.l $00080000 * atn(2^-11) -00003554= 00040000 8226 dc.l $00040000 * atn(2^-12) -00003558= 00020000 8227 dc.l $00020000 * atn(2^-13) -0000355C= 00010000 8228 dc.l $00010000 * atn(2^-14) -00003560= 00008000 8229 dc.l $00008000 * atn(2^-15) -00003564= 00004000 8230 dc.l $00004000 * atn(2^-16) -00003568= 00002000 8231 dc.l $00002000 * atn(2^-17) -0000356C= 00001000 8232 dc.l $00001000 * atn(2^-18) -00003570= 00000800 8233 dc.l $00000800 * atn(2^-19) -00003574= 00000400 8234 dc.l $00000400 * atn(2^-20) -00003578= 00000200 8235 dc.l $00000200 * atn(2^-21) -0000357C= 00000100 8236 dc.l $00000100 * atn(2^-22) -00003580= 00000080 8237 dc.l $00000080 * atn(2^-23) -00003584= 00000040 8238 dc.l $00000040 * atn(2^-24) -00003588= 00000020 8239 dc.l $00000020 * atn(2^-25) -0000358C= 00000010 8240 dc.l $00000010 * atn(2^-26) -00003590= 00000008 8241 dc.l $00000008 * atn(2^-27) -00003594= 00000004 8242 dc.l $00000004 * atn(2^-28) -00003598= 00000002 8243 dc.l $00000002 * atn(2^-29) -0000359C= 00000001 8244 dc.l $00000001 * atn(2^-30) -000035A0 8245 LAB_1D96 -000035A0= 00000000 8246 dc.l $00000000 * atn(2^-31) -000035A4= 00000000 8247 dc.l $00000000 * atn(2^-32) -000035A8 8248 -000035A8 8249 * constants are normalised to n integer bits and are tanh(2^-i) -000035A8 =00000002 8250 n equ 2 -000035A8 8251 TAB_HTHET -000035A8= 2327D4F4 8252 dc.l $8C9F53D0>>n * atnh(2^-1) .549306144 -000035AC= 1058AEFA 8253 dc.l $4162BBE8>>n * atnh(2^-2) .255412812 -000035B0= 080AC48E 8254 dc.l $202B1238>>n * atnh(2^-3) -000035B4= 04015622 8255 dc.l $10055888>>n * atnh(2^-4) -000035B8= 02002AB0 8256 dc.l $0800AAC0>>n * atnh(2^-5) -000035BC= 01000554 8257 dc.l $04001550>>n * atnh(2^-6) -000035C0= 008000AA 8258 dc.l $020002A8>>n * atnh(2^-7) -000035C4= 00400014 8259 dc.l $01000050>>n * atnh(2^-8) -000035C8= 00200002 8260 dc.l $00800008>>n * atnh(2^-9) -000035CC= 00100000 8261 dc.l $00400000>>n * atnh(2^-10) -000035D0= 00080000 8262 dc.l $00200000>>n * atnh(2^-11) -000035D4= 00040000 8263 dc.l $00100000>>n * atnh(2^-12) -000035D8= 00020000 8264 dc.l $00080000>>n * atnh(2^-13) -000035DC= 00010000 8265 dc.l $00040000>>n * atnh(2^-14) -000035E0= 00008000 8266 dc.l $00020000>>n * atnh(2^-15) -000035E4= 00004000 8267 dc.l $00010000>>n * atnh(2^-16) -000035E8= 00002000 8268 dc.l $00008000>>n * atnh(2^-17) -000035EC= 00001000 8269 dc.l $00004000>>n * atnh(2^-18) -000035F0= 00000800 8270 dc.l $00002000>>n * atnh(2^-19) -000035F4= 00000400 8271 dc.l $00001000>>n * atnh(2^-20) -000035F8= 00000200 8272 dc.l $00000800>>n * atnh(2^-21) -000035FC= 00000100 8273 dc.l $00000400>>n * atnh(2^-22) -00003600= 00000080 8274 dc.l $00000200>>n * atnh(2^-23) -00003604= 00000040 8275 dc.l $00000100>>n * atnh(2^-24) -00003608= 00000020 8276 dc.l $00000080>>n * atnh(2^-25) -0000360C= 00000010 8277 dc.l $00000040>>n * atnh(2^-26) -00003610= 00000008 8278 dc.l $00000020>>n * atnh(2^-27) -00003614= 00000004 8279 dc.l $00000010>>n * atnh(2^-28) -00003618= 00000002 8280 dc.l $00000008>>n * atnh(2^-29) -0000361C= 00000001 8281 dc.l $00000004>>n * atnh(2^-30) -00003620= 00000000 8282 dc.l $00000002>>n * atnh(2^-31) -00003624= 00000000 8283 dc.l $00000001>>n * atnh(2^-32) +000032D6= FF00 8009 dc.w 255<<8 * 10**38 +000032D8= 96769951 8010 dc.l $96769951 +000032DC= FB00 8011 dc.w 251<<8 * 10**37 +000032DE= F0BDC21B 8012 dc.l $F0BDC21B +000032E2= F800 8013 dc.w 248<<8 * 10**36 +000032E4= C097CE7C 8014 dc.l $C097CE7C +000032E8= F500 8015 dc.w 245<<8 * 10**35 +000032EA= 9A130B96 8016 dc.l $9A130B96 +000032EE= F100 8017 dc.w 241<<8 * 10**34 +000032F0= F684DF57 8018 dc.l $F684DF57 +000032F4= EE00 8019 dc.w 238<<8 * 10**33 +000032F6= C5371912 8020 dc.l $C5371912 +000032FA= EB00 8021 dc.w 235<<8 * 10**32 +000032FC= 9DC5ADA8 8022 dc.l $9DC5ADA8 +00003300= E700 8023 dc.w 231<<8 * 10**31 +00003302= FC6F7C40 8024 dc.l $FC6F7C40 +00003306= E400 8025 dc.w 228<<8 * 10**30 +00003308= C9F2C9CD 8026 dc.l $C9F2C9CD +0000330C= E100 8027 dc.w 225<<8 * 10**29 +0000330E= A18F07D7 8028 dc.l $A18F07D7 +00003312= DE00 8029 dc.w 222<<8 * 10**28 +00003314= 813F3979 8030 dc.l $813F3979 +00003318= DA00 8031 dc.w 218<<8 * 10**27 +0000331A= CECB8F28 8032 dc.l $CECB8F28 +0000331E= D700 8033 dc.w 215<<8 * 10**26 +00003320= A56FA5BA 8034 dc.l $A56FA5BA +00003324= D400 8035 dc.w 212<<8 * 10**25 +00003326= 84595161 8036 dc.l $84595161 +0000332A= D000 8037 dc.w 208<<8 * 10**24 +0000332C= D3C21BCF 8038 dc.l $D3C21BCF +00003330= CD00 8039 dc.w 205<<8 * 10**23 +00003332= A968163F 8040 dc.l $A968163F +00003336= CA00 8041 dc.w 202<<8 * 10**22 +00003338= 87867832 8042 dc.l $87867832 +0000333C= C600 8043 dc.w 198<<8 * 10**21 +0000333E= D8D726B7 8044 dc.l $D8D726B7 +00003342= C300 8045 dc.w 195<<8 * 10**20 +00003344= AD78EBC6 8046 dc.l $AD78EBC6 +00003348= C000 8047 dc.w 192<<8 * 10**19 +0000334A= 8AC72305 8048 dc.l $8AC72305 +0000334E= BC00 8049 dc.w 188<<8 * 10**18 +00003350= DE0B6B3A 8050 dc.l $DE0B6B3A +00003354= B900 8051 dc.w 185<<8 * 10**17 +00003356= B1A2BC2F 8052 dc.l $B1A2BC2F +0000335A= B600 8053 dc.w 182<<8 * 10**16 +0000335C= 8E1BC9BF 8054 dc.l $8E1BC9BF +00003360= B200 8055 dc.w 178<<8 * 10**15 +00003362= E35FA932 8056 dc.l $E35FA932 +00003366= AF00 8057 dc.w 175<<8 * 10**14 +00003368= B5E620F5 8058 dc.l $B5E620F5 +0000336C= AC00 8059 dc.w 172<<8 * 10**13 +0000336E= 9184E72A 8060 dc.l $9184E72A +00003372= A800 8061 dc.w 168<<8 * 10**12 +00003374= E8D4A510 8062 dc.l $E8D4A510 +00003378= A500 8063 dc.w 165<<8 * 10**11 +0000337A= BA43B740 8064 dc.l $BA43B740 +0000337E= A200 8065 dc.w 162<<8 * 10**10 +00003380= 9502F900 8066 dc.l $9502F900 +00003384= 9E00 8067 dc.w 158<<8 * 10**9 +00003386= EE6B2800 8068 dc.l $EE6B2800 +0000338A= 9B00 8069 dc.w 155<<8 * 10**8 +0000338C= BEBC2000 8070 dc.l $BEBC2000 +00003390= 9800 8071 dc.w 152<<8 * 10**7 +00003392= 98968000 8072 dc.l $98968000 +00003396= 9400 8073 dc.w 148<<8 * 10**6 +00003398= F4240000 8074 dc.l $F4240000 +0000339C= 9100 8075 dc.w 145<<8 * 10**5 +0000339E= C3500000 8076 dc.l $C3500000 +000033A2= 8E00 8077 dc.w 142<<8 * 10**4 +000033A4= 9C400000 8078 dc.l $9C400000 +000033A8= 8A00 8079 dc.w 138<<8 * 10**3 +000033AA= FA000000 8080 dc.l $FA000000 +000033AE= 8700 8081 dc.w 135<<8 * 10**2 +000033B0= C8000000 8082 dc.l $C8000000 +000033B4= 8400 8083 dc.w 132<<8 * 10**1 +000033B6= A0000000 8084 dc.l $A0000000 +000033BA 8085 LAB_P_10 +000033BA= 8100 8086 dc.w 129<<8 * 10**0 +000033BC= 80000000 8087 dc.l $80000000 +000033C0= 7D00 8088 dc.w 125<<8 * 10**-1 +000033C2= CCCCCCCD 8089 dc.l $CCCCCCCD +000033C6= 7A00 8090 dc.w 122<<8 * 10**-2 +000033C8= A3D70A3D 8091 dc.l $A3D70A3D +000033CC= 7700 8092 dc.w 119<<8 * 10**-3 +000033CE= 83126E98 8093 dc.l $83126E98 +000033D2= 7300 8094 dc.w 115<<8 * 10**-4 +000033D4= D1B71759 8095 dc.l $D1B71759 +000033D8= 7000 8096 dc.w 112<<8 * 10**-5 +000033DA= A7C5AC47 8097 dc.l $A7C5AC47 +000033DE= 6D00 8098 dc.w 109<<8 * 10**-6 +000033E0= 8637BD06 8099 dc.l $8637BD06 +000033E4= 6900 8100 dc.w 105<<8 * 10**-7 +000033E6= D6BF94D6 8101 dc.l $D6BF94D6 +000033EA= 6600 8102 dc.w 102<<8 * 10**-8 +000033EC= ABCC7712 8103 dc.l $ABCC7712 +000033F0= 6300 8104 dc.w 99<<8 * 10**-9 +000033F2= 89705F41 8105 dc.l $89705F41 +000033F6= 5F00 8106 dc.w 95<<8 * 10**-10 +000033F8= DBE6FECF 8107 dc.l $DBE6FECF +000033FC= 5C00 8108 dc.w 92<<8 * 10**-11 +000033FE= AFEBFF0C 8109 dc.l $AFEBFF0C +00003402= 5900 8110 dc.w 89<<8 * 10**-12 +00003404= 8CBCCC09 8111 dc.l $8CBCCC09 +00003408= 5500 8112 dc.w 85<<8 * 10**-13 +0000340A= E12E1342 8113 dc.l $E12E1342 +0000340E= 5200 8114 dc.w 82<<8 * 10**-14 +00003410= B424DC35 8115 dc.l $B424DC35 +00003414= 4F00 8116 dc.w 79<<8 * 10**-15 +00003416= 901D7CF7 8117 dc.l $901D7CF7 +0000341A= 4B00 8118 dc.w 75<<8 * 10**-16 +0000341C= E69594BF 8119 dc.l $E69594BF +00003420= 4800 8120 dc.w 72<<8 * 10**-17 +00003422= B877AA32 8121 dc.l $B877AA32 +00003426= 4500 8122 dc.w 69<<8 * 10**-18 +00003428= 9392EE8F 8123 dc.l $9392EE8F +0000342C= 4100 8124 dc.w 65<<8 * 10**-19 +0000342E= EC1E4A7E 8125 dc.l $EC1E4A7E +00003432= 3E00 8126 dc.w 62<<8 * 10**-20 +00003434= BCE50865 8127 dc.l $BCE50865 +00003438= 3B00 8128 dc.w 59<<8 * 10**-21 +0000343A= 971DA050 8129 dc.l $971DA050 +0000343E= 3700 8130 dc.w 55<<8 * 10**-22 +00003440= F1C90081 8131 dc.l $F1C90081 +00003444= 3400 8132 dc.w 52<<8 * 10**-23 +00003446= C16D9A01 8133 dc.l $C16D9A01 +0000344A= 3100 8134 dc.w 49<<8 * 10**-24 +0000344C= 9ABE14CD 8135 dc.l $9ABE14CD +00003450= 2D00 8136 dc.w 45<<8 * 10**-25 +00003452= F79687AE 8137 dc.l $F79687AE +00003456= 2A00 8138 dc.w 42<<8 * 10**-26 +00003458= C6120625 8139 dc.l $C6120625 +0000345C= 2700 8140 dc.w 39<<8 * 10**-27 +0000345E= 9E74D1B8 8141 dc.l $9E74D1B8 +00003462= 2300 8142 dc.w 35<<8 * 10**-28 +00003464= FD87B5F3 8143 dc.l $FD87B5F3 +00003468= 2000 8144 dc.w 32<<8 * 10**-29 +0000346A= CAD2F7F5 8145 dc.l $CAD2F7F5 +0000346E= 1D00 8146 dc.w 29<<8 * 10**-30 +00003470= A2425FF7 8147 dc.l $A2425FF7 +00003474= 1A00 8148 dc.w 26<<8 * 10**-31 +00003476= 81CEB32C 8149 dc.l $81CEB32C +0000347A= 1600 8150 dc.w 22<<8 * 10**-32 +0000347C= CFB11EAD 8151 dc.l $CFB11EAD +00003480= 1300 8152 dc.w 19<<8 * 10**-33 +00003482= A6274BBE 8153 dc.l $A6274BBE +00003486= 1000 8154 dc.w 16<<8 * 10**-34 +00003488= 84EC3C98 8155 dc.l $84EC3C98 +0000348C= 0C00 8156 dc.w 12<<8 * 10**-35 +0000348E= D4AD2DC0 8157 dc.l $D4AD2DC0 +00003492= 0900 8158 dc.w 9<<8 * 10**-36 +00003494= AA242499 8159 dc.l $AA242499 +00003498= 0600 8160 dc.w 6<<8 * 10**-37 +0000349A= 881CEA14 8161 dc.l $881CEA14 +0000349E= 0200 8162 dc.w 2<<8 * 10**-38 +000034A0= D9C7DCED 8163 dc.l $D9C7DCED +000034A4 8164 +000034A4 8165 +000034A4 8166 ************************************************************************************* +000034A4 8167 * +000034A4 8168 * table of constants for cordic SIN/COS/TAN calculations +000034A4 8169 * constants are un normalised fractions and are atn(2^-i)/2pi +000034A4 8170 +000034A4= 4DBA76D4 8171 dc.l $4DBA76D4 * SIN/COS multiply constant +000034A8 8172 TAB_SNCO +000034A8= 20000000 8173 dc.l $20000000 * atn(2^0)/2pi +000034AC= 12E4051E 8174 dc.l $12E4051E * atn(2^1)/2pi +000034B0= 09FB385C 8175 dc.l $09FB385C * atn(2^2)/2pi +000034B4= 051111D5 8176 dc.l $051111D5 * atn(2^3)/2pi +000034B8= 028B0D44 8177 dc.l $028B0D44 * atn(2^4)/2pi +000034BC= 0145D7E2 8178 dc.l $0145D7E2 * atn(2^5)/2pi +000034C0= 00A2F61F 8179 dc.l $00A2F61F * atn(2^6)/2pi +000034C4= 00517C56 8180 dc.l $00517C56 * atn(2^7)/2pi +000034C8= 0028BE54 8181 dc.l $0028BE54 * atn(2^8)/2pi +000034CC= 00145F2F 8182 dc.l $00145F2F * atn(2^9)/2pi +000034D0= 000A2F99 8183 dc.l $000A2F99 * atn(2^10)/2pi +000034D4= 000517CD 8184 dc.l $000517CD * atn(2^11)/2pi +000034D8= 00028BE7 8185 dc.l $00028BE7 * atn(2^12)/2pi +000034DC= 000145F4 8186 dc.l $000145F4 * atn(2^13)/2pi +000034E0= 0000A2FA 8187 dc.l $0000A2FA * atn(2^14)/2pi +000034E4= 0000517D 8188 dc.l $0000517D * atn(2^15)/2pi +000034E8= 000028BF 8189 dc.l $000028BF * atn(2^16)/2pi +000034EC= 00001460 8190 dc.l $00001460 * atn(2^17)/2pi +000034F0= 00000A30 8191 dc.l $00000A30 * atn(2^18)/2pi +000034F4= 00000518 8192 dc.l $00000518 * atn(2^19)/2pi +000034F8= 0000028C 8193 dc.l $0000028C * atn(2^20)/2pi +000034FC= 00000146 8194 dc.l $00000146 * atn(2^21)/2pi +00003500= 000000A3 8195 dc.l $000000A3 * atn(2^22)/2pi +00003504= 00000052 8196 dc.l $00000052 * atn(2^23)/2pi +00003508= 00000029 8197 dc.l $00000029 * atn(2^24)/2pi +0000350C= 00000015 8198 dc.l $00000015 * atn(2^25)/2pi +00003510= 0000000B 8199 dc.l $0000000B * atn(2^26)/2pi +00003514= 00000006 8200 dc.l $00000006 * atn(2^27)/2pi +00003518= 00000003 8201 dc.l $00000003 * atn(2^28)/2pi +0000351C= 00000002 8202 dc.l $00000002 * atn(2^29)/2pi +00003520= 00000001 8203 dc.l $00000001 * atn(2^30)/2pi +00003524= 00000001 8204 dc.l $00000001 * atn(2^31)/2pi +00003528 8205 +00003528 8206 +00003528 8207 ************************************************************************************* +00003528 8208 * +00003528 8209 * table of constants for cordic ATN calculation +00003528 8210 * constants are normalised to two integer bits and are atn(2^-i) +00003528 8211 +00003528 8212 TAB_ATNC +00003528= 1DAC6705 8213 dc.l $1DAC6705 * atn(2^-1) +0000352C= 0FADBAFD 8214 dc.l $0FADBAFD * atn(2^-2) +00003530= 07F56EA7 8215 dc.l $07F56EA7 * atn(2^-3) +00003534= 03FEAB77 8216 dc.l $03FEAB77 * atn(2^-4) +00003538= 01FFD55C 8217 dc.l $01FFD55C * atn(2^-5) +0000353C= 00FFFAAB 8218 dc.l $00FFFAAB * atn(2^-6) +00003540= 007FFF55 8219 dc.l $007FFF55 * atn(2^-7) +00003544= 003FFFEB 8220 dc.l $003FFFEB * atn(2^-8) +00003548= 001FFFFD 8221 dc.l $001FFFFD * atn(2^-9) +0000354C= 00100000 8222 dc.l $00100000 * atn(2^-10) +00003550= 00080000 8223 dc.l $00080000 * atn(2^-11) +00003554= 00040000 8224 dc.l $00040000 * atn(2^-12) +00003558= 00020000 8225 dc.l $00020000 * atn(2^-13) +0000355C= 00010000 8226 dc.l $00010000 * atn(2^-14) +00003560= 00008000 8227 dc.l $00008000 * atn(2^-15) +00003564= 00004000 8228 dc.l $00004000 * atn(2^-16) +00003568= 00002000 8229 dc.l $00002000 * atn(2^-17) +0000356C= 00001000 8230 dc.l $00001000 * atn(2^-18) +00003570= 00000800 8231 dc.l $00000800 * atn(2^-19) +00003574= 00000400 8232 dc.l $00000400 * atn(2^-20) +00003578= 00000200 8233 dc.l $00000200 * atn(2^-21) +0000357C= 00000100 8234 dc.l $00000100 * atn(2^-22) +00003580= 00000080 8235 dc.l $00000080 * atn(2^-23) +00003584= 00000040 8236 dc.l $00000040 * atn(2^-24) +00003588= 00000020 8237 dc.l $00000020 * atn(2^-25) +0000358C= 00000010 8238 dc.l $00000010 * atn(2^-26) +00003590= 00000008 8239 dc.l $00000008 * atn(2^-27) +00003594= 00000004 8240 dc.l $00000004 * atn(2^-28) +00003598= 00000002 8241 dc.l $00000002 * atn(2^-29) +0000359C= 00000001 8242 dc.l $00000001 * atn(2^-30) +000035A0 8243 LAB_1D96 +000035A0= 00000000 8244 dc.l $00000000 * atn(2^-31) +000035A4= 00000000 8245 dc.l $00000000 * atn(2^-32) +000035A8 8246 +000035A8 8247 * constants are normalised to n integer bits and are tanh(2^-i) +000035A8 =00000002 8248 n equ 2 +000035A8 8249 TAB_HTHET +000035A8= 2327D4F4 8250 dc.l $8C9F53D0>>n * atnh(2^-1) .549306144 +000035AC= 1058AEFA 8251 dc.l $4162BBE8>>n * atnh(2^-2) .255412812 +000035B0= 080AC48E 8252 dc.l $202B1238>>n * atnh(2^-3) +000035B4= 04015622 8253 dc.l $10055888>>n * atnh(2^-4) +000035B8= 02002AB0 8254 dc.l $0800AAC0>>n * atnh(2^-5) +000035BC= 01000554 8255 dc.l $04001550>>n * atnh(2^-6) +000035C0= 008000AA 8256 dc.l $020002A8>>n * atnh(2^-7) +000035C4= 00400014 8257 dc.l $01000050>>n * atnh(2^-8) +000035C8= 00200002 8258 dc.l $00800008>>n * atnh(2^-9) +000035CC= 00100000 8259 dc.l $00400000>>n * atnh(2^-10) +000035D0= 00080000 8260 dc.l $00200000>>n * atnh(2^-11) +000035D4= 00040000 8261 dc.l $00100000>>n * atnh(2^-12) +000035D8= 00020000 8262 dc.l $00080000>>n * atnh(2^-13) +000035DC= 00010000 8263 dc.l $00040000>>n * atnh(2^-14) +000035E0= 00008000 8264 dc.l $00020000>>n * atnh(2^-15) +000035E4= 00004000 8265 dc.l $00010000>>n * atnh(2^-16) +000035E8= 00002000 8266 dc.l $00008000>>n * atnh(2^-17) +000035EC= 00001000 8267 dc.l $00004000>>n * atnh(2^-18) +000035F0= 00000800 8268 dc.l $00002000>>n * atnh(2^-19) +000035F4= 00000400 8269 dc.l $00001000>>n * atnh(2^-20) +000035F8= 00000200 8270 dc.l $00000800>>n * atnh(2^-21) +000035FC= 00000100 8271 dc.l $00000400>>n * atnh(2^-22) +00003600= 00000080 8272 dc.l $00000200>>n * atnh(2^-23) +00003604= 00000040 8273 dc.l $00000100>>n * atnh(2^-24) +00003608= 00000020 8274 dc.l $00000080>>n * atnh(2^-25) +0000360C= 00000010 8275 dc.l $00000040>>n * atnh(2^-26) +00003610= 00000008 8276 dc.l $00000020>>n * atnh(2^-27) +00003614= 00000004 8277 dc.l $00000010>>n * atnh(2^-28) +00003618= 00000002 8278 dc.l $00000008>>n * atnh(2^-29) +0000361C= 00000001 8279 dc.l $00000004>>n * atnh(2^-30) +00003620= 00000000 8280 dc.l $00000002>>n * atnh(2^-31) +00003624= 00000000 8281 dc.l $00000001>>n * atnh(2^-32) +00003628 8282 +00003628 =26A3D110 8283 KFCTSEED equ $9A8F4441>>n * $26A3D110 00003628 8284 -00003628 =26A3D110 8285 KFCTSEED equ $9A8F4441>>n * $26A3D110 -00003628 8286 -00003628 8287 -00003628 8288 ************************************************************************************* -00003628 8289 * -00003628 8290 * command vector table -00003628 8291 -00003628 8292 LAB_CTBL -00003628= D7B2 8293 dc.w LAB_END-LAB_CTBL * END -0000362A= D6E6 8294 dc.w LAB_FOR-LAB_CTBL * FOR -0000362C= DD52 8295 dc.w LAB_NEXT-LAB_CTBL * NEXT -0000362E= D906 8296 dc.w LAB_DATA-LAB_CTBL * DATA -00003630= DC46 8297 dc.w LAB_INPUT-LAB_CTBL * INPUT -00003632= E122 8298 dc.w LAB_DIM-LAB_CTBL * DIM -00003634= DC6C 8299 dc.w LAB_READ-LAB_CTBL * READ -00003636= DA78 8300 dc.w LAB_LET-LAB_CTBL * LET -00003638= DA16 8301 dc.w LAB_DEC-LAB_CTBL * DEC -0000363A= D86E 8302 dc.w LAB_GOTO-LAB_CTBL * GOTO -0000363C= D836 8303 dc.w LAB_RUN-LAB_CTBL * RUN -0000363E= D92E 8304 dc.w LAB_IF-LAB_CTBL * IF -00003640= D7E0 8305 dc.w LAB_RESTORE-LAB_CTBL * RESTORE -00003642= D85C 8306 dc.w LAB_GOSUB-LAB_CTBL * GOSUB -00003644= D8F2 8307 dc.w LAB_RETURN-LAB_CTBL * RETURN -00003646= D99C 8308 dc.w LAB_REM-LAB_CTBL * REM -00003648= D7BA 8309 dc.w LAB_STOP-LAB_CTBL * STOP -0000364A= D9A4 8310 dc.w LAB_ON-LAB_CTBL * ON -0000364C= D80E 8311 dc.w LAB_NULL-LAB_CTBL * NULL -0000364E= DA1C 8312 dc.w LAB_INC-LAB_CTBL * INC -00003650= EA28 8313 dc.w LAB_WAIT-LAB_CTBL * WAIT -00003652= EA16 8314 dc.w LAB_LOAD-LAB_CTBL * LOAD -00003654= EA1A 8315 dc.w LAB_SAVE-LAB_CTBL * SAVE -00003656= E4B2 8316 dc.w LAB_DEF-LAB_CTBL * DEF -00003658= E996 8317 dc.w LAB_POKE-LAB_CTBL * POKE -0000365A= E9C6 8318 dc.w LAB_DOKE-LAB_CTBL * DOKE -0000365C= E9CC 8319 dc.w LAB_LOKE-LAB_CTBL * LOKE -0000365E= EA1E 8320 dc.w LAB_CALL-LAB_CTBL * CALL -00003660= D84A 8321 dc.w LAB_DO-LAB_CTBL * DO -00003662= D89C 8322 dc.w LAB_LOOP-LAB_CTBL * LOOP -00003664= DB0C 8323 dc.w LAB_PRINT-LAB_CTBL * PRINT -00003666= D818 8324 dc.w LAB_CONT-LAB_CTBL * CONT -00003668= D630 8325 dc.w LAB_LIST-LAB_CTBL * LIST -0000366A= D62C 8326 dc.w LAB_CLEAR-LAB_CTBL * CLEAR -0000366C= D5DC 8327 dc.w LAB_NEW-LAB_CTBL * NEW -0000366E= F954 8328 dc.w LAB_WDTH-LAB_CTBL * WIDTH -00003670= DAD2 8329 dc.w LAB_GET-LAB_CTBL * GET -00003672= E9E0 8330 dc.w LAB_SWAP-LAB_CTBL * SWAP -00003674= F49E 8331 dc.w LAB_BITSET-LAB_CTBL * BITSET -00003676= F4AE 8332 dc.w LAB_BITCLR-LAB_CTBL * BITCLR -00003678 8333 -00003678 8334 -00003678 8335 ************************************************************************************* -00003678 8336 * -00003678 8337 * function pre process routine table -00003678 8338 -00003678 8339 LAB_FTPP -00003678= DFD0 8340 dc.w LAB_PPFN-LAB_FTPP * SGN(n) process numeric expression in () -0000367A= DFD0 8341 dc.w LAB_PPFN-LAB_FTPP * INT(n) " -0000367C= DFD0 8342 dc.w LAB_PPFN-LAB_FTPP * ABS(n) " -0000367E= DDD2 8343 dc.w LAB_EVEZ-LAB_FTPP * USR(x) process any expression -00003680= DF1A 8344 dc.w LAB_1BF7-LAB_FTPP * FRE(x) process any expression in () -00003682= DF1A 8345 dc.w LAB_1BF7-LAB_FTPP * POS(x) " -00003684= DFD0 8346 dc.w LAB_PPFN-LAB_FTPP * SQR(n) process numeric expression in () -00003686= DFD0 8347 dc.w LAB_PPFN-LAB_FTPP * RND(n) " -00003688= DFD0 8348 dc.w LAB_PPFN-LAB_FTPP * LOG(n) " -0000368A= DFD0 8349 dc.w LAB_PPFN-LAB_FTPP * EXP(n) " -0000368C= DFD0 8350 dc.w LAB_PPFN-LAB_FTPP * COS(n) " -0000368E= DFD0 8351 dc.w LAB_PPFN-LAB_FTPP * SIN(n) " -00003690= DFD0 8352 dc.w LAB_PPFN-LAB_FTPP * TAN(n) " -00003692= DFD0 8353 dc.w LAB_PPFN-LAB_FTPP * ATN(n) " -00003694= DFD0 8354 dc.w LAB_PPFN-LAB_FTPP * PEEK(n) " -00003696= DFD0 8355 dc.w LAB_PPFN-LAB_FTPP * DEEK(n) " -00003698= DFD0 8356 dc.w LAB_PPFN-LAB_FTPP * LEEK(n) " -0000369A= DFC2 8357 dc.w LAB_PPFS-LAB_FTPP * LEN($) process string expression in () -0000369C= DFD0 8358 dc.w LAB_PPFN-LAB_FTPP * STR$(n) process numeric expression in () -0000369E= DFC2 8359 dc.w LAB_PPFS-LAB_FTPP * VAL($) process string expression in () -000036A0= DFC2 8360 dc.w LAB_PPFS-LAB_FTPP * ASC($) " -000036A2= DFC2 8361 dc.w LAB_PPFS-LAB_FTPP * UCASE$($) " -000036A4= DFC2 8362 dc.w LAB_PPFS-LAB_FTPP * LCASE$($) " -000036A6= DFD0 8363 dc.w LAB_PPFN-LAB_FTPP * CHR$(n) process numeric expression in () -000036A8= E00A 8364 dc.w LAB_BHSS-LAB_FTPP * HEX$() bin/hex pre process -000036AA= E00A 8365 dc.w LAB_BHSS-LAB_FTPP * BIN$() " -000036AC= 0000 8366 dc.w $0000 * BITTST() none -000036AE= 0000 8367 dc.w $0000 * MAX() " -000036B0= 0000 8368 dc.w $0000 * MIN() " -000036B2= DFDE 8369 dc.w LAB_PPBI-LAB_FTPP * RAMBASE advance pointer -000036B4= DFDE 8370 dc.w LAB_PPBI-LAB_FTPP * PI " -000036B6= DFDE 8371 dc.w LAB_PPBI-LAB_FTPP * TWOPI " -000036B8= 0000 8372 dc.w $0000 * VARPTR() none -000036BA= 0000 8373 dc.w $0000 * SADD() " -000036BC= DFE8 8374 dc.w LAB_LRMS-LAB_FTPP * LEFT$() process string expression -000036BE= DFE8 8375 dc.w LAB_LRMS-LAB_FTPP * RIGHT$() " -000036C0= DFE8 8376 dc.w LAB_LRMS-LAB_FTPP * MID$() " -000036C2= DDD2 8377 dc.w LAB_EVEZ-LAB_FTPP * USING$(x) process any expression -000036C4 8378 -000036C4 8379 -000036C4 8380 ************************************************************************************* -000036C4 8381 * -000036C4 8382 * action addresses for functions -000036C4 8383 -000036C4 8384 LAB_FTBL -000036C4= ED54 8385 dc.w LAB_SGN-LAB_FTBL * SGN() -000036C6= EDD6 8386 dc.w LAB_INT-LAB_FTBL * INT() -000036C8= ED66 8387 dc.w LAB_ABS-LAB_FTBL * ABS() -000036CA= E972 8388 dc.w LAB_USR-LAB_FTBL * USR() -000036CC= E3CE 8389 dc.w LAB_FRE-LAB_FTBL * FRE() -000036CE= E400 8390 dc.w LAB_POS-LAB_FTBL * POS() -000036D0= F938 8391 dc.w LAB_SQR-LAB_FTBL * SQR() -000036D2= F21E 8392 dc.w LAB_RND-LAB_FTBL * RND() -000036D4= EA76 8393 dc.w LAB_LOG-LAB_FTBL * LOG() -000036D6= F104 8394 dc.w LAB_EXP-LAB_FTBL * EXP() -000036D8= F272 8395 dc.w LAB_COS-LAB_FTBL * COS() -000036DA= F28A 8396 dc.w LAB_SIN-LAB_FTBL * SIN() -000036DC= F250 8397 dc.w LAB_TAN-LAB_FTBL * TAN() -000036DE= F350 8398 dc.w LAB_ATN-LAB_FTBL * ATN() -000036E0= E8EE 8399 dc.w LAB_PEEK-LAB_FTBL * PEEK() -000036E2= E900 8400 dc.w LAB_DEEK-LAB_FTBL * DEEK() -000036E4= E916 8401 dc.w LAB_LEEK-LAB_FTBL * LEEK() -000036E6= E832 8402 dc.w LAB_LENS-LAB_FTBL * LEN() -000036E8= E4F6 8403 dc.w LAB_STRS-LAB_FTBL * STR$() -000036EA= E876 8404 dc.w LAB_VAL-LAB_FTBL * VAL() -000036EC= E83A 8405 dc.w LAB_ASC-LAB_FTBL * ASC() -000036EE= E7E8 8406 dc.w LAB_UCASE-LAB_FTBL * UCASE$() -000036F0= E7B8 8407 dc.w LAB_LCASE-LAB_FTBL * LCASE$() -000036F2= E720 8408 dc.w LAB_CHRS-LAB_FTBL * CHR$() -000036F4= F7DA 8409 dc.w LAB_HEXS-LAB_FTBL * HEX$() -000036F6= F788 8410 dc.w LAB_BINS-LAB_FTBL * BIN$() -000036F8= F422 8411 dc.w LAB_BTST-LAB_FTBL * BITTST() -000036FA= F846 8412 dc.w LAB_MAX-LAB_FTBL * MAX() -000036FC= F85C 8413 dc.w LAB_MIN-LAB_FTBL * MIN() -000036FE= F9AA 8414 dc.w LAB_RAM-LAB_FTBL * RAMBASE -00003700= F9B4 8415 dc.w LAB_PI-LAB_FTBL * PI -00003702= F9C4 8416 dc.w LAB_TWOPI-LAB_FTBL * TWOPI -00003704= F99A 8417 dc.w LAB_VARPTR-LAB_FTBL * VARPTR() -00003706= E81A 8418 dc.w LAB_SADD-LAB_FTBL * SADD() -00003708= E730 8419 dc.w LAB_LEFT-LAB_FTBL * LEFT$() -0000370A= E744 8420 dc.w LAB_RIGHT-LAB_FTBL * RIGHT$() -0000370C= E774 8421 dc.w LAB_MIDS-LAB_FTBL * MID$() -0000370E= F450 8422 dc.w LAB_USINGS-LAB_FTBL * USING$() -00003710 8423 -00003710 8424 -00003710 8425 ************************************************************************************* -00003710 8426 * -00003710 8427 * hierarchy and action addresses for operator -00003710 8428 -00003710 8429 LAB_OPPT -00003710= 0079 8430 dc.w $0079 * + -00003712= E978 8431 dc.w LAB_ADD-LAB_OPPT -00003714= 0079 8432 dc.w $0079 * - -00003716= E964 8433 dc.w LAB_SUBTRACT-LAB_OPPT -00003718= 007B 8434 dc.w $007B * * -0000371A= EB1C 8435 dc.w LAB_MULTIPLY-LAB_OPPT -0000371C= 007B 8436 dc.w $007B * / -0000371E= EBA8 8437 dc.w LAB_DIVIDE-LAB_OPPT -00003720= 007F 8438 dc.w $007F * ^ -00003722= F002 8439 dc.w LAB_POWER-LAB_OPPT -00003724= 0050 8440 dc.w $0050 * AND -00003726= DFB2 8441 dc.w LAB_AND-LAB_OPPT -00003728= 0046 8442 dc.w $0046 * EOR -0000372A= DFA2 8443 dc.w LAB_EOR-LAB_OPPT -0000372C= 0046 8444 dc.w $0046 * OR -0000372E= DFAA 8445 dc.w LAB_OR-LAB_OPPT -00003730= 0056 8446 dc.w $0056 * >> -00003732= E056 8447 dc.w LAB_RSHIFT-LAB_OPPT -00003734= 0056 8448 dc.w $0056 * << -00003736= E046 8449 dc.w LAB_LSHIFT-LAB_OPPT -00003738= 007D 8450 dc.w $007D * > -0000373A= F066 8451 dc.w LAB_GTHAN-LAB_OPPT * used to evaluate -n -0000373C= 005A 8452 dc.w $005A * = -0000373E= DFC8 8453 dc.w LAB_EQUAL-LAB_OPPT * used to evaluate NOT -00003740= 0064 8454 dc.w $0064 * < -00003742= DFD2 8455 dc.w LAB_LTHAN-LAB_OPPT -00003744 8456 -00003744 8457 -00003744 8458 ************************************************************************************* -00003744 8459 * -00003744 8460 * misc constants -00003744 8461 -00003744 8462 * This table is used in converting numbers to ASCII. -00003744 8463 * first four entries for expansion to 9.25 digits -00003744 8464 -00003744 8465 LAB_2A9A -00003744= FFF0BDC0 8466 dc.l $FFF0BDC0 * -1000000 -00003748= 000186A0 8467 dc.l $000186A0 * 100000 -0000374C= FFFFD8F0 8468 dc.l $FFFFD8F0 * -10000 -00003750= 000003E8 8469 dc.l $000003E8 * 1000 -00003754= FFFFFF9C 8470 dc.l $FFFFFF9C * -100 -00003758= 0000000A 8471 dc.l $0000000A * 10 -0000375C= FFFFFFFF 8472 dc.l $FFFFFFFF * -1 -00003760 8473 LAB_2A9B -00003760 8474 -00003760 8475 -00003760 8476 ************************************************************************************* -00003760 8477 * -00003760 8478 * new keyword tables +00003628 8285 +00003628 8286 ************************************************************************************* +00003628 8287 * +00003628 8288 * command vector table +00003628 8289 +00003628 8290 LAB_CTBL +00003628= D7B2 8291 dc.w LAB_END-LAB_CTBL * END +0000362A= D6E6 8292 dc.w LAB_FOR-LAB_CTBL * FOR +0000362C= DD52 8293 dc.w LAB_NEXT-LAB_CTBL * NEXT +0000362E= D906 8294 dc.w LAB_DATA-LAB_CTBL * DATA +00003630= DC46 8295 dc.w LAB_INPUT-LAB_CTBL * INPUT +00003632= E122 8296 dc.w LAB_DIM-LAB_CTBL * DIM +00003634= DC6C 8297 dc.w LAB_READ-LAB_CTBL * READ +00003636= DA78 8298 dc.w LAB_LET-LAB_CTBL * LET +00003638= DA16 8299 dc.w LAB_DEC-LAB_CTBL * DEC +0000363A= D86E 8300 dc.w LAB_GOTO-LAB_CTBL * GOTO +0000363C= D836 8301 dc.w LAB_RUN-LAB_CTBL * RUN +0000363E= D92E 8302 dc.w LAB_IF-LAB_CTBL * IF +00003640= D7E0 8303 dc.w LAB_RESTORE-LAB_CTBL * RESTORE +00003642= D85C 8304 dc.w LAB_GOSUB-LAB_CTBL * GOSUB +00003644= D8F2 8305 dc.w LAB_RETURN-LAB_CTBL * RETURN +00003646= D99C 8306 dc.w LAB_REM-LAB_CTBL * REM +00003648= D7BA 8307 dc.w LAB_STOP-LAB_CTBL * STOP +0000364A= D9A4 8308 dc.w LAB_ON-LAB_CTBL * ON +0000364C= D80E 8309 dc.w LAB_NULL-LAB_CTBL * NULL +0000364E= DA1C 8310 dc.w LAB_INC-LAB_CTBL * INC +00003650= EA28 8311 dc.w LAB_WAIT-LAB_CTBL * WAIT +00003652= EA16 8312 dc.w LAB_LOAD-LAB_CTBL * LOAD +00003654= EA1A 8313 dc.w LAB_SAVE-LAB_CTBL * SAVE +00003656= E4B2 8314 dc.w LAB_DEF-LAB_CTBL * DEF +00003658= E996 8315 dc.w LAB_POKE-LAB_CTBL * POKE +0000365A= E9C6 8316 dc.w LAB_DOKE-LAB_CTBL * DOKE +0000365C= E9CC 8317 dc.w LAB_LOKE-LAB_CTBL * LOKE +0000365E= EA1E 8318 dc.w LAB_CALL-LAB_CTBL * CALL +00003660= D84A 8319 dc.w LAB_DO-LAB_CTBL * DO +00003662= D89C 8320 dc.w LAB_LOOP-LAB_CTBL * LOOP +00003664= DB0C 8321 dc.w LAB_PRINT-LAB_CTBL * PRINT +00003666= D818 8322 dc.w LAB_CONT-LAB_CTBL * CONT +00003668= D630 8323 dc.w LAB_LIST-LAB_CTBL * LIST +0000366A= D62C 8324 dc.w LAB_CLEAR-LAB_CTBL * CLEAR +0000366C= D5DC 8325 dc.w LAB_NEW-LAB_CTBL * NEW +0000366E= F954 8326 dc.w LAB_WDTH-LAB_CTBL * WIDTH +00003670= DAD2 8327 dc.w LAB_GET-LAB_CTBL * GET +00003672= E9E0 8328 dc.w LAB_SWAP-LAB_CTBL * SWAP +00003674= F49E 8329 dc.w LAB_BITSET-LAB_CTBL * BITSET +00003676= F4AE 8330 dc.w LAB_BITCLR-LAB_CTBL * BITCLR +00003678 8331 +00003678 8332 +00003678 8333 ************************************************************************************* +00003678 8334 * +00003678 8335 * function pre process routine table +00003678 8336 +00003678 8337 LAB_FTPP +00003678= DFD0 8338 dc.w LAB_PPFN-LAB_FTPP * SGN(n) process numeric expression in () +0000367A= DFD0 8339 dc.w LAB_PPFN-LAB_FTPP * INT(n) " +0000367C= DFD0 8340 dc.w LAB_PPFN-LAB_FTPP * ABS(n) " +0000367E= DDD2 8341 dc.w LAB_EVEZ-LAB_FTPP * USR(x) process any expression +00003680= DF1A 8342 dc.w LAB_1BF7-LAB_FTPP * FRE(x) process any expression in () +00003682= DF1A 8343 dc.w LAB_1BF7-LAB_FTPP * POS(x) " +00003684= DFD0 8344 dc.w LAB_PPFN-LAB_FTPP * SQR(n) process numeric expression in () +00003686= DFD0 8345 dc.w LAB_PPFN-LAB_FTPP * RND(n) " +00003688= DFD0 8346 dc.w LAB_PPFN-LAB_FTPP * LOG(n) " +0000368A= DFD0 8347 dc.w LAB_PPFN-LAB_FTPP * EXP(n) " +0000368C= DFD0 8348 dc.w LAB_PPFN-LAB_FTPP * COS(n) " +0000368E= DFD0 8349 dc.w LAB_PPFN-LAB_FTPP * SIN(n) " +00003690= DFD0 8350 dc.w LAB_PPFN-LAB_FTPP * TAN(n) " +00003692= DFD0 8351 dc.w LAB_PPFN-LAB_FTPP * ATN(n) " +00003694= DFD0 8352 dc.w LAB_PPFN-LAB_FTPP * PEEK(n) " +00003696= DFD0 8353 dc.w LAB_PPFN-LAB_FTPP * DEEK(n) " +00003698= DFD0 8354 dc.w LAB_PPFN-LAB_FTPP * LEEK(n) " +0000369A= DFC2 8355 dc.w LAB_PPFS-LAB_FTPP * LEN($) process string expression in () +0000369C= DFD0 8356 dc.w LAB_PPFN-LAB_FTPP * STR$(n) process numeric expression in () +0000369E= DFC2 8357 dc.w LAB_PPFS-LAB_FTPP * VAL($) process string expression in () +000036A0= DFC2 8358 dc.w LAB_PPFS-LAB_FTPP * ASC($) " +000036A2= DFC2 8359 dc.w LAB_PPFS-LAB_FTPP * UCASE$($) " +000036A4= DFC2 8360 dc.w LAB_PPFS-LAB_FTPP * LCASE$($) " +000036A6= DFD0 8361 dc.w LAB_PPFN-LAB_FTPP * CHR$(n) process numeric expression in () +000036A8= E00A 8362 dc.w LAB_BHSS-LAB_FTPP * HEX$() bin/hex pre process +000036AA= E00A 8363 dc.w LAB_BHSS-LAB_FTPP * BIN$() " +000036AC= 0000 8364 dc.w $0000 * BITTST() none +000036AE= 0000 8365 dc.w $0000 * MAX() " +000036B0= 0000 8366 dc.w $0000 * MIN() " +000036B2= DFDE 8367 dc.w LAB_PPBI-LAB_FTPP * RAMBASE advance pointer +000036B4= DFDE 8368 dc.w LAB_PPBI-LAB_FTPP * PI " +000036B6= DFDE 8369 dc.w LAB_PPBI-LAB_FTPP * TWOPI " +000036B8= 0000 8370 dc.w $0000 * VARPTR() none +000036BA= 0000 8371 dc.w $0000 * SADD() " +000036BC= DFE8 8372 dc.w LAB_LRMS-LAB_FTPP * LEFT$() process string expression +000036BE= DFE8 8373 dc.w LAB_LRMS-LAB_FTPP * RIGHT$() " +000036C0= DFE8 8374 dc.w LAB_LRMS-LAB_FTPP * MID$() " +000036C2= DDD2 8375 dc.w LAB_EVEZ-LAB_FTPP * USING$(x) process any expression +000036C4 8376 +000036C4 8377 +000036C4 8378 ************************************************************************************* +000036C4 8379 * +000036C4 8380 * action addresses for functions +000036C4 8381 +000036C4 8382 LAB_FTBL +000036C4= ED54 8383 dc.w LAB_SGN-LAB_FTBL * SGN() +000036C6= EDD6 8384 dc.w LAB_INT-LAB_FTBL * INT() +000036C8= ED66 8385 dc.w LAB_ABS-LAB_FTBL * ABS() +000036CA= E972 8386 dc.w LAB_USR-LAB_FTBL * USR() +000036CC= E3CE 8387 dc.w LAB_FRE-LAB_FTBL * FRE() +000036CE= E400 8388 dc.w LAB_POS-LAB_FTBL * POS() +000036D0= F938 8389 dc.w LAB_SQR-LAB_FTBL * SQR() +000036D2= F21E 8390 dc.w LAB_RND-LAB_FTBL * RND() +000036D4= EA76 8391 dc.w LAB_LOG-LAB_FTBL * LOG() +000036D6= F104 8392 dc.w LAB_EXP-LAB_FTBL * EXP() +000036D8= F272 8393 dc.w LAB_COS-LAB_FTBL * COS() +000036DA= F28A 8394 dc.w LAB_SIN-LAB_FTBL * SIN() +000036DC= F250 8395 dc.w LAB_TAN-LAB_FTBL * TAN() +000036DE= F350 8396 dc.w LAB_ATN-LAB_FTBL * ATN() +000036E0= E8EE 8397 dc.w LAB_PEEK-LAB_FTBL * PEEK() +000036E2= E900 8398 dc.w LAB_DEEK-LAB_FTBL * DEEK() +000036E4= E916 8399 dc.w LAB_LEEK-LAB_FTBL * LEEK() +000036E6= E832 8400 dc.w LAB_LENS-LAB_FTBL * LEN() +000036E8= E4F6 8401 dc.w LAB_STRS-LAB_FTBL * STR$() +000036EA= E876 8402 dc.w LAB_VAL-LAB_FTBL * VAL() +000036EC= E83A 8403 dc.w LAB_ASC-LAB_FTBL * ASC() +000036EE= E7E8 8404 dc.w LAB_UCASE-LAB_FTBL * UCASE$() +000036F0= E7B8 8405 dc.w LAB_LCASE-LAB_FTBL * LCASE$() +000036F2= E720 8406 dc.w LAB_CHRS-LAB_FTBL * CHR$() +000036F4= F7DA 8407 dc.w LAB_HEXS-LAB_FTBL * HEX$() +000036F6= F788 8408 dc.w LAB_BINS-LAB_FTBL * BIN$() +000036F8= F422 8409 dc.w LAB_BTST-LAB_FTBL * BITTST() +000036FA= F846 8410 dc.w LAB_MAX-LAB_FTBL * MAX() +000036FC= F85C 8411 dc.w LAB_MIN-LAB_FTBL * MIN() +000036FE= F9AA 8412 dc.w LAB_RAM-LAB_FTBL * RAMBASE +00003700= F9B4 8413 dc.w LAB_PI-LAB_FTBL * PI +00003702= F9C4 8414 dc.w LAB_TWOPI-LAB_FTBL * TWOPI +00003704= F99A 8415 dc.w LAB_VARPTR-LAB_FTBL * VARPTR() +00003706= E81A 8416 dc.w LAB_SADD-LAB_FTBL * SADD() +00003708= E730 8417 dc.w LAB_LEFT-LAB_FTBL * LEFT$() +0000370A= E744 8418 dc.w LAB_RIGHT-LAB_FTBL * RIGHT$() +0000370C= E774 8419 dc.w LAB_MIDS-LAB_FTBL * MID$() +0000370E= F450 8420 dc.w LAB_USINGS-LAB_FTBL * USING$() +00003710 8421 +00003710 8422 +00003710 8423 ************************************************************************************* +00003710 8424 * +00003710 8425 * hierarchy and action addresses for operator +00003710 8426 +00003710 8427 LAB_OPPT +00003710= 0079 8428 dc.w $0079 * + +00003712= E978 8429 dc.w LAB_ADD-LAB_OPPT +00003714= 0079 8430 dc.w $0079 * - +00003716= E964 8431 dc.w LAB_SUBTRACT-LAB_OPPT +00003718= 007B 8432 dc.w $007B * * +0000371A= EB1C 8433 dc.w LAB_MULTIPLY-LAB_OPPT +0000371C= 007B 8434 dc.w $007B * / +0000371E= EBA8 8435 dc.w LAB_DIVIDE-LAB_OPPT +00003720= 007F 8436 dc.w $007F * ^ +00003722= F002 8437 dc.w LAB_POWER-LAB_OPPT +00003724= 0050 8438 dc.w $0050 * AND +00003726= DFB2 8439 dc.w LAB_AND-LAB_OPPT +00003728= 0046 8440 dc.w $0046 * EOR +0000372A= DFA2 8441 dc.w LAB_EOR-LAB_OPPT +0000372C= 0046 8442 dc.w $0046 * OR +0000372E= DFAA 8443 dc.w LAB_OR-LAB_OPPT +00003730= 0056 8444 dc.w $0056 * >> +00003732= E056 8445 dc.w LAB_RSHIFT-LAB_OPPT +00003734= 0056 8446 dc.w $0056 * << +00003736= E046 8447 dc.w LAB_LSHIFT-LAB_OPPT +00003738= 007D 8448 dc.w $007D * > +0000373A= F066 8449 dc.w LAB_GTHAN-LAB_OPPT * used to evaluate -n +0000373C= 005A 8450 dc.w $005A * = +0000373E= DFC8 8451 dc.w LAB_EQUAL-LAB_OPPT * used to evaluate NOT +00003740= 0064 8452 dc.w $0064 * < +00003742= DFD2 8453 dc.w LAB_LTHAN-LAB_OPPT +00003744 8454 +00003744 8455 +00003744 8456 ************************************************************************************* +00003744 8457 * +00003744 8458 * misc constants +00003744 8459 +00003744 8460 * This table is used in converting numbers to ASCII. +00003744 8461 * first four entries for expansion to 9.25 digits +00003744 8462 +00003744 8463 LAB_2A9A +00003744= FFF0BDC0 8464 dc.l $FFF0BDC0 * -1000000 +00003748= 000186A0 8465 dc.l $000186A0 * 100000 +0000374C= FFFFD8F0 8466 dc.l $FFFFD8F0 * -10000 +00003750= 000003E8 8467 dc.l $000003E8 * 1000 +00003754= FFFFFF9C 8468 dc.l $FFFFFF9C * -100 +00003758= 0000000A 8469 dc.l $0000000A * 10 +0000375C= FFFFFFFF 8470 dc.l $FFFFFFFF * -1 +00003760 8471 LAB_2A9B +00003760 8472 +00003760 8473 +00003760 8474 ************************************************************************************* +00003760 8475 * +00003760 8476 * new keyword tables +00003760 8477 +00003760 8478 * offsets to keyword tables 00003760 8479 -00003760 8480 * offsets to keyword tables -00003760 8481 -00003760 8482 TAB_CHRT -00003760= 0000 8483 dc.w TAB_STAR-TAB_STAR * "*" $2A -00003762= 0002 8484 dc.w TAB_PLUS-TAB_STAR * "+" $2B -00003764= FFFF 8485 dc.w -1 * "," $2C no keywords -00003766= 0004 8486 dc.w TAB_MNUS-TAB_STAR * "-" $2D -00003768= FFFF 8487 dc.w -1 * "." $2E no keywords -0000376A= 0006 8488 dc.w TAB_SLAS-TAB_STAR * "/" $2F -0000376C= FFFF 8489 dc.w -1 * "0" $30 no keywords -0000376E= FFFF 8490 dc.w -1 * "1" $31 no keywords -00003770= FFFF 8491 dc.w -1 * "2" $32 no keywords -00003772= FFFF 8492 dc.w -1 * "3" $33 no keywords -00003774= FFFF 8493 dc.w -1 * "4" $34 no keywords -00003776= FFFF 8494 dc.w -1 * "5" $35 no keywords -00003778= FFFF 8495 dc.w -1 * "6" $36 no keywords -0000377A= FFFF 8496 dc.w -1 * "7" $37 no keywords -0000377C= FFFF 8497 dc.w -1 * "8" $38 no keywords -0000377E= FFFF 8498 dc.w -1 * "9" $39 no keywords -00003780= FFFF 8499 dc.w -1 * ";" $3A no keywords -00003782= FFFF 8500 dc.w -1 * ":" $3B no keywords -00003784= 0008 8501 dc.w TAB_LESS-TAB_STAR * "<" $3C -00003786= 000C 8502 dc.w TAB_EQUL-TAB_STAR * "=" $3D -00003788= 000E 8503 dc.w TAB_MORE-TAB_STAR * ">" $3E -0000378A= 0012 8504 dc.w TAB_QEST-TAB_STAR * "?" $3F -0000378C= FFFF 8505 dc.w -1 * "@" $40 no keywords -0000378E= 0014 8506 dc.w TAB_ASCA-TAB_STAR * "A" $41 -00003790= 0024 8507 dc.w TAB_ASCB-TAB_STAR * "B" $42 -00003792= 003D 8508 dc.w TAB_ASCC-TAB_STAR * "C" $43 -00003794= 0054 8509 dc.w TAB_ASCD-TAB_STAR * "D" $44 -00003796= 006D 8510 dc.w TAB_ASCE-TAB_STAR * "E" $45 -00003798= 007C 8511 dc.w TAB_ASCF-TAB_STAR * "F" $46 -0000379A= 0086 8512 dc.w TAB_ASCG-TAB_STAR * "G" $47 -0000379C= 0093 8513 dc.w TAB_ASCH-TAB_STAR * "H" $48 -0000379E= 0099 8514 dc.w TAB_ASCI-TAB_STAR * "I" $49 -000037A0= FFFF 8515 dc.w -1 * "J" $4A no keywords -000037A2= FFFF 8516 dc.w -1 * "K" $4B no keywords -000037A4= 00A8 8517 dc.w TAB_ASCL-TAB_STAR * "L" $4C -000037A6= 00D6 8518 dc.w TAB_ASCM-TAB_STAR * "M" $4D -000037A8= 00E4 8519 dc.w TAB_ASCN-TAB_STAR * "N" $4E -000037AA= 00F3 8520 dc.w TAB_ASCO-TAB_STAR * "O" $4F -000037AC= 00F8 8521 dc.w TAB_ASCP-TAB_STAR * "P" $50 -000037AE= FFFF 8522 dc.w -1 * "Q" $51 no keywords -000037B0= 010D 8523 dc.w TAB_ASCR-TAB_STAR * "R" $52 -000037B2= 0137 8524 dc.w TAB_ASCS-TAB_STAR * "S" $53 -000037B4= 0162 8525 dc.w TAB_ASCT-TAB_STAR * "T" $54 -000037B6= 0176 8526 dc.w TAB_ASCU-TAB_STAR * "U" $55 -000037B8= 018E 8527 dc.w TAB_ASCV-TAB_STAR * "V" $56 -000037BA= 019A 8528 dc.w TAB_ASCW-TAB_STAR * "W" $57 -000037BC= FFFF 8529 dc.w -1 * "X" $58 no keywords -000037BE= FFFF 8530 dc.w -1 * "Y" $59 no keywords -000037C0= FFFF 8531 dc.w -1 * "Z" $5A no keywords -000037C2= FFFF 8532 dc.w -1 * "[" $5B no keywords -000037C4= FFFF 8533 dc.w -1 * "\" $5C no keywords -000037C6= FFFF 8534 dc.w -1 * "]" $5D no keywords -000037C8= 01A9 8535 dc.w TAB_POWR-TAB_STAR * "^" $5E -000037CA 8536 -000037CA 8537 -000037CA 8538 ************************************************************************************* -000037CA 8539 * -000037CA 8540 * Table of Basic keywords for LIST command -000037CA 8541 * [byte]first character,[byte]remaining length -1 -000037CA 8542 * [word]offset from table start -000037CA 8543 -000037CA 8544 LAB_KEYT -000037CA= 45 01 8545 dc.b 'E',1 -000037CC= 0071 8546 dc.w KEY_END-TAB_STAR * END -000037CE= 46 01 8547 dc.b 'F',1 -000037D0= 007C 8548 dc.w KEY_FOR-TAB_STAR * FOR -000037D2= 4E 02 8549 dc.b 'N',2 -000037D4= 00E7 8550 dc.w KEY_NEXT-TAB_STAR * NEXT -000037D6= 44 02 8551 dc.b 'D',2 -000037D8= 0054 8552 dc.w KEY_DATA-TAB_STAR * DATA -000037DA= 49 03 8553 dc.b 'I',3 -000037DC= 009E 8554 dc.w KEY_INPUT-TAB_STAR * INPUT -000037DE= 44 01 8555 dc.b 'D',1 -000037E0= 0063 8556 dc.w KEY_DIM-TAB_STAR * DIM -000037E2= 52 02 8557 dc.b 'R',2 -000037E4= 0114 8558 dc.w KEY_READ-TAB_STAR * READ -000037E6= 4C 01 8559 dc.b 'L',1 -000037E8= 00BE 8560 dc.w KEY_LET-TAB_STAR * LET -000037EA= 44 01 8561 dc.b 'D',1 -000037EC= 0058 8562 dc.w KEY_DEC-TAB_STAR * DEC -000037EE= 47 02 8563 dc.b 'G',2 -000037F0= 0089 8564 dc.w KEY_GOTO-TAB_STAR * GOTO -000037F2= 52 01 8565 dc.b 'R',1 -000037F4= 0133 8566 dc.w KEY_RUN-TAB_STAR * RUN -000037F6= 49 00 8567 dc.b 'I',0 -000037F8= 0099 8568 dc.w KEY_IF-TAB_STAR * IF -000037FA= 52 05 8569 dc.b 'R',5 -000037FC= 011B 8570 dc.w KEY_RESTORE-TAB_STAR * RESTORE -000037FE= 47 03 8571 dc.b 'G',3 -00003800= 008D 8572 dc.w KEY_GOSUB-TAB_STAR * GOSUB -00003802= 52 04 8573 dc.b 'R',4 -00003804= 0122 8574 dc.w KEY_RETURN-TAB_STAR * RETURN -00003806= 52 01 8575 dc.b 'R',1 -00003808= 0118 8576 dc.w KEY_REM-TAB_STAR * REM -0000380A= 53 02 8577 dc.b 'S',2 -0000380C= 0154 8578 dc.w KEY_STOP-TAB_STAR * STOP -0000380E= 4F 00 8579 dc.b 'O',0 -00003810= 00F3 8580 dc.w KEY_ON-TAB_STAR * ON -00003812= 4E 02 8581 dc.b 'N',2 -00003814= 00EE 8582 dc.w KEY_NULL-TAB_STAR * NULL -00003816= 49 01 8583 dc.b 'I',1 -00003818= 009B 8584 dc.w KEY_INC-TAB_STAR * INC -0000381A= 57 02 8585 dc.b 'W',2 -0000381C= 019A 8586 dc.w KEY_WAIT-TAB_STAR * WAIT -0000381E= 4C 02 8587 dc.b 'L',2 -00003820= 00C5 8588 dc.w KEY_LOAD-TAB_STAR * LOAD -00003822= 53 02 8589 dc.b 'S',2 -00003824= 013C 8590 dc.w KEY_SAVE-TAB_STAR * SAVE -00003826= 44 01 8591 dc.b 'D',1 -00003828= 0060 8592 dc.w KEY_DEF-TAB_STAR * DEF -0000382A= 50 02 8593 dc.b 'P',2 -0000382C= 00FF 8594 dc.w KEY_POKE-TAB_STAR * POKE -0000382E= 44 02 8595 dc.b 'D',2 -00003830= 0066 8596 dc.w KEY_DOKE-TAB_STAR * DOKE -00003832= 4C 02 8597 dc.b 'L',2 -00003834= 00CD 8598 dc.w KEY_LOKE-TAB_STAR * LOKE -00003836= 43 02 8599 dc.b 'C',2 -00003838= 003D 8600 dc.w KEY_CALL-TAB_STAR * CALL -0000383A= 44 00 8601 dc.b 'D',0 -0000383C= 006A 8602 dc.w KEY_DO-TAB_STAR * DO -0000383E= 4C 02 8603 dc.b 'L',2 -00003840= 00D1 8604 dc.w KEY_LOOP-TAB_STAR * LOOP -00003842= 50 03 8605 dc.b 'P',3 -00003844= 0107 8606 dc.w KEY_PRINT-TAB_STAR * PRINT -00003846= 43 02 8607 dc.b 'C',2 -00003848= 004B 8608 dc.w KEY_CONT-TAB_STAR * CONT -0000384A= 4C 02 8609 dc.b 'L',2 -0000384C= 00C1 8610 dc.w KEY_LIST-TAB_STAR * LIST -0000384E= 43 03 8611 dc.b 'C',3 -00003850= 0046 8612 dc.w KEY_CLEAR-TAB_STAR * CLEAR -00003852= 4E 01 8613 dc.b 'N',1 -00003854= 00E4 8614 dc.w KEY_NEW-TAB_STAR * NEW -00003856= 57 03 8615 dc.b 'W',3 -00003858= 01A3 8616 dc.w KEY_WIDTH-TAB_STAR * WIDTH -0000385A= 47 01 8617 dc.b 'G',1 -0000385C= 0086 8618 dc.w KEY_GET-TAB_STAR * GET -0000385E= 53 02 8619 dc.b 'S',2 -00003860= 015D 8620 dc.w KEY_SWAP-TAB_STAR * SWAP -00003862= 42 04 8621 dc.b 'B',4 -00003864= 002F 8622 dc.w KEY_BITSET-TAB_STAR * BITSET -00003866= 42 04 8623 dc.b 'B',4 -00003868= 0029 8624 dc.w KEY_BITCLR-TAB_STAR * BITCLR -0000386A= 54 02 8625 dc.b 'T',2 -0000386C= 0162 8626 dc.w KEY_TAB-TAB_STAR * TAB( -0000386E= 45 02 8627 dc.b 'E',2 -00003870= 006D 8628 dc.w KEY_ELSE-TAB_STAR * ELSE -00003872= 54 00 8629 dc.b 'T',0 -00003874= 016E 8630 dc.w KEY_TO-TAB_STAR * TO -00003876= 46 00 8631 dc.b 'F',0 -00003878= 007F 8632 dc.w KEY_FN-TAB_STAR * FN -0000387A= 53 02 8633 dc.b 'S',2 -0000387C= 0148 8634 dc.w KEY_SPC-TAB_STAR * SPC( -0000387E= 54 02 8635 dc.b 'T',2 -00003880= 016A 8636 dc.w KEY_THEN-TAB_STAR * THEN -00003882= 4E 01 8637 dc.b 'N',1 -00003884= 00EB 8638 dc.w KEY_NOT-TAB_STAR * NOT -00003886= 53 02 8639 dc.b 'S',2 -00003888= 0150 8640 dc.w KEY_STEP-TAB_STAR * STEP -0000388A= 55 03 8641 dc.b 'U',3 -0000388C= 017D 8642 dc.w KEY_UNTIL-TAB_STAR * UNTIL -0000388E= 57 03 8643 dc.b 'W',3 -00003890= 019E 8644 dc.w KEY_WHILE-TAB_STAR * WHILE -00003892 8645 -00003892= 2B FF 8646 dc.b '+',-1 -00003894= 0002 8647 dc.w KEY_PLUS-TAB_STAR * + -00003896= 2D FF 8648 dc.b '-',-1 -00003898= 0004 8649 dc.w KEY_MINUS-TAB_STAR * - -0000389A= 2A FF 8650 dc.b '*',-1 -0000389C= 0000 8651 dc.w KEY_MULT-TAB_STAR * * -0000389E= 2F FF 8652 dc.b '/',-1 -000038A0= 0006 8653 dc.w KEY_DIV-TAB_STAR * / -000038A2= 5E FF 8654 dc.b '^',-1 -000038A4= 01A9 8655 dc.w KEY_POWER-TAB_STAR * ^ -000038A6= 41 01 8656 dc.b 'A',1 -000038A8= 0018 8657 dc.w KEY_AND-TAB_STAR * AND -000038AA= 45 01 8658 dc.b 'E',1 -000038AC= 0074 8659 dc.w KEY_EOR-TAB_STAR * EOR -000038AE= 4F 00 8660 dc.b 'O',0 -000038B0= 00F5 8661 dc.w KEY_OR-TAB_STAR * OR -000038B2= 3E 00 8662 dc.b '>',0 -000038B4= 000E 8663 dc.w KEY_RSHIFT-TAB_STAR * >> -000038B6= 3C 00 8664 dc.b '<',0 -000038B8= 0008 8665 dc.w KEY_LSHIFT-TAB_STAR * << -000038BA= 3E FF 8666 dc.b '>',-1 -000038BC= 0010 8667 dc.w KEY_GT-TAB_STAR * > -000038BE= 3D FF 8668 dc.b '=',-1 -000038C0= 000C 8669 dc.w KEY_EQUAL-TAB_STAR * = -000038C2= 3C FF 8670 dc.b '<',-1 -000038C4= 000A 8671 dc.w KEY_LT-TAB_STAR * < -000038C6 8672 -000038C6= 53 02 8673 dc.b 'S',2 -000038C8= 0140 8674 dc.w KEY_SGN-TAB_STAR * SGN( -000038CA= 49 02 8675 dc.b 'I',2 -000038CC= 00A3 8676 dc.w KEY_INT-TAB_STAR * INT( -000038CE= 41 02 8677 dc.b 'A',2 -000038D0= 0014 8678 dc.w KEY_ABS-TAB_STAR * ABS( -000038D2= 55 02 8679 dc.b 'U',2 -000038D4= 0189 8680 dc.w KEY_USR-TAB_STAR * USR( -000038D6= 46 02 8681 dc.b 'F',2 -000038D8= 0081 8682 dc.w KEY_FRE-TAB_STAR * FRE( -000038DA= 50 02 8683 dc.b 'P',2 -000038DC= 0103 8684 dc.w KEY_POS-TAB_STAR * POS( -000038DE= 53 02 8685 dc.b 'S',2 -000038E0= 014C 8686 dc.w KEY_SQR-TAB_STAR * SQR( -000038E2= 52 02 8687 dc.b 'R',2 -000038E4= 012F 8688 dc.w KEY_RND-TAB_STAR * RND( -000038E6= 4C 02 8689 dc.b 'L',2 -000038E8= 00C9 8690 dc.w KEY_LOG-TAB_STAR * LOG( -000038EA= 45 02 8691 dc.b 'E',2 -000038EC= 0077 8692 dc.w KEY_EXP-TAB_STAR * EXP( -000038EE= 43 02 8693 dc.b 'C',2 -000038F0= 004F 8694 dc.w KEY_COS-TAB_STAR * COS( -000038F2= 53 02 8695 dc.b 'S',2 -000038F4= 0144 8696 dc.w KEY_SIN-TAB_STAR * SIN( -000038F6= 54 02 8697 dc.b 'T',2 -000038F8= 0166 8698 dc.w KEY_TAN-TAB_STAR * TAN( -000038FA= 41 02 8699 dc.b 'A',2 -000038FC= 001F 8700 dc.w KEY_ATN-TAB_STAR * ATN( -000038FE= 50 03 8701 dc.b 'P',3 -00003900= 00F8 8702 dc.w KEY_PEEK-TAB_STAR * PEEK( -00003902= 44 03 8703 dc.b 'D',3 -00003904= 005B 8704 dc.w KEY_DEEK-TAB_STAR * DEEK( -00003906= 4C 03 8705 dc.b 'L',3 -00003908= 00AF 8706 dc.w KEY_LEEK-TAB_STAR * LEEK( -0000390A= 4C 02 8707 dc.b 'L',2 -0000390C= 00BA 8708 dc.w KEY_LEN-TAB_STAR * LEN( -0000390E= 53 03 8709 dc.b 'S',3 -00003910= 0158 8710 dc.w KEY_STRS-TAB_STAR * STR$( -00003912= 56 02 8711 dc.b 'V',2 -00003914= 018E 8712 dc.w KEY_VAL-TAB_STAR * VAL( -00003916= 41 02 8713 dc.b 'A',2 -00003918= 001B 8714 dc.w KEY_ASC-TAB_STAR * ASC( -0000391A= 55 05 8715 dc.b 'U',5 -0000391C= 0176 8716 dc.w KEY_UCASES-TAB_STAR * UCASE$( -0000391E= 4C 05 8717 dc.b 'L',5 -00003920= 00A8 8718 dc.w KEY_LCASES-TAB_STAR * LCASE$( -00003922= 43 03 8719 dc.b 'C',3 -00003924= 0041 8720 dc.w KEY_CHRS-TAB_STAR * CHR$( -00003926= 48 03 8721 dc.b 'H',3 -00003928= 0093 8722 dc.w KEY_HEXS-TAB_STAR * HEX$( -0000392A= 42 03 8723 dc.b 'B',3 -0000392C= 0024 8724 dc.w KEY_BINS-TAB_STAR * BIN$( -0000392E= 42 05 8725 dc.b 'B',5 -00003930= 0035 8726 dc.w KEY_BITTST-TAB_STAR * BITTST( -00003932= 4D 02 8727 dc.b 'M',2 -00003934= 00D6 8728 dc.w KEY_MAX-TAB_STAR * MAX( -00003936= 4D 02 8729 dc.b 'M',2 -00003938= 00DF 8730 dc.w KEY_MIN-TAB_STAR * MIN( -0000393A= 52 05 8731 dc.b 'R',5 -0000393C= 010D 8732 dc.w KEY_RAM-TAB_STAR * RAMBASE -0000393E= 50 00 8733 dc.b 'P',0 -00003940= 00FD 8734 dc.w KEY_PI-TAB_STAR * PI -00003942= 54 03 8735 dc.b 'T',3 -00003944= 0170 8736 dc.w KEY_TWOPI-TAB_STAR * TWOPI -00003946= 56 05 8737 dc.b 'V',5 -00003948= 0192 8738 dc.w KEY_VPTR-TAB_STAR * VARPTR( -0000394A= 53 03 8739 dc.b 'S',3 -0000394C= 0137 8740 dc.w KEY_SADD-TAB_STAR * SADD( -0000394E= 4C 04 8741 dc.b 'L',4 -00003950= 00B4 8742 dc.w KEY_LEFTS-TAB_STAR * LEFT$( -00003952= 52 05 8743 dc.b 'R',5 -00003954= 0128 8744 dc.w KEY_RIGHTS-TAB_STAR * RIGHT$( -00003956= 4D 03 8745 dc.b 'M',3 -00003958= 00DA 8746 dc.w KEY_MIDS-TAB_STAR * MID$( -0000395A= 55 05 8747 dc.b 'U',5 -0000395C= 0182 8748 dc.w KEY_USINGS-TAB_STAR * USING$( -0000395E 8749 -0000395E 8750 -0000395E 8751 ************************************************************************************* -0000395E 8752 * -0000395E 8753 * BASIC error messages -0000395E 8754 -0000395E 8755 LAB_BAER -0000395E= 0030 8756 dc.w LAB_NF-LAB_BAER * $00 NEXT without FOR -00003960= 0041 8757 dc.w LAB_SN-LAB_BAER * $02 syntax -00003962= 0048 8758 dc.w LAB_RG-LAB_BAER * $04 RETURN without GOSUB -00003964= 005D 8759 dc.w LAB_OD-LAB_BAER * $06 out of data -00003966= 0069 8760 dc.w LAB_FC-LAB_BAER * $08 function call -00003968= 0077 8761 dc.w LAB_OV-LAB_BAER * $0A overflow -0000396A= 0080 8762 dc.w LAB_OM-LAB_BAER * $0C out of memory -0000396C= 008E 8763 dc.w LAB_US-LAB_BAER * $0E undefined statement -0000396E= 00A2 8764 dc.w LAB_BS-LAB_BAER * $10 array bounds -00003970= 00AF 8765 dc.w LAB_DD-LAB_BAER * $12 double dimension array -00003972= 00C0 8766 dc.w LAB_D0-LAB_BAER * $14 divide by 0 -00003974= 00CF 8767 dc.w LAB_ID-LAB_BAER * $16 illegal direct -00003976= 00DE 8768 dc.w LAB_TM-LAB_BAER * $18 type mismatch -00003978= 00EC 8769 dc.w LAB_LS-LAB_BAER * $1A long string -0000397A= 00FC 8770 dc.w LAB_ST-LAB_BAER * $1C string too complex -0000397C= 010F 8771 dc.w LAB_CN-LAB_BAER * $1E continue error -0000397E= 011E 8772 dc.w LAB_UF-LAB_BAER * $20 undefined function -00003980= 0131 8773 dc.w LAB_LD-LAB_BAER * $22 LOOP without DO -00003982= 0141 8774 dc.w LAB_UV-LAB_BAER * $24 undefined variable -00003984= 0154 8775 dc.w LAB_UA-LAB_BAER * $26 undimensioned array -00003986= 0168 8776 dc.w LAB_WD-LAB_BAER * $28 wrong dimensions -00003988= 0179 8777 dc.w LAB_AD-LAB_BAER * $2A address -0000398A= 0181 8778 dc.w LAB_FO-LAB_BAER * $2C format -0000398C= 0188 8779 dc.w LAB_NI-LAB_BAER * $2E not implemented -0000398E 8780 -0000398E= 4E 45 58 54 20 77 ... 8781 LAB_NF dc.b 'NEXT without FOR',$00 -0000399F= 53 79 6E 74 61 78 00 8782 LAB_SN dc.b 'Syntax',$00 -000039A6= 52 45 54 55 52 4E ... 8783 LAB_RG dc.b 'RETURN without GOSUB',$00 -000039BB= 4F 75 74 20 6F 66 ... 8784 LAB_OD dc.b 'Out of DATA',$00 -000039C7= 46 75 6E 63 74 69 ... 8785 LAB_FC dc.b 'Function call',$00 -000039D5= 4F 76 65 72 66 6C ... 8786 LAB_OV dc.b 'Overflow',$00 -000039DE= 4F 75 74 20 6F 66 ... 8787 LAB_OM dc.b 'Out of memory',$00 -000039EC= 55 6E 64 65 66 69 ... 8788 LAB_US dc.b 'Undefined statement',$00 -00003A00= 41 72 72 61 79 20 ... 8789 LAB_BS dc.b 'Array bounds',$00 -00003A0D= 44 6F 75 62 6C 65 ... 8790 LAB_DD dc.b 'Double dimension',$00 -00003A1E= 44 69 76 69 64 65 ... 8791 LAB_D0 dc.b 'Divide by zero',$00 -00003A2D= 49 6C 6C 65 67 61 ... 8792 LAB_ID dc.b 'Illegal direct',$00 -00003A3C= 54 79 70 65 20 6D ... 8793 LAB_TM dc.b 'Type mismatch',$00 -00003A4A= 53 74 72 69 6E 67 ... 8794 LAB_LS dc.b 'String too long',$00 -00003A5A= 53 74 72 69 6E 67 ... 8795 LAB_ST dc.b 'String too complex',$00 -00003A6D= 43 61 6E 27 74 20 ... 8796 LAB_CN dc.b 'Can''t continue',$00 -00003A7C= 55 6E 64 65 66 69 ... 8797 LAB_UF dc.b 'Undefined function',$00 -00003A8F= 4C 4F 4F 50 20 77 ... 8798 LAB_LD dc.b 'LOOP without DO',$00 -00003A9F= 55 6E 64 65 66 69 ... 8799 LAB_UV dc.b 'Undefined variable',$00 -00003AB2= 55 6E 64 69 6D 65 ... 8800 LAB_UA dc.b 'Undimensioned array',$00 -00003AC6= 57 72 6F 6E 67 20 ... 8801 LAB_WD dc.b 'Wrong dimensions',$00 -00003AD7= 41 64 64 72 65 73 ... 8802 LAB_AD dc.b 'Address',$00 -00003ADF= 46 6F 72 6D 61 74 00 8803 LAB_FO dc.b 'Format',$00 -00003AE6= 4E 6F 74 20 69 6D ... 8804 LAB_NI dc.b 'Not implemented',$00 -00003AF6 8805 -00003AF6 8806 -00003AF6 8807 ************************************************************************************* -00003AF6 8808 * -00003AF6 8809 * keyword table for line (un)crunching -00003AF6 8810 -00003AF6 8811 * [keyword,token -00003AF6 8812 * [keyword,token]] -00003AF6 8813 * end marker (#$00) -00003AF6 8814 -00003AF6 8815 TAB_STAR -00003AF6 8816 KEY_MULT -00003AF6= B4 00 8817 dc.b TK_MULT,$00 * * -00003AF8 8818 TAB_PLUS -00003AF8 8819 KEY_PLUS -00003AF8= B2 00 8820 dc.b TK_PLUS,$00 * + -00003AFA 8821 TAB_MNUS -00003AFA 8822 KEY_MINUS -00003AFA= B3 00 8823 dc.b TK_MINUS,$00 * - -00003AFC 8824 TAB_SLAS -00003AFC 8825 KEY_DIV -00003AFC= B5 00 8826 dc.b TK_DIV,$00 * / -00003AFE 8827 TAB_LESS -00003AFE 8828 KEY_LSHIFT -00003AFE= 3C BB 8829 dc.b '<',TK_LSHIFT * << -00003B00 8830 KEY_LT -00003B00= BE 8831 dc.b TK_LT * < -00003B01= 00 8832 dc.b $00 -00003B02 8833 TAB_EQUL -00003B02 8834 KEY_EQUAL -00003B02= BD 00 8835 dc.b TK_EQUAL,$00 * = -00003B04 8836 TAB_MORE -00003B04 8837 KEY_RSHIFT -00003B04= 3E BA 8838 dc.b '>',TK_RSHIFT * >> -00003B06 8839 KEY_GT -00003B06= BC 8840 dc.b TK_GT * > -00003B07= 00 8841 dc.b $00 -00003B08 8842 TAB_QEST -00003B08= 9E 00 8843 dc.b TK_PRINT,$00 * ? -00003B0A 8844 TAB_ASCA -00003B0A 8845 KEY_ABS -00003B0A= 42 53 28 C1 8846 dc.b 'BS(',TK_ABS * ABS( -00003B0E 8847 KEY_AND -00003B0E= 4E 44 B7 8848 dc.b 'ND',TK_AND * AND -00003B11 8849 KEY_ASC -00003B11= 53 43 28 D3 8850 dc.b 'SC(',TK_ASC * ASC( -00003B15 8851 KEY_ATN -00003B15= 54 4E 28 CC 8852 dc.b 'TN(',TK_ATN * ATN( -00003B19= 00 8853 dc.b $00 -00003B1A 8854 TAB_ASCB -00003B1A 8855 KEY_BINS -00003B1A= 49 4E 24 28 D8 8856 dc.b 'IN$(',TK_BINS * BIN$( -00003B1F 8857 KEY_BITCLR -00003B1F= 49 54 43 4C 52 A7 8858 dc.b 'ITCLR',TK_BITCLR * BITCLR -00003B25 8859 KEY_BITSET -00003B25= 49 54 53 45 54 A6 8860 dc.b 'ITSET',TK_BITSET * BITSET -00003B2B 8861 KEY_BITTST -00003B2B= 49 54 54 53 54 28 D9 8862 dc.b 'ITTST(',TK_BITTST * BITTST( -00003B32= 00 8863 dc.b $00 -00003B33 8864 TAB_ASCC -00003B33 8865 KEY_CALL -00003B33= 41 4C 4C 9B 8866 dc.b 'ALL',TK_CALL * CALL -00003B37 8867 KEY_CHRS -00003B37= 48 52 24 28 D6 8868 dc.b 'HR$(',TK_CHRS * CHR$( -00003B3C 8869 KEY_CLEAR -00003B3C= 4C 45 41 52 A1 8870 dc.b 'LEAR',TK_CLEAR * CLEAR -00003B41 8871 KEY_CONT -00003B41= 4F 4E 54 9F 8872 dc.b 'ONT',TK_CONT * CONT -00003B45 8873 KEY_COS -00003B45= 4F 53 28 C9 8874 dc.b 'OS(',TK_COS * COS( -00003B49= 00 8875 dc.b $00 -00003B4A 8876 TAB_ASCD -00003B4A 8877 KEY_DATA -00003B4A= 41 54 41 83 8878 dc.b 'ATA',TK_DATA * DATA -00003B4E 8879 KEY_DEC -00003B4E= 45 43 88 8880 dc.b 'EC',TK_DEC * DEC -00003B51 8881 KEY_DEEK -00003B51= 45 45 4B 28 CE 8882 dc.b 'EEK(',TK_DEEK * DEEK( -00003B56 8883 KEY_DEF -00003B56= 45 46 97 8884 dc.b 'EF',TK_DEF * DEF -00003B59 8885 KEY_DIM -00003B59= 49 4D 85 8886 dc.b 'IM',TK_DIM * DIM -00003B5C 8887 KEY_DOKE -00003B5C= 4F 4B 45 99 8888 dc.b 'OKE',TK_DOKE * DOKE -00003B60 8889 KEY_DO -00003B60= 4F 9C 8890 dc.b 'O',TK_DO * DO -00003B62= 00 8891 dc.b $00 -00003B63 8892 TAB_ASCE -00003B63 8893 KEY_ELSE -00003B63= 4C 53 45 A9 8894 dc.b 'LSE',TK_ELSE * ELSE -00003B67 8895 KEY_END -00003B67= 4E 44 80 8896 dc.b 'ND',TK_END * END -00003B6A 8897 KEY_EOR -00003B6A= 4F 52 B8 8898 dc.b 'OR',TK_EOR * EOR -00003B6D 8899 KEY_EXP -00003B6D= 58 50 28 C8 8900 dc.b 'XP(',TK_EXP * EXP( -00003B71= 00 8901 dc.b $00 -00003B72 8902 TAB_ASCF -00003B72 8903 KEY_FOR -00003B72= 4F 52 81 8904 dc.b 'OR',TK_FOR * FOR -00003B75 8905 KEY_FN -00003B75= 4E AB 8906 dc.b 'N',TK_FN * FN -00003B77 8907 KEY_FRE -00003B77= 52 45 28 C3 8908 dc.b 'RE(',TK_FRE * FRE( -00003B7B= 00 8909 dc.b $00 -00003B7C 8910 TAB_ASCG -00003B7C 8911 KEY_GET -00003B7C= 45 54 A4 8912 dc.b 'ET',TK_GET * GET -00003B7F 8913 KEY_GOTO -00003B7F= 4F 54 4F 89 8914 dc.b 'OTO',TK_GOTO * GOTO -00003B83 8915 KEY_GOSUB -00003B83= 4F 53 55 42 8D 8916 dc.b 'OSUB',TK_GOSUB * GOSUB -00003B88= 00 8917 dc.b $00 -00003B89 8918 TAB_ASCH -00003B89 8919 KEY_HEXS -00003B89= 45 58 24 28 D7 00 8920 dc.b 'EX$(',TK_HEXS,$00 * HEX$( -00003B8F 8921 TAB_ASCI -00003B8F 8922 KEY_IF -00003B8F= 46 8B 8923 dc.b 'F',TK_IF * IF -00003B91 8924 KEY_INC -00003B91= 4E 43 93 8925 dc.b 'NC',TK_INC * INC -00003B94 8926 KEY_INPUT -00003B94= 4E 50 55 54 84 8927 dc.b 'NPUT',TK_INPUT * INPUT -00003B99 8928 KEY_INT -00003B99= 4E 54 28 C0 8929 dc.b 'NT(',TK_INT * INT( -00003B9D= 00 8930 dc.b $00 -00003B9E 8931 TAB_ASCL -00003B9E 8932 KEY_LCASES -00003B9E= 43 41 53 45 24 28 D5 8933 dc.b 'CASE$(',TK_LCASES * LCASE$( -00003BA5 8934 KEY_LEEK -00003BA5= 45 45 4B 28 CF 8935 dc.b 'EEK(',TK_LEEK * LEEK( -00003BAA 8936 KEY_LEFTS -00003BAA= 45 46 54 24 28 E1 8937 dc.b 'EFT$(',TK_LEFTS * LEFT$( -00003BB0 8938 KEY_LEN -00003BB0= 45 4E 28 D0 8939 dc.b 'EN(',TK_LEN * LEN( -00003BB4 8940 KEY_LET -00003BB4= 45 54 87 8941 dc.b 'ET',TK_LET * LET -00003BB7 8942 KEY_LIST -00003BB7= 49 53 54 A0 8943 dc.b 'IST',TK_LIST * LIST -00003BBB 8944 KEY_LOAD -00003BBB= 4F 41 44 95 8945 dc.b 'OAD',TK_LOAD * LOAD -00003BBF 8946 KEY_LOG -00003BBF= 4F 47 28 C7 8947 dc.b 'OG(',TK_LOG * LOG( -00003BC3 8948 KEY_LOKE -00003BC3= 4F 4B 45 9A 8949 dc.b 'OKE',TK_LOKE * LOKE -00003BC7 8950 KEY_LOOP -00003BC7= 4F 4F 50 9D 8951 dc.b 'OOP',TK_LOOP * LOOP -00003BCB= 00 8952 dc.b $00 -00003BCC 8953 TAB_ASCM -00003BCC 8954 KEY_MAX -00003BCC= 41 58 28 DA 8955 dc.b 'AX(',TK_MAX * MAX( -00003BD0 8956 KEY_MIDS -00003BD0= 49 44 24 28 E3 8957 dc.b 'ID$(',TK_MIDS * MID$( -00003BD5 8958 KEY_MIN -00003BD5= 49 4E 28 DB 8959 dc.b 'IN(',TK_MIN * MIN( -00003BD9= 00 8960 dc.b $00 -00003BDA 8961 TAB_ASCN -00003BDA 8962 KEY_NEW -00003BDA= 45 57 A2 8963 dc.b 'EW',TK_NEW * NEW -00003BDD 8964 KEY_NEXT -00003BDD= 45 58 54 82 8965 dc.b 'EXT',TK_NEXT * NEXT -00003BE1 8966 KEY_NOT -00003BE1= 4F 54 AE 8967 dc.b 'OT',TK_NOT * NOT -00003BE4 8968 KEY_NULL -00003BE4= 55 4C 4C 92 8969 dc.b 'ULL',TK_NULL * NULL -00003BE8= 00 8970 dc.b $00 -00003BE9 8971 TAB_ASCO -00003BE9 8972 KEY_ON -00003BE9= 4E 91 8973 dc.b 'N',TK_ON * ON -00003BEB 8974 KEY_OR -00003BEB= 52 B9 8975 dc.b 'R',TK_OR * OR -00003BED= 00 8976 dc.b $00 -00003BEE 8977 TAB_ASCP -00003BEE 8978 KEY_PEEK -00003BEE= 45 45 4B 28 CD 8979 dc.b 'EEK(',TK_PEEK * PEEK( -00003BF3 8980 KEY_PI -00003BF3= 49 DD 8981 dc.b 'I',TK_PI * PI -00003BF5 8982 KEY_POKE -00003BF5= 4F 4B 45 98 8983 dc.b 'OKE',TK_POKE * POKE -00003BF9 8984 KEY_POS -00003BF9= 4F 53 28 C4 8985 dc.b 'OS(',TK_POS * POS( -00003BFD 8986 KEY_PRINT -00003BFD= 52 49 4E 54 9E 8987 dc.b 'RINT',TK_PRINT * PRINT -00003C02= 00 8988 dc.b $00 -00003C03 8989 TAB_ASCR -00003C03 8990 KEY_RAM -00003C03= 41 4D 42 41 53 45 DC 8991 dc.b 'AMBASE',TK_RAM * RAMBASE -00003C0A 8992 KEY_READ -00003C0A= 45 41 44 86 8993 dc.b 'EAD',TK_READ * READ -00003C0E 8994 KEY_REM -00003C0E= 45 4D 8F 8995 dc.b 'EM',TK_REM * REM -00003C11 8996 KEY_RESTORE -00003C11= 45 53 54 4F 52 45 8C 8997 dc.b 'ESTORE',TK_RESTORE * RESTORE -00003C18 8998 KEY_RETURN -00003C18= 45 54 55 52 4E 8E 8999 dc.b 'ETURN',TK_RETURN * RETURN -00003C1E 9000 KEY_RIGHTS -00003C1E= 49 47 48 54 24 28 E2 9001 dc.b 'IGHT$(',TK_RIGHTS * RIGHT$( -00003C25 9002 KEY_RND -00003C25= 4E 44 28 C6 9003 dc.b 'ND(',TK_RND * RND( -00003C29 9004 KEY_RUN -00003C29= 55 4E 8A 9005 dc.b 'UN',TK_RUN * RUN -00003C2C= 00 9006 dc.b $00 -00003C2D 9007 TAB_ASCS -00003C2D 9008 KEY_SADD -00003C2D= 41 44 44 28 E0 9009 dc.b 'ADD(',TK_SADD * SADD( -00003C32 9010 KEY_SAVE -00003C32= 41 56 45 96 9011 dc.b 'AVE',TK_SAVE * SAVE -00003C36 9012 KEY_SGN -00003C36= 47 4E 28 BF 9013 dc.b 'GN(',TK_SGN * SGN( -00003C3A 9014 KEY_SIN -00003C3A= 49 4E 28 CA 9015 dc.b 'IN(',TK_SIN * SIN( -00003C3E 9016 KEY_SPC -00003C3E= 50 43 28 AC 9017 dc.b 'PC(',TK_SPC * SPC( -00003C42 9018 KEY_SQR -00003C42= 51 52 28 C5 9019 dc.b 'QR(',TK_SQR * SQR( -00003C46 9020 KEY_STEP -00003C46= 54 45 50 AF 9021 dc.b 'TEP',TK_STEP * STEP -00003C4A 9022 KEY_STOP -00003C4A= 54 4F 50 90 9023 dc.b 'TOP',TK_STOP * STOP -00003C4E 9024 KEY_STRS -00003C4E= 54 52 24 28 D1 9025 dc.b 'TR$(',TK_STRS * STR$( -00003C53 9026 KEY_SWAP -00003C53= 57 41 50 A5 9027 dc.b 'WAP',TK_SWAP * SWAP -00003C57= 00 9028 dc.b $00 -00003C58 9029 TAB_ASCT -00003C58 9030 KEY_TAB -00003C58= 41 42 28 A8 9031 dc.b 'AB(',TK_TAB * TAB( -00003C5C 9032 KEY_TAN -00003C5C= 41 4E 28 CB 9033 dc.b 'AN(',TK_TAN * TAN -00003C60 9034 KEY_THEN -00003C60= 48 45 4E AD 9035 dc.b 'HEN',TK_THEN * THEN -00003C64 9036 KEY_TO -00003C64= 4F AA 9037 dc.b 'O',TK_TO * TO -00003C66 9038 KEY_TWOPI -00003C66= 57 4F 50 49 DE 9039 dc.b 'WOPI',TK_TWOPI * TWOPI -00003C6B= 00 9040 dc.b $00 -00003C6C 9041 TAB_ASCU -00003C6C 9042 KEY_UCASES -00003C6C= 43 41 53 45 24 28 D4 9043 dc.b 'CASE$(',TK_UCASES * UCASE$( -00003C73 9044 KEY_UNTIL -00003C73= 4E 54 49 4C B0 9045 dc.b 'NTIL',TK_UNTIL * UNTIL -00003C78 9046 KEY_USINGS -00003C78= 53 49 4E 47 24 28 E4 9047 dc.b 'SING$(',TK_USINGS * USING$( -00003C7F 9048 KEY_USR -00003C7F= 53 52 28 C2 9049 dc.b 'SR(',TK_USR * USR( -00003C83= 00 9050 dc.b $00 -00003C84 9051 TAB_ASCV -00003C84 9052 KEY_VAL -00003C84= 41 4C 28 D2 9053 dc.b 'AL(',TK_VAL * VAL( -00003C88 9054 KEY_VPTR -00003C88= 41 52 50 54 52 28 DF 9055 dc.b 'ARPTR(',TK_VPTR * VARPTR( -00003C8F= 00 9056 dc.b $00 -00003C90 9057 TAB_ASCW -00003C90 9058 KEY_WAIT -00003C90= 41 49 54 94 9059 dc.b 'AIT',TK_WAIT * WAIT -00003C94 9060 KEY_WHILE -00003C94= 48 49 4C 45 B1 9061 dc.b 'HILE',TK_WHILE * WHILE -00003C99 9062 KEY_WIDTH -00003C99= 49 44 54 48 A3 9063 dc.b 'IDTH',TK_WIDTH * WIDTH -00003C9E= 00 9064 dc.b $00 -00003C9F 9065 TAB_POWR -00003C9F 9066 KEY_POWER -00003C9F= B6 00 9067 dc.b TK_POWER,$00 * ^ -00003CA1 9068 -00003CA1 9069 -00003CA1 9070 ************************************************************************************* -00003CA1 9071 * -00003CA1 9072 * just messages -00003CA1 9073 -00003CA1 9074 LAB_BMSG -00003CA1= 0D 0A 42 72 65 61 ... 9075 dc.b $0D,$0A,'Break',$00 -00003CA9 9076 LAB_EMSG -00003CA9= 20 45 72 72 6F 72 00 9077 dc.b ' Error',$00 -00003CB0 9078 LAB_LMSG -00003CB0= 20 69 6E 20 6C 69 ... 9079 dc.b ' in line ',$00 -00003CBA 9080 LAB_IMSG -00003CBA= 45 78 74 72 61 20 ... 9081 dc.b 'Extra ignored',$0D,$0A,$00 -00003CCA 9082 LAB_REDO -00003CCA= 52 65 64 6F 20 66 ... 9083 dc.b 'Redo from start',$0D,$0A,$00 -00003CDC 9084 LAB_RMSG -00003CDC= 0D 0A 52 65 61 64 ... 9085 dc.b $0D,$0A,'Ready',$0D,$0A,$00 -00003CE6 9086 LAB_SMSG -00003CE6= 20 42 79 74 65 73 ... 9087 dc.b ' Bytes free',$0D,$0A,$0A -00003CF4= 4D 61 74 74 20 50 ... 9088 dc.b 'Matt Pearce Enhanced 68k BASIC Version 3.52',$0D,$0A,$00 -00003D22 9089 -00003D22 9090 -00003D22 9091 ************************************************************************************* -00003D22 9092 * EhBASIC keywords quick reference list * -00003D22 9093 ************************************************************************************* -00003D22 9094 -00003D22 9095 * glossary -00003D22 9096 -00003D22 9097 * <.> required -00003D22 9098 * {.|.} one of required -00003D22 9099 * [.] optional -00003D22 9100 * ... may repeat as last -00003D22 9101 -00003D22 9102 * any = anything -00003D22 9103 * num = number -00003D22 9104 * state = statement -00003D22 9105 * n = positive integer -00003D22 9106 * str = string -00003D22 9107 * var = variable -00003D22 9108 * nvar = numeric variable -00003D22 9109 * svar = string variable -00003D22 9110 * expr = expression -00003D22 9111 * nexpr = numeric expression -00003D22 9112 * sexpr = string expression -00003D22 9113 -00003D22 9114 * statement separator -00003D22 9115 -00003D22 9116 * : . [] : [] * done -00003D22 9117 -00003D22 9118 * number bases -00003D22 9119 -00003D22 9120 * % . % * done -00003D22 9121 * $ . $ * done -00003D22 9122 -00003D22 9123 * commands -00003D22 9124 -00003D22 9125 * END . END * done -00003D22 9126 * FOR . FOR = TO [STEP ] * done -00003D22 9127 * NEXT . NEXT [[,]...] * done -00003D22 9128 * DATA . DATA [{num|["]str["]}[,{num|["]str["]}]...] * done -00003D22 9129 * INPUT . INPUT [<">str<">;] [,[,]...] * done -00003D22 9130 * DIM . DIM ([,[,]]) * done -00003D22 9131 * READ . READ [,[,]...] * done -00003D22 9132 * LET . [LET] = * done -00003D22 9133 * DEC . DEC [,[,]...] * done -00003D22 9134 * GOTO . GOTO * done -00003D22 9135 * RUN . RUN [] * done -00003D22 9136 * IF . IF {GOTO|THEN<{n|comm}>}[ELSE <{n|comm}>] * done -00003D22 9137 * RESTORE . RESTORE [] * done -00003D22 9138 * GOSUB . GOSUB * done -00003D22 9139 * RETURN . RETURN * done -00003D22 9140 * REM . REM [] * done -00003D22 9141 * STOP . STOP * done -00003D22 9142 * ON . ON {GOTO|GOSUB}[,[,]...] * done -00003D22 9143 * NULL . NULL * done -00003D22 9144 * INC . INC [,[,]...] * done -00003D22 9145 * WAIT . WAIT ,[,] * done -00003D22 9146 * LOAD . LOAD [] * done for sim -00003D22 9147 * SAVE . SAVE [][,[][-]] * done for sim -00003D22 9148 * DEF . DEF FN()= * done -00003D22 9149 * POKE . POKE , * done -00003D22 9150 * DOKE . DOKE , * done -00003D22 9151 * LOKE . LOKE , * done -00003D22 9152 * CALL . CALL * done -00003D22 9153 * DO . DO * done -00003D22 9154 * LOOP . LOOP [{WHILE|UNTIL}] * done -00003D22 9155 * PRINT . PRINT [{;|,}][][{;|,}[]...] * done -00003D22 9156 * CONT . CONT * done -00003D22 9157 * LIST . LIST [][-] * done -00003D22 9158 * CLEAR . CLEAR * done -00003D22 9159 * NEW . NEW * done -00003D22 9160 * WIDTH . WIDTH [][,] * done -00003D22 9161 * GET . GET * done -00003D22 9162 * SWAP . SWAP , * done -00003D22 9163 * BITSET . BITSET , * done -00003D22 9164 * BITCLR . BITCLR , * done -00003D22 9165 -00003D22 9166 * sub commands (may not start a statement) -00003D22 9167 -00003D22 9168 * TAB . TAB() * done -00003D22 9169 * ELSE . IF {GOTO|THEN<{n|comm}>}[ELSE <{n|comm}>] * done -00003D22 9170 * TO . FOR = TO [STEP ] * done -00003D22 9171 * FN . FN () * done -00003D22 9172 * SPC . SPC() * done -00003D22 9173 * THEN . IF {THEN <{n|comm}>|GOTO } * done -00003D22 9174 * NOT . NOT * done -00003D22 9175 * STEP . FOR = TO [STEP ] * done -00003D22 9176 * UNTIL . LOOP [{WHILE|UNTIL}] * done -00003D22 9177 * WHILE . LOOP [{WHILE|UNTIL}] * done -00003D22 9178 -00003D22 9179 * operators -00003D22 9180 -00003D22 9181 * + . [expr] + * done -00003D22 9182 * - . [nexpr] - * done -00003D22 9183 * * . * * done fast hardware -00003D22 9184 * / . / * done fast hardware -00003D22 9185 * ^ . ^ * done -00003D22 9186 * AND . AND * done -00003D22 9187 * EOR . EOR * done -00003D22 9188 * OR . OR * done -00003D22 9189 * >> . >> * done -00003D22 9190 * << . << * done -00003D22 9191 -00003D22 9192 * compare functions -00003D22 9193 -00003D22 9194 * < . < * done -00003D22 9195 * = . = * done -00003D22 9196 * > . > * done -00003D22 9197 -00003D22 9198 * functions -00003D22 9199 -00003D22 9200 * SGN . SGN() * done -00003D22 9201 * INT . INT() * done -00003D22 9202 * ABS . ABS() * done -00003D22 9203 * USR . USR() * done -00003D22 9204 * FRE . FRE() * done -00003D22 9205 * POS . POS() * done -00003D22 9206 * SQR . SQR() * done fast shift/sub -00003D22 9207 * RND . RND() * done 32 bit PRNG -00003D22 9208 * LOG . LOG() * done fast cordic -00003D22 9209 * EXP . EXP() * done fast cordic -00003D22 9210 * COS . COS() * done fast cordic -00003D22 9211 * SIN . SIN() * done fast cordic -00003D22 9212 * TAN . TAN() * done fast cordic -00003D22 9213 * ATN . ATN() * done fast cordic -00003D22 9214 * PEEK . PEEK() * done -00003D22 9215 * DEEK . DEEK() * done -00003D22 9216 * LEEK . LEEK() * done -00003D22 9217 * LEN . LEN() * done -00003D22 9218 * STR$ . STR$() * done -00003D22 9219 * VAL . VAL() * done -00003D22 9220 * ASC . ASC() * done -00003D22 9221 * UCASE$ . UCASE$() * done -00003D22 9222 * LCASE$ . LCASE$() * done -00003D22 9223 * CHR$ . CHR$() * done -00003D22 9224 * HEX$ . HEX$() * done -00003D22 9225 * BIN$ . BIN$() * done -00003D22 9226 * BTST . BTST(,) * done -00003D22 9227 * MAX . MAX([,[,]...]) * done -00003D22 9228 * MIN . MIN([,[,]...]) * done -00003D22 9229 * PI . PI * done -00003D22 9230 * TWOPI . TWOPI * done -00003D22 9231 * VARPTR . VARPTR() * done -00003D22 9232 * SADD . SADD() * done -00003D22 9233 * LEFT$ . LEFT$(,) * done -00003D22 9234 * RIGHT$ . RIGHT$(,) * done -00003D22 9235 * MID$ . MID$(,[,]) * done -00003D22 9236 * USING$ . USING$(,[,]...]) * done -00003D22 9237 -00003D22 9238 -00003D22 9239 ************************************************************************************* -00003D22 9240 -00003D22 9241 END code_start +00003760 8480 TAB_CHRT +00003760= 0000 8481 dc.w TAB_STAR-TAB_STAR * "*" $2A +00003762= 0002 8482 dc.w TAB_PLUS-TAB_STAR * "+" $2B +00003764= FFFF 8483 dc.w -1 * "," $2C no keywords +00003766= 0004 8484 dc.w TAB_MNUS-TAB_STAR * "-" $2D +00003768= FFFF 8485 dc.w -1 * "." $2E no keywords +0000376A= 0006 8486 dc.w TAB_SLAS-TAB_STAR * "/" $2F +0000376C= FFFF 8487 dc.w -1 * "0" $30 no keywords +0000376E= FFFF 8488 dc.w -1 * "1" $31 no keywords +00003770= FFFF 8489 dc.w -1 * "2" $32 no keywords +00003772= FFFF 8490 dc.w -1 * "3" $33 no keywords +00003774= FFFF 8491 dc.w -1 * "4" $34 no keywords +00003776= FFFF 8492 dc.w -1 * "5" $35 no keywords +00003778= FFFF 8493 dc.w -1 * "6" $36 no keywords +0000377A= FFFF 8494 dc.w -1 * "7" $37 no keywords +0000377C= FFFF 8495 dc.w -1 * "8" $38 no keywords +0000377E= FFFF 8496 dc.w -1 * "9" $39 no keywords +00003780= FFFF 8497 dc.w -1 * ";" $3A no keywords +00003782= FFFF 8498 dc.w -1 * ":" $3B no keywords +00003784= 0008 8499 dc.w TAB_LESS-TAB_STAR * "<" $3C +00003786= 000C 8500 dc.w TAB_EQUL-TAB_STAR * "=" $3D +00003788= 000E 8501 dc.w TAB_MORE-TAB_STAR * ">" $3E +0000378A= 0012 8502 dc.w TAB_QEST-TAB_STAR * "?" $3F +0000378C= FFFF 8503 dc.w -1 * "@" $40 no keywords +0000378E= 0014 8504 dc.w TAB_ASCA-TAB_STAR * "A" $41 +00003790= 0024 8505 dc.w TAB_ASCB-TAB_STAR * "B" $42 +00003792= 003D 8506 dc.w TAB_ASCC-TAB_STAR * "C" $43 +00003794= 0054 8507 dc.w TAB_ASCD-TAB_STAR * "D" $44 +00003796= 006D 8508 dc.w TAB_ASCE-TAB_STAR * "E" $45 +00003798= 007C 8509 dc.w TAB_ASCF-TAB_STAR * "F" $46 +0000379A= 0086 8510 dc.w TAB_ASCG-TAB_STAR * "G" $47 +0000379C= 0093 8511 dc.w TAB_ASCH-TAB_STAR * "H" $48 +0000379E= 0099 8512 dc.w TAB_ASCI-TAB_STAR * "I" $49 +000037A0= FFFF 8513 dc.w -1 * "J" $4A no keywords +000037A2= FFFF 8514 dc.w -1 * "K" $4B no keywords +000037A4= 00A8 8515 dc.w TAB_ASCL-TAB_STAR * "L" $4C +000037A6= 00D6 8516 dc.w TAB_ASCM-TAB_STAR * "M" $4D +000037A8= 00E4 8517 dc.w TAB_ASCN-TAB_STAR * "N" $4E +000037AA= 00F3 8518 dc.w TAB_ASCO-TAB_STAR * "O" $4F +000037AC= 00F8 8519 dc.w TAB_ASCP-TAB_STAR * "P" $50 +000037AE= FFFF 8520 dc.w -1 * "Q" $51 no keywords +000037B0= 010D 8521 dc.w TAB_ASCR-TAB_STAR * "R" $52 +000037B2= 0137 8522 dc.w TAB_ASCS-TAB_STAR * "S" $53 +000037B4= 0162 8523 dc.w TAB_ASCT-TAB_STAR * "T" $54 +000037B6= 0176 8524 dc.w TAB_ASCU-TAB_STAR * "U" $55 +000037B8= 018E 8525 dc.w TAB_ASCV-TAB_STAR * "V" $56 +000037BA= 019A 8526 dc.w TAB_ASCW-TAB_STAR * "W" $57 +000037BC= FFFF 8527 dc.w -1 * "X" $58 no keywords +000037BE= FFFF 8528 dc.w -1 * "Y" $59 no keywords +000037C0= FFFF 8529 dc.w -1 * "Z" $5A no keywords +000037C2= FFFF 8530 dc.w -1 * "[" $5B no keywords +000037C4= FFFF 8531 dc.w -1 * "\" $5C no keywords +000037C6= FFFF 8532 dc.w -1 * "]" $5D no keywords +000037C8= 01A9 8533 dc.w TAB_POWR-TAB_STAR * "^" $5E +000037CA 8534 +000037CA 8535 +000037CA 8536 ************************************************************************************* +000037CA 8537 * +000037CA 8538 * Table of Basic keywords for LIST command +000037CA 8539 * [byte]first character,[byte]remaining length -1 +000037CA 8540 * [word]offset from table start +000037CA 8541 +000037CA 8542 LAB_KEYT +000037CA= 45 01 8543 dc.b 'E',1 +000037CC= 0071 8544 dc.w KEY_END-TAB_STAR * END +000037CE= 46 01 8545 dc.b 'F',1 +000037D0= 007C 8546 dc.w KEY_FOR-TAB_STAR * FOR +000037D2= 4E 02 8547 dc.b 'N',2 +000037D4= 00E7 8548 dc.w KEY_NEXT-TAB_STAR * NEXT +000037D6= 44 02 8549 dc.b 'D',2 +000037D8= 0054 8550 dc.w KEY_DATA-TAB_STAR * DATA +000037DA= 49 03 8551 dc.b 'I',3 +000037DC= 009E 8552 dc.w KEY_INPUT-TAB_STAR * INPUT +000037DE= 44 01 8553 dc.b 'D',1 +000037E0= 0063 8554 dc.w KEY_DIM-TAB_STAR * DIM +000037E2= 52 02 8555 dc.b 'R',2 +000037E4= 0114 8556 dc.w KEY_READ-TAB_STAR * READ +000037E6= 4C 01 8557 dc.b 'L',1 +000037E8= 00BE 8558 dc.w KEY_LET-TAB_STAR * LET +000037EA= 44 01 8559 dc.b 'D',1 +000037EC= 0058 8560 dc.w KEY_DEC-TAB_STAR * DEC +000037EE= 47 02 8561 dc.b 'G',2 +000037F0= 0089 8562 dc.w KEY_GOTO-TAB_STAR * GOTO +000037F2= 52 01 8563 dc.b 'R',1 +000037F4= 0133 8564 dc.w KEY_RUN-TAB_STAR * RUN +000037F6= 49 00 8565 dc.b 'I',0 +000037F8= 0099 8566 dc.w KEY_IF-TAB_STAR * IF +000037FA= 52 05 8567 dc.b 'R',5 +000037FC= 011B 8568 dc.w KEY_RESTORE-TAB_STAR * RESTORE +000037FE= 47 03 8569 dc.b 'G',3 +00003800= 008D 8570 dc.w KEY_GOSUB-TAB_STAR * GOSUB +00003802= 52 04 8571 dc.b 'R',4 +00003804= 0122 8572 dc.w KEY_RETURN-TAB_STAR * RETURN +00003806= 52 01 8573 dc.b 'R',1 +00003808= 0118 8574 dc.w KEY_REM-TAB_STAR * REM +0000380A= 53 02 8575 dc.b 'S',2 +0000380C= 0154 8576 dc.w KEY_STOP-TAB_STAR * STOP +0000380E= 4F 00 8577 dc.b 'O',0 +00003810= 00F3 8578 dc.w KEY_ON-TAB_STAR * ON +00003812= 4E 02 8579 dc.b 'N',2 +00003814= 00EE 8580 dc.w KEY_NULL-TAB_STAR * NULL +00003816= 49 01 8581 dc.b 'I',1 +00003818= 009B 8582 dc.w KEY_INC-TAB_STAR * INC +0000381A= 57 02 8583 dc.b 'W',2 +0000381C= 019A 8584 dc.w KEY_WAIT-TAB_STAR * WAIT +0000381E= 4C 02 8585 dc.b 'L',2 +00003820= 00C5 8586 dc.w KEY_LOAD-TAB_STAR * LOAD +00003822= 53 02 8587 dc.b 'S',2 +00003824= 013C 8588 dc.w KEY_SAVE-TAB_STAR * SAVE +00003826= 44 01 8589 dc.b 'D',1 +00003828= 0060 8590 dc.w KEY_DEF-TAB_STAR * DEF +0000382A= 50 02 8591 dc.b 'P',2 +0000382C= 00FF 8592 dc.w KEY_POKE-TAB_STAR * POKE +0000382E= 44 02 8593 dc.b 'D',2 +00003830= 0066 8594 dc.w KEY_DOKE-TAB_STAR * DOKE +00003832= 4C 02 8595 dc.b 'L',2 +00003834= 00CD 8596 dc.w KEY_LOKE-TAB_STAR * LOKE +00003836= 43 02 8597 dc.b 'C',2 +00003838= 003D 8598 dc.w KEY_CALL-TAB_STAR * CALL +0000383A= 44 00 8599 dc.b 'D',0 +0000383C= 006A 8600 dc.w KEY_DO-TAB_STAR * DO +0000383E= 4C 02 8601 dc.b 'L',2 +00003840= 00D1 8602 dc.w KEY_LOOP-TAB_STAR * LOOP +00003842= 50 03 8603 dc.b 'P',3 +00003844= 0107 8604 dc.w KEY_PRINT-TAB_STAR * PRINT +00003846= 43 02 8605 dc.b 'C',2 +00003848= 004B 8606 dc.w KEY_CONT-TAB_STAR * CONT +0000384A= 4C 02 8607 dc.b 'L',2 +0000384C= 00C1 8608 dc.w KEY_LIST-TAB_STAR * LIST +0000384E= 43 03 8609 dc.b 'C',3 +00003850= 0046 8610 dc.w KEY_CLEAR-TAB_STAR * CLEAR +00003852= 4E 01 8611 dc.b 'N',1 +00003854= 00E4 8612 dc.w KEY_NEW-TAB_STAR * NEW +00003856= 57 03 8613 dc.b 'W',3 +00003858= 01A3 8614 dc.w KEY_WIDTH-TAB_STAR * WIDTH +0000385A= 47 01 8615 dc.b 'G',1 +0000385C= 0086 8616 dc.w KEY_GET-TAB_STAR * GET +0000385E= 53 02 8617 dc.b 'S',2 +00003860= 015D 8618 dc.w KEY_SWAP-TAB_STAR * SWAP +00003862= 42 04 8619 dc.b 'B',4 +00003864= 002F 8620 dc.w KEY_BITSET-TAB_STAR * BITSET +00003866= 42 04 8621 dc.b 'B',4 +00003868= 0029 8622 dc.w KEY_BITCLR-TAB_STAR * BITCLR +0000386A= 54 02 8623 dc.b 'T',2 +0000386C= 0162 8624 dc.w KEY_TAB-TAB_STAR * TAB( +0000386E= 45 02 8625 dc.b 'E',2 +00003870= 006D 8626 dc.w KEY_ELSE-TAB_STAR * ELSE +00003872= 54 00 8627 dc.b 'T',0 +00003874= 016E 8628 dc.w KEY_TO-TAB_STAR * TO +00003876= 46 00 8629 dc.b 'F',0 +00003878= 007F 8630 dc.w KEY_FN-TAB_STAR * FN +0000387A= 53 02 8631 dc.b 'S',2 +0000387C= 0148 8632 dc.w KEY_SPC-TAB_STAR * SPC( +0000387E= 54 02 8633 dc.b 'T',2 +00003880= 016A 8634 dc.w KEY_THEN-TAB_STAR * THEN +00003882= 4E 01 8635 dc.b 'N',1 +00003884= 00EB 8636 dc.w KEY_NOT-TAB_STAR * NOT +00003886= 53 02 8637 dc.b 'S',2 +00003888= 0150 8638 dc.w KEY_STEP-TAB_STAR * STEP +0000388A= 55 03 8639 dc.b 'U',3 +0000388C= 017D 8640 dc.w KEY_UNTIL-TAB_STAR * UNTIL +0000388E= 57 03 8641 dc.b 'W',3 +00003890= 019E 8642 dc.w KEY_WHILE-TAB_STAR * WHILE +00003892 8643 +00003892= 2B FF 8644 dc.b '+',-1 +00003894= 0002 8645 dc.w KEY_PLUS-TAB_STAR * + +00003896= 2D FF 8646 dc.b '-',-1 +00003898= 0004 8647 dc.w KEY_MINUS-TAB_STAR * - +0000389A= 2A FF 8648 dc.b '*',-1 +0000389C= 0000 8649 dc.w KEY_MULT-TAB_STAR * * +0000389E= 2F FF 8650 dc.b '/',-1 +000038A0= 0006 8651 dc.w KEY_DIV-TAB_STAR * / +000038A2= 5E FF 8652 dc.b '^',-1 +000038A4= 01A9 8653 dc.w KEY_POWER-TAB_STAR * ^ +000038A6= 41 01 8654 dc.b 'A',1 +000038A8= 0018 8655 dc.w KEY_AND-TAB_STAR * AND +000038AA= 45 01 8656 dc.b 'E',1 +000038AC= 0074 8657 dc.w KEY_EOR-TAB_STAR * EOR +000038AE= 4F 00 8658 dc.b 'O',0 +000038B0= 00F5 8659 dc.w KEY_OR-TAB_STAR * OR +000038B2= 3E 00 8660 dc.b '>',0 +000038B4= 000E 8661 dc.w KEY_RSHIFT-TAB_STAR * >> +000038B6= 3C 00 8662 dc.b '<',0 +000038B8= 0008 8663 dc.w KEY_LSHIFT-TAB_STAR * << +000038BA= 3E FF 8664 dc.b '>',-1 +000038BC= 0010 8665 dc.w KEY_GT-TAB_STAR * > +000038BE= 3D FF 8666 dc.b '=',-1 +000038C0= 000C 8667 dc.w KEY_EQUAL-TAB_STAR * = +000038C2= 3C FF 8668 dc.b '<',-1 +000038C4= 000A 8669 dc.w KEY_LT-TAB_STAR * < +000038C6 8670 +000038C6= 53 02 8671 dc.b 'S',2 +000038C8= 0140 8672 dc.w KEY_SGN-TAB_STAR * SGN( +000038CA= 49 02 8673 dc.b 'I',2 +000038CC= 00A3 8674 dc.w KEY_INT-TAB_STAR * INT( +000038CE= 41 02 8675 dc.b 'A',2 +000038D0= 0014 8676 dc.w KEY_ABS-TAB_STAR * ABS( +000038D2= 55 02 8677 dc.b 'U',2 +000038D4= 0189 8678 dc.w KEY_USR-TAB_STAR * USR( +000038D6= 46 02 8679 dc.b 'F',2 +000038D8= 0081 8680 dc.w KEY_FRE-TAB_STAR * FRE( +000038DA= 50 02 8681 dc.b 'P',2 +000038DC= 0103 8682 dc.w KEY_POS-TAB_STAR * POS( +000038DE= 53 02 8683 dc.b 'S',2 +000038E0= 014C 8684 dc.w KEY_SQR-TAB_STAR * SQR( +000038E2= 52 02 8685 dc.b 'R',2 +000038E4= 012F 8686 dc.w KEY_RND-TAB_STAR * RND( +000038E6= 4C 02 8687 dc.b 'L',2 +000038E8= 00C9 8688 dc.w KEY_LOG-TAB_STAR * LOG( +000038EA= 45 02 8689 dc.b 'E',2 +000038EC= 0077 8690 dc.w KEY_EXP-TAB_STAR * EXP( +000038EE= 43 02 8691 dc.b 'C',2 +000038F0= 004F 8692 dc.w KEY_COS-TAB_STAR * COS( +000038F2= 53 02 8693 dc.b 'S',2 +000038F4= 0144 8694 dc.w KEY_SIN-TAB_STAR * SIN( +000038F6= 54 02 8695 dc.b 'T',2 +000038F8= 0166 8696 dc.w KEY_TAN-TAB_STAR * TAN( +000038FA= 41 02 8697 dc.b 'A',2 +000038FC= 001F 8698 dc.w KEY_ATN-TAB_STAR * ATN( +000038FE= 50 03 8699 dc.b 'P',3 +00003900= 00F8 8700 dc.w KEY_PEEK-TAB_STAR * PEEK( +00003902= 44 03 8701 dc.b 'D',3 +00003904= 005B 8702 dc.w KEY_DEEK-TAB_STAR * DEEK( +00003906= 4C 03 8703 dc.b 'L',3 +00003908= 00AF 8704 dc.w KEY_LEEK-TAB_STAR * LEEK( +0000390A= 4C 02 8705 dc.b 'L',2 +0000390C= 00BA 8706 dc.w KEY_LEN-TAB_STAR * LEN( +0000390E= 53 03 8707 dc.b 'S',3 +00003910= 0158 8708 dc.w KEY_STRS-TAB_STAR * STR$( +00003912= 56 02 8709 dc.b 'V',2 +00003914= 018E 8710 dc.w KEY_VAL-TAB_STAR * VAL( +00003916= 41 02 8711 dc.b 'A',2 +00003918= 001B 8712 dc.w KEY_ASC-TAB_STAR * ASC( +0000391A= 55 05 8713 dc.b 'U',5 +0000391C= 0176 8714 dc.w KEY_UCASES-TAB_STAR * UCASE$( +0000391E= 4C 05 8715 dc.b 'L',5 +00003920= 00A8 8716 dc.w KEY_LCASES-TAB_STAR * LCASE$( +00003922= 43 03 8717 dc.b 'C',3 +00003924= 0041 8718 dc.w KEY_CHRS-TAB_STAR * CHR$( +00003926= 48 03 8719 dc.b 'H',3 +00003928= 0093 8720 dc.w KEY_HEXS-TAB_STAR * HEX$( +0000392A= 42 03 8721 dc.b 'B',3 +0000392C= 0024 8722 dc.w KEY_BINS-TAB_STAR * BIN$( +0000392E= 42 05 8723 dc.b 'B',5 +00003930= 0035 8724 dc.w KEY_BITTST-TAB_STAR * BITTST( +00003932= 4D 02 8725 dc.b 'M',2 +00003934= 00D6 8726 dc.w KEY_MAX-TAB_STAR * MAX( +00003936= 4D 02 8727 dc.b 'M',2 +00003938= 00DF 8728 dc.w KEY_MIN-TAB_STAR * MIN( +0000393A= 52 05 8729 dc.b 'R',5 +0000393C= 010D 8730 dc.w KEY_RAM-TAB_STAR * RAMBASE +0000393E= 50 00 8731 dc.b 'P',0 +00003940= 00FD 8732 dc.w KEY_PI-TAB_STAR * PI +00003942= 54 03 8733 dc.b 'T',3 +00003944= 0170 8734 dc.w KEY_TWOPI-TAB_STAR * TWOPI +00003946= 56 05 8735 dc.b 'V',5 +00003948= 0192 8736 dc.w KEY_VPTR-TAB_STAR * VARPTR( +0000394A= 53 03 8737 dc.b 'S',3 +0000394C= 0137 8738 dc.w KEY_SADD-TAB_STAR * SADD( +0000394E= 4C 04 8739 dc.b 'L',4 +00003950= 00B4 8740 dc.w KEY_LEFTS-TAB_STAR * LEFT$( +00003952= 52 05 8741 dc.b 'R',5 +00003954= 0128 8742 dc.w KEY_RIGHTS-TAB_STAR * RIGHT$( +00003956= 4D 03 8743 dc.b 'M',3 +00003958= 00DA 8744 dc.w KEY_MIDS-TAB_STAR * MID$( +0000395A= 55 05 8745 dc.b 'U',5 +0000395C= 0182 8746 dc.w KEY_USINGS-TAB_STAR * USING$( +0000395E 8747 +0000395E 8748 +0000395E 8749 ************************************************************************************* +0000395E 8750 * +0000395E 8751 * BASIC error messages +0000395E 8752 +0000395E 8753 LAB_BAER +0000395E= 0030 8754 dc.w LAB_NF-LAB_BAER * $00 NEXT without FOR +00003960= 0041 8755 dc.w LAB_SN-LAB_BAER * $02 syntax +00003962= 0048 8756 dc.w LAB_RG-LAB_BAER * $04 RETURN without GOSUB +00003964= 005D 8757 dc.w LAB_OD-LAB_BAER * $06 out of data +00003966= 0069 8758 dc.w LAB_FC-LAB_BAER * $08 function call +00003968= 0077 8759 dc.w LAB_OV-LAB_BAER * $0A overflow +0000396A= 0080 8760 dc.w LAB_OM-LAB_BAER * $0C out of memory +0000396C= 008E 8761 dc.w LAB_US-LAB_BAER * $0E undefined statement +0000396E= 00A2 8762 dc.w LAB_BS-LAB_BAER * $10 array bounds +00003970= 00AF 8763 dc.w LAB_DD-LAB_BAER * $12 double dimension array +00003972= 00C0 8764 dc.w LAB_D0-LAB_BAER * $14 divide by 0 +00003974= 00CF 8765 dc.w LAB_ID-LAB_BAER * $16 illegal direct +00003976= 00DE 8766 dc.w LAB_TM-LAB_BAER * $18 type mismatch +00003978= 00EC 8767 dc.w LAB_LS-LAB_BAER * $1A long string +0000397A= 00FC 8768 dc.w LAB_ST-LAB_BAER * $1C string too complex +0000397C= 010F 8769 dc.w LAB_CN-LAB_BAER * $1E continue error +0000397E= 011E 8770 dc.w LAB_UF-LAB_BAER * $20 undefined function +00003980= 0131 8771 dc.w LAB_LD-LAB_BAER * $22 LOOP without DO +00003982= 0141 8772 dc.w LAB_UV-LAB_BAER * $24 undefined variable +00003984= 0154 8773 dc.w LAB_UA-LAB_BAER * $26 undimensioned array +00003986= 0168 8774 dc.w LAB_WD-LAB_BAER * $28 wrong dimensions +00003988= 0179 8775 dc.w LAB_AD-LAB_BAER * $2A address +0000398A= 0181 8776 dc.w LAB_FO-LAB_BAER * $2C format +0000398C= 0188 8777 dc.w LAB_NI-LAB_BAER * $2E not implemented +0000398E 8778 +0000398E= 4E 45 58 54 20 77 ... 8779 LAB_NF dc.b 'NEXT without FOR',$00 +0000399F= 53 79 6E 74 61 78 00 8780 LAB_SN dc.b 'Syntax',$00 +000039A6= 52 45 54 55 52 4E ... 8781 LAB_RG dc.b 'RETURN without GOSUB',$00 +000039BB= 4F 75 74 20 6F 66 ... 8782 LAB_OD dc.b 'Out of DATA',$00 +000039C7= 46 75 6E 63 74 69 ... 8783 LAB_FC dc.b 'Function call',$00 +000039D5= 4F 76 65 72 66 6C ... 8784 LAB_OV dc.b 'Overflow',$00 +000039DE= 4F 75 74 20 6F 66 ... 8785 LAB_OM dc.b 'Out of memory',$00 +000039EC= 55 6E 64 65 66 69 ... 8786 LAB_US dc.b 'Undefined statement',$00 +00003A00= 41 72 72 61 79 20 ... 8787 LAB_BS dc.b 'Array bounds',$00 +00003A0D= 44 6F 75 62 6C 65 ... 8788 LAB_DD dc.b 'Double dimension',$00 +00003A1E= 44 69 76 69 64 65 ... 8789 LAB_D0 dc.b 'Divide by zero',$00 +00003A2D= 49 6C 6C 65 67 61 ... 8790 LAB_ID dc.b 'Illegal direct',$00 +00003A3C= 54 79 70 65 20 6D ... 8791 LAB_TM dc.b 'Type mismatch',$00 +00003A4A= 53 74 72 69 6E 67 ... 8792 LAB_LS dc.b 'String too long',$00 +00003A5A= 53 74 72 69 6E 67 ... 8793 LAB_ST dc.b 'String too complex',$00 +00003A6D= 43 61 6E 27 74 20 ... 8794 LAB_CN dc.b 'Can''t continue',$00 +00003A7C= 55 6E 64 65 66 69 ... 8795 LAB_UF dc.b 'Undefined function',$00 +00003A8F= 4C 4F 4F 50 20 77 ... 8796 LAB_LD dc.b 'LOOP without DO',$00 +00003A9F= 55 6E 64 65 66 69 ... 8797 LAB_UV dc.b 'Undefined variable',$00 +00003AB2= 55 6E 64 69 6D 65 ... 8798 LAB_UA dc.b 'Undimensioned array',$00 +00003AC6= 57 72 6F 6E 67 20 ... 8799 LAB_WD dc.b 'Wrong dimensions',$00 +00003AD7= 41 64 64 72 65 73 ... 8800 LAB_AD dc.b 'Address',$00 +00003ADF= 46 6F 72 6D 61 74 00 8801 LAB_FO dc.b 'Format',$00 +00003AE6= 4E 6F 74 20 69 6D ... 8802 LAB_NI dc.b 'Not implemented',$00 +00003AF6 8803 +00003AF6 8804 +00003AF6 8805 ************************************************************************************* +00003AF6 8806 * +00003AF6 8807 * keyword table for line (un)crunching +00003AF6 8808 +00003AF6 8809 * [keyword,token +00003AF6 8810 * [keyword,token]] +00003AF6 8811 * end marker (#$00) +00003AF6 8812 +00003AF6 8813 TAB_STAR +00003AF6 8814 KEY_MULT +00003AF6= B4 00 8815 dc.b TK_MULT,$00 * * +00003AF8 8816 TAB_PLUS +00003AF8 8817 KEY_PLUS +00003AF8= B2 00 8818 dc.b TK_PLUS,$00 * + +00003AFA 8819 TAB_MNUS +00003AFA 8820 KEY_MINUS +00003AFA= B3 00 8821 dc.b TK_MINUS,$00 * - +00003AFC 8822 TAB_SLAS +00003AFC 8823 KEY_DIV +00003AFC= B5 00 8824 dc.b TK_DIV,$00 * / +00003AFE 8825 TAB_LESS +00003AFE 8826 KEY_LSHIFT +00003AFE= 3C BB 8827 dc.b '<',TK_LSHIFT * << +00003B00 8828 KEY_LT +00003B00= BE 8829 dc.b TK_LT * < +00003B01= 00 8830 dc.b $00 +00003B02 8831 TAB_EQUL +00003B02 8832 KEY_EQUAL +00003B02= BD 00 8833 dc.b TK_EQUAL,$00 * = +00003B04 8834 TAB_MORE +00003B04 8835 KEY_RSHIFT +00003B04= 3E BA 8836 dc.b '>',TK_RSHIFT * >> +00003B06 8837 KEY_GT +00003B06= BC 8838 dc.b TK_GT * > +00003B07= 00 8839 dc.b $00 +00003B08 8840 TAB_QEST +00003B08= 9E 00 8841 dc.b TK_PRINT,$00 * ? +00003B0A 8842 TAB_ASCA +00003B0A 8843 KEY_ABS +00003B0A= 42 53 28 C1 8844 dc.b 'BS(',TK_ABS * ABS( +00003B0E 8845 KEY_AND +00003B0E= 4E 44 B7 8846 dc.b 'ND',TK_AND * AND +00003B11 8847 KEY_ASC +00003B11= 53 43 28 D3 8848 dc.b 'SC(',TK_ASC * ASC( +00003B15 8849 KEY_ATN +00003B15= 54 4E 28 CC 8850 dc.b 'TN(',TK_ATN * ATN( +00003B19= 00 8851 dc.b $00 +00003B1A 8852 TAB_ASCB +00003B1A 8853 KEY_BINS +00003B1A= 49 4E 24 28 D8 8854 dc.b 'IN$(',TK_BINS * BIN$( +00003B1F 8855 KEY_BITCLR +00003B1F= 49 54 43 4C 52 A7 8856 dc.b 'ITCLR',TK_BITCLR * BITCLR +00003B25 8857 KEY_BITSET +00003B25= 49 54 53 45 54 A6 8858 dc.b 'ITSET',TK_BITSET * BITSET +00003B2B 8859 KEY_BITTST +00003B2B= 49 54 54 53 54 28 D9 8860 dc.b 'ITTST(',TK_BITTST * BITTST( +00003B32= 00 8861 dc.b $00 +00003B33 8862 TAB_ASCC +00003B33 8863 KEY_CALL +00003B33= 41 4C 4C 9B 8864 dc.b 'ALL',TK_CALL * CALL +00003B37 8865 KEY_CHRS +00003B37= 48 52 24 28 D6 8866 dc.b 'HR$(',TK_CHRS * CHR$( +00003B3C 8867 KEY_CLEAR +00003B3C= 4C 45 41 52 A1 8868 dc.b 'LEAR',TK_CLEAR * CLEAR +00003B41 8869 KEY_CONT +00003B41= 4F 4E 54 9F 8870 dc.b 'ONT',TK_CONT * CONT +00003B45 8871 KEY_COS +00003B45= 4F 53 28 C9 8872 dc.b 'OS(',TK_COS * COS( +00003B49= 00 8873 dc.b $00 +00003B4A 8874 TAB_ASCD +00003B4A 8875 KEY_DATA +00003B4A= 41 54 41 83 8876 dc.b 'ATA',TK_DATA * DATA +00003B4E 8877 KEY_DEC +00003B4E= 45 43 88 8878 dc.b 'EC',TK_DEC * DEC +00003B51 8879 KEY_DEEK +00003B51= 45 45 4B 28 CE 8880 dc.b 'EEK(',TK_DEEK * DEEK( +00003B56 8881 KEY_DEF +00003B56= 45 46 97 8882 dc.b 'EF',TK_DEF * DEF +00003B59 8883 KEY_DIM +00003B59= 49 4D 85 8884 dc.b 'IM',TK_DIM * DIM +00003B5C 8885 KEY_DOKE +00003B5C= 4F 4B 45 99 8886 dc.b 'OKE',TK_DOKE * DOKE +00003B60 8887 KEY_DO +00003B60= 4F 9C 8888 dc.b 'O',TK_DO * DO +00003B62= 00 8889 dc.b $00 +00003B63 8890 TAB_ASCE +00003B63 8891 KEY_ELSE +00003B63= 4C 53 45 A9 8892 dc.b 'LSE',TK_ELSE * ELSE +00003B67 8893 KEY_END +00003B67= 4E 44 80 8894 dc.b 'ND',TK_END * END +00003B6A 8895 KEY_EOR +00003B6A= 4F 52 B8 8896 dc.b 'OR',TK_EOR * EOR +00003B6D 8897 KEY_EXP +00003B6D= 58 50 28 C8 8898 dc.b 'XP(',TK_EXP * EXP( +00003B71= 00 8899 dc.b $00 +00003B72 8900 TAB_ASCF +00003B72 8901 KEY_FOR +00003B72= 4F 52 81 8902 dc.b 'OR',TK_FOR * FOR +00003B75 8903 KEY_FN +00003B75= 4E AB 8904 dc.b 'N',TK_FN * FN +00003B77 8905 KEY_FRE +00003B77= 52 45 28 C3 8906 dc.b 'RE(',TK_FRE * FRE( +00003B7B= 00 8907 dc.b $00 +00003B7C 8908 TAB_ASCG +00003B7C 8909 KEY_GET +00003B7C= 45 54 A4 8910 dc.b 'ET',TK_GET * GET +00003B7F 8911 KEY_GOTO +00003B7F= 4F 54 4F 89 8912 dc.b 'OTO',TK_GOTO * GOTO +00003B83 8913 KEY_GOSUB +00003B83= 4F 53 55 42 8D 8914 dc.b 'OSUB',TK_GOSUB * GOSUB +00003B88= 00 8915 dc.b $00 +00003B89 8916 TAB_ASCH +00003B89 8917 KEY_HEXS +00003B89= 45 58 24 28 D7 00 8918 dc.b 'EX$(',TK_HEXS,$00 * HEX$( +00003B8F 8919 TAB_ASCI +00003B8F 8920 KEY_IF +00003B8F= 46 8B 8921 dc.b 'F',TK_IF * IF +00003B91 8922 KEY_INC +00003B91= 4E 43 93 8923 dc.b 'NC',TK_INC * INC +00003B94 8924 KEY_INPUT +00003B94= 4E 50 55 54 84 8925 dc.b 'NPUT',TK_INPUT * INPUT +00003B99 8926 KEY_INT +00003B99= 4E 54 28 C0 8927 dc.b 'NT(',TK_INT * INT( +00003B9D= 00 8928 dc.b $00 +00003B9E 8929 TAB_ASCL +00003B9E 8930 KEY_LCASES +00003B9E= 43 41 53 45 24 28 D5 8931 dc.b 'CASE$(',TK_LCASES * LCASE$( +00003BA5 8932 KEY_LEEK +00003BA5= 45 45 4B 28 CF 8933 dc.b 'EEK(',TK_LEEK * LEEK( +00003BAA 8934 KEY_LEFTS +00003BAA= 45 46 54 24 28 E1 8935 dc.b 'EFT$(',TK_LEFTS * LEFT$( +00003BB0 8936 KEY_LEN +00003BB0= 45 4E 28 D0 8937 dc.b 'EN(',TK_LEN * LEN( +00003BB4 8938 KEY_LET +00003BB4= 45 54 87 8939 dc.b 'ET',TK_LET * LET +00003BB7 8940 KEY_LIST +00003BB7= 49 53 54 A0 8941 dc.b 'IST',TK_LIST * LIST +00003BBB 8942 KEY_LOAD +00003BBB= 4F 41 44 95 8943 dc.b 'OAD',TK_LOAD * LOAD +00003BBF 8944 KEY_LOG +00003BBF= 4F 47 28 C7 8945 dc.b 'OG(',TK_LOG * LOG( +00003BC3 8946 KEY_LOKE +00003BC3= 4F 4B 45 9A 8947 dc.b 'OKE',TK_LOKE * LOKE +00003BC7 8948 KEY_LOOP +00003BC7= 4F 4F 50 9D 8949 dc.b 'OOP',TK_LOOP * LOOP +00003BCB= 00 8950 dc.b $00 +00003BCC 8951 TAB_ASCM +00003BCC 8952 KEY_MAX +00003BCC= 41 58 28 DA 8953 dc.b 'AX(',TK_MAX * MAX( +00003BD0 8954 KEY_MIDS +00003BD0= 49 44 24 28 E3 8955 dc.b 'ID$(',TK_MIDS * MID$( +00003BD5 8956 KEY_MIN +00003BD5= 49 4E 28 DB 8957 dc.b 'IN(',TK_MIN * MIN( +00003BD9= 00 8958 dc.b $00 +00003BDA 8959 TAB_ASCN +00003BDA 8960 KEY_NEW +00003BDA= 45 57 A2 8961 dc.b 'EW',TK_NEW * NEW +00003BDD 8962 KEY_NEXT +00003BDD= 45 58 54 82 8963 dc.b 'EXT',TK_NEXT * NEXT +00003BE1 8964 KEY_NOT +00003BE1= 4F 54 AE 8965 dc.b 'OT',TK_NOT * NOT +00003BE4 8966 KEY_NULL +00003BE4= 55 4C 4C 92 8967 dc.b 'ULL',TK_NULL * NULL +00003BE8= 00 8968 dc.b $00 +00003BE9 8969 TAB_ASCO +00003BE9 8970 KEY_ON +00003BE9= 4E 91 8971 dc.b 'N',TK_ON * ON +00003BEB 8972 KEY_OR +00003BEB= 52 B9 8973 dc.b 'R',TK_OR * OR +00003BED= 00 8974 dc.b $00 +00003BEE 8975 TAB_ASCP +00003BEE 8976 KEY_PEEK +00003BEE= 45 45 4B 28 CD 8977 dc.b 'EEK(',TK_PEEK * PEEK( +00003BF3 8978 KEY_PI +00003BF3= 49 DD 8979 dc.b 'I',TK_PI * PI +00003BF5 8980 KEY_POKE +00003BF5= 4F 4B 45 98 8981 dc.b 'OKE',TK_POKE * POKE +00003BF9 8982 KEY_POS +00003BF9= 4F 53 28 C4 8983 dc.b 'OS(',TK_POS * POS( +00003BFD 8984 KEY_PRINT +00003BFD= 52 49 4E 54 9E 8985 dc.b 'RINT',TK_PRINT * PRINT +00003C02= 00 8986 dc.b $00 +00003C03 8987 TAB_ASCR +00003C03 8988 KEY_RAM +00003C03= 41 4D 42 41 53 45 DC 8989 dc.b 'AMBASE',TK_RAM * RAMBASE +00003C0A 8990 KEY_READ +00003C0A= 45 41 44 86 8991 dc.b 'EAD',TK_READ * READ +00003C0E 8992 KEY_REM +00003C0E= 45 4D 8F 8993 dc.b 'EM',TK_REM * REM +00003C11 8994 KEY_RESTORE +00003C11= 45 53 54 4F 52 45 8C 8995 dc.b 'ESTORE',TK_RESTORE * RESTORE +00003C18 8996 KEY_RETURN +00003C18= 45 54 55 52 4E 8E 8997 dc.b 'ETURN',TK_RETURN * RETURN +00003C1E 8998 KEY_RIGHTS +00003C1E= 49 47 48 54 24 28 E2 8999 dc.b 'IGHT$(',TK_RIGHTS * RIGHT$( +00003C25 9000 KEY_RND +00003C25= 4E 44 28 C6 9001 dc.b 'ND(',TK_RND * RND( +00003C29 9002 KEY_RUN +00003C29= 55 4E 8A 9003 dc.b 'UN',TK_RUN * RUN +00003C2C= 00 9004 dc.b $00 +00003C2D 9005 TAB_ASCS +00003C2D 9006 KEY_SADD +00003C2D= 41 44 44 28 E0 9007 dc.b 'ADD(',TK_SADD * SADD( +00003C32 9008 KEY_SAVE +00003C32= 41 56 45 96 9009 dc.b 'AVE',TK_SAVE * SAVE +00003C36 9010 KEY_SGN +00003C36= 47 4E 28 BF 9011 dc.b 'GN(',TK_SGN * SGN( +00003C3A 9012 KEY_SIN +00003C3A= 49 4E 28 CA 9013 dc.b 'IN(',TK_SIN * SIN( +00003C3E 9014 KEY_SPC +00003C3E= 50 43 28 AC 9015 dc.b 'PC(',TK_SPC * SPC( +00003C42 9016 KEY_SQR +00003C42= 51 52 28 C5 9017 dc.b 'QR(',TK_SQR * SQR( +00003C46 9018 KEY_STEP +00003C46= 54 45 50 AF 9019 dc.b 'TEP',TK_STEP * STEP +00003C4A 9020 KEY_STOP +00003C4A= 54 4F 50 90 9021 dc.b 'TOP',TK_STOP * STOP +00003C4E 9022 KEY_STRS +00003C4E= 54 52 24 28 D1 9023 dc.b 'TR$(',TK_STRS * STR$( +00003C53 9024 KEY_SWAP +00003C53= 57 41 50 A5 9025 dc.b 'WAP',TK_SWAP * SWAP +00003C57= 00 9026 dc.b $00 +00003C58 9027 TAB_ASCT +00003C58 9028 KEY_TAB +00003C58= 41 42 28 A8 9029 dc.b 'AB(',TK_TAB * TAB( +00003C5C 9030 KEY_TAN +00003C5C= 41 4E 28 CB 9031 dc.b 'AN(',TK_TAN * TAN +00003C60 9032 KEY_THEN +00003C60= 48 45 4E AD 9033 dc.b 'HEN',TK_THEN * THEN +00003C64 9034 KEY_TO +00003C64= 4F AA 9035 dc.b 'O',TK_TO * TO +00003C66 9036 KEY_TWOPI +00003C66= 57 4F 50 49 DE 9037 dc.b 'WOPI',TK_TWOPI * TWOPI +00003C6B= 00 9038 dc.b $00 +00003C6C 9039 TAB_ASCU +00003C6C 9040 KEY_UCASES +00003C6C= 43 41 53 45 24 28 D4 9041 dc.b 'CASE$(',TK_UCASES * UCASE$( +00003C73 9042 KEY_UNTIL +00003C73= 4E 54 49 4C B0 9043 dc.b 'NTIL',TK_UNTIL * UNTIL +00003C78 9044 KEY_USINGS +00003C78= 53 49 4E 47 24 28 E4 9045 dc.b 'SING$(',TK_USINGS * USING$( +00003C7F 9046 KEY_USR +00003C7F= 53 52 28 C2 9047 dc.b 'SR(',TK_USR * USR( +00003C83= 00 9048 dc.b $00 +00003C84 9049 TAB_ASCV +00003C84 9050 KEY_VAL +00003C84= 41 4C 28 D2 9051 dc.b 'AL(',TK_VAL * VAL( +00003C88 9052 KEY_VPTR +00003C88= 41 52 50 54 52 28 DF 9053 dc.b 'ARPTR(',TK_VPTR * VARPTR( +00003C8F= 00 9054 dc.b $00 +00003C90 9055 TAB_ASCW +00003C90 9056 KEY_WAIT +00003C90= 41 49 54 94 9057 dc.b 'AIT',TK_WAIT * WAIT +00003C94 9058 KEY_WHILE +00003C94= 48 49 4C 45 B1 9059 dc.b 'HILE',TK_WHILE * WHILE +00003C99 9060 KEY_WIDTH +00003C99= 49 44 54 48 A3 9061 dc.b 'IDTH',TK_WIDTH * WIDTH +00003C9E= 00 9062 dc.b $00 +00003C9F 9063 TAB_POWR +00003C9F 9064 KEY_POWER +00003C9F= B6 00 9065 dc.b TK_POWER,$00 * ^ +00003CA1 9066 +00003CA1 9067 +00003CA1 9068 ************************************************************************************* +00003CA1 9069 * +00003CA1 9070 * just messages +00003CA1 9071 +00003CA1 9072 LAB_BMSG +00003CA1= 0D 0A 42 72 65 61 ... 9073 dc.b $0D,$0A,'Break',$00 +00003CA9 9074 LAB_EMSG +00003CA9= 20 45 72 72 6F 72 00 9075 dc.b ' Error',$00 +00003CB0 9076 LAB_LMSG +00003CB0= 20 69 6E 20 6C 69 ... 9077 dc.b ' in line ',$00 +00003CBA 9078 LAB_IMSG +00003CBA= 45 78 74 72 61 20 ... 9079 dc.b 'Extra ignored',$0D,$0A,$00 +00003CCA 9080 LAB_REDO +00003CCA= 52 65 64 6F 20 66 ... 9081 dc.b 'Redo from start',$0D,$0A,$00 +00003CDC 9082 LAB_RMSG +00003CDC= 0D 0A 52 65 61 64 ... 9083 dc.b $0D,$0A,'Ready',$0D,$0A,$00 +00003CE6 9084 LAB_SMSG +00003CE6= 20 42 79 74 65 73 ... 9085 dc.b ' Bytes free',$0D,$0A,$0A +00003CF4= 45 6E 68 61 6E 63 ... 9086 dc.b 'Enhanced 68k BASIC Version 3.52',$0D,$0A,$00 +00003D16 9087 +00003D16 9088 +00003D16 9089 ************************************************************************************* +00003D16 9090 * EhBASIC keywords quick reference list * +00003D16 9091 ************************************************************************************* +00003D16 9092 +00003D16 9093 * glossary +00003D16 9094 +00003D16 9095 * <.> required +00003D16 9096 * {.|.} one of required +00003D16 9097 * [.] optional +00003D16 9098 * ... may repeat as last +00003D16 9099 +00003D16 9100 * any = anything +00003D16 9101 * num = number +00003D16 9102 * state = statement +00003D16 9103 * n = positive integer +00003D16 9104 * str = string +00003D16 9105 * var = variable +00003D16 9106 * nvar = numeric variable +00003D16 9107 * svar = string variable +00003D16 9108 * expr = expression +00003D16 9109 * nexpr = numeric expression +00003D16 9110 * sexpr = string expression +00003D16 9111 +00003D16 9112 * statement separator +00003D16 9113 +00003D16 9114 * : . [] : [] * done +00003D16 9115 +00003D16 9116 * number bases +00003D16 9117 +00003D16 9118 * % . % * done +00003D16 9119 * $ . $ * done +00003D16 9120 +00003D16 9121 * commands +00003D16 9122 +00003D16 9123 * END . END * done +00003D16 9124 * FOR . FOR = TO [STEP ] * done +00003D16 9125 * NEXT . NEXT [[,]...] * done +00003D16 9126 * DATA . DATA [{num|["]str["]}[,{num|["]str["]}]...] * done +00003D16 9127 * INPUT . INPUT [<">str<">;] [,[,]...] * done +00003D16 9128 * DIM . DIM ([,[,]]) * done +00003D16 9129 * READ . READ [,[,]...] * done +00003D16 9130 * LET . [LET] = * done +00003D16 9131 * DEC . DEC [,[,]...] * done +00003D16 9132 * GOTO . GOTO * done +00003D16 9133 * RUN . RUN [] * done +00003D16 9134 * IF . IF {GOTO|THEN<{n|comm}>}[ELSE <{n|comm}>] * done +00003D16 9135 * RESTORE . RESTORE [] * done +00003D16 9136 * GOSUB . GOSUB * done +00003D16 9137 * RETURN . RETURN * done +00003D16 9138 * REM . REM [] * done +00003D16 9139 * STOP . STOP * done +00003D16 9140 * ON . ON {GOTO|GOSUB}[,[,]...] * done +00003D16 9141 * NULL . NULL * done +00003D16 9142 * INC . INC [,[,]...] * done +00003D16 9143 * WAIT . WAIT ,[,] * done +00003D16 9144 * LOAD . LOAD [] * done for sim +00003D16 9145 * SAVE . SAVE [][,[][-]] * done for sim +00003D16 9146 * DEF . DEF FN()= * done +00003D16 9147 * POKE . POKE , * done +00003D16 9148 * DOKE . DOKE , * done +00003D16 9149 * LOKE . LOKE , * done +00003D16 9150 * CALL . CALL * done +00003D16 9151 * DO . DO * done +00003D16 9152 * LOOP . LOOP [{WHILE|UNTIL}] * done +00003D16 9153 * PRINT . PRINT [{;|,}][][{;|,}[]...] * done +00003D16 9154 * CONT . CONT * done +00003D16 9155 * LIST . LIST [][-] * done +00003D16 9156 * CLEAR . CLEAR * done +00003D16 9157 * NEW . NEW * done +00003D16 9158 * WIDTH . WIDTH [][,] * done +00003D16 9159 * GET . GET * done +00003D16 9160 * SWAP . SWAP , * done +00003D16 9161 * BITSET . BITSET , * done +00003D16 9162 * BITCLR . BITCLR , * done +00003D16 9163 +00003D16 9164 * sub commands (may not start a statement) +00003D16 9165 +00003D16 9166 * TAB . TAB() * done +00003D16 9167 * ELSE . IF {GOTO|THEN<{n|comm}>}[ELSE <{n|comm}>] * done +00003D16 9168 * TO . FOR = TO [STEP ] * done +00003D16 9169 * FN . FN () * done +00003D16 9170 * SPC . SPC() * done +00003D16 9171 * THEN . IF {THEN <{n|comm}>|GOTO } * done +00003D16 9172 * NOT . NOT * done +00003D16 9173 * STEP . FOR = TO [STEP ] * done +00003D16 9174 * UNTIL . LOOP [{WHILE|UNTIL}] * done +00003D16 9175 * WHILE . LOOP [{WHILE|UNTIL}] * done +00003D16 9176 +00003D16 9177 * operators +00003D16 9178 +00003D16 9179 * + . [expr] + * done +00003D16 9180 * - . [nexpr] - * done +00003D16 9181 * * . * * done fast hardware +00003D16 9182 * / . / * done fast hardware +00003D16 9183 * ^ . ^ * done +00003D16 9184 * AND . AND * done +00003D16 9185 * EOR . EOR * done +00003D16 9186 * OR . OR * done +00003D16 9187 * >> . >> * done +00003D16 9188 * << . << * done +00003D16 9189 +00003D16 9190 * compare functions +00003D16 9191 +00003D16 9192 * < . < * done +00003D16 9193 * = . = * done +00003D16 9194 * > . > * done +00003D16 9195 +00003D16 9196 * functions +00003D16 9197 +00003D16 9198 * SGN . SGN() * done +00003D16 9199 * INT . INT() * done +00003D16 9200 * ABS . ABS() * done +00003D16 9201 * USR . USR() * done +00003D16 9202 * FRE . FRE() * done +00003D16 9203 * POS . POS() * done +00003D16 9204 * SQR . SQR() * done fast shift/sub +00003D16 9205 * RND . RND() * done 32 bit PRNG +00003D16 9206 * LOG . LOG() * done fast cordic +00003D16 9207 * EXP . EXP() * done fast cordic +00003D16 9208 * COS . COS() * done fast cordic +00003D16 9209 * SIN . SIN() * done fast cordic +00003D16 9210 * TAN . TAN() * done fast cordic +00003D16 9211 * ATN . ATN() * done fast cordic +00003D16 9212 * PEEK . PEEK() * done +00003D16 9213 * DEEK . DEEK() * done +00003D16 9214 * LEEK . LEEK() * done +00003D16 9215 * LEN . LEN() * done +00003D16 9216 * STR$ . STR$() * done +00003D16 9217 * VAL . VAL() * done +00003D16 9218 * ASC . ASC() * done +00003D16 9219 * UCASE$ . UCASE$() * done +00003D16 9220 * LCASE$ . LCASE$() * done +00003D16 9221 * CHR$ . CHR$() * done +00003D16 9222 * HEX$ . HEX$() * done +00003D16 9223 * BIN$ . BIN$() * done +00003D16 9224 * BTST . BTST(,) * done +00003D16 9225 * MAX . MAX([,[,]...]) * done +00003D16 9226 * MIN . MIN([,[,]...]) * done +00003D16 9227 * PI . PI * done +00003D16 9228 * TWOPI . TWOPI * done +00003D16 9229 * VARPTR . VARPTR() * done +00003D16 9230 * SADD . SADD() * done +00003D16 9231 * LEFT$ . LEFT$(,) * done +00003D16 9232 * RIGHT$ . RIGHT$(,) * done +00003D16 9233 * MID$ . MID$(,[,]) * done +00003D16 9234 * USING$ . USING$(,[,]...]) * done +00003D16 9235 +00003D16 9236 +00003D16 9237 ************************************************************************************* +00003D16 9238 +00003D16 9239 END code_start No errors detected No warnings generated @@ -9254,72 +9252,72 @@ Symbol-name Value AC1GTAC2 22F0 ACIAC F00009 ACIAD F0000B -ASPTL E0C -ASRCH E3E -ASTRTL E10 -BHSEND E3A +ASPTL 5A8 +ASRCH 5DA +ASTRTL 5AC +BHSEND 5D6 BIN2DEC 32AA BINPR 2E90 -BINSS E1A -BLINEL CBA -BREAKF E40 -CCBYTE E4D -CCFLAG E4C -CCNULL E4E -CFLAG E45 -CLINEL CB6 +BINSS 5B6 +BLINEL 456 +BREAKF 5DC +CCBYTE 5E9 +CCFLAG 5E8 +CCNULL 5EA +CFLAG 5E1 +CLINEL 452 CODE_START 83E -COMP_F E47 -COSOUT E18 -CPNTRL CBE -CVARAL CD2 +COMP_F 5E3 +COSOUT 5B4 +CPNTRL 45A +CVARAL 46E D1X02 3284 D1X10 329A D1X16 3276 -DECSS E2A -DEFDIM E18 -DES_SK CF2 -DES_SK_E CDA -DIMCNT E3F -DLINEL CC2 +DECSS 5C6 +DEFDIM 5B4 +DES_SK 48E +DES_SK_E 476 +DIMCNT 5DB +DLINEL 45E DOCMP EFA DOREST EE6 -DPTRL CC6 -DTYPEF E19 -EARRYL CA6 -EMEML CAE +DPTRL 462 +DTYPEF 5B5 +EARRYL 442 +EMEML 44A ENDBHS 2E6A -EVEN E54 -EXPCNT E11 -EXPNEG E13 -FAC1_E DF8 -FAC1_M DF4 -FAC1_S DF9 -FAC2_E E00 -FAC2_M DFC -FAC2_S E01 -FAC_SC E02 +EVEN 5F0 +EXPCNT 5AD +EXPNEG 5AF +FAC1_E 594 +FAC1_M 590 +FAC1_S 595 +FAC2_E 59C +FAC2_M 598 +FAC2_S 59D +FAC_SC 59E FEND 8 -FILE_BYTE E4F -FILE_ID E50 -FLAG E03 +FILE_BYTE 5EB +FILE_ID 5EC +FLAG 59F FSD 0 FSDC A FSDPI 8 FSLI 6 FSTI 4 -FUNC_L E14 -GCLCTD E42 +FUNC_L 5B0 +GCLCTD 5DE GETFIRST 16CA GETPAIR 1786 GOPR 2E9A -HEXSS E32 -IBUFFE DF4 -IBUFFS CF4 -ICLIM E4B -IMODE E44 +HEXSS 5CE +IBUFFE 590 +IBUFFS 490 +ICLIM 5E7 +IMODE 5E0 INGET 2EEE -ITEMP C8E +ITEMP 42A KEY_ABS 3B0A KEY_AND 3B0E KEY_ASC 3B11 @@ -10112,7 +10110,7 @@ LAB_VALZ 1F62 LAB_VARCALL 3060 LAB_VARPTR 305E LAB_WAIT 2050 -LAB_WARM C64 +LAB_WARM 400 LAB_WD 3AC6 LAB_WDER 91E LAB_WDLP 2FE2 @@ -10123,7 +10121,7 @@ LAB_XGADW 1F96 LC_LOOP 1E92 LOOPALWAYS F00 LOOPDONE F14 -LVARPL CD6 +LVARPL 472 L_DDIV 2366 L_DIVRND 2314 MAINLOOP 29DE @@ -10142,19 +10140,19 @@ NOSTRING 1EDA NOT2BIG 177A NOUCASE 1EA4 NOVAR 0 -NULLCT E48 -NUMEXP E10 +NULLCT 5E4 +NUMEXP 5AC OFCHR 23 -OQUOTE E41 +OQUOTE 5DD OUTLOOP 29FE -PRG_STRT E54 -PRNLWORD E04 -PRSTK E3C +PRG_STRT 800 +PRNLWORD 5A0 +PRSTK 5D8 RAM_ADDR 4000 -RAM_BASE C64 +RAM_BASE 400 RAM_SIZE 4000 -RAM_STRT 64 -RDPTRL CCA +RAM_STRT 0 +RDPTRL 466 RDRF 0 RTS_001 15C4 RTS_005 C52 @@ -10176,17 +10174,17 @@ RTS_023 2FFA RTS_024 3246 RTS_025 32A8 RXNOTREADY 82C -SARRYL CA2 -SFNCL C96 -SMEML C92 -SSTORL CAA -SSTRL C9E +SARRYL 43E +SFNCL 432 +SMEML 42E +SSTORL 446 +SSTRL 43A SUBEXIT 2A08 SUBLOOP 29D6 -SUFNXF E43 -SUTILL CB2 -SVARL C9A -TABSIZ E46 +SUFNXF 5DF +SUTILL 44E +SVARL 436 +TABSIZ 5E2 TAB_ASCA 3B0A TAB_ASCB 3B1A TAB_ASCC 3B33 @@ -10323,29 +10321,29 @@ TK_WAIT 94 TK_WHILE B1 TK_WIDTH A3 TOOBIG 1780 -TPOS E49 -TPOWER E3D -TWIDTH E4A +TPOS 5E5 +TPOWER 5D9 +TWIDTH 5E6 UC_LOOP 1EC2 -USDSS E30 -USRJMP C6A -USRJPV C6C -UT1_PL E08 -VARNAME CCE +USDSS 5CC +USRJMP 406 +USRJPV 408 +UT1_PL 5A4 +VARNAME 46A VEC_CC 2EC8 VEC_IN 816 VEC_LD 832 VEC_OUT 804 VEC_SV 838 -V_CTLC C88 -V_CTLCV C8A -V_INPT C70 -V_INPTV C72 -V_LOAD C7C -V_LOADV C7E -V_OUTP C76 -V_OUTPV C78 -V_SAVE C82 -V_SAVEV C84 +V_CTLC 424 +V_CTLCV 426 +V_INPT 40C +V_INPTV 40E +V_LOAD 418 +V_LOADV 41A +V_OUTP 412 +V_OUTPV 414 +V_SAVE 41E +V_SAVEV 420 WEXIT 2FD2 -WRMJPV C66 +WRMJPV 402 diff --git a/roms/ehbasic/basic68k.S68 b/roms/ehbasic/basic68k.S68 index b5581dd..94d10c9 100644 --- a/roms/ehbasic/basic68k.S68 +++ b/roms/ehbasic/basic68k.S68 @@ -2,178 +2,178 @@ S021000036384B50524F47202020323043524541544544204259204541535936384B6D S12308006000003C0839000100F0000967F613C000F0000B4E750839000000F00009670C62 S1230820103900F0000B003C00014E75023C00FE4E757E2E6000013A7E2E6000013441F9AF S123084000F0000910BC0015207C00004000203C00004000B0BC000040006C0870051E3C53 -S123086000E44E4E2648D1C027480CAE4FEB0C64303C4EF9204F30C043FAFFDA20C930C021 +S123086000E44E4E2648D1C02748044A4FEB0400303C4EF9204F30C043FAFFDA20C930C0F9 S123088043FA00DC20C930C043FAFF8C20C930C043FAFF7220C930C043FAFF9820C930C08D -S12308A043FAFF9620C930C043FA261E20C9700017400E4817400E4917400E4C37400E52CC -S12308C037400E3A177C00500E4A177C000E0E46177C00380E4B49EB0CF241EB0E542748D2 -S12308E00C926100032261000898202B0CAE90AB0C9261001BCC41FA33EE610008E241FAC7 -S123090029D261001A6841FA009227480C6661001FD24EEB0C647E2C60567E2A60527E28EC +S12308A043FAFF9620C930C043FA261E20C97000174005E4174005E5174005E8374007FE6E +S12308C0374005D6177C005005E6177C000E05E2177C003805E749EB048E41EB080027484C +S12308E0042E6100032261000898202B044A90AB042E61001BCC41FA33EE610008E241FA0B +S123090029D261001A6841FA00922748040261001FD24EEB04007E2C60567E2A60527E28C4 S1230920604E7E26604A7E2460467E2260427E20603E7E1E603A7E1C60367E1A60327E18CB S1230940602E7E16602A7E1460267E1260227E10601E7E0E601A7E0C60167E0A60127E082B S1230960600E7E06600A7E0460067E0260027E00610002CA6100080A43FA2FE43E31700000 -S123098041F170006100085841FA331F61000850202B0CB66B0461001B1C41FA3340610087 -S12309A0083E72FF27410CB617410E404BEB0CF4610000EC61000BF467F665086100015647 -S12309C0600003C46100063A6100014A222B0C8E6100021865322250202B0C969089E288C4 -S12309E0538048402448484034D951C8FFFC484051C8FFF4274A0C96274A0C9A274A0C9EAA -S1230A00274A0CA2274A0CA6102B0CF46764226B0C9645F12008274A0C96274A0C9A274A62 -S1230A200C9E274A0CA2274A0CA6276B0CAE0CAA22099288E289538148414841352151C9BE -S1230A40FFFC484151C9FFF443EB0CF4244872FF24C124EB0C8EE24A534234D951CAFFFC84 +S123098041F170006100085841FA331F61000850202B04526B0461001B1C41FA33406100F3 +S12309A0083E72FF27410452174105DC4BEB0490610000EC61000BF467F66508610001568C +S12309C0600003C46100063A6100014A222B042A6100021865322250202B04329089E2889C +S12309E0538048402448484034D951C8FFFC484051C8FFF4274A0432274A0436274A043AEE +S1230A00274A043E274A0442102B04906764226B043245F12008274A0432274A0436274AEA +S1230A20043A274A043E274A0442276B044A044622099288E289538148414841352151C9DA +S1230A40FFFC484151C9FFF443EB0490244872FF24C124EB042AE24A534234D951CAFFFC5C S1230A60601050484A1866FC320802410001D0C1228822484A9066EA610001986000FF24DC S1230A806100077670206100077070086100076A534160106100076070206100075C720030 -S1230AA041EB0CF44EAB0C7064FA67F8B03C00076718B03C000D670006C24A416606B03C57 +S1230AA041EB04904EAB040C64FA67F8B03C00076718B03C000D670006C24A416606B03C2F S1230AC0002063E0B03C000867B6B27C00FF640C1180100052416100072060C8700760F650 S1230AE011802000524252411035100067000094B03C002067EAB03C0030654AB03C00397D -S1230B0063DE7ADFCA00BA3C00416540BA3C004663CE60387200240117410E417000103599 -S1230B201000675EB03C005F6458B03C003C641CB03C0030644C17400E3EB03C00226776D3 -S1230B40B03C0024679AB03C002A6536082B00060E41662E0400002AD04043FA2C043031A7 +S1230B0063DE7ADFCA00BA3C00416540BA3C004663CE603872002401174105DD7000103506 +S1230B201000675EB03C005F6458B03C003C641CB03C0030644C174005DAB03C0022677640 +S1230B40B03C0024679AB03C002A6536082B000605DD662E0400002AD04043FA2C04303114 S1230B6000006B6E43FA2F90D2C076FF38015243103130006B0A5244B035400067F060402F -S1230B80320411802000524252414A00674A0400003A6706B03C0049660417400E41040054 -S1230BA000556600FF7817400E3E1035100067D2B02B0E3E67CC118020005242524160EA52 +S1230B80320411802000524252414A00674A0400003A6706B03C00496604174005DD0400C1 +S1230BA000556600FF78174005DA1035100067D2B02B05DA67CC118020005242524160EA2C S1230BC038015243103130006AF852431031300066A21035100060AA700001026706118092 -S1230BE020005242218020004E75206B0C926002204020186708B2906EF659484E7559487C -S1230C0053804E75664C206B0C92700020C027480C962A6B0C92534D276B0CAE0CAA202BDE -S1230C200C9627400C9A27400C9E27400CA227400CA6700017400E4E610001CE49EB0CF23D -S1230C40201F4FEB0C642F00700027400CBE17400E434E7567C24E75651272FF27410C8E96 +S1230BE020005242218020004E75206B042E6002204020186708B2906EF659484E755948E8 +S1230C0053804E75664C206B042E700020C0274804322A6B042E534D276B044A0446202BFA +S1230C200432274004362740043A2740043E274004427000174005EA610001CE49EB048E32 +S1230C40201F4FEB04002F0070002740045A174005DF4E7567C24E75651272FF2741042A47 S1230C6072004A00670AB03C00B366E6610003926100FF78610009346716B03C00B366D298 -S1230C8072FF27410C8E61000920670461000372177C00000E41610004E8201867B422402E -S1230CA06100012C2018B0AB0C8E62A648E700C06100180E4CDF030070206100053CB03CAB -S1230CC0002266060A2B00FF0E41101866082049200866BC4E756AE24A2B0E416BDC45FA5D +S1230C8072FF2741042A61000920670461000372177C000005DD610004E8201867B4224007 +S1230CA06100012C2018B0AB042A62A648E700C06100180E4CDF030070206100053CB03C17 +S1230CC0002266060A2B00FF05DD101866082049200866BC4E756AE24A2B05DD6BDC45FA37 S1230CE02AEA727FC200E54945F21000101A610005087200121A6BD2301245FA2DFA45F262 -S1230D000000101A610004F251C9FFF860BC61000390202B0CD6B0AB0C9E6C00FC22610010 -S1230D2002142E882F2B0CB670AA61000874610007021F2B0E19610006F82F2B0DF43F2BD1 -S1230D400DF8277C800000000DF4377C81000DF861000858B03C00AF66086100084C61004D -S1230D6006D02F2B0DF43F2B0DF82F2B0CD63F3C00816018300DC07C0001DAC0201D670067 -S1230D80FC1A275D0CB661000822611A61404A2B0CB66B04274D0CBE101D67D8B03C003AD6 +S1230D000000101A610004F251C9FFF860BC61000390202B0472B0AB043A6C00FC226100E8 +S1230D2002142E882F2B045270AA61000874610007021F2B05B5610006F82F2B05903F2B16 +S1230D400594277C800000000590377C8100059461000858B03C00AF66086100084C610091 +S1230D6006D02F2B05903F2B05942F2B04723F3C00816018300DC07C0001DAC0201D6700AB +S1230D80FC1A275D045261000822611A61404A2B04526B04274D045A101D67D8B03C003A1A S1230DA067E46000FBC66700008C0A0000806B0002F0B03C00286400FBB24880D04041FAB1 -S1230DC028683030000048700000600007DC4EEB0C88B03C0003670C4E7566FC177C00003D -S1230DE00E4066F443EB0DF4BBC9650A274D0CBE276B0CB60CBA584F102B0E406700FB9C9F -S1230E0041FA2E9F6000FB86206B0C926720610001F0B2AB0CB6630E204D4A1866FC3008EA -S1230E20C07C0001D0C06100FDCA6500FB264A2027480CC64E75610010DA17400E484E750A -S1230E406600FB284A2B0CB66A00FAE8202B0CBE6700FAE02A40276B0CBA0CB64E75660C73 -S1230E606100FDB0274D0CBE6000FF226100FDAA601C2F0D2F2B0CB63F3C009C487AFF0EDF -S1230E80600007282F0D2F2B0CB63F3C008D6100071A487AFEF861000168206B0C92B2ABD5 -S1230EA00CB6630E204D4A1866FC3008C07C0001D0C06100FD3E6500FA9A2A48534D274DAA -S1230EC00CBE4E750C6F009C00046600FA5E1E00672EBE3C003A6728040700B067085307AE -S1230EE06600FA887EFF610006C06100055C4A2B0DF86706177C00FF0DF8BF2B0DF86614B9 -S1230F00276F00060CB62A6F000A41FAFE802E88600006984FEF000E601466160C6F008D1B -S1230F2000046600FA425C4F275F0CB62A5F61042A484E75204D7222743A6008B4006708B7 +S1230DC028683030000048700000600007DC4EEB0424B03C0003670C4E7566FC177C0000A9 +S1230DE005DC66F443EB0590BBC9650A274D045A276B04520456584F102B05DC6700FB9C29 +S1230E0041FA2E9F6000FB86206B042E6720610001F0B2AB0452630E204D4A1866FC3008C2 +S1230E20C07C0001D0C06100FDCA6500FB264A20274804624E75610010DA174005E44E75E3 +S1230E406600FB284A2B04526A00FAE8202B045A6700FAE02A40276B045604524E75660C23 +S1230E606100FDB0274D045A6000FF226100FDAA601C2F0D2F2B04523F3C009C487AFF0EB7 +S1230E80600007282F0D2F2B04523F3C008D6100071A487AFEF861000168206B042EB2ABAD +S1230EA00452630E204D4A1866FC3008C07C0001D0C06100FD3E6500FA9A2A48534D274D16 +S1230EC0045A4E750C6F009C00046600FA5E1E00672EBE3C003A6728040700B0670853071A +S1230EE06600FA887EFF610006C06100055C4A2B05946706177C00FF0594BF2B05946614FD +S1230F00276F000604522A6F000A41FAFE802E88600006984FEF000E601466160C6F008D87 +S1230F2000046600FA425C4F275F04522A5F61042A484E75204D7222743A6008B400670823 S1230F40B200670C101866F453484E75B20067F4101866F860F2610004F06100064EB03CAD -S1230F6000AD6714B03C00896600FA00204D610006382A486400F9F4102B0DF8671E61007B +S1230F6000AD6714B03C00896600FA00204D610006382A486400F9F4102B0594671E6100E7 S1230F8006286500FF12B03C008E6700FE1E6100FE161015B03C00A967944E75101D76A973 S1230FA0788B7A00101D6720B0046604524560F4B00366F051CDFFEE610005F06500FED84E S1230FC06000FDE44A1D66FC534D4E7561000F441400610005D63F00B03C008D6708B03C89 S1230FE000896600F98653026606301F6000FDBC610005B6610AB03C002C67EA301F4E7554 S123100072002001610005A4642E2F022401D2816500F958D2816500F952D2826500F94C3D -S1231020D2816500F94604000030D2806900F93C6100057665D6241F27410C8E4E753F3CF7 -S12310408180600A3F3C810060046100055C610007684A2B0E196B00F8E6663627480CD65D -S12310606100130A277C800000000DFC301737400E00176B0DF90E02B12B0E026100100AF7 +S1231020D2816500F94604000030D2806900F93C6100057665D6241F2741042A4E753F3C63 +S12310408180600A3F3C810060046100055C610007684A2B05B56B00F8E666362748047236 +S12310606100130A277C80000000059830173740059C176B0595059EB12B059E6100100A16 S123108061001306610005240C00002C67BC544F4E754A2F00016604529060E8539060E452 -S12310A06100071227480CD61F2B0E1970BD610004F061000394102B0E19175F0E19E3187C -S12310C061000372670012C2246B0CD6206B0DF42250B3EB0CAA6516B1EB0C966510720098 -S12310E032280004205061000B04206B0DF4B9C866025C4C24D834904E75610006B8274880 -S12311000CD64A2B0E196B0C61001DE4610009BA600012767200204161001DD46408720164 +S12310A061000712274804721F2B05B570BD610004F061000394102B05B5175F05B5E3182F +S12310C061000372670012C2246B0472206B05902250B3EB04466516B1EB04326510720048 +S12310E032280004205061000B04206B0590B9C866025C4C24D834904E75610006B82748EC +S123110004724A2B05B56B0C61001DE4610009BA600012767200204161001DD4640872013D S123112061000AFC108061000ADC609C610000B461000478674AB03C00A86764B03C00ACD7 -S1231140675EB03C002C6740B03C003B67000086610002F64A2B0E196BD2610013AA610042 -S12311600A5E7000102B0E4A670C902C0007902B0E496402610A616A60B611BC0000100029 -S1231180700D6174700A6070142B0E49B42B0E4B650461EC603E942B0E4664FA4402602254 -S12311A03F0061000D6A340061000400B03C00296600F7B8301FB03C00A86606942B0E49EC +S1231140675EB03C002C6740B03C003B67000086610002F64A2B05B56BD2610013AA6100AF +S12311600A5E7000102B05E6670C902C0007902B05E56402610A616A60B611BC0000100003 +S1231180700D6174700A6070142B05E5B42B05E7650461EC603E942B05E264FA440260229B +S12311A03F0061000D6A340061000400B03C00296600F7B8301FB03C00A86606942B05E559 S12311C0631270005300C480670A70205302612851CAFFFC610003D26600FF5C4E7561007F S12311E009DE61000BCE670C320053411018610851C9FFFA4E75703F2F01B03C00206528B2 -S1231200122B0E4A6610122B0E49922B0E46661417410E49600EB22B0E4966082F00610051 -S1231220FF60201F522B0E494EAB0C76B03C000D66187200122B0E48670C70004EAB0C76E3 -S123124051C9FFFA700D17410E49221F4E752A5F4A2B0E446A0A276B0CC20CB66000F6E02B -S123126041FA2A686100FF782A6B0CBE4E7561000860B03C0022660E61000306703B6100E2 -S123128003206100FF5E6100F80C70004A10660A6000FB5E206B0CC6709817400E44274894 -S12312A00CCA6100051027480CD62F0D2A6B0CCA610002F8661E4A2B0E446B726100FF38CB -S12312C06100F7D24A1066046000FB262A48534D610002D64A2B0E196A201400B03C002208 -S12312E06706743A702C534D524D1600204D610008D22A4A6100FDD260101F2B0E19610050 -S12313001D98175F0E19610010806100029E670AB03C002C6600FF38524D274D0CCA2A5FED +S1231200122B05E66610122B05E5922B05E26614174105E5600EB22B05E566082F00610072 +S1231220FF60201F522B05E54EAB0412B03C000D66187200122B05E4670C70004EAB041295 +S123124051C9FFFA700D174105E5221F4E752A5F4A2B05E06A0A276B045E04526000F6E0DD +S123126041FA2A686100FF782A6B045A4E7561000860B03C0022660E61000306703B61004E +S123128003206100FF5E6100F80C70004A10660A6000FB5E206B04627098174005E027486D +S12312A0046661000510274804722F0D2A6B0466610002F8661E4A2B05E06B726100FF387C +S12312C06100F7D24A1066046000FB262A48534D610002D64A2B05B56A201400B03C002275 +S12312E06706743A702C534D524D1600204D610008D22A4A6100FDD260101F2B05B56100BD +S12313001D98175F05B5610010806100029E670AB03C002C6600FF38524D274D04662A5FC6 S1231320610002886736487AFF7A600002726100FC042A48524DB03C003A6712320DC27C84 -S12313400001DAC1241D6700F61A275D0CC26100025AB03C00836700FF7860D2206B0CCA46 -S12313604A2B0E446A0627480CC64E754A1066024E7541FA29466000FE666610584F0C57BB +S12313400001DAC1241D6700F61A275D045E6100025AB03C00836700FF7860D2206B04661E +S12313604A2B05E06A06274804624E754A1066024E7541FA29466000FE666610584F0C5794 S123138000816600F5EA206F0002601C6100042A584F303C0081721C6002DFC1B057660056 -S12313A0F5CEB1EF000266F2376F00060E00276F00080DFC176F00120E196100021C176B4B -S12313C00E010E02102B0DF9B12B0E0227480CD661000CB6176F00120E1961000FAC376FC8 -S12313E0000C0E00276F000E0DFC176B0E010E02102B0DF9B12B0E0261001038322F000644 -S1231400B1414A0067044A016A0E276F00140CB62A6F00186000F976DEFC001C6100018C8E -S1231420B03C002C6600F9666100017E6100FF5E6116B040082B00070E1966066500F5009F -S12314404E756400F4FA4E75534D720017410E19601C41FA22BC30301002487000002F2B06 -S12314600DF43F2B0DF81F2B0E47323010003F01610000E4177C00000E476100012E0400E6 -S123148000BC652AB03C0003650A4A2B0E476660600000867201E121102B0E47B32B0E47F1 -S12314A0B02B0E476400F4C4610000FE60D04A2B0E47663C0600000A645E66084A2B0E1905 +S12313A0F5CEB1EF000266F2376F0006059C276F00080598176F001205B56100021C176B91 +S12313C0059D059E102B0595B12B059E2748047261000CB6176F001205B561000FAC376F54 +S12313E0000C059C276F000E0598176B059D059E102B0595B12B059E61001038322F0006D0 +S1231400B1414A0067044A016A0E276F001404522A6F00186000F976DEFC001C6100018CFA +S1231420B03C002C6600F9666100017E6100FF5E6116B040082B000705B566066500F5000C +S12314404E756400F4FA4E75534D7200174105B5601C41FA22BC30301002487000002F2B73 +S123146005903F2B05941F2B05E3323010003F01610000E4177C000005E36100012E040098 +S123148000BC652AB03C0003650A4A2B05E36660600000867201E121102B05E3B32B05E338 +S12314A0B02B05E36400F4C4610000FE60D04A2B05E3663C0600000A645E66084A2B05B54C S12314C06B00087C7200D000D0001200301F41FA2240B070100064466100FF583F006100D7 -S12314E0FF72301F222B0E3C6A223000672E603C102B0E19122B0E47D000D301177C000079 -S12315000E1917410E47534D723060C041FA2202B0701000641660C472FF301F6732B07CDF -S1231520006467046100FF0C27410E3C101F1200E20817400E45375F0E00275F0DFC176B30 -S12315400E010E02102B0DF9B12B0E02E2094E75102B0DF84E75615065001B3E4A006B0066 +S12314E0FF72301F222B05D86A223000672E603C102B05B5122B05E3D000D301177C0000C0 +S123150005B5174105E3534D723060C041FA2202B0701000641660C472FF301F6732B07CB9 +S1231520006467046100FF0C274105D8101F1200E208174005E1375F059C275F0598176BE3 +S1231540059D059E102B0595B12B059EE2094E75102B05944E75615065001B3E4A006B0085 S1231560008EB03C002467001B30B03C002567001B28B03C002E67001B20B03C0022660C20 S1231580101D204D610006382A4A4E75B03C002866426100FEB670296006487A0976702C2A S12315A0B01D67066000F3C4101D1015B03C002067F6B03C00A9640CB03C003A64067CD03A -S12315C0D00690064E756100FE6A72284FEF00046000FF0C610001E24A2B0E1967000D8EE6 -S12315E06A0627480DF44E752010600004BCB03C00B367D2B03C00B26700FF5CB03C00AE22 +S12315C0D00690064E756100FE6A72284FEF00046000FF0C610001E24A2B05B567000D8E53 +S12315E06A06274805904E752010600004BCB03C00B367D2B03C00B26700FF5CB03C00AE8E S12316006606323C002C60C4B03C00AB67000514040000BF6500F354C07C007FD04041FA10 S123162020A4323000004870100041FA204C30300000671241F000004ED06100FF564A2BBE -S12316400E196A00F2FA4E756100FF484A2B0E196B00F2EC4E75177C00000E19101D4E754C -S12316606100FDE84A2B0E196A00F2D4141DB43C002C6600F2F62F2B0DF4610008AA205FCC -S12316804E756100FDC64A2B0E196B00F2B261000DCE7200141DB43C002C660C2F006100B7 +S123164005B56A00F2FA4E756100FF484A2B05B56B00F2EC4E75177C000005B5101D4E7593 +S12316606100FDE84A2B05B56A00F2D4141DB43C002C6600F2F62F2B0590610008AA205FA5 +S12316804E756100FDC64A2B05B56B00F2B261000DCE7200141DB43C002C660C2F00610024 S12316A008722200201F141DB43C00296600F2BC4E756116B580600003F0610E808260005A S12316C003E86106C082600003E061000228240061000CF46000021E6100021A46806000FC -S12316E003C86100FD50650661000D486042177C00000E19610006BC22482200206B0DFCAD +S12316E003C86100FD50650661000D486042177C000005B5610006BC22482200206B059886 S1231700610006B4240066044A8167249481670C650470FF60082200700160022002538113 -S1231720B30856C9FFFC6708640470FF60027001520012007001E338C02B0E4567000CDC3A +S1231720B30856C9FFFC6708640470FF60027001520012007001E338C02B05E167000CDCA7 S123174070FF60000CD66100FE5672FF61706100FE5A66F24E75612E6708B43C0020642077 S1231760E5A060000344611E67F8B43C0020650A4A806A0C70FF60000330E4A06000032A89 S12317807000600003246100078E140061000C38610001624A024E75B03C00616410B03C1F S12317A00041640480404E75B03C005B4E75B03C007B4E7561024E7572006100FDEE174189 -S12317C00E1861D46400F1A4720041EB0CCE208117410E19B27C0004640611801000524149 -S12317E06100FDC665EE61B065EAB03C0024660C002B00800CCF6100FDB06010B03C002676 -S1231800660A002B00800CD06100FD9E4A2B0E43670E6A14202B0CCE720841EB0C96601C2F -S123182004000028670000F4202B0CCE720441EB0C9A080000176704544158482268000463 -S123184020506006B0986776D1C1B1C966F64A2B0E43660A45FAFF60B5D76600F0CA082B6E -S123186000000E436600F0C8246B0CA6240A9489204A5881D5C1274A0CA6E28A67125382B3 -S123188048424842352051CAFFFC484251CAFFF44A2B0E436B0808000017660A6004D3AB83 -S12318A00C9AD3AB0C9ED3AB0CA220C020BC00000000080000176706317C0000000422000F -S12318C0D2814841E219E249C23C00C017410E19177C00000E434E757005D02B0E3FD08011 -S12318E0D0884E756100FCC26100FB464A2B0DF96B00F06C0C2B00A00DF865000B626600B2 -S1231900F05E4A2B0DF96A000B56202B0DF444806800F04C27400C8E4E753F2B0E187200B5 -S12319203F012F2B0CCE61BC48404A406600F020275F0CCE321F301F3F2B0C903F005241B2 -S12319406100FC68B03C002C67D617410E3F6100FC46375F0E18206B0CA227480E10B1EB03 -S12319600CA6672E2010B0AB0CCE670A20680004D1EB0E1060E44A2B0E186600EFCE61007D -S1231980FF5850483018B02B0E3F670000946000EF8E4A2B0E186700EF8A6100FF3C202BAA -S12319A00CCE20C07204080000176702720627410E0C122B0E3F584830C1321F30C16100B3 -S12319C000AE27400E0C532B0E3F66EED1EB0E0C6500EF84B1EB0CAA650C6100028EB1EBB7 -S12319E00CAA6400EF7227480CA67000222B0E0CE2895341310051C9FFFC48414A416706AA -S1231A005341484160EE206B0E10202B0CA69088214000044A2B0E186652504837580E3F6D -S1231A20700027400E0C3218B2576500EF224A806702613A7200321FD08127400E0C532B07 -S1231A400E3F66E2177C00000E1972034A2B0CCF6A0A7205177C00800E19600C4A2B0CD08C -S1231A606A06177C00400E196104D1C04E75202B0E0C24004842C0C1C4C148424A426600AA -S1231A80EED6D0826500EED0D0AB0E0C6500EEC84E754A2B0E196A0461000318610001CCE2 -S1231AA0202B0CAA90AB0CA6177C00000E19377CA0000DF827400DF46A00063E003C0001CF -S1231AC060000636102B0E49C0BC000000FF60D84A2B0CB66B00EE6C4E7570AB6100FAC22A -S1231AE0177C00800E436100FCDA27480E1461E00C1D00286600EE74177C007E0E43610099 -S1231B00FCB46100FA9270BD6100FA962F2B0CCE2F0D6100F41A206B0E14209F215F000437 -S1231B204E75177C00810E436100FA7E6100FC941F2B0E192F080C1500286600EE2E6100DB -S1231B40FA52205F27480E141F2B0E19202800046100FCDA101FE3186100F8DA671243EB2D -S1231B600CDAB9C96700EDD039280004291060022F102F081F2B0E1961322F0D206B0E1472 +S12317C005B461D46400F1A4720041EB046A2081174105B5B27C000464061180100052418F +S12317E06100FDC665EE61B065EAB03C0024660C002B0080046B6100FDB06010B03C0026E2 +S1231800660A002B0080046C6100FD9E4A2B05DF670E6A14202B046A720841EB0432601CE0 +S123182004000028670000F4202B046A720441EB043608000017670454415848226800043B +S123184020506006B0986776D1C1B1C966F64A2B05DF660A45FAFF60B5D76600F0CA082BDB +S1231860000005DF6600F0C8246B0442240A9489204A5881D5C1274A0442E28A67125382F8 +S123188048424842352051CAFFFC484251CAFFF44A2B05DF6B0808000017660A6004D3ABF0 +S12318A00436D3AB043AD3AB043E20C020BC00000000080000176706317C00000004220053 +S12318C0D2814841E219E249C23C00C0174105B5177C000005DF4E757005D02B05DBD08058 +S12318E0D0884E756100FCC26100FB464A2B05956B00F06C0C2B00A0059465000B6266008A +S1231900F05E4A2B05956A000B56202B059044806800F04C2740042A4E753F2B05B4720066 +S12319203F012F2B046A61BC48404A406600F020275F046A321F301F3F2B042C3F005241F6 +S12319406100FC68B03C002C67D6174105DB6100FC46375F05B4206B043E274805ACB1EBB6 +S12319600442672E2010B0AB046A670A20680004D1EB05AC60E44A2B05B46600EFCE61002F +S1231980FF5850483018B02B05DB670000946000EF8E4A2B05B46700EF8A6100FF3C202B84 +S12319A0046A20C072040800001767027206274105A8122B05DB584830C1321F30C16100F9 +S12319C000AE274005A8532B05DB66EED1EB05A86500EF84B1EB0446650C6100028EB1EB6A +S12319E004466400EF72274804427000222B05A8E2895341310051C9FFFC48414A416706EF +S1231A005341484160EE206B05AC202B04429088214000044A2B05B466525048375805DB20 +S1231A207000274005A83218B2576500EF224A806702613A7200321FD081274005A8532BE1 +S1231A4005DB66E2177C000005B572034A2B046B6A0A7205177C008005B5600C4A2B046CAB +S1231A606A06177C004005B56104D1C04E75202B05A824004842C0C1C4C148424A42660084 +S1231A80EED6D0826500EED0D0AB05A86500EEC84E754A2B05B56A0461000318610001CCBC +S1231AA0202B044690AB0442177C000005B5377CA0000594274005906A00063E003C0001EC +S1231AC060000636102B05E5C0BC000000FF60D84A2B04526B00EE6C4E7570AB6100FAC203 +S1231AE0177C008005DF6100FCDA274805B061E00C1D00286600EE74177C007E05DF6100E0 +S1231B00FCB46100FA9270BD6100FA962F2B046A2F0D6100F41A206B05B0209F215F000410 +S1231B204E75177C008105DF6100FA7E6100FC941F2B05B52F080C1500286600EE2E6100B5 +S1231B40FA52205F274805B01F2B05B5202800046100FCDA101FE3186100F8DA671243EB07 +S1231B600476B9C96700EDD039280004291060022F102F081F2B05B561322F0D206B05B0B8 S1231B802A506100F8C46100FA226600EDDE2A5F101F205F4A006A08209C315C000460025A -S1231BA0209F101FE3186100F88C4E754A2B0E196A0007EE24486000F5146100094A742276 +S1231BA0209F101FE3186100F88C4E754A2B05B56A0007EE24486000F5146100094A7422E3 S1231BC036027200534124485241103010006710B0026704B00366F0B03C00226602524AC5 -S1231BE0D5C1B1CB651EB1EB0C9264182248200166042041600E6126D1C1D3C15340112160 -S1231C0051C8FFFC43EB0CDAB9C96700ED2A39012908274C0DF4177C00800E194E754A4131 -S1231C20672E2F00700017400E427001C041D041640470014840206B0CAA91C0B1EB0CA601 -S1231C40651227480CAA27480CB2201F4A414E7530414E754A2B0E426B00ECFC2F09610A3B -S1231C60225F177C00800E4260CC48E7E0E0276B0CAE0CAA222B0CA670002240206B0C9E59 -S1231C8041E80004246B0CA260086100008441E8000AB1CA65F441E8FFFC246B0CA6602499 +S1231BE0D5C1B1CB651EB1EB042E64182248200166042041600E6126D1C1D3C153401121CC +S1231C0051C8FFFC43EB0476B9C96700ED2A39012908274C0590177C008005B54E754A4176 +S1231C20672E2F007000174005DE7001C041D041640470014840206B044691C0B1EB044246 +S1231C406512274804462748044E201F4A414E7530414E754A2B05DE6B00ECFC2F09610A80 +S1231C60225F177C008005DE60CC48E7E0E0276B044A0446222B044270002240206B043A76 +S1231C8041E80004246B043E60086100008441E8000AB1CA65F441E8FFFC246B0442602471 S1231CA024280004D488201008000017671430280008D040D0C041E8000A61545C48B1C2AB -S1231CC066F82042B5C866D8204C45EB0CF26006613E41E80006B5C866F62009672C2051B1 -S1231CE07200322900045281C23C00FED1C1246B0CAAB1CA670CE2895341352051C9FFFC12 -S1231D00228A27510CAA6000FF6C4CDF07074E7520106728B2806424B0AB0CAA641E70FFA3 -S1231D20302800044440C03C00FED0AB0CAAB0906706221022484E7527400CAA4E75487AE6 -S1231D40F73A2F2B0DF46100F80E4A2B0E196A00EBEE205F226B0DF432280004D269000403 -S1231D606500EBD82F086100FEB627480DFC20573028000420506120206B0DF46138611811 -S1231D80205F6132206B0DFC22086700FE784481D2AB0CB26000FE6E32006714226B0CB2CE -S1231DA02F09534012D851C8FFFC27490CB2205F4E75206B0DF448E74040B9C866025C4C1A -S1231DC0700022583018B9C86610B3EB0CAA660A7201C240D280D3AB0CAA20494CDF02027F +S1231CC066F82042B5C866D8204C45EB048E6006613E41E80006B5C866F62009672C20511D +S1231CE07200322900045281C23C00FED1C1246B0446B1CA670CE2895341352051C9FFFC7E +S1231D00228A275104466000FF6C4CDF07074E7520106728B2806424B0AB0446641E70FF7B +S1231D20302800044440C03C00FED0AB0446B0906706221022484E75274004464E75487ABE +S1231D40F73A2F2B05906100F80E4A2B05B56A00EBEE205F226B059032280004D269000448 +S1231D606500EBD82F086100FEB62748059820573028000420506120206B059061386118E9 +S1231D80205F6132206B059822086700FE784481D2AB044E6000FE6E32006714226B044E12 +S1231DA02F09534012D851C8FFFC2749044E205F4E75206B059048E74040B9C866025C4CF2 +S1231DC0700022583018B9C86610B3EB0446660A7201C240D280D3AB044620494CDF020257 S1231DE04A804E756100013072016100FE3210806000FE12C1416100F79E4A816722700000 S1231E00B2680004651A6014C1416100F78A4A81670E3028000490816406700032280004E4 S1231E2022486100FDFA20492F00618AD1DF30016100FF666000FDCE7E0053472F006100DF @@ -182,108 +182,108 @@ S1231E60EAFEB068000464B82207DE406506BE68000465AC32280004924060A46100FF3489 S1231E802200675622486100FD96D1C1D3C1340153421021B03C005B640AB03C0041650495 S1231EA000000020110051CAFFEA602E6100FF042200672622486100FD66D1C1D3C13401BF S1231EC053421021B03C0061650AB03C007B6404020000DF110051CAFFEA6000FD28101D05 -S1231EE06100F8D66100F6B04A2B0E196A00EA5020106000FBB4487AFBB06000FEB6610047 +S1231EE06100F8D66100F6B04A2B05B56A00EA5020106000FBB4487AFBB06000FEB66100B4 S1231F00FEB24A406700EA5810106000FBBC6100F6986100F51C6100F9D47280D281C2808D S1231F206600EA3C4E756100F5086100F9C048404A406600EA2A48404E756100FE766722A1 S1231F402C4D2A48D1C010103F002F0810BC00006100F65861001142205F301F10802A4E66 -S1231F604E7537400DF84E756100F4C66100F9862F006100F62A619A205F4E75611E610093 +S1231F604E75374005944E756100F4C66100F9862F006100F62A619A205F4E75611E6100FF S1231F80F61E6100F4AC6100F96C48404A40670652406600E9CA4840205F4E756100F49287 S1231FA06100F952080000006600E97020572E804ED06100F940204010106000FB0C61A8DD S1231FC010804E756100F92EE2086500E94ED000C188700030106000FAD06100F918E2084D S1231FE06500E938D000C18820106000FABC618C30804E7561A66100F5A66100F4346100AB -S1232000F8F4205F20804E756100F7AE2F08182B0E196100F58A6100F7A0245FB82B0E19E2 -S12320206600E91C201020D224C04A046AD83010309234804E754EAB0C6A6000F55A4EEBCB -S12320400C7C4EEB0C82487AF5626100FF504E756100FF162F083F0074006100F54E670630 -S12320606100F5382400321F205F1010B500C00167F84E750A2B00800DF9176B0E010E02C6 -S1232080102B0DF9B12B0E02102B0DF86700033841EB0DFC102B0E006746902B0DF86722B9 -S12320A0650A376B0E000DF84400514844002F01B03C00206D04720060042210E0A92081F8 -S12320C0221F4A2B0E026B1A202B0DFCD0AB0DF4640AE290522B0DF86500E88027400DF44A -S12320E04E7543EB0DF4B3C8660250492011221027400DF493AB0DF4640A0A2B00FF0DF9BC -S123210044AB0DF4202B0DF46B2E660637400DF84E752F0122007000102B0DF86714D2816B -S12321205BC8FFFC4A40670A6A027001530027410DF4221F17400DF84E754A2B0DF96B00A3 -S1232140E81E7E0017470E021E2B0DF86700E810048700000081177C00810DF82C2B0DF45F -S1232160277C800000000DFC377C81000E006100FF18700037400E00DC8627460DFC6758E9 -S1232180377C80000E00610001304A2B0DF86748122B0DF8040100824401202B0DF4E2A85B +S1232000F8F4205F20804E756100F7AE2F08182B05B56100F58A6100F7A0245FB82B05B5BC +S12320206600E91C201020D224C04A046AD83010309234804E754EAB04066000F55A4EEB37 +S123204004184EEB041E487AF5626100FF504E756100FF162F083F0074006100F54E670608 +S12320606100F5382400321F205F1010B500C00167F84E750A2B00800595176B059D059E0C +S1232080102B0595B12B059E102B05946700033841EB0598102B059C6746902B0594672243 +S12320A0650A376B059C05944400514844002F01B03C00206D04720060042210E0A92081D1 +S12320C0221F4A2B059E6B1A202B0598D0AB0590640AE290522B05946500E8802740059067 +S12320E04E7543EB0590B3C866025049201122102740059093AB0590640A0A2B00FF05956C +S123210044AB0590202B05906B2E6606374005944E752F0122007000102B05946714D2811B +S12321205BC8FFFC4A40670A6A027001530027410590221F174005944E754A2B05956B00E7 +S1232140E81E7E001747059E1E2B05946700E810048700000081177C008105942C2B059010 +S1232160277C800000000598377C8100059C6100FF1870003740059CDC862746059867589B +S1232180377C8000059C610001304A2B05946748122B0594040100824401202B0590E2A80C S12321A07C00223C4000000041FA13FE7A1E78016006E8A29282DC9024002601E8A36402F8 S12321C0528390836AEC200258485284E28B670451CDFFF0DC86200628007A004A876716C8 -S12321E06A0444877A8017450DF94847E18F7A885385DE876AFA27470DF417450DF8277C31 -S1232200B17217F80DFC377C80000E00176B0DF90E02611827440DFC6710377C82000E00FF -S1232220176B0DF90E026100FE604E7548E7F8004A2B0DF86776102B0E006770176B0E0250 -S12322400DF9D02B0DF8640A040000806400E70C600604000080655417400DF8222B0DF4DE -S1232260242B0DFC3801200148403600C2C2C0C24842C8C2C6C20681000080004241484135 -S1232280D280D284640606830001000006810000800042414841D2836B08D281532B0DF8ED -S12322A0670A27410DF44CDF001F4E75700027400DF437400DF860EE2F0770002400142B88 -S12322C00DF86700E682102B0E006766904206400080176B0E020DF9422B0E03262B0DF410 -S12322E0282B0DFCB883674465069883562B0E03614648412802614284C51E2B0E03670871 +S12321E06A0444877A80174505954847E18F7A885385DE876AFA2747059017450594277C75 +S1232200B17217F80598377C8000059C176B0595059E6118274405986710377C8200059C8A +S1232220176B0595059E6100FE604E7548E7F8004A2B05946776102B059C6770176B059E6F +S12322400595D02B0594640A040000806400E70C600604000080655417400594222B05908E +S1232260242B05983801200148403600C2C2C0C24842C8C2C6C206810000800042414841A1 +S1232280D280D284640606830001000006810000800042414841D2836B08D281532B059459 +S12322A0670A274105904CDF001F4E757000274005903740059460EE2F0770002400142BCC +S12322C005946700E682102B059C6766904206400080176B059E0595422B059F262B05909B +S12322E0282B0598B883674465069883562B059F614648412802614284C51E2B059F6708B7 S1232300E20FE291E2525200D442640852816404E291524036006B1A0243FF006600E63C86 -S12323202E1F17400DF827410DF44E757201E2A960DE7000220060E824042A034245484545 +S12323202E1F17400594274105904E757201E2A960DE7000220060E824042A03424548451D S123234088C5680278FF3C043204CCC3C8C53E0642464846D8867C009C4795846A08534183 -S1232360DC43D5856BF8484234064E752010484037400DF86708807C00804840E180274087 -S12323800DF4102B0DF84E752F08206B0CD6082B00060E19670C610000C62080205F4E75B5 -S12323A02F086100FD60612C202B0DF4E0984840C07C007F022B00800DF9806B0DF8484065 -S12323C02080205F4E75376B0E000DF8276B0DFC0DF44E75102B0DF86720202B0DF406806A -S12323E000000080640AE290522B0DF86500E56CC03C000027400DF44E7517400DF94E75FA -S12324007000102B0DF867F6102B0DF9488048C0E08065EA70014E7561E627400DF4377C55 -S1232420A0000DF8D0806000FCD0177C00000DF94E75122B0E0067C8102B0E026BCA102BE6 -S12324400DF9B22B0DF8660A222B0DFCB2AB0DF4670865B80A00008060B270004E75202BC6 -S12324600DF467302F0172A0922B0DF86500E4EC660E4A2B0DF96A1A448069166000E4DCB1 -S1232480B23C002065027000E2A84A2B0DF96A024480221F27400C8E4E7570A0902B0DF849 -S12324A06310B03C00206400025E72FFE1A1C3AB0DF44E7541FA17FA6100ED24202B0CB6E5 -S12324C043FA0DE8720041EB0E302401263110006714782F524490836AFAD0831184200027 -S12324E05841524260E606000030118020005348524843EB0E39B1C96700ECE40C100030D7 -S123250067EE6000ECDA43EB0E2A742008AB00070DF96702742D1282142B0DF86608703092 -S12325207201600001A4177C00000E10B43C00816448277C989680000DFC377C98000E009E -S1232540176B0DF90E026100FCE4177C00F90E106028376B0DF80E00276B0DF40DFC176B99 -S12325600DF90E02277CCCCCCCCD0DF4377C7D000DF86100FCB8522B0E10277C98967F70C7 -S12325800DFC377C98000E006100014C62C46750277CF423F8000DFC377C94000E0041EB0E -S12325A00DF46100013262202010122800042400E488D0826404E29052015601208011413A -S12325C00004532B0E1060DA277C800000000DFC377C80000E00176B0DF90E026100FAAA13 -S12325E06100FE7C7401102B0E1050006B0CB03C0009640653001400700272005500174011 -S12326000E1117420E10100267026A14528113BC002E10004A026708528113BC00301000AA -S12326207400708041FA111E263020005200D7AB0C8E08000007650467F2600266EE6406F3 -S123264044000600000B0600002F584252411600C63C007F13831000532B0E1066085281A5 +S1232360DC43D5856BF8484234064E7520104840374005946708807C00804840E1802740F3 +S12323800590102B05944E752F08206B0472082B000605B5670C610000C62080205F4E7566 +S12323A02F086100FD60612C202B0590E0984840C07C007F022B00800595806B05944840A9 +S12323C02080205F4E75376B059C0594276B059805904E75102B05946720202B05900680F3 +S12323E000000080640AE290522B05946500E56CC03C0000274005904E75174005954E753E +S12324007000102B059467F6102B0595488048C0E08065EA70014E7561E627400590377C99 +S1232420A0000594D0806000FCD0177C000005954E75122B059C67C8102B059E6BCA102B98 +S12324400595B22B0594660A222B0598B2AB0590670865B80A00008060B270004E75202B76 +S1232460059067302F0172A0922B05946500E4EC660E4A2B05956A1A448069166000E4DCF5 +S1232480B23C002065027000E2A84A2B05956A024480221F2740042A4E7570A0902B05948D +S12324A06310B03C00206400025E72FFE1A1C3AB05904E7541FA17FA6100ED24202B0452BD +S12324C043FA0DE8720041EB05CC2401263110006714782F524490836AFAD0831184200094 +S12324E05841524260E606000030118020005348524843EB05D5B1C96700ECE40C10003044 +S123250067EE6000ECDA43EB05C6742008AB000705956702742D1282142B059466087030D7 +S12325207201600001A4177C000005ACB43C00816448277C989680000598377C9800059CE4 +S1232540176B0595059E6100FCE4177C00F905AC6028376B0594059C276B05900598176B90 +S12325600595059E277CCCCCCCCD0590377C7D0005946100FCB8522B05AC277C98967F70E5 +S12325800598377C9800059C6100014C62C46750277CF423F8000598377C9400059C41EBC0 +S12325A005906100013262202010122800042400E488D0826404E2905201560120801141A6 +S12325C00004532B05AC60DA277C800000000598377C8000059C176B0595059E6100FAAA32 +S12325E06100FE7C7401102B05AC50006B0CB03C000964065300140070027200550017407E +S123260005AD174205AC100267026A14528113BC002E10004A026708528113BC0030100084 +S12326207400708041FA111E263020005200D7AB042A08000007650467F2600266EE64065F +S123264044000600000B0600002F584252411600C63C007F13831000532B05AC6608528112 S123266013BC002E1000C03C00800A000080B43C001C66B0103110005381B03C003067F485 -S1232680B03C002E6702528113BC002B10024A2B0E1167386A0A13BC002D1002442B0E1191 -S12326A013BC00451001142B0E11702F52000402000A64F80602003A1380100313821004A5 -S12326C013BC00001005600A1380100013BC0000100120494E757000122B0E00B22B0DF85C -S12326E0660A222B0DFCB2AB0DF46708650453804E7552804E75277C800000000DF4377CD8 -S123270081000DF84E75700027400DF437400DF84E754A2B0DF867DE4A2B0E0067E81F2B7A -S12327200E016A20720017410E01122B0DF8044100806300E22A202B0DF4E3A06600E22076 -S123274065021E802F2B0DF43F2B0DF86100FC786100F9E8301F275F0DFC37400E001740D5 -S12327600E02102B0DF9B12B0E026100FAC06158175F0DF94E754A2B0DF867060A2B008069 -S12327800DF94E75277C800000000DF4377C81000DF84E754A2B0DF96A00E1C070002740EF -S12327A00DF437400DF84E75277C800000000DF4177C00000DF94A2B0E186A024481060145 -S12327C0008117410DF84E75102B0DF867B6B03C006465B0177C00000E18222B0DF4B03C9F -S12327E0008762B06608B2BCB00F33C764A64A2B0DF96A0C177C00FF0E18177C00000DF95B -S1232800277CB8AA3B290DFC377C81000E00177C00000E026100FA16177C00000E3D1A2BC9 -S12328200DF8040500806324202B0DF422002C05444606460020ECA917410E3DEBA86700B8 -S1232840FF6827400DF4377C80000DF8277CB17217F80DFC377C80000E00177C00000E02AB -S12328606100F9CA202B0DF41A2B0DF8044500824445EAA872002C3C26A3D11041FA0D2ABE -S123288078007A036136594853847A09612E594853847A1261264A2B0E186A064481442B54 -S12328A00E3D7083DC816B065380DC866AFA27460DF4D02B0E3D17400DF84E75528424069C +S1232680B03C002E6702528113BC002B10024A2B05AD67386A0A13BC002D1002442B05AD6B +S12326A013BC00451001142B05AD702F52000402000A64F80602003A138010031382100412 +S12326C013BC00001005600A1380100013BC0000100120494E757000122B059CB22B059435 +S12326E0660A222B0598B2AB05906708650453804E7552804E75277C800000000590377C1C +S1232700810005944E75700027400590374005944E754A2B059467DE4A2B059C67E81F2B97 +S1232720059D6A2072001741059D122B0594044100806300E22A202B0590E3A06600E22028 +S123274065021E802F2B05903F2B05946100FC786100F9E8301F275F05983740059C174086 +S1232760059E102B0595B12B059E6100FAC06158175F05954E754A2B059467060A2B008087 +S123278005954E75277C800000000590377C810005944E754A2B05956A00E1C0700027409F +S12327A00590374005944E75277C800000000590177C000005954A2B05B46A024481060162 +S12327C00081174105944E75102B059467B6B03C006465B0177C000005B4222B0590B03C50 +S12327E0008762B06608B2BCB00F33C764A64A2B05956A0C177C00FF05B4177C00000595A0 +S1232800277CB8AA3B290598377C8100059C177C0000059E6100FA16177C000005D91A2B7C +S12328200594040500806324202B059022002C05444606460020ECA9174105D9EBA86700FD +S1232840FF6827400590377C80000594277CB17217F80598377C8000059C177C0000059EC9 +S12328606100F9CA202B05901A2B0594044500824445EAA872002C3C26A3D11041FA0D2A96 +S123288078007A036136594853847A09612E594853847A1261264A2B05B46A064481442BC1 +S12328A005D97083DC816B065380DC866AFA27460590D02B05D9174005944E75528424064E S12328C0E8A22601E8A34A806B0CD282DC83909851CDFFEA4E7592829C83D09851CDFFDE3C -S12328E04E754A2B0DF8670841EB0E046100FAB272AF7412202B0E04D0806402B30051CA55 -S1232900FFF827400E0427400DF4377C80000DF86000F7F26138376B0DF80E00276B0DF479 -S12329200DFC27410DF417430DF86700E02E6100F7D46000F984277CC90FDAA30DFC377C90 -S123294081000E00176B0DF90E026100F73C177C00000E18277CA2F9836F0DFC377C7F0094 -S12329600E00176B0DF90E026100F8C2102B0DF8671C41FA0B342C2B0DF45300671004002F +S12328E04E754A2B0594670841EB05A06100FAB272AF7412202B05A0D0806402B30051CA9B +S1232900FFF8274005A027400590377C800005946000F7F26138376B0594059C276B059003 +S1232920059827410590174305946700E02E6100F7D46000F984277CC90FDAA30598377C40 +S12329408100059C176B0595059E6100F73C177C000005B4277CA2F9836F0598377C7F00B3 +S1232960059C176B0595059E6100F8C2102B0594671C41FA0B342C2B05905300671004004D S123298000806B18B03C00206404E1AE661874817600203C80000000220360624400B03C51 -S12329A0001E64EAE0AE176B0DF90E02DC8664060A2B00FF0DF9DC86640C0A2B00FF0E184F -S12329C00A2B00FF0E02E48E67C47A012028FFFC22009C9860089C989083D2826012240065 +S12329A0001E64EAE0AE176B0595059EDC8664060A2B00FF0595DC86640C0A2B00FF05B401 +S12329C00A2B00FF059EE48E67C47A012028FFFC22009C9860089C989083D28260122400D2 S12329E0EAA22601EAA34A866AECDC98D08392825285BABC0000001E66E4748126024A2B4B -S1232A000E186B04C141C54327400DF417420DF86000F6F2102B0DF8670000AA177C000021 -S1232A200E18B03C008165286608202B0DF4D080671E277C800000000DFC377C81000E0075 -S1232A40176B0DF90E026100F870177C00FF0E18202B0DF47282922B0DF8E2A841FA0ACABE +S1232A0005B46B04C141C54327400590174205946000F6F2102B0594670000AA177C0000D2 +S1232A2005B4B03C008165286608202B0590D080671E277C800000000598377C8100059C27 +S1232A40176B0595059E6100F870177C00FF05B4202B05907282922B0594E2A841FA0ACADC S1232A607C00223C400000007A1D78016006E8A2D282DC9024002601E8A390836AF0200213 -S1232A8058485284E28351CDFFF2177C00820DF827460DF46100F66E4A2B0E186A261E2B87 -S1232AA00DF9177C00000DF9277CC90FDAA20DFC377C81800E00177C00FF0E026100F5CAEF -S1232AC017470DF94E756100F4A0B03C00086400DE8E01D04E756100F490B03C0008640041 +S1232A8058485284E28351CDFFF2177C00820594274605906100F66E4A2B05B46A261E2BCC +S1232AA00595177C00000595277CC90FDAA20598377C8180059C177C00FF059E6100F5CA0D +S1232AC0174705954E756100F4A0B03C00086400DE8E01D04E756100F490B03C00086400AD S1232AE0DE7E01904E75101D6100F47EB03C00086400DE6C22006100EAB2B03C00296600E6 -S1232B00DE6A6100EAA4700003106700F90E70FF6000F9084A2B0E196A00DDFC246B0DF44A +S1232B00DE6A6100EAA4700003106700F90E70FF6000F9084A2B05B56A00DDFC246B059023 S1232B203E2A00046700DDF070003F003F003F003F002F0A720020416100F0CA101DB03C45 -S1232B40002C6600DE266100028E4A026700DDC86100E8F64A2B0E196B00DDE44A2B0DF811 -S1232B606732322F000AB27C000864283001D241D240D24141FA0844277010020DFC303089 -S1232B8010000440010037400E00177C00000E026100F4F66100F970610001FE45EB0E2AD7 +S1232B40002C6600DE266100028E4A026700DDC86100E8F64A2B05B56B00DDE44A2B0594EA +S1232B606732322F000AB27C000864283001D241D240D24141FA08442770100205983030F5 +S1232B801000044001003740059C177C0000059E6100F4F66100F970610001FE45EB05C61E S1232BA07C00782E3406524610326000677AB03C00456706B00466EE60EA36065343524640 S1232BC010326000B03C002D6600DD94524610326000B03C00306704700A60085246700FA5 S1232BE0C032600034030C42000166025242D440700A90426E0CD440D6400C4300016E0239 @@ -297,47 +297,47 @@ S1232CC0002B1A004A4267081E322000534260084A0666041E121C0711874000609A4A42D8 S1232CE066144A0567544A0666500C05002B67060C12002D66447A233E0153473C2F0004C3 S1232D0053466E023C07103160000C000023671E0C00002567180C00002C67120C00002B76 S1232D20670C0C00002D67060C00002E6602100511807000534651CFFFCE41EC0006274C92 -S1232D400DF46100F010302F000467203F400006610000844A026614613E3F6F000400069C -S1232D6041EC0006274C0DF46100EFEA101DB03C00296600FDCA204C222B0CAA6100F03807 -S1232D8027410CAA22483200205F6100F02A4FEF000820496000EE6E226F00043E29000410 +S1232D4005906100F010302F000467203F400006610000844A026614613E3F6F0004000608 +S1232D6041EC0006274C05906100EFEA101DB03C00296600FDCA204C222B04466100F038DF +S1232D802741044622483200205F6100F02A4FEF000820496000EE6E226F00043E2900047C S1232DA0342F000A3C2F0008320692426202D2476100EE6C6100EE4E226F000422517800CE S1232DC011B12000400052445242BE4266027400BC4266EC4E75226F00043E290004225141 S1232DE03C2F000A3F47000C7A007600740010316000B03C002C6742B03C00236706B03C9A S1232E00002566084A856A105243602EB03C002B6706B03C002D66048400601EB03C002E8C S1232E2066144A856B143006906F000A3F40000C7AFF840060044A0266085246BE4662AE35 -S1232E407C003F4600083F43000E4E75B23C00216400DB0C741F41EB0E1A78307600E28849 -S1232E60D7041183200051CAFFF4177C00000E3A4A01670E4481068100000E3A41F310003E -S1232E80600E1010670AB03C0030660E524860F243EB0E3AB1C9660253486000ED22B23C63 -S1232EA000096400DABA740741EB0E3278301600E898C63C000F1A03060500F6C70411835A -S1232EC0200051CAFFEA60A24A2B0E4C661E4EAB0C70640E17400E4D177C00200E4E60006D -S1232EE0DEF24A2B0E4E6704532B0E4E4E754EAB0C70650A102B0E4E67F2102B0E4D177C28 -S1232F0000000E4E003C00014E756100E53E4A2B0E196B00DA2A612E64FC6100F4AA60F67E -S1232F206100E5284A2B0E196B00DA14611863FC6100F49460F6B03C00296600DA2E4FEF52 -S1232F4000046000E6646100E662B03C002C66E63F2B0DF82F2B0DF46100E4F04A2B0E1917 -S1232F606B00D9DC275F0DFC301F37400E00176B0DF90E02B12B0E026000F4B8B03C002C22 -S1232F80672C6100EF8E4A006712B03C00106500D9CEB02B0E46640417400E4617400E4A00 +S1232E407C003F4600083F43000E4E75B23C00216400DB0C741F41EB05B678307600E288B6 +S1232E60D7041183200051CAFFF4177C000005D64A01670E44810681000005D641F3100018 +S1232E80600E1010670AB03C0030660E524860F243EB05D6B1C9660253486000ED22B23CD0 +S1232EA000096400DABA740741EB05CE78301600E898C63C000F1A03060500F6C7041183C7 +S1232EC0200051CAFFEA60A24A2B05E8661E4EAB040C640E174005E9177C002005EA600020 +S1232EE0DEF24A2B05EA6704532B05EA4E754EAB040C650A102B05EA67F2102B05E9177C48 +S1232F00000005EA003C00014E756100E53E4A2B05B56B00DA2A612E64FC6100F4AA60F658 +S1232F206100E5284A2B05B56B00DA14611863FC6100F49460F6B03C00296600DA2E4FEFBF +S1232F4000046000E6646100E662B03C002C66E63F2B05942F2B05906100E4F04A2B05B55C +S1232F606B00D9DC275F0598301F3740059C176B0595059EB12B059E6000F4B8B03C002C41 +S1232F80672C6100EF8E4A006712B03C00106500D9CEB02B05E26404174005E2174005E647 S1232FA06100E608672CB03C002C6600D9BE6100EF5E4A006B00D9A8B03C00016500D9A067 -S1232FC0122B0E4A6708B02B0E4A6E00D99217400E46102B0E4A670AB02B0E466404174040 -S1232FE00E46902B0E4664FAD02B0E46D02B0E464400D02B0E4A17400E4B4E754A2B0DF9E9 -S12330006B00D95C4A2B0DF867F048E77800202B0DF474002202761F082B00000DF8660677 -S1233020D080D582D281D080D5822801D8845284B48465049484528151CBFFE627410DF49A -S1233040102B0DF804400080E248640252400640008017400DF84CDF001E6000F0A8101DB6 -S12330606100E7566100E53020086000EA3C41EB0C6420086000EA32277CC90FDAA20DF452 -S1233080377C82000DF84E75277CC90FDAA20DF4377C83000DF84E7548E77C0072002601F5 -S12330A0280117410DF917410E1917410E136100E4FA653CB03C002D6608177C00FF0DF98E +S1232FC0122B05E66708B02B05E66E00D992174005E2102B05E6670AB02B05E26404174061 +S1232FE005E2902B05E264FAD02B05E2D02B05E24400D02B05E6174005E74E754A2B0595E3 +S12330006B00D95C4A2B059467F048E77800202B059074002202761F082B000005946606BB +S1233020D080D582D281D080D5822801D8845284B48465049484528151CBFFE62741059006 +S1233040102B059404400080E2486402524006400080174005944CDF001E6000F0A8101D8E +S12330606100E7566100E53020086000EA3C41EB040020086000EA32277CC90FDAA205902A +S1233080377C820005944E75277CC90FDAA20590377C830005944E7548E77C007200260139 +S12330A0280117410595174105B5174105AF6100E4FA653CB03C002D6608177C00FF059540 S12330C06006B03C002B66066100E4DE6522B03C002E67000092B03C00246700010AB03CD8 S12330E00025670001646000008C6100E4BC646C610001A864F452836100E4AE65F8B03CAB S1233100002E66066100E4A265FAB03C004566646100E4966528B03C002D6706B03C00B343 -S12331206608177C00FF0E13600EB03C002B6708B03C00B26600D8346100E46E6436C8FC55 +S12331206608177C00FF05AF600EB03C002B6708B03C00B26600D8346100E46E6436C8FCC2 S1233140000AC0BC000000FF04000030D880B83C00306FE46100E45265FA6018B03C002E5B -S1233160670460A653836100E440649E6100012C64F260904A2B0E136A024484D8837620EE +S1233160670460A653836100E440649E6100012C64F260904A2B05AF6A024484D88376205B S12331804A8167526B085383D2815BCBFFFCB8BC000000266E00D7C4B8BCFFFFFFDA6D345B -S12331A04484C9FC00062F0841FA0210177040000E00277040020DFC205F0A0300802741C9 -S12331C00DF417430DF8176B0DF90E024CDF003E6000F05A7200260117430DF827410DF47F -S12331E04CDF003E4E75177C00400E1976206100E3B86514803C002004000061652AB03CDE +S12331A04484C9FC00062F0841FA021017704000059C277040020598205F0A0300802741A2 +S12331C0059017430594176B0595059E4CDF003E6000F05A72002601174305942741059008 +S12331E04CDF003E4E75177C004005B576206100E3B86514803C002004000061652AB03C4B S1233200000664240600003A616C64E258836900D74A6100E39465F4803C002004000061F2 -S12332206506B03C000665E44A8167AA6B085383D2815BCBFFFC0A03008017430DF82741F7 -S12332400DF44CDF003E4E75177C00400E1976206100E35664D2B03C003264CC24016124E5 +S12332206506B03C000665E44A8167AA6B085383D2815BCBFFFC0A03008017430594274163 +S123324005904CDF003E4E75177C004005B576206100E35664D2B03C003264CC24016124BE S123326064EE52836900D6F46100E33E64BAB03C003265EE60B22401D48265CAD48265C6A2 S1233280D48265C2D48265BEC0BC000000FF04000030D48065B022024E752401D48265084D S12132A0D4826504D48164DC4E753B9ACA0005F5E10000989680000F4240000186A015 @@ -422,7 +422,6 @@ S1243C56A500414228A8414E28CB48454EAD4FAA574F5049DE00434153452428D44E54494CBE S1243C77B053494E472428E4535228C200414C28D2415250545228DF004149549448494C45DD S1243C98B149445448A300B6000D0A427265616B00204572726F720020696E206C696E6520CF S1243CB90045787472612069676E6F7265640D0A005265646F2066726F6D2073746172740D0A -S1243CDA0A000D0A52656164790D0A0020427974657320667265650D0A0A4D61747420506523 -S1243CFB6172636520456E68616E6365642036386B2042415349432056657273696F6E2033FF -S1093D1C2E35320D0A00F1 +S1243CDA0A000D0A52656164790D0A0020427974657320667265650D0A0A456E68616E6365DC +S11E3CFB642036386B2042415349432056657273696F6E20332E35320D0A00C6 S80400083EB5 diff --git a/roms/ehbasic/basic68k.X68 b/roms/ehbasic/basic68k.X68 index aed4808..eb7452b 100644 --- a/roms/ehbasic/basic68k.X68 +++ b/roms/ehbasic/basic68k.X68 @@ -70,50 +70,53 @@ nobrk EQU 0 * null response to INPUT causes a break * RAM offset definitions * Use this value to run out of ROM -* ORG $A00000 +* ORG $00C000 * past the vectors in a real system * Use this value to run out of RAM ORG $000800 * past the vectors in a real system +* Use these two lines when running from ROM +*ram_addr EQU $02000 * RAM start address +*ram_size EQU $06000 * RAM size +prg_strt + +* Use these two lines when running from RAM +ram_addr EQU $04000 * RAM start address +ram_size EQU $04000 * RAM size + ACIAC EQU $F00009 ACIAD EQU ACIAC+2 RDRF EQU 0 ; ACIAC Receive Data Register Full TDRE EQU 1 ; ACIAC Transmit Data Register Empty - BRA code_start * For convenience, so you can start from first address ************************************************************************************* * * the following code is simulator specific, change to suit your system - * output character to the console from register d0.b + VEC_OUT - ;MOVEM.L A0/D1,-(A7) * Save working registers BTST.B #TDRE,ACIAC.L BEQ.S VEC_OUT MOVE.B D0,ACIAD.L - ;MOVEM.L (A7)+,A0/D1 * Restore working registers RTS - ************************************************************************************* * * input a character from the console into register d0 -* else return Cb=0 if there's no character available +* else return Cb=0 if theres no character available + VEC_IN - ; MOVEM.L A0/D1,-(A7) * Save working registers BTST.B #RDRF,ACIAC.L BEQ.S RXNOTREADY MOVE.B ACIAD.L,D0 - ; MOVEM.L (A7)+,A0/D1 * Restore working registers ORI.b #1,CCR * Set the carry, flag we got a byte RTS * Return RXNOTREADY - ;MOVEM.L (A7)+,A0/D1 * Restore working registers ANDI.b #$FE,CCR * Clear the carry, flag character available - RTS + RTS ************************************************************************************* * @@ -136,7 +139,7 @@ VEC_SV * turn off simulator key echo code_start - + * Set up ACIA parameters LEA.L ACIAC,A0 * A0 points to console ACIA MOVE.B #$15,(A0) * Set up ACIA1 constants (no IRQ, * RTS* low, 8 bit, no parity, 1 stop) @@ -181,7 +184,7 @@ LAB_sizok MOVEA.l a0,a3 * copy RAM base to a3 ADDA.l d0,a0 * a0 is top of RAM MOVE.l a0,Ememl(a3) * set end of mem - LEA ram_base(a3),sp * set stack to RAM start + 1k * set stack to RAM start + 1k + LEA ram_base(a3),sp * set stack to RAM start + 1k MOVE.w #$4EF9,d0 * JMP opcode MOVEA.l sp,a0 * point to start of vector table @@ -313,7 +316,7 @@ LAB_UVER ADD.l d0,d0 * .......$ .......& ........ .......0 SWAP d0 * ........ .......0 .......$ .......& ROR.b #1,d0 * ........ .......0 .......$ &....... - LSR.w #1,d0 * ........ .......0 0....... $&.....­. + LSR.w #1,d0 * ........ .......0 0....... $&.....?. AND.b #$C0,d0 * mask the type bits MOVE.b d0,Dtypef(a3) * save the data type @@ -970,7 +973,7 @@ LAB_1491 LEA des_sk(a3),a4 * reset descriptor stack pointer MOVE.l (sp)+,d0 * pull return address - LEA ram_base(a3),sp * set stack to RAM start + 1k* set stack to RAM start + 1k, flush stack + LEA ram_base(a3),sp * set stack to RAM start + 1k, flush stack MOVE.l d0,-(sp) * restore return address MOVEQ #0,d0 * clear longword @@ -3332,7 +3335,7 @@ LAB_1DD7 ADD.l d1,d1 * .......$ .......& ........ .......0 SWAP d1 * ........ .......0 .......$ .......& ROR.b #1,d1 * ........ .......0 .......$ &....... - LSR.w #1,d1 * ........ .......0 0....... $&.....­. + LSR.w #1,d1 * ........ .......0 0....... $&.....?. AND.b #$C0,d1 * mask the type bits MOVE.b d1,Dtypef(a3) * save the data type @@ -8996,7 +8999,7 @@ LAB_RMSG dc.b $0D,$0A,'Ready',$0D,$0A,$00 LAB_SMSG dc.b ' Bytes free',$0D,$0A,$0A - dc.b 'Matt Pearce Enhanced 68k BASIC Version 3.52',$0D,$0A,$00 + dc.b 'Enhanced 68k BASIC Version 3.52',$0D,$0A,$00 ************************************************************************************* diff --git a/roms/ehbasic/basic68k.hex b/roms/ehbasic/basic68k.hex deleted file mode 100644 index 4b27b8f..0000000 --- a/roms/ehbasic/basic68k.hex +++ /dev/null @@ -1,514 +0,0 @@ -:020000040000FA -:20C00000605248E7408041F90001004012100801000167F8114000024CDF01024E7548E706 -:20C02000408041F900010040121008010000670E102800024CDF0102003C00014E754CDF92 -:20C040000102023C00FE4E757E2E600001387E2E6000013241F90001004010BC0015307C52 -:20C060002000203C00006000B0BC000040006C0870051E3C00E44E4E2648D1C02748044AB9 -:20C080004FEB0400303C4EF9204F30C043FAFFDA20C930C043FA00DC20C930C043FAFF80B3 -:20C0A00020C930C043FAFF5C20C930C043FAFF9A20C930C043FAFF9820C930C043FA26086F -:20C0C00020C97000174005E4174005E5174005E8374005EE374005D6177C005005E6177C25 -:20C0E000000E05E2177C003805E749EB048E41EB05F02748042E6100032261000896202B3C -:20C10000044A90AB042E61001BBE41FA33D6610008E041FA29BA61001A5A41FA009227486E -:20C12000040261001FC44EEB04007E2C60567E2A60527E28604E7E26604A7E2460467E2234 -:20C1400060427E20603E7E1E603A7E1C60367E1A60327E18602E7E16602A7E1460267E1287 -:20C1600060227E10601E7E0E601A7E0C60167E0A60127E08600E7E06600A7E0460067E02E7 -:20C1800060027E00610002CA6100080843FA2FCC3E31700041F170006100085641FA330734 -:20C1A0006100084E202B04526B0461001B0E41FA33286100083C72FF27410452174105DC8B -:20C1C0004BEB0490610000EC61000BF267F6650861000156600003C2610006386100014AF8 -:20C1E000222B042A6100021865322250202B04329089E288538048402448484034D951C8C7 -:20C20000FFFC484051C8FFF4274A0432274A0436274A043A274A043E274A0442102B049055 -:20C220006764226B043245F12008274A0432274A0436274A043A274A043E274A0442276B15 -:20C24000044A044622099288E289538148414841352151C9FFFC484151C9FFF443EB0490ED -:20C26000244872FF24C124EB042AE24A534234D951CAFFFC601050484A1866FC3208024192 -:20C280000001D0C1228822484A9066EA610001986000FF246100077470206100076E700897 -:20C2A00061000768534160106100075E70206100075A720041EB04904EAB040C64FA67F89A -:20C2C000B03C00076718B03C000D670006C04A416606B03C002063E0B03C000867B6B27C41 -:20C2E00000FF640C1180100052416100071E60C8700760F6118020005242524110351000F3 -:20C3000067000094B03C002067EAB03C0030654AB03C003963DE7ADFCA00BA3C0041654095 -:20C32000BA3C004663CE603872002401174105DD700010351000675EB03C005F6458B03CAA -:20C34000003C641CB03C0030644C174005DAB03C00226776B03C0024679AB03C002A653672 -:20C36000082B000605DD662E903C002AD04043FA2BEC303100006B6E43FA2F78D2C076FF8F -:20C3800038015243103130006B0A5244B035400067F06040320411802000524252414A00DF -:20C3A000674A903C003A6706B03C00496604174005DD903C00556600FF78174005DA103508 -:20C3C000100067D2B02B05DA67CC118020005242524160EA38015243103130006AF85243CF -:20C3E0001031300066A21035100060AA700001026706118020005242218020004E75206B31 -:20C40000042E6002204020186708B2906EF659484E75594853804E75664C206B042E700061 -:20C4200020C0274804322A6B042E534D276B044A0446202B0432274004362740043A2740B8 -:20C44000043E274004427000174005EA610001CC49EB048E201F4FEB04002F0070002740C0 -:20C46000045A174005DF4E7567C24E75651272FF2741042A72004A00670AB03C00B366E6DE -:20C48000610003906100FF78610009326716B03C00B366D272FF2741042A6100091E6704E6 -:20C4A00061000370177C000005DD610004E6201867B422406100012A2018B0AB042A62A6DE -:20C4C00048E700C0610018004CDF030070206100053AB03C00226604462B05DD1018660835 -:20C4E0002049200866BE4E756AE44A2B05DD6BDE45FA2AD4727FC200E54945F21000101A47 -:20C50000610005087200121A6BD2301245FA2DE445F20000101A610004F251C9FFF860BC5B -:20C5200061000390202B0472B0AB043A6C00FC24610002142E882F2B045270AA610008744D -:20C54000610007021F2B05B5610006F82F2B05903F2B0594277C800000000590377C810030 -:20C56000059461000858B03C00AF66086100084C610006D02F2B05903F2B05942F2B0472AA -:20C580003F3C00816018300DC07C0001DAC0201D6700FC1C275D045261000822611A6140D6 -:20C5A0004A2B04526B04274D045A101D67D8B03C003A67E46000FBC86700008C0A000080F2 -:20C5C0006B0002F0B03C00286400FBB44880D04041FA28523030000048700000600007DCEF -:20C5E0004EEB0424B03C0003670C4E7566FC177C000005DC66F443EB0590BBC9650A274D5B -:20C60000045A276B04520456584F102B05DC6700FB9E41FA2E896000FB88206B042E67209E -:20C62000610001F0B2AB0452630E204D4A1866FC3008C07C0001D0C06100FDCC6500FB289C -:20C640004A20274804624E75610010D0174005E44E756600FB2A4A2B04526A00FAEA202BA5 -:20C66000045A6700FAE22A40276B045604524E75660C6100FDB2274D045A6000FF22610074 -:20C68000FDAC601C2F0D2F2B04523F3C009C487AFF0E600007282F0D2F2B04523F3C008D20 -:20C6A0006100071A487AFEF861000168206B042EB2AB0452630E204D4A1866FC3008C07CF0 -:20C6C0000001D0C06100FD406500FA9C2A48534D274D045A4E750C6F009C00046600FA60AE -:20C6E0001E00672EBE3C003A67289E3C00B0670853076600FA8A7EFF610006C06100055C21 -:20C700004A2B05946706177C00FF0594BF2B05946614276F000604522A6F000A41FAFE8028 -:20C720002E88600006984FEF000E601466160C6F008D00046600FA445C4F275F04522A5F49 -:20C7400061042A484E75204D7222743A6008B4006708B200670C101866F453484E75B2004E -:20C7600067F4101866F860F2610004F06100064EB03C00AD6714B03C00896600FA02204D24 -:20C78000610006382A486400F9F6102B0594671E610006286500FF12B03C008E6700FE1EDA -:20C7A0006100FE161015B03C00A967944E75101D76A9788B7A00101D6720B004660452455A -:20C7C00060F4B00366F051CDFFEE610005F06500FED86000FDE44A1D66FC534D4E75610092 -:20C7E0000F3A1400610005D63F00B03C008D6708B03C00896600F98853026606301F6000AD -:20C80000FDBC610005B6610AB03C002C67EA301F4E7572002001610005A4642E2F022401D8 -:20C82000D2816500F95AD2816500F954D2826500F94ED2816500F948903C0030D280690038 -:20C84000F93E6100057665D6241F2741042A4E753F3C8180600A3F3C810060046100055CE6 -:20C86000610007664A2B05B56B00F8E8663627480472610012FE277C800000000598301777 -:20C880003740059C176B0595059EB12B059E61001000610012FA610005240C00002C67BC7F -:20C8A000544F4E754A2F00016604529060E8539060E461000710274804721F2B05B570BD4F -:20C8C000610004F061000394102B05B5175F05B5E31861000372670012B6246B0472206B56 -:20C8E00005902250B3EB04466516B1EB04326510720032280004205061000B02206B0590B9 -:20C90000B9C866025C4C24D834904E75610006B6274804724A2B05B56B0C61001DD06100AC -:20C9200009B86000126A7200204161001DC06408720161000AFA108061000ADA609C6100D3 -:20C9400000B461000478674AB03C00A86764B03C00AC675EB03C002C6740B03C003B67008C -:20C960000086610002F64A2B05B56BD26100139E61000A5C7000102B05E6670C902C0007C7 -:20C98000902B05E56402610A616A60B611BC00001000700D6174700A6070142B05E5B42BBF -:20C9A00005E7650461EC603E942B05E264FA440260223F0061000D60340061000400B03CD9 -:20C9C00000296600F7BA301FB03C00A86606942B05E5631270005300C480670A702053024D -:20C9E000612851CAFFFC610003D26600FF5C4E75610009DC61000BC4670C32005341101807 -:20CA0000610851C9FFFA4E75703F2F01B03C00206528122B05E66610122B05E5922B05E2F6 -:20CA20006614174105E5600EB22B05E566082F006100FF60201F522B05E54EAB0412B03C07 -:20CA4000000D66187200122B05E4670C70004EAB041251C9FFFA700D174105E5221F4E75EB -:20CA60002A5F4A2B05E06A0A276B045E04526000F6E241FA2A526100FF782A6B045A4E7598 -:20CA80006100085EB03C0022660E61000306703B610003206100FF5E6100F80E70004A10C5 -:20CAA000660A6000FB5E206B04627098174005E0274804666100050E274804722F0D2A6B15 -:20CAC0000466610002F8661E4A2B05E06B726100FF386100F7D44A1066046000FB262A485B -:20CAE000534D610002D64A2B05B56A201400B03C00226706743A702C534D524D1600204D09 -:20CB0000610008D02A4A6100FDD260101F2B05B561001D82175F05B5610010746100029EAE -:20CB2000670AB03C002C6600FF38524D274D04662A5F610002886736487AFF7A6000027232 -:20CB40006100FC042A48524DB03C003A6712320DC27C0001DAC1241D6700F61C275D045E0B -:20CB60006100025AB03C00836700FF7860D2206B04664A2B05E06A06274804624E754A10C8 -:20CB800066024E7541FA29306000FE666610584F0C5700816600F5EC206F0002601C61005C -:20CBA0000428584F303C0081721C6002DFC1B0576600F5D0B1EF000266F2376F0006059CAC -:20CBC000276F00080598176F001205B56100021A176B059D059E102B0595B12B059E2748C1 -:20CBE000047261000CAC176F001205B561000FA0376F000C059C276F000E0598176B059D8C -:20CC0000059E102B0595B12B059E6100102C322F0006B1414A0067044A016A0E276F001405 -:20CC200004522A6F00186000F9764FEF001C6100018CB03C002C6600F9666100017E6100B8 -:20CC4000FF5E6116B040082B000705B566066500F5024E756400F4FC4E75534D7200174110 -:20CC600005B5601C41FA22A630301002487000002F2B05903F2B05941F2B05E332301000BB -:20CC80003F01610000E4177C000005E36100012E903C00BC652AB03C0003650A4A2B05E332 -:20CCA0006660600000867201E121102B05E3B32B05E3B02B05E36400F4C6610000FE60D0FA -:20CCC0004A2B05E3663CD03C000A645E66084A2B05B56B0008727200D000D0001200301F88 -:20CCE00041FA222AB070100064466100FF583F006100FF72301F222B05D86A223000672E40 -:20CD0000603C102B05B5122B05E3D000D301177C000005B5174105E3534D723060C041FA8F -:20CD200021ECB0701000641660C472FF301F6732B07C006467046100FF0C274105D8101FE4 -:20CD40001200E208174005E1375F059C275F0598176B059D059E102B0595B12B059EE2093A -:20CD60004E75102B05944E75615065001B284A006B00008CB03C002467001B1AB03C002502 -:20CD800067001B12B03C002E67001B0AB03C0022660C101D204D610006362A4A4E75B03C7F -:20CDA000002866406100FEB670296006487A096C702CB01D67066000F3C6101D1015B03C2D -:20CDC000002067F6B03C00A9640CB03C003A64067CD0D00690064E756100FE6A7228588F7C -:20CDE0006000FF0E610001E24A2B05B567000D846A06274805904E752010600004BCB03CE8 -:20CE000000B367D4B03C00B26700FF5EB03C00AE6606323C002C60C6B03C00AB67000514E5 -:20CE2000903C00BF6500F358C07C007FD04041FA2090323000004870100041FA20383030E4 -:20CE40000000671241F000004ED06100FF584A2B05B56A00F2FE4E756100FF4A4A2B05B52D -:20CE60006B00F2F04E75177C000005B5101D4E756100FDEA4A2B05B56A00F2D8141DB43C99 -:20CE8000002C6600F2FA2F2B0590610008A2205F4E756100FDC84A2B05B56B00F2B661000F -:20CEA0000DC47200141DB43C002C660C2F006100086A2200201F141DB43C00296600F2C0AB -:20CEC0004E756116B580600003F0610E8082600003E86106C082600003E061000228240039 -:20CEE00061000CEA6000021E6100021A4680600003C86100FD52650661000D3E6042177CF1 -:20CF0000000005B5610006B422482200206B0598610006AC240066044A8167249481670C09 -:20CF2000650470FF600822007001600220025381B30856C9FFFC6708640470FF60027001D8 -:20CF4000520012007001E338C02B05E167000CD270FF60000CCC6100FE5872FF61706100CA -:20CF6000FE5C66F24E75612E6708B43C00206420E5A060000344611E67F8B43C0020650A21 -:20CF80004A806A0C70FF60000330E4A06000032A70006000032461000786140061000C2EAA -:20CFA000610001624A024E75B03C00616410B03C0041640480404E75B03C005B4E75B03CCF -:20CFC000007B4E7561024E7572006100FDF0174105B461D46400F1A8720041EB046A20813D -:20CFE000174105B5B27C000464061180100052416100FDC865EE61B065EAB03C0024660CF4 -:20D00000002B0080046B6100FDB26010B03C0026660A002B0080046C6100FDA04A2B05DF82 -:20D02000670E6A14202B046A720841EB0432601C903C0028670000F4202B046A720441EB42 -:20D040000436080000176704544158482268000420506006B0986776D1C1B1C966F64A2B71 -:20D0600005DF660A45FAFF60B5D76600F0CE082B000005DF6600F0CC246B0442240A9489B5 -:20D08000204A5881D5C1274A0442E28A6712538248424842352051CAFFFC484251CAFFF42F -:20D0A0004A2B05DF6B0808000017660A6004D3AB0436D3AB043AD3AB043E20C020BC0000C1 -:20D0C0000000080000176706317C000000042200D2814841E219E249C23C00C0174105B51F -:20D0E000177C000005DF4E757005D02B05DBD080D0884E756100FCC46100FB484A2B059567 -:20D100006B00F0700C2B00A0059465000B586600F0624A2B05956A000B4C202B05904480E0 -:20D120006800F0502740042A4E753F2B05B472003F012F2B046A61BC48404A406600F024A9 -:20D14000275F046A321F301F3F2B042C3F0052416100FC6AB03C002C67D6174105DB61001A -:20D16000FC48375F05B4206B043E274805ACB1EB0442672E2010B0AB046A670A20680004C2 -:20D18000D1EB05AC60E44A2B05B46600EFD26100FF5850483018B02B05DB670000946000DB -:20D1A000EF924A2B05B46700EF8E6100FF3C202B046A20C0720408000017670272062741C9 -:20D1C00005A8122B05DB584830C1321F30C1610000AE274005A8532B05DB66EED1EB05A874 -:20D1E0006500EF88B1EB0446650C6100028EB1EB04466400EF76274804427000222B05A83D -:20D20000E2895341310051C9FFFC48414A4167065341484160EE206B05AC202B04429088F8 -:20D22000214000044A2B05B466525048375805DB7000274005A83218B2576500EF264A8081 -:20D240006702613A7200321FD081274005A8532B05DB66E2177C000005B572034A2B046B56 -:20D260006A0A7205177C008005B5600C4A2B046C6A06177C004005B56104D1C04E75202BA4 -:20D2800005A824004842C0C1C4C148424A426600EEDAD0826500EED4D0AB05A86500EECC29 -:20D2A0004E754A2B05B56A0461000310610001CC202B044690AB0442177C000005B5377C56 -:20D2C000A0000594274005906A000636003C00016000062E102B05E5C0BC000000FF60D8CA -:20D2E0004A2B04526B00EE704E7570AB6100FAC4177C008005DF6100FCDA274805B061E00A -:20D300000C1D00286600EE78177C007E05DF6100FCB46100FA9470BD6100FA982F2B046A13 -:20D320002F0D6100F41C206B05B0209F215F00044E75177C008105DF6100FA806100FC9436 -:20D340001F2B05B52F080C1500286600EE326100FA54205F274805B01F2B05B52028000421 -:20D360006100FCDA101FE3186100F8DC671243EB0476B9C96700EDD439280004291060024C -:20D380002F102F081F2B05B561322F0D206B05B02A506100F8C66100FA246600EDE22A5F2E -:20D3A000101F205F4A006A08209C315C00046002209F101FE3186100F88E4E754A2B05B592 -:20D3C0006A0007E424486000F51661000940742236027200534124485241103010006710DD -:20D3E000B0026704B00366F0B03C00226602524AD5C1B1CB651EB1EB042E6418224820018B -:20D4000066042041600E6126D1C1D3C15340112151C8FFFC43EB0476B9C96700ED2E390167 -:20D420002908274C0590177C008005B54E754A41672E2F007000174005DE7001C041D041A7 -:20D44000640470014840206B044691C0B1EB04426512274804462748044E201F4A414E75E5 -:20D4600030414E754A2B05DE6B00ED002F09610A225F177C008005DE60CC48E7E0E0276B01 -:20D48000044A0446222B044270002240206B043A5888246B043E6006617E41E8000AB1CA22 -:20D4A00065F65988246B0442602424280004D488201008000017671430280008D040D0C061 -:20D4C00041E8000A61525C48B1C266F82042B5C866D8204C45EB048E6004613C5C88B5C844 -:20D4E00066F82009672C20517200322900045281C23C00FED1C1246B0446B1CA670CE2893D -:20D500005341352051C9FFFC228A275104466000FF744CDF07074E7520106728B280642457 -:20D52000B0AB0446641E70FF302800044440C03C00FED0AB0446B0906706221022484E75AA -:20D54000274004464E75487AF7442F2B05906100F8184A2B05B56A00EBFA205F226B0590DB -:20D5600032280004D26900046500EBE42F086100FEBE2748059820573028000420506120B6 -:20D58000206B059061386118205F6132206B059822086700FE804481D2AB044E6000FE76A8 -:20D5A00032006714226B044E2F09534012D851C8FFFC2749044E205F4E75206B059048E7C3 -:20D5C0004040B9C866025C4C700022583018B9C86610B3EB0446660A7201C240D280D3AB74 -:20D5E000044620494CDF02024A804E756100013072016100FE3A10806000FE1AC1416100B3 -:20D60000F7A84A8167227000B2680004651A6014C1416100F7944A81670E302800049081FB -:20D62000640670003228000422486100FE0220492F00618AD1DF30016100FF666000FDD68A -:20D640007E0053472F006100F774B03C002C660C101D2F08610000D8205F2E006100F74A41 -:20D66000201F720053806B00EB0AB068000464B82207DE406506BE68000465AC3228000443 -:20D68000924060A46100FF342200675622486100FD9ED1C1D3C1340153421021B03C005B73 -:20D6A000640AB03C0041650400000020110051CAFFEA602E6100FF042200672622486100C5 -:20D6C000FD6ED1C1D3C1340153421021B03C0061650AB03C007B6404020000DF110051CA26 -:20D6E000FFEA6000FD30101D6100F8DE6100F6BA4A2B05B56A00EA5C20106000FBBC487A57 -:20D70000FBB86000FEB66100FEB24A406700EA6410106000FBC46100F6A26100F5266100DD -:20D72000F9DC7280D281C2806600EA484E756100F5126100F9C848404A406600EA36484088 -:20D740004E756100FE7667222C4D2A48D1C010103F002F0810BC00006100F6626100113669 -:20D76000205F301F10802A4E4E75374005944E756100F4D06100F98E2F006100F634619A7B -:20D78000205F4E75611E6100F6286100F4B66100F97448404A40670652406600E9D64840B2 -:20D7A000205F4E756100F49C6100F95A080000006600E97C20572E804ED06100F94820406A -:20D7C00010106000FB1461A810804E756100F936E2086500E95AD000C18870003010600013 -:20D7E000FAD86100F920E2086500E944D000C18820106000FAC4618C30804E7561A6610032 -:20D80000F5B06100F43E6100F8FC205F20804E756100F7B62F08182B05B56100F59461000C -:20D82000F7A8245FB82B05B56600E928201020D224C04A046AD83010309234804E754EABAA -:20D8400004066000F5644EEB04184EEB041E487AF56C6100FF504E756100FF162F083F00D3 -:20D8600074006100F55867066100F5422400321F205F1010B500C00167F84E750A2B008020 -:20D880000595176B059D059E102B0595B12B059E102B05946700033641EB0598102B059CBA -:20D8A0006746902B05946722650A376B059C05944400514844002F01B03C00206D04720053 -:20D8C00060042210E0A92081221F4A2B059E6B1A202B0598D0AB0590640AE290522B0594BC -:20D8E0006500E88C274005904E7543EB0590B3C866025049201122102740059093AB05901F -:20D900006408462B059544AB0590202B05906B2E6606374005944E752F0122007000102B57 -:20D9200005946714D2815BC8FFFC4A40670A6A027001530027410590221F174005944E7546 -:20D940004A2B05956B00E82C7E001747059E1E2B05946700E81E9EBC00000081177C00817C -:20D9600005942C2B0590277C800000000598377C8100059C6100FF1A70003740059CDC8629 -:20D98000274605986758377C8000059C610001304A2B05946748122B0594923C0082440130 -:20D9A000202B0590E2A87C00223C4000000041FA13F47A1E78016006E8A29282DC902400FC -:20D9C0002601E8A36402528390836AEC200258485284E28B670451CDFFF0DC8620062800C4 -:20D9E0007A004A8767166A0444877A80174505954847E18F7A885385DE876AFA2747059091 -:20DA000017450594277CB17217F80598377C8000059C176B0595059E611827440598671014 -:20DA2000377C8200059C176B0595059E6100FE624E7548E7F8004A2B05946776102B059CDF -:20DA40006770176B059E0595D02B0594640A903C00806400E71A6006903C008065541740BB -:20DA60000594222B0590242B05983801200148403600C2C2C0C24842C8C2C6C2D2BC0000F7 -:20DA8000800042414841D280D2846406D6BC00010000D2BC0000800042414841D2836B0873 -:20DAA000D281532B0594670A274105904CDF001F4E757000274005903740059460EE2F0781 -:20DAC00070002400142B05946700E690102B059C67669042D07C0080176B059E0595422B8A -:20DAE000059F262B0590282B0598B883674465069883562B059F614648412802614284C5D5 -:20DB00001E2B059F6708E20FE291E2525200D442640852816404E291524036006B1A0243FD -:20DB2000FF006600E64A2E1F17400594274105904E757201E2A960DE7000220060E8240415 -:20DB40002A034245484588C5680278FF3C043204CCC3C8C53E0642464846D8867C009C47AD -:20DB600095846A085341DC43D5856BF8484234064E7520104840374005946708807C008070 -:20DB80004840E18027400590102B05944E752F08206B0472082B000605B5670C610000C644 -:20DBA0002080205F4E752F086100FD60612C202B0590E0984840C07C007F022B008005951F -:20DBC000806B059448402080205F4E75376B059C0594276B059805904E75102B0594672099 -:20DBE000202B0590D0BC00000080640AE290522B05946500E57AC03C0000274005904E75C4 -:20DC0000174005954E757000102B059467F6102B0595488048C0E08065EA70014E7561E6E0 -:20DC200027400590377CA0000594D0806000FCD2177C000005954E75122B059C67C8102B46 -:20DC4000059E6BCA102B0595B22B0594660A222B0598B2AB0590670865B80A00008060B22D -:20DC600070004E75202B059067302F0172A0922B05946500E4FA660E4A2B05956A1A448054 -:20DC800069166000E4EAB23C002065027000E2A84A2B05956A024480221F2740042A4E7590 -:20DCA00070A0902B05946310B03C00206400025E72FFE1A1C3AB05904E7541FA17F0610061 -:20DCC000ED30202B045243FA0DDE720041EB05CC2401263110006714782F524490836AFA34 -:20DCE000D083118420005841524260E6D03C0030118020005348524843EB05D5B1C967009E -:20DD0000ECF00C10003067EE6000ECE643EB05C6742008AB000705956702742D1282142B96 -:20DD20000594660870307201600001A4177C000005ACB43C00816448277C98968000059875 -:20DD4000377C9800059C176B0595059E6100FCE4177C00F905AC6028376B0594059C276BA4 -:20DD600005900598176B0595059E277CCCCCCCCD0590377C7D0005946100FCB8522B05AC3D -:20DD8000277C98967F700598377C9800059C6100014C62C46750277CF423F8000598377CAD -:20DDA0009400059C41EB05906100013262202010122800042400E488D0826404E2905201DA -:20DDC0005601208011410004532B05AC60DA277C800000000598377C8000059C176B0595DD -:20DDE000059E6100FAAC6100FE7C7401102B05AC50006B0CB03C000964065300140070023E -:20DE000072005500174005AD174205AC100267026A14528113BC002E10004A0267085281C1 -:20DE200013BC003010007400708041FA1114263020005200D7AB042A08000007650467F2C6 -:20DE4000600266EE64064400D03C000BD03C002F584252411600C63C007F13831000532B24 -:20DE600005AC6608528113BC002E1000C03C00800A000080B43C001C66B010311000538156 -:20DE8000B03C003067F4B03C002E6702528113BC002B10024A2B05AD67386A0A13BC002D73 -:20DEA0001002442B05AD13BC00451001142B05AD702F5200943C000A64F8D43C003A138015 -:20DEC00010031382100413BC00001005600A1380100013BC0000100120494E757000122BDC -:20DEE000059CB22B0594660A222B0598B2AB05906708650453804E7552804E75277C800099 -:20DF000000000590377C810005944E75700027400590374005944E754A2B059467DE4A2BD5 -:20DF2000059C67E81F2B059D6A2072001741059D122B0594927C00806300E238202B05904E -:20DF4000E3A06600E22E65021E802F2B05903F2B05946100FC786100F9E8301F275F059848 -:20DF60003740059C1740059E102B0595B12B059E6100FAC06158175F05954E754A2B059486 -:20DF800067060A2B008005954E75277C800000000590377C810005944E754A2B05956A0041 -:20DFA000E1CE700027400590374005944E75277C800000000590177C000005954A2B05B460 -:20DFC0006A024481D23C0081174105944E75102B059467B6B03C006465B0177C000005B42B -:20DFE000222B0590B03C008762B06608B2BCB00F33C764A64A2B05956A0C177C00FF05B44B -:20E00000177C00000595277CB8AA3B290598377C8100059C177C0000059E6100FA16177CBE -:20E02000000005D91A2B05949A3C00806324202B059022002C054446DC7C0020ECA9174125 -:20E0400005D9EBA86700FF6827400590377C80000594277CB17217F80598377C8000059C73 -:20E06000177C0000059E6100F9CA202B05901A2B05949A7C00824445EAA872002C3CE6A372 -:20E08000D11041FA0D2078007A036136594853847A09612E594853847A1261264A2B05B468 -:20E0A0006A064481442B05D97083DC816B065380DC866AFA27460590D02B05D917400594B9 -:20E0C0004E7552842406E8A22601E8A34A806B0CD282DC83909851CDFFEA4E7592829C8328 -:20E0E000D09851CDFFDE4E754A2B0594670841EB05A06100FAB272AF7412202B05A0D080B8 -:20E100006402B30051CAFFF8274005A027400590377C800005946000F7F26138376B0594E3 -:20E12000059C276B0590059827410590174305946700E03C6100F7D46000F984277CC90F83 -:20E14000DAA30598377C8100059C176B0595059E6100F73E177C000005B4277CA2F9836FFF -:20E160000598377C7F00059C176B0595059E6100F8C2102B0594671C41FA0B2A2C2B0590A2 -:20E1800053006710903C00806B18B03C00206404E1AE661874817600203C800000002203F9 -:20E1A000605C4400B03C001E64EAE0AE176B0595059EDC866404462B0595DC866408462BA6 -:20E1C00005B4462B059EE48E67CA7A012028FFFC22009C9860089C989083D2826012240022 -:20E1E000EAA22601EAA34A866AECDC98D08392825285BABC0000001E66E4748126024A2B97 -:20E2000005B46B04C141C54327400590174205946000F6F8102B0594670000AA177C000018 -:20E2200005B4B03C008165286608202B0590D080671E277C800000000598377C8100059C73 -:20E24000176B0595059E6100F876177C00FF05B4202B05907282922B0594E2A841FA0AC626 -:20E260007C00223C400000007A1D78016006E8A2D282DC9024002601E8A390836AF020025F -:20E2800058485284E28351CDFFF2177C00820594274605906100F6744A2B05B46A261E2B12 -:20E2A0000595177C00000595277CC90FDAA20598377C8180059C177C00FF059E6100F5D251 -:20E2C000174705954E756100F4A8B03C00086400DEA201D04E756100F498B03C00086400D5 -:20E2E000DE9201904E75101D6100F486B03C00086400DE8022006100EAC4B03C00296600F0 -:20E30000DE7E6100EAB6700003106700F91470FF6000F90E4A2B05B56A00DE10246B059028 -:20E320003E2A00046700DE0470003F003F003F003F002F0A720020416100F0DA101DB03C6C -:20E34000002C6600DE3A6100028C4A026700DDDC6100E9084A2B05B56B00DDF84A2B0594E9 -:20E360006732322F000AB27C000864283001D241D240D24141FA0840277010020598303045 -:20E380001000907C01003740059C177C0000059E6100F4FE6100F976610001FC45EB05C696 -:20E3A0007C00782E3406524610326000677AB03C00456706B00466EE60EA3606534352468C -:20E3C00010326000B03C002D6600DDA8524610326000B03C00306704700A60085246700FDD -:20E3E000C032600034030C42000166025242D440700A90426E0CD440D6400C4300016E0285 -:20E4000076003C0270001580200053420C420001671270304A4367EE103230005343B00488 -:20E4200066E460F4158420004A426602340636025243382F00085244B2446322103040008A -:20E44000B03C00256706B03C002366EA7030BC4363061032300052431180400060D87C004B -:20E460007A0053426608740115BC00302000382F0008B2446402380153446B6210304000A1 -:20E480007E30B03C002567087E20B03C002366064A4266346042B03C002C66104A426608E5 -:20E4A0000C30002540FF66301E00602CB03C002D6710B03C002B66C00C12002D670414BC29 -:20E4C000002B1A004A4267081E322000534260084A0666041E121C0711874000609A4A4224 -:20E4E00066144A0567544A0666500C05002B67060C12002D66447A233E0153473C2F00040F -:20E5000053466E023C07103160000C000023671E0C00002567180C00002C67120C00002BC2 -:20E52000670C0C00002D67060C00002E6602100511807000534651CFFFCE41EC0006274CDE -:20E5400005906100F018302F000467203F400006610000824A026614613C3F6F0004000650 -:20E5600041EC0006274C05906100EFF2101DB03C00296600FDCA204C222B04466100F0401B -:20E580002741044622483200205F6100F032508F20496000EE80226F00043E290004342FB2 -:20E5A000000A3C2F0008320692426202D2476100EE7E6100EE60226F00042251780011B197 -:20E5C0002000400052445242BE4266027400BC4266EC4E75226F00043E29000422513C2FE4 -:20E5E000000A3F47000C7A007600740010316000B03C002C6742B03C00236706B03C00252C -:20E6000066084A856A105243602EB03C002B6706B03C002D66048400601EB03C002E661483 -:20E620004A856B143006906F000A3F40000C7AFF840060044A0266085246BE4662AE7C007F -:20E640003F4600083F43000E4E75B23C00216400DB22741F41EB05B678307600E288D7048D -:20E660001183200051CAFFF4177C000005D64A01670E4481D2BC000005D641F31000600ECA -:20E680001010670AB03C0030660E524860F243EB05D6B1C9660253486000ED34B23C00096F -:20E6A0006400DAD0740741EB05CE78301600E898C63C000F1A03DA3C00F6C70411832000DB -:20E6C00051CAFFEA60A24A2B05E8661E4EAB040C640E174005E9177C002005EA6000DF06A7 -:20E6E0004A2B05EA6704532B05EA4E754EAB040C650A102B05EA67F2102B05E9177C000064 -:20E7000005EA003C00014E756100E5524A2B05B56B00DA40612C64FC6100F4B260F6610013 -:20E72000E53C4A2B05B56B00DA2A611663FC6100F49C60F6B03C00296600DA44588F60001D -:20E74000E67A6100E678B03C002C66E83F2B05942F2B05906100E5064A2B05B56B00D9F48F -:20E76000275F0598301F3740059C176B0595059EB12B059E6000F4C2B03C002C672C6100AF -:20E78000EF9A4A006712B03C00106500D9E6B02B05E26404174005E2174005E66100E61EFE -:20E7A000672CB03C002C6600D9D66100EF6A4A006B00D9C0B03C00016500D9B8122B05E686 -:20E7C0006708B02B05E66E00D9AA174005E2102B05E6670AB02B05E26404174005E2902B1B -:20E7E00005E264FAD02B05E2D02B05E24400D02B05E6174005E74E754A2B05956B00D97419 -:20E800004A2B059467F048E77800202B059074002202761F082B000005946606D080D58200 -:20E82000D281D080D5822801D8845284B48465049484528151CBFFE627410590102B059425 -:20E84000907C0080E24864025240D07C0080174005944CDF001E6000F0B2101D6100E76A24 -:20E860006100E54620086000EA5041EB040020086000EA46277CC90FDAA20590377C8200A1 -:20E8800005944E75277CC90FDAA20590377C830005944E7548E77C00720026012801174139 -:20E8A0000595174105B5174105AF6100E510653CB03C002D6608177C00FF05956006B03CA4 -:20E8C000002B66066100E4F46522B03C002E67000092B03C00246700010AB03C00256700D4 -:20E8E00001646000008C6100E4D2646C610001A864F452836100E4C465F8B03C002E6606BD -:20E900006100E4B865FAB03C004566646100E4AC6528B03C002D6706B03C00B36608177CFC -:20E9200000FF05AF600EB03C002B6708B03C00B26600D84C6100E4846436C8FC000AC0BC5B -:20E94000000000FF903C0030D880B83C00306FE46100E46865FA6018B03C002E670460A6DE -:20E9600053836100E456649E6100012C64F260904A2B05AF6A024484D88376204A8167527E -:20E980006B085383D2815BCBFFFCB8BC000000266E00D7DCB8BCFFFFFFDA6D344484C9FC86 -:20E9A00000062F0841FA021017704000059C277040020598205F0A0300802741059017438C -:20E9C0000594176B0595059E4CDF003E6000F0647200260117430594274105904CDF003ED0 -:20E9E0004E75177C004005B576206100E3CE6514803C0020903C0061652AB03C0006642494 -:20EA0000D03C003A616C64E258836900D7626100E3AA65F4803C0020903C00616506B03C79 -:20EA2000000665E44A8167AA6B085383D2815BCBFFFC0A03008017430594274105904CDF46 -:20EA4000003E4E75177C004005B576206100E36C64D2B03C003264CC2401612464EE52838D -:20EA60006900D70C6100E35464BAB03C003265EE60B22401D48265CAD48265C6D48265C269 -:20EA8000D48265BEC0BC000000FF903C0030D48065B022024E752401D4826508D48265048F -:20EAA000D48164DC4E753B9ACA0005F5E10000989680000F4240000186A0000027100000E7 -:20EAC00003E8000000640000000A00000000332E3232FF0096769951FB00F0BDC21BF800A6 -:20EAE000C097CE7CF5009A130B96F100F684DF57EE00C5371912EB009DC5ADA8E700FC6F88 -:20EB00007C40E400C9F2C9CDE100A18F07D7DE00813F3979DA00CECB8F28D700A56FA5BA51 -:20EB2000D40084595161D000D3C21BCFCD00A968163FCA0087867832C600D8D726B7C3005A -:20EB4000AD78EBC6C0008AC72305BC00DE0B6B3AB900B1A2BC2FB6008E1BC9BFB200E35F8A -:20EB6000A932AF00B5E620F5AC009184E72AA800E8D4A510A500BA43B740A2009502F900A5 -:20EB80009E00EE6B28009B00BEBC20009800989680009400F42400009100C35000008E00FD -:20EBA0009C4000008A00FA0000008700C80000008400A00000008100800000007D00CCCC6C -:20EBC000CCCD7A00A3D70A3D770083126E987300D1B717597000A7C5AC476D008637BD0628 -:20EBE0006900D6BF94D66600ABCC7712630089705F415F00DBE6FECF5C00AFEBFF0C590004 -:20EC00008CBCCC095500E12E13425200B424DC354F00901D7CF74B00E69594BF4800B877E4 -:20EC2000AA3245009392EE8F4100EC1E4A7E3E00BCE508653B00971DA0503700F1C9008161 -:20EC40003400C16D9A0131009ABE14CD2D00F79687AE2A00C612062527009E74D1B823004C -:20EC6000FD87B5F32000CAD2F7F51D00A2425FF71A0081CEB32C1600CFB11EAD1300A627E0 -:20EC80004BBE100084EC3C980C00D4AD2DC00900AA2424990600881CEA140200D9C7DCEDF6 -:20ECA0004DBA76D42000000012E4051E09FB385C051111D5028B0D440145D7E200A2F61FA2 -:20ECC00000517C560028BE5400145F2F000A2F99000517CD00028BE7000145F40000A2FA30 -:20ECE0000000517D000028BF0000146000000A30000005180000028C00000146000000A31C -:20ED00000000005200000029000000150000000B000000060000000300000002000000014C -:20ED2000000000011DAC67050FADBAFD07F56EA703FEAB7701FFD55C00FFFAAB007FFF554E -:20ED4000003FFFEB001FFFFD001000000008000000040000000200000001000000008000D0 -:20ED6000000040000000200000001000000008000000040000000200000001000000008094 -:20ED80000000004000000020000000100000000800000004000000020000000100000000F4 -:20EDA00000000000E327D4F41058AEFA080AC48E0401562202002AB001000554008000AA30 -:20EDC00000400014002000020010000000080000000400000002000000010000000080001E -:20EDE000000040000000200000001000000008000000040000000200000001000000008014 -:20EE0000000000400000002000000010000000080000000400000002000000010000000073 -:20EE200000000000D7C8D6FCDD68D91CDC5CE136DC82DA8EDA2CD884D84CD944D7F6D87258 -:20EE4000D908D9B2D7D0D9BAD824DA32EA34EA22EA26E4C6E9A2E9D2E9D8EA2AD860D8B243 -:20EE6000DB22D82ED648D644D5F4F954DAE8E9ECF4A2F4B2DFE4DFE4DFE4DDE8DF30DF3042 -:20EE8000DFE4DFE4DFE4DFE4DFE4DFE4DFE4DFE4DFE4DFE4DFE4DFD6DFE4DFD6DFD6DFD67A -:20EEA000DFD6DFE4E01EE01E000000000000DFF2DFF2DFF200000000DFFCDFFCDFFCDDE815 -:20EEC000ED5EEDE0ED70E97EE3E2E414F938F228EA80F10EF27CF294F25AF354E8FAE90C87 -:20EEE000E922E83EE50AE882E846E7F4E7C4E72CF7DCF78AF426F848F85EF9AAF9B4F9C4B0 -:20EF0000F99AE826E73CE750E780F4540079E9840079E970007BEB26007BEBB2007FF00C70 -:20EF20000050DFC60046DFB60046DFBE0056E06A0056E05A007DF070005ADFDC0064DFE6D3 -:20EF4000FFF0BDC0000186A0FFFFD8F0000003E8FFFFFF9C0000000AFFFFFFFF00000002CC -:20EF6000FFFF0004FFFF0006FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA3 -:20EF80000008000C000E0012FFFF00140024003D0054006D007C008600930099FFFFFFFFDF -:20EFA00000A800D600E400F300F8FFFF010D013701620176018E019AFFFFFFFFFFFFFFFFC4 -:20EFC000FFFFFFFF01A9450100714601007C4E0200E7440200544903009E4401006352025A -:20EFE00001144C0100BE440100584702008952010133490000995205011B4703008D520479 -:20F00000012252010118530201544F0000F34E0200EE4901009B5702019A4C0200C55302F6 -:20F02000013C44010060500200FF440200664C0200CD4302003D4400006A4C0200D1500334 -:20F0400001074302004B4C0200C1430300464E0100E4570301A3470100865302015D420485 -:20F06000002F42040029540201624502006D5400016E4600007F530201485402016A4E014F -:20F0800000EB530201505503017D5703019E2BFF00022DFF00042AFF00002FFF00065EFFFA -:20F0A00001A941010018450100744F0000F53E00000E3C0000083EFF00103DFF000C3CFFEE -:20F0C000000A53020140490200A3410200145502018946020081500201035302014C520255 -:20F0E000012F4C0200C9450200774302004F53020144540201664102001F500300F844032C -:20F10000005B4C0300AF4C0200BA530301585602018E4102001B550501764C0500A843038A -:20F1200000414803009342030024420500354D0200D64D0200DF5205010D500000FD54036F -:20F14000017056050192530301374C0400B4520501284D0300DA550501820030004100487E -:20F16000005D006900770080008E00A200AF00C000CF00DE00EC00FC010F011E01310141FB -:20F18000015401680179018101884E45585420776974686F757420464F520053796E7461A3 -:20F1A000780052455455524E20776974686F757420474F535542004F7574206F6620444151 -:20F1C00054410046756E6374696F6E2063616C6C004F766572666C6F77004F7574206F6617 -:20F1E000206D656D6F727900556E646566696E65642073746174656D656E74004172726149 -:20F200007920626F756E647300446F75626C652064696D656E73696F6E0044697669646534 -:20F22000206279207A65726F00496C6C6567616C206469726563740054797065206D697393 -:20F240006D6174636800537472696E6720746F6F206C6F6E6700537472696E6720746F6FFF -:20F2600020636F6D706C65780043616E277420636F6E74696E756500556E646566696E6516 -:20F28000642066756E6374696F6E004C4F4F5020776974686F757420444F00556E64656671 -:20F2A000696E6564207661726961626C6500556E64696D656E73696F6E6564206172726130 -:20F2C000790057726F6E672064696D656E73696F6E73004164647265737300466F726D6194 -:20F2E00074004E6F7420696D706C656D656E74656400B400B200B300B5003CBBBE00BD0075 -:20F300003EBABC009E00425328C14E44B7534328D3544E28CC00494E2428D84954434C5274 -:20F32000A74954534554A6495454535428D900414C4C9B48522428D64C454152A14F4E5478 -:20F340009F4F5328C9004154418345438845454B28CE454697494D854F4B45994F9C004C5B -:20F360005345A94E44804F52B8585028C8004F52814EAB524528C3004554A44F544F894FA5 -:20F380005355428D0045582428D700468B4E43934E505554844E5428C00043415345242884 -:20F3A000D545454B28CF4546542428E1454E28D0455487495354A04F4144954F4728C74F28 -:20F3C0004B459A4F4F509D00415828DA49442428E3494E28DB004557A2455854824F54AE85 -:20F3E000554C4C92004E9152B90045454B28CD49DD4F4B45984F5328C452494E549E004193 -:20F400004D42415345DC45414486454D8F4553544F52458C455455524E8E49474854242845 -:20F42000E24E4428C6554E8A0041444428E041564596474E28BF494E28CA504328AC5152EB -:20F4400028C5544550AF544F509054522428D1574150A500414228A8414E28CB48454EADF7 -:20F460004FAA574F5049DE00434153452428D44E54494CB053494E472428E4535228C20063 -:20F48000414C28D2415250545228DF004149549448494C45B149445448A300B6000D0A4235 -:20F4A0007265616B00204572726F720020696E206C696E65200045787472612069676E6FCF -:20F4C0007265640D0A005265646F2066726F6D2073746172740D0A000D0A52656164790DFE -:20F4E0000A0020427974657320667265650D0A0A456E68616E6365642036386B20424153F3 -:20F5000049432056657273696F6E20332E35320D0A0000000000000000000000000000005A -:20F520000000000000000000000000000000000000000000000000000000000000000000CB -:20F540000000000000000000000000000000000000000000000000000000000000000000AB -:20F5600000000000000000000000000000000000000000000000000000000000000000008B -:20F5800000000000000000000000000000000000000000000000000000000000000000006B -:20F5A00000000000000000000000000000000000000000000000000000000000000000004B -:20F5C00000000000000000000000000000000000000000000000000000000000000000002B -:20F5E00000000000000000000000000000000000000000000000000000000000000000000B -:20F600000000000000000000000000000000000000000000000000000000000000000000EA -:20F620000000000000000000000000000000000000000000000000000000000000000000CA -:20F640000000000000000000000000000000000000000000000000000000000000000000AA -:20F6600000000000000000000000000000000000000000000000000000000000000000008A -:20F6800000000000000000000000000000000000000000000000000000000000000000006A -:20F6A00000000000000000000000000000000000000000000000000000000000000000004A -:20F6C00000000000000000000000000000000000000000000000000000000000000000002A -:20F6E00000000000000000000000000000000000000000000000000000000000000000000A -:20F700000000000000000000000000000000000000000000000000000000000000000000E9 -:20F720000000000000000000000000000000000000000000000000000000000000000000C9 -:20F740000000000000000000000000000000000000000000000000000000000000000000A9 -:20F76000000000000000000000000000000000000000000000000000000000000000000089 -:20F78000000000000000000000000000000000000000000000000000000000000000000069 -:20F7A000000000000000000000000000000000000000000000000000000000000000000049 -:20F7C000000000000000000000000000000000000000000000000000000000000000000029 -:20F7E000000000000000000000000000000000000000000000000000000000000000000009 -:20F800000000000000000000000000000000000000000000000000000000000000000000E8 -:20F820000000000000000000000000000000000000000000000000000000000000000000C8 -:20F840000000000000000000000000000000000000000000000000000000000000000000A8 -:20F86000000000000000000000000000000000000000000000000000000000000000000088 -:20F88000000000000000000000000000000000000000000000000000000000000000000068 -:20F8A000000000000000000000000000000000000000000000000000000000000000000048 -:20F8C000000000000000000000000000000000000000000000000000000000000000000028 -:20F8E000000000000000000000000000000000000000000000000000000000000000000008 -:20F900000000000000000000000000000000000000000000000000000000000000000000E7 -:20F920000000000000000000000000000000000000000000000000000000000000000000C7 -:20F940000000000000000000000000000000000000000000000000000000000000000000A7 -:20F96000000000000000000000000000000000000000000000000000000000000000000087 -:20F98000000000000000000000000000000000000000000000000000000000000000000067 -:20F9A000000000000000000000000000000000000000000000000000000000000000000047 -:20F9C000000000000000000000000000000000000000000000000000000000000000000027 -:20F9E000000000000000000000000000000000000000000000000000000000000000000007 -:20FA00000000000000000000000000000000000000000000000000000000000000000000E6 -:20FA20000000000000000000000000000000000000000000000000000000000000000000C6 -:20FA40000000000000000000000000000000000000000000000000000000000000000000A6 -:20FA6000000000000000000000000000000000000000000000000000000000000000000086 -:20FA8000000000000000000000000000000000000000000000000000000000000000000066 -:20FAA000000000000000000000000000000000000000000000000000000000000000000046 -:20FAC000000000000000000000000000000000000000000000000000000000000000000026 -:20FAE000000000000000000000000000000000000000000000000000000000000000000006 -:20FB00000000000000000000000000000000000000000000000000000000000000000000E5 -:20FB20000000000000000000000000000000000000000000000000000000000000000000C5 -:20FB40000000000000000000000000000000000000000000000000000000000000000000A5 -:20FB6000000000000000000000000000000000000000000000000000000000000000000085 -:20FB8000000000000000000000000000000000000000000000000000000000000000000065 -:20FBA000000000000000000000000000000000000000000000000000000000000000000045 -:20FBC000000000000000000000000000000000000000000000000000000000000000000025 -:20FBE000000000000000000000000000000000000000000000000000000000000000000005 -:20FC00000000000000000000000000000000000000000000000000000000000000000000E4 -:20FC20000000000000000000000000000000000000000000000000000000000000000000C4 -:20FC40000000000000000000000000000000000000000000000000000000000000000000A4 -:20FC6000000000000000000000000000000000000000000000000000000000000000000084 -:20FC8000000000000000000000000000000000000000000000000000000000000000000064 -:20FCA000000000000000000000000000000000000000000000000000000000000000000044 -:20FCC000000000000000000000000000000000000000000000000000000000000000000024 -:20FCE000000000000000000000000000000000000000000000000000000000000000000004 -:20FD00000000000000000000000000000000000000000000000000000000000000000000E3 -:20FD20000000000000000000000000000000000000000000000000000000000000000000C3 -:20FD40000000000000000000000000000000000000000000000000000000000000000000A3 -:20FD6000000000000000000000000000000000000000000000000000000000000000000083 -:20FD8000000000000000000000000000000000000000000000000000000000000000000063 -:20FDA000000000000000000000000000000000000000000000000000000000000000000043 -:20FDC000000000000000000000000000000000000000000000000000000000000000000023 -:20FDE000000000000000000000000000000000000000000000000000000000000000000003 -:20FE00000000000000000000000000000000000000000000000000000000000000000000E2 -:20FE20000000000000000000000000000000000000000000000000000000000000000000C2 -:20FE40000000000000000000000000000000000000000000000000000000000000000000A2 -:20FE6000000000000000000000000000000000000000000000000000000000000000000082 -:20FE8000000000000000000000000000000000000000000000000000000000000000000062 -:20FEA000000000000000000000000000000000000000000000000000000000000000000042 -:20FEC000000000000000000000000000000000000000000000000000000000000000000022 -:20FEE000000000000000000000000000000000000000000000000000000000000000000002 -:20FF00000000000000000000000000000000000000000000000000000000000000000000E1 -:20FF20000000000000000000000000000000000000000000000000000000000000000000C1 -:20FF40000000000000000000000000000000000000000000000000000000000000000000A1 -:20FF6000000000000000000000000000000000000000000000000000000000000000000081 -:20FF8000000000000000000000000000000000000000000000000000000000000000000061 -:20FFA000000000000000000000000000000000000000000000000000000000000000000041 -:20FFC000000000000000000000000000000000000000000000000000000000000000000021 -:1FFFE0000000000000000000000000000000000000000000000000000000000000000002 -:00000001FF diff --git a/roms/ehbasic/basic68k.inc b/roms/ehbasic/basic68k.inc index 98b882d..f15498f 100644 --- a/roms/ehbasic/basic68k.inc +++ b/roms/ehbasic/basic68k.inc @@ -1,9 +1,9 @@ * This lot is in RAM - ORG 100 * start of RAM + ORG 0 * start of RAM -ram_strt ds.l $300 * allow 1K for the stack, this should be plenty +ram_strt ds.l $100 * allow 1K for the stack, this should be plenty * for any BASIC program that doesn't do something * silly, it could even be much less. ram_base @@ -195,12 +195,3 @@ file_id ds.l 1 * load/save file ID even * dummy even value and zero pad byte -prg_strt - -* Use these two lines when running from ROM -*ram_addr EQU $01000 * RAM start address -*ram_size EQU $06000 * RAM size - -* Use these two lines when running from RAM -ram_addr EQU $04000 * RAM start address -ram_size EQU $04000 * RAM size \ No newline at end of file diff --git a/roms/ehbasic/basic68k.lst b/roms/ehbasic/basic68k.lst deleted file mode 100644 index 2a978a3..0000000 --- a/roms/ehbasic/basic68k.lst +++ /dev/null @@ -1,15179 +0,0 @@ -F00:0001 ************************************************************************************* -F00:0002 * * -F00:0003 * Enhanced BASIC for the Motorola MC680xx * -F00:0004 * * -F00:0005 * This version is for the TS2 single board computer. * -F00:0006 * Jeff Tranter (tranter@pobox.com) * -F00:0007 * * -F00:0008 ************************************************************************************* -F00:0009 * * -F00:0010 * Copyright(C) 2002-12 by Lee Davison. This program may be freely distributed * -F00:0011 * for personal use only. All commercial rights are reserved. * -F00:0012 * * -F00:0013 * More 68000 and other projects can be found on my website at .. * -F00:0014 * * -F00:0015 * http://mycorner.no-ip.org/index.html * -F00:0016 * * -F00:0017 * mail : leeedavison@googlemail.com * -F00:0018 * * -F00:0019 ************************************************************************************* -F00:0020 -F00:0021 * Ver 3.52 -F00:0022 -F00:0023 * Ver 3.52 stops USING$() from reading beyond the end of the format string -F00:0024 * Ver 3.51 fixes the UCASE$() and LCASE$() functions for null strings -F00:0025 * Ver 3.50 unary minus in concatenate generates a type mismatch error -F00:0026 * Ver 3.49 doesn't tokenise 'DEF' or 'DEC' within a hex value -F00:0027 * Ver 3.48 allows scientific notation underflow in the USING$() function -F00:0028 * Ver 3.47 traps the use of array elements as the FOR loop variable -F00:0029 * Ver 3.46 updates function and function variable handling -F00:0030 -F00:0031 ************************************************************************************* -F00:0032 * -F00:0033 * Ver 3.45 makes the handling of non existant variables consistent and gives the -F00:0034 * option of not returning an error for a non existant variable. If this is the -F00:0035 * behaviour you want just change novar to some non zero value -F00:0036 -F00:0037 novar EQU 0 * non existant variables cause errors -F00:0038 -F00:0039 -F00:0040 ************************************************************************************* -F00:0041 -F00:0042 * Ver 3.44 adds overflow indication to the USING$() function -F00:0043 * Ver 3.43 removes an undocumented feature of concatenating null strings -F00:0044 * Ver 3.42 reimplements backspace so that characters are overwritten with [SPACE] -F00:0045 * Ver 3.41 removes undocumented features of the USING$() function -F00:0046 * Ver 3.40 adds the USING$() function -F00:0047 * Ver 3.33 adds the file requester to LOAD and SAVE -F00:0048 * Ver 3.32 adds the optional ELSE clause to IF .. THEN -F00:0049 -F00:0050 ************************************************************************************* -F00:0051 * -F00:0052 * Version 3.25 adds the option to change the behaviour of INPUT so that a null -F00:0053 * response does not cause a program break. If this is the behaviour you want just -F00:0054 * change nobrk to some non zero value. -F00:0055 -F00:0056 nobrk EQU 0 * null response to INPUT causes a break -F00:0057 -F00:0058 -F00:0059 ************************************************************************************* -F00:0060 * -F00:0061 * Version 3.xx replaces the fixed RAM addressing from previous versions with a RAM -F00:0062 * pointer in a3. this means that this could now be run as a task on a multitasking -F00:0063 * system where memory resources may change. -F00:0064 -F00:0065 -F00:0066 ************************************************************************************* -F00:0067 -F00:0068 -F00:0069 INCLUDE "basic68k.inc" -F01:0001 -F01:0002 * This lot is in RAM -F01:0003 -F01:0004 ORG 0 * start of RAM -F01:0005 -F01:0006 ram_strt ds.l $100 * allow 1K for the stack, this should be plenty -F01:0007 * for any BASIC program that doesn't do something -F01:0008 * silly, it could even be much less. -F01:0009 ram_base -F01:0010 LAB_WARM ds.w 1 * BASIC warm start entry point -F01:0011 Wrmjpv ds.l 1 * BASIC warm start jump vector -F01:0012 -F01:0013 Usrjmp ds.w 1 * USR function JMP address -F01:0014 Usrjpv ds.l 1 * USR function JMP vector -F01:0015 -F01:0016 * system dependant i/o vectors -F01:0017 * these are in RAM and are set at start-up -F01:0018 -F01:0019 V_INPT ds.w 1 * non halting scan input device entry point -F01:0020 V_INPTv ds.l 1 * non halting scan input device jump vector -F01:0021 -F01:0022 V_OUTP ds.w 1 * send byte to output device entry point -F01:0023 V_OUTPv ds.l 1 * send byte to output device jump vector -F01:0024 -F01:0025 V_LOAD ds.w 1 * load BASIC program entry point -F01:0026 V_LOADv ds.l 1 * load BASIC program jump vector -F01:0027 -F01:0028 V_SAVE ds.w 1 * save BASIC program entry point -F01:0029 V_SAVEv ds.l 1 * save BASIC program jump vector -F01:0030 -F01:0031 V_CTLC ds.w 1 * save CTRL-C check entry point -F01:0032 V_CTLCv ds.l 1 * save CTRL-C check jump vector -F01:0033 -F01:0034 Itemp ds.l 1 * temporary integer (for GOTO etc) -F01:0035 -F01:0036 Smeml ds.l 1 * start of memory (start of program) -F01:0037 -F01:0038 * the program is stored as a series of lines each line having the following format -F01:0039 * -F01:0040 * ds.l 1 * pointer to the next line or $00000000 if [EOT] -F01:0041 * ds.l 1 * line number -F01:0042 * ds.b n * program bytes -F01:0043 * dc.b $00 * [EOL] marker, there will be a second $00 byte, if -F01:0044 * * needed, to pad the line to an even number of bytes -F01:0045 -F01:0046 Sfncl ds.l 1 * start of functions (end of Program) -F01:0047 -F01:0048 * the functions are stored as function name, function execute pointer and function -F01:0049 * variable name -F01:0050 * -F01:0051 * ds.l 1 * name -F01:0052 * ds.l 1 * execute pointer -F01:0053 * ds.l 1 * function variable -F01:0054 -F01:0055 Svarl ds.l 1 * start of variables (end of functions) -F01:0056 -F01:0057 * the variables are stored as variable name, variable value -F01:0058 * -F01:0059 * ds.l 1 * name -F01:0060 * ds.l 1 * packed float or integer value -F01:0061 -F01:0062 Sstrl ds.l 1 * start of strings (end of variables) -F01:0063 -F01:0064 * the strings are stored as string name, string pointer and string length -F01:0065 * -F01:0066 * ds.l 1 * name -F01:0067 * ds.l 1 * string pointer -F01:0068 * ds.w 1 * string length -F01:0069 -F01:0070 Sarryl ds.l 1 * start of arrays (end of strings) -F01:0071 -F01:0072 * the arrays are stored as array name, array size, array dimensions count, array -F01:0073 * dimensions upper bounds and array elements -F01:0074 * -F01:0075 * ds.l 1 * name -F01:0076 * ds.l 1 * size including this header -F01:0077 * ds.w 1 * dimensions count -F01:0078 * ds.w 1 * 1st dimension upper bound -F01:0079 * ds.w 1 * 2nd dimension upper bound -F01:0080 * ... * ... -F01:0081 * ds.w 1 * nth dimension upper bound -F01:0082 * -F01:0083 * then (i1+1)*(i2+1)...*(in+1) of either .. -F01:0084 * -F01:0085 * ds.l 1 * packed float or integer value -F01:0086 * -F01:0087 * .. if float or integer, or .. -F01:0088 * -F01:0089 * ds.l 1 * string pointer -F01:0090 * ds.w 1 * string length -F01:0091 * -F01:0092 * .. if string -F01:0093 -F01:0094 Earryl ds.l 1 * end of arrays (start of free mem) -F01:0095 Sstorl ds.l 1 * string storage (moving down) -F01:0096 Ememl ds.l 1 * end of memory (upper bound of RAM) -F01:0097 Sutill ds.l 1 * string utility ptr -F01:0098 Clinel ds.l 1 * current line (Basic line number) -F01:0099 Blinel ds.l 1 * break line (Basic line number) -F01:0100 -F01:0101 Cpntrl ds.l 1 * continue pointer -F01:0102 Dlinel ds.l 1 * current DATA line -F01:0103 Dptrl ds.l 1 * DATA pointer -F01:0104 Rdptrl ds.l 1 * read pointer -F01:0105 Varname ds.l 1 * current var name -F01:0106 Cvaral ds.l 1 * current var address -F01:0107 Lvarpl ds.l 1 * variable pointer for LET and FOR/NEXT -F01:0108 -F01:0109 des_sk_e ds.l 6 * descriptor stack end address -F01:0110 des_sk * descriptor stack start address -F01:0111 * use a4 for the descriptor pointer -F01:0112 ds.w 1 -F01:0113 Ibuffs ds.l $40 * start of input buffer -F01:0114 Ibuffe -F01:0115 * end of input buffer -F01:0116 -F01:0117 FAC1_m ds.l 1 * FAC1 mantissa1 -F01:0118 FAC1_e ds.w 1 * FAC1 exponent -F01:0119 FAC1_s EQU FAC1_e+1 * FAC1 sign (b7) -F01:0120 ds.w 1 -F01:0121 -F01:0122 FAC2_m ds.l 1 * FAC2 mantissa1 -F01:0123 FAC2_e ds.l 1 * FAC2 exponent -F01:0124 FAC2_s EQU FAC2_e+1 * FAC2 sign (b7) -F01:0125 FAC_sc EQU FAC2_e+2 * FAC sign comparison, Acc#1 vs #2 -F01:0126 flag EQU FAC2_e+3 * flag byte for divide routine -F01:0127 -F01:0128 PRNlword ds.l 1 * PRNG seed long word -F01:0129 -F01:0130 ut1_pl ds.l 1 * utility pointer 1 -F01:0131 -F01:0132 Asptl ds.l 1 * array size/pointer -F01:0133 Astrtl ds.l 1 * array start pointer -F01:0134 -F01:0135 numexp EQU Astrtl * string to float number exponent count -F01:0136 expcnt EQU Astrtl+1 * string to float exponent count -F01:0137 -F01:0138 expneg EQU Astrtl+3 * string to float eval exponent -ve flag -F01:0139 -F01:0140 func_l ds.l 1 * function pointer -F01:0141 -F01:0142 -F01:0143 * these two need to be a word aligned pair ! -F01:0144 Defdim ds.w 1 * default DIM flag -F01:0145 cosout EQU Defdim * flag which CORDIC output (re-use byte) -F01:0146 Dtypef EQU Defdim+1 * data type flag, $80=string, $40=integer, $00=float -F01:0147 -F01:0148 -F01:0149 Binss ds.l 4 * number to bin string start (32 chrs) -F01:0150 -F01:0151 Decss ds.l 1 * number to decimal string start (16 chrs) -F01:0152 ds.w 1 * -F01:0153 Usdss ds.w 1 * unsigned decimal string start (10 chrs) -F01:0154 -F01:0155 Hexss ds.l 2 * number to hex string start (8 chrs) -F01:0156 -F01:0157 BHsend ds.w 1 * bin/decimal/hex string end -F01:0158 -F01:0159 -F01:0160 prstk ds.b 1 * stacked function index -F01:0161 -F01:0162 tpower ds.b 1 * remember CORDIC power -F01:0163 -F01:0164 Asrch ds.b 1 * scan-between-quotes flag, alt search character -F01:0165 -F01:0166 Dimcnt ds.b 1 * # of dimensions -F01:0167 -F01:0168 Breakf ds.b 1 * break flag, $00=END else=break -F01:0169 Oquote ds.b 1 * open quote flag (Flag: DATA; LIST; memory) -F01:0170 Gclctd ds.b 1 * garbage collected flag -F01:0171 Sufnxf ds.b 1 * subscript/FNX flag, 1xxx xxx = FN(0xxx xxx) -F01:0172 Imode ds.b 1 * input mode flag, $00=INPUT, $98=READ -F01:0173 -F01:0174 Cflag ds.b 1 * comparison evaluation flag -F01:0175 -F01:0176 TabSiz ds.b 1 * TAB step size -F01:0177 -F01:0178 comp_f ds.b 1 * compare function flag, bits 0,1 and 2 used -F01:0179 * bit 2 set if > -F01:0180 * bit 1 set if = -F01:0181 * bit 0 set if < -F01:0182 -F01:0183 Nullct ds.b 1 * nulls output after each line -F01:0184 TPos ds.b 1 * BASIC terminal position byte -F01:0185 TWidth ds.b 1 * BASIC terminal width byte -F01:0186 Iclim ds.b 1 * input column limit -F01:0187 ccflag ds.b 1 * CTRL-C check flag -F01:0188 ccbyte ds.b 1 * CTRL-C last received byte -F01:0189 ccnull ds.b 1 * CTRL-C last received byte 'life' timer -F01:0190 -F01:0191 * these variables for simulator load/save routines -F01:0192 -F01:0193 file_byte ds.b 1 * load/save data byte -F01:0194 file_id ds.l 1 * load/save file ID -F01:0195 -F01:0196 even * dummy even value and zero pad byte -F01:0197 -F01:0198 prg_strt -F01:0199 -F01:0200 * Use these two lines when running from ROM -F01:0201 ram_addr EQU $02000 * RAM start address -F01:0202 ram_size EQU $06000 * RAM size -F01:0203 -F01:0204 * Use these two lines when running from RAM -F01:0205 *ram_addr EQU $04000 * RAM start address -F01:0206 *ram_size EQU $04000 * RAM size -F01:0207 -F00:0070 * RAM offset definitions -F00:0071 -F00:0072 * Use this value to run out of ROM -F00:0073 ORG $00C000 * past the vectors in a real system -F00:0074 * Use this value to run out of RAM -F00:0075 * ORG $000800 * past the vectors in a real system -F00:0076 -F00:0077 ACIA_1 = $00010040 * Console ACIA base address -F00:0078 -F00:0079 BRA code_start * For convenience, so you can start from first address - S02:0000C000: 60 52 -F00:0080 -F00:0081 ************************************************************************************* -F00:0082 * -F00:0083 * the following code is simulator specific, change to suit your system -F00:0084 -F00:0085 * output character to the console from register d0.b -F00:0086 -F00:0087 VEC_OUT -F00:0088 MOVEM.L A0/D1,-(A7) * Save working registers - S02:0000C002: 48 E7 40 80 -F00:0089 LEA.L ACIA_1,A0 * A0 points to console ACIA - S02:0000C006: 41 F9 00 01 00 40 -F00:0090 TXNOTREADY -F00:0091 MOVE.B (A0),D1 * Read ACIA status - S02:0000C00C: 12 10 -F00:0092 BTST #1,D1 * Test TDRE bit - S02:0000C00E: 08 01 00 01 -F00:0093 BEQ.S TXNOTREADY * Until ACIA Tx ready - S02:0000C012: 67 F8 -F00:0094 MOVE.B D0,2(A0) * Write character to send - S02:0000C014: 11 40 00 02 -F00:0095 MOVEM.L (A7)+,A0/D1 * Restore working registers - S02:0000C018: 4C DF 01 02 -F00:0096 RTS - S02:0000C01C: 4E 75 -F00:0097 -F00:0098 ************************************************************************************* -F00:0099 * -F00:0100 * input a character from the console into register d0 -F00:0101 * else return Cb=0 if there's no character available -F00:0102 -F00:0103 VEC_IN -F00:0104 MOVEM.L A0/D1,-(A7) * Save working registers - S02:0000C01E: 48 E7 40 80 -F00:0105 LEA.L ACIA_1,A0 * A0 points to console ACIA - S02:0000C022: 41 F9 00 01 00 40 -F00:0106 MOVE.B (A0),D1 * Read ACIA status - S02:0000C028: 12 10 -F00:0107 BTST #0,D1 * Test RDRF bit - S02:0000C02A: 08 01 00 00 -F00:0108 BEQ.S RXNOTREADY * Branch If ACIA Rx not ready - S02:0000C02E: 67 0E -F00:0109 MOVE.B 2(A0),D0 * Read character received - S02:0000C030: 10 28 00 02 -F00:0110 MOVEM.L (A7)+,A0/D1 * Restore working registers - S02:0000C034: 4C DF 01 02 -F00:0111 ORI.b #1,CCR * Set the carry, flag we got a byte - S02:0000C038: 00 3C 00 01 -F00:0112 RTS * Return - S02:0000C03C: 4E 75 -F00:0113 RXNOTREADY: -F00:0114 MOVEM.L (A7)+,A0/D1 * Restore working registers - S02:0000C03E: 4C DF 01 02 -F00:0115 ANDI.b #$FE,CCR * Clear the carry, flag character available - S02:0000C042: 02 3C 00 FE -F00:0116 RTS - S02:0000C046: 4E 75 -F00:0117 -F00:0118 ************************************************************************************* -F00:0119 * -F00:0120 * LOAD routine for the TS2 computer (not implemented) -F00:0121 -F00:0122 VEC_LD -F00:0123 MOVEQ #$2E,d7 * error code $2E "Not implemented" error - S02:0000C048: 7E 2E -F00:0124 BRA LAB_XERR * do error #d7, then warm start - S02:0000C04A: 60 00 01 38 -F00:0125 -F00:0126 ************************************************************************************* -F00:0127 * -F00:0128 * SAVE routine for the TS2 computer (not implemented) -F00:0129 -F00:0130 VEC_SV -F00:0131 MOVEQ #$2E,d7 * error code $2E "Not implemented" error - S02:0000C04E: 7E 2E -F00:0132 BRA LAB_XERR * do error #d7, then warm start - S02:0000C050: 60 00 01 32 -F00:0133 -F00:0134 ************************************************************************************* -F00:0135 * -F00:0136 * turn off simulator key echo -F00:0137 -F00:0138 code_start -F00:0139 * Set up ACIA parameters -F00:0140 LEA.L ACIA_1,A0 * A0 points to console ACIA - S02:0000C054: 41 F9 00 01 00 40 -F00:0141 MOVE.B #$15,(A0) * Set up ACIA1 constants (no IRQ, - S02:0000C05A: 10 BC 00 15 -F00:0142 * RTS* low, 8 bit, no parity, 1 stop) -F00:0143 -F00:0144 * to tell EhBASIC where and how much RAM it has pass the address in a0 and the size -F00:0145 * in d0. these values are at the end of the .inc file -F00:0146 -F00:0147 MOVEA.l #ram_addr,a0 * tell BASIC where RAM starts - S02:0000C05E: 30 7C 20 00 -F00:0148 MOVE.l #ram_size,d0 * tell BASIC how big RAM is - S02:0000C062: 20 3C 00 00 60 00 -F00:0149 -F00:0150 * end of simulator specific code -F00:0151 -F00:0152 -F00:0153 **************************************************************************************** -F00:0154 **************************************************************************************** -F00:0155 **************************************************************************************** -F00:0156 **************************************************************************************** -F00:0157 * -F00:0158 * Register use :- (must improve this !!) -F00:0159 * -F00:0160 * a6 - temp Bpntr * temporary BASIC execute pointer -F00:0161 * a5 - Bpntr * BASIC execute (get byte) pointer -F00:0162 * a4 - des_sk * descriptor stack pointer -F00:0163 * a3 - ram_strt * start of RAM. all RAM references are offsets -F00:0164 * * from this value -F00:0165 * -F00:0166 -F00:0167 ************************************************************************************* -F00:0168 * -F00:0169 * BASIC cold start entry point. assume entry with RAM address in a0 and RAM length -F00:0170 * in d0 -F00:0171 -F00:0172 LAB_COLD -F00:0173 CMP.l #$4000,d0 * compare size with 16k - S02:0000C068: B0 BC 00 00 40 00 -F00:0174 BGE.s LAB_sizok * branch if >= 16k - S02:0000C06E: 6C 08 -F00:0175 -F00:0176 MOVEQ #5,d0 * error 5 - not enough RAM - S02:0000C070: 70 05 -F00:0177 move.b #228,D7 * Go to TUTOR function - S02:0000C072: 1E 3C 00 E4 -F00:0178 trap #14 * Call TRAP14 handler - S02:0000C076: 4E 4E -F00:0179 -F00:0180 LAB_sizok -F00:0181 MOVEA.l a0,a3 * copy RAM base to a3 - S02:0000C078: 26 48 -F00:0182 ADDA.l d0,a0 * a0 is top of RAM - S02:0000C07A: D1 C0 -F00:0183 MOVE.l a0,Ememl(a3) * set end of mem - S02:0000C07C: 27 48 04 4A -F00:0184 LEA ram_base(a3),sp * set stack to RAM start + 1k - S02:0000C080: 4F EB 04 00 -F00:0185 -F00:0186 MOVE.w #$4EF9,d0 * JMP opcode - S02:0000C084: 30 3C 4E F9 -F00:0187 MOVEA.l sp,a0 * point to start of vector table - S02:0000C088: 20 4F -F00:0188 -F00:0189 MOVE.w d0,(a0)+ * LAB_WARM - S02:0000C08A: 30 C0 -F00:0190 LEA LAB_COLD(pc),a1 * initial warm start vector - S02:0000C08C: 43 FA FF DA -F00:0191 MOVE.l a1,(a0)+ * set vector - S02:0000C090: 20 C9 -F00:0192 -F00:0193 MOVE.w d0,(a0)+ * Usrjmp - S02:0000C092: 30 C0 -F00:0194 LEA LAB_FCER(pc),a1 * initial user function vector - S02:0000C094: 43 FA 00 DC -F00:0195 * "Function call" error -F00:0196 MOVE.l a1,(a0)+ * set vector - S02:0000C098: 20 C9 -F00:0197 -F00:0198 MOVE.w d0,(a0)+ * V_INPT JMP opcode - S02:0000C09A: 30 C0 -F00:0199 LEA VEC_IN(pc),a1 * get byte from input device vector - S02:0000C09C: 43 FA FF 80 -F00:0200 MOVE.l a1,(a0)+ * set vector - S02:0000C0A0: 20 C9 -F00:0201 -F00:0202 MOVE.w d0,(a0)+ * V_OUTP JMP opcode - S02:0000C0A2: 30 C0 -F00:0203 LEA VEC_OUT(pc),a1 * send byte to output device vector - S02:0000C0A4: 43 FA FF 5C -F00:0204 MOVE.l a1,(a0)+ * set vector - S02:0000C0A8: 20 C9 -F00:0205 -F00:0206 MOVE.w d0,(a0)+ * V_LOAD JMP opcode - S02:0000C0AA: 30 C0 -F00:0207 LEA VEC_LD(pc),a1 * load BASIC program vector - S02:0000C0AC: 43 FA FF 9A -F00:0208 MOVE.l a1,(a0)+ * set vector - S02:0000C0B0: 20 C9 -F00:0209 -F00:0210 MOVE.w d0,(a0)+ * V_SAVE JMP opcode - S02:0000C0B2: 30 C0 -F00:0211 LEA VEC_SV(pc),a1 * save BASIC program vector - S02:0000C0B4: 43 FA FF 98 -F00:0212 MOVE.l a1,(a0)+ * set vector - S02:0000C0B8: 20 C9 -F00:0213 -F00:0214 MOVE.w d0,(a0)+ * V_CTLC JMP opcode - S02:0000C0BA: 30 C0 -F00:0215 LEA VEC_CC(pc),a1 * save CTRL-C check vector - S02:0000C0BC: 43 FA 26 08 -F00:0216 MOVE.l a1,(a0)+ * set vector - S02:0000C0C0: 20 C9 -F00:0217 -F00:0218 * set-up start values -F00:0219 -F00:0220 *##LAB_GMEM -F00:0221 MOVEQ #$00,d0 * clear d0 - S02:0000C0C2: 70 00 -F00:0222 MOVE.b d0,Nullct(a3) * default NULL count - S02:0000C0C4: 17 40 05 E4 -F00:0223 MOVE.b d0,TPos(a3) * clear terminal position - S02:0000C0C8: 17 40 05 E5 -F00:0224 MOVE.b d0,ccflag(a3) * allow CTRL-C check - S02:0000C0CC: 17 40 05 E8 -F00:0225 MOVE.w d0,prg_strt-2(a3) * clear start word - S02:0000C0D0: 37 40 05 EE -F00:0226 MOVE.w d0,BHsend(a3) * clear value to string end word - S02:0000C0D4: 37 40 05 D6 -F00:0227 -F00:0228 MOVE.b #$50,TWidth(a3) * default terminal width byte for simulator - S02:0000C0D8: 17 7C 00 50 05 E6 -F00:0229 MOVE.b #$0E,TabSiz(a3) * save default tab size = 14 - S02:0000C0DE: 17 7C 00 0E 05 E2 -F00:0230 -F00:0231 MOVE.b #$38,Iclim(a3) * default limit for TAB = 14 for simulator - S02:0000C0E4: 17 7C 00 38 05 E7 -F00:0232 -F00:0233 LEA des_sk(a3),a4 * set descriptor stack start - S02:0000C0EA: 49 EB 04 8E -F00:0234 -F00:0235 LEA prg_strt(a3),a0 * get start of mem - S02:0000C0EE: 41 EB 05 F0 -F00:0236 MOVE.l a0,Smeml(a3) * save start of mem - S02:0000C0F2: 27 48 04 2E -F00:0237 -F00:0238 BSR LAB_1463 * do "NEW" and "CLEAR" - S02:0000C0F6: 61 00 03 22 -F00:0239 BSR LAB_CRLF * print CR/LF - S02:0000C0FA: 61 00 08 96 -F00:0240 MOVE.l Ememl(a3),d0 * get end of mem - S02:0000C0FE: 20 2B 04 4A -F00:0241 SUB.l Smeml(a3),d0 * subtract start of mem - S02:0000C102: 90 AB 04 2E -F00:0242 -F00:0243 BSR LAB_295E * print d0 as unsigned integer (bytes free) - S02:0000C106: 61 00 1B BE -F00:0244 LEA LAB_SMSG(pc),a0 * point to start message - S02:0000C10A: 41 FA 33 D6 -F00:0245 BSR LAB_18C3 * print null terminated string from memory - S02:0000C10E: 61 00 08 E0 -F00:0246 -F00:0247 LEA LAB_RSED(pc),a0 * get pointer to value - S02:0000C112: 41 FA 29 BA -F00:0248 BSR LAB_UFAC * unpack memory (a0) into FAC1 - S02:0000C116: 61 00 1A 5A -F00:0249 -F00:0250 LEA LAB_1274(pc),a0 * get warm start vector - S02:0000C11A: 41 FA 00 92 -F00:0251 MOVE.l a0,Wrmjpv(a3) * set warm start vector - S02:0000C11E: 27 48 04 02 -F00:0252 BSR LAB_RND * initialise - S02:0000C122: 61 00 1F C4 -F00:0253 JMP LAB_WARM(a3) * go do warm start - S02:0000C126: 4E EB 04 00 -F00:0254 -F00:0255 -F00:0256 ************************************************************************************* -F00:0257 * -F00:0258 * do format error -F00:0259 -F00:0260 LAB_FOER -F00:0261 MOVEQ #$2C,d7 * error code $2C "Format" error - S02:0000C12A: 7E 2C -F00:0262 BRA.s LAB_XERR * do error #d7, then warm start - S02:0000C12C: 60 56 -F00:0263 -F00:0264 -F00:0265 ************************************************************************************* -F00:0266 * -F00:0267 * do address error -F00:0268 -F00:0269 LAB_ADER -F00:0270 MOVEQ #$2A,d7 * error code $2A "Address" error - S02:0000C12E: 7E 2A -F00:0271 BRA.s LAB_XERR * do error #d7, then warm start - S02:0000C130: 60 52 -F00:0272 -F00:0273 -F00:0274 ************************************************************************************* -F00:0275 * -F00:0276 * do wrong dimensions error -F00:0277 -F00:0278 LAB_WDER -F00:0279 MOVEQ #$28,d7 * error code $28 "Wrong dimensions" error - S02:0000C132: 7E 28 -F00:0280 BRA.s LAB_XERR * do error #d7, then warm start - S02:0000C134: 60 4E -F00:0281 -F00:0282 -F00:0283 ************************************************************************************* -F00:0284 * -F00:0285 * do undimensioned array error -F00:0286 -F00:0287 LAB_UDER -F00:0288 MOVEQ #$26,d7 * error code $26 "undimensioned array" error - S02:0000C136: 7E 26 -F00:0289 BRA.s LAB_XERR * do error #d7, then warm start - S02:0000C138: 60 4A -F00:0290 -F00:0291 -F00:0292 ************************************************************************************* -F00:0293 * -F00:0294 * do undefined variable error -F00:0295 -F00:0296 LAB_UVER -F00:0297 -F00:0298 * if you do want a non existant variable to return an error then leave the novar -F00:0299 * value at the top of this file set to zero -F00:0300 -F00:0301 ifeq novar -F00:0302 -F00:0303 MOVEQ #$24,d7 * error code $24 "undefined variable" error - S02:0000C13A: 7E 24 -F00:0304 BRA.s LAB_XERR * do error #d7, then warm start - S02:0000C13C: 60 46 -F00:0305 -F00:0306 endc -F00:0307 -F00:0308 * if you want a non existant variable to return a null value then set the novar -F00:0309 * value at the top of this file to some non zero value -F00:0310 -F00:0311 ifne novar -F00:0312 -F00:0313 ADD.l d0,d0 * .......$ .......& ........ .......0 -F00:0314 SWAP d0 * ........ .......0 .......$ .......& -F00:0315 ROR.b #1,d0 * ........ .......0 .......$ &....... -F00:0316 LSR.w #1,d0 * ........ .......0 0....... $&.....­. -F00:0317 AND.b #$C0,d0 * mask the type bits -F00:0318 MOVE.b d0,Dtypef(a3) * save the data type -F00:0319 -F00:0320 MOVEQ #0,d0 * clear d0 and set the zero flag -F00:0321 MOVEA.l d0,a0 * return a null address -F00:0322 RTS -F00:0323 -F00:0324 endc -F00:0325 -F00:0326 -F00:0327 ************************************************************************************* -F00:0328 * -F00:0329 * do loop without do error -F00:0330 -F00:0331 LAB_LDER -F00:0332 MOVEQ #$22,d7 * error code $22 "LOOP without DO" error - S02:0000C13E: 7E 22 -F00:0333 BRA.s LAB_XERR * do error #d7, then warm start - S02:0000C140: 60 42 -F00:0334 -F00:0335 -F00:0336 ************************************************************************************* -F00:0337 * -F00:0338 * do undefined function error -F00:0339 -F00:0340 LAB_UFER -F00:0341 MOVEQ #$20,d7 * error code $20 "Undefined function" error - S02:0000C142: 7E 20 -F00:0342 BRA.s LAB_XERR * do error #d7, then warm start - S02:0000C144: 60 3E -F00:0343 -F00:0344 -F00:0345 ************************************************************************************* -F00:0346 * -F00:0347 * do can't continue error -F00:0348 -F00:0349 LAB_CCER -F00:0350 MOVEQ #$1E,d7 * error code $1E "Can't continue" error - S02:0000C146: 7E 1E -F00:0351 BRA.s LAB_XERR * do error #d7, then warm start - S02:0000C148: 60 3A -F00:0352 -F00:0353 -F00:0354 ************************************************************************************* -F00:0355 * -F00:0356 * do string too complex error -F00:0357 -F00:0358 LAB_SCER -F00:0359 MOVEQ #$1C,d7 * error code $1C "String too complex" error - S02:0000C14A: 7E 1C -F00:0360 BRA.s LAB_XERR * do error #d7, then warm start - S02:0000C14C: 60 36 -F00:0361 -F00:0362 -F00:0363 ************************************************************************************* -F00:0364 * -F00:0365 * do string too long error -F00:0366 -F00:0367 LAB_SLER -F00:0368 MOVEQ #$1A,d7 * error code $1A "String too long" error - S02:0000C14E: 7E 1A -F00:0369 BRA.s LAB_XERR * do error #d7, then warm start - S02:0000C150: 60 32 -F00:0370 -F00:0371 -F00:0372 ************************************************************************************* -F00:0373 * -F00:0374 * do type missmatch error -F00:0375 -F00:0376 LAB_TMER -F00:0377 MOVEQ #$18,d7 * error code $18 "Type mismatch" error - S02:0000C152: 7E 18 -F00:0378 BRA.s LAB_XERR * do error #d7, then warm start - S02:0000C154: 60 2E -F00:0379 -F00:0380 -F00:0381 ************************************************************************************* -F00:0382 * -F00:0383 * do illegal direct error -F00:0384 -F00:0385 LAB_IDER -F00:0386 MOVEQ #$16,d7 * error code $16 "Illegal direct" error - S02:0000C156: 7E 16 -F00:0387 BRA.s LAB_XERR * do error #d7, then warm start - S02:0000C158: 60 2A -F00:0388 -F00:0389 -F00:0390 ************************************************************************************* -F00:0391 * -F00:0392 * do divide by zero error -F00:0393 -F00:0394 LAB_DZER -F00:0395 MOVEQ #$14,d7 * error code $14 "Divide by zero" error - S02:0000C15A: 7E 14 -F00:0396 BRA.s LAB_XERR * do error #d7, then warm start - S02:0000C15C: 60 26 -F00:0397 -F00:0398 -F00:0399 ************************************************************************************* -F00:0400 * -F00:0401 * do double dimension error -F00:0402 -F00:0403 LAB_DDER -F00:0404 MOVEQ #$12,d7 * error code $12 "Double dimension" error - S02:0000C15E: 7E 12 -F00:0405 BRA.s LAB_XERR * do error #d7, then warm start - S02:0000C160: 60 22 -F00:0406 -F00:0407 -F00:0408 ************************************************************************************* -F00:0409 * -F00:0410 * do array bounds error -F00:0411 -F00:0412 LAB_ABER -F00:0413 MOVEQ #$10,d7 * error code $10 "Array bounds" error - S02:0000C162: 7E 10 -F00:0414 BRA.s LAB_XERR * do error #d7, then warm start - S02:0000C164: 60 1E -F00:0415 -F00:0416 -F00:0417 ************************************************************************************* -F00:0418 * -F00:0419 * do undefined satement error -F00:0420 -F00:0421 LAB_USER -F00:0422 MOVEQ #$0E,d7 * error code $0E "Undefined statement" error - S02:0000C166: 7E 0E -F00:0423 BRA.s LAB_XERR * do error #d7, then warm start - S02:0000C168: 60 1A -F00:0424 -F00:0425 -F00:0426 ************************************************************************************* -F00:0427 * -F00:0428 * do out of memory error -F00:0429 -F00:0430 LAB_OMER -F00:0431 MOVEQ #$0C,d7 * error code $0C "Out of memory" error - S02:0000C16A: 7E 0C -F00:0432 BRA.s LAB_XERR * do error #d7, then warm start - S02:0000C16C: 60 16 -F00:0433 -F00:0434 -F00:0435 ************************************************************************************* -F00:0436 * -F00:0437 * do overflow error -F00:0438 -F00:0439 LAB_OFER -F00:0440 MOVEQ #$0A,d7 * error code $0A "Overflow" error - S02:0000C16E: 7E 0A -F00:0441 BRA.s LAB_XERR * do error #d7, then warm start - S02:0000C170: 60 12 -F00:0442 -F00:0443 -F00:0444 ************************************************************************************* -F00:0445 * -F00:0446 * do function call error -F00:0447 -F00:0448 LAB_FCER -F00:0449 MOVEQ #$08,d7 * error code $08 "Function call" error - S02:0000C172: 7E 08 -F00:0450 BRA.s LAB_XERR * do error #d7, then warm start - S02:0000C174: 60 0E -F00:0451 -F00:0452 -F00:0453 ************************************************************************************* -F00:0454 * -F00:0455 * do out of data error -F00:0456 -F00:0457 LAB_ODER -F00:0458 MOVEQ #$06,d7 * error code $06 "Out of DATA" error - S02:0000C176: 7E 06 -F00:0459 BRA.s LAB_XERR * do error #d7, then warm start - S02:0000C178: 60 0A -F00:0460 -F00:0461 -F00:0462 ************************************************************************************* -F00:0463 * -F00:0464 * do return without gosub error -F00:0465 -F00:0466 LAB_RGER -F00:0467 MOVEQ #$04,d7 * error code $04 "RETURN without GOSUB" error - S02:0000C17A: 7E 04 -F00:0468 BRA.s LAB_XERR * do error #d7, then warm start - S02:0000C17C: 60 06 -F00:0469 -F00:0470 -F00:0471 ************************************************************************************* -F00:0472 * -F00:0473 * do syntax error -F00:0474 -F00:0475 LAB_SNER -F00:0476 MOVEQ #$02,d7 * error code $02 "Syntax" error - S02:0000C17E: 7E 02 -F00:0477 BRA.s LAB_XERR * do error #d7, then warm start - S02:0000C180: 60 02 -F00:0478 -F00:0479 -F00:0480 ************************************************************************************* -F00:0481 * -F00:0482 * do next without for error -F00:0483 -F00:0484 LAB_NFER -F00:0485 MOVEQ #$00,d7 * error code $00 "NEXT without FOR" error - S02:0000C182: 7E 00 -F00:0486 -F00:0487 -F00:0488 ************************************************************************************* -F00:0489 * -F00:0490 * do error #d7, then warm start -F00:0491 -F00:0492 LAB_XERR -F00:0493 BSR LAB_1491 * flush stack & clear continue flag - S02:0000C184: 61 00 02 CA -F00:0494 BSR LAB_CRLF * print CR/LF - S02:0000C188: 61 00 08 08 -F00:0495 LEA LAB_BAER(pc),a1 * start of error message pointer table - S02:0000C18C: 43 FA 2F CC -F00:0496 MOVE.w (a1,d7.w),d7 * get error message offset - S02:0000C190: 3E 31 70 00 -F00:0497 LEA (a1,d7.w),a0 * get error message address - S02:0000C194: 41 F1 70 00 -F00:0498 BSR LAB_18C3 * print null terminated string from memory - S02:0000C198: 61 00 08 56 -F00:0499 LEA LAB_EMSG(pc),a0 * point to " Error" message - S02:0000C19C: 41 FA 33 07 -F00:0500 LAB_1269 -F00:0501 BSR LAB_18C3 * print null terminated string from memory - S02:0000C1A0: 61 00 08 4E -F00:0502 MOVE.l Clinel(a3),d0 * get current line - S02:0000C1A4: 20 2B 04 52 -F00:0503 BMI.s LAB_1274 * go do warm start if -ve # (was immediate mode) - S02:0000C1A8: 6B 04 -F00:0504 -F00:0505 * else print line number -F00:0506 BSR LAB_2953 * print " in line [LINE #]" - S02:0000C1AA: 61 00 1B 0E -F00:0507 -F00:0508 * BASIC warm start entry point, wait for Basic command -F00:0509 -F00:0510 LAB_1274 -F00:0511 LEA LAB_RMSG(pc),a0 * point to "Ready" message - S02:0000C1AE: 41 FA 33 28 -F00:0512 BSR LAB_18C3 * go do print string - S02:0000C1B2: 61 00 08 3C -F00:0513 -F00:0514 * wait for Basic command - no "Ready" -F00:0515 -F00:0516 LAB_127D -F00:0517 MOVEQ #-1,d1 * set to -1 - S02:0000C1B6: 72 FF -F00:0518 MOVE.l d1,Clinel(a3) * set current line # - S02:0000C1B8: 27 41 04 52 -F00:0519 MOVE.b d1,Breakf(a3) * set break flag - S02:0000C1BC: 17 41 05 DC -F00:0520 LEA Ibuffs(a3),a5 * set basic execute pointer ready for new line - S02:0000C1C0: 4B EB 04 90 -F00:0521 LAB_127E -F00:0522 BSR LAB_1357 * call for BASIC input - S02:0000C1C4: 61 00 00 EC -F00:0523 BSR LAB_GBYT * scan memory - S02:0000C1C8: 61 00 0B F2 -F00:0524 BEQ.s LAB_127E * loop while null - S02:0000C1CC: 67 F6 -F00:0525 -F00:0526 * got to interpret input line now .... -F00:0527 -F00:0528 BCS.s LAB_1295 * branch if numeric character, handle new - S02:0000C1CE: 65 08 -F00:0529 * BASIC line -F00:0530 -F00:0531 * no line number so do immediate mode, a5 -F00:0532 * points to the buffer start -F00:0533 BSR LAB_13A6 * crunch keywords into Basic tokens - S02:0000C1D0: 61 00 01 56 -F00:0534 * crunch from (a5), output to (a0) -F00:0535 * returns .. -F00:0536 * d2 is length, d1 trashed, d0 trashed, -F00:0537 * a1 trashed -F00:0538 BRA LAB_15F6 * go scan & interpret code - S02:0000C1D4: 60 00 03 C2 -F00:0539 -F00:0540 -F00:0541 ************************************************************************************* -F00:0542 * -F00:0543 * handle a new BASIC line -F00:0544 -F00:0545 LAB_1295 -F00:0546 BSR LAB_GFPN * get fixed-point number into temp integer & d1 - S02:0000C1D8: 61 00 06 38 -F00:0547 BSR LAB_13A6 * crunch keywords into Basic tokens - S02:0000C1DC: 61 00 01 4A -F00:0548 * crunch from (a5), output to (a0) -F00:0549 * returns .. d2 is length, -F00:0550 * d1 trashed, d0 trashed, a1 trashed -F00:0551 MOVE.l Itemp(a3),d1 * get required line # - S02:0000C1E0: 22 2B 04 2A -F00:0552 BSR LAB_SSLN * search BASIC for d1 line number - S02:0000C1E4: 61 00 02 18 -F00:0553 * returns pointer in a0 -F00:0554 BCS.s LAB_12E6 * branch if not found - S02:0000C1E8: 65 32 -F00:0555 -F00:0556 * aroooogah! line # already exists! delete it -F00:0557 MOVEA.l (a0),a1 * get start of block (next line pointer) - S02:0000C1EA: 22 50 -F00:0558 MOVE.l Sfncl(a3),d0 * get end of block (start of functions) - S02:0000C1EC: 20 2B 04 32 -F00:0559 SUB.l a1,d0 * subtract start of block ( = bytes to move) - S02:0000C1F0: 90 89 -F00:0560 LSR.l #1,d0 * /2 (word move) - S02:0000C1F2: E2 88 -F00:0561 SUBQ.l #1,d0 * adjust for DBF loop - S02:0000C1F4: 53 80 -F00:0562 SWAP d0 * swap high word to low word - S02:0000C1F6: 48 40 -F00:0563 MOVEA.l a0,a2 * copy destination - S02:0000C1F8: 24 48 -F00:0564 LAB_12AE -F00:0565 SWAP d0 * swap high word to low word - S02:0000C1FA: 48 40 -F00:0566 LAB_12B0 -F00:0567 MOVE.w (a1)+,(a2)+ * copy word - S02:0000C1FC: 34 D9 -F00:0568 DBF d0,LAB_12B0 * decrement low count and loop until done - S02:0000C1FE: 51 C8 FF FC -F00:0569 -F00:0570 SWAP d0 * swap high word to low word - S02:0000C202: 48 40 -F00:0571 DBF d0,LAB_12AE * decrement high count and loop until done - S02:0000C204: 51 C8 FF F4 -F00:0572 -F00:0573 MOVE.l a2,Sfncl(a3) * start of functions - S02:0000C208: 27 4A 04 32 -F00:0574 MOVE.l a2,Svarl(a3) * save start of variables - S02:0000C20C: 27 4A 04 36 -F00:0575 MOVE.l a2,Sstrl(a3) * start of strings - S02:0000C210: 27 4A 04 3A -F00:0576 MOVE.l a2,Sarryl(a3) * save start of arrays - S02:0000C214: 27 4A 04 3E -F00:0577 MOVE.l a2,Earryl(a3) * save end of arrays - S02:0000C218: 27 4A 04 42 -F00:0578 -F00:0579 * got new line in buffer and no existing same # -F00:0580 LAB_12E6 -F00:0581 MOVE.b Ibuffs(a3),d0 * get byte from start of input buffer - S02:0000C21C: 10 2B 04 90 -F00:0582 BEQ.s LAB_1325 * if null line go do line chaining - S02:0000C220: 67 64 -F00:0583 -F00:0584 * got new line and it isn't empty line -F00:0585 MOVEA.l Sfncl(a3),a1 * get start of functions (end of block to move) - S02:0000C222: 22 6B 04 32 -F00:0586 LEA 8(a1,d2),a2 * copy it, add line length and add room for - S02:0000C226: 45 F1 20 08 -F00:0587 * pointer and line number -F00:0588 -F00:0589 MOVE.l a2,Sfncl(a3) * start of functions - S02:0000C22A: 27 4A 04 32 -F00:0590 MOVE.l a2,Svarl(a3) * save start of variables - S02:0000C22E: 27 4A 04 36 -F00:0591 MOVE.l a2,Sstrl(a3) * start of strings - S02:0000C232: 27 4A 04 3A -F00:0592 MOVE.l a2,Sarryl(a3) * save start of arrays - S02:0000C236: 27 4A 04 3E -F00:0593 MOVE.l a2,Earryl(a3) * save end of arrays - S02:0000C23A: 27 4A 04 42 -F00:0594 MOVE.l Ememl(a3),Sstorl(a3) * copy end of mem to start of strings, clear - S02:0000C23E: 27 6B 04 4A 04 46 -F00:0595 * strings -F00:0596 -F00:0597 MOVE.l a1,d1 * copy end of block to move - S02:0000C244: 22 09 -F00:0598 SUB.l a0,d1 * subtract start of block to move - S02:0000C246: 92 88 -F00:0599 LSR.l #1,d1 * /2 (word copy) - S02:0000C248: E2 89 -F00:0600 SUBQ.l #1,d1 * correct for loop end on -1 - S02:0000C24A: 53 81 -F00:0601 SWAP d1 * swap high word to low word - S02:0000C24C: 48 41 -F00:0602 LAB_12FF -F00:0603 SWAP d1 * swap high word to low word - S02:0000C24E: 48 41 -F00:0604 LAB_1301 -F00:0605 MOVE.w -(a1),-(a2) * decrement pointers and copy word - S02:0000C250: 35 21 -F00:0606 DBF d1,LAB_1301 * decrement & loop - S02:0000C252: 51 C9 FF FC -F00:0607 -F00:0608 SWAP d1 * swap high word to low word - S02:0000C256: 48 41 -F00:0609 DBF d1,LAB_12FF * decrement high count and loop until done - S02:0000C258: 51 C9 FF F4 -F00:0610 -F00:0611 * space is opened up, now copy the crunched line from the input buffer into the space -F00:0612 -F00:0613 LEA Ibuffs(a3),a1 * source is input buffer - S02:0000C25C: 43 EB 04 90 -F00:0614 MOVEA.l a0,a2 * copy destination - S02:0000C260: 24 48 -F00:0615 MOVEQ #-1,d1 * set to allow re-chaining - S02:0000C262: 72 FF -F00:0616 MOVE.l d1,(a2)+ * set next line pointer (allow re-chaining) - S02:0000C264: 24 C1 -F00:0617 MOVE.l Itemp(a3),(a2)+ * save line number - S02:0000C266: 24 EB 04 2A -F00:0618 LSR.w #1,d2 * /2 (word copy) - S02:0000C26A: E2 4A -F00:0619 SUBQ.w #1,d2 * correct for loop end on -1 - S02:0000C26C: 53 42 -F00:0620 LAB_1303 -F00:0621 MOVE.w (a1)+,(a2)+ * copy word - S02:0000C26E: 34 D9 -F00:0622 DBF d2,LAB_1303 * decrement & loop - S02:0000C270: 51 CA FF FC -F00:0623 -F00:0624 BRA.s LAB_1325 * go test for end of prog - S02:0000C274: 60 10 -F00:0625 -F00:0626 * rebuild chaining of BASIC lines -F00:0627 -F00:0628 LAB_132E -F00:0629 ADDQ.w #8,a0 * point to first code byte of line, there is - S02:0000C276: 50 48 -F00:0630 * always 1 byte + [EOL] as null entries are -F00:0631 * deleted -F00:0632 LAB_1330 -F00:0633 TST.b (a0)+ * test byte - S02:0000C278: 4A 18 -F00:0634 BNE.s LAB_1330 * loop if not [EOL] - S02:0000C27A: 66 FC -F00:0635 -F00:0636 * was [EOL] so get next line start -F00:0637 MOVE.w a0,d1 * past pad byte(s) - S02:0000C27C: 32 08 -F00:0638 ANDI.w #1,d1 * mask odd bit - S02:0000C27E: 02 41 00 01 -F00:0639 ADD.w d1,a0 * add back to ensure even - S02:0000C282: D0 C1 -F00:0640 MOVE.l a0,(a1) * save next line pointer to current line - S02:0000C284: 22 88 -F00:0641 LAB_1325 -F00:0642 MOVEA.l a0,a1 * copy pointer for this line - S02:0000C286: 22 48 -F00:0643 TST.l (a0) * test pointer to next line - S02:0000C288: 4A 90 -F00:0644 BNE.s LAB_132E * not end of program yet so we must - S02:0000C28A: 66 EA -F00:0645 * go and fix the pointers -F00:0646 -F00:0647 BSR LAB_1477 * reset execution to start, clear variables - S02:0000C28C: 61 00 01 98 -F00:0648 * and flush stack -F00:0649 BRA LAB_127D * now we just wait for Basic command, no "Ready" - S02:0000C290: 60 00 FF 24 -F00:0650 -F00:0651 -F00:0652 ************************************************************************************* -F00:0653 * -F00:0654 * receive a line from the keyboard -F00:0655 * character $08 as delete key, BACKSPACE on -F00:0656 * standard keyboard -F00:0657 LAB_134B -F00:0658 BSR LAB_PRNA * go print the character - S02:0000C294: 61 00 07 74 -F00:0659 MOVEQ #' ',d0 * load [SPACE] - S02:0000C298: 70 20 -F00:0660 BSR LAB_PRNA * go print - S02:0000C29A: 61 00 07 6E -F00:0661 MOVEQ #$08,d0 * load [BACKSPACE] - S02:0000C29E: 70 08 -F00:0662 BSR LAB_PRNA * go print - S02:0000C2A0: 61 00 07 68 -F00:0663 SUBQ.w #$01,d1 * decrement the buffer index (delete) - S02:0000C2A4: 53 41 -F00:0664 BRA.s LAB_1359 * re-enter loop - S02:0000C2A6: 60 10 -F00:0665 -F00:0666 * print "? " and get BASIC input -F00:0667 * return a0 pointing to the buffer start -F00:0668 -F00:0669 LAB_INLN -F00:0670 BSR LAB_18E3 * print "?" character - S02:0000C2A8: 61 00 07 5E -F00:0671 MOVEQ #' ',d0 * load " " - S02:0000C2AC: 70 20 -F00:0672 BSR LAB_PRNA * go print - S02:0000C2AE: 61 00 07 5A -F00:0673 -F00:0674 * call for BASIC input (main entry point) -F00:0675 * return a0 pointing to the buffer start -F00:0676 -F00:0677 LAB_1357 -F00:0678 MOVEQ #$00,d1 * clear buffer index - S02:0000C2B2: 72 00 -F00:0679 LEA Ibuffs(a3),a0 * set buffer base pointer - S02:0000C2B4: 41 EB 04 90 -F00:0680 LAB_1359 -F00:0681 JSR V_INPT(a3) * call scan input device - S02:0000C2B8: 4E AB 04 0C -F00:0682 BCC.s LAB_1359 * loop if no byte - S02:0000C2BC: 64 FA -F00:0683 -F00:0684 BEQ.s LAB_1359 * loop if null byte - S02:0000C2BE: 67 F8 -F00:0685 -F00:0686 CMP.b #$07,d0 * compare with [BELL] - S02:0000C2C0: B0 3C 00 07 -F00:0687 BEQ.s LAB_1378 * branch if [BELL] - S02:0000C2C4: 67 18 -F00:0688 -F00:0689 CMP.b #$0D,d0 * compare with [CR] - S02:0000C2C6: B0 3C 00 0D -F00:0690 BEQ LAB_1866 * do CR/LF exit if [CR] - S02:0000C2CA: 67 00 06 C0 -F00:0691 -F00:0692 TST.w d1 * set flags on buffer index - S02:0000C2CE: 4A 41 -F00:0693 BNE.s LAB_1374 * branch if not empty - S02:0000C2D0: 66 06 -F00:0694 -F00:0695 * the next two lines ignore any non printing character and [SPACE] if the input buffer -F00:0696 * is empty -F00:0697 -F00:0698 CMP.b #' ',d0 * compare with [SP]+1 - S02:0000C2D2: B0 3C 00 20 -F00:0699 BLS.s LAB_1359 * if < ignore character - S02:0000C2D6: 63 E0 -F00:0700 -F00:0701 *## CMP.b #' '+1,d0 * compare with [SP]+1 -F00:0702 *## BCS.s LAB_1359 * if < ignore character -F00:0703 -F00:0704 LAB_1374 -F00:0705 CMP.b #$08,d0 * compare with [BACKSPACE] - S02:0000C2D8: B0 3C 00 08 -F00:0706 BEQ.s LAB_134B * go delete last character - S02:0000C2DC: 67 B6 -F00:0707 -F00:0708 LAB_1378 -F00:0709 CMP.w #(Ibuffe-Ibuffs-1),d1 * compare character count with max-1 - S02:0000C2DE: B2 7C 00 FF -F00:0710 BCC.s LAB_138E * skip store & do [BELL] if buffer full - S02:0000C2E2: 64 0C -F00:0711 -F00:0712 MOVE.b d0,(a0,d1.w) * else store in buffer - S02:0000C2E4: 11 80 10 00 -F00:0713 ADDQ.w #$01,d1 * increment index - S02:0000C2E8: 52 41 -F00:0714 LAB_137F -F00:0715 BSR LAB_PRNA * go print the character - S02:0000C2EA: 61 00 07 1E -F00:0716 BRA.s LAB_1359 * always loop for next character - S02:0000C2EE: 60 C8 -F00:0717 -F00:0718 * announce buffer full -F00:0719 -F00:0720 LAB_138E -F00:0721 MOVEQ #$07,d0 * [BELL] character into d0 - S02:0000C2F0: 70 07 -F00:0722 BRA.s LAB_137F * go print the [BELL] but ignore input character - S02:0000C2F2: 60 F6 -F00:0723 -F00:0724 -F00:0725 ************************************************************************************* -F00:0726 * -F00:0727 * copy a hex value without crunching -F00:0728 -F00:0729 LAB_1392 -F00:0730 MOVE.b d0,(a0,d2.w) * save the byte to the output - S02:0000C2F4: 11 80 20 00 -F00:0731 ADDQ.w #1,d2 * increment the buffer save index - S02:0000C2F8: 52 42 -F00:0732 -F00:0733 ADDQ.w #1,d1 * increment the buffer read index - S02:0000C2FA: 52 41 -F00:0734 MOVE.b (a5,d1.w),d0 * get a byte from the input buffer - S02:0000C2FC: 10 35 10 00 -F00:0735 BEQ LAB_13EC * if [EOL] go save it without crunching - S02:0000C300: 67 00 00 94 -F00:0736 -F00:0737 CMP.b #' ',d0 * compare the character with " " - S02:0000C304: B0 3C 00 20 -F00:0738 BEQ.s LAB_1392 * if [SPACE] just go save it and get another - S02:0000C308: 67 EA -F00:0739 -F00:0740 CMP.b #'0',d0 * compare the character with "0" - S02:0000C30A: B0 3C 00 30 -F00:0741 BCS.s LAB_13C6 * if < "0" quit the hex save loop - S02:0000C30E: 65 4A -F00:0742 -F00:0743 CMP.b #'9',d0 * compare with "9" - S02:0000C310: B0 3C 00 39 -F00:0744 BLS.s LAB_1392 * if it is "0" to "9" save it and get another - S02:0000C314: 63 DE -F00:0745 -F00:0746 MOVEQ #-33,d5 * mask xx0x xxxx, ASCII upper case - S02:0000C316: 7A DF -F00:0747 AND.b d0,d5 * mask the character - S02:0000C318: CA 00 -F00:0748 -F00:0749 CMP.b #'A',d5 * compare with "A" - S02:0000C31A: BA 3C 00 41 -F00:0750 BCS.s LAB_13CC * if < "A" quit the hex save loop - S02:0000C31E: 65 40 -F00:0751 -F00:0752 CMP.b #'F',d5 * compare with "F" - S02:0000C320: BA 3C 00 46 -F00:0753 BLS.s LAB_1392 * if it is "A" to "F" save it and get another - S02:0000C324: 63 CE -F00:0754 -F00:0755 BRA.s LAB_13CC * else continue crunching - S02:0000C326: 60 38 -F00:0756 -F00:0757 * crunch keywords into Basic tokens -F00:0758 * crunch from (a5), output to (a0) -F00:0759 * returns .. -F00:0760 * d4 trashed -F00:0761 * d3 trashed -F00:0762 * d2 is length -F00:0763 * d1 trashed -F00:0764 * d0 trashed -F00:0765 * a1 trashed -F00:0766 -F00:0767 * this is the improved BASIC crunch routine and is 10 to 100 times faster than the -F00:0768 * old list search -F00:0769 -F00:0770 LAB_13A6 -F00:0771 MOVEQ #0,d1 * clear the read index - S02:0000C328: 72 00 -F00:0772 MOVE.l d1,d2 * clear the save index - S02:0000C32A: 24 01 -F00:0773 MOVE.b d1,Oquote(a3) * clear the open quote/DATA flag - S02:0000C32C: 17 41 05 DD -F00:0774 LAB_13AC -F00:0775 MOVEQ #0,d0 * clear word - S02:0000C330: 70 00 -F00:0776 MOVE.b (a5,d1.w),d0 * get byte from input buffer - S02:0000C332: 10 35 10 00 -F00:0777 BEQ.s LAB_13EC * if null save byte then continue crunching - S02:0000C336: 67 5E -F00:0778 -F00:0779 CMP.b #'_',d0 * compare with "_" - S02:0000C338: B0 3C 00 5F -F00:0780 BCC.s LAB_13EC * if >= "_" save byte then continue crunching - S02:0000C33C: 64 58 -F00:0781 -F00:0782 CMP.b #'<',d0 * compare with "<" - S02:0000C33E: B0 3C 00 3C -F00:0783 BCC.s LAB_13CC * if >= "<" go crunch - S02:0000C342: 64 1C -F00:0784 -F00:0785 CMP.b #'0',d0 * compare with "0" - S02:0000C344: B0 3C 00 30 -F00:0786 BCC.s LAB_13EC * if >= "0" save byte then continue crunching - S02:0000C348: 64 4C -F00:0787 -F00:0788 MOVE.b d0,Asrch(a3) * save buffer byte as search character - S02:0000C34A: 17 40 05 DA -F00:0789 CMP.b #$22,d0 * is it quote character? - S02:0000C34E: B0 3C 00 22 -F00:0790 BEQ.s LAB_1410 * branch if so (copy quoted string) - S02:0000C352: 67 76 -F00:0791 -F00:0792 CMP.b #'$',d0 * is it the hex value character? - S02:0000C354: B0 3C 00 24 -F00:0793 BEQ.s LAB_1392 * if so go copy a hex value - S02:0000C358: 67 9A -F00:0794 -F00:0795 LAB_13C6 -F00:0796 CMP.b #'*',d0 * compare with "*" - S02:0000C35A: B0 3C 00 2A -F00:0797 BCS.s LAB_13EC * if <= "*" save byte then continue crunching - S02:0000C35E: 65 36 -F00:0798 -F00:0799 * crunch rest -F00:0800 LAB_13CC -F00:0801 BTST.b #6,Oquote(a3) * test open quote/DATA token flag - S02:0000C360: 08 2B 00 06 05 DD -F00:0802 BNE.s LAB_13EC * branch if b6 of Oquote set (was DATA) - S02:0000C366: 66 2E -F00:0803 * go save byte then continue crunching -F00:0804 -F00:0805 SUB.b #$2A,d0 * normalise byte - S02:0000C368: 90 3C 00 2A -F00:0806 ADD.w d0,d0 * *2 makes word offset (high byte=$00) - S02:0000C36C: D0 40 -F00:0807 LEA TAB_CHRT(pc),a1 * get keyword offset table address - S02:0000C36E: 43 FA 2B EC -F00:0808 MOVE.w (a1,d0.w),d0 * get offset into keyword table - S02:0000C372: 30 31 00 00 -F00:0809 BMI.s LAB_141F * branch if no keywords for character - S02:0000C376: 6B 6E -F00:0810 -F00:0811 LEA TAB_STAR(pc),a1 * get keyword table address - S02:0000C378: 43 FA 2F 78 -F00:0812 ADDA.w d0,a1 * add keyword offset - S02:0000C37C: D2 C0 -F00:0813 MOVEQ #-1,d3 * clear index - S02:0000C37E: 76 FF -F00:0814 MOVE.w d1,d4 * copy read index - S02:0000C380: 38 01 -F00:0815 LAB_13D6 -F00:0816 ADDQ.w #1,d3 * increment table index - S02:0000C382: 52 43 -F00:0817 MOVE.b (a1,d3.w),d0 * get byte from table - S02:0000C384: 10 31 30 00 -F00:0818 LAB_13D8 -F00:0819 BMI.s LAB_13EA * branch if token, save token and continue - S02:0000C388: 6B 0A -F00:0820 * crunching -F00:0821 -F00:0822 ADDQ.w #1,d4 * increment read index - S02:0000C38A: 52 44 -F00:0823 CMP.b (a5,d4.w),d0 * compare byte from input buffer - S02:0000C38C: B0 35 40 00 -F00:0824 BEQ.s LAB_13D6 * loop if character match - S02:0000C390: 67 F0 -F00:0825 -F00:0826 BRA.s LAB_1417 * branch if no match - S02:0000C392: 60 40 -F00:0827 -F00:0828 LAB_13EA -F00:0829 MOVE.w d4,d1 * update read index - S02:0000C394: 32 04 -F00:0830 LAB_13EC -F00:0831 MOVE.b d0,(a0,d2.w) * save byte to output - S02:0000C396: 11 80 20 00 -F00:0832 ADDQ.w #1,d2 * increment buffer save index - S02:0000C39A: 52 42 -F00:0833 ADDQ.w #1,d1 * increment buffer read index - S02:0000C39C: 52 41 -F00:0834 TST.b d0 * set flags - S02:0000C39E: 4A 00 -F00:0835 BEQ.s LAB_142A * branch if was null [EOL] - S02:0000C3A0: 67 4A -F00:0836 -F00:0837 * d0 holds token or byte here -F00:0838 SUB.b #$3A,d0 * subtract ":" - S02:0000C3A2: 90 3C 00 3A -F00:0839 BEQ.s LAB_13FF * branch if it was ":" (is now $00) - S02:0000C3A6: 67 06 -F00:0840 -F00:0841 * d0 now holds token-$3A -F00:0842 CMP.b #(TK_DATA-$3A),d0 * compare with DATA token - $3A - S02:0000C3A8: B0 3C 00 49 -F00:0843 BNE.s LAB_1401 * branch if not DATA - S02:0000C3AC: 66 04 -F00:0844 -F00:0845 * token was : or DATA -F00:0846 LAB_13FF -F00:0847 MOVE.b d0,Oquote(a3) * save token-$3A ($00 for ":", TK_DATA-$3A for - S02:0000C3AE: 17 40 05 DD -F00:0848 * DATA) -F00:0849 LAB_1401 -F00:0850 SUB.b #(TK_REM-$3A),d0 * subtract REM token offset - S02:0000C3B2: 90 3C 00 55 -F00:0851 BNE LAB_13AC * If wasn't REM then go crunch rest of line - S02:0000C3B6: 66 00 FF 78 -F00:0852 -F00:0853 MOVE.b d0,Asrch(a3) * else was REM so set search for [EOL] - S02:0000C3BA: 17 40 05 DA -F00:0854 -F00:0855 * loop for REM, "..." etc. -F00:0856 LAB_1408 -F00:0857 MOVE.b (a5,d1.w),d0 * get byte from input buffer - S02:0000C3BE: 10 35 10 00 -F00:0858 BEQ.s LAB_13EC * branch if null [EOL] - S02:0000C3C2: 67 D2 -F00:0859 -F00:0860 CMP.b Asrch(a3),d0 * compare with stored character - S02:0000C3C4: B0 2B 05 DA -F00:0861 BEQ.s LAB_13EC * branch if match (end quote, REM, :, or DATA) - S02:0000C3C8: 67 CC -F00:0862 -F00:0863 * entry for copy string in quotes, don't crunch -F00:0864 LAB_1410 -F00:0865 MOVE.b d0,(a0,d2.w) * save byte to output - S02:0000C3CA: 11 80 20 00 -F00:0866 ADDQ.w #1,d2 * increment buffer save index - S02:0000C3CE: 52 42 -F00:0867 ADDQ.w #1,d1 * increment buffer read index - S02:0000C3D0: 52 41 -F00:0868 BRA.s LAB_1408 * loop - S02:0000C3D2: 60 EA -F00:0869 -F00:0870 * not found keyword this go so find the end of this word in the table -F00:0871 -F00:0872 LAB_1417 -F00:0873 MOVE.w d1,d4 * reset read pointer - S02:0000C3D4: 38 01 -F00:0874 LAB_141B -F00:0875 ADDQ.w #1,d3 * increment keyword table pointer, flag - S02:0000C3D6: 52 43 -F00:0876 * unchanged -F00:0877 MOVE.b (a1,d3.w),d0 * get keyword table byte - S02:0000C3D8: 10 31 30 00 -F00:0878 BPL.s LAB_141B * if not end of keyword go do next byte - S02:0000C3DC: 6A F8 -F00:0879 -F00:0880 ADDQ.w #1,d3 * increment keyword table pointer flag - S02:0000C3DE: 52 43 -F00:0881 * unchanged -F00:0882 MOVE.b (a1,d3.w),d0 * get keyword table byte - S02:0000C3E0: 10 31 30 00 -F00:0883 BNE.s LAB_13D8 * go test next word if not zero byte (table end) - S02:0000C3E4: 66 A2 -F00:0884 -F00:0885 * reached end of table with no match -F00:0886 LAB_141F -F00:0887 MOVE.b (a5,d1.w),d0 * restore byte from input buffer - S02:0000C3E6: 10 35 10 00 -F00:0888 BRA.s LAB_13EC * go save byte in output and continue crunching - S02:0000C3EA: 60 AA -F00:0889 -F00:0890 * reached [EOL] -F00:0891 LAB_142A -F00:0892 MOVEQ #0,d0 * ensure longword clear - S02:0000C3EC: 70 00 -F00:0893 BTST d0,d2 * test odd bit (fastest) - S02:0000C3EE: 01 02 -F00:0894 BEQ.s LAB_142C * branch if no bytes to fill - S02:0000C3F0: 67 06 -F00:0895 -F00:0896 MOVE.b d0,(a0,d2.w) * clear next byte - S02:0000C3F2: 11 80 20 00 -F00:0897 ADDQ.w #1,d2 * increment buffer save index - S02:0000C3F6: 52 42 -F00:0898 LAB_142C -F00:0899 MOVE.l d0,(a0,d2.w) * clear next line pointer, EOT in immediate mode - S02:0000C3F8: 21 80 20 00 -F00:0900 RTS - S02:0000C3FC: 4E 75 -F00:0901 -F00:0902 -F00:0903 ************************************************************************************* -F00:0904 * -F00:0905 * search Basic for d1 line number from start of mem -F00:0906 -F00:0907 LAB_SSLN -F00:0908 MOVEA.l Smeml(a3),a0 * get start of program mem - S02:0000C3FE: 20 6B 04 2E -F00:0909 BRA.s LAB_SCLN * go search for required line from a0 - S02:0000C402: 60 02 -F00:0910 -F00:0911 LAB_145F -F00:0912 MOVEA.l d0,a0 * copy next line pointer - S02:0000C404: 20 40 -F00:0913 -F00:0914 * search Basic for d1 line number from a0 -F00:0915 * returns Cb=0 if found -F00:0916 * returns a0 pointer to found or next higher (not found) line -F00:0917 -F00:0918 LAB_SCLN -F00:0919 MOVE.l (a0)+,d0 * get next line pointer and point to line # - S02:0000C406: 20 18 -F00:0920 BEQ.s LAB_145E * is end marker so we're done, do 'no line' exit - S02:0000C408: 67 08 -F00:0921 -F00:0922 CMP.l (a0),d1 * compare this line # with required line # - S02:0000C40A: B2 90 -F00:0923 BGT.s LAB_145F * loop if required # > this # - S02:0000C40C: 6E F6 -F00:0924 -F00:0925 SUBQ.w #4,a0 * adjust pointer, flags not changed - S02:0000C40E: 59 48 -F00:0926 RTS - S02:0000C410: 4E 75 -F00:0927 -F00:0928 LAB_145E -F00:0929 SUBQ.w #4,a0 * adjust pointer, flags not changed - S02:0000C412: 59 48 -F00:0930 SUBQ.l #1,d0 * make end program found = -1, set carry - S02:0000C414: 53 80 -F00:0931 RTS - S02:0000C416: 4E 75 -F00:0932 -F00:0933 -F00:0934 ************************************************************************************* -F00:0935 * -F00:0936 * perform NEW -F00:0937 -F00:0938 LAB_NEW -F00:0939 BNE.s RTS_005 * exit if not end of statement (do syntax error) - S02:0000C418: 66 4C -F00:0940 -F00:0941 LAB_1463 -F00:0942 MOVEA.l Smeml(a3),a0 * point to start of program memory - S02:0000C41A: 20 6B 04 2E -F00:0943 MOVEQ #0,d0 * clear longword - S02:0000C41E: 70 00 -F00:0944 MOVE.l d0,(a0)+ * clear first line, next line pointer - S02:0000C420: 20 C0 -F00:0945 MOVE.l a0,Sfncl(a3) * set start of functions - S02:0000C422: 27 48 04 32 -F00:0946 -F00:0947 * reset execution to start, clear variables and flush stack -F00:0948 -F00:0949 LAB_1477 -F00:0950 MOVEA.l Smeml(a3),a5 * reset BASIC execute pointer - S02:0000C426: 2A 6B 04 2E -F00:0951 SUBQ.w #1,a5 * -1 (as end of previous line) - S02:0000C42A: 53 4D -F00:0952 -F00:0953 * "CLEAR" command gets here -F00:0954 -F00:0955 LAB_147A -F00:0956 MOVE.l Ememl(a3),Sstorl(a3) * save end of mem as bottom of string space - S02:0000C42C: 27 6B 04 4A 04 46 -F00:0957 MOVE.l Sfncl(a3),d0 * get start of functions - S02:0000C432: 20 2B 04 32 -F00:0958 MOVE.l d0,Svarl(a3) * start of variables - S02:0000C436: 27 40 04 36 -F00:0959 MOVE.l d0,Sstrl(a3) * start of strings - S02:0000C43A: 27 40 04 3A -F00:0960 MOVE.l d0,Sarryl(a3) * set start of arrays - S02:0000C43E: 27 40 04 3E -F00:0961 MOVE.l d0,Earryl(a3) * set end of arrays - S02:0000C442: 27 40 04 42 -F00:0962 LAB_1480 -F00:0963 MOVEQ #0,d0 * set Zb - S02:0000C446: 70 00 -F00:0964 MOVE.b d0,ccnull(a3) * clear get byte countdown - S02:0000C448: 17 40 05 EA -F00:0965 BSR LAB_RESTORE * perform RESTORE command - S02:0000C44C: 61 00 01 CC -F00:0966 -F00:0967 * flush stack & clear continue flag -F00:0968 -F00:0969 LAB_1491 -F00:0970 LEA des_sk(a3),a4 * reset descriptor stack pointer - S02:0000C450: 49 EB 04 8E -F00:0971 -F00:0972 MOVE.l (sp)+,d0 * pull return address - S02:0000C454: 20 1F -F00:0973 LEA ram_base(a3),sp * set stack to RAM start + 1k, flush stack - S02:0000C456: 4F EB 04 00 -F00:0974 MOVE.l d0,-(sp) * restore return address - S02:0000C45A: 2F 00 -F00:0975 -F00:0976 MOVEQ #0,d0 * clear longword - S02:0000C45C: 70 00 -F00:0977 MOVE.l d0,Cpntrl(a3) * clear continue pointer - S02:0000C45E: 27 40 04 5A -F00:0978 MOVE.b d0,Sufnxf(a3) * clear subscript/FNX flag - S02:0000C462: 17 40 05 DF -F00:0979 RTS_005 -F00:0980 RTS - S02:0000C466: 4E 75 -F00:0981 -F00:0982 -F00:0983 ************************************************************************************* -F00:0984 * -F00:0985 * perform CLEAR -F00:0986 -F00:0987 LAB_CLEAR -F00:0988 BEQ.s LAB_147A * if no following byte go do "CLEAR" - S02:0000C468: 67 C2 -F00:0989 -F00:0990 RTS * was following byte (go do syntax error) - S02:0000C46A: 4E 75 -F00:0991 -F00:0992 -F00:0993 ************************************************************************************* -F00:0994 * -F00:0995 * perform LIST [n][-m] -F00:0996 -F00:0997 LAB_LIST -F00:0998 BCS.s LAB_14BD * branch if next character numeric (LIST n...) - S02:0000C46C: 65 12 -F00:0999 -F00:1000 MOVEQ #-1,d1 * set end to $FFFFFFFF - S02:0000C46E: 72 FF -F00:1001 MOVE.l d1,Itemp(a3) * save to Itemp - S02:0000C470: 27 41 04 2A -F00:1002 -F00:1003 MOVEQ #0,d1 * set start to $00000000 - S02:0000C474: 72 00 -F00:1004 TST.b d0 * test next byte - S02:0000C476: 4A 00 -F00:1005 BEQ.s LAB_14C0 * branch if next character [NULL] (LIST) - S02:0000C478: 67 0A -F00:1006 -F00:1007 CMP.b #TK_MINUS,d0 * compare with token for - - S02:0000C47A: B0 3C 00 B3 -F00:1008 BNE.s RTS_005 * exit if not - (LIST -m) - S02:0000C47E: 66 E6 -F00:1009 -F00:1010 * LIST [[n]-[m]] this sets the n, if present, -F00:1011 * as the start and end -F00:1012 LAB_14BD -F00:1013 BSR LAB_GFPN * get fixed-point number into temp integer & d1 - S02:0000C480: 61 00 03 90 -F00:1014 LAB_14C0 -F00:1015 BSR LAB_SSLN * search BASIC for d1 line number - S02:0000C484: 61 00 FF 78 -F00:1016 * (pointer in a0) -F00:1017 BSR LAB_GBYT * scan memory - S02:0000C488: 61 00 09 32 -F00:1018 BEQ.s LAB_14D4 * branch if no more characters - S02:0000C48C: 67 16 -F00:1019 -F00:1020 * this bit checks the - is present -F00:1021 CMP.b #TK_MINUS,d0 * compare with token for - - S02:0000C48E: B0 3C 00 B3 -F00:1022 BNE.s RTS_005 * return if not "-" (will be Syntax error) - S02:0000C492: 66 D2 -F00:1023 -F00:1024 MOVEQ #-1,d1 * set end to $FFFFFFFF - S02:0000C494: 72 FF -F00:1025 MOVE.l d1,Itemp(a3) * save Itemp - S02:0000C496: 27 41 04 2A -F00:1026 -F00:1027 * LIST [n]-[m] the - was there so see if -F00:1028 * there is an m to set as the end value -F00:1029 BSR LAB_IGBY * increment & scan memory - S02:0000C49A: 61 00 09 1E -F00:1030 BEQ.s LAB_14D4 * branch if was [NULL] (LIST n-) - S02:0000C49E: 67 04 -F00:1031 -F00:1032 BSR LAB_GFPN * get fixed-point number into temp integer & d1 - S02:0000C4A0: 61 00 03 70 -F00:1033 LAB_14D4 -F00:1034 MOVE.b #$00,Oquote(a3) * clear open quote flag - S02:0000C4A4: 17 7C 00 00 05 DD -F00:1035 BSR LAB_CRLF * print CR/LF - S02:0000C4AA: 61 00 04 E6 -F00:1036 MOVE.l (a0)+,d0 * get next line pointer - S02:0000C4AE: 20 18 -F00:1037 BEQ.s RTS_005 * if null all done so exit - S02:0000C4B0: 67 B4 -F00:1038 -F00:1039 MOVEA.l d0,a1 * copy next line pointer - S02:0000C4B2: 22 40 -F00:1040 BSR LAB_1629 * do CRTL-C check vector - S02:0000C4B4: 61 00 01 2A -F00:1041 -F00:1042 MOVE.l (a0)+,d0 * get this line # - S02:0000C4B8: 20 18 -F00:1043 CMP.l Itemp(a3),d0 * compare end line # with this line # - S02:0000C4BA: B0 AB 04 2A -F00:1044 BHI.s RTS_005 * if this line greater all done so exit - S02:0000C4BE: 62 A6 -F00:1045 -F00:1046 LAB_14E2 -F00:1047 MOVEM.l a0-a1,-(sp) * save registers - S02:0000C4C0: 48 E7 00 C0 -F00:1048 BSR LAB_295E * print d0 as unsigned integer - S02:0000C4C4: 61 00 18 00 -F00:1049 MOVEM.l (sp)+,a0-a1 * restore registers - S02:0000C4C8: 4C DF 03 00 -F00:1050 MOVEQ #$20,d0 * space is the next character - S02:0000C4CC: 70 20 -F00:1051 LAB_150C -F00:1052 BSR LAB_PRNA * go print the character - S02:0000C4CE: 61 00 05 3A -F00:1053 CMP.b #$22,d0 * was it " character - S02:0000C4D2: B0 3C 00 22 -F00:1054 BNE.s LAB_1519 * branch if not - S02:0000C4D6: 66 04 -F00:1055 -F00:1056 * we're either entering or leaving quotes -F00:1057 EOR.b #$FF,Oquote(a3) * toggle open quote flag - S02:0000C4D8: 46 2B 05 DD -F00:1058 LAB_1519 -F00:1059 MOVE.b (a0)+,d0 * get byte and increment pointer - S02:0000C4DC: 10 18 -F00:1060 BNE.s LAB_152E * branch if not [EOL] (go print) - S02:0000C4DE: 66 08 -F00:1061 -F00:1062 * was [EOL] -F00:1063 MOVEA.l a1,a0 * copy next line pointer - S02:0000C4E0: 20 49 -F00:1064 MOVE.l a0,d0 * copy to set flags - S02:0000C4E2: 20 08 -F00:1065 BNE.s LAB_14D4 * go do next line if not [EOT] - S02:0000C4E4: 66 BE -F00:1066 -F00:1067 RTS - S02:0000C4E6: 4E 75 -F00:1068 -F00:1069 LAB_152E -F00:1070 BPL.s LAB_150C * just go print it if not token byte - S02:0000C4E8: 6A E4 -F00:1071 -F00:1072 * else it was a token byte so maybe uncrunch it -F00:1073 TST.b Oquote(a3) * test the open quote flag - S02:0000C4EA: 4A 2B 05 DD -F00:1074 BMI.s LAB_150C * just go print character if open quote set - S02:0000C4EE: 6B DE -F00:1075 -F00:1076 * else uncrunch BASIC token -F00:1077 LEA LAB_KEYT(pc),a2 * get keyword table address - S02:0000C4F0: 45 FA 2A D4 -F00:1078 MOVEQ #$7F,d1 * mask into d1 - S02:0000C4F4: 72 7F -F00:1079 AND.b d0,d1 * copy and mask token - S02:0000C4F6: C2 00 -F00:1080 LSL.w #2,d1 * *4 - S02:0000C4F8: E5 49 -F00:1081 LEA (a2,d1.w),a2 * get keyword entry address - S02:0000C4FA: 45 F2 10 00 -F00:1082 MOVE.b (a2)+,d0 * get byte from keyword table - S02:0000C4FE: 10 1A -F00:1083 BSR LAB_PRNA * go print the first character - S02:0000C500: 61 00 05 08 -F00:1084 MOVEQ #0,d1 * clear d1 - S02:0000C504: 72 00 -F00:1085 MOVE.b (a2)+,d1 * get remaining length byte from keyword table - S02:0000C506: 12 1A -F00:1086 BMI.s LAB_1519 * if -ve done so go get next byte - S02:0000C508: 6B D2 -F00:1087 -F00:1088 MOVE.w (a2),d0 * get offset to rest - S02:0000C50A: 30 12 -F00:1089 LEA TAB_STAR(pc),a2 * get keyword table address - S02:0000C50C: 45 FA 2D E4 -F00:1090 LEA (a2,d0.w),a2 * get address of rest - S02:0000C510: 45 F2 00 00 -F00:1091 LAB_1540 -F00:1092 MOVE.b (a2)+,d0 * get byte from keyword table - S02:0000C514: 10 1A -F00:1093 BSR LAB_PRNA * go print the character - S02:0000C516: 61 00 04 F2 -F00:1094 DBF d1,LAB_1540 * decrement and loop if more to do - S02:0000C51A: 51 C9 FF F8 -F00:1095 -F00:1096 BRA.s LAB_1519 * go get next byte - S02:0000C51E: 60 BC -F00:1097 -F00:1098 -F00:1099 ************************************************************************************* -F00:1100 * -F00:1101 * perform FOR -F00:1102 -F00:1103 LAB_FOR -F00:1104 BSR LAB_LET * go do LET - S02:0000C520: 61 00 03 90 -F00:1105 -F00:1106 MOVE.l Lvarpl(a3),d0 * get the loop variable pointer - S02:0000C524: 20 2B 04 72 -F00:1107 CMP.l Sstrl(a3),d0 * compare it with the end of vars memory - S02:0000C528: B0 AB 04 3A -F00:1108 BGE LAB_TMER * if greater go do type mismatch error - S02:0000C52C: 6C 00 FC 24 -F00:1109 -F00:1110 * test for not less than the start of variables memory if needed -F00:1111 * -F00:1112 * CMP.l Svarl(a3),d0 * compare it with the start of variables memory -F00:1113 * BLT LAB_TMER * if not variables memory do type mismatch error -F00:1114 -F00:1115 * MOVEQ #28,d0 * we need 28 bytes ! -F00:1116 * BSR.s LAB_1212 * check room on stack for d0 bytes -F00:1117 -F00:1118 BSR LAB_SNBS * scan for next BASIC statement ([:] or [EOL]) - S02:0000C530: 61 00 02 14 -F00:1119 * returns a0 as pointer to [:] or [EOL] -F00:1120 MOVE.l a0,(sp) * push onto stack (and dump the return address) - S02:0000C534: 2E 88 -F00:1121 MOVE.l Clinel(a3),-(sp) * push current line onto stack - S02:0000C536: 2F 2B 04 52 -F00:1122 -F00:1123 MOVEQ #TK_TO-$100,d0 * set "TO" token - S02:0000C53A: 70 AA -F00:1124 BSR LAB_SCCA * scan for CHR$(d0) else syntax error/warm start - S02:0000C53C: 61 00 08 74 -F00:1125 BSR LAB_CTNM * check if source is numeric, else type mismatch - S02:0000C540: 61 00 07 02 -F00:1126 MOVE.b Dtypef(a3),-(sp) * push the FOR variable data type onto stack - S02:0000C544: 1F 2B 05 B5 -F00:1127 BSR LAB_EVNM * evaluate expression and check is numeric else - S02:0000C548: 61 00 06 F8 -F00:1128 * do type mismatch -F00:1129 -F00:1130 MOVE.l FAC1_m(a3),-(sp) * push TO value mantissa - S02:0000C54C: 2F 2B 05 90 -F00:1131 MOVE.w FAC1_e(a3),-(sp) * push TO value exponent and sign - S02:0000C550: 3F 2B 05 94 -F00:1132 -F00:1133 MOVE.l #$80000000,FAC1_m(a3) * set default STEP size mantissa - S02:0000C554: 27 7C 80 00 00 00 05 90 -F00:1134 MOVE.w #$8100,FAC1_e(a3) * set default STEP size exponent and sign - S02:0000C55C: 37 7C 81 00 05 94 -F00:1135 -F00:1136 BSR LAB_GBYT * scan memory - S02:0000C562: 61 00 08 58 -F00:1137 CMP.b #TK_STEP,d0 * compare with STEP token - S02:0000C566: B0 3C 00 AF -F00:1138 BNE.s LAB_15B3 * jump if not "STEP" - S02:0000C56A: 66 08 -F00:1139 -F00:1140 * was STEP token so .... -F00:1141 BSR LAB_IGBY * increment & scan memory - S02:0000C56C: 61 00 08 4C -F00:1142 BSR LAB_EVNM * evaluate expression & check is numeric - S02:0000C570: 61 00 06 D0 -F00:1143 * else do type mismatch -F00:1144 LAB_15B3 -F00:1145 MOVE.l FAC1_m(a3),-(sp) * push STEP value mantissa - S02:0000C574: 2F 2B 05 90 -F00:1146 MOVE.w FAC1_e(a3),-(sp) * push STEP value exponent and sign - S02:0000C578: 3F 2B 05 94 -F00:1147 -F00:1148 MOVE.l Lvarpl(a3),-(sp) * push variable pointer for FOR/NEXT - S02:0000C57C: 2F 2B 04 72 -F00:1149 MOVE.w #TK_FOR,-(sp) * push FOR token on stack - S02:0000C580: 3F 3C 00 81 -F00:1150 -F00:1151 BRA.s LAB_15C2 * go do interpreter inner loop - S02:0000C584: 60 18 -F00:1152 -F00:1153 LAB_15DC * have reached [EOL]+1 -F00:1154 MOVE.w a5,d0 * copy BASIC execute pointer - S02:0000C586: 30 0D -F00:1155 AND.w #1,d0 * and make line start address even - S02:0000C588: C0 7C 00 01 -F00:1156 ADD.w d0,a5 * add to BASIC execute pointer - S02:0000C58C: DA C0 -F00:1157 MOVE.l (a5)+,d0 * get next line pointer - S02:0000C58E: 20 1D -F00:1158 BEQ LAB_1274 * if null go to immediate mode, no "BREAK" - S02:0000C590: 67 00 FC 1C -F00:1159 * message (was immediate or [EOT] marker) -F00:1160 -F00:1161 MOVE.l (a5)+,Clinel(a3) * save (new) current line # - S02:0000C594: 27 5D 04 52 -F00:1162 LAB_15F6 -F00:1163 BSR LAB_GBYT * get BASIC byte - S02:0000C598: 61 00 08 22 -F00:1164 BSR.s LAB_15FF * go interpret BASIC code from (a5) - S02:0000C59C: 61 1A -F00:1165 -F00:1166 * interpreter inner loop (re)entry point -F00:1167 -F00:1168 LAB_15C2 -F00:1169 BSR.s LAB_1629 * do CRTL-C check vector - S02:0000C59E: 61 40 -F00:1170 TST.b Clinel(a3) * test current line #, is -ve for immediate mode - S02:0000C5A0: 4A 2B 04 52 -F00:1171 BMI.s LAB_15D1 * branch if immediate mode - S02:0000C5A4: 6B 04 -F00:1172 -F00:1173 MOVE.l a5,Cpntrl(a3) * save BASIC execute pointer as continue pointer - S02:0000C5A6: 27 4D 04 5A -F00:1174 LAB_15D1 -F00:1175 MOVE.b (a5)+,d0 * get this byte & increment pointer - S02:0000C5AA: 10 1D -F00:1176 BEQ.s LAB_15DC * loop if [EOL] - S02:0000C5AC: 67 D8 -F00:1177 -F00:1178 CMP.b #$3A,d0 * compare with ":" - S02:0000C5AE: B0 3C 00 3A -F00:1179 BEQ.s LAB_15F6 * loop if was statement separator - S02:0000C5B2: 67 E4 -F00:1180 -F00:1181 BRA LAB_SNER * else syntax error, then warm start - S02:0000C5B4: 60 00 FB C8 -F00:1182 -F00:1183 -F00:1184 ************************************************************************************* -F00:1185 * -F00:1186 * interpret BASIC code from (a5) -F00:1187 -F00:1188 LAB_15FF -F00:1189 BEQ RTS_006 * exit if zero [EOL] - S02:0000C5B8: 67 00 00 8C -F00:1190 -F00:1191 LAB_1602 -F00:1192 EORI.b #$80,d0 * normalise token - S02:0000C5BC: 0A 00 00 80 -F00:1193 BMI LAB_LET * if not token, go do implied LET - S02:0000C5C0: 6B 00 02 F0 -F00:1194 -F00:1195 CMP.b #(TK_TAB-$80),d0 * compare normalised token with TAB - S02:0000C5C4: B0 3C 00 28 -F00:1196 BCC LAB_SNER * branch if d0>=TAB, syntax error/warm start - S02:0000C5C8: 64 00 FB B4 -F00:1197 * only tokens before TAB can start a statement -F00:1198 -F00:1199 EXT.w d0 * byte to word (clear high byte) - S02:0000C5CC: 48 80 -F00:1200 ADD.w d0,d0 * *2 - S02:0000C5CE: D0 40 -F00:1201 LEA LAB_CTBL(pc),a0 * get vector table base address - S02:0000C5D0: 41 FA 28 52 -F00:1202 MOVE.w (a0,d0.w),d0 * get offset to vector - S02:0000C5D4: 30 30 00 00 -F00:1203 PEA (a0,d0.w) * push vector - S02:0000C5D8: 48 70 00 00 -F00:1204 BRA LAB_IGBY * get following byte & execute vector - S02:0000C5DC: 60 00 07 DC -F00:1205 -F00:1206 -F00:1207 ************************************************************************************* -F00:1208 * -F00:1209 * CTRL-C check jump. this is called as a subroutine but exits back via a jump if a -F00:1210 * key press is detected. -F00:1211 -F00:1212 LAB_1629 -F00:1213 JMP V_CTLC(a3) * ctrl c check vector - S02:0000C5E0: 4E EB 04 24 -F00:1214 -F00:1215 * if there was a key press it gets back here ..... -F00:1216 -F00:1217 LAB_1636 -F00:1218 CMP.b #$03,d0 * compare with CTRL-C - S02:0000C5E4: B0 3C 00 03 -F00:1219 BEQ.s LAB_163B * STOP if was CTRL-C - S02:0000C5E8: 67 0C -F00:1220 -F00:1221 LAB_1639 -F00:1222 RTS * - S02:0000C5EA: 4E 75 -F00:1223 -F00:1224 -F00:1225 ************************************************************************************* -F00:1226 * -F00:1227 * perform END -F00:1228 -F00:1229 LAB_END -F00:1230 BNE.s LAB_1639 * exit if something follows STOP - S02:0000C5EC: 66 FC -F00:1231 MOVE.b #0,Breakf(a3) * clear break flag, indicate program end - S02:0000C5EE: 17 7C 00 00 05 DC -F00:1232 -F00:1233 -F00:1234 ************************************************************************************* -F00:1235 * -F00:1236 * perform STOP -F00:1237 -F00:1238 LAB_STOP -F00:1239 BNE.s LAB_1639 * exit if something follows STOP - S02:0000C5F4: 66 F4 -F00:1240 -F00:1241 LAB_163B -F00:1242 LEA Ibuffe(a3),a1 * get buffer end - S02:0000C5F6: 43 EB 05 90 -F00:1243 CMPA.l a1,a5 * compare execute address with buffer end - S02:0000C5FA: BB C9 -F00:1244 BCS.s LAB_164F * branch if BASIC pointer is in buffer - S02:0000C5FC: 65 0A -F00:1245 * can't continue in immediate mode -F00:1246 -F00:1247 * else... -F00:1248 MOVE.l a5,Cpntrl(a3) * save BASIC execute pointer as continue pointer - S02:0000C5FE: 27 4D 04 5A -F00:1249 LAB_1647 -F00:1250 MOVE.l Clinel(a3),Blinel(a3) * save break line - S02:0000C602: 27 6B 04 52 04 56 -F00:1251 LAB_164F -F00:1252 ADDQ.w #4,sp * dump return address, don't return to execute - S02:0000C608: 58 4F -F00:1253 * loop -F00:1254 MOVE.b Breakf(a3),d0 * get break flag - S02:0000C60A: 10 2B 05 DC -F00:1255 BEQ LAB_1274 * go do warm start if was program end - S02:0000C60E: 67 00 FB 9E -F00:1256 -F00:1257 LEA LAB_BMSG(pc),a0 * point to "Break" - S02:0000C612: 41 FA 2E 89 -F00:1258 BRA LAB_1269 * print "Break" and do warm start - S02:0000C616: 60 00 FB 88 -F00:1259 -F00:1260 -F00:1261 ************************************************************************************* -F00:1262 * -F00:1263 * perform RESTORE -F00:1264 -F00:1265 LAB_RESTORE -F00:1266 MOVEA.l Smeml(a3),a0 * copy start of memory - S02:0000C61A: 20 6B 04 2E -F00:1267 BEQ.s LAB_1624 * branch if next character null (RESTORE) - S02:0000C61E: 67 20 -F00:1268 -F00:1269 BSR LAB_GFPN * get fixed-point number into temp integer & d1 - S02:0000C620: 61 00 01 F0 -F00:1270 CMP.l Clinel(a3),d1 * compare current line # with required line # - S02:0000C624: B2 AB 04 52 -F00:1271 BLS.s LAB_GSCH * branch if >= (start search from beginning) - S02:0000C628: 63 0E -F00:1272 -F00:1273 MOVEA.l a5,a0 * copy BASIC execute pointer - S02:0000C62A: 20 4D -F00:1274 LAB_RESs -F00:1275 TST.b (a0)+ * test next byte & increment pointer - S02:0000C62C: 4A 18 -F00:1276 BNE.s LAB_RESs * loop if not EOL - S02:0000C62E: 66 FC -F00:1277 -F00:1278 MOVE.w a0,d0 * copy pointer - S02:0000C630: 30 08 -F00:1279 AND.w #1,d0 * mask odd bit - S02:0000C632: C0 7C 00 01 -F00:1280 ADD.w d0,a0 * add pointer - S02:0000C636: D0 C0 -F00:1281 * search for line in Itemp from (a0) -F00:1282 LAB_GSCH -F00:1283 BSR LAB_SCLN * search for d1 line number from a0 - S02:0000C638: 61 00 FD CC -F00:1284 * returns Cb=0 if found -F00:1285 BCS LAB_USER * go do "Undefined statement" error if not found - S02:0000C63C: 65 00 FB 28 -F00:1286 -F00:1287 LAB_1624 -F00:1288 TST.b -(a0) * decrement pointer (faster) - S02:0000C640: 4A 20 -F00:1289 MOVE.l a0,Dptrl(a3) * save DATA pointer - S02:0000C642: 27 48 04 62 -F00:1290 RTS_006 -F00:1291 RTS - S02:0000C646: 4E 75 -F00:1292 -F00:1293 -F00:1294 ************************************************************************************* -F00:1295 * -F00:1296 * perform NULL -F00:1297 -F00:1298 LAB_NULL -F00:1299 BSR LAB_GTBY * get byte parameter, result in d0 and Itemp - S02:0000C648: 61 00 10 D0 -F00:1300 MOVE.b d0,Nullct(a3) * save new NULL count - S02:0000C64C: 17 40 05 E4 -F00:1301 RTS - S02:0000C650: 4E 75 -F00:1302 -F00:1303 -F00:1304 ************************************************************************************* -F00:1305 * -F00:1306 * perform CONT -F00:1307 -F00:1308 LAB_CONT -F00:1309 BNE LAB_SNER * if following byte exit to do syntax error - S02:0000C652: 66 00 FB 2A -F00:1310 -F00:1311 TST.b Clinel(a3) * test current line #, is -ve for immediate mode - S02:0000C656: 4A 2B 04 52 -F00:1312 BPL LAB_CCER * if running go do can't continue error - S02:0000C65A: 6A 00 FA EA -F00:1313 -F00:1314 MOVE.l Cpntrl(a3),d0 * get continue pointer - S02:0000C65E: 20 2B 04 5A -F00:1315 BEQ LAB_CCER * go do can't continue error if we can't - S02:0000C662: 67 00 FA E2 -F00:1316 -F00:1317 * we can continue so ... -F00:1318 MOVEA.l d0,a5 * save continue pointer as BASIC execute pointer - S02:0000C666: 2A 40 -F00:1319 MOVE.l Blinel(a3),Clinel(a3) * set break line as current line - S02:0000C668: 27 6B 04 56 04 52 -F00:1320 RTS - S02:0000C66E: 4E 75 -F00:1321 -F00:1322 -F00:1323 ************************************************************************************* -F00:1324 * -F00:1325 * perform RUN -F00:1326 -F00:1327 LAB_RUN -F00:1328 BNE.s LAB_RUNn * if following byte do RUN n - S02:0000C670: 66 0C -F00:1329 -F00:1330 BSR LAB_1477 * execution to start, clear vars & flush stack - S02:0000C672: 61 00 FD B2 -F00:1331 MOVE.l a5,Cpntrl(a3) * save as continue pointer - S02:0000C676: 27 4D 04 5A -F00:1332 BRA LAB_15C2 * go do interpreter inner loop - S02:0000C67A: 60 00 FF 22 -F00:1333 * (can't RTS, we flushed the stack!) -F00:1334 -F00:1335 LAB_RUNn -F00:1336 BSR LAB_147A * go do "CLEAR" - S02:0000C67E: 61 00 FD AC -F00:1337 BRA.s LAB_16B0 * get n and do GOTO n - S02:0000C682: 60 1C -F00:1338 -F00:1339 -F00:1340 ************************************************************************************* -F00:1341 * -F00:1342 * perform DO -F00:1343 -F00:1344 LAB_DO -F00:1345 * MOVE.l #$05,d0 * need 5 bytes for DO -F00:1346 * BSR.s LAB_1212 * check room on stack for A bytes -F00:1347 MOVE.l a5,-(sp) * push BASIC execute pointer on stack - S02:0000C684: 2F 0D -F00:1348 MOVE.l Clinel(a3),-(sp) * push current line on stack - S02:0000C686: 2F 2B 04 52 -F00:1349 MOVE.w #TK_DO,-(sp) * push token for DO on stack - S02:0000C68A: 3F 3C 00 9C -F00:1350 PEA LAB_15C2(pc) * set return address - S02:0000C68E: 48 7A FF 0E -F00:1351 BRA LAB_GBYT * scan memory & return to interpreter inner loop - S02:0000C692: 60 00 07 28 -F00:1352 -F00:1353 -F00:1354 ************************************************************************************* -F00:1355 * -F00:1356 * perform GOSUB -F00:1357 -F00:1358 LAB_GOSUB -F00:1359 * MOVE.l #10,d0 * need 10 bytes for GOSUB -F00:1360 * BSR.s LAB_1212 * check room on stack for d0 bytes -F00:1361 MOVE.l a5,-(sp) * push BASIC execute pointer - S02:0000C696: 2F 0D -F00:1362 MOVE.l Clinel(a3),-(sp) * push current line - S02:0000C698: 2F 2B 04 52 -F00:1363 MOVE.w #TK_GOSUB,-(sp) * push token for GOSUB - S02:0000C69C: 3F 3C 00 8D -F00:1364 LAB_16B0 -F00:1365 BSR LAB_GBYT * scan memory - S02:0000C6A0: 61 00 07 1A -F00:1366 PEA LAB_15C2(pc) * return to interpreter inner loop after GOTO n - S02:0000C6A4: 48 7A FE F8 -F00:1367 -F00:1368 * this PEA is needed because either we just cleared the stack and have nowhere to return -F00:1369 * to or, in the case of GOSUB, we have just dropped a load on the stack and the address -F00:1370 * we whould have returned to is buried. This burried return address will be unstacked by -F00:1371 * the corresponding RETURN command -F00:1372 -F00:1373 -F00:1374 ************************************************************************************* -F00:1375 * -F00:1376 * perform GOTO -F00:1377 -F00:1378 LAB_GOTO -F00:1379 BSR LAB_GFPN * get fixed-point number into temp integer & d1 - S02:0000C6A8: 61 00 01 68 -F00:1380 MOVEA.l Smeml(a3),a0 * get start of memory - S02:0000C6AC: 20 6B 04 2E -F00:1381 CMP.l Clinel(a3),d1 * compare current line with wanted # - S02:0000C6B0: B2 AB 04 52 -F00:1382 BLS.s LAB_16D0 * branch if current # => wanted # - S02:0000C6B4: 63 0E -F00:1383 -F00:1384 MOVEA.l a5,a0 * copy BASIC execute pointer - S02:0000C6B6: 20 4D -F00:1385 LAB_GOTs -F00:1386 TST.b (a0)+ * test next byte & increment pointer - S02:0000C6B8: 4A 18 -F00:1387 BNE.s LAB_GOTs * loop if not EOL - S02:0000C6BA: 66 FC -F00:1388 -F00:1389 MOVE.w a0,d0 * past pad byte(s) - S02:0000C6BC: 30 08 -F00:1390 AND.w #1,d0 * mask odd bit - S02:0000C6BE: C0 7C 00 01 -F00:1391 ADD.w d0,a0 * add to pointer - S02:0000C6C2: D0 C0 -F00:1392 -F00:1393 LAB_16D0 -F00:1394 BSR LAB_SCLN * search for d1 line number from a0 - S02:0000C6C4: 61 00 FD 40 -F00:1395 * returns Cb=0 if found -F00:1396 BCS LAB_USER * if carry set go do "Undefined statement" error - S02:0000C6C8: 65 00 FA 9C -F00:1397 -F00:1398 MOVEA.l a0,a5 * copy to basic execute pointer - S02:0000C6CC: 2A 48 -F00:1399 SUBQ.w #1,a5 * decrement pointer - S02:0000C6CE: 53 4D -F00:1400 MOVE.l a5,Cpntrl(a3) * save as continue pointer - S02:0000C6D0: 27 4D 04 5A -F00:1401 RTS - S02:0000C6D4: 4E 75 -F00:1402 -F00:1403 -F00:1404 ************************************************************************************* -F00:1405 * -F00:1406 * perform LOOP -F00:1407 -F00:1408 LAB_LOOP -F00:1409 CMP.w #TK_DO,4(sp) * compare token on stack with DO token - S02:0000C6D6: 0C 6F 00 9C 00 04 -F00:1410 BNE LAB_LDER * branch if no matching DO - S02:0000C6DC: 66 00 FA 60 -F00:1411 -F00:1412 MOVE.b d0,d7 * copy following token (byte) - S02:0000C6E0: 1E 00 -F00:1413 BEQ.s LoopAlways * if no following token loop forever - S02:0000C6E2: 67 2E -F00:1414 -F00:1415 CMP.b #':',d7 * compare with ":" - S02:0000C6E4: BE 3C 00 3A -F00:1416 BEQ.s LoopAlways * if no following token loop forever - S02:0000C6E8: 67 28 -F00:1417 -F00:1418 SUB.b #TK_UNTIL,d7 * subtract token for UNTIL - S02:0000C6EA: 9E 3C 00 B0 -F00:1419 BEQ.s DoRest * branch if was UNTIL - S02:0000C6EE: 67 08 -F00:1420 -F00:1421 SUBQ.b #1,d7 * decrement result - S02:0000C6F0: 53 07 -F00:1422 BNE LAB_SNER * if not WHILE go do syntax error & warm start - S02:0000C6F2: 66 00 FA 8A -F00:1423 * only if the token was WHILE will this fail -F00:1424 -F00:1425 MOVEQ #-1,d7 * set invert result longword - S02:0000C6F6: 7E FF -F00:1426 DoRest -F00:1427 BSR LAB_IGBY * increment & scan memory - S02:0000C6F8: 61 00 06 C0 -F00:1428 BSR LAB_EVEX * evaluate expression - S02:0000C6FC: 61 00 05 5C -F00:1429 TST.b FAC1_e(a3) * test FAC1 exponent - S02:0000C700: 4A 2B 05 94 -F00:1430 BEQ.s DoCmp * if = 0 go do straight compare - S02:0000C704: 67 06 -F00:1431 -F00:1432 MOVE.b #$FF,FAC1_e(a3) * else set all bits - S02:0000C706: 17 7C 00 FF 05 94 -F00:1433 DoCmp -F00:1434 EOR.b d7,FAC1_e(a3) * EOR with invert byte - S02:0000C70C: BF 2B 05 94 -F00:1435 BNE.s LoopDone * if <> 0 clear stack & back to interpreter loop - S02:0000C710: 66 14 -F00:1436 -F00:1437 * loop condition wasn't met so do it again -F00:1438 LoopAlways -F00:1439 MOVE.l 6(sp),Clinel(a3) * copy DO current line - S02:0000C712: 27 6F 00 06 04 52 -F00:1440 MOVE.l 10(sp),a5 * save BASIC execute pointer - S02:0000C718: 2A 6F 00 0A -F00:1441 -F00:1442 LEA LAB_15C2(pc),a0 * get return address - S02:0000C71C: 41 FA FE 80 -F00:1443 MOVE.l a0,(sp) * dump the call to this routine and set the - S02:0000C720: 2E 88 -F00:1444 * return address -F00:1445 BRA LAB_GBYT * scan memory and return to interpreter inner - S02:0000C722: 60 00 06 98 -F00:1446 * loop -F00:1447 -F00:1448 * clear stack & back to interpreter loop -F00:1449 LoopDone -F00:1450 LEA 14(sp),sp * dump structure and call from stack - S02:0000C726: 4F EF 00 0E -F00:1451 BRA.s LAB_DATA * go perform DATA (find : or [EOL]) - S02:0000C72A: 60 14 -F00:1452 -F00:1453 -F00:1454 ************************************************************************************* -F00:1455 * -F00:1456 * perform RETURN -F00:1457 -F00:1458 LAB_RETURN -F00:1459 BNE.s RTS_007 * exit if following token to allow syntax error - S02:0000C72C: 66 16 -F00:1460 -F00:1461 CMP.w #TK_GOSUB,4(sp) * compare token from stack with GOSUB - S02:0000C72E: 0C 6F 00 8D 00 04 -F00:1462 BNE LAB_RGER * do RETURN without GOSUB error if no matching - S02:0000C734: 66 00 FA 44 -F00:1463 * GOSUB -F00:1464 -F00:1465 ADDQ.w #6,sp * dump calling address & token - S02:0000C738: 5C 4F -F00:1466 MOVE.l (sp)+,Clinel(a3) * pull current line - S02:0000C73A: 27 5F 04 52 -F00:1467 MOVE.l (sp)+,a5 * pull BASIC execute pointer - S02:0000C73E: 2A 5F -F00:1468 * now do perform "DATA" statement as we could be -F00:1469 * returning into the middle of an ON GOSUB -F00:1470 * n,m,p,q line (the return address used by the -F00:1471 * DATA statement is the one pushed before the -F00:1472 * GOSUB was executed!) -F00:1473 -F00:1474 -F00:1475 ************************************************************************************* -F00:1476 * -F00:1477 * perform DATA -F00:1478 -F00:1479 LAB_DATA -F00:1480 BSR.s LAB_SNBS * scan for next BASIC statement ([:] or [EOL]) - S02:0000C740: 61 04 -F00:1481 * returns a0 as pointer to [:] or [EOL] -F00:1482 MOVEA.l a0,a5 * skip rest of statement - S02:0000C742: 2A 48 -F00:1483 RTS_007 -F00:1484 RTS - S02:0000C744: 4E 75 -F00:1485 -F00:1486 -F00:1487 ************************************************************************************* -F00:1488 * -F00:1489 * scan for next BASIC statement ([:] or [EOL]) -F00:1490 * returns a0 as pointer to [:] or [EOL] -F00:1491 -F00:1492 LAB_SNBS -F00:1493 MOVEA.l a5,a0 * copy BASIC execute pointer - S02:0000C746: 20 4D -F00:1494 MOVEQ #$22,d1 * set string quote character - S02:0000C748: 72 22 -F00:1495 MOVEQ #$3A,d2 * set look for character = ":" - S02:0000C74A: 74 3A -F00:1496 BRA.s LAB_172D * go do search - S02:0000C74C: 60 08 -F00:1497 -F00:1498 LAB_172C -F00:1499 CMP.b d0,d2 * compare with ":" - S02:0000C74E: B4 00 -F00:1500 BEQ.s RTS_007a * exit if found - S02:0000C750: 67 08 -F00:1501 -F00:1502 CMP.b d0,d1 * compare with '"' - S02:0000C752: B2 00 -F00:1503 BEQ.s LAB_1725 * if found go search for [EOL] - S02:0000C754: 67 0C -F00:1504 -F00:1505 LAB_172D -F00:1506 MOVE.b (a0)+,d0 * get next byte - S02:0000C756: 10 18 -F00:1507 BNE.s LAB_172C * loop if not null [EOL] - S02:0000C758: 66 F4 -F00:1508 -F00:1509 RTS_007a -F00:1510 SUBQ.w #1,a0 * correct pointer - S02:0000C75A: 53 48 -F00:1511 RTS - S02:0000C75C: 4E 75 -F00:1512 -F00:1513 LAB_1723 -F00:1514 CMP.b d0,d1 * compare with '"' - S02:0000C75E: B2 00 -F00:1515 BEQ.s LAB_172D * if found go search for ":" or [EOL] - S02:0000C760: 67 F4 -F00:1516 -F00:1517 LAB_1725 -F00:1518 MOVE.b (a0)+,d0 * get next byte - S02:0000C762: 10 18 -F00:1519 BNE.s LAB_1723 * loop if not null [EOL] - S02:0000C764: 66 F8 -F00:1520 -F00:1521 BRA.s RTS_007a * correct pointer & return - S02:0000C766: 60 F2 -F00:1522 -F00:1523 -F00:1524 ************************************************************************************* -F00:1525 * -F00:1526 * perform IF -F00:1527 -F00:1528 LAB_IF -F00:1529 BSR LAB_EVEX * evaluate expression - S02:0000C768: 61 00 04 F0 -F00:1530 BSR LAB_GBYT * scan memory - S02:0000C76C: 61 00 06 4E -F00:1531 CMP.b #TK_THEN,d0 * compare with THEN token - S02:0000C770: B0 3C 00 AD -F00:1532 BEQ.s LAB_174B * if it was THEN then continue - S02:0000C774: 67 14 -F00:1533 -F00:1534 * wasn't IF .. THEN so must be IF .. GOTO -F00:1535 CMP.b #TK_GOTO,d0 * compare with GOTO token - S02:0000C776: B0 3C 00 89 -F00:1536 BNE LAB_SNER * if not GOTO token do syntax error/warm start - S02:0000C77A: 66 00 FA 02 -F00:1537 -F00:1538 * was GOTO so check for GOTO -F00:1539 MOVE.l a5,a0 * save the execute pointer - S02:0000C77E: 20 4D -F00:1540 BSR LAB_IGBY * scan memory, test for a numeric character - S02:0000C780: 61 00 06 38 -F00:1541 MOVE.l a0,a5 * restore the execute pointer - S02:0000C784: 2A 48 -F00:1542 BCC LAB_SNER * if not numeric do syntax error/warm start - S02:0000C786: 64 00 F9 F6 -F00:1543 -F00:1544 LAB_174B -F00:1545 MOVE.b FAC1_e(a3),d0 * get FAC1 exponent - S02:0000C78A: 10 2B 05 94 -F00:1546 BEQ.s LAB_174E * if result was zero go look for an ELSE - S02:0000C78E: 67 1E -F00:1547 -F00:1548 BSR LAB_IGBY * increment & scan memory - S02:0000C790: 61 00 06 28 -F00:1549 BCS LAB_GOTO * if numeric do GOTO n - S02:0000C794: 65 00 FF 12 -F00:1550 * a GOTO will never return to the IF -F00:1551 * statement so there is no need to return -F00:1552 * to this code -F00:1553 -F00:1554 CMP.b #TK_RETURN,d0 * compare with RETURN token - S02:0000C798: B0 3C 00 8E -F00:1555 BEQ LAB_1602 * if RETURN then interpret BASIC code from (a5) - S02:0000C79C: 67 00 FE 1E -F00:1556 * and don't return here -F00:1557 -F00:1558 BSR LAB_15FF * else interpret BASIC code from (a5) - S02:0000C7A0: 61 00 FE 16 -F00:1559 -F00:1560 * the IF was executed and there may be a following ELSE so the code needs to return -F00:1561 * here to check and ignore the ELSE if present -F00:1562 -F00:1563 MOVE.b (a5),d0 * get the next basic byte - S02:0000C7A4: 10 15 -F00:1564 CMP.b #TK_ELSE,d0 * compare it with the token for ELSE - S02:0000C7A6: B0 3C 00 A9 -F00:1565 BEQ LAB_DATA * if ELSE ignore the following statement - S02:0000C7AA: 67 94 -F00:1566 -F00:1567 * there was no ELSE so continue execution of IF THEN [: ]. any -F00:1568 * following ELSE will, correctly, cause a syntax error -F00:1569 -F00:1570 RTS * else return to interpreter inner loop - S02:0000C7AC: 4E 75 -F00:1571 -F00:1572 * perform ELSE after IF -F00:1573 -F00:1574 LAB_174E -F00:1575 MOVE.b (a5)+,d0 * faster increment past THEN - S02:0000C7AE: 10 1D -F00:1576 E2028 MOVEQ #TK_ELSE,d3 * set search for ELSE token - S02:0000C7B0: 76 A9 -F00:1577 E2028 MOVEQ #TK_IF,d4 * set search for IF token - S02:0000C7B2: 78 8B -F00:1578 MOVEQ #0,d5 * clear the nesting depth - S02:0000C7B4: 7A 00 -F00:1579 LAB_1750 -F00:1580 MOVE.b (a5)+,d0 * get next BASIC byte & increment ptr - S02:0000C7B6: 10 1D -F00:1581 BEQ.s LAB_1754 * if EOL correct the pointer and return - S02:0000C7B8: 67 20 -F00:1582 -F00:1583 CMP.b d4,d0 * compare with "IF" token - S02:0000C7BA: B0 04 -F00:1584 BNE.s LAB_1752 * skip if not nested IF - S02:0000C7BC: 66 04 -F00:1585 -F00:1586 ADDQ.w #1,d5 * else increment the nesting depth .. - S02:0000C7BE: 52 45 -F00:1587 BRA.s LAB_1750 * .. and continue looking - S02:0000C7C0: 60 F4 -F00:1588 -F00:1589 LAB_1752 -F00:1590 CMP.b d3,d0 * compare with ELSE token - S02:0000C7C2: B0 03 -F00:1591 BNE.s LAB_1750 * if not ELSE continue looking - S02:0000C7C4: 66 F0 -F00:1592 -F00:1593 LAB_1756 -F00:1594 DBF d5,LAB_1750 * loop if still nested - S02:0000C7C6: 51 CD FF EE -F00:1595 -F00:1596 * found the matching ELSE, now do <{n|statement}> -F00:1597 -F00:1598 BSR LAB_GBYT * scan memory - S02:0000C7CA: 61 00 05 F0 -F00:1599 BCS LAB_GOTO * if numeric do GOTO n - S02:0000C7CE: 65 00 FE D8 -F00:1600 * code will return to the interpreter loop -F00:1601 * at the tail end of the GOTO -F00:1602 -F00:1603 BRA LAB_15FF * else interpret BASIC code from (a5) - S02:0000C7D2: 60 00 FD E4 -F00:1604 * code will return to the interpreter loop -F00:1605 * at the tail end of the -F00:1606 -F00:1607 -F00:1608 ************************************************************************************* -F00:1609 * -F00:1610 * perform REM, skip (rest of) line -F00:1611 -F00:1612 LAB_REM -F00:1613 TST.b (a5)+ * test byte & increment pointer - S02:0000C7D6: 4A 1D -F00:1614 BNE.s LAB_REM * loop if not EOL - S02:0000C7D8: 66 FC -F00:1615 -F00:1616 LAB_1754 -F00:1617 SUBQ.w #1,a5 * correct the execute pointer - S02:0000C7DA: 53 4D -F00:1618 RTS - S02:0000C7DC: 4E 75 -F00:1619 -F00:1620 -F00:1621 ************************************************************************************* -F00:1622 * -F00:1623 * perform ON -F00:1624 -F00:1625 LAB_ON -F00:1626 BSR LAB_GTBY * get byte parameter, result in d0 and Itemp - S02:0000C7DE: 61 00 0F 3A -F00:1627 MOVE.b d0,d2 * copy byte - S02:0000C7E2: 14 00 -F00:1628 BSR LAB_GBYT * restore BASIC byte - S02:0000C7E4: 61 00 05 D6 -F00:1629 MOVE.w d0,-(sp) * push GOTO/GOSUB token - S02:0000C7E8: 3F 00 -F00:1630 CMP.b #TK_GOSUB,d0 * compare with GOSUB token - S02:0000C7EA: B0 3C 00 8D -F00:1631 BEQ.s LAB_176C * branch if GOSUB - S02:0000C7EE: 67 08 -F00:1632 -F00:1633 CMP.b #TK_GOTO,d0 * compare with GOTO token - S02:0000C7F0: B0 3C 00 89 -F00:1634 BNE LAB_SNER * if not GOTO do syntax error, then warm start - S02:0000C7F4: 66 00 F9 88 -F00:1635 -F00:1636 * next character was GOTO or GOSUB -F00:1637 -F00:1638 LAB_176C -F00:1639 SUBQ.b #1,d2 * decrement index (byte value) - S02:0000C7F8: 53 02 -F00:1640 BNE.s LAB_1773 * branch if not zero - S02:0000C7FA: 66 06 -F00:1641 -F00:1642 MOVE.w (sp)+,d0 * pull GOTO/GOSUB token - S02:0000C7FC: 30 1F -F00:1643 BRA LAB_1602 * go execute it - S02:0000C7FE: 60 00 FD BC -F00:1644 -F00:1645 LAB_1773 -F00:1646 BSR LAB_IGBY * increment & scan memory - S02:0000C802: 61 00 05 B6 -F00:1647 BSR.s LAB_GFPN * get fixed-point number into temp integer & d1 - S02:0000C806: 61 0A -F00:1648 * (skip this n) -F00:1649 CMP.b #$2C,d0 * compare next character with "," - S02:0000C808: B0 3C 00 2C -F00:1650 BEQ.s LAB_176C * loop if "," - S02:0000C80C: 67 EA -F00:1651 -F00:1652 MOVE.w (sp)+,d0 * pull GOTO/GOSUB token (run out of options) - S02:0000C80E: 30 1F -F00:1653 RTS * and exit - S02:0000C810: 4E 75 -F00:1654 -F00:1655 -F00:1656 ************************************************************************************* -F00:1657 * -F00:1658 * get fixed-point number into temp integer & d1 -F00:1659 * interpret number from (a5), leave (a5) pointing to byte after # -F00:1660 -F00:1661 LAB_GFPN -F00:1662 MOVEQ #$00,d1 * clear integer register - S02:0000C812: 72 00 -F00:1663 MOVE.l d1,d0 * clear d0 - S02:0000C814: 20 01 -F00:1664 BSR LAB_GBYT * scan memory, Cb=1 if "0"-"9", & get byte - S02:0000C816: 61 00 05 A4 -F00:1665 BCC.s LAB_1786 * return if carry clear, chr was not "0"-"9" - S02:0000C81A: 64 2E -F00:1666 -F00:1667 MOVE.l d2,-(sp) * save d2 - S02:0000C81C: 2F 02 -F00:1668 LAB_1785 -F00:1669 MOVE.l d1,d2 * copy integer register - S02:0000C81E: 24 01 -F00:1670 ADD.l d1,d1 * *2 - S02:0000C820: D2 81 -F00:1671 BCS LAB_SNER * if overflow do syntax error, then warm start - S02:0000C822: 65 00 F9 5A -F00:1672 -F00:1673 ADD.l d1,d1 * *4 - S02:0000C826: D2 81 -F00:1674 BCS LAB_SNER * if overflow do syntax error, then warm start - S02:0000C828: 65 00 F9 54 -F00:1675 -F00:1676 ADD.l d2,d1 * *1 + *4 - S02:0000C82C: D2 82 -F00:1677 BCS LAB_SNER * if overflow do syntax error, then warm start - S02:0000C82E: 65 00 F9 4E -F00:1678 -F00:1679 ADD.l d1,d1 * *10 - S02:0000C832: D2 81 -F00:1680 BCS LAB_SNER * if overflow do syntax error, then warm start - S02:0000C834: 65 00 F9 48 -F00:1681 -F00:1682 SUB.b #$30,d0 * subtract $30 from byte - S02:0000C838: 90 3C 00 30 -F00:1683 ADD.l d0,d1 * add to integer register, the top 24 bits are - S02:0000C83C: D2 80 -F00:1684 * always clear -F00:1685 BVS LAB_SNER * if overflow do syntax error, then warm start - S02:0000C83E: 69 00 F9 3E -F00:1686 * this makes the maximum line number 2147483647 -F00:1687 BSR LAB_IGBY * increment & scan memory - S02:0000C842: 61 00 05 76 -F00:1688 BCS.s LAB_1785 * loop for next character if "0"-"9" - S02:0000C846: 65 D6 -F00:1689 -F00:1690 MOVE.l (sp)+,d2 * restore d2 - S02:0000C848: 24 1F -F00:1691 LAB_1786 -F00:1692 MOVE.l d1,Itemp(a3) * save Itemp - S02:0000C84A: 27 41 04 2A -F00:1693 RTS - S02:0000C84E: 4E 75 -F00:1694 -F00:1695 -F00:1696 ************************************************************************************* -F00:1697 * -F00:1698 * perform DEC -F00:1699 -F00:1700 LAB_DEC -F00:1701 MOVE.w #$8180,-(sp) * set -1 sign/exponent - S02:0000C850: 3F 3C 81 80 -F00:1702 BRA.s LAB_17B7 * go do DEC - S02:0000C854: 60 0A -F00:1703 -F00:1704 -F00:1705 ************************************************************************************* -F00:1706 * -F00:1707 * perform INC -F00:1708 -F00:1709 LAB_INC -F00:1710 MOVE.w #$8100,-(sp) * set 1 sign/exponent - S02:0000C856: 3F 3C 81 00 -F00:1711 BRA.s LAB_17B7 * go do INC - S02:0000C85A: 60 04 -F00:1712 -F00:1713 * was "," so another INCR variable to do -F00:1714 LAB_17B8 -F00:1715 BSR LAB_IGBY * increment and scan memory - S02:0000C85C: 61 00 05 5C -F00:1716 LAB_17B7 -F00:1717 BSR LAB_GVAR * get variable address in a0 - S02:0000C860: 61 00 07 66 -F00:1718 -F00:1719 * if you want a non existant variable to return a null value then set the novar -F00:1720 * value at the top of this file to some non zero value -F00:1721 -F00:1722 ifne novar -F00:1723 -F00:1724 BEQ.s LAB_INCT * if variable not found skip the inc/dec -F00:1725 -F00:1726 endc -F00:1727 -F00:1728 TST.b Dtypef(a3) * test data type, $80=string, $40=integer, - S02:0000C864: 4A 2B 05 B5 -F00:1729 * $00=float -F00:1730 BMI LAB_TMER * if string do "Type mismatch" error/warm start - S02:0000C868: 6B 00 F8 E8 -F00:1731 -F00:1732 BNE.s LAB_INCI * go do integer INC/DEC - S02:0000C86C: 66 36 -F00:1733 -F00:1734 MOVE.l a0,Lvarpl(a3) * save var address - S02:0000C86E: 27 48 04 72 -F00:1735 BSR LAB_UFAC * unpack memory (a0) into FAC1 - S02:0000C872: 61 00 12 FE -F00:1736 MOVE.l #$80000000,FAC2_m(a3) * set FAC2 mantissa for 1 - S02:0000C876: 27 7C 80 00 00 00 05 98 -F00:1737 MOVE.w (sp),d0 * move exponent & sign to d0 - S02:0000C87E: 30 17 -F00:1738 MOVE.w d0,FAC2_e(a3) * move exponent & sign to FAC2 - S02:0000C880: 37 40 05 9C -F00:1739 MOVE.b FAC1_s(a3),FAC_sc(a3) * make sign compare = FAC1 sign - S02:0000C884: 17 6B 05 95 05 9E -F00:1740 EOR.b d0,FAC_sc(a3) * make sign compare (FAC1_s EOR FAC2_s) - S02:0000C88A: B1 2B 05 9E -F00:1741 BSR LAB_ADD * add FAC2 to FAC1 - S02:0000C88E: 61 00 10 00 -F00:1742 BSR LAB_PFAC * pack FAC1 into variable (Lvarpl) - S02:0000C892: 61 00 12 FA -F00:1743 LAB_INCT -F00:1744 BSR LAB_GBYT * scan memory - S02:0000C896: 61 00 05 24 -F00:1745 CMPI.b #$2C,d0 * compare with "," - S02:0000C89A: 0C 00 00 2C -F00:1746 BEQ.s LAB_17B8 * continue if "," (another variable to do) - S02:0000C89E: 67 BC -F00:1747 -F00:1748 ADDQ.w #2,sp * else dump sign & exponent - S02:0000C8A0: 54 4F -F00:1749 RTS - S02:0000C8A2: 4E 75 -F00:1750 -F00:1751 LAB_INCI -F00:1752 TST.b 1(sp) * test sign - S02:0000C8A4: 4A 2F 00 01 -F00:1753 BNE.s LAB_DECI * branch if DEC - S02:0000C8A8: 66 04 -F00:1754 -F00:1755 ADDQ.l #1,(a0) * increment variable - S02:0000C8AA: 52 90 -F00:1756 BRA.s LAB_INCT * go scan for more - S02:0000C8AC: 60 E8 -F00:1757 -F00:1758 LAB_DECI -F00:1759 SUBQ.l #1,(a0) * decrement variable - S02:0000C8AE: 53 90 -F00:1760 BRA.s LAB_INCT * go scan for more - S02:0000C8B0: 60 E4 -F00:1761 -F00:1762 -F00:1763 ************************************************************************************* -F00:1764 * -F00:1765 * perform LET -F00:1766 -F00:1767 LAB_LET -F00:1768 BSR LAB_SVAR * search for or create a variable - S02:0000C8B2: 61 00 07 10 -F00:1769 * return the variable address in a0 -F00:1770 MOVE.l a0,Lvarpl(a3) * save variable address - S02:0000C8B6: 27 48 04 72 -F00:1771 MOVE.b Dtypef(a3),-(sp) * push var data type, $80=string, $40=integer, - S02:0000C8BA: 1F 2B 05 B5 -F00:1772 * $00=float -F00:1773 MOVEQ #TK_EQUAL-$100,d0 * get = token - S02:0000C8BE: 70 BD -F00:1774 BSR LAB_SCCA * scan for CHR$(d0), else do syntax error/warm - S02:0000C8C0: 61 00 04 F0 -F00:1775 * start -F00:1776 BSR LAB_EVEX * evaluate expression - S02:0000C8C4: 61 00 03 94 -F00:1777 MOVE.b Dtypef(a3),d0 * copy expression data type - S02:0000C8C8: 10 2B 05 B5 -F00:1778 MOVE.b (sp)+,Dtypef(a3) * pop variable data type - S02:0000C8CC: 17 5F 05 B5 -F00:1779 ROL.b #1,d0 * set carry if expression type = string - S02:0000C8D0: E3 18 -F00:1780 BSR LAB_CKTM * type match check, set C for string - S02:0000C8D2: 61 00 03 72 -F00:1781 BEQ LAB_PFAC * if number pack FAC1 into variable Lvarpl & RET - S02:0000C8D6: 67 00 12 B6 -F00:1782 -F00:1783 * string LET -F00:1784 -F00:1785 LAB_17D5 -F00:1786 MOVEA.l Lvarpl(a3),a2 * get pointer to variable - S02:0000C8DA: 24 6B 04 72 -F00:1787 LAB_17D6 -F00:1788 MOVEA.l FAC1_m(a3),a0 * get descriptor pointer - S02:0000C8DE: 20 6B 05 90 -F00:1789 MOVEA.l (a0),a1 * get string pointer - S02:0000C8E2: 22 50 -F00:1790 CMP.l Sstorl(a3),a1 * compare string memory start with string - S02:0000C8E4: B3 EB 04 46 -F00:1791 * pointer -F00:1792 BCS.s LAB_1811 * if it was in program memory assign the value - S02:0000C8E8: 65 16 -F00:1793 * and exit -F00:1794 -F00:1795 CMPA.l Sfncl(a3),a0 * compare functions start with descriptor - S02:0000C8EA: B1 EB 04 32 -F00:1796 * pointer -F00:1797 BCS.s LAB_1811 * branch if >= (string is on stack) - S02:0000C8EE: 65 10 -F00:1798 -F00:1799 * string is variable$ make space and copy string -F00:1800 LAB_1810 -F00:1801 MOVEQ #0,d1 * clear length - S02:0000C8F0: 72 00 -F00:1802 MOVE.w 4(a0),d1 * get string length - S02:0000C8F2: 32 28 00 04 -F00:1803 MOVEA.l (a0),a0 * get string pointer - S02:0000C8F6: 20 50 -F00:1804 BSR LAB_20C9 * copy string - S02:0000C8F8: 61 00 0B 02 -F00:1805 MOVEA.l FAC1_m(a3),a0 * get descriptor pointer back - S02:0000C8FC: 20 6B 05 90 -F00:1806 * clean stack & assign value to string variable -F00:1807 LAB_1811 -F00:1808 CMPA.l a0,a4 * is string on the descriptor stack - S02:0000C900: B9 C8 -F00:1809 BNE.s LAB_1813 * skip pop if not - S02:0000C902: 66 02 -F00:1810 -F00:1811 ADDQ.w #$06,a4 * else update stack pointer - S02:0000C904: 5C 4C -F00:1812 LAB_1813 -F00:1813 MOVE.l (a0)+,(a2)+ * save pointer to variable - S02:0000C906: 24 D8 -F00:1814 MOVE.w (a0),(a2) * save length to variable - S02:0000C908: 34 90 -F00:1815 RTS_008 -F00:1816 RTS - S02:0000C90A: 4E 75 -F00:1817 -F00:1818 -F00:1819 ************************************************************************************* -F00:1820 * -F00:1821 * perform GET -F00:1822 -F00:1823 LAB_GET -F00:1824 BSR LAB_SVAR * search for or create a variable - S02:0000C90C: 61 00 06 B6 -F00:1825 * return the variable address in a0 -F00:1826 MOVE.l a0,Lvarpl(a3) * save variable address as GET variable - S02:0000C910: 27 48 04 72 -F00:1827 TST.b Dtypef(a3) * test data type, $80=string, $40=integer, - S02:0000C914: 4A 2B 05 B5 -F00:1828 * $00=float -F00:1829 BMI.s LAB_GETS * go get string character - S02:0000C918: 6B 0C -F00:1830 -F00:1831 * was numeric get -F00:1832 BSR INGET * get input byte - S02:0000C91A: 61 00 1D D0 -F00:1833 BSR LAB_1FD0 * convert d0 to unsigned byte in FAC1 - S02:0000C91E: 61 00 09 B8 -F00:1834 BRA LAB_PFAC * pack FAC1 into variable (Lvarpl) & return - S02:0000C922: 60 00 12 6A -F00:1835 -F00:1836 LAB_GETS -F00:1837 MOVEQ #$00,d1 * assume no byte - S02:0000C926: 72 00 -F00:1838 MOVE.l d1,a0 * assume null string - S02:0000C928: 20 41 -F00:1839 BSR INGET * get input byte - S02:0000C92A: 61 00 1D C0 -F00:1840 BCC.s LAB_NoSt * branch if no byte received - S02:0000C92E: 64 08 -F00:1841 -F00:1842 MOVEQ #$01,d1 * string is single byte - S02:0000C930: 72 01 -F00:1843 BSR LAB_2115 * make string space d1 bytes long - S02:0000C932: 61 00 0A FA -F00:1844 * return a0 = pointer, other registers unchanged -F00:1845 -F00:1846 MOVE.b d0,(a0) * save byte in string (byte IS string!) - S02:0000C936: 10 80 -F00:1847 LAB_NoSt -F00:1848 BSR LAB_RTST * push string on descriptor stack - S02:0000C938: 61 00 0A DA -F00:1849 * a0 = pointer, d1 = length -F00:1850 -F00:1851 BRA.s LAB_17D5 * do string LET & return - S02:0000C93C: 60 9C -F00:1852 -F00:1853 -F00:1854 ************************************************************************************* -F00:1855 * -F00:1856 * PRINT -F00:1857 -F00:1858 LAB_1829 -F00:1859 BSR LAB_18C6 * print string from stack - S02:0000C93E: 61 00 00 B4 -F00:1860 LAB_182C -F00:1861 BSR LAB_GBYT * scan memory - S02:0000C942: 61 00 04 78 -F00:1862 -F00:1863 * perform PRINT -F00:1864 -F00:1865 LAB_PRINT -F00:1866 BEQ.s LAB_CRLF * if nothing following just print CR/LF - S02:0000C946: 67 4A -F00:1867 -F00:1868 LAB_1831 -F00:1869 CMP.b #TK_TAB,d0 * compare with TAB( token - S02:0000C948: B0 3C 00 A8 -F00:1870 BEQ.s LAB_18A2 * go do TAB/SPC - S02:0000C94C: 67 64 -F00:1871 -F00:1872 CMP.b #TK_SPC,d0 * compare with SPC( token - S02:0000C94E: B0 3C 00 AC -F00:1873 BEQ.s LAB_18A2 * go do TAB/SPC - S02:0000C952: 67 5E -F00:1874 -F00:1875 CMP.b #',',d0 * compare with "," - S02:0000C954: B0 3C 00 2C -F00:1876 BEQ.s LAB_188B * go do move to next TAB mark - S02:0000C958: 67 40 -F00:1877 -F00:1878 CMP.b #';',d0 * compare with ";" - S02:0000C95A: B0 3C 00 3B -F00:1879 BEQ LAB_18BD * if ";" continue with PRINT processing - S02:0000C95E: 67 00 00 86 -F00:1880 -F00:1881 BSR LAB_EVEX * evaluate expression - S02:0000C962: 61 00 02 F6 -F00:1882 TST.b Dtypef(a3) * test data type, $80=string, $40=integer, - S02:0000C966: 4A 2B 05 B5 -F00:1883 * $00=float -F00:1884 BMI.s LAB_1829 * branch if string - S02:0000C96A: 6B D2 -F00:1885 -F00:1886 ** replace the two lines above with this code -F00:1887 -F00:1888 ** MOVE.b Dtypef(a3),d0 * get data type flag, $80=string, $00=numeric -F00:1889 ** BMI.s LAB_1829 * branch if string -F00:1890 -F00:1891 BSR LAB_2970 * convert FAC1 to string - S02:0000C96C: 61 00 13 9E -F00:1892 BSR LAB_20AE * print " terminated string to FAC1 stack - S02:0000C970: 61 00 0A 5C -F00:1893 -F00:1894 * don't check fit if terminal width byte is zero -F00:1895 -F00:1896 MOVEQ #0,d0 * clear d0 - S02:0000C974: 70 00 -F00:1897 MOVE.b TWidth(a3),d0 * get terminal width byte - S02:0000C976: 10 2B 05 E6 -F00:1898 BEQ.s LAB_185E * skip check if zero - S02:0000C97A: 67 0C -F00:1899 -F00:1900 SUB.b 7(a4),d0 * subtract string length - S02:0000C97C: 90 2C 00 07 -F00:1901 SUB.b TPos(a3),d0 * subtract terminal position - S02:0000C980: 90 2B 05 E5 -F00:1902 BCC.s LAB_185E * branch if less than terminal width - S02:0000C984: 64 02 -F00:1903 -F00:1904 BSR.s LAB_CRLF * else print CR/LF - S02:0000C986: 61 0A -F00:1905 LAB_185E -F00:1906 BSR.s LAB_18C6 * print string from stack - S02:0000C988: 61 6A -F00:1907 BRA.s LAB_182C * always go continue processing line - S02:0000C98A: 60 B6 -F00:1908 -F00:1909 -F00:1910 ************************************************************************************* -F00:1911 * -F00:1912 * CR/LF return to BASIC from BASIC input handler -F00:1913 * leaves a0 pointing to the buffer start -F00:1914 -F00:1915 LAB_1866 -F00:1916 MOVE.b #$00,(a0,d1.w) * null terminate input - S02:0000C98C: 11 BC 00 00 10 00 -F00:1917 -F00:1918 * print CR/LF -F00:1919 -F00:1920 LAB_CRLF -F00:1921 MOVEQ #$0D,d0 * load [CR] - S02:0000C992: 70 0D -F00:1922 BSR.s LAB_PRNA * go print the character - S02:0000C994: 61 74 -F00:1923 MOVEQ #$0A,d0 * load [LF] - S02:0000C996: 70 0A -F00:1924 BRA.s LAB_PRNA * go print the character & return - S02:0000C998: 60 70 -F00:1925 -F00:1926 LAB_188B -F00:1927 MOVE.b TPos(a3),d2 * get terminal position - S02:0000C99A: 14 2B 05 E5 -F00:1928 CMP.b Iclim(a3),d2 * compare with input column limit - S02:0000C99E: B4 2B 05 E7 -F00:1929 BCS.s LAB_1898 * branch if less than Iclim - S02:0000C9A2: 65 04 -F00:1930 -F00:1931 BSR.s LAB_CRLF * else print CR/LF (next line) - S02:0000C9A4: 61 EC -F00:1932 BRA.s LAB_18BD * continue with PRINT processing - S02:0000C9A6: 60 3E -F00:1933 -F00:1934 LAB_1898 -F00:1935 SUB.b TabSiz(a3),d2 * subtract TAB size - S02:0000C9A8: 94 2B 05 E2 -F00:1936 BCC.s LAB_1898 * loop if result was >= 0 - S02:0000C9AC: 64 FA -F00:1937 -F00:1938 NEG.b d2 * twos complement it - S02:0000C9AE: 44 02 -F00:1939 BRA.s LAB_18B7 * print d2 spaces - S02:0000C9B0: 60 22 -F00:1940 -F00:1941 * do TAB/SPC -F00:1942 LAB_18A2 -F00:1943 MOVE.w d0,-(sp) * save token - S02:0000C9B2: 3F 00 -F00:1944 BSR LAB_SGBY * increment and get byte, result in d0 and Itemp - S02:0000C9B4: 61 00 0D 60 -F00:1945 MOVE.w d0,d2 * copy byte - S02:0000C9B8: 34 00 -F00:1946 BSR LAB_GBYT * get basic byte back - S02:0000C9BA: 61 00 04 00 -F00:1947 CMP.b #$29,d0 * is next character ")" - S02:0000C9BE: B0 3C 00 29 -F00:1948 BNE LAB_SNER * if not do syntax error, then warm start - S02:0000C9C2: 66 00 F7 BA -F00:1949 -F00:1950 MOVE.w (sp)+,d0 * get token back - S02:0000C9C6: 30 1F -F00:1951 CMP.b #TK_TAB,d0 * was it TAB ? - S02:0000C9C8: B0 3C 00 A8 -F00:1952 BNE.s LAB_18B7 * branch if not (was SPC) - S02:0000C9CC: 66 06 -F00:1953 -F00:1954 * calculate TAB offset -F00:1955 SUB.b TPos(a3),d2 * subtract terminal position - S02:0000C9CE: 94 2B 05 E5 -F00:1956 BLS.s LAB_18BD * branch if result was <= 0 - S02:0000C9D2: 63 12 -F00:1957 * can't TAB backwards or already there -F00:1958 -F00:1959 * print d2.b spaces -F00:1960 LAB_18B7 -F00:1961 MOVEQ #0,d0 * clear longword - S02:0000C9D4: 70 00 -F00:1962 SUBQ.b #1,d0 * make d0 = $FF - S02:0000C9D6: 53 00 -F00:1963 AND.l d0,d2 * mask for byte only - S02:0000C9D8: C4 80 -F00:1964 BEQ.s LAB_18BD * branch if zero - S02:0000C9DA: 67 0A -F00:1965 -F00:1966 MOVEQ #$20,d0 * load " " - S02:0000C9DC: 70 20 -F00:1967 SUBQ.b #1,d2 * adjust for DBF loop - S02:0000C9DE: 53 02 -F00:1968 LAB_18B8 -F00:1969 BSR.s LAB_PRNA * go print - S02:0000C9E0: 61 28 -F00:1970 DBF d2,LAB_18B8 * decrement count and loop if not all done - S02:0000C9E2: 51 CA FF FC -F00:1971 -F00:1972 * continue with PRINT processing -F00:1973 LAB_18BD -F00:1974 BSR LAB_IGBY * increment & scan memory - S02:0000C9E6: 61 00 03 D2 -F00:1975 BNE LAB_1831 * if byte continue executing PRINT - S02:0000C9EA: 66 00 FF 5C -F00:1976 -F00:1977 RTS * exit if nothing more to print - S02:0000C9EE: 4E 75 -F00:1978 -F00:1979 -F00:1980 ************************************************************************************* -F00:1981 * -F00:1982 * print null terminated string from a0 -F00:1983 -F00:1984 LAB_18C3 -F00:1985 BSR LAB_20AE * print terminated string to FAC1/stack - S02:0000C9F0: 61 00 09 DC -F00:1986 -F00:1987 * print string from stack -F00:1988 -F00:1989 LAB_18C6 -F00:1990 BSR LAB_22B6 * pop string off descriptor stack or from memory - S02:0000C9F4: 61 00 0B C4 -F00:1991 * returns with d0 = length, a0 = pointer -F00:1992 BEQ.s RTS_009 * exit (RTS) if null string - S02:0000C9F8: 67 0C -F00:1993 -F00:1994 MOVE.w d0,d1 * copy length & set Z flag - S02:0000C9FA: 32 00 -F00:1995 SUBQ.w #1,d1 * -1 for BF loop - S02:0000C9FC: 53 41 -F00:1996 LAB_18CD -F00:1997 MOVE.b (a0)+,d0 * get byte from string - S02:0000C9FE: 10 18 -F00:1998 BSR.s LAB_PRNA * go print the character - S02:0000CA00: 61 08 -F00:1999 DBF d1,LAB_18CD * decrement count and loop if not done yet - S02:0000CA02: 51 C9 FF FA -F00:2000 -F00:2001 RTS_009 -F00:2002 RTS - S02:0000CA06: 4E 75 -F00:2003 -F00:2004 -F00:2005 ************************************************************************************* -F00:2006 * -F00:2007 * print "?" character -F00:2008 -F00:2009 LAB_18E3 -F00:2010 MOVEQ #$3F,d0 * load "?" character - S02:0000CA08: 70 3F -F00:2011 -F00:2012 -F00:2013 ************************************************************************************* -F00:2014 * -F00:2015 * print character in d0, includes the null handler and infinite line length code -F00:2016 * changes no registers -F00:2017 -F00:2018 LAB_PRNA -F00:2019 MOVE.l d1,-(sp) * save d1 - S02:0000CA0A: 2F 01 -F00:2020 CMP.b #$20,d0 * compare with " " - S02:0000CA0C: B0 3C 00 20 -F00:2021 BCS.s LAB_18F9 * branch if less, non printing character - S02:0000CA10: 65 28 -F00:2022 -F00:2023 * don't check fit if terminal width byte is zero -F00:2024 MOVE.b TWidth(a3),d1 * get terminal width - S02:0000CA12: 12 2B 05 E6 -F00:2025 BNE.s LAB_18F0 * branch if not zero (not infinite length) - S02:0000CA16: 66 10 -F00:2026 -F00:2027 * is "infinite line" so check TAB position -F00:2028 MOVE.b TPos(a3),d1 * get position - S02:0000CA18: 12 2B 05 E5 -F00:2029 SUB.b TabSiz(a3),d1 * subtract TAB size - S02:0000CA1C: 92 2B 05 E2 -F00:2030 BNE.s LAB_18F7 * skip reset if different - S02:0000CA20: 66 14 -F00:2031 -F00:2032 MOVE.b d1,TPos(a3) * else reset position - S02:0000CA22: 17 41 05 E5 -F00:2033 BRA.s LAB_18F7 * go print character - S02:0000CA26: 60 0E -F00:2034 -F00:2035 LAB_18F0 -F00:2036 CMP.b TPos(a3),d1 * compare with terminal character position - S02:0000CA28: B2 2B 05 E5 -F00:2037 BNE.s LAB_18F7 * branch if not at end of line - S02:0000CA2C: 66 08 -F00:2038 -F00:2039 MOVE.l d0,-(sp) * save d0 - S02:0000CA2E: 2F 00 -F00:2040 BSR LAB_CRLF * else print CR/LF - S02:0000CA30: 61 00 FF 60 -F00:2041 MOVE.l (sp)+,d0 * restore d0 - S02:0000CA34: 20 1F -F00:2042 LAB_18F7 -F00:2043 ADDQ.b #$01,TPos(a3) * increment terminal position - S02:0000CA36: 52 2B 05 E5 -F00:2044 LAB_18F9 -F00:2045 JSR V_OUTP(a3) * output byte via output vector - S02:0000CA3A: 4E AB 04 12 -F00:2046 CMP.b #$0D,d0 * compare with [CR] - S02:0000CA3E: B0 3C 00 0D -F00:2047 BNE.s LAB_188A * branch if not [CR] - S02:0000CA42: 66 18 -F00:2048 -F00:2049 * else print nullct nulls after the [CR] -F00:2050 MOVEQ #$00,d1 * clear d1 - S02:0000CA44: 72 00 -F00:2051 MOVE.b Nullct(a3),d1 * get null count - S02:0000CA46: 12 2B 05 E4 -F00:2052 BEQ.s LAB_1886 * branch if no nulls - S02:0000CA4A: 67 0C -F00:2053 -F00:2054 MOVEQ #$00,d0 * load [NULL] - S02:0000CA4C: 70 00 -F00:2055 LAB_1880 -F00:2056 JSR V_OUTP(a3) * go print the character - S02:0000CA4E: 4E AB 04 12 -F00:2057 DBF d1,LAB_1880 * decrement count and loop if not all done - S02:0000CA52: 51 C9 FF FA -F00:2058 -F00:2059 MOVEQ #$0D,d0 * restore the character - S02:0000CA56: 70 0D -F00:2060 LAB_1886 -F00:2061 MOVE.b d1,TPos(a3) * clear terminal position - S02:0000CA58: 17 41 05 E5 -F00:2062 LAB_188A -F00:2063 MOVE.l (sp)+,d1 * restore d1 - S02:0000CA5C: 22 1F -F00:2064 RTS - S02:0000CA5E: 4E 75 -F00:2065 -F00:2066 -F00:2067 ************************************************************************************* -F00:2068 * -F00:2069 * handle bad input data -F00:2070 -F00:2071 LAB_1904 -F00:2072 MOVEA.l (sp)+,a5 * restore execute pointer - S02:0000CA60: 2A 5F -F00:2073 TST.b Imode(a3) * test input mode flag, $00=INPUT, $98=READ - S02:0000CA62: 4A 2B 05 E0 -F00:2074 BPL.s LAB_1913 * branch if INPUT (go do redo) - S02:0000CA66: 6A 0A -F00:2075 -F00:2076 MOVE.l Dlinel(a3),Clinel(a3) * save DATA line as current line - S02:0000CA68: 27 6B 04 5E 04 52 -F00:2077 BRA LAB_TMER * do type mismatch error, then warm start - S02:0000CA6E: 60 00 F6 E2 -F00:2078 -F00:2079 * mode was INPUT -F00:2080 LAB_1913 -F00:2081 LEA LAB_REDO(pc),a0 * point to redo message - S02:0000CA72: 41 FA 2A 52 -F00:2082 BSR LAB_18C3 * print null terminated string from memory - S02:0000CA76: 61 00 FF 78 -F00:2083 MOVEA.l Cpntrl(a3),a5 * save continue pointer as BASIC execute pointer - S02:0000CA7A: 2A 6B 04 5A -F00:2084 RTS - S02:0000CA7E: 4E 75 -F00:2085 -F00:2086 -F00:2087 ************************************************************************************* -F00:2088 * -F00:2089 * perform INPUT -F00:2090 -F00:2091 LAB_INPUT -F00:2092 BSR LAB_CKRN * check not direct (back here if ok) - S02:0000CA80: 61 00 08 5E -F00:2093 CMP.b #'"',d0 * compare the next byte with open quote - S02:0000CA84: B0 3C 00 22 -F00:2094 BNE.s LAB_1934 * if no prompt string just go get the input - S02:0000CA88: 66 0E -F00:2095 -F00:2096 BSR LAB_1BC1 * print "..." string - S02:0000CA8A: 61 00 03 06 -F00:2097 MOVEQ #';',d0 * set the search character to ";" - S02:0000CA8E: 70 3B -F00:2098 BSR LAB_SCCA * scan for CHR$(d0), else do syntax error/warm - S02:0000CA90: 61 00 03 20 -F00:2099 * start -F00:2100 BSR LAB_18C6 * print string from Sutill/Sutilh - S02:0000CA94: 61 00 FF 5E -F00:2101 * finished the prompt, now read the data -F00:2102 LAB_1934 -F00:2103 BSR LAB_INLN * print "? " and get BASIC input - S02:0000CA98: 61 00 F8 0E -F00:2104 * return a0 pointing to the buffer start -F00:2105 MOVEQ #0,d0 * flag INPUT - S02:0000CA9C: 70 00 -F00:2106 -F00:2107 * if you don't want a null response to INPUT to break the program then set the nobrk -F00:2108 * value at the top of this file to some non zero value -F00:2109 -F00:2110 ifne nobrk -F00:2111 -F00:2112 BRA.s LAB_1953 * go handle the input -F00:2113 -F00:2114 endc -F00:2115 -F00:2116 * if you do want a null response to INPUT to break the program then leave the nobrk -F00:2117 * value at the top of this file set to zero -F00:2118 -F00:2119 ifeq nobrk -F00:2120 -F00:2121 TST.b (a0) * test first byte from buffer - S02:0000CA9E: 4A 10 -F00:2122 BNE.s LAB_1953 * branch if not null input - S02:0000CAA0: 66 0A -F00:2123 -F00:2124 BRA LAB_1647 * go do BREAK exit - S02:0000CAA2: 60 00 FB 5E -F00:2125 -F00:2126 endc -F00:2127 -F00:2128 -F00:2129 ************************************************************************************* -F00:2130 * -F00:2131 * perform READ -F00:2132 -F00:2133 LAB_READ -F00:2134 MOVEA.l Dptrl(a3),a0 * get the DATA pointer - S02:0000CAA6: 20 6B 04 62 -F00:2135 MOVEQ #$98-$100,d0 * flag READ - S02:0000CAAA: 70 98 -F00:2136 LAB_1953 -F00:2137 MOVE.b d0,Imode(a3) * set input mode flag, $00=INPUT, $98=READ - S02:0000CAAC: 17 40 05 E0 -F00:2138 MOVE.l a0,Rdptrl(a3) * save READ pointer - S02:0000CAB0: 27 48 04 66 -F00:2139 -F00:2140 * READ or INPUT the next variable from list -F00:2141 LAB_195B -F00:2142 BSR LAB_SVAR * search for or create a variable - S02:0000CAB4: 61 00 05 0E -F00:2143 * return the variable address in a0 -F00:2144 MOVE.l a0,Lvarpl(a3) * save variable address as LET variable - S02:0000CAB8: 27 48 04 72 -F00:2145 MOVE.l a5,-(sp) * save BASIC execute pointer - S02:0000CABC: 2F 0D -F00:2146 LAB_1961 -F00:2147 MOVEA.l Rdptrl(a3),a5 * set READ pointer as BASIC execute pointer - S02:0000CABE: 2A 6B 04 66 -F00:2148 BSR LAB_GBYT * scan memory - S02:0000CAC2: 61 00 02 F8 -F00:2149 BNE.s LAB_1986 * if not null go get the value - S02:0000CAC6: 66 1E -F00:2150 -F00:2151 * the pointer was to a null entry -F00:2152 TST.b Imode(a3) * test input mode flag, $00=INPUT, $98=READ - S02:0000CAC8: 4A 2B 05 E0 -F00:2153 BMI.s LAB_19DD * branch if READ (go find the next statement) - S02:0000CACC: 6B 72 -F00:2154 -F00:2155 * else the mode was INPUT so get more -F00:2156 BSR LAB_18E3 * print a "?" character - S02:0000CACE: 61 00 FF 38 -F00:2157 BSR LAB_INLN * print "? " and get BASIC input - S02:0000CAD2: 61 00 F7 D4 -F00:2158 * return a0 pointing to the buffer start -F00:2159 -F00:2160 * if you don't want a null response to INPUT to break the program then set the nobrk -F00:2161 * value at the top of this file to some non zero value -F00:2162 -F00:2163 ifne nobrk -F00:2164 -F00:2165 MOVE.l a0,Rdptrl(a3) * save the READ pointer -F00:2166 BRA.s LAB_1961 * go handle the input -F00:2167 -F00:2168 endc -F00:2169 -F00:2170 * if you do want a null response to INPUT to break the program then leave the nobrk -F00:2171 * value at the top of this file set to zero -F00:2172 -F00:2173 ifeq nobrk -F00:2174 -F00:2175 TST.b (a0) * test the first byte from the buffer - S02:0000CAD6: 4A 10 -F00:2176 BNE.s LAB_1984 * if not null input go handle it - S02:0000CAD8: 66 04 -F00:2177 -F00:2178 BRA LAB_1647 * else go do the BREAK exit - S02:0000CADA: 60 00 FB 26 -F00:2179 -F00:2180 LAB_1984 -F00:2181 MOVEA.l a0,a5 * set the execute pointer to the buffer - S02:0000CADE: 2A 48 -F00:2182 SUBQ.w #1,a5 * decrement the execute pointer - S02:0000CAE0: 53 4D -F00:2183 -F00:2184 endc -F00:2185 -F00:2186 LAB_1985 -F00:2187 BSR LAB_IGBY * increment & scan memory - S02:0000CAE2: 61 00 02 D6 -F00:2188 LAB_1986 -F00:2189 TST.b Dtypef(a3) * test data type, $80=string, $40=integer, - S02:0000CAE6: 4A 2B 05 B5 -F00:2190 * $00=float -F00:2191 BPL.s LAB_19B0 * branch if numeric - S02:0000CAEA: 6A 20 -F00:2192 -F00:2193 * else get string -F00:2194 MOVE.b d0,d2 * save search character - S02:0000CAEC: 14 00 -F00:2195 CMP.b #$22,d0 * was it " ? - S02:0000CAEE: B0 3C 00 22 -F00:2196 BEQ.s LAB_1999 * branch if so - S02:0000CAF2: 67 06 -F00:2197 -F00:2198 MOVEQ #':',d2 * set new search character - S02:0000CAF4: 74 3A -F00:2199 MOVEQ #',',d0 * other search character is "," - S02:0000CAF6: 70 2C -F00:2200 SUBQ.w #1,a5 * decrement BASIC execute pointer - S02:0000CAF8: 53 4D -F00:2201 LAB_1999 -F00:2202 ADDQ.w #1,a5 * increment BASIC execute pointer - S02:0000CAFA: 52 4D -F00:2203 MOVE.b d0,d3 * set second search character - S02:0000CAFC: 16 00 -F00:2204 MOVEA.l a5,a0 * BASIC execute pointer is source - S02:0000CAFE: 20 4D -F00:2205 -F00:2206 BSR LAB_20B4 * print d2/d3 terminated string to FAC1 stack - S02:0000CB00: 61 00 08 D0 -F00:2207 * d2 = Srchc, d3 = Asrch, a0 is source -F00:2208 MOVEA.l a2,a5 * copy end of string to BASIC execute pointer - S02:0000CB04: 2A 4A -F00:2209 BSR LAB_17D5 * go do string LET - S02:0000CB06: 61 00 FD D2 -F00:2210 BRA.s LAB_19B6 * go check string terminator - S02:0000CB0A: 60 10 -F00:2211 -F00:2212 * get numeric INPUT -F00:2213 LAB_19B0 -F00:2214 MOVE.b Dtypef(a3),-(sp) * save variable data type - S02:0000CB0C: 1F 2B 05 B5 -F00:2215 BSR LAB_2887 * get FAC1 from string - S02:0000CB10: 61 00 1D 82 -F00:2216 MOVE.b (sp)+,Dtypef(a3) * restore variable data type - S02:0000CB14: 17 5F 05 B5 -F00:2217 BSR LAB_PFAC * pack FAC1 into (Lvarpl) - S02:0000CB18: 61 00 10 74 -F00:2218 LAB_19B6 -F00:2219 BSR LAB_GBYT * scan memory - S02:0000CB1C: 61 00 02 9E -F00:2220 BEQ.s LAB_19C2 * branch if null (last entry) - S02:0000CB20: 67 0A -F00:2221 -F00:2222 CMP.b #',',d0 * else compare with "," - S02:0000CB22: B0 3C 00 2C -F00:2223 BNE LAB_1904 * if not "," go handle bad input data - S02:0000CB26: 66 00 FF 38 -F00:2224 -F00:2225 ADDQ.w #1,a5 * else was "," so point to next chr - S02:0000CB2A: 52 4D -F00:2226 * got good input data -F00:2227 LAB_19C2 -F00:2228 MOVE.l a5,Rdptrl(a3) * save the read pointer for now - S02:0000CB2C: 27 4D 04 66 -F00:2229 MOVEA.l (sp)+,a5 * restore the execute pointer - S02:0000CB30: 2A 5F -F00:2230 BSR LAB_GBYT * scan the memory - S02:0000CB32: 61 00 02 88 -F00:2231 BEQ.s LAB_1A03 * if null go do extra ignored message - S02:0000CB36: 67 36 -F00:2232 -F00:2233 PEA LAB_195B(pc) * set return address - S02:0000CB38: 48 7A FF 7A -F00:2234 BRA LAB_1C01 * scan for "," else do syntax error/warm start - S02:0000CB3C: 60 00 02 72 -F00:2235 * then go INPUT next variable from list -F00:2236 -F00:2237 * find next DATA statement or do "Out of Data" -F00:2238 * error -F00:2239 LAB_19DD -F00:2240 BSR LAB_SNBS * scan for next BASIC statement ([:] or [EOL]) - S02:0000CB40: 61 00 FC 04 -F00:2241 * returns a0 as pointer to [:] or [EOL] -F00:2242 MOVEA.l a0,a5 * add index, now = pointer to [EOL]/[EOS] - S02:0000CB44: 2A 48 -F00:2243 ADDQ.w #1,a5 * pointer to next character - S02:0000CB46: 52 4D -F00:2244 CMP.b #':',d0 * was it statement end? - S02:0000CB48: B0 3C 00 3A -F00:2245 BEQ.s LAB_19F6 * branch if [:] - S02:0000CB4C: 67 12 -F00:2246 -F00:2247 * was [EOL] so find next line -F00:2248 -F00:2249 MOVE.w a5,d1 * past pad byte(s) - S02:0000CB4E: 32 0D -F00:2250 AND.w #1,d1 * mask odd bit - S02:0000CB50: C2 7C 00 01 -F00:2251 ADD.w d1,a5 * add pointer - S02:0000CB54: DA C1 -F00:2252 MOVE.l (a5)+,d2 * get next line pointer - S02:0000CB56: 24 1D -F00:2253 BEQ LAB_ODER * branch if end of program - S02:0000CB58: 67 00 F6 1C -F00:2254 -F00:2255 MOVE.l (a5)+,Dlinel(a3) * save current DATA line - S02:0000CB5C: 27 5D 04 5E -F00:2256 LAB_19F6 -F00:2257 BSR LAB_GBYT * scan memory - S02:0000CB60: 61 00 02 5A -F00:2258 CMP.b #TK_DATA,d0 * compare with "DATA" token - S02:0000CB64: B0 3C 00 83 -F00:2259 BEQ LAB_1985 * was "DATA" so go do next READ - S02:0000CB68: 67 00 FF 78 -F00:2260 -F00:2261 BRA.s LAB_19DD * go find next statement if not "DATA" - S02:0000CB6C: 60 D2 -F00:2262 -F00:2263 * end of INPUT/READ routine -F00:2264 -F00:2265 LAB_1A03 -F00:2266 MOVEA.l Rdptrl(a3),a0 * get temp READ pointer - S02:0000CB6E: 20 6B 04 66 -F00:2267 TST.b Imode(a3) * get input mode flag, $00=INPUT, $98=READ - S02:0000CB72: 4A 2B 05 E0 -F00:2268 BPL.s LAB_1A0E * branch if INPUT - S02:0000CB76: 6A 06 -F00:2269 -F00:2270 MOVE.l a0,Dptrl(a3) * else save temp READ pointer as DATA pointer - S02:0000CB78: 27 48 04 62 -F00:2271 RTS - S02:0000CB7C: 4E 75 -F00:2272 -F00:2273 * we were getting INPUT -F00:2274 LAB_1A0E -F00:2275 TST.b (a0) * test next byte - S02:0000CB7E: 4A 10 -F00:2276 BNE.s LAB_1A1B * error if not end of INPUT - S02:0000CB80: 66 02 -F00:2277 -F00:2278 RTS - S02:0000CB82: 4E 75 -F00:2279 * user typed too much -F00:2280 LAB_1A1B -F00:2281 LEA LAB_IMSG(pc),a0 * point to extra ignored message - S02:0000CB84: 41 FA 29 30 -F00:2282 BRA LAB_18C3 * print null terminated string from memory & RTS - S02:0000CB88: 60 00 FE 66 -F00:2283 -F00:2284 -F00:2285 ************************************************************************************* -F00:2286 * -F00:2287 * perform NEXT -F00:2288 -F00:2289 LAB_NEXT -F00:2290 BNE.s LAB_1A46 * branch if NEXT var - S02:0000CB8C: 66 10 -F00:2291 -F00:2292 ADDQ.w #4,sp * back past return address - S02:0000CB8E: 58 4F -F00:2293 CMP.w #TK_FOR,(sp) * is FOR token on stack? - S02:0000CB90: 0C 57 00 81 -F00:2294 BNE LAB_NFER * if not do NEXT without FOR err/warm start - S02:0000CB94: 66 00 F5 EC -F00:2295 -F00:2296 MOVEA.l 2(sp),a0 * get stacked FOR variable pointer - S02:0000CB98: 20 6F 00 02 -F00:2297 BRA.s LAB_11BD * branch always (no variable to search for) - S02:0000CB9C: 60 1C -F00:2298 -F00:2299 * NEXT var -F00:2300 -F00:2301 LAB_1A46 -F00:2302 BSR LAB_GVAR * get variable address in a0 - S02:0000CB9E: 61 00 04 28 -F00:2303 ADDQ.w #4,sp * back past return address - S02:0000CBA2: 58 4F -F00:2304 MOVE.w #TK_FOR,d0 * set for FOR token - S02:0000CBA4: 30 3C 00 81 -F00:2305 MOVEQ #$1C,d1 * set for FOR use size - S02:0000CBA8: 72 1C -F00:2306 BRA.s LAB_11A6 * enter loop for next variable search - S02:0000CBAA: 60 02 -F00:2307 -F00:2308 LAB_11A5 -F00:2309 ADDA.l d1,sp * add FOR stack use size - S02:0000CBAC: DF C1 -F00:2310 LAB_11A6 -F00:2311 CMP.w (sp),d0 * is FOR token on stack? - S02:0000CBAE: B0 57 -F00:2312 BNE LAB_NFER * if not found do NEXT without FOR error and - S02:0000CBB0: 66 00 F5 D0 -F00:2313 * warm start -F00:2314 -F00:2315 * was FOR token -F00:2316 CMPA.l 2(sp),a0 * compare var pointer with stacked var pointer - S02:0000CBB4: B1 EF 00 02 -F00:2317 BNE.s LAB_11A5 * loop if no match found - S02:0000CBB8: 66 F2 -F00:2318 -F00:2319 LAB_11BD -F00:2320 MOVE.w 6(sp),FAC2_e(a3) * get STEP value exponent and sign - S02:0000CBBA: 37 6F 00 06 05 9C -F00:2321 MOVE.l 8(sp),FAC2_m(a3) * get STEP value mantissa - S02:0000CBC0: 27 6F 00 08 05 98 -F00:2322 -F00:2323 MOVE.b 18(sp),Dtypef(a3) * restore FOR variable data type - S02:0000CBC6: 17 6F 00 12 05 B5 -F00:2324 BSR LAB_1C19 * check type and unpack (a0) - S02:0000CBCC: 61 00 02 1A -F00:2325 -F00:2326 MOVE.b FAC2_s(a3),FAC_sc(a3) * save FAC2 sign as sign compare - S02:0000CBD0: 17 6B 05 9D 05 9E -F00:2327 MOVE.b FAC1_s(a3),d0 * get FAC1 sign - S02:0000CBD6: 10 2B 05 95 -F00:2328 EOR.b d0,FAC_sc(a3) * EOR to create sign compare - S02:0000CBDA: B1 2B 05 9E -F00:2329 -F00:2330 MOVE.l a0,Lvarpl(a3) * save variable pointer - S02:0000CBDE: 27 48 04 72 -F00:2331 BSR LAB_ADD * add STEP value to FOR variable - S02:0000CBE2: 61 00 0C AC -F00:2332 MOVE.b 18(sp),Dtypef(a3) * restore FOR variable data type (again) - S02:0000CBE6: 17 6F 00 12 05 B5 -F00:2333 BSR LAB_PFAC * pack FAC1 into FOR variable (Lvarpl) - S02:0000CBEC: 61 00 0F A0 -F00:2334 -F00:2335 MOVE.w 12(sp),FAC2_e(a3) * get TO value exponent and sign - S02:0000CBF0: 37 6F 00 0C 05 9C -F00:2336 MOVE.l 14(sp),FAC2_m(a3) * get TO value mantissa - S02:0000CBF6: 27 6F 00 0E 05 98 -F00:2337 -F00:2338 MOVE.b FAC2_s(a3),FAC_sc(a3) * save FAC2 sign as sign compare - S02:0000CBFC: 17 6B 05 9D 05 9E -F00:2339 MOVE.b FAC1_s(a3),d0 * get FAC1 sign - S02:0000CC02: 10 2B 05 95 -F00:2340 EOR.b d0,FAC_sc(a3) * EOR to create sign compare - S02:0000CC06: B1 2B 05 9E -F00:2341 -F00:2342 BSR LAB_27FA * compare FAC1 with FAC2 (TO value) - S02:0000CC0A: 61 00 10 2C -F00:2343 * returns d0=+1 if FAC1 > FAC2 -F00:2344 * returns d0= 0 if FAC1 = FAC2 -F00:2345 * returns d0=-1 if FAC1 < FAC2 -F00:2346 -F00:2347 MOVE.w 6(sp),d1 * get STEP value exponent and sign - S02:0000CC0E: 32 2F 00 06 -F00:2348 EOR.w d0,d1 * EOR compare result with STEP exponent and sign - S02:0000CC12: B1 41 -F00:2349 -F00:2350 TST.b d0 * test for = - S02:0000CC14: 4A 00 -F00:2351 BEQ.s LAB_1A90 * branch if = (loop INcomplete) - S02:0000CC16: 67 04 -F00:2352 -F00:2353 TST.b d1 * test result - S02:0000CC18: 4A 01 -F00:2354 BPL.s LAB_1A9B * branch if > (loop complete) - S02:0000CC1A: 6A 0E -F00:2355 -F00:2356 * loop back and do it all again -F00:2357 LAB_1A90 -F00:2358 MOVE.l 20(sp),Clinel(a3) * reset current line - S02:0000CC1C: 27 6F 00 14 04 52 -F00:2359 MOVE.l 24(sp),a5 * reset BASIC execute pointer - S02:0000CC22: 2A 6F 00 18 -F00:2360 BRA LAB_15C2 * go do interpreter inner loop - S02:0000CC26: 60 00 F9 76 -F00:2361 -F00:2362 * loop complete so carry on -F00:2363 LAB_1A9B -F00:2364 ADDA.w #28,sp * add 28 to dump FOR structure - S02:0000CC2A: 4F EF 00 1C -F00:2365 BSR LAB_GBYT * scan memory - S02:0000CC2E: 61 00 01 8C -F00:2366 CMP.b #$2C,d0 * compare with "," - S02:0000CC32: B0 3C 00 2C -F00:2367 BNE LAB_15C2 * if not "," go do interpreter inner loop - S02:0000CC36: 66 00 F9 66 -F00:2368 -F00:2369 * was "," so another NEXT variable to do -F00:2370 BSR LAB_IGBY * else increment & scan memory - S02:0000CC3A: 61 00 01 7E -F00:2371 BSR LAB_1A46 * do NEXT (var) - S02:0000CC3E: 61 00 FF 5E -F00:2372 -F00:2373 -F00:2374 ************************************************************************************* -F00:2375 * -F00:2376 * evaluate expression & check is numeric, else do type mismatch -F00:2377 -F00:2378 LAB_EVNM -F00:2379 BSR.s LAB_EVEX * evaluate expression - S02:0000CC42: 61 16 -F00:2380 -F00:2381 -F00:2382 ************************************************************************************* -F00:2383 * -F00:2384 * check if source is numeric, else do type mismatch -F00:2385 -F00:2386 LAB_CTNM -F00:2387 CMP.w d0,d0 * required type is numeric so clear carry - S02:0000CC44: B0 40 -F00:2388 -F00:2389 -F00:2390 ************************************************************************************* -F00:2391 * -F00:2392 * type match check, set C for string, clear C for numeric -F00:2393 -F00:2394 LAB_CKTM -F00:2395 BTST.b #7,Dtypef(a3) * test data type flag, don't change carry - S02:0000CC46: 08 2B 00 07 05 B5 -F00:2396 BNE.s LAB_1ABA * branch if data type is string - S02:0000CC4C: 66 06 -F00:2397 -F00:2398 * else data type was numeric -F00:2399 BCS LAB_TMER * if required type is string do type mismatch - S02:0000CC4E: 65 00 F5 02 -F00:2400 * error -F00:2401 -F00:2402 RTS - S02:0000CC52: 4E 75 -F00:2403 * data type was string, now check required type -F00:2404 LAB_1ABA -F00:2405 BCC LAB_TMER * if required type is numeric do type mismatch - S02:0000CC54: 64 00 F4 FC -F00:2406 * error -F00:2407 RTS - S02:0000CC58: 4E 75 -F00:2408 -F00:2409 -F00:2410 ************************************************************************************* -F00:2411 * -F00:2412 * this routine evaluates any type of expression. first it pushes an end marker so -F00:2413 * it knows when the expression has been evaluated, this is a precedence value of zero. -F00:2414 * next the first value is evaluated, this can be an in line value, either numeric or -F00:2415 * string, a variable or array element of any type, a function or even an expression -F00:2416 * in parenthesis. this value is kept in FAC_1 -F00:2417 * after the value is evaluated a test is made on the next BASIC program byte, if it -F00:2418 * is a comparrison operator i.e. "<", "=" or ">", then the corresponding bit is set -F00:2419 * in the comparison evaluation flag. this test loops until no more comparrison operators -F00:2420 * are found or more than one of any type is found. in the last case an error is generated -F00:2421 -F00:2422 * evaluate expression -F00:2423 -F00:2424 LAB_EVEX -F00:2425 SUBQ.w #1,a5 * decrement BASIC execute pointer - S02:0000CC5A: 53 4D -F00:2426 LAB_EVEZ -F00:2427 MOVEQ #0,d1 * clear precedence word - S02:0000CC5C: 72 00 -F00:2428 MOVE.b d1,Dtypef(a3) * clear the data type, $80=string, $40=integer, - S02:0000CC5E: 17 41 05 B5 -F00:2429 * $00=float -F00:2430 BRA.s LAB_1ACD * enter loop - S02:0000CC62: 60 1C -F00:2431 -F00:2432 * get vector, set up operator then continue evaluation -F00:2433 -F00:2434 LAB_1B43 * -F00:2435 LEA LAB_OPPT(pc),a0 * point to operator vector table - S02:0000CC64: 41 FA 22 A6 -F00:2436 MOVE.w 2(a0,d1.w),d0 * get vector offset - S02:0000CC68: 30 30 10 02 -F00:2437 PEA (a0,d0.w) * push vector - S02:0000CC6C: 48 70 00 00 -F00:2438 -F00:2439 MOVE.l FAC1_m(a3),-(sp) * push FAC1 mantissa - S02:0000CC70: 2F 2B 05 90 -F00:2440 MOVE.w FAC1_e(a3),-(sp) * push sign and exponent - S02:0000CC74: 3F 2B 05 94 -F00:2441 MOVE.b comp_f(a3),-(sp) * push comparison evaluation flag - S02:0000CC78: 1F 2B 05 E3 -F00:2442 -F00:2443 MOVE.w (a0,d1.w),d1 * get precedence value - S02:0000CC7C: 32 30 10 00 -F00:2444 LAB_1ACD -F00:2445 MOVE.w d1,-(sp) * push precedence value - S02:0000CC80: 3F 01 -F00:2446 BSR LAB_GVAL * get value from line - S02:0000CC82: 61 00 00 E4 -F00:2447 MOVE.b #$00,comp_f(a3) * clear compare function flag - S02:0000CC86: 17 7C 00 00 05 E3 -F00:2448 LAB_1ADB -F00:2449 BSR LAB_GBYT * scan memory - S02:0000CC8C: 61 00 01 2E -F00:2450 LAB_1ADE -F00:2451 SUB.b #TK_GT,d0 * subtract token for > (lowest compare function) - S02:0000CC90: 90 3C 00 BC -F00:2452 BCS.s LAB_1AFA * branch if < TK_GT - S02:0000CC94: 65 2A -F00:2453 -F00:2454 CMP.b #$03,d0 * compare with ">" to "<" tokens - S02:0000CC96: B0 3C 00 03 -F00:2455 BCS.s LAB_1AE0 * branch if <= TK_SGN (is compare function) - S02:0000CC9A: 65 0A -F00:2456 -F00:2457 TST.b comp_f(a3) * test compare function flag - S02:0000CC9C: 4A 2B 05 E3 -F00:2458 BNE.s LAB_1B2A * branch if compare function - S02:0000CCA0: 66 60 -F00:2459 -F00:2460 BRA LAB_1B78 * go do functions - S02:0000CCA2: 60 00 00 86 -F00:2461 -F00:2462 * was token for > = or < (d0 = 0, 1 or 2) -F00:2463 LAB_1AE0 -F00:2464 MOVEQ #1,d1 * set to 0000 0001 - S02:0000CCA6: 72 01 -F00:2465 ASL.b d0,d1 * 1 if >, 2 if =, 4 if < - S02:0000CCA8: E1 21 -F00:2466 MOVE.b comp_f(a3),d0 * copy old compare function flag - S02:0000CCAA: 10 2B 05 E3 -F00:2467 EOR.b d1,comp_f(a3) * EOR in this compare function bit - S02:0000CCAE: B3 2B 05 E3 -F00:2468 CMP.b comp_f(a3),d0 * compare old with new compare function flag - S02:0000CCB2: B0 2B 05 E3 -F00:2469 BCC LAB_SNER * if new <= old comp_f do syntax error and warm - S02:0000CCB6: 64 00 F4 C6 -F00:2470 * start, there was more than one <, = or > -F00:2471 BSR LAB_IGBY * increment & scan memory - S02:0000CCBA: 61 00 00 FE -F00:2472 BRA.s LAB_1ADE * go do next character - S02:0000CCBE: 60 D0 -F00:2473 -F00:2474 * token is < ">" or > "<" tokens -F00:2475 LAB_1AFA -F00:2476 TST.b comp_f(a3) * test compare function flag - S02:0000CCC0: 4A 2B 05 E3 -F00:2477 BNE.s LAB_1B2A * branch if compare function - S02:0000CCC4: 66 3C -F00:2478 -F00:2479 * was < TK_GT so is operator or lower -F00:2480 ADD.b #(TK_GT-TK_PLUS),d0 * add # of operators (+ - * / ^ AND OR EOR) - S02:0000CCC6: D0 3C 00 0A -F00:2481 BCC.s LAB_1B78 * branch if < + operator - S02:0000CCCA: 64 5E -F00:2482 -F00:2483 BNE.s LAB_1B0B * branch if not + token - S02:0000CCCC: 66 08 -F00:2484 -F00:2485 TST.b Dtypef(a3) * test data type, $80=string, $40=integer, - S02:0000CCCE: 4A 2B 05 B5 -F00:2486 * $00=float -F00:2487 BMI LAB_224D * type is string & token was + - S02:0000CCD2: 6B 00 08 72 -F00:2488 -F00:2489 LAB_1B0B -F00:2490 MOVEQ #0,d1 * clear longword - S02:0000CCD6: 72 00 -F00:2491 ADD.b d0,d0 * *2 - S02:0000CCD8: D0 00 -F00:2492 ADD.b d0,d0 * *4 - S02:0000CCDA: D0 00 -F00:2493 MOVE.b d0,d1 * copy to index - S02:0000CCDC: 12 00 -F00:2494 LAB_1B13 -F00:2495 MOVE.w (sp)+,d0 * pull previous precedence - S02:0000CCDE: 30 1F -F00:2496 LEA LAB_OPPT(pc),a0 * set pointer to operator table - S02:0000CCE0: 41 FA 22 2A -F00:2497 CMP.w (a0,d1.w),d0 * compare with this opperator precedence - S02:0000CCE4: B0 70 10 00 -F00:2498 BCC.s LAB_1B7D * branch if previous precedence (d0) >= - S02:0000CCE8: 64 46 -F00:2499 -F00:2500 BSR LAB_CTNM * check if source is numeric, else type mismatch - S02:0000CCEA: 61 00 FF 58 -F00:2501 LAB_1B1C -F00:2502 MOVE.w d0,-(sp) * save precedence - S02:0000CCEE: 3F 00 -F00:2503 LAB_1B1D -F00:2504 BSR LAB_1B43 * get vector, set-up operator and continue - S02:0000CCF0: 61 00 FF 72 -F00:2505 * evaluation -F00:2506 MOVE.w (sp)+,d0 * restore precedence - S02:0000CCF4: 30 1F -F00:2507 MOVE.l prstk(a3),d1 * get stacked function pointer - S02:0000CCF6: 22 2B 05 D8 -F00:2508 BPL.s LAB_1B3C * branch if stacked values - S02:0000CCFA: 6A 22 -F00:2509 -F00:2510 MOVE.w d0,d0 * copy precedence (set flags) - S02:0000CCFC: 30 00 -F00:2511 BEQ.s LAB_1B7B * exit if done - S02:0000CCFE: 67 2E -F00:2512 -F00:2513 BRA.s LAB_1B86 * else pop FAC2 & return (do function) - S02:0000CD00: 60 3C -F00:2514 -F00:2515 * was compare function (< = >) -F00:2516 LAB_1B2A -F00:2517 MOVE.b Dtypef(a3),d0 * get data type flag - S02:0000CD02: 10 2B 05 B5 -F00:2518 MOVE.b comp_f(a3),d1 * get compare function flag - S02:0000CD06: 12 2B 05 E3 -F00:2519 ADD.b d0,d0 * string bit flag into X bit - S02:0000CD0A: D0 00 -F00:2520 ADDX.b d1,d1 * shift compare function flag - S02:0000CD0C: D3 01 -F00:2521 -F00:2522 MOVE.b #0,Dtypef(a3) * clear data type flag, $00=float - S02:0000CD0E: 17 7C 00 00 05 B5 -F00:2523 MOVE.b d1,comp_f(a3) * save new compare function flag - S02:0000CD14: 17 41 05 E3 -F00:2524 SUBQ.w #1,a5 * decrement BASIC execute pointer - S02:0000CD18: 53 4D -F00:2525 MOVEQ #(TK_LT-TK_PLUS)*4,d1 * set offset to last operator entry - S02:0000CD1A: 72 30 -F00:2526 BRA.s LAB_1B13 * branch always - S02:0000CD1C: 60 C0 -F00:2527 -F00:2528 LAB_1B3C -F00:2529 LEA LAB_OPPT(pc),a0 * point to function vector table - S02:0000CD1E: 41 FA 21 EC -F00:2530 CMP.w (a0,d1.w),d0 * compare with this opperator precedence - S02:0000CD22: B0 70 10 00 -F00:2531 BCC.s LAB_1B86 * branch if d0 >=, pop FAC2 & return - S02:0000CD26: 64 16 -F00:2532 -F00:2533 BRA.s LAB_1B1C * branch always - S02:0000CD28: 60 C4 -F00:2534 -F00:2535 * do functions -F00:2536 -F00:2537 LAB_1B78 -F00:2538 MOVEQ #-1,d1 * flag all done - S02:0000CD2A: 72 FF -F00:2539 MOVE.w (sp)+,d0 * pull precedence word - S02:0000CD2C: 30 1F -F00:2540 LAB_1B7B -F00:2541 BEQ.s LAB_1B9D * exit if done - S02:0000CD2E: 67 32 -F00:2542 -F00:2543 LAB_1B7D -F00:2544 CMP.w #$64,d0 * compare previous precedence with $64 - S02:0000CD30: B0 7C 00 64 -F00:2545 BEQ.s LAB_1B84 * branch if was $64 (< function can be string) - S02:0000CD34: 67 04 -F00:2546 -F00:2547 BSR LAB_CTNM * check if source is numeric, else type mismatch - S02:0000CD36: 61 00 FF 0C -F00:2548 LAB_1B84 -F00:2549 MOVE.l d1,prstk(a3) * save current operator index - S02:0000CD3A: 27 41 05 D8 -F00:2550 -F00:2551 * pop FAC2 & return -F00:2552 LAB_1B86 -F00:2553 MOVE.b (sp)+,d0 * pop comparison evaluation flag - S02:0000CD3E: 10 1F -F00:2554 MOVE.b d0,d1 * copy comparison evaluation flag - S02:0000CD40: 12 00 -F00:2555 LSR.b #1,d0 * shift out comparison evaluation lowest bit - S02:0000CD42: E2 08 -F00:2556 MOVE.b d0,Cflag(a3) * save comparison evaluation flag - S02:0000CD44: 17 40 05 E1 -F00:2557 MOVE.w (sp)+,FAC2_e(a3) * pop exponent and sign - S02:0000CD48: 37 5F 05 9C -F00:2558 MOVE.l (sp)+,FAC2_m(a3) * pop mantissa - S02:0000CD4C: 27 5F 05 98 -F00:2559 MOVE.b FAC2_s(a3),FAC_sc(a3) * copy FAC2 sign - S02:0000CD50: 17 6B 05 9D 05 9E -F00:2560 MOVE.b FAC1_s(a3),d0 * get FAC1 sign - S02:0000CD56: 10 2B 05 95 -F00:2561 EOR.b d0,FAC_sc(a3) * EOR FAC1 sign and set sign compare - S02:0000CD5A: B1 2B 05 9E -F00:2562 -F00:2563 LSR.b #1,d1 * type bit into X and C - S02:0000CD5E: E2 09 -F00:2564 RTS - S02:0000CD60: 4E 75 -F00:2565 -F00:2566 LAB_1B9D -F00:2567 MOVE.b FAC1_e(a3),d0 * get FAC1 exponent - S02:0000CD62: 10 2B 05 94 -F00:2568 RTS - S02:0000CD66: 4E 75 -F00:2569 -F00:2570 -F00:2571 ************************************************************************************* -F00:2572 * -F00:2573 * get a value from the BASIC line -F00:2574 -F00:2575 LAB_GVAL -F00:2576 BSR.s LAB_IGBY * increment & scan memory - S02:0000CD68: 61 50 -F00:2577 BCS LAB_2887 * if numeric get FAC1 from string & return - S02:0000CD6A: 65 00 1B 28 -F00:2578 -F00:2579 TST.b d0 * test byte - S02:0000CD6E: 4A 00 -F00:2580 BMI LAB_1BD0 * if -ve go test token values - S02:0000CD70: 6B 00 00 8C -F00:2581 -F00:2582 * else it is either a string, number, variable -F00:2583 * or () -F00:2584 CMP.b #'$',d0 * compare with "$" - S02:0000CD74: B0 3C 00 24 -F00:2585 BEQ LAB_2887 * if "$" get hex number from string & return - S02:0000CD78: 67 00 1B 1A -F00:2586 -F00:2587 CMP.b #'%',d0 * else compare with "%" - S02:0000CD7C: B0 3C 00 25 -F00:2588 BEQ LAB_2887 * if "%" get binary number from string & return - S02:0000CD80: 67 00 1B 12 -F00:2589 -F00:2590 CMP.b #$2E,d0 * compare with "." - S02:0000CD84: B0 3C 00 2E -F00:2591 BEQ LAB_2887 * if so get FAC1 from string and return - S02:0000CD88: 67 00 1B 0A -F00:2592 * (e.g. .123) -F00:2593 -F00:2594 * wasn't a number so ... -F00:2595 CMP.b #$22,d0 * compare with " - S02:0000CD8C: B0 3C 00 22 -F00:2596 BNE.s LAB_1BF3 * if not open quote it must be a variable or - S02:0000CD90: 66 0C -F00:2597 * open bracket -F00:2598 -F00:2599 * was open quote so get the enclosed string -F00:2600 -F00:2601 * print "..." string to string stack -F00:2602 -F00:2603 LAB_1BC1 -F00:2604 MOVE.b (a5)+,d0 * increment BASIC execute pointer (past ") - S02:0000CD92: 10 1D -F00:2605 * fastest/shortest method -F00:2606 MOVEA.l a5,a0 * copy basic execute pointer (string start) - S02:0000CD94: 20 4D -F00:2607 BSR LAB_20AE * print " terminated string to stack - S02:0000CD96: 61 00 06 36 -F00:2608 MOVEA.l a2,a5 * restore BASIC execute pointer from temp - S02:0000CD9A: 2A 4A -F00:2609 RTS - S02:0000CD9C: 4E 75 -F00:2610 -F00:2611 * get value from line .. continued -F00:2612 * wasn't any sort of number so ... -F00:2613 LAB_1BF3 -F00:2614 CMP.b #'(',d0 * compare with "(" - S02:0000CD9E: B0 3C 00 28 -F00:2615 BNE.s LAB_1C18 * if not "(" get (var) and return value in FAC1 - S02:0000CDA2: 66 40 -F00:2616 * and $ flag -F00:2617 -F00:2618 -F00:2619 ************************************************************************************* -F00:2620 * -F00:2621 * evaluate expression within parentheses -F00:2622 -F00:2623 LAB_1BF7 -F00:2624 BSR LAB_EVEZ * evaluate expression (no decrement) - S02:0000CDA4: 61 00 FE B6 -F00:2625 -F00:2626 -F00:2627 ************************************************************************************* -F00:2628 * -F00:2629 * all the 'scan for' routines return the character after the sought character -F00:2630 -F00:2631 * scan for ")", else do syntax error, then warm start -F00:2632 -F00:2633 LAB_1BFB -F00:2634 MOVEQ #$29,d0 * load d0 with ")" - S02:0000CDA8: 70 29 -F00:2635 BRA.s LAB_SCCA - S02:0000CDAA: 60 06 -F00:2636 -F00:2637 -F00:2638 ************************************************************************************* -F00:2639 * -F00:2640 * scan for "," and get byte, else do Syntax error then warm start -F00:2641 -F00:2642 LAB_SCGB -F00:2643 PEA LAB_GTBY(pc) * return address is to get byte parameter - S02:0000CDAC: 48 7A 09 6C -F00:2644 -F00:2645 -F00:2646 ************************************************************************************* -F00:2647 * -F00:2648 * scan for ",", else do syntax error, then warm start -F00:2649 -F00:2650 LAB_1C01 -F00:2651 MOVEQ #$2C,d0 * load d0 with "," - S02:0000CDB0: 70 2C -F00:2652 -F00:2653 -F00:2654 ************************************************************************************* -F00:2655 * -F00:2656 * scan for CHR$(d0) , else do syntax error, then warm start -F00:2657 -F00:2658 LAB_SCCA -F00:2659 CMP.b (a5)+,d0 * check next byte is = d0 - S02:0000CDB2: B0 1D -F00:2660 BEQ.s LAB_GBYT * if so go get next - S02:0000CDB4: 67 06 -F00:2661 -F00:2662 BRA LAB_SNER * else do syntax error/warm start - S02:0000CDB6: 60 00 F3 C6 -F00:2663 -F00:2664 -F00:2665 ************************************************************************************* -F00:2666 * -F00:2667 * BASIC increment and scan memory routine -F00:2668 -F00:2669 LAB_IGBY -F00:2670 MOVE.b (a5)+,d0 * get byte & increment pointer - S02:0000CDBA: 10 1D -F00:2671 -F00:2672 * scan memory routine, exit with Cb = 1 if numeric character -F00:2673 * also skips any spaces encountered -F00:2674 -F00:2675 LAB_GBYT -F00:2676 MOVE.b (a5),d0 * get byte - S02:0000CDBC: 10 15 -F00:2677 -F00:2678 CMP.b #$20,d0 * compare with " " - S02:0000CDBE: B0 3C 00 20 -F00:2679 BEQ.s LAB_IGBY * if " " go do next - S02:0000CDC2: 67 F6 -F00:2680 -F00:2681 * test current BASIC byte, exit with Cb = 1 if numeric character -F00:2682 -F00:2683 CMP.b #TK_ELSE,d0 * compare with the token for ELSE - S02:0000CDC4: B0 3C 00 A9 -F00:2684 BCC.s RTS_001 * exit if >= (not numeric, carry clear) - S02:0000CDC8: 64 0C -F00:2685 -F00:2686 CMP.b #$3A,d0 * compare with ":" - S02:0000CDCA: B0 3C 00 3A -F00:2687 BCC.s RTS_001 * exit if >= (not numeric, carry clear) - S02:0000CDCE: 64 06 -F00:2688 -F00:2689 E2028 MOVEQ #$D0,d6 * set -"0" - S02:0000CDD0: 7C D0 -F00:2690 ADD.b d6,d0 * add -"0" - S02:0000CDD2: D0 06 -F00:2691 SUB.b d6,d0 * subtract -"0" - S02:0000CDD4: 90 06 -F00:2692 RTS_001 * carry set if byte = "0"-"9" -F00:2693 RTS - S02:0000CDD6: 4E 75 -F00:2694 -F00:2695 -F00:2696 ************************************************************************************* -F00:2697 * -F00:2698 * set-up for - operator -F00:2699 -F00:2700 LAB_1C11 -F00:2701 BSR LAB_CTNM * check if source is numeric, else type mismatch - S02:0000CDD8: 61 00 FE 6A -F00:2702 MOVEQ #(TK_GT-TK_PLUS)*4,d1 * set offset from base to - operator - S02:0000CDDC: 72 28 -F00:2703 LAB_1C13 -F00:2704 LEA 4(sp),sp * dump GVAL return address - S02:0000CDDE: 58 8F -F00:2705 BRA LAB_1B1D * continue evaluating expression - S02:0000CDE0: 60 00 FF 0E -F00:2706 -F00:2707 -F00:2708 ************************************************************************************* -F00:2709 * -F00:2710 * variable name set-up -F00:2711 * get (var), return value in FAC_1 & data type flag -F00:2712 -F00:2713 LAB_1C18 -F00:2714 BSR LAB_GVAR * get variable address in a0 - S02:0000CDE4: 61 00 01 E2 -F00:2715 -F00:2716 * if you want a non existant variable to return a null value then set the novar -F00:2717 * value at the top of this file to some non zero value -F00:2718 -F00:2719 ifne novar -F00:2720 -F00:2721 BNE.s LAB_1C19 * if it exists return it -F00:2722 -F00:2723 LEA.l LAB_1D96(pc),a0 * else return a null descriptor/pointer -F00:2724 -F00:2725 endc -F00:2726 -F00:2727 * return existing variable value -F00:2728 -F00:2729 LAB_1C19 -F00:2730 TST.b Dtypef(a3) * test data type, $80=string, $40=integer, - S02:0000CDE8: 4A 2B 05 B5 -F00:2731 * $00=float -F00:2732 BEQ LAB_UFAC * if float unpack memory (a0) into FAC1 and - S02:0000CDEC: 67 00 0D 84 -F00:2733 * return -F00:2734 -F00:2735 BPL.s LAB_1C1A * if integer unpack memory (a0) into FAC1 - S02:0000CDF0: 6A 06 -F00:2736 * and return -F00:2737 -F00:2738 MOVE.l a0,FAC1_m(a3) * else save descriptor pointer in FAC1 - S02:0000CDF2: 27 48 05 90 -F00:2739 RTS - S02:0000CDF6: 4E 75 -F00:2740 -F00:2741 LAB_1C1A -F00:2742 MOVE.l (a0),d0 * get integer value - S02:0000CDF8: 20 10 -F00:2743 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & return - S02:0000CDFA: 60 00 04 BC -F00:2744 -F00:2745 -F00:2746 ************************************************************************************* -F00:2747 * -F00:2748 * get value from line .. continued -F00:2749 * do tokens -F00:2750 -F00:2751 LAB_1BD0 -F00:2752 CMP.b #TK_MINUS,d0 * compare with token for - - S02:0000CDFE: B0 3C 00 B3 -F00:2753 BEQ.s LAB_1C11 * branch if - token (do set-up for - operator) - S02:0000CE02: 67 D4 -F00:2754 -F00:2755 * wasn't -123 so ... -F00:2756 CMP.b #TK_PLUS,d0 * compare with token for + - S02:0000CE04: B0 3C 00 B2 -F00:2757 BEQ LAB_GVAL * branch if + token (+n = n so ignore leading +) - S02:0000CE08: 67 00 FF 5E -F00:2758 -F00:2759 CMP.b #TK_NOT,d0 * compare with token for NOT - S02:0000CE0C: B0 3C 00 AE -F00:2760 BNE.s LAB_1BE7 * branch if not token for NOT - S02:0000CE10: 66 06 -F00:2761 -F00:2762 * was NOT token -F00:2763 MOVE.w #(TK_EQUAL-TK_PLUS)*4,d1 * offset to NOT function - S02:0000CE12: 32 3C 00 2C -F00:2764 BRA.s LAB_1C13 * do set-up for function then execute - S02:0000CE16: 60 C6 -F00:2765 -F00:2766 * wasn't +, - or NOT so ... -F00:2767 LAB_1BE7 -F00:2768 CMP.b #TK_FN,d0 * compare with token for FN - S02:0000CE18: B0 3C 00 AB -F00:2769 BEQ LAB_201E * if FN go evaluate FNx - S02:0000CE1C: 67 00 05 14 -F00:2770 -F00:2771 * wasn't +, -, NOT or FN so ... -F00:2772 SUB.b #TK_SGN,d0 * compare with token for SGN & normalise - S02:0000CE20: 90 3C 00 BF -F00:2773 BCS LAB_SNER * if < SGN token then do syntax error - S02:0000CE24: 65 00 F3 58 -F00:2774 -F00:2775 * get value from line .. continued -F00:2776 * only functions left so set up function references -F00:2777 -F00:2778 * new for V2.0+ this replaces a lot of IF .. THEN .. ELSEIF .. THEN .. that was needed -F00:2779 * to process function calls. now the function vector is computed and pushed on the stack -F00:2780 * and the preprocess offset is read. if the preprocess offset is non zero then the vector -F00:2781 * is calculated and the routine called, if not this routine just does RTS. whichever -F00:2782 * happens the RTS at the end of this routine, or the preprocess routine calls, the -F00:2783 * function code -F00:2784 -F00:2785 * this also removes some less than elegant code that was used to bypass type checking -F00:2786 * for functions that returned strings -F00:2787 -F00:2788 AND.w #$7F,d0 * mask byte - S02:0000CE28: C0 7C 00 7F -F00:2789 ADD.w d0,d0 * *2 (2 bytes per function offset) - S02:0000CE2C: D0 40 -F00:2790 -F00:2791 LEA LAB_FTBL(pc),a0 * pointer to functions vector table - S02:0000CE2E: 41 FA 20 90 -F00:2792 MOVE.w (a0,d0.w),d1 * get function vector offset - S02:0000CE32: 32 30 00 00 -F00:2793 PEA (a0,d1.w) * push function vector - S02:0000CE36: 48 70 10 00 -F00:2794 -F00:2795 LEA LAB_FTPP(pc),a0 * pointer to functions preprocess vector table - S02:0000CE3A: 41 FA 20 38 -F00:2796 MOVE.w (a0,d0.w),d0 * get function preprocess vector offset - S02:0000CE3E: 30 30 00 00 -F00:2797 BEQ.s LAB_1C2A * no preprocess vector so go do function - S02:0000CE42: 67 12 -F00:2798 -F00:2799 LEA (a0,d0.w),a0 * get function preprocess vector - S02:0000CE44: 41 F0 00 00 -F00:2800 JMP (a0) * go do preprocess routine then function - S02:0000CE48: 4E D0 -F00:2801 -F00:2802 -F00:2803 ************************************************************************************* -F00:2804 * -F00:2805 * process string expression in parenthesis -F00:2806 -F00:2807 LAB_PPFS -F00:2808 BSR LAB_1BF7 * process expression in parenthesis - S02:0000CE4A: 61 00 FF 58 -F00:2809 TST.b Dtypef(a3) * test data type - S02:0000CE4E: 4A 2B 05 B5 -F00:2810 BPL LAB_TMER * if numeric do Type missmatch Error/warm start - S02:0000CE52: 6A 00 F2 FE -F00:2811 -F00:2812 LAB_1C2A -F00:2813 RTS * else do function - S02:0000CE56: 4E 75 -F00:2814 -F00:2815 -F00:2816 ************************************************************************************* -F00:2817 * -F00:2818 * process numeric expression in parenthesis -F00:2819 -F00:2820 LAB_PPFN -F00:2821 BSR LAB_1BF7 * process expression in parenthesis - S02:0000CE58: 61 00 FF 4A -F00:2822 TST.b Dtypef(a3) * test data type - S02:0000CE5C: 4A 2B 05 B5 -F00:2823 BMI LAB_TMER * if string do Type missmatch Error/warm start - S02:0000CE60: 6B 00 F2 F0 -F00:2824 -F00:2825 RTS * else do function - S02:0000CE64: 4E 75 -F00:2826 -F00:2827 -F00:2828 ************************************************************************************* -F00:2829 * -F00:2830 * set numeric data type and increment BASIC execute pointer -F00:2831 -F00:2832 LAB_PPBI -F00:2833 MOVE.b #$00,Dtypef(a3) * clear data type flag, $00=float - S02:0000CE66: 17 7C 00 00 05 B5 -F00:2834 MOVE.b (a5)+,d0 * get next BASIC byte - S02:0000CE6C: 10 1D -F00:2835 RTS * do function - S02:0000CE6E: 4E 75 -F00:2836 -F00:2837 -F00:2838 ************************************************************************************* -F00:2839 * -F00:2840 * process string for LEFT$, RIGHT$ or MID$ -F00:2841 -F00:2842 LAB_LRMS -F00:2843 BSR LAB_EVEZ * evaluate (should be string) expression - S02:0000CE70: 61 00 FD EA -F00:2844 TST.b Dtypef(a3) * test data type flag - S02:0000CE74: 4A 2B 05 B5 -F00:2845 BPL LAB_TMER * if type is not string do type mismatch error - S02:0000CE78: 6A 00 F2 D8 -F00:2846 -F00:2847 MOVE.b (a5)+,d2 * get BASIC byte - S02:0000CE7C: 14 1D -F00:2848 CMP.b #',',d2 * compare with comma - S02:0000CE7E: B4 3C 00 2C -F00:2849 BNE LAB_SNER * if not "," go do syntax error/warm start - S02:0000CE82: 66 00 F2 FA -F00:2850 -F00:2851 MOVE.l FAC1_m(a3),-(sp) * save descriptor pointer - S02:0000CE86: 2F 2B 05 90 -F00:2852 BSR LAB_GTWO * get word parameter, result in d0 and Itemp - S02:0000CE8A: 61 00 08 A2 -F00:2853 MOVEA.l (sp)+,a0 * restore descriptor pointer - S02:0000CE8E: 20 5F -F00:2854 RTS * do function - S02:0000CE90: 4E 75 -F00:2855 -F00:2856 -F00:2857 ************************************************************************************* -F00:2858 * -F00:2859 * process numeric expression(s) for BIN$ or HEX$ -F00:2860 -F00:2861 LAB_BHSS -F00:2862 BSR LAB_EVEZ * evaluate expression (no decrement) - S02:0000CE92: 61 00 FD C8 -F00:2863 TST.b Dtypef(a3) * test data type - S02:0000CE96: 4A 2B 05 B5 -F00:2864 BMI LAB_TMER * if string do Type missmatch Error/warm start - S02:0000CE9A: 6B 00 F2 B6 -F00:2865 -F00:2866 BSR LAB_2831 * convert FAC1 floating to fixed - S02:0000CE9E: 61 00 0D C4 -F00:2867 * result in d0 and Itemp -F00:2868 MOVEQ #0,d1 * set default to no leading "0"s - S02:0000CEA2: 72 00 -F00:2869 MOVE.b (a5)+,d2 * get BASIC byte - S02:0000CEA4: 14 1D -F00:2870 CMP.b #',',d2 * compare with comma - S02:0000CEA6: B4 3C 00 2C -F00:2871 BNE.s LAB_BHCB * if not "," go check close bracket - S02:0000CEAA: 66 0C -F00:2872 -F00:2873 MOVE.l d0,-(sp) * copy number to stack - S02:0000CEAC: 2F 00 -F00:2874 BSR LAB_GTBY * get byte value - S02:0000CEAE: 61 00 08 6A -F00:2875 MOVE.l d0,d1 * copy leading 0s # - S02:0000CEB2: 22 00 -F00:2876 MOVE.l (sp)+,d0 * restore number from stack - S02:0000CEB4: 20 1F -F00:2877 MOVE.b (a5)+,d2 * get BASIC byte - S02:0000CEB6: 14 1D -F00:2878 LAB_BHCB -F00:2879 CMP.b #')',d2 * compare with close bracket - S02:0000CEB8: B4 3C 00 29 -F00:2880 BNE LAB_SNER * if not ")" do Syntax Error/warm start - S02:0000CEBC: 66 00 F2 C0 -F00:2881 -F00:2882 RTS * go do function - S02:0000CEC0: 4E 75 -F00:2883 -F00:2884 -F00:2885 ************************************************************************************* -F00:2886 * -F00:2887 * perform EOR -F00:2888 -F00:2889 LAB_EOR -F00:2890 BSR.s GetFirst * get two values for OR, AND or EOR - S02:0000CEC2: 61 16 -F00:2891 * first in d0, and Itemp, second in d2 -F00:2892 EOR.l d2,d0 * EOR values - S02:0000CEC4: B5 80 -F00:2893 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & RET - S02:0000CEC6: 60 00 03 F0 -F00:2894 -F00:2895 -F00:2896 ************************************************************************************* -F00:2897 * -F00:2898 * perform OR -F00:2899 -F00:2900 LAB_OR -F00:2901 BSR.s GetFirst * get two values for OR, AND or EOR - S02:0000CECA: 61 0E -F00:2902 * first in d0, and Itemp, second in d2 -F00:2903 OR.l d2,d0 * do OR - S02:0000CECC: 80 82 -F00:2904 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & RET - S02:0000CECE: 60 00 03 E8 -F00:2905 -F00:2906 -F00:2907 ************************************************************************************* -F00:2908 * -F00:2909 * perform AND -F00:2910 -F00:2911 LAB_AND -F00:2912 BSR.s GetFirst * get two values for OR, AND or EOR - S02:0000CED2: 61 06 -F00:2913 * first in d0, and Itemp, second in d2 -F00:2914 AND.l d2,d0 * do AND - S02:0000CED4: C0 82 -F00:2915 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & RET - S02:0000CED6: 60 00 03 E0 -F00:2916 -F00:2917 -F00:2918 ************************************************************************************* -F00:2919 * -F00:2920 * get two values for OR, AND, EOR -F00:2921 * first in d0, second in d2 -F00:2922 -F00:2923 GetFirst -F00:2924 BSR LAB_EVIR * evaluate integer expression (no sign check) - S02:0000CEDA: 61 00 02 28 -F00:2925 * result in d0 and Itemp -F00:2926 MOVE.l d0,d2 * copy second value - S02:0000CEDE: 24 00 -F00:2927 BSR LAB_279B * copy FAC2 to FAC1, get first value in - S02:0000CEE0: 61 00 0C EA -F00:2928 * expression -F00:2929 BRA LAB_EVIR * evaluate integer expression (no sign check) - S02:0000CEE4: 60 00 02 1E -F00:2930 * result in d0 and Itemp & return -F00:2931 -F00:2932 -F00:2933 ************************************************************************************* -F00:2934 * -F00:2935 * perform NOT -F00:2936 -F00:2937 LAB_EQUAL -F00:2938 BSR LAB_EVIR * evaluate integer expression (no sign check) - S02:0000CEE8: 61 00 02 1A -F00:2939 * result in d0 and Itemp -F00:2940 NOT.l d0 * bitwise invert - S02:0000CEEC: 46 80 -F00:2941 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & RET - S02:0000CEEE: 60 00 03 C8 -F00:2942 -F00:2943 -F00:2944 ************************************************************************************* -F00:2945 * -F00:2946 * perform comparisons -F00:2947 * do < compare -F00:2948 -F00:2949 LAB_LTHAN -F00:2950 BSR LAB_CKTM * type match check, set C for string - S02:0000CEF2: 61 00 FD 52 -F00:2951 BCS.s LAB_1CAE * branch if string - S02:0000CEF6: 65 06 -F00:2952 -F00:2953 * do numeric < compare -F00:2954 BSR LAB_27FA * compare FAC1 with FAC2 - S02:0000CEF8: 61 00 0D 3E -F00:2955 * returns d0=+1 if FAC1 > FAC2 -F00:2956 * returns d0= 0 if FAC1 = FAC2 -F00:2957 * returns d0=-1 if FAC1 < FAC2 -F00:2958 BRA.s LAB_1CF2 * process result - S02:0000CEFC: 60 42 -F00:2959 -F00:2960 * do string < compare -F00:2961 LAB_1CAE -F00:2962 MOVE.b #$00,Dtypef(a3) * clear data type, $80=string, $40=integer, - S02:0000CEFE: 17 7C 00 00 05 B5 -F00:2963 * $00=float -F00:2964 BSR LAB_22B6 * pop string off descriptor stack, or from top - S02:0000CF04: 61 00 06 B4 -F00:2965 * of string space returns d0 = length, -F00:2966 * a0 = pointer -F00:2967 MOVEA.l a0,a1 * copy string 2 pointer - S02:0000CF08: 22 48 -F00:2968 MOVE.l d0,d1 * copy string 2 length - S02:0000CF0A: 22 00 -F00:2969 MOVEA.l FAC2_m(a3),a0 * get string 1 descriptor pointer - S02:0000CF0C: 20 6B 05 98 -F00:2970 BSR LAB_22BA * pop (a0) descriptor, returns with .. - S02:0000CF10: 61 00 06 AC -F00:2971 * d0 = length, a0 = pointer -F00:2972 MOVE.l d0,d2 * copy length - S02:0000CF14: 24 00 -F00:2973 BNE.s LAB_1CB5 * branch if not null string - S02:0000CF16: 66 04 -F00:2974 -F00:2975 TST.l d1 * test if string 2 is null also - S02:0000CF18: 4A 81 -F00:2976 BEQ.s LAB_1CF2 * if so do string 1 = string 2 - S02:0000CF1A: 67 24 -F00:2977 -F00:2978 LAB_1CB5 -F00:2979 SUB.l d1,d2 * subtract string 2 length - S02:0000CF1C: 94 81 -F00:2980 BEQ.s LAB_1CD5 * branch if strings = length - S02:0000CF1E: 67 0C -F00:2981 -F00:2982 BCS.s LAB_1CD4 * branch if string 1 < string 2 - S02:0000CF20: 65 04 -F00:2983 -F00:2984 MOVEQ #-1,d0 * set for string 1 > string 2 - S02:0000CF22: 70 FF -F00:2985 BRA.s LAB_1CD6 * go do character comapare - S02:0000CF24: 60 08 -F00:2986 -F00:2987 LAB_1CD4 -F00:2988 MOVE.l d0,d1 * string 1 length is compare length - S02:0000CF26: 22 00 -F00:2989 MOVEQ #1,d0 * and set for string 1 < string 2 - S02:0000CF28: 70 01 -F00:2990 BRA.s LAB_1CD6 * go do character comapare - S02:0000CF2A: 60 02 -F00:2991 -F00:2992 LAB_1CD5 -F00:2993 MOVE.l d2,d0 * set for string 1 = string 2 - S02:0000CF2C: 20 02 -F00:2994 LAB_1CD6 -F00:2995 SUBQ.l #1,d1 * adjust length for DBcc loop - S02:0000CF2E: 53 81 -F00:2996 -F00:2997 * d1 is length to compare, d0 is <=> for length -F00:2998 * a0 is string 1 pointer, a1 is string 2 pointer -F00:2999 LAB_1CE6 -F00:3000 CMPM.b (a0)+,(a1)+ * compare string bytes (1 with 2) - S02:0000CF30: B3 08 -F00:3001 DBNE d1,LAB_1CE6 * loop if same and not end yet - S02:0000CF32: 56 C9 FF FC -F00:3002 -F00:3003 BEQ.s LAB_1CF2 * if = to here, then go use length compare - S02:0000CF36: 67 08 -F00:3004 -F00:3005 BCC.s LAB_1CDB * else branch if string 1 > string 2 - S02:0000CF38: 64 04 -F00:3006 -F00:3007 MOVEQ #-1,d0 * else set for string 1 < string 2 - S02:0000CF3A: 70 FF -F00:3008 BRA.s LAB_1CF2 * go set result - S02:0000CF3C: 60 02 -F00:3009 -F00:3010 LAB_1CDB -F00:3011 MOVEQ #1,d0 * and set for string 1 > string 2 - S02:0000CF3E: 70 01 -F00:3012 -F00:3013 LAB_1CF2 -F00:3014 ADDQ.b #1,d0 * make result 0, 1 or 2 - S02:0000CF40: 52 00 -F00:3015 MOVE.b d0,d1 * copy to d1 - S02:0000CF42: 12 00 -F00:3016 MOVEQ #1,d0 * set d0 longword - S02:0000CF44: 70 01 -F00:3017 ROL.b d1,d0 * make 1, 2 or 4 (result = flag bit) - S02:0000CF46: E3 38 -F00:3018 AND.b Cflag(a3),d0 * AND with comparison evaluation flag - S02:0000CF48: C0 2B 05 E1 -F00:3019 BEQ LAB_27DB * exit if not a wanted result (i.e. false) - S02:0000CF4C: 67 00 0C D2 -F00:3020 -F00:3021 MOVEQ #-1,d0 * else set -1 (true) - S02:0000CF50: 70 FF -F00:3022 BRA LAB_27DB * save d0 as integer & return - S02:0000CF52: 60 00 0C CC -F00:3023 -F00:3024 -F00:3025 LAB_1CFE -F00:3026 BSR LAB_1C01 * scan for ",", else do syntax error/warm start - S02:0000CF56: 61 00 FE 58 -F00:3027 -F00:3028 -F00:3029 ************************************************************************************* -F00:3030 * -F00:3031 * perform DIM -F00:3032 -F00:3033 LAB_DIM -F00:3034 MOVEQ #-1,d1 * set "DIM" flag - S02:0000CF5A: 72 FF -F00:3035 BSR.s LAB_1D10 * search for or dimension a variable - S02:0000CF5C: 61 70 -F00:3036 BSR LAB_GBYT * scan memory - S02:0000CF5E: 61 00 FE 5C -F00:3037 BNE.s LAB_1CFE * loop and scan for "," if not null - S02:0000CF62: 66 F2 -F00:3038 -F00:3039 RTS - S02:0000CF64: 4E 75 -F00:3040 -F00:3041 -F00:3042 ************************************************************************************* -F00:3043 * -F00:3044 * perform << (left shift) -F00:3045 -F00:3046 LAB_LSHIFT -F00:3047 BSR.s GetPair * get an integer and byte pair - S02:0000CF66: 61 2E -F00:3048 * byte is in d2, integer is in d0 and Itemp -F00:3049 BEQ.s NoShift * branch if byte zero - S02:0000CF68: 67 08 -F00:3050 -F00:3051 CMP.b #$20,d2 * compare bit count with 32d - S02:0000CF6A: B4 3C 00 20 -F00:3052 BCC.s TooBig * branch if >= - S02:0000CF6E: 64 20 -F00:3053 -F00:3054 ASL.l d2,d0 * shift longword - S02:0000CF70: E5 A0 -F00:3055 NoShift -F00:3056 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & RET - S02:0000CF72: 60 00 03 44 -F00:3057 -F00:3058 -F00:3059 ************************************************************************************* -F00:3060 * -F00:3061 * perform >> (right shift) -F00:3062 -F00:3063 LAB_RSHIFT -F00:3064 BSR.s GetPair * get an integer and byte pair - S02:0000CF76: 61 1E -F00:3065 * byte is in d2, integer is in d0 and Itemp -F00:3066 BEQ.s NoShift * branch if byte zero - S02:0000CF78: 67 F8 -F00:3067 -F00:3068 CMP.b #$20,d2 * compare bit count with 32d - S02:0000CF7A: B4 3C 00 20 -F00:3069 BCS.s Not2Big * branch if >= (return shift) - S02:0000CF7E: 65 0A -F00:3070 -F00:3071 TST.l d0 * test sign bit - S02:0000CF80: 4A 80 -F00:3072 BPL.s TooBig * branch if +ve - S02:0000CF82: 6A 0C -F00:3073 -F00:3074 MOVEQ #-1,d0 * set longword - S02:0000CF84: 70 FF -F00:3075 BRA LAB_AYFC * convert d0 to longword in FAC1 & RET - S02:0000CF86: 60 00 03 30 -F00:3076 -F00:3077 Not2Big -F00:3078 ASR.l d2,d0 * shift longword - S02:0000CF8A: E4 A0 -F00:3079 BRA LAB_AYFC * convert d0 to longword in FAC1 & RET - S02:0000CF8C: 60 00 03 2A -F00:3080 -F00:3081 TooBig -F00:3082 MOVEQ #0,d0 * clear longword - S02:0000CF90: 70 00 -F00:3083 BRA LAB_AYFC * convert d0 to longword in FAC1 & RET - S02:0000CF92: 60 00 03 24 -F00:3084 -F00:3085 -F00:3086 ************************************************************************************* -F00:3087 * -F00:3088 * get an integer and byte pair -F00:3089 * byte is in d2, integer is in d0 and Itemp -F00:3090 -F00:3091 GetPair -F00:3092 BSR LAB_EVBY * evaluate byte expression, result in d0 and - S02:0000CF96: 61 00 07 86 -F00:3093 * Itemp -F00:3094 MOVE.b d0,d2 * save it - S02:0000CF9A: 14 00 -F00:3095 BSR LAB_279B * copy FAC2 to FAC1, get first value in - S02:0000CF9C: 61 00 0C 2E -F00:3096 * expression -F00:3097 BSR LAB_EVIR * evaluate integer expression (no sign check) - S02:0000CFA0: 61 00 01 62 -F00:3098 * result in d0 and Itemp -F00:3099 TST.b d2 * test byte value - S02:0000CFA4: 4A 02 -F00:3100 RTS - S02:0000CFA6: 4E 75 -F00:3101 -F00:3102 -F00:3103 ************************************************************************************* -F00:3104 * -F00:3105 * check alpha, return C=0 if<"A" or >"Z" or <"a" to "z"> -F00:3106 -F00:3107 LAB_CASC -F00:3108 CMP.b #$61,d0 * compare with "a" - S02:0000CFA8: B0 3C 00 61 -F00:3109 BCC.s LAB_1D83 * if >="a" go check =<"z" - S02:0000CFAC: 64 10 -F00:3110 -F00:3111 -F00:3112 ************************************************************************************* -F00:3113 * -F00:3114 * check alpha upper case, return C=0 if<"A" or >"Z" -F00:3115 -F00:3116 LAB_CAUC -F00:3117 CMP.b #$41,d0 * compare with "A" - S02:0000CFAE: B0 3C 00 41 -F00:3118 BCC.s LAB_1D8A * if >="A" go check =<"Z" - S02:0000CFB2: 64 04 -F00:3119 -F00:3120 OR d0,d0 * make C=0 - S02:0000CFB4: 80 40 -F00:3121 RTS - S02:0000CFB6: 4E 75 -F00:3122 -F00:3123 LAB_1D8A -F00:3124 CMP.b #$5B,d0 * compare with "Z"+1 - S02:0000CFB8: B0 3C 00 5B -F00:3125 * carry set if byte<="Z" -F00:3126 RTS - S02:0000CFBC: 4E 75 -F00:3127 -F00:3128 LAB_1D83 -F00:3129 CMP.b #$7B,d0 * compare with "z"+1 - S02:0000CFBE: B0 3C 00 7B -F00:3130 * carry set if byte<="z" -F00:3131 RTS - S02:0000CFC2: 4E 75 -F00:3132 -F00:3133 -F00:3134 ************************************************************************************* -F00:3135 * -F00:3136 * search for or create variable. this is used to automatically create a variable if -F00:3137 * it is not found. any routines that need to create the variable call LAB_GVAR via -F00:3138 * this point and error generation is supressed and the variable will be created -F00:3139 * -F00:3140 * return pointer to variable in Cvaral and a0 -F00:3141 * set data type to variable type -F00:3142 -F00:3143 LAB_SVAR -F00:3144 BSR.s LAB_GVAR * search for variable - S02:0000CFC4: 61 02 -F00:3145 LAB_FVAR -F00:3146 RTS - S02:0000CFC6: 4E 75 -F00:3147 -F00:3148 -F00:3149 ************************************************************************************* -F00:3150 * -F00:3151 * search for variable. if this routine is called from anywhere but the above call and -F00:3152 * the variable searched for does not exist then an error will be returned -F00:3153 * -F00:3154 * DIM flag is in d1.b -F00:3155 * return pointer to variable in Cvaral and a0 -F00:3156 * set data type to variable type -F00:3157 -F00:3158 LAB_GVAR -F00:3159 MOVEQ #$00,d1 * set DIM flag = $00 - S02:0000CFC8: 72 00 -F00:3160 BSR LAB_GBYT * scan memory (1st character) - S02:0000CFCA: 61 00 FD F0 -F00:3161 LAB_1D10 -F00:3162 MOVE.b d1,Defdim(a3) * save DIM flag - S02:0000CFCE: 17 41 05 B4 -F00:3163 -F00:3164 * search for FN name entry point -F00:3165 -F00:3166 LAB_1D12 -F00:3167 BSR.s LAB_CASC * check byte, return C=0 if<"A" or >"Z" - S02:0000CFD2: 61 D4 -F00:3168 BCC LAB_SNER * if not, syntax error then warm start - S02:0000CFD4: 64 00 F1 A8 -F00:3169 -F00:3170 * it is a variable name so ... -F00:3171 MOVEQ #$0,d1 * set index for name byte - S02:0000CFD8: 72 00 -F00:3172 LEA Varname(a3),a0 * pointer to variable name - S02:0000CFDA: 41 EB 04 6A -F00:3173 MOVE.l d1,(a0) * clear the variable name - S02:0000CFDE: 20 81 -F00:3174 MOVE.b d1,Dtypef(a3) * clear the data type, $80=string, $40=integer, - S02:0000CFE0: 17 41 05 B5 -F00:3175 * $00=float -F00:3176 -F00:3177 LAB_1D2D -F00:3178 CMP.w #$04,d1 * done all significant characters? - S02:0000CFE4: B2 7C 00 04 -F00:3179 BCC.s LAB_1D2E * if so go ignore any more - S02:0000CFE8: 64 06 -F00:3180 -F00:3181 MOVE.b d0,(a0,d1.w) * save the character - S02:0000CFEA: 11 80 10 00 -F00:3182 ADDQ.w #1,d1 * increment index - S02:0000CFEE: 52 41 -F00:3183 LAB_1D2E -F00:3184 BSR LAB_IGBY * increment & scan memory (next character) - S02:0000CFF0: 61 00 FD C8 -F00:3185 BCS.s LAB_1D2D * branch if character = "0"-"9" (ok) - S02:0000CFF4: 65 EE -F00:3186 -F00:3187 * character wasn't "0" to "9" so ... -F00:3188 BSR.s LAB_CASC * check byte, return C=0 if<"A" or >"Z" - S02:0000CFF6: 61 B0 -F00:3189 BCS.s LAB_1D2D * branch if = "A"-"Z" (ok) - S02:0000CFF8: 65 EA -F00:3190 -F00:3191 * check if string variable -F00:3192 CMP.b #'$',d0 * compare with "$" - S02:0000CFFA: B0 3C 00 24 -F00:3193 BNE.s LAB_1D44 * branch if not string - S02:0000CFFE: 66 0C -F00:3194 -F00:3195 * type is string -F00:3196 OR.b #$80,Varname+1(a3) * set top bit of 2nd character, indicate string - S02:0000D000: 00 2B 00 80 04 6B -F00:3197 BSR LAB_IGBY * increment & scan memory - S02:0000D006: 61 00 FD B2 -F00:3198 BRA.s LAB_1D45 * skip integer check - S02:0000D00A: 60 10 -F00:3199 -F00:3200 * check if integer variable -F00:3201 LAB_1D44 -F00:3202 CMP.b #'&',d0 * compare with "&" - S02:0000D00C: B0 3C 00 26 -F00:3203 BNE.s LAB_1D45 * branch if not integer - S02:0000D010: 66 0A -F00:3204 -F00:3205 * type is integer -F00:3206 OR.b #$80,Varname+2(a3) * set top bit of 3rd character, indicate integer - S02:0000D012: 00 2B 00 80 04 6C -F00:3207 BSR LAB_IGBY * increment & scan memory - S02:0000D018: 61 00 FD A0 -F00:3208 -F00:3209 * after we have determined the variable type we need to determine -F00:3210 * if it's an array of type -F00:3211 -F00:3212 * gets here with character after var name in d0 -F00:3213 LAB_1D45 -F00:3214 TST.b Sufnxf(a3) * test function name flag - S02:0000D01C: 4A 2B 05 DF -F00:3215 BEQ.s LAB_1D48 * if not FN or FN variable continue - S02:0000D020: 67 0E -F00:3216 -F00:3217 BPL.s LAB_1D49 * if FN variable go find or create it - S02:0000D022: 6A 14 -F00:3218 -F00:3219 * else was FN name -F00:3220 MOVE.l Varname(a3),d0 * get whole function name - S02:0000D024: 20 2B 04 6A -F00:3221 MOVEQ #8,d1 * set step to next function size -4 - S02:0000D028: 72 08 -F00:3222 LEA Sfncl(a3),a0 * get pointer to start of functions - S02:0000D02A: 41 EB 04 32 -F00:3223 BRA.s LAB_1D4B * go find function - S02:0000D02E: 60 1C -F00:3224 -F00:3225 LAB_1D48 -F00:3226 SUB.b #'(',d0 * subtract "(" - S02:0000D030: 90 3C 00 28 -F00:3227 BEQ LAB_1E17 * if "(" go find, or make, array - S02:0000D034: 67 00 00 F4 -F00:3228 -F00:3229 * either find or create var -F00:3230 * var name (1st four characters only!) is in Varname -F00:3231 -F00:3232 * variable name wasn't var( .. so look for -F00:3233 * plain variable -F00:3234 LAB_1D49 -F00:3235 MOVE.l Varname(a3),d0 * get whole variable name - S02:0000D038: 20 2B 04 6A -F00:3236 LAB_1D4A -F00:3237 MOVEQ #4,d1 * set step to next variable size -4 - S02:0000D03C: 72 04 -F00:3238 LEA Svarl(a3),a0 * get pointer to start of variables - S02:0000D03E: 41 EB 04 36 -F00:3239 -F00:3240 BTST.l #23,d0 * test if string name - S02:0000D042: 08 00 00 17 -F00:3241 BEQ.s LAB_1D4B * branch if not - S02:0000D046: 67 04 -F00:3242 -F00:3243 ADDQ.w #2,d1 * 6 bytes per string entry - S02:0000D048: 54 41 -F00:3244 ADDQ.w #(Sstrl-Svarl),a0 * move to string area - S02:0000D04A: 58 48 -F00:3245 -F00:3246 LAB_1D4B -F00:3247 MOVEA.l 4(a0),a1 * get end address - S02:0000D04C: 22 68 00 04 -F00:3248 MOVEA.l (a0),a0 * get start address - S02:0000D050: 20 50 -F00:3249 BRA.s LAB_1D5E * enter loop at exit check - S02:0000D052: 60 06 -F00:3250 -F00:3251 LAB_1D5D -F00:3252 CMP.l (a0)+,d0 * compare this variable with name - S02:0000D054: B0 98 -F00:3253 BEQ.s LAB_1DD7 * branch if match (found var) - S02:0000D056: 67 76 -F00:3254 -F00:3255 ADDA.l d1,a0 * add offset to next variable - S02:0000D058: D1 C1 -F00:3256 LAB_1D5E -F00:3257 CMPA.l a1,a0 * compare address with variable space end - S02:0000D05A: B1 C9 -F00:3258 BNE.s LAB_1D5D * if not end go check next - S02:0000D05C: 66 F6 -F00:3259 -F00:3260 TST.b Sufnxf(a3) * is it a function or function variable - S02:0000D05E: 4A 2B 05 DF -F00:3261 BNE.s LAB_1D94 * if was go do DEF or function variable - S02:0000D062: 66 0A -F00:3262 -F00:3263 * reached end of variable mem without match -F00:3264 * ... so create new variable, possibly -F00:3265 -F00:3266 LEA LAB_FVAR(pc),a2 * get the address of the create if doesn't - S02:0000D064: 45 FA FF 60 -F00:3267 * exist call to LAB_GVAR -F00:3268 CMPA.l (sp),a2 * compare the return address with expected - S02:0000D068: B5 D7 -F00:3269 BNE LAB_UVER * if not create go do error or return null - S02:0000D06A: 66 00 F0 CE -F00:3270 -F00:3271 * this will only branch if the call to LAB_GVAR wasn't from LAB_SVAR -F00:3272 -F00:3273 LAB_1D94 -F00:3274 BTST.b #0,Sufnxf(a3) * test function search flag - S02:0000D06E: 08 2B 00 00 05 DF -F00:3275 BNE LAB_UFER * if not doing DEF then go do undefined - S02:0000D074: 66 00 F0 CC -F00:3276 * function error -F00:3277 -F00:3278 * else create new variable/function -F00:3279 LAB_1D98 -F00:3280 MOVEA.l Earryl(a3),a2 * get end of block to move - S02:0000D078: 24 6B 04 42 -F00:3281 MOVE.l a2,d2 * copy end of block to move - S02:0000D07C: 24 0A -F00:3282 SUB.l a1,d2 * calculate block to move size - S02:0000D07E: 94 89 -F00:3283 -F00:3284 MOVEA.l a2,a0 * copy end of block to move - S02:0000D080: 20 4A -F00:3285 ADDQ.l #4,d1 * space for one variable/function + name - S02:0000D082: 58 81 -F00:3286 ADDA.l d1,a2 * add space for one variable/function - S02:0000D084: D5 C1 -F00:3287 MOVE.l a2,Earryl(a3) * set new array mem end - S02:0000D086: 27 4A 04 42 -F00:3288 LSR.l #1,d2 * /2 for word copy - S02:0000D08A: E2 8A -F00:3289 BEQ.s LAB_1DAF * skip move if zero length block - S02:0000D08C: 67 12 -F00:3290 -F00:3291 SUBQ.l #1,d2 * -1 for DFB loop - S02:0000D08E: 53 82 -F00:3292 SWAP d2 * swap high word to low word - S02:0000D090: 48 42 -F00:3293 LAB_1DAC -F00:3294 SWAP d2 * swap high word to low word - S02:0000D092: 48 42 -F00:3295 LAB_1DAE -F00:3296 MOVE.w -(a0),-(a2) * copy word - S02:0000D094: 35 20 -F00:3297 DBF d2,LAB_1DAE * loop until done - S02:0000D096: 51 CA FF FC -F00:3298 -F00:3299 SWAP d2 * swap high word to low word - S02:0000D09A: 48 42 -F00:3300 DBF d2,LAB_1DAC * decrement high count and loop until done - S02:0000D09C: 51 CA FF F4 -F00:3301 -F00:3302 * get here after creating either a function, variable or string -F00:3303 * if function set variables start, string start, array start -F00:3304 * if variable set string start, array start -F00:3305 * if string set array start -F00:3306 -F00:3307 LAB_1DAF -F00:3308 TST.b Sufnxf(a3) * was it function - S02:0000D0A0: 4A 2B 05 DF -F00:3309 BMI.s LAB_1DB0 * branch if was FN - S02:0000D0A4: 6B 08 -F00:3310 -F00:3311 BTST.l #23,d0 * was it string - S02:0000D0A6: 08 00 00 17 -F00:3312 BNE.s LAB_1DB2 * branch if string - S02:0000D0AA: 66 0A -F00:3313 -F00:3314 BRA.s LAB_1DB1 * branch if was plain variable - S02:0000D0AC: 60 04 -F00:3315 -F00:3316 LAB_1DB0 -F00:3317 ADD.l d1,Svarl(a3) * set new variable memory start - S02:0000D0AE: D3 AB 04 36 -F00:3318 LAB_1DB1 -F00:3319 ADD.l d1,Sstrl(a3) * set new start of strings - S02:0000D0B2: D3 AB 04 3A -F00:3320 LAB_1DB2 -F00:3321 ADD.l d1,Sarryl(a3) * set new array memory start - S02:0000D0B6: D3 AB 04 3E -F00:3322 MOVE.l d0,(a0)+ * save variable/function name - S02:0000D0BA: 20 C0 -F00:3323 MOVE.l #$00,(a0) * initialise variable - S02:0000D0BC: 20 BC 00 00 00 00 -F00:3324 BTST.l #23,d0 * was it string - S02:0000D0C2: 08 00 00 17 -F00:3325 BEQ.s LAB_1DD7 * branch if not string - S02:0000D0C6: 67 06 -F00:3326 -F00:3327 MOVE.w #$00,4(a0) * else initialise string length - S02:0000D0C8: 31 7C 00 00 00 04 -F00:3328 -F00:3329 * found a match for var ((Vrschl) = ptr) -F00:3330 LAB_1DD7 -F00:3331 MOVE.l d0,d1 * ........ $....... &....... ........ - S02:0000D0CE: 22 00 -F00:3332 ADD.l d1,d1 * .......$ .......& ........ .......0 - S02:0000D0D0: D2 81 -F00:3333 SWAP d1 * ........ .......0 .......$ .......& - S02:0000D0D2: 48 41 -F00:3334 ROR.b #1,d1 * ........ .......0 .......$ &....... - S02:0000D0D4: E2 19 -F00:3335 LSR.w #1,d1 * ........ .......0 0....... $&.....­. - S02:0000D0D6: E2 49 -F00:3336 AND.b #$C0,d1 * mask the type bits - S02:0000D0D8: C2 3C 00 C0 -F00:3337 MOVE.b d1,Dtypef(a3) * save the data type - S02:0000D0DC: 17 41 05 B5 -F00:3338 -F00:3339 MOVE.b #$00,Sufnxf(a3) * clear FN flag byte - S02:0000D0E0: 17 7C 00 00 05 DF -F00:3340 -F00:3341 * if you want a non existant variable to return a null value then set the novar -F00:3342 * value at the top of this file to some non zero value -F00:3343 -F00:3344 ifne novar -F00:3345 -F00:3346 MOVEQ #-1,d0 * return variable found -F00:3347 -F00:3348 endc -F00:3349 -F00:3350 RTS - S02:0000D0E6: 4E 75 -F00:3351 -F00:3352 -F00:3353 ************************************************************************************* -F00:3354 * -F00:3355 * set-up array pointer, d0, to first element in array -F00:3356 * set d0 to (a0)+2*(Dimcnt)+$0A -F00:3357 -F00:3358 LAB_1DE6 -F00:3359 MOVEQ #5,d0 * set d0 to 5 (*2 = 10, later) - S02:0000D0E8: 70 05 -F00:3360 ADD.b Dimcnt(a3),d0 * add # of dimensions (1, 2 or 3) - S02:0000D0EA: D0 2B 05 DB -F00:3361 ADD.l d0,d0 * *2 (bytes per dimension size) - S02:0000D0EE: D0 80 -F00:3362 ADD.l a0,d0 * add array start pointer - S02:0000D0F0: D0 88 -F00:3363 RTS - S02:0000D0F2: 4E 75 -F00:3364 -F00:3365 -F00:3366 ************************************************************************************* -F00:3367 * -F00:3368 * evaluate unsigned integer expression -F00:3369 -F00:3370 LAB_EVIN -F00:3371 BSR LAB_IGBY * increment & scan memory - S02:0000D0F4: 61 00 FC C4 -F00:3372 BSR LAB_EVNM * evaluate expression & check is numeric, - S02:0000D0F8: 61 00 FB 48 -F00:3373 * else do type mismatch -F00:3374 -F00:3375 -F00:3376 ************************************************************************************* -F00:3377 * -F00:3378 * evaluate positive integer expression, result in d0 and Itemp -F00:3379 -F00:3380 LAB_EVPI -F00:3381 TST.b FAC1_s(a3) * test FAC1 sign (b7) - S02:0000D0FC: 4A 2B 05 95 -F00:3382 BMI LAB_FCER * do function call error if -ve - S02:0000D100: 6B 00 F0 70 -F00:3383 -F00:3384 -F00:3385 ************************************************************************************* -F00:3386 * -F00:3387 * evaluate integer expression, no sign check -F00:3388 * result in d0 and Itemp, exit with flags set correctly -F00:3389 -F00:3390 LAB_EVIR -F00:3391 CMPI.b #$A0,FAC1_e(a3) * compare exponent with exponent = 2^32 (n>2^31) - S02:0000D104: 0C 2B 00 A0 05 94 -F00:3392 BCS LAB_2831 * convert FAC1 floating to fixed - S02:0000D10A: 65 00 0B 58 -F00:3393 * result in d0 and Itemp -F00:3394 BNE LAB_FCER * if > do function call error, then warm start - S02:0000D10E: 66 00 F0 62 -F00:3395 -F00:3396 TST.b FAC1_s(a3) * test sign of FAC1 - S02:0000D112: 4A 2B 05 95 -F00:3397 BPL LAB_2831 * if +ve then ok - S02:0000D116: 6A 00 0B 4C -F00:3398 -F00:3399 MOVE.l FAC1_m(a3),d0 * get mantissa - S02:0000D11A: 20 2B 05 90 -F00:3400 NEG.l d0 * do -d0 - S02:0000D11E: 44 80 -F00:3401 BVC LAB_FCER * if not $80000000 do FC error, then warm start - S02:0000D120: 68 00 F0 50 -F00:3402 -F00:3403 MOVE.l d0,Itemp(a3) * else just set it - S02:0000D124: 27 40 04 2A -F00:3404 RTS - S02:0000D128: 4E 75 -F00:3405 -F00:3406 -F00:3407 ************************************************************************************* -F00:3408 * -F00:3409 * find or make array -F00:3410 -F00:3411 LAB_1E17 -F00:3412 MOVE.w Defdim(a3),-(sp) * get DIM flag and data type flag (word in mem) - S02:0000D12A: 3F 2B 05 B4 -F00:3413 MOVEQ #0,d1 * clear dimensions count - S02:0000D12E: 72 00 -F00:3414 -F00:3415 * now get the array dimension(s) and stack it (them) before the data type and DIM flag -F00:3416 -F00:3417 LAB_1E1F -F00:3418 MOVE.w d1,-(sp) * save dimensions count - S02:0000D130: 3F 01 -F00:3419 MOVE.l Varname(a3),-(sp) * save variable name - S02:0000D132: 2F 2B 04 6A -F00:3420 BSR.s LAB_EVIN * evaluate integer expression - S02:0000D136: 61 BC -F00:3421 -F00:3422 SWAP d0 * swap high word to low word - S02:0000D138: 48 40 -F00:3423 TST.w d0 * test swapped high word - S02:0000D13A: 4A 40 -F00:3424 BNE LAB_ABER * if too big do array bounds error - S02:0000D13C: 66 00 F0 24 -F00:3425 -F00:3426 MOVE.l (sp)+,Varname(a3) * restore variable name - S02:0000D140: 27 5F 04 6A -F00:3427 MOVE.w (sp)+,d1 * restore dimensions count - S02:0000D144: 32 1F -F00:3428 MOVE.w (sp)+,d0 * restore DIM and data type flags - S02:0000D146: 30 1F -F00:3429 MOVE.w Itemp+2(a3),-(sp) * stack this dimension size - S02:0000D148: 3F 2B 04 2C -F00:3430 MOVE.w d0,-(sp) * save DIM and data type flags - S02:0000D14C: 3F 00 -F00:3431 ADDQ.w #1,d1 * increment dimensions count - S02:0000D14E: 52 41 -F00:3432 BSR LAB_GBYT * scan memory - S02:0000D150: 61 00 FC 6A -F00:3433 CMP.b #$2C,d0 * compare with "," - S02:0000D154: B0 3C 00 2C -F00:3434 BEQ.s LAB_1E1F * if found go do next dimension - S02:0000D158: 67 D6 -F00:3435 -F00:3436 MOVE.b d1,Dimcnt(a3) * store dimensions count - S02:0000D15A: 17 41 05 DB -F00:3437 BSR LAB_1BFB * scan for ")", else do syntax error/warm start - S02:0000D15E: 61 00 FC 48 -F00:3438 MOVE.w (sp)+,Defdim(a3) * restore DIM and data type flags (word in mem) - S02:0000D162: 37 5F 05 B4 -F00:3439 MOVEA.l Sarryl(a3),a0 * get array mem start - S02:0000D166: 20 6B 04 3E -F00:3440 -F00:3441 * now check to see if we are at the end of array memory (we would be if there were -F00:3442 * no arrays). -F00:3443 -F00:3444 LAB_1E5C -F00:3445 MOVE.l a0,Astrtl(a3) * save as array start pointer - S02:0000D16A: 27 48 05 AC -F00:3446 CMPA.l Earryl(a3),a0 * compare with array mem end - S02:0000D16E: B1 EB 04 42 -F00:3447 BEQ.s LAB_1EA1 * go build array if not found - S02:0000D172: 67 2E -F00:3448 -F00:3449 * search for array -F00:3450 MOVE.l (a0),d0 * get this array name - S02:0000D174: 20 10 -F00:3451 CMP.l Varname(a3),d0 * compare with array name - S02:0000D176: B0 AB 04 6A -F00:3452 BEQ.s LAB_1E8D * array found so branch - S02:0000D17A: 67 0A -F00:3453 -F00:3454 * no match -F00:3455 MOVEA.l 4(a0),a0 * get this array size - S02:0000D17C: 20 68 00 04 -F00:3456 ADDA.l Astrtl(a3),a0 * add to array start pointer - S02:0000D180: D1 EB 05 AC -F00:3457 BRA.s LAB_1E5C * go check next array - S02:0000D184: 60 E4 -F00:3458 -F00:3459 * found array, are we trying to dimension it? -F00:3460 LAB_1E8D -F00:3461 TST.b Defdim(a3) * are we trying to dimension it? - S02:0000D186: 4A 2B 05 B4 -F00:3462 BNE LAB_DDER * if so do double dimension error/warm start - S02:0000D18A: 66 00 EF D2 -F00:3463 -F00:3464 * found the array and we're not dimensioning it so we must find an element in it -F00:3465 -F00:3466 BSR LAB_1DE6 * set data pointer, d0, to the first element - S02:0000D18E: 61 00 FF 58 -F00:3467 * in the array -F00:3468 ADDQ.w #8,a0 * index to dimension count - S02:0000D192: 50 48 -F00:3469 MOVE.w (a0)+,d0 * get no of dimensions - S02:0000D194: 30 18 -F00:3470 CMP.b Dimcnt(a3),d0 * compare with dimensions count - S02:0000D196: B0 2B 05 DB -F00:3471 BEQ LAB_1F28 * found array so go get element - S02:0000D19A: 67 00 00 94 -F00:3472 -F00:3473 BRA LAB_WDER * else wrong so do "Wrong dimensions" error - S02:0000D19E: 60 00 EF 92 -F00:3474 -F00:3475 * array not found, so possibly build it -F00:3476 LAB_1EA1 -F00:3477 TST.b Defdim(a3) * test the default DIM flag - S02:0000D1A2: 4A 2B 05 B4 -F00:3478 BEQ LAB_UDER * if default flag is clear then we are not - S02:0000D1A6: 67 00 EF 8E -F00:3479 * explicitly dimensioning an array so go -F00:3480 * do an "Undimensioned array" error -F00:3481 -F00:3482 BSR LAB_1DE6 * set data pointer, d0, to the first element - S02:0000D1AA: 61 00 FF 3C -F00:3483 * in the array -F00:3484 MOVE.l Varname(a3),d0 * get array name - S02:0000D1AE: 20 2B 04 6A -F00:3485 MOVE.l d0,(a0)+ * save array name - S02:0000D1B2: 20 C0 -F00:3486 MOVEQ #4,d1 * set 4 bytes per element - S02:0000D1B4: 72 04 -F00:3487 BTST.l #23,d0 * test if string array - S02:0000D1B6: 08 00 00 17 -F00:3488 BEQ.s LAB_1EDF * branch if not string - S02:0000D1BA: 67 02 -F00:3489 -F00:3490 MOVEQ #6,d1 * else 6 bytes per element - S02:0000D1BC: 72 06 -F00:3491 LAB_1EDF -F00:3492 MOVE.l d1,Asptl(a3) * set array data size (bytes per element) - S02:0000D1BE: 27 41 05 A8 -F00:3493 MOVE.b Dimcnt(a3),d1 * get dimensions count - S02:0000D1C2: 12 2B 05 DB -F00:3494 ADDQ.w #4,a0 * skip the array size now (don't know it yet!) - S02:0000D1C6: 58 48 -F00:3495 MOVE.w d1,(a0)+ * set array's dimensions count - S02:0000D1C8: 30 C1 -F00:3496 -F00:3497 * now calculate the array data space size -F00:3498 -F00:3499 LAB_1EC0 -F00:3500 -F00:3501 * If you want arrays to dimension themselves by default then comment out the test -F00:3502 * above and uncomment the next three code lines and the label LAB_1ED0 -F00:3503 -F00:3504 * MOVE.w #$0A,d1 * set default dimension value, allow 0 to 9 -F00:3505 * TST.b Defdim(a3) * test default DIM flag -F00:3506 * BNE.s LAB_1ED0 * branch if b6 of Defdim is clear -F00:3507 -F00:3508 MOVE.w (sp)+,d1 * get dimension size - S02:0000D1CA: 32 1F -F00:3509 *LAB_1ED0 -F00:3510 MOVE.w d1,(a0)+ * save to array header - S02:0000D1CC: 30 C1 -F00:3511 BSR LAB_1F7C * do this dimension size+1 * array size - S02:0000D1CE: 61 00 00 AE -F00:3512 * (d1+1)*(Asptl), result in d0 -F00:3513 MOVE.l d0,Asptl(a3) * save array data size - S02:0000D1D2: 27 40 05 A8 -F00:3514 SUBQ.b #1,Dimcnt(a3) * decrement dimensions count - S02:0000D1D6: 53 2B 05 DB -F00:3515 BNE.s LAB_1EC0 * loop while not = 0 - S02:0000D1DA: 66 EE -F00:3516 -F00:3517 ADDA.l Asptl(a3),a0 * add size to first element address - S02:0000D1DC: D1 EB 05 A8 -F00:3518 BCS LAB_OMER * if overflow go do "Out of memory" error - S02:0000D1E0: 65 00 EF 88 -F00:3519 -F00:3520 CMPA.l Sstorl(a3),a0 * compare with bottom of string memory - S02:0000D1E4: B1 EB 04 46 -F00:3521 BCS.s LAB_1ED6 * branch if less (is ok) - S02:0000D1E8: 65 0C -F00:3522 -F00:3523 BSR LAB_GARB * do garbage collection routine - S02:0000D1EA: 61 00 02 8E -F00:3524 CMPA.l Sstorl(a3),a0 * compare with bottom of string memory - S02:0000D1EE: B1 EB 04 46 -F00:3525 BCC LAB_OMER * if Sstorl <= a0 do "Out of memory" - S02:0000D1F2: 64 00 EF 76 -F00:3526 * error then warm start -F00:3527 -F00:3528 LAB_1ED6 * ok exit, carry set -F00:3529 MOVE.l a0,Earryl(a3) * save array mem end - S02:0000D1F6: 27 48 04 42 -F00:3530 MOVEQ #0,d0 * zero d0 - S02:0000D1FA: 70 00 -F00:3531 MOVE.l Asptl(a3),d1 * get size in bytes - S02:0000D1FC: 22 2B 05 A8 -F00:3532 LSR.l #1,d1 * /2 for word fill (may be odd # words) - S02:0000D200: E2 89 -F00:3533 SUBQ.w #1,d1 * adjust for DBF loop - S02:0000D202: 53 41 -F00:3534 LAB_1ED8 -F00:3535 MOVE.w d0,-(a0) * decrement pointer and clear word - S02:0000D204: 31 00 -F00:3536 DBF d1,LAB_1ED8 * decrement & loop until low word done - S02:0000D206: 51 C9 FF FC -F00:3537 -F00:3538 SWAP d1 * swap words - S02:0000D20A: 48 41 -F00:3539 TST.w d1 * test high word - S02:0000D20C: 4A 41 -F00:3540 BEQ.s LAB_1F07 * exit if done - S02:0000D20E: 67 06 -F00:3541 -F00:3542 SUBQ.w #1,d1 * decrement low (high) word - S02:0000D210: 53 41 -F00:3543 SWAP d1 * swap back - S02:0000D212: 48 41 -F00:3544 BRA.s LAB_1ED8 * go do a whole block - S02:0000D214: 60 EE -F00:3545 -F00:3546 * now we need to calculate the array size by doing Earryl - Astrtl -F00:3547 -F00:3548 LAB_1F07 -F00:3549 MOVEA.l Astrtl(a3),a0 * get for calculation and as pointer - S02:0000D216: 20 6B 05 AC -F00:3550 MOVE.l Earryl(a3),d0 * get array memory end - S02:0000D21A: 20 2B 04 42 -F00:3551 SUB.l a0,d0 * calculate array size - S02:0000D21E: 90 88 -F00:3552 MOVE.l d0,4(a0) * save size to array - S02:0000D220: 21 40 00 04 -F00:3553 TST.b Defdim(a3) * test default DIM flag - S02:0000D224: 4A 2B 05 B4 -F00:3554 BNE.s RTS_011 * exit (RET) if this was a DIM command - S02:0000D228: 66 52 -F00:3555 -F00:3556 * else, find element -F00:3557 ADDQ.w #8,a0 * index to dimension count - S02:0000D22A: 50 48 -F00:3558 MOVE.w (a0)+,Dimcnt(a3) * get array's dimension count - S02:0000D22C: 37 58 05 DB -F00:3559 -F00:3560 * we have found, or built, the array. now we need to find the element -F00:3561 -F00:3562 LAB_1F28 -F00:3563 MOVEQ #0,d0 * clear first result - S02:0000D230: 70 00 -F00:3564 MOVE.l d0,Asptl(a3) * clear array data pointer - S02:0000D232: 27 40 05 A8 -F00:3565 -F00:3566 * compare nth dimension bound (a0) with nth index (sp)+ -F00:3567 * if greater do array bounds error -F00:3568 -F00:3569 LAB_1F2C -F00:3570 MOVE.w (a0)+,d1 * get nth dimension bound - S02:0000D236: 32 18 -F00:3571 CMP.w (sp),d1 * compare nth index with nth dimension bound - S02:0000D238: B2 57 -F00:3572 BCS LAB_ABER * if d1 less or = do array bounds error - S02:0000D23A: 65 00 EF 26 -F00:3573 -F00:3574 * now do pointer = pointer * nth dimension + nth index -F00:3575 -F00:3576 TST.l d0 * test pointer - S02:0000D23E: 4A 80 -F00:3577 BEQ.s LAB_1F5A * skip multiply if last result = null - S02:0000D240: 67 02 -F00:3578 -F00:3579 BSR.s LAB_1F7C * do this dimension size+1 * array size - S02:0000D242: 61 3A -F00:3580 LAB_1F5A -F00:3581 MOVEQ #0,d1 * clear longword - S02:0000D244: 72 00 -F00:3582 MOVE.w (sp)+,d1 * get nth dimension index - S02:0000D246: 32 1F -F00:3583 ADD.l d1,d0 * add index to size - S02:0000D248: D0 81 -F00:3584 MOVE.l d0,Asptl(a3) * save array data pointer - S02:0000D24A: 27 40 05 A8 -F00:3585 -F00:3586 SUBQ.b #1,Dimcnt(a3) * decrement dimensions count - S02:0000D24E: 53 2B 05 DB -F00:3587 BNE.s LAB_1F2C * loop if dimensions still to do - S02:0000D252: 66 E2 -F00:3588 -F00:3589 MOVE.b #0,Dtypef(a3) * set data type to float - S02:0000D254: 17 7C 00 00 05 B5 -F00:3590 MOVEQ #3,d1 * set for numeric array - S02:0000D25A: 72 03 -F00:3591 TST.b Varname+1(a3) * test if string array - S02:0000D25C: 4A 2B 04 6B -F00:3592 BPL.s LAB_1F6A * branch if not string - S02:0000D260: 6A 0A -F00:3593 -F00:3594 MOVEQ #5,d1 * else set for string array - S02:0000D262: 72 05 -F00:3595 MOVE.b #$80,Dtypef(a3) * and set data type to string - S02:0000D264: 17 7C 00 80 05 B5 -F00:3596 BRA.s LAB_1F6B * skip integer test - S02:0000D26A: 60 0C -F00:3597 -F00:3598 LAB_1F6A -F00:3599 TST.b Varname+2(a3) * test if integer array - S02:0000D26C: 4A 2B 04 6C -F00:3600 BPL.s LAB_1F6B * branch if not integer - S02:0000D270: 6A 06 -F00:3601 -F00:3602 MOVE.b #$40,Dtypef(a3) * else set data type to integer - S02:0000D272: 17 7C 00 40 05 B5 -F00:3603 LAB_1F6B -F00:3604 BSR.s LAB_1F7C * do element size (d1) * array size (Asptl) - S02:0000D278: 61 04 -F00:3605 ADDA.l d0,a0 * add array data start pointer - S02:0000D27A: D1 C0 -F00:3606 RTS_011 -F00:3607 RTS - S02:0000D27C: 4E 75 -F00:3608 -F00:3609 -F00:3610 ************************************************************************************* -F00:3611 * -F00:3612 * do this dimension size (d1) * array data size (Asptl) -F00:3613 -F00:3614 * do a 16 x 32 bit multiply -F00:3615 * d1 holds the 16 bit multiplier -F00:3616 * Asptl holds the 32 bit multiplicand -F00:3617 -F00:3618 * d0 bbbb bbbb -F00:3619 * d1 0000 aaaa -F00:3620 * ---------- -F00:3621 * d0 rrrr rrrr -F00:3622 -F00:3623 LAB_1F7C -F00:3624 MOVE.l Asptl(a3),d0 * get result - S02:0000D27E: 20 2B 05 A8 -F00:3625 MOVE.l d0,d2 * copy it - S02:0000D282: 24 00 -F00:3626 SWAP d2 * shift high word to low word - S02:0000D284: 48 42 -F00:3627 MULU.w d1,d0 * d1 * low word = low result - S02:0000D286: C0 C1 -F00:3628 MULU.w d1,d2 * d1 * high word = high result - S02:0000D288: C4 C1 -F00:3629 SWAP d2 * align words for test - S02:0000D28A: 48 42 -F00:3630 TST.w d2 * must be zero - S02:0000D28C: 4A 42 -F00:3631 BNE LAB_OMER * if overflow go do "Out of memory" error - S02:0000D28E: 66 00 EE DA -F00:3632 -F00:3633 ADD.l d2,d0 * calculate result - S02:0000D292: D0 82 -F00:3634 BCS LAB_OMER * if overflow go do "Out of memory" error - S02:0000D294: 65 00 EE D4 -F00:3635 -F00:3636 ADD.l Asptl(a3),d0 * add original - S02:0000D298: D0 AB 05 A8 -F00:3637 BCS LAB_OMER * if overflow go do "Out of memory" error - S02:0000D29C: 65 00 EE CC -F00:3638 -F00:3639 RTS - S02:0000D2A0: 4E 75 -F00:3640 -F00:3641 -F00:3642 ************************************************************************************* -F00:3643 * -F00:3644 * perform FRE() -F00:3645 -F00:3646 LAB_FRE -F00:3647 TST.b Dtypef(a3) * test data type, $80=string, $40=integer, - S02:0000D2A2: 4A 2B 05 B5 -F00:3648 * $00=float -F00:3649 BPL.s LAB_1FB4 * branch if numeric - S02:0000D2A6: 6A 04 -F00:3650 -F00:3651 BSR LAB_22B6 * pop string off descriptor stack, or from - S02:0000D2A8: 61 00 03 10 -F00:3652 * top of string space, returns d0 = length, -F00:3653 * a0 = pointer -F00:3654 -F00:3655 * FRE(n) was numeric so do this -F00:3656 LAB_1FB4 -F00:3657 BSR LAB_GARB * go do garbage collection - S02:0000D2AC: 61 00 01 CC -F00:3658 MOVE.l Sstorl(a3),d0 * get bottom of string space - S02:0000D2B0: 20 2B 04 46 -F00:3659 SUB.l Earryl(a3),d0 * subtract array mem end - S02:0000D2B4: 90 AB 04 42 -F00:3660 -F00:3661 -F00:3662 ************************************************************************************* -F00:3663 * -F00:3664 * convert d0 to signed longword in FAC1 -F00:3665 -F00:3666 LAB_AYFC -F00:3667 MOVE.b #$00,Dtypef(a3) * clear data type, $80=string, $40=integer, - S02:0000D2B8: 17 7C 00 00 05 B5 -F00:3668 * $00=float -F00:3669 MOVE.w #$A000,FAC1_e(a3) * set FAC1 exponent and clear sign (b7) - S02:0000D2BE: 37 7C A0 00 05 94 -F00:3670 MOVE.l d0,FAC1_m(a3) * save FAC1 mantissa - S02:0000D2C4: 27 40 05 90 -F00:3671 BPL LAB_24D0 * convert if +ve - S02:0000D2C8: 6A 00 06 36 -F00:3672 -F00:3673 ORI.b #1,CCR * else set carry - S02:0000D2CC: 00 3C 00 01 -F00:3674 BRA LAB_24D0 * do +/- (carry is sign) & normalise FAC1 - S02:0000D2D0: 60 00 06 2E -F00:3675 -F00:3676 -F00:3677 ************************************************************************************* -F00:3678 * -F00:3679 * remember if the line length is zero (infinite line) then POS(n) will return -F00:3680 * position MOD tabsize -F00:3681 -F00:3682 * perform POS() -F00:3683 -F00:3684 LAB_POS -F00:3685 MOVE.b TPos(a3),d0 * get terminal position - S02:0000D2D4: 10 2B 05 E5 -F00:3686 -F00:3687 * convert d0 to unsigned byte in FAC1 -F00:3688 -F00:3689 LAB_1FD0 -F00:3690 AND.l #$FF,d0 * clear high bits - S02:0000D2D8: C0 BC 00 00 00 FF -F00:3691 BRA.s LAB_AYFC * convert d0 to signed longword in FAC1 & RET - S02:0000D2DE: 60 D8 -F00:3692 -F00:3693 * check not direct (used by DEF and INPUT) -F00:3694 -F00:3695 LAB_CKRN -F00:3696 TST.b Clinel(a3) * test current line # - S02:0000D2E0: 4A 2B 04 52 -F00:3697 BMI LAB_IDER * if -ve go do illegal direct error then warm - S02:0000D2E4: 6B 00 EE 70 -F00:3698 * start -F00:3699 -F00:3700 RTS * can continue so return - S02:0000D2E8: 4E 75 -F00:3701 -F00:3702 -F00:3703 ************************************************************************************* -F00:3704 * -F00:3705 * perform DEF -F00:3706 -F00:3707 LAB_DEF -F00:3708 MOVEQ #TK_FN-$100,d0 * get FN token - S02:0000D2EA: 70 AB -F00:3709 BSR LAB_SCCA * scan for CHR$(d0), else syntax error and - S02:0000D2EC: 61 00 FA C4 -F00:3710 * warm start -F00:3711 * return character after d0 -F00:3712 MOVE.b #$80,Sufnxf(a3) * set FN flag bit - S02:0000D2F0: 17 7C 00 80 05 DF -F00:3713 BSR LAB_1D12 * get FN name - S02:0000D2F6: 61 00 FC DA -F00:3714 MOVE.l a0,func_l(a3) * save function pointer - S02:0000D2FA: 27 48 05 B0 -F00:3715 -F00:3716 BSR.s LAB_CKRN * check not direct (back here if ok) - S02:0000D2FE: 61 E0 -F00:3717 CMP.b #$28,(a5)+ * check next byte is "(" and increment - S02:0000D300: 0C 1D 00 28 -F00:3718 BNE LAB_SNER * else do syntax error/warm start - S02:0000D304: 66 00 EE 78 -F00:3719 -F00:3720 MOVE.b #$7E,Sufnxf(a3) * set FN variable flag bits - S02:0000D308: 17 7C 00 7E 05 DF -F00:3721 BSR LAB_SVAR * search for or create a variable - S02:0000D30E: 61 00 FC B4 -F00:3722 * return the variable address in a0 -F00:3723 BSR LAB_1BFB * scan for ")", else do syntax error/warm start - S02:0000D312: 61 00 FA 94 -F00:3724 MOVEQ #TK_EQUAL-$100,d0 * = token - S02:0000D316: 70 BD -F00:3725 BSR LAB_SCCA * scan for CHR$(A), else syntax error/warm start - S02:0000D318: 61 00 FA 98 -F00:3726 * return character after d0 -F00:3727 MOVE.l Varname(a3),-(sp) * push current variable name - S02:0000D31C: 2F 2B 04 6A -F00:3728 MOVE.l a5,-(sp) * push BASIC execute pointer - S02:0000D320: 2F 0D -F00:3729 BSR LAB_DATA * go perform DATA, find end of DEF FN statement - S02:0000D322: 61 00 F4 1C -F00:3730 MOVEA.l func_l(a3),a0 * get the function pointer - S02:0000D326: 20 6B 05 B0 -F00:3731 MOVE.l (sp)+,(a0) * save BASIC execute pointer to function - S02:0000D32A: 20 9F -F00:3732 MOVE.l (sp)+,4(a0) * save current variable name to function - S02:0000D32C: 21 5F 00 04 -F00:3733 RTS - S02:0000D330: 4E 75 -F00:3734 -F00:3735 -F00:3736 ************************************************************************************* -F00:3737 * -F00:3738 * evaluate FNx -F00:3739 -F00:3740 LAB_201E -F00:3741 MOVE.b #$81,Sufnxf(a3) * set FN flag (find not create) - S02:0000D332: 17 7C 00 81 05 DF -F00:3742 BSR LAB_IGBY * increment & scan memory - S02:0000D338: 61 00 FA 80 -F00:3743 BSR LAB_1D12 * get FN name - S02:0000D33C: 61 00 FC 94 -F00:3744 MOVE.b Dtypef(a3),-(sp) * push data type flag (function type) - S02:0000D340: 1F 2B 05 B5 -F00:3745 MOVE.l a0,-(sp) * push function pointer - S02:0000D344: 2F 08 -F00:3746 CMP.b #$28,(a5) * check next byte is "(", no increment - S02:0000D346: 0C 15 00 28 -F00:3747 BNE LAB_SNER * else do syntax error/warm start - S02:0000D34A: 66 00 EE 32 -F00:3748 -F00:3749 BSR LAB_1BF7 * evaluate expression within parentheses - S02:0000D34E: 61 00 FA 54 -F00:3750 MOVEA.l (sp)+,a0 * pop function pointer - S02:0000D352: 20 5F -F00:3751 MOVE.l a0,func_l(a3) * set function pointer - S02:0000D354: 27 48 05 B0 -F00:3752 MOVE.b Dtypef(a3),-(sp) * push data type flag (function expression type) - S02:0000D358: 1F 2B 05 B5 -F00:3753 -F00:3754 MOVE.l 4(a0),d0 * get function variable name - S02:0000D35C: 20 28 00 04 -F00:3755 BSR LAB_1D4A * go find function variable (already created) - S02:0000D360: 61 00 FC DA -F00:3756 -F00:3757 * now check type match for variable -F00:3758 MOVE.b (sp)+,d0 * pop data type flag (function expression type) - S02:0000D364: 10 1F -F00:3759 ROL.b #1,d0 * set carry if type = string - S02:0000D366: E3 18 -F00:3760 BSR LAB_CKTM * type match check, set C for string - S02:0000D368: 61 00 F8 DC -F00:3761 -F00:3762 * now stack the function variable value before -F00:3763 * use -F00:3764 BEQ.s LAB_2043 * branch if not string - S02:0000D36C: 67 12 -F00:3765 -F00:3766 LEA des_sk_e(a3),a1 * get string stack pointer max+1 - S02:0000D36E: 43 EB 04 76 -F00:3767 CMPA.l a1,a4 * compare string stack pointer with max+1 - S02:0000D372: B9 C9 -F00:3768 BEQ LAB_SCER * if no space on the stack go do string too - S02:0000D374: 67 00 ED D4 -F00:3769 * complex error -F00:3770 -F00:3771 MOVE.w 4(a0),-(a4) * string length on descriptor stack - S02:0000D378: 39 28 00 04 -F00:3772 MOVE.l (a0),-(a4) * string address on stack - S02:0000D37C: 29 10 -F00:3773 BRA.s LAB_204S * skip var push - S02:0000D37E: 60 02 -F00:3774 -F00:3775 LAB_2043 -F00:3776 MOVE.l (a0),-(sp) * push variable - S02:0000D380: 2F 10 -F00:3777 LAB_204S -F00:3778 MOVE.l a0,-(sp) * push variable address - S02:0000D382: 2F 08 -F00:3779 MOVE.b Dtypef(a3),-(sp) * push variable data type - S02:0000D384: 1F 2B 05 B5 -F00:3780 -F00:3781 BSR.s LAB_2045 * pack function expression value into (a0) - S02:0000D388: 61 32 -F00:3782 * (function variable) -F00:3783 MOVE.l a5,-(sp) * push BASIC execute pointer - S02:0000D38A: 2F 0D -F00:3784 MOVEA.l func_l(a3),a0 * get function pointer - S02:0000D38C: 20 6B 05 B0 -F00:3785 MOVEA.l (a0),a5 * save function execute ptr as BASIC execute ptr - S02:0000D390: 2A 50 -F00:3786 BSR LAB_EVEX * evaluate expression - S02:0000D392: 61 00 F8 C6 -F00:3787 BSR LAB_GBYT * scan memory - S02:0000D396: 61 00 FA 24 -F00:3788 BNE LAB_SNER * if not [EOL] or [EOS] do syntax error and - S02:0000D39A: 66 00 ED E2 -F00:3789 * warm start -F00:3790 -F00:3791 MOVE.l (sp)+,a5 * restore BASIC execute pointer - S02:0000D39E: 2A 5F -F00:3792 -F00:3793 * restore variable from stack and test data type -F00:3794 -F00:3795 MOVE.b (sp)+,d0 * pull variable data type - S02:0000D3A0: 10 1F -F00:3796 MOVEA.l (sp)+,a0 * pull variable address - S02:0000D3A2: 20 5F -F00:3797 TST.b d0 * test variable data type - S02:0000D3A4: 4A 00 -F00:3798 BPL.s LAB_204T * branch if not string - S02:0000D3A6: 6A 08 -F00:3799 -F00:3800 MOVE.l (a4)+,(a0) * string address from descriptor stack - S02:0000D3A8: 20 9C -F00:3801 MOVE.w (a4)+,4(a0) * string length from descriptor stack - S02:0000D3AA: 31 5C 00 04 -F00:3802 BRA.s LAB_2044 * skip variable pull - S02:0000D3AE: 60 02 -F00:3803 -F00:3804 LAB_204T -F00:3805 MOVE.l (sp)+,(a0) * restore variable from stack - S02:0000D3B0: 20 9F -F00:3806 LAB_2044 -F00:3807 MOVE.b (sp)+,d0 * pop data type flag (function type) - S02:0000D3B2: 10 1F -F00:3808 ROL.b #1,d0 * set carry if type = string - S02:0000D3B4: E3 18 -F00:3809 BSR LAB_CKTM * type match check, set C for string - S02:0000D3B6: 61 00 F8 8E -F00:3810 RTS - S02:0000D3BA: 4E 75 -F00:3811 -F00:3812 LAB_2045 -F00:3813 TST.b Dtypef(a3) * test data type - S02:0000D3BC: 4A 2B 05 B5 -F00:3814 BPL LAB_2778 * if numeric pack FAC1 into variable (a0) - S02:0000D3C0: 6A 00 07 E4 -F00:3815 * and return -F00:3816 -F00:3817 MOVEA.l a0,a2 * copy variable pointer - S02:0000D3C4: 24 48 -F00:3818 BRA LAB_17D6 * go do string LET & return - S02:0000D3C6: 60 00 F5 16 -F00:3819 -F00:3820 -F00:3821 -F00:3822 ************************************************************************************* -F00:3823 * -F00:3824 * perform STR$() -F00:3825 -F00:3826 LAB_STRS -F00:3827 BSR LAB_2970 * convert FAC1 to string - S02:0000D3CA: 61 00 09 40 -F00:3828 -F00:3829 * scan, set up string -F00:3830 * print " terminated string to FAC1 stack -F00:3831 -F00:3832 LAB_20AE -F00:3833 MOVEQ #$22,d2 * set Srchc character (terminator 1) - S02:0000D3CE: 74 22 -F00:3834 MOVE.w d2,d3 * set Asrch character (terminator 2) - S02:0000D3D0: 36 02 -F00:3835 -F00:3836 * print d2/d3 terminated string to FAC1 stack -F00:3837 * d2 = Srchc, d3 = Asrch, a0 is source -F00:3838 * a6 is temp -F00:3839 -F00:3840 LAB_20B4 -F00:3841 MOVEQ #0,d1 * clear longword - S02:0000D3D2: 72 00 -F00:3842 SUBQ.w #1,d1 * set length to -1 - S02:0000D3D4: 53 41 -F00:3843 MOVEA.l a0,a2 * copy start to calculate end - S02:0000D3D6: 24 48 -F00:3844 LAB_20BE -F00:3845 ADDQ.w #1,d1 * increment length - S02:0000D3D8: 52 41 -F00:3846 MOVE.b (a0,d1.w),d0 * get byte from string - S02:0000D3DA: 10 30 10 00 -F00:3847 BEQ.s LAB_20D0 * exit loop if null byte [EOS] - S02:0000D3DE: 67 10 -F00:3848 -F00:3849 CMP.b d2,d0 * compare with search character (terminator 1) - S02:0000D3E0: B0 02 -F00:3850 BEQ.s LAB_20CB * branch if terminator - S02:0000D3E2: 67 04 -F00:3851 -F00:3852 CMP.b d3,d0 * compare with terminator 2 - S02:0000D3E4: B0 03 -F00:3853 BNE.s LAB_20BE * loop if not terminator 2 (or null string) - S02:0000D3E6: 66 F0 -F00:3854 -F00:3855 LAB_20CB -F00:3856 CMP.b #$22,d0 * compare with " - S02:0000D3E8: B0 3C 00 22 -F00:3857 BNE.s LAB_20D0 * branch if not " - S02:0000D3EC: 66 02 -F00:3858 -F00:3859 ADDQ.w #1,a2 * else increment string start (skip " at end) - S02:0000D3EE: 52 4A -F00:3860 LAB_20D0 -F00:3861 ADDA.l d1,a2 * add longowrd length to make string end+1 - S02:0000D3F0: D5 C1 -F00:3862 -F00:3863 CMPA.l a3,a0 * is string in ram - S02:0000D3F2: B1 CB -F00:3864 BCS.s LAB_RTST * if not go push descriptor on stack & exit - S02:0000D3F4: 65 1E -F00:3865 * (could be message string from ROM) -F00:3866 -F00:3867 CMPA.l Smeml(a3),a0 * is string in utility ram - S02:0000D3F6: B1 EB 04 2E -F00:3868 BCC.s LAB_RTST * if not go push descriptor on stack & exit - S02:0000D3FA: 64 18 -F00:3869 * (is in string or program space) -F00:3870 -F00:3871 * (else) copy string to string memory -F00:3872 LAB_20C9 -F00:3873 MOVEA.l a0,a1 * copy descriptor pointer - S02:0000D3FC: 22 48 -F00:3874 MOVE.l d1,d0 * copy longword length - S02:0000D3FE: 20 01 -F00:3875 BNE.s LAB_20D8 * branch if not null string - S02:0000D400: 66 04 -F00:3876 -F00:3877 MOVEA.l d1,a0 * make null pointer - S02:0000D402: 20 41 -F00:3878 BRA.s LAB_RTST * go push descriptor on stack & exit - S02:0000D404: 60 0E -F00:3879 -F00:3880 LAB_20D8 -F00:3881 BSR.s LAB_2115 * make string space d1 bytes long - S02:0000D406: 61 26 -F00:3882 ADDA.l d1,a0 * new string end - S02:0000D408: D1 C1 -F00:3883 ADDA.l d1,a1 * old string end - S02:0000D40A: D3 C1 -F00:3884 SUBQ.w #1,d0 * -1 for DBF loop - S02:0000D40C: 53 40 -F00:3885 LAB_20E0 -F00:3886 MOVE.b -(a1),-(a0) * copy byte (source can be odd aligned) - S02:0000D40E: 11 21 -F00:3887 DBF d0,LAB_20E0 * loop until done - S02:0000D410: 51 C8 FF FC -F00:3888 -F00:3889 -F00:3890 -F00:3891 ************************************************************************************* -F00:3892 * -F00:3893 * check for space on descriptor stack then ... -F00:3894 * put string address and length on descriptor stack & update stack pointers -F00:3895 * start is in a0, length is in d1 -F00:3896 -F00:3897 LAB_RTST -F00:3898 LEA des_sk_e(a3),a1 * get string stack pointer max+1 - S02:0000D414: 43 EB 04 76 -F00:3899 CMPA.l a1,a4 * compare string stack pointer with max+1 - S02:0000D418: B9 C9 -F00:3900 BEQ LAB_SCER * if no space on string stack .. - S02:0000D41A: 67 00 ED 2E -F00:3901 * .. go do 'string too complex' error -F00:3902 -F00:3903 * push string & update pointers -F00:3904 MOVE.w d1,-(a4) * string length on descriptor stack - S02:0000D41E: 39 01 -F00:3905 MOVE.l a0,-(a4) * string address on stack - S02:0000D420: 29 08 -F00:3906 MOVE.l a4,FAC1_m(a3) * string descriptor pointer in FAC1 - S02:0000D422: 27 4C 05 90 -F00:3907 MOVE.b #$80,Dtypef(a3) * save data type flag, $80=string - S02:0000D426: 17 7C 00 80 05 B5 -F00:3908 RTS - S02:0000D42C: 4E 75 -F00:3909 -F00:3910 -F00:3911 ************************************************************************************* -F00:3912 * -F00:3913 * build descriptor a0/d1 -F00:3914 * make space in string memory for string d1.w long -F00:3915 * return pointer in a0/Sutill -F00:3916 -F00:3917 LAB_2115 -F00:3918 TST.w d1 * test length - S02:0000D42E: 4A 41 -F00:3919 BEQ.s LAB_2128 * branch if user wants null string - S02:0000D430: 67 2E -F00:3920 -F00:3921 * make space for string d1 long -F00:3922 MOVE.l d0,-(sp) * save d0 - S02:0000D432: 2F 00 -F00:3923 MOVEQ #0,d0 * clear longword - S02:0000D434: 70 00 -F00:3924 MOVE.b d0,Gclctd(a3) * clear garbage collected flag (b7) - S02:0000D436: 17 40 05 DE -F00:3925 MOVEQ #1,d0 * +1 to possibly round up - S02:0000D43A: 70 01 -F00:3926 AND.w d1,d0 * mask odd bit - S02:0000D43C: C0 41 -F00:3927 ADD.w d1,d0 * ensure d0 is even length - S02:0000D43E: D0 41 -F00:3928 BCC.s LAB_2117 * branch if no overflow - S02:0000D440: 64 04 -F00:3929 -F00:3930 MOVEQ #1,d0 * set to allocate 65536 bytes - S02:0000D442: 70 01 -F00:3931 SWAP d0 * makes $00010000 - S02:0000D444: 48 40 -F00:3932 LAB_2117 -F00:3933 MOVEA.l Sstorl(a3),a0 * get bottom of string space - S02:0000D446: 20 6B 04 46 -F00:3934 SUBA.l d0,a0 * subtract string length - S02:0000D44A: 91 C0 -F00:3935 CMPA.l Earryl(a3),a0 * compare with top of array space - S02:0000D44C: B1 EB 04 42 -F00:3936 BCS.s LAB_2137 * if less do out of memory error - S02:0000D450: 65 12 -F00:3937 -F00:3938 MOVE.l a0,Sstorl(a3) * save bottom of string space - S02:0000D452: 27 48 04 46 -F00:3939 MOVE.l a0,Sutill(a3) * save string utility pointer - S02:0000D456: 27 48 04 4E -F00:3940 MOVE.l (sp)+,d0 * restore d0 - S02:0000D45A: 20 1F -F00:3941 TST.w d1 * set flags on length - S02:0000D45C: 4A 41 -F00:3942 RTS - S02:0000D45E: 4E 75 -F00:3943 -F00:3944 LAB_2128 -F00:3945 MOVEA.w d1,a0 * make null pointer - S02:0000D460: 30 41 -F00:3946 RTS - S02:0000D462: 4E 75 -F00:3947 -F00:3948 LAB_2137 -F00:3949 TST.b Gclctd(a3) * get garbage collected flag - S02:0000D464: 4A 2B 05 DE -F00:3950 BMI LAB_OMER * do "Out of memory" error, then warm start - S02:0000D468: 6B 00 ED 00 -F00:3951 -F00:3952 MOVE.l a1,-(sp) * save a1 - S02:0000D46C: 2F 09 -F00:3953 BSR.s LAB_GARB * else go do garbage collection - S02:0000D46E: 61 0A -F00:3954 MOVEA.l (sp)+,a1 * restore a1 - S02:0000D470: 22 5F -F00:3955 MOVE.b #$80,Gclctd(a3) * set garbage collected flag - S02:0000D472: 17 7C 00 80 05 DE -F00:3956 BRA.s LAB_2117 * go try again - S02:0000D478: 60 CC -F00:3957 -F00:3958 -F00:3959 ************************************************************************************* -F00:3960 * -F00:3961 * garbage collection routine -F00:3962 -F00:3963 LAB_GARB -F00:3964 MOVEM.l d0-d2/a0-a2,-(sp) * save registers - S02:0000D47A: 48 E7 E0 E0 -F00:3965 MOVE.l Ememl(a3),Sstorl(a3) * start with no strings - S02:0000D47E: 27 6B 04 4A 04 46 -F00:3966 -F00:3967 * re-run routine from last ending -F00:3968 LAB_214B -F00:3969 MOVE.l Earryl(a3),d1 * set highest uncollected string so far - S02:0000D484: 22 2B 04 42 -F00:3970 MOVEQ #0,d0 * clear longword - S02:0000D488: 70 00 -F00:3971 MOVEA.l d0,a1 * clear string to move pointer - S02:0000D48A: 22 40 -F00:3972 MOVEA.l Sstrl(a3),a0 * set pointer to start of strings - S02:0000D48C: 20 6B 04 3A -F00:3973 LEA 4(a0),a0 * index to string pointer - S02:0000D490: 58 88 -F00:3974 MOVEA.l Sarryl(a3),a2 * set end pointer to start of arrays (end of - S02:0000D492: 24 6B 04 3E -F00:3975 * strings) -F00:3976 BRA.s LAB_2176 * branch into loop at end loop test - S02:0000D496: 60 06 -F00:3977 -F00:3978 LAB_2161 -F00:3979 BSR LAB_2206 * test and set if this is the highest string - S02:0000D498: 61 7E -F00:3980 LEA 10(a0),a0 * increment to next string - S02:0000D49A: 41 E8 00 0A -F00:3981 LAB_2176 -F00:3982 CMPA.l a2,a0 * compare end of area with pointer - S02:0000D49E: B1 CA -F00:3983 BCS.s LAB_2161 * go do next if not at end - S02:0000D4A0: 65 F6 -F00:3984 -F00:3985 * done strings, now do arrays. -F00:3986 -F00:3987 LEA -4(a0),a0 * decrement pointer to start of arrays - S02:0000D4A2: 59 88 -F00:3988 MOVEA.l Earryl(a3),a2 * set end pointer to end of arrays - S02:0000D4A4: 24 6B 04 42 -F00:3989 BRA.s LAB_218F * branch into loop at end loop test - S02:0000D4A8: 60 24 -F00:3990 -F00:3991 LAB_217E -F00:3992 MOVE.l 4(a0),d2 * get array size - S02:0000D4AA: 24 28 00 04 -F00:3993 ADD.l a0,d2 * makes start of next array - S02:0000D4AE: D4 88 -F00:3994 -F00:3995 MOVE.l (a0),d0 * get array name - S02:0000D4B0: 20 10 -F00:3996 BTST #23,d0 * test string flag - S02:0000D4B2: 08 00 00 17 -F00:3997 BEQ.s LAB_218B * branch if not string - S02:0000D4B6: 67 14 -F00:3998 -F00:3999 MOVE.w 8(a0),d0 * get # of dimensions - S02:0000D4B8: 30 28 00 08 -F00:4000 ADD.w d0,d0 * *2 - S02:0000D4BC: D0 40 -F00:4001 ADDA.w d0,a0 * add to skip dimension size(s) - S02:0000D4BE: D0 C0 -F00:4002 LEA 10(a0),a0 * increment to first element - S02:0000D4C0: 41 E8 00 0A -F00:4003 LAB_2183 -F00:4004 BSR.s LAB_2206 * test and set if this is the highest string - S02:0000D4C4: 61 52 -F00:4005 ADDQ.w #6,a0 * increment to next element - S02:0000D4C6: 5C 48 -F00:4006 CMPA.l d2,a0 * compare with start of next array - S02:0000D4C8: B1 C2 -F00:4007 BNE.s LAB_2183 * go do next if not at end of array - S02:0000D4CA: 66 F8 -F00:4008 -F00:4009 LAB_218B -F00:4010 MOVEA.l d2,a0 * pointer to next array - S02:0000D4CC: 20 42 -F00:4011 LAB_218F -F00:4012 CMPA.l a0,a2 * compare pointer with array end - S02:0000D4CE: B5 C8 -F00:4013 BNE.s LAB_217E * go do next if not at end - S02:0000D4D0: 66 D8 -F00:4014 -F00:4015 * done arrays and variables, now just the descriptor stack to do -F00:4016 -F00:4017 MOVEA.l a4,a0 * get descriptor stack pointer - S02:0000D4D2: 20 4C -F00:4018 LEA des_sk(a3),a2 * set end pointer to end of stack - S02:0000D4D4: 45 EB 04 8E -F00:4019 BRA.s LAB_21C4 * branch into loop at end loop test - S02:0000D4D8: 60 04 -F00:4020 -F00:4021 LAB_21C2 -F00:4022 BSR.s LAB_2206 * test and set if this is the highest string - S02:0000D4DA: 61 3C -F00:4023 LEA 6(a0),a0 * increment to next string - S02:0000D4DC: 5C 88 -F00:4024 LAB_21C4 -F00:4025 CMPA.l a0,a2 * compare pointer with stack end - S02:0000D4DE: B5 C8 -F00:4026 BNE.s LAB_21C2 * go do next if not at end - S02:0000D4E0: 66 F8 -F00:4027 -F00:4028 * descriptor search complete, now either exit or set-up and move string -F00:4029 -F00:4030 MOVE.l a1,d0 * set the flags (a1 is move string) - S02:0000D4E2: 20 09 -F00:4031 BEQ.s LAB_21D1 * go tidy up and exit if no move - S02:0000D4E4: 67 2C -F00:4032 -F00:4033 MOVEA.l (a1),a0 * a0 is now string start - S02:0000D4E6: 20 51 -F00:4034 MOVEQ #0,d1 * clear d1 - S02:0000D4E8: 72 00 -F00:4035 MOVE.w 4(a1),d1 * d1 is string length - S02:0000D4EA: 32 29 00 04 -F00:4036 ADDQ.l #1,d1 * +1 - S02:0000D4EE: 52 81 -F00:4037 AND.b #$FE,d1 * make even length - S02:0000D4F0: C2 3C 00 FE -F00:4038 ADDA.l d1,a0 * pointer is now to string end+1 - S02:0000D4F4: D1 C1 -F00:4039 MOVEA.l Sstorl(a3),a2 * is destination end+1 - S02:0000D4F6: 24 6B 04 46 -F00:4040 CMPA.l a2,a0 * does the string need moving - S02:0000D4FA: B1 CA -F00:4041 BEQ.s LAB_2240 * branch if not - S02:0000D4FC: 67 0C -F00:4042 -F00:4043 LSR.l #1,d1 * word move so do /2 - S02:0000D4FE: E2 89 -F00:4044 SUBQ.w #1,d1 * -1 for DBF loop - S02:0000D500: 53 41 -F00:4045 LAB_2216 -F00:4046 MOVE.w -(a0),-(a2) * copy word - S02:0000D502: 35 20 -F00:4047 DBF d1,LAB_2216 * loop until done - S02:0000D504: 51 C9 FF FC -F00:4048 -F00:4049 MOVE.l a2,(a1) * save new string start - S02:0000D508: 22 8A -F00:4050 LAB_2240 -F00:4051 MOVE.l (a1),Sstorl(a3) * string start is new string mem start - S02:0000D50A: 27 51 04 46 -F00:4052 BRA LAB_214B * re-run routine from last ending - S02:0000D50E: 60 00 FF 74 -F00:4053 * (but don't collect this string) -F00:4054 -F00:4055 LAB_21D1 -F00:4056 MOVEM.l (sp)+,d0-d2/a0-a2 * restore registers - S02:0000D512: 4C DF 07 07 -F00:4057 RTS - S02:0000D516: 4E 75 -F00:4058 -F00:4059 * test and set if this is the highest string -F00:4060 -F00:4061 LAB_2206 -F00:4062 MOVE.l (a0),d0 * get this string pointer - S02:0000D518: 20 10 -F00:4063 BEQ.s RTS_012 * exit if null string - S02:0000D51A: 67 28 -F00:4064 -F00:4065 CMP.l d0,d1 * compare with highest uncollected string so far - S02:0000D51C: B2 80 -F00:4066 BCC.s RTS_012 * exit if <= with highest so far - S02:0000D51E: 64 24 -F00:4067 -F00:4068 CMP.l Sstorl(a3),d0 * compare with bottom of string space - S02:0000D520: B0 AB 04 46 -F00:4069 BCC.s RTS_012 * exit if >= bottom of string space - S02:0000D524: 64 1E -F00:4070 -F00:4071 MOVEQ #-1,d0 * d0 = $FFFFFFFF - S02:0000D526: 70 FF -F00:4072 MOVE.w 4(a0),d0 * d0 is string length - S02:0000D528: 30 28 00 04 -F00:4073 NEG.w d0 * make -ve - S02:0000D52C: 44 40 -F00:4074 AND.b #$FE,d0 * make -ve even length - S02:0000D52E: C0 3C 00 FE -F00:4075 ADD.l Sstorl(a3),d0 * add string store to -ve length - S02:0000D532: D0 AB 04 46 -F00:4076 CMP.l (a0),d0 * compare with string address - S02:0000D536: B0 90 -F00:4077 BEQ.s LAB_2212 * if = go move string store pointer down - S02:0000D538: 67 06 -F00:4078 -F00:4079 MOVE.l (a0),d1 * highest = current - S02:0000D53A: 22 10 -F00:4080 MOVEA.l a0,a1 * string to move = current - S02:0000D53C: 22 48 -F00:4081 RTS - S02:0000D53E: 4E 75 -F00:4082 -F00:4083 LAB_2212 -F00:4084 MOVE.l d0,Sstorl(a3) * set new string store start - S02:0000D540: 27 40 04 46 -F00:4085 RTS_012 -F00:4086 RTS - S02:0000D544: 4E 75 -F00:4087 -F00:4088 -F00:4089 ************************************************************************************* -F00:4090 * -F00:4091 * concatenate - add strings -F00:4092 * string descriptor 1 is in FAC1_m, string 2 is in line -F00:4093 -F00:4094 LAB_224D -F00:4095 PEA LAB_1ADB(pc) * continue evaluation after concatenate - S02:0000D546: 48 7A F7 44 -F00:4096 MOVE.l FAC1_m(a3),-(sp) * stack descriptor pointer for string 1 - S02:0000D54A: 2F 2B 05 90 -F00:4097 -F00:4098 BSR LAB_GVAL * get value from line - S02:0000D54E: 61 00 F8 18 -F00:4099 TST.b Dtypef(a3) * test data type flag - S02:0000D552: 4A 2B 05 B5 -F00:4100 BPL LAB_TMER * if type is not string do type mismatch error - S02:0000D556: 6A 00 EB FA -F00:4101 -F00:4102 MOVEA.l (sp)+,a0 * restore descriptor pointer for string 1 - S02:0000D55A: 20 5F -F00:4103 -F00:4104 ************************************************************************************* -F00:4105 * -F00:4106 * concatenate -F00:4107 * string descriptor 1 is in a0, string descriptor 2 is in FAC1_m -F00:4108 -F00:4109 LAB_224E -F00:4110 MOVEA.l FAC1_m(a3),a1 * copy descriptor pointer 2 - S02:0000D55C: 22 6B 05 90 -F00:4111 MOVE.w 4(a0),d1 * get length 1 - S02:0000D560: 32 28 00 04 -F00:4112 ADD.w 4(a1),d1 * add length 2 - S02:0000D564: D2 69 00 04 -F00:4113 BCS LAB_SLER * if overflow go do 'string too long' error - S02:0000D568: 65 00 EB E4 -F00:4114 -F00:4115 MOVE.l a0,-(sp) * save descriptor pointer 1 - S02:0000D56C: 2F 08 -F00:4116 BSR LAB_2115 * make space d1 bytes long - S02:0000D56E: 61 00 FE BE -F00:4117 MOVE.l a0,FAC2_m(a3) * save new string start pointer - S02:0000D572: 27 48 05 98 -F00:4118 MOVEA.l (sp),a0 * copy descriptor pointer 1 from stack - S02:0000D576: 20 57 -F00:4119 MOVE.w 4(a0),d0 * get length - S02:0000D578: 30 28 00 04 -F00:4120 MOVEA.l (a0),a0 * get string pointer - S02:0000D57C: 20 50 -F00:4121 BSR.s LAB_229E * copy string d0 bytes long from a0 to Sutill - S02:0000D57E: 61 20 -F00:4122 * return with a0 = pointer, d1 = length -F00:4123 -F00:4124 MOVEA.l FAC1_m(a3),a0 * get descriptor pointer for string 2 - S02:0000D580: 20 6B 05 90 -F00:4125 BSR.s LAB_22BA * pop (a0) descriptor, returns with .. - S02:0000D584: 61 38 -F00:4126 * a0 = pointer, d0 = length -F00:4127 BSR.s LAB_229E * copy string d0 bytes long from a0 to Sutill - S02:0000D586: 61 18 -F00:4128 * return with a0 = pointer, d1 = length -F00:4129 -F00:4130 MOVEA.l (sp)+,a0 * get descriptor pointer for string 1 - S02:0000D588: 20 5F -F00:4131 BSR.s LAB_22BA * pop (a0) descriptor, returns with .. - S02:0000D58A: 61 32 -F00:4132 * d0 = length, a0 = pointer -F00:4133 -F00:4134 MOVEA.l FAC2_m(a3),a0 * retreive the result string pointer - S02:0000D58C: 20 6B 05 98 -F00:4135 MOVE.l a0,d1 * copy the result string pointer - S02:0000D590: 22 08 -F00:4136 BEQ LAB_RTST * if it is a null string just return it - S02:0000D592: 67 00 FE 80 -F00:4137 * a0 = pointer, d1 = length -F00:4138 -F00:4139 NEG.l d1 * else make the start pointer negative - S02:0000D596: 44 81 -F00:4140 ADD.l Sutill(a3),d1 * add the end pointert to give the length - S02:0000D598: D2 AB 04 4E -F00:4141 BRA LAB_RTST * push string on descriptor stack - S02:0000D59C: 60 00 FE 76 -F00:4142 * a0 = pointer, d1 = length -F00:4143 -F00:4144 -F00:4145 ************************************************************************************* -F00:4146 * -F00:4147 * copy string d0 bytes long from a0 to Sutill -F00:4148 * return with a0 = pointer, d1 = length -F00:4149 -F00:4150 LAB_229E -F00:4151 MOVE.w d0,d1 * copy and check length - S02:0000D5A0: 32 00 -F00:4152 BEQ.s RTS_013 * skip copy if null - S02:0000D5A2: 67 14 -F00:4153 -F00:4154 MOVEA.l Sutill(a3),a1 * get destination pointer - S02:0000D5A4: 22 6B 04 4E -F00:4155 MOVE.l a1,-(sp) * save destination string pointer - S02:0000D5A8: 2F 09 -F00:4156 SUBQ.w #1,d0 * subtract for DBF loop - S02:0000D5AA: 53 40 -F00:4157 LAB_22A0 -F00:4158 MOVE.b (a0)+,(a1)+ * copy byte - S02:0000D5AC: 12 D8 -F00:4159 DBF d0,LAB_22A0 * loop if not done - S02:0000D5AE: 51 C8 FF FC -F00:4160 -F00:4161 MOVE.l a1,Sutill(a3) * update Sutill to end of copied string - S02:0000D5B2: 27 49 04 4E -F00:4162 MOVEA.l (sp)+,a0 * restore destination string pointer - S02:0000D5B6: 20 5F -F00:4163 RTS_013 -F00:4164 RTS - S02:0000D5B8: 4E 75 -F00:4165 -F00:4166 -F00:4167 ************************************************************************************* -F00:4168 * -F00:4169 * pop string off descriptor stack, or from top of string space -F00:4170 * returns with d0.l = length, a0 = pointer -F00:4171 -F00:4172 LAB_22B6 -F00:4173 MOVEA.l FAC1_m(a3),a0 * get descriptor pointer - S02:0000D5BA: 20 6B 05 90 -F00:4174 -F00:4175 -F00:4176 ************************************************************************************* -F00:4177 * -F00:4178 * pop (a0) descriptor off stack or from string space -F00:4179 * returns with d0.l = length, a0 = pointer -F00:4180 -F00:4181 LAB_22BA -F00:4182 MOVEM.l a1/d1,-(sp) * save other regs - S02:0000D5BE: 48 E7 40 40 -F00:4183 CMPA.l a0,a4 * is string on the descriptor stack - S02:0000D5C2: B9 C8 -F00:4184 BNE.s LAB_22BD * skip pop if not - S02:0000D5C4: 66 02 -F00:4185 -F00:4186 ADDQ.w #$06,a4 * else update stack pointer - S02:0000D5C6: 5C 4C -F00:4187 LAB_22BD -F00:4188 MOVEQ #0,d0 * clear string length longword - S02:0000D5C8: 70 00 -F00:4189 MOVEA.l (a0)+,a1 * get string address - S02:0000D5CA: 22 58 -F00:4190 MOVE.w (a0)+,d0 * get string length - S02:0000D5CC: 30 18 -F00:4191 -F00:4192 CMPA.l a0,a4 * was it on the descriptor stack - S02:0000D5CE: B9 C8 -F00:4193 BNE.s LAB_22E6 * branch if it wasn't - S02:0000D5D0: 66 10 -F00:4194 -F00:4195 CMPA.l Sstorl(a3),a1 * compare string address with bottom of string - S02:0000D5D2: B3 EB 04 46 -F00:4196 * space -F00:4197 BNE.s LAB_22E6 * branch if <> - S02:0000D5D6: 66 0A -F00:4198 -F00:4199 MOVEQ #1,d1 * mask for odd bit - S02:0000D5D8: 72 01 -F00:4200 AND.w d0,d1 * AND length - S02:0000D5DA: C2 40 -F00:4201 ADD.l d0,d1 * make it fit word aligned length - S02:0000D5DC: D2 80 -F00:4202 -F00:4203 ADD.l d1,Sstorl(a3) * add to bottom of string space - S02:0000D5DE: D3 AB 04 46 -F00:4204 LAB_22E6 -F00:4205 MOVEA.l a1,a0 * copy to a0 - S02:0000D5E2: 20 49 -F00:4206 MOVEM.l (sp)+,a1/d1 * restore other regs - S02:0000D5E4: 4C DF 02 02 -F00:4207 TST.l d0 * set flags on length - S02:0000D5E8: 4A 80 -F00:4208 RTS - S02:0000D5EA: 4E 75 -F00:4209 -F00:4210 -F00:4211 ************************************************************************************* -F00:4212 * -F00:4213 * perform CHR$() -F00:4214 -F00:4215 LAB_CHRS -F00:4216 BSR LAB_EVBY * evaluate byte expression, result in d0 and - S02:0000D5EC: 61 00 01 30 -F00:4217 * Itemp -F00:4218 LAB_MKCHR -F00:4219 MOVEQ #1,d1 * string is single byte - S02:0000D5F0: 72 01 -F00:4220 BSR LAB_2115 * make string space d1 bytes long - S02:0000D5F2: 61 00 FE 3A -F00:4221 * return a0/Sutill = pointer, others unchanged -F00:4222 MOVE.b d0,(a0) * save byte in string (byte IS string!) - S02:0000D5F6: 10 80 -F00:4223 BRA LAB_RTST * push string on descriptor stack - S02:0000D5F8: 60 00 FE 1A -F00:4224 * a0 = pointer, d1 = length -F00:4225 -F00:4226 -F00:4227 ************************************************************************************* -F00:4228 * -F00:4229 * perform LEFT$() -F00:4230 -F00:4231 * enter with a0 is descriptor, d0 & Itemp is word 1 -F00:4232 -F00:4233 LAB_LEFT -F00:4234 EXG d0,d1 * word in d1 - S02:0000D5FC: C1 41 -F00:4235 BSR LAB_1BFB * scan for ")", else do syntax error/warm start - S02:0000D5FE: 61 00 F7 A8 -F00:4236 -F00:4237 TST.l d1 * test returned length - S02:0000D602: 4A 81 -F00:4238 BEQ.s LAB_231C * branch if null return - S02:0000D604: 67 22 -F00:4239 -F00:4240 MOVEQ #0,d0 * clear start offset - S02:0000D606: 70 00 -F00:4241 CMP.w 4(a0),d1 * compare word parameter with string length - S02:0000D608: B2 68 00 04 -F00:4242 BCS.s LAB_231C * branch if string length > word parameter - S02:0000D60C: 65 1A -F00:4243 -F00:4244 BRA.s LAB_2317 * go copy whole string - S02:0000D60E: 60 14 -F00:4245 -F00:4246 -F00:4247 ************************************************************************************* -F00:4248 * -F00:4249 * perform RIGHT$() -F00:4250 -F00:4251 * enter with a0 is descriptor, d0 & Itemp is word 1 -F00:4252 -F00:4253 LAB_RIGHT -F00:4254 EXG d0,d1 * word in d1 - S02:0000D610: C1 41 -F00:4255 BSR LAB_1BFB * scan for ")", else do syntax error/warm start - S02:0000D612: 61 00 F7 94 -F00:4256 -F00:4257 TST.l d1 * test returned length - S02:0000D616: 4A 81 -F00:4258 BEQ.s LAB_231C * branch if null return - S02:0000D618: 67 0E -F00:4259 -F00:4260 MOVE.w 4(a0),d0 * get string length - S02:0000D61A: 30 28 00 04 -F00:4261 SUB.l d1,d0 * subtract word - S02:0000D61E: 90 81 -F00:4262 BCC.s LAB_231C * branch if string length > word parameter - S02:0000D620: 64 06 -F00:4263 -F00:4264 * else copy whole string -F00:4265 LAB_2316 -F00:4266 MOVEQ #0,d0 * clear start offset - S02:0000D622: 70 00 -F00:4267 LAB_2317 -F00:4268 MOVE.w 4(a0),d1 * else make parameter = length - S02:0000D624: 32 28 00 04 -F00:4269 -F00:4270 * get here with ... -F00:4271 * a0 - points to descriptor -F00:4272 * d0 - is offset from string start -F00:4273 * d1 - is required string length -F00:4274 -F00:4275 LAB_231C -F00:4276 MOVEA.l a0,a1 * save string descriptor pointer - S02:0000D628: 22 48 -F00:4277 BSR LAB_2115 * make string space d1 bytes long - S02:0000D62A: 61 00 FE 02 -F00:4278 * return a0/Sutill = pointer, others unchanged -F00:4279 MOVEA.l a1,a0 * restore string descriptor pointer - S02:0000D62E: 20 49 -F00:4280 MOVE.l d0,-(sp) * save start offset (longword) - S02:0000D630: 2F 00 -F00:4281 BSR.s LAB_22BA * pop (a0) descriptor, returns with .. - S02:0000D632: 61 8A -F00:4282 * d0 = length, a0 = pointer -F00:4283 ADDA.l (sp)+,a0 * adjust pointer to start of wanted string - S02:0000D634: D1 DF -F00:4284 MOVE.w d1,d0 * length to d0 - S02:0000D636: 30 01 -F00:4285 BSR LAB_229E * store string d0 bytes long from (a0) to - S02:0000D638: 61 00 FF 66 -F00:4286 * (Sutill) return with a0 = pointer, -F00:4287 * d1 = length -F00:4288 BRA LAB_RTST * push string on descriptor stack - S02:0000D63C: 60 00 FD D6 -F00:4289 * a0 = pointer, d1 = length -F00:4290 -F00:4291 -F00:4292 ************************************************************************************* -F00:4293 * -F00:4294 * perform MID$() -F00:4295 -F00:4296 * enter with a0 is descriptor, d0 & Itemp is word 1 -F00:4297 -F00:4298 LAB_MIDS -F00:4299 MOVEQ #0,d7 * clear longword - S02:0000D640: 7E 00 -F00:4300 SUBQ.w #1,d7 * set default length = 65535 - S02:0000D642: 53 47 -F00:4301 MOVE.l d0,-(sp) * save word 1 - S02:0000D644: 2F 00 -F00:4302 BSR LAB_GBYT * scan memory - S02:0000D646: 61 00 F7 74 -F00:4303 CMP.b #',',d0 * was it "," - S02:0000D64A: B0 3C 00 2C -F00:4304 BNE.s LAB_2358 * branch if not "," (skip second byte get) - S02:0000D64E: 66 0C -F00:4305 -F00:4306 MOVE.b (a5)+,d0 * increment pointer past "," - S02:0000D650: 10 1D -F00:4307 MOVE.l a0,-(sp) * save descriptor pointer - S02:0000D652: 2F 08 -F00:4308 BSR LAB_GTWO * get word parameter, result in d0 and Itemp - S02:0000D654: 61 00 00 D8 -F00:4309 MOVEA.l (sp)+,a0 * restore descriptor pointer - S02:0000D658: 20 5F -F00:4310 MOVE.l d0,d7 * copy length - S02:0000D65A: 2E 00 -F00:4311 LAB_2358 -F00:4312 BSR LAB_1BFB * scan for ")", else do syntax error then warm - S02:0000D65C: 61 00 F7 4A -F00:4313 * start -F00:4314 MOVE.l (sp)+,d0 * restore word 1 - S02:0000D660: 20 1F -F00:4315 MOVEQ #0,d1 * null length - S02:0000D662: 72 00 -F00:4316 SUBQ.l #1,d0 * decrement start index (word 1) - S02:0000D664: 53 80 -F00:4317 BMI LAB_FCER * if was null do function call error then warm - S02:0000D666: 6B 00 EB 0A -F00:4318 * start -F00:4319 -F00:4320 CMP.w 4(a0),d0 * compare string length with start index - S02:0000D66A: B0 68 00 04 -F00:4321 BCC.s LAB_231C * if start not in string do null string (d1=0) - S02:0000D66E: 64 B8 -F00:4322 -F00:4323 MOVE.l d7,d1 * get length back - S02:0000D670: 22 07 -F00:4324 ADD.w d0,d7 * d7 now = MID$() end - S02:0000D672: DE 40 -F00:4325 BCS.s LAB_2368 * already too long so do RIGHT$ equivalent - S02:0000D674: 65 06 -F00:4326 -F00:4327 CMP.w 4(a0),d7 * compare string length with start index+length - S02:0000D676: BE 68 00 04 -F00:4328 BCS.s LAB_231C * if end in string go do string - S02:0000D67A: 65 AC -F00:4329 -F00:4330 LAB_2368 -F00:4331 MOVE.w 4(a0),d1 * get string length - S02:0000D67C: 32 28 00 04 -F00:4332 SUB.w d0,d1 * subtract start offset - S02:0000D680: 92 40 -F00:4333 BRA.s LAB_231C * go do string (effectively RIGHT$) - S02:0000D682: 60 A4 -F00:4334 -F00:4335 -F00:4336 ************************************************************************************* -F00:4337 * -F00:4338 * perform LCASE$() -F00:4339 -F00:4340 LAB_LCASE -F00:4341 BSR LAB_22B6 * pop string off descriptor stack or from memory - S02:0000D684: 61 00 FF 34 -F00:4342 * returns with d0 = length, a0 = pointer -F00:4343 MOVE.l d0,d1 * copy the string length - S02:0000D688: 22 00 -F00:4344 BEQ.s NoString * if null go return a null string - S02:0000D68A: 67 56 -F00:4345 -F00:4346 * else copy and change the string -F00:4347 -F00:4348 MOVEA.l a0,a1 * copy the string address - S02:0000D68C: 22 48 -F00:4349 BSR LAB_2115 * make a string space d1 bytes long - S02:0000D68E: 61 00 FD 9E -F00:4350 ADDA.l d1,a0 * new string end - S02:0000D692: D1 C1 -F00:4351 ADDA.l d1,a1 * old string end - S02:0000D694: D3 C1 -F00:4352 MOVE.w d1,d2 * copy length for loop - S02:0000D696: 34 01 -F00:4353 SUBQ.w #1,d2 * -1 for DBF loop - S02:0000D698: 53 42 -F00:4354 LC_loop -F00:4355 MOVE.b -(a1),d0 * get byte from string - S02:0000D69A: 10 21 -F00:4356 -F00:4357 CMP.b #$5B,d0 * compare with "Z"+1 - S02:0000D69C: B0 3C 00 5B -F00:4358 BCC.s NoUcase * if > "Z" skip change - S02:0000D6A0: 64 0A -F00:4359 -F00:4360 CMP.b #$41,d0 * compare with "A" - S02:0000D6A2: B0 3C 00 41 -F00:4361 BCS.s NoUcase * if < "A" skip change - S02:0000D6A6: 65 04 -F00:4362 -F00:4363 ORI.b #$20,d0 * convert upper case to lower case - S02:0000D6A8: 00 00 00 20 -F00:4364 NoUcase -F00:4365 MOVE.b d0,-(a0) * copy upper case byte back to string - S02:0000D6AC: 11 00 -F00:4366 DBF d2,LC_loop * decrement and loop if not all done - S02:0000D6AE: 51 CA FF EA -F00:4367 -F00:4368 BRA.s NoString * tidy up & exit (branch always) - S02:0000D6B2: 60 2E -F00:4369 -F00:4370 -F00:4371 ************************************************************************************* -F00:4372 * -F00:4373 * perform UCASE$() -F00:4374 -F00:4375 LAB_UCASE -F00:4376 BSR LAB_22B6 * pop string off descriptor stack or from memory - S02:0000D6B4: 61 00 FF 04 -F00:4377 * returns with d0 = length, a0 = pointer -F00:4378 MOVE.l d0,d1 * copy the string length - S02:0000D6B8: 22 00 -F00:4379 BEQ.s NoString * if null go return a null string - S02:0000D6BA: 67 26 -F00:4380 -F00:4381 * else copy and change the string -F00:4382 -F00:4383 MOVEA.l a0,a1 * copy the string address - S02:0000D6BC: 22 48 -F00:4384 BSR LAB_2115 * make a string space d1 bytes long - S02:0000D6BE: 61 00 FD 6E -F00:4385 ADDA.l d1,a0 * new string end - S02:0000D6C2: D1 C1 -F00:4386 ADDA.l d1,a1 * old string end - S02:0000D6C4: D3 C1 -F00:4387 MOVE.w d1,d2 * copy length for loop - S02:0000D6C6: 34 01 -F00:4388 SUBQ.w #1,d2 * -1 for DBF loop - S02:0000D6C8: 53 42 -F00:4389 UC_loop -F00:4390 MOVE.b -(a1),d0 * get a byte from the string - S02:0000D6CA: 10 21 -F00:4391 -F00:4392 CMP.b #$61,d0 * compare with "a" - S02:0000D6CC: B0 3C 00 61 -F00:4393 BCS.s NoLcase * if < "a" skip change - S02:0000D6D0: 65 0A -F00:4394 -F00:4395 CMP.b #$7B,d0 * compare with "z"+1 - S02:0000D6D2: B0 3C 00 7B -F00:4396 BCC.s NoLcase * if > "z" skip change - S02:0000D6D6: 64 04 -F00:4397 -F00:4398 ANDI.b #$DF,d0 * convert lower case to upper case - S02:0000D6D8: 02 00 00 DF -F00:4399 NoLcase -F00:4400 MOVE.b d0,-(a0) * copy upper case byte back to string - S02:0000D6DC: 11 00 -F00:4401 DBF d2,UC_loop * decrement and loop if not all done - S02:0000D6DE: 51 CA FF EA -F00:4402 -F00:4403 NoString -F00:4404 BRA LAB_RTST * push string on descriptor stack - S02:0000D6E2: 60 00 FD 30 -F00:4405 * a0 = pointer, d1 = length -F00:4406 -F00:4407 -F00:4408 ************************************************************************************* -F00:4409 * -F00:4410 * perform SADD() -F00:4411 -F00:4412 LAB_SADD -F00:4413 MOVE.b (a5)+,d0 * increment pointer - S02:0000D6E6: 10 1D -F00:4414 BSR LAB_GVAR * get variable address in a0 - S02:0000D6E8: 61 00 F8 DE -F00:4415 BSR LAB_1BFB * scan for ")", else do syntax error/warm start - S02:0000D6EC: 61 00 F6 BA -F00:4416 TST.b Dtypef(a3) * test data type flag - S02:0000D6F0: 4A 2B 05 B5 -F00:4417 BPL LAB_TMER * if numeric do Type missmatch Error - S02:0000D6F4: 6A 00 EA 5C -F00:4418 -F00:4419 * if you want a non existant variable to return a null value then set the novar -F00:4420 * value at the top of this file to some non zero value -F00:4421 -F00:4422 ifne novar -F00:4423 -F00:4424 MOVE.l a0,d0 * test the variable found flag -F00:4425 BEQ LAB_AYFC * if not found go return null -F00:4426 -F00:4427 endc -F00:4428 -F00:4429 MOVE.l (a0),d0 * get string address - S02:0000D6F8: 20 10 -F00:4430 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & return - S02:0000D6FA: 60 00 FB BC -F00:4431 -F00:4432 -F00:4433 ************************************************************************************* -F00:4434 * -F00:4435 * perform LEN() -F00:4436 -F00:4437 LAB_LENS -F00:4438 PEA LAB_AYFC(pc) * set return address to convert d0 to signed - S02:0000D6FE: 48 7A FB B8 -F00:4439 * longword in FAC1 -F00:4440 BRA LAB_22B6 * pop string off descriptor stack or from memory - S02:0000D702: 60 00 FE B6 -F00:4441 * returns with d0 = length, a0 = pointer -F00:4442 -F00:4443 -F00:4444 ************************************************************************************* -F00:4445 * -F00:4446 * perform ASC() -F00:4447 -F00:4448 LAB_ASC -F00:4449 BSR LAB_22B6 * pop string off descriptor stack or from memory - S02:0000D706: 61 00 FE B2 -F00:4450 * returns with d0 = length, a0 = pointer -F00:4451 TST.w d0 * test length - S02:0000D70A: 4A 40 -F00:4452 BEQ LAB_FCER * if null do function call error then warm start - S02:0000D70C: 67 00 EA 64 -F00:4453 -F00:4454 MOVE.b (a0),d0 * get first character byte - S02:0000D710: 10 10 -F00:4455 BRA LAB_1FD0 * convert d0 to unsigned byte in FAC1 & return - S02:0000D712: 60 00 FB C4 -F00:4456 -F00:4457 -F00:4458 ************************************************************************************* -F00:4459 * -F00:4460 * increment and get byte, result in d0 and Itemp -F00:4461 -F00:4462 LAB_SGBY -F00:4463 BSR LAB_IGBY * increment & scan memory - S02:0000D716: 61 00 F6 A2 -F00:4464 -F00:4465 -F00:4466 ************************************************************************************* -F00:4467 * -F00:4468 * get byte parameter, result in d0 and Itemp -F00:4469 -F00:4470 LAB_GTBY -F00:4471 BSR LAB_EVNM * evaluate expression & check is numeric, - S02:0000D71A: 61 00 F5 26 -F00:4472 * else do type mismatch -F00:4473 -F00:4474 -F00:4475 ************************************************************************************* -F00:4476 * -F00:4477 * evaluate byte expression, result in d0 and Itemp -F00:4478 -F00:4479 LAB_EVBY -F00:4480 BSR LAB_EVPI * evaluate positive integer expression - S02:0000D71E: 61 00 F9 DC -F00:4481 * result in d0 and Itemp -F00:4482 E2028 MOVEQ #$80,d1 * set mask/2 - S02:0000D722: 72 80 -F00:4483 ADD.l d1,d1 * =$FFFFFF00 - S02:0000D724: D2 81 -F00:4484 AND.l d0,d1 * check top 24 bits - S02:0000D726: C2 80 -F00:4485 BNE LAB_FCER * if <> 0 do function call error/warm start - S02:0000D728: 66 00 EA 48 -F00:4486 -F00:4487 RTS - S02:0000D72C: 4E 75 -F00:4488 -F00:4489 -F00:4490 ************************************************************************************* -F00:4491 * -F00:4492 * get word parameter, result in d0 and Itemp -F00:4493 -F00:4494 LAB_GTWO -F00:4495 BSR LAB_EVNM * evaluate expression & check is numeric, - S02:0000D72E: 61 00 F5 12 -F00:4496 * else do type mismatch -F00:4497 BSR LAB_EVPI * evaluate positive integer expression - S02:0000D732: 61 00 F9 C8 -F00:4498 * result in d0 and Itemp -F00:4499 SWAP d0 * copy high word to low word - S02:0000D736: 48 40 -F00:4500 TST.w d0 * set flags - S02:0000D738: 4A 40 -F00:4501 BNE LAB_FCER * if <> 0 do function call error/warm start - S02:0000D73A: 66 00 EA 36 -F00:4502 -F00:4503 SWAP d0 * copy high word to low word - S02:0000D73E: 48 40 -F00:4504 RTS - S02:0000D740: 4E 75 -F00:4505 -F00:4506 -F00:4507 ************************************************************************************* -F00:4508 * -F00:4509 * perform VAL() -F00:4510 -F00:4511 LAB_VAL -F00:4512 BSR LAB_22B6 * pop string off descriptor stack or from memory - S02:0000D742: 61 00 FE 76 -F00:4513 * returns with d0 = length, a0 = pointer -F00:4514 BEQ.s LAB_VALZ * string was null so set result = $00 - S02:0000D746: 67 22 -F00:4515 * clear FAC1 exponent & sign & return -F00:4516 -F00:4517 MOVEA.l a5,a6 * save BASIC execute pointer - S02:0000D748: 2C 4D -F00:4518 MOVEA.l a0,a5 * copy string pointer to execute pointer - S02:0000D74A: 2A 48 -F00:4519 ADDA.l d0,a0 * string end+1 - S02:0000D74C: D1 C0 -F00:4520 MOVE.b (a0),d0 * get byte from string+1 - S02:0000D74E: 10 10 -F00:4521 MOVE.w d0,-(sp) * save it - S02:0000D750: 3F 00 -F00:4522 MOVE.l a0,-(sp) * save address - S02:0000D752: 2F 08 -F00:4523 MOVE.b #0,(a0) * null terminate string - S02:0000D754: 10 BC 00 00 -F00:4524 BSR LAB_GBYT * scan memory - S02:0000D758: 61 00 F6 62 -F00:4525 BSR LAB_2887 * get FAC1 from string - S02:0000D75C: 61 00 11 36 -F00:4526 MOVEA.l (sp)+,a0 * restore pointer - S02:0000D760: 20 5F -F00:4527 MOVE.w (sp)+,d0 * pop byte - S02:0000D762: 30 1F -F00:4528 MOVE.b d0,(a0) * restore to memory - S02:0000D764: 10 80 -F00:4529 MOVEA.l a6,a5 * restore BASIC execute pointer - S02:0000D766: 2A 4E -F00:4530 RTS - S02:0000D768: 4E 75 -F00:4531 -F00:4532 LAB_VALZ -F00:4533 MOVE.w d0,FAC1_e(a3) * clear FAC1 exponent & sign - S02:0000D76A: 37 40 05 94 -F00:4534 RTS - S02:0000D76E: 4E 75 -F00:4535 -F00:4536 -F00:4537 ************************************************************************************* -F00:4538 * -F00:4539 * get two parameters for POKE or WAIT, first parameter in a0, second in d0 -F00:4540 -F00:4541 LAB_GADB -F00:4542 BSR LAB_EVNM * evaluate expression & check is numeric, - S02:0000D770: 61 00 F4 D0 -F00:4543 * else do type mismatch -F00:4544 BSR LAB_EVIR * evaluate integer expression - S02:0000D774: 61 00 F9 8E -F00:4545 * (does FC error not OF error if out of range) -F00:4546 MOVE.l d0,-(sp) * copy to stack - S02:0000D778: 2F 00 -F00:4547 BSR LAB_1C01 * scan for ",", else do syntax error/warm start - S02:0000D77A: 61 00 F6 34 -F00:4548 BSR.s LAB_GTBY * get byte parameter, result in d0 and Itemp - S02:0000D77E: 61 9A -F00:4549 MOVEA.l (sp)+,a0 * pull address - S02:0000D780: 20 5F -F00:4550 RTS - S02:0000D782: 4E 75 -F00:4551 -F00:4552 -F00:4553 ************************************************************************************* -F00:4554 * -F00:4555 * get two parameters for DOKE or WAITW, first parameter in a0, second in d0 -F00:4556 -F00:4557 LAB_GADW -F00:4558 BSR.s LAB_GEAD * get even address for word/long memory actions - S02:0000D784: 61 1E -F00:4559 * address returned in d0 and on the stack -F00:4560 BSR LAB_1C01 * scan for ",", else do syntax error/warm start - S02:0000D786: 61 00 F6 28 -F00:4561 BSR LAB_EVNM * evaluate expression & check is numeric, - S02:0000D78A: 61 00 F4 B6 -F00:4562 * else do type mismatch -F00:4563 BSR LAB_EVIR * evaluate integer expression - S02:0000D78E: 61 00 F9 74 -F00:4564 * result in d0 and Itemp -F00:4565 SWAP d0 * swap words - S02:0000D792: 48 40 -F00:4566 TST.w d0 * test high word - S02:0000D794: 4A 40 -F00:4567 BEQ.s LAB_XGADW * exit if null - S02:0000D796: 67 06 -F00:4568 -F00:4569 ADDQ.w #1,d0 * increment word - S02:0000D798: 52 40 -F00:4570 BNE LAB_FCER * if <> 0 do function call error/warm start - S02:0000D79A: 66 00 E9 D6 -F00:4571 -F00:4572 LAB_XGADW -F00:4573 SWAP d0 * swap words back - S02:0000D79E: 48 40 -F00:4574 MOVEA.l (sp)+,a0 * pull address - S02:0000D7A0: 20 5F -F00:4575 RTS - S02:0000D7A2: 4E 75 -F00:4576 -F00:4577 -F00:4578 ************************************************************************************* -F00:4579 * -F00:4580 * get even address (for word or longword memory actions) -F00:4581 * address returned in d0 and on the stack -F00:4582 * does address error if the address is odd -F00:4583 -F00:4584 LAB_GEAD -F00:4585 BSR LAB_EVNM * evaluate expression & check is numeric, - S02:0000D7A4: 61 00 F4 9C -F00:4586 * else do type mismatch -F00:4587 BSR LAB_EVIR * evaluate integer expression - S02:0000D7A8: 61 00 F9 5A -F00:4588 * (does FC error not OF error if out of range) -F00:4589 BTST #0,d0 * test low bit of longword - S02:0000D7AC: 08 00 00 00 -F00:4590 BNE LAB_ADER * if address is odd do address error/warm start - S02:0000D7B0: 66 00 E9 7C -F00:4591 -F00:4592 MOVEA.l (sp),a0 * copy return address - S02:0000D7B4: 20 57 -F00:4593 MOVE.l d0,(sp) * even address on stack - S02:0000D7B6: 2E 80 -F00:4594 JMP (a0) * effectively RTS - S02:0000D7B8: 4E D0 -F00:4595 -F00:4596 -F00:4597 ************************************************************************************* -F00:4598 * -F00:4599 * perform PEEK() -F00:4600 -F00:4601 LAB_PEEK -F00:4602 BSR LAB_EVIR * evaluate integer expression - S02:0000D7BA: 61 00 F9 48 -F00:4603 * (does FC error not OF error if out of range) -F00:4604 MOVEA.l d0,a0 * copy to address register - S02:0000D7BE: 20 40 -F00:4605 MOVE.b (a0),d0 * get byte - S02:0000D7C0: 10 10 -F00:4606 BRA LAB_1FD0 * convert d0 to unsigned byte in FAC1 & return - S02:0000D7C2: 60 00 FB 14 -F00:4607 -F00:4608 -F00:4609 ************************************************************************************* -F00:4610 * -F00:4611 * perform POKE -F00:4612 -F00:4613 LAB_POKE -F00:4614 BSR.s LAB_GADB * get two parameters for POKE or WAIT - S02:0000D7C6: 61 A8 -F00:4615 * first parameter in a0, second in d0 -F00:4616 MOVE.b d0,(a0) * put byte in memory - S02:0000D7C8: 10 80 -F00:4617 RTS - S02:0000D7CA: 4E 75 -F00:4618 -F00:4619 -F00:4620 ************************************************************************************* -F00:4621 * -F00:4622 * perform DEEK() -F00:4623 -F00:4624 LAB_DEEK -F00:4625 BSR LAB_EVIR * evaluate integer expression - S02:0000D7CC: 61 00 F9 36 -F00:4626 * (does FC error not OF error if out of range) -F00:4627 LSR.b #1,d0 * shift bit 0 to carry - S02:0000D7D0: E2 08 -F00:4628 BCS LAB_ADER * if address is odd do address error/warm start - S02:0000D7D2: 65 00 E9 5A -F00:4629 -F00:4630 ADD.b d0,d0 * shift byte back - S02:0000D7D6: D0 00 -F00:4631 EXG d0,a0 * copy to address register - S02:0000D7D8: C1 88 -F00:4632 MOVEQ #0,d0 * clear top bits - S02:0000D7DA: 70 00 -F00:4633 MOVE.w (a0),d0 * get word - S02:0000D7DC: 30 10 -F00:4634 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & return - S02:0000D7DE: 60 00 FA D8 -F00:4635 -F00:4636 -F00:4637 ************************************************************************************* -F00:4638 * -F00:4639 * perform LEEK() -F00:4640 -F00:4641 LAB_LEEK -F00:4642 BSR LAB_EVIR * evaluate integer expression - S02:0000D7E2: 61 00 F9 20 -F00:4643 * (does FC error not OF error if out of range) -F00:4644 LSR.b #1,d0 * shift bit 0 to carry - S02:0000D7E6: E2 08 -F00:4645 BCS LAB_ADER * if address is odd do address error/warm start - S02:0000D7E8: 65 00 E9 44 -F00:4646 -F00:4647 ADD.b d0,d0 * shift byte back - S02:0000D7EC: D0 00 -F00:4648 EXG d0,a0 * copy to address register - S02:0000D7EE: C1 88 -F00:4649 MOVE.l (a0),d0 * get longword - S02:0000D7F0: 20 10 -F00:4650 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & return - S02:0000D7F2: 60 00 FA C4 -F00:4651 -F00:4652 -F00:4653 ************************************************************************************* -F00:4654 * -F00:4655 * perform DOKE -F00:4656 -F00:4657 LAB_DOKE -F00:4658 BSR.s LAB_GADW * get two parameters for DOKE or WAIT - S02:0000D7F6: 61 8C -F00:4659 * first parameter in a0, second in d0 -F00:4660 MOVE.w d0,(a0) * put word in memory - S02:0000D7F8: 30 80 -F00:4661 RTS - S02:0000D7FA: 4E 75 -F00:4662 -F00:4663 -F00:4664 ************************************************************************************* -F00:4665 * -F00:4666 * perform LOKE -F00:4667 -F00:4668 LAB_LOKE -F00:4669 BSR.s LAB_GEAD * get even address for word/long memory actions - S02:0000D7FC: 61 A6 -F00:4670 * address returned in d0 and on the stack -F00:4671 BSR LAB_1C01 * scan for ",", else do syntax error/warm start - S02:0000D7FE: 61 00 F5 B0 -F00:4672 BSR LAB_EVNM * evaluate expression & check is numeric, - S02:0000D802: 61 00 F4 3E -F00:4673 * else do type mismatch -F00:4674 BSR LAB_EVIR * evaluate integer value (no sign check) - S02:0000D806: 61 00 F8 FC -F00:4675 MOVEA.l (sp)+,a0 * pull address - S02:0000D80A: 20 5F -F00:4676 MOVE.l d0,(a0) * put longword in memory - S02:0000D80C: 20 80 -F00:4677 RTS_015 -F00:4678 RTS - S02:0000D80E: 4E 75 -F00:4679 -F00:4680 -F00:4681 ************************************************************************************* -F00:4682 * -F00:4683 * perform SWAP -F00:4684 -F00:4685 LAB_SWAP -F00:4686 BSR LAB_GVAR * get variable 1 address in a0 - S02:0000D810: 61 00 F7 B6 -F00:4687 MOVE.l a0,-(sp) * save variable 1 address - S02:0000D814: 2F 08 -F00:4688 MOVE.b Dtypef(a3),d4 * copy variable 1 data type, $80=string, - S02:0000D816: 18 2B 05 B5 -F00:4689 * $40=inetger, $00=float -F00:4690 -F00:4691 BSR LAB_1C01 * scan for ",", else do syntax error/warm start - S02:0000D81A: 61 00 F5 94 -F00:4692 BSR LAB_GVAR * get variable 2 address in a0 - S02:0000D81E: 61 00 F7 A8 -F00:4693 MOVEA.l (sp)+,a2 * restore variable 1 address - S02:0000D822: 24 5F -F00:4694 CMP.b Dtypef(a3),d4 * compare variable 1 data type with variable 2 - S02:0000D824: B8 2B 05 B5 -F00:4695 * data type -F00:4696 BNE LAB_TMER * if not both the same type do "Type mismatch" - S02:0000D828: 66 00 E9 28 -F00:4697 * error then warm start -F00:4698 -F00:4699 * if you do want a non existant variable to return an error then leave the novar -F00:4700 * value at the top of this file set to zero -F00:4701 -F00:4702 ifeq novar -F00:4703 -F00:4704 MOVE.l (a0),d0 * get variable 2 - S02:0000D82C: 20 10 -F00:4705 MOVE.l (a2),(a0)+ * copy variable 1 to variable 2 - S02:0000D82E: 20 D2 -F00:4706 MOVE.l d0,(a2)+ * save variable 2 to variable 1 - S02:0000D830: 24 C0 -F00:4707 -F00:4708 TST.b d4 * check data type - S02:0000D832: 4A 04 -F00:4709 BPL.s RTS_015 * exit if not string - S02:0000D834: 6A D8 -F00:4710 -F00:4711 MOVE.w (a0),d0 * get string 2 length - S02:0000D836: 30 10 -F00:4712 MOVE.w (a2),(a0) * copy string 1 length to string 2 length - S02:0000D838: 30 92 -F00:4713 MOVE.w d0,(a2) * save string 2 length to string 1 length - S02:0000D83A: 34 80 -F00:4714 -F00:4715 endc -F00:4716 -F00:4717 -F00:4718 * if you want a non existant variable to return a null value then set the novar -F00:4719 * value at the top of this file to some non zero value -F00:4720 -F00:4721 ifne novar -F00:4722 -F00:4723 MOVE.l a2,d2 * copy the variable 1 pointer -F00:4724 MOVE.l d2,d3 * and again for any length -F00:4725 BEQ.s no_variable1 * if variable 1 doesn't exist skip the -F00:4726 * value get -F00:4727 -F00:4728 MOVE.l (a2),d2 * get variable 1 value -F00:4729 TST.b d4 * check the data type -F00:4730 BPL.s no_variable1 * if not string skip the length get -F00:4731 -F00:4732 MOVE.w 4(a2),d3 * else get variable 1 string length -F00:4733 no_variable1 -F00:4734 MOVE.l a0,d0 * copy the variable 2 pointer -F00:4735 MOVE.l d0,d1 * and again for any length -F00:4736 BEQ.s no_variable2 * if variable 2 doesn't exist skip the -F00:4737 * value get and the new value save -F00:4738 -F00:4739 MOVE.l (a0),d0 * get variable 2 value -F00:4740 MOVE.l d2,(a0)+ * save variable 2 new value -F00:4741 TST.b d4 * check the data type -F00:4742 BPL.s no_variable2 * if not string skip the length get and -F00:4743 * new length save -F00:4744 -F00:4745 MOVE.w (a0),d1 * else get variable 2 string length -F00:4746 MOVE.w d3,(a0) * save variable 2 new string length -F00:4747 no_variable2 -F00:4748 TST.l d2 * test if variable 1 exists -F00:4749 BEQ.s EXIT_SWAP * if variable 1 doesn't exist skip the -F00:4750 * new value save -F00:4751 -F00:4752 MOVE.l d0,(a2)+ * save variable 1 new value -F00:4753 TST.b d4 * check the data type -F00:4754 BPL.s EXIT_SWAP * if not string skip the new length save -F00:4755 -F00:4756 MOVE.w d1,(a2) * save variable 1 new string length -F00:4757 EXIT_SWAP -F00:4758 -F00:4759 endc -F00:4760 -F00:4761 RTS - S02:0000D83C: 4E 75 -F00:4762 -F00:4763 -F00:4764 ************************************************************************************* -F00:4765 * -F00:4766 * perform USR -F00:4767 -F00:4768 LAB_USR -F00:4769 JSR Usrjmp(a3) * do user vector - S02:0000D83E: 4E AB 04 06 -F00:4770 BRA LAB_1BFB * scan for ")", else do syntax error/warm start - S02:0000D842: 60 00 F5 64 -F00:4771 -F00:4772 -F00:4773 ************************************************************************************* -F00:4774 * -F00:4775 * perform LOAD -F00:4776 -F00:4777 LAB_LOAD -F00:4778 JMP V_LOAD(a3) * do load vector - S02:0000D846: 4E EB 04 18 -F00:4779 -F00:4780 -F00:4781 ************************************************************************************* -F00:4782 * -F00:4783 * perform SAVE -F00:4784 -F00:4785 LAB_SAVE -F00:4786 JMP V_SAVE(a3) * do save vector - S02:0000D84A: 4E EB 04 1E -F00:4787 -F00:4788 -F00:4789 ************************************************************************************* -F00:4790 * -F00:4791 * perform CALL -F00:4792 -F00:4793 LAB_CALL -F00:4794 PEA LAB_GBYT(pc) * put return address on stack - S02:0000D84E: 48 7A F5 6C -F00:4795 BSR LAB_GEAD * get even address for word/long memory actions - S02:0000D852: 61 00 FF 50 -F00:4796 * address returned in d0 and on the stack -F00:4797 RTS * effectively calls the routine - S02:0000D856: 4E 75 -F00:4798 -F00:4799 * if the called routine exits correctly then it will return via the get byte routine. -F00:4800 * this will then get the next byte for the interpreter and return -F00:4801 -F00:4802 -F00:4803 ************************************************************************************* -F00:4804 * -F00:4805 * perform WAIT -F00:4806 -F00:4807 LAB_WAIT -F00:4808 BSR LAB_GADB * get two parameters for POKE or WAIT - S02:0000D858: 61 00 FF 16 -F00:4809 * first parameter in a0, second in d0 -F00:4810 MOVE.l a0,-(sp) * save address - S02:0000D85C: 2F 08 -F00:4811 MOVE.w d0,-(sp) * save byte - S02:0000D85E: 3F 00 -F00:4812 MOVEQ #0,d2 * clear mask - S02:0000D860: 74 00 -F00:4813 BSR LAB_GBYT * scan memory - S02:0000D862: 61 00 F5 58 -F00:4814 BEQ.s LAB_2441 * skip if no third argument - S02:0000D866: 67 06 -F00:4815 -F00:4816 BSR LAB_SCGB * scan for "," & get byte, - S02:0000D868: 61 00 F5 42 -F00:4817 * else do syntax error/warm start -F00:4818 MOVE.l d0,d2 * copy mask - S02:0000D86C: 24 00 -F00:4819 LAB_2441 -F00:4820 MOVE.w (sp)+,d1 * get byte - S02:0000D86E: 32 1F -F00:4821 MOVEA.l (sp)+,a0 * get address - S02:0000D870: 20 5F -F00:4822 LAB_2445 -F00:4823 MOVE.b (a0),d0 * read memory byte - S02:0000D872: 10 10 -F00:4824 EOR.b d2,d0 * EOR with second argument (mask) - S02:0000D874: B5 00 -F00:4825 AND.b d1,d0 * AND with first argument (byte) - S02:0000D876: C0 01 -F00:4826 BEQ.s LAB_2445 * loop if result is zero - S02:0000D878: 67 F8 -F00:4827 -F00:4828 RTS - S02:0000D87A: 4E 75 -F00:4829 -F00:4830 -F00:4831 ************************************************************************************* -F00:4832 * -F00:4833 * perform subtraction, FAC1 from FAC2 -F00:4834 -F00:4835 LAB_SUBTRACT -F00:4836 EORI.b #$80,FAC1_s(a3) * complement FAC1 sign - S02:0000D87C: 0A 2B 00 80 05 95 -F00:4837 MOVE.b FAC2_s(a3),FAC_sc(a3) * copy FAC2 sign byte - S02:0000D882: 17 6B 05 9D 05 9E -F00:4838 -F00:4839 MOVE.b FAC1_s(a3),d0 * get FAC1 sign byte - S02:0000D888: 10 2B 05 95 -F00:4840 EOR.b d0,FAC_sc(a3) * EOR with FAC2 sign - S02:0000D88C: B1 2B 05 9E -F00:4841 -F00:4842 -F00:4843 ************************************************************************************* -F00:4844 * -F00:4845 * add FAC2 to FAC1 -F00:4846 -F00:4847 LAB_ADD -F00:4848 MOVE.b FAC1_e(a3),d0 * get exponent - S02:0000D890: 10 2B 05 94 -F00:4849 BEQ LAB_279B * FAC1 was zero so copy FAC2 to FAC1 & return - S02:0000D894: 67 00 03 36 -F00:4850 -F00:4851 * FAC1 is non zero -F00:4852 LEA FAC2_m(a3),a0 * set pointer1 to FAC2 mantissa - S02:0000D898: 41 EB 05 98 -F00:4853 MOVE.b FAC2_e(a3),d0 * get FAC2 exponent - S02:0000D89C: 10 2B 05 9C -F00:4854 BEQ.s RTS_016 * exit if zero - S02:0000D8A0: 67 46 -F00:4855 -F00:4856 SUB.b FAC1_e(a3),d0 * subtract FAC1 exponent - S02:0000D8A2: 90 2B 05 94 -F00:4857 BEQ.s LAB_24A8 * branch if = (go add mantissa) - S02:0000D8A6: 67 22 -F00:4858 -F00:4859 BCS.s LAB_249C * branch if FAC2 < FAC1 - S02:0000D8A8: 65 0A -F00:4860 -F00:4861 * FAC2 > FAC1 -F00:4862 MOVE.w FAC2_e(a3),FAC1_e(a3) * copy sign and exponent of FAC2 - S02:0000D8AA: 37 6B 05 9C 05 94 -F00:4863 NEG.b d0 * negate exponent difference (make diff -ve) - S02:0000D8B0: 44 00 -F00:4864 SUBQ.w #8,a0 * pointer1 to FAC1 - S02:0000D8B2: 51 48 -F00:4865 -F00:4866 LAB_249C -F00:4867 NEG.b d0 * negate exponent difference (make diff +ve) - S02:0000D8B4: 44 00 -F00:4868 MOVE.l d1,-(sp) * save d1 - S02:0000D8B6: 2F 01 -F00:4869 CMP.b #32,d0 * compare exponent diff with 32 - S02:0000D8B8: B0 3C 00 20 -F00:4870 BLT.s LAB_2467 * branch if range >= 32 - S02:0000D8BC: 6D 04 -F00:4871 -F00:4872 MOVEQ #0,d1 * clear d1 - S02:0000D8BE: 72 00 -F00:4873 BRA.s LAB_2468 * go clear smaller mantissa - S02:0000D8C0: 60 04 -F00:4874 -F00:4875 LAB_2467 -F00:4876 MOVE.l (a0),d1 * get FACx mantissa - S02:0000D8C2: 22 10 -F00:4877 LSR.l d0,d1 * shift d0 times right - S02:0000D8C4: E0 A9 -F00:4878 LAB_2468 -F00:4879 MOVE.l d1,(a0) * save it back - S02:0000D8C6: 20 81 -F00:4880 MOVE.l (sp)+,d1 * restore d1 - S02:0000D8C8: 22 1F -F00:4881 -F00:4882 * exponents are equal now do mantissa add or -F00:4883 * subtract -F00:4884 LAB_24A8 -F00:4885 TST.b FAC_sc(a3) * test sign compare (FAC1 EOR FAC2) - S02:0000D8CA: 4A 2B 05 9E -F00:4886 BMI.s LAB_24F8 * if <> go do subtract - S02:0000D8CE: 6B 1A -F00:4887 -F00:4888 MOVE.l FAC2_m(a3),d0 * get FAC2 mantissa - S02:0000D8D0: 20 2B 05 98 -F00:4889 ADD.l FAC1_m(a3),d0 * add FAC1 mantissa - S02:0000D8D4: D0 AB 05 90 -F00:4890 BCC.s LAB_24F7 * save and exit if no carry (FAC1 is normal) - S02:0000D8D8: 64 0A -F00:4891 -F00:4892 ROXR.l #1,d0 * else shift carry back into mantissa - S02:0000D8DA: E2 90 -F00:4893 ADDQ.b #1,FAC1_e(a3) * increment FAC1 exponent - S02:0000D8DC: 52 2B 05 94 -F00:4894 BCS LAB_OFER * if carry do overflow error & warm start - S02:0000D8E0: 65 00 E8 8C -F00:4895 -F00:4896 LAB_24F7 -F00:4897 MOVE.l d0,FAC1_m(a3) * save mantissa - S02:0000D8E4: 27 40 05 90 -F00:4898 RTS_016 -F00:4899 RTS - S02:0000D8E8: 4E 75 -F00:4900 * signs are different -F00:4901 LAB_24F8 -F00:4902 LEA FAC1_m(a3),a1 * pointer 2 to FAC1 - S02:0000D8EA: 43 EB 05 90 -F00:4903 CMPA.l a0,a1 * compare pointers - S02:0000D8EE: B3 C8 -F00:4904 BNE.s LAB_24B4 * branch if <> - S02:0000D8F0: 66 02 -F00:4905 -F00:4906 ADDQ.w #8,a1 * else pointer2 to FAC2 - S02:0000D8F2: 50 49 -F00:4907 -F00:4908 * take smaller from bigger (take sign of bigger) -F00:4909 LAB_24B4 -F00:4910 MOVE.l (a1),d0 * get larger mantissa - S02:0000D8F4: 20 11 -F00:4911 MOVE.l (a0),d1 * get smaller mantissa - S02:0000D8F6: 22 10 -F00:4912 MOVE.l d0,FAC1_m(a3) * save larger mantissa - S02:0000D8F8: 27 40 05 90 -F00:4913 SUB.l d1,FAC1_m(a3) * subtract smaller - S02:0000D8FC: 93 AB 05 90 -F00:4914 -F00:4915 -F00:4916 ************************************************************************************* -F00:4917 * -F00:4918 * do +/- (carry is sign) & normalise FAC1 -F00:4919 -F00:4920 LAB_24D0 -F00:4921 BCC.s LAB_24D5 * branch if result is +ve - S02:0000D900: 64 08 -F00:4922 -F00:4923 * erk! subtract is the wrong way round so -F00:4924 * negate everything -F00:4925 EORI.b #$FF,FAC1_s(a3) * complement FAC1 sign - S02:0000D902: 46 2B 05 95 -F00:4926 NEG.l FAC1_m(a3) * negate FAC1 mantissa - S02:0000D906: 44 AB 05 90 -F00:4927 -F00:4928 -F00:4929 ************************************************************************************* -F00:4930 * -F00:4931 * normalise FAC1 -F00:4932 -F00:4933 LAB_24D5 -F00:4934 MOVE.l FAC1_m(a3),d0 * get mantissa - S02:0000D90A: 20 2B 05 90 -F00:4935 BMI.s LAB_24DA * mantissa is normal so just exit - S02:0000D90E: 6B 2E -F00:4936 -F00:4937 BNE.s LAB_24D9 * mantissa is not zero so go normalise FAC1 - S02:0000D910: 66 06 -F00:4938 -F00:4939 MOVE.w d0,FAC1_e(a3) * else make FAC1 = +zero - S02:0000D912: 37 40 05 94 -F00:4940 RTS - S02:0000D916: 4E 75 -F00:4941 -F00:4942 LAB_24D9 -F00:4943 MOVE.l d1,-(sp) * save d1 - S02:0000D918: 2F 01 -F00:4944 MOVE.l d0,d1 * mantissa to d1 - S02:0000D91A: 22 00 -F00:4945 MOVEQ #0,d0 * clear d0 - S02:0000D91C: 70 00 -F00:4946 MOVE.b FAC1_e(a3),d0 * get exponent byte - S02:0000D91E: 10 2B 05 94 -F00:4947 BEQ.s LAB_24D8 * if exponent is zero then clean up and exit - S02:0000D922: 67 14 -F00:4948 LAB_24D6 -F00:4949 ADD.l d1,d1 * shift mantissa, ADD is quicker for a single - S02:0000D924: D2 81 -F00:4950 * shift -F00:4951 DBMI d0,LAB_24D6 * decrement exponent and loop if mantissa and - S02:0000D926: 5B C8 FF FC -F00:4952 * exponent +ve -F00:4953 -F00:4954 TST.w d0 * test exponent - S02:0000D92A: 4A 40 -F00:4955 BEQ.s LAB_24D8 * if exponent is zero make FAC1 zero - S02:0000D92C: 67 0A -F00:4956 -F00:4957 BPL.s LAB_24D7 * if exponent is >zero go save FAC1 - S02:0000D92E: 6A 02 -F00:4958 -F00:4959 MOVEQ #1,d0 * else set for zero after correction - S02:0000D930: 70 01 -F00:4960 LAB_24D7 -F00:4961 SUBQ.b #1,d0 * adjust exponent for loop - S02:0000D932: 53 00 -F00:4962 MOVE.l d1,FAC1_m(a3) * save normalised mantissa - S02:0000D934: 27 41 05 90 -F00:4963 LAB_24D8 -F00:4964 MOVE.l (sp)+,d1 * restore d1 - S02:0000D938: 22 1F -F00:4965 MOVE.b d0,FAC1_e(a3) * save corrected exponent - S02:0000D93A: 17 40 05 94 -F00:4966 LAB_24DA -F00:4967 RTS - S02:0000D93E: 4E 75 -F00:4968 -F00:4969 -F00:4970 ************************************************************************************* -F00:4971 * -F00:4972 * perform LOG() -F00:4973 -F00:4974 LAB_LOG -F00:4975 TST.b FAC1_s(a3) * test sign - S02:0000D940: 4A 2B 05 95 -F00:4976 BMI LAB_FCER * if -ve do function call error/warm start - S02:0000D944: 6B 00 E8 2C -F00:4977 -F00:4978 MOVEQ #0,d7 * clear d7 - S02:0000D948: 7E 00 -F00:4979 MOVE.b d7,FAC_sc(a3) * clear sign compare - S02:0000D94A: 17 47 05 9E -F00:4980 MOVE.b FAC1_e(a3),d7 * get exponent - S02:0000D94E: 1E 2B 05 94 -F00:4981 BEQ LAB_FCER * if 0 do function call error/warm start - S02:0000D952: 67 00 E8 1E -F00:4982 -F00:4983 SUB.l #$81,d7 * normalise exponent - S02:0000D956: 9E BC 00 00 00 81 -F00:4984 MOVE.b #$81,FAC1_e(a3) * force a value between 1 and 2 - S02:0000D95C: 17 7C 00 81 05 94 -F00:4985 MOVE.l FAC1_m(a3),d6 * copy mantissa - S02:0000D962: 2C 2B 05 90 -F00:4986 -F00:4987 MOVE.l #$80000000,FAC2_m(a3) * set mantissa for 1 - S02:0000D966: 27 7C 80 00 00 00 05 98 -F00:4988 MOVE.w #$8100,FAC2_e(a3) * set exponent for 1 - S02:0000D96E: 37 7C 81 00 05 9C -F00:4989 BSR LAB_ADD * find arg+1 - S02:0000D974: 61 00 FF 1A -F00:4990 MOVEQ #0,d0 * setup for calc skip - S02:0000D978: 70 00 -F00:4991 MOVE.w d0,FAC2_e(a3) * set FAC1 for zero result - S02:0000D97A: 37 40 05 9C -F00:4992 ADD.l d6,d6 * shift 1 bit out - S02:0000D97E: DC 86 -F00:4993 MOVE.l d6,FAC2_m(a3) * put back FAC2 - S02:0000D980: 27 46 05 98 -F00:4994 BEQ.s LAB_LONN * if 0 skip calculation - S02:0000D984: 67 58 -F00:4995 -F00:4996 MOVE.w #$8000,FAC2_e(a3) * set exponent for .5 - S02:0000D986: 37 7C 80 00 05 9C -F00:4997 BSR LAB_DIVIDE * do (arg-1)/(arg+1) - S02:0000D98C: 61 00 01 30 -F00:4998 TST.b FAC1_e(a3) * test exponent - S02:0000D990: 4A 2B 05 94 -F00:4999 BEQ.s LAB_LONN * if 0 skip calculation - S02:0000D994: 67 48 -F00:5000 -F00:5001 MOVE.b FAC1_e(a3),d1 * get exponent - S02:0000D996: 12 2B 05 94 -F00:5002 SUB.b #$82,d1 * normalise and two integer bits - S02:0000D99A: 92 3C 00 82 -F00:5003 NEG.b d1 * negate for shift - S02:0000D99E: 44 01 -F00:5004 ** CMP.b #$1F,d1 * will mantissa vanish? -F00:5005 ** BGT.s LAB_dunno * if so do ??? -F00:5006 -F00:5007 MOVE.l FAC1_m(a3),d0 * get mantissa - S02:0000D9A0: 20 2B 05 90 -F00:5008 LSR.l d1,d0 * shift in two integer bits - S02:0000D9A4: E2 A8 -F00:5009 -F00:5010 * d0 = arg -F00:5011 * d0 = x, d1 = y -F00:5012 * d2 = x1, d3 = y1 -F00:5013 * d4 = shift count -F00:5014 * d5 = loop count -F00:5015 * d6 = z -F00:5016 * a0 = table pointer -F00:5017 -F00:5018 MOVEQ #0,d6 * z = 0 - S02:0000D9A6: 7C 00 -F00:5019 MOVE.l #1<<30,d1 * y = 1 - S02:0000D9A8: 22 3C 40 00 00 00 -F00:5020 LEA TAB_HTHET(pc),a0 * get pointer to hyperbolic tangent table - S02:0000D9AE: 41 FA 13 F4 -F00:5021 MOVEQ #30,d5 * loop 31 times - S02:0000D9B2: 7A 1E -F00:5022 MOVEQ #1,d4 * set shift count - S02:0000D9B4: 78 01 -F00:5023 BRA.s LAB_LOCC * entry point for loop - S02:0000D9B6: 60 06 -F00:5024 -F00:5025 LAB_LAAD -F00:5026 ASR.l d4,d2 * x1 >> i - S02:0000D9B8: E8 A2 -F00:5027 SUB.l d2,d1 * y = y - x1 - S02:0000D9BA: 92 82 -F00:5028 ADD.l (a0),d6 * z = z + tanh(i) - S02:0000D9BC: DC 90 -F00:5029 LAB_LOCC -F00:5030 MOVE.l d0,d2 * x1 = x - S02:0000D9BE: 24 00 -F00:5031 MOVE.l d1,d3 * y1 = Y - S02:0000D9C0: 26 01 -F00:5032 ASR.l d4,d3 * y1 >> i - S02:0000D9C2: E8 A3 -F00:5033 BCC.s LAB_LOLP - S02:0000D9C4: 64 02 -F00:5034 -F00:5035 ADDQ.l #1,d3 - S02:0000D9C6: 52 83 -F00:5036 LAB_LOLP -F00:5037 SUB.l d3,d0 * x = x - y1 - S02:0000D9C8: 90 83 -F00:5038 BPL.s LAB_LAAD * branch if > 0 - S02:0000D9CA: 6A EC -F00:5039 -F00:5040 MOVE.l d2,d0 * get x back - S02:0000D9CC: 20 02 -F00:5041 ADDQ.w #4,a0 * next entry - S02:0000D9CE: 58 48 -F00:5042 ADDQ.l #1,d4 * next i - S02:0000D9D0: 52 84 -F00:5043 LSR.l #1,d3 * /2 - S02:0000D9D2: E2 8B -F00:5044 BEQ.s LAB_LOCX * branch y1 = 0 - S02:0000D9D4: 67 04 -F00:5045 -F00:5046 DBF d5,LAB_LOLP * decrement and loop if not done - S02:0000D9D6: 51 CD FF F0 -F00:5047 -F00:5048 * now sort out the result -F00:5049 LAB_LOCX -F00:5050 ADD.l d6,d6 * *2 - S02:0000D9DA: DC 86 -F00:5051 MOVE.l d6,d0 * setup for d7 = 0 - S02:0000D9DC: 20 06 -F00:5052 LAB_LONN -F00:5053 MOVE.l d0,d4 * save cordic result - S02:0000D9DE: 28 00 -F00:5054 MOVEQ #0,d5 * set default exponent sign - S02:0000D9E0: 7A 00 -F00:5055 TST.l d7 * check original exponent sign - S02:0000D9E2: 4A 87 -F00:5056 BEQ.s LAB_LOXO * branch if original was 0 - S02:0000D9E4: 67 16 -F00:5057 -F00:5058 BPL.s LAB_LOXP * branch if was +ve - S02:0000D9E6: 6A 04 -F00:5059 -F00:5060 NEG.l d7 * make original exponent +ve - S02:0000D9E8: 44 87 -F00:5061 MOVEQ #$80-$100,d5 * make sign -ve - S02:0000D9EA: 7A 80 -F00:5062 LAB_LOXP -F00:5063 MOVE.b d5,FAC1_s(a3) * save original exponent sign - S02:0000D9EC: 17 45 05 95 -F00:5064 SWAP d7 * 16 bit shift - S02:0000D9F0: 48 47 -F00:5065 LSL.l #8,d7 * easy first part - S02:0000D9F2: E1 8F -F00:5066 MOVEQ #$88-$100,d5 * start with byte - S02:0000D9F4: 7A 88 -F00:5067 LAB_LONE -F00:5068 SUBQ.l #1,d5 * decrement exponent - S02:0000D9F6: 53 85 -F00:5069 ADD.l d7,d7 * shift mantissa - S02:0000D9F8: DE 87 -F00:5070 BPL.s LAB_LONE * loop if not normal - S02:0000D9FA: 6A FA -F00:5071 -F00:5072 LAB_LOXO -F00:5073 MOVE.l d7,FAC1_m(a3) * save original exponent as mantissa - S02:0000D9FC: 27 47 05 90 -F00:5074 MOVE.b d5,FAC1_e(a3) * save exponent for this - S02:0000DA00: 17 45 05 94 -F00:5075 MOVE.l #$B17217F8,FAC2_m(a3) * LOG(2) mantissa - S02:0000DA04: 27 7C B1 72 17 F8 05 98 -F00:5076 MOVE.w #$8000,FAC2_e(a3) * LOG(2) exponent & sign - S02:0000DA0C: 37 7C 80 00 05 9C -F00:5077 MOVE.b FAC1_s(a3),FAC_sc(a3) * make sign compare = FAC1 sign - S02:0000DA12: 17 6B 05 95 05 9E -F00:5078 BSR.s LAB_MULTIPLY * do multiply - S02:0000DA18: 61 18 -F00:5079 MOVE.l d4,FAC2_m(a3) * save cordic result - S02:0000DA1A: 27 44 05 98 -F00:5080 BEQ.s LAB_LOWZ * branch if zero - S02:0000DA1E: 67 10 -F00:5081 -F00:5082 MOVE.w #$8200,FAC2_e(a3) * set exponent & sign - S02:0000DA20: 37 7C 82 00 05 9C -F00:5083 MOVE.b FAC1_s(a3),FAC_sc(a3) * clear sign compare - S02:0000DA26: 17 6B 05 95 05 9E -F00:5084 BSR LAB_ADD * and add for final result - S02:0000DA2C: 61 00 FE 62 -F00:5085 -F00:5086 LAB_LOWZ -F00:5087 RTS - S02:0000DA30: 4E 75 -F00:5088 -F00:5089 -F00:5090 ************************************************************************************* -F00:5091 * -F00:5092 * multiply FAC1 by FAC2 -F00:5093 -F00:5094 LAB_MULTIPLY -F00:5095 MOVEM.l d0-d4,-(sp) * save registers - S02:0000DA32: 48 E7 F8 00 -F00:5096 TST.b FAC1_e(a3) * test FAC1 exponent - S02:0000DA36: 4A 2B 05 94 -F00:5097 BEQ.s LAB_MUUF * if exponent zero go make result zero - S02:0000DA3A: 67 76 -F00:5098 -F00:5099 MOVE.b FAC2_e(a3),d0 * get FAC2 exponent - S02:0000DA3C: 10 2B 05 9C -F00:5100 BEQ.s LAB_MUUF * if exponent zero go make result zero - S02:0000DA40: 67 70 -F00:5101 -F00:5102 MOVE.b FAC_sc(a3),FAC1_s(a3) * sign compare becomes sign - S02:0000DA42: 17 6B 05 9E 05 95 -F00:5103 -F00:5104 ADD.b FAC1_e(a3),d0 * multiply exponents by adding - S02:0000DA48: D0 2B 05 94 -F00:5105 BCC.s LAB_MNOC * branch if no carry - S02:0000DA4C: 64 0A -F00:5106 -F00:5107 SUB.b #$80,d0 * normalise result - S02:0000DA4E: 90 3C 00 80 -F00:5108 BCC LAB_OFER * if no carry do overflow - S02:0000DA52: 64 00 E7 1A -F00:5109 -F00:5110 BRA.s LAB_MADD * branch - S02:0000DA56: 60 06 -F00:5111 -F00:5112 * no carry for exponent add -F00:5113 LAB_MNOC -F00:5114 SUB.b #$80,d0 * normalise result - S02:0000DA58: 90 3C 00 80 -F00:5115 BCS.s LAB_MUUF * return zero if underflow - S02:0000DA5C: 65 54 -F00:5116 -F00:5117 LAB_MADD -F00:5118 MOVE.b d0,FAC1_e(a3) * save exponent - S02:0000DA5E: 17 40 05 94 -F00:5119 -F00:5120 * d1 (FAC1) x d2 (FAC2) -F00:5121 MOVE.l FAC1_m(a3),d1 * get FAC1 mantissa - S02:0000DA62: 22 2B 05 90 -F00:5122 MOVE.l FAC2_m(a3),d2 * get FAC2 mantissa - S02:0000DA66: 24 2B 05 98 -F00:5123 -F00:5124 MOVE.w d1,d4 * copy low word FAC1 - S02:0000DA6A: 38 01 -F00:5125 MOVE.l d1,d0 * copy long word FAC1 - S02:0000DA6C: 20 01 -F00:5126 SWAP d0 * high word FAC1 to low word FAC1 - S02:0000DA6E: 48 40 -F00:5127 MOVE.w d0,d3 * copy high word FAC1 - S02:0000DA70: 36 00 -F00:5128 -F00:5129 MULU d2,d1 * low word FAC2 x low word FAC1 - S02:0000DA72: C2 C2 -F00:5130 MULU d2,d0 * low word FAC2 x high word FAC1 - S02:0000DA74: C0 C2 -F00:5131 SWAP d2 * high word FAC2 to low word FAC2 - S02:0000DA76: 48 42 -F00:5132 MULU d2,d4 * high word FAC2 x low word FAC1 - S02:0000DA78: C8 C2 -F00:5133 MULU d2,d3 * high word FAC2 x high word FAC1 - S02:0000DA7A: C6 C2 -F00:5134 -F00:5135 * done multiply, now add partial products -F00:5136 -F00:5137 * d1 = aaaa ---- FAC2_L x FAC1_L -F00:5138 * d0 = bbbb aaaa FAC2_L x FAC1_H -F00:5139 * d4 = bbbb aaaa FAC2_H x FAC1_L -F00:5140 * d3 = cccc bbbb FAC2_H x FAC1_H -F00:5141 * product = mmmm mmmm -F00:5142 -F00:5143 ADD.L #$8000,d1 * round up lowest word - S02:0000DA7C: D2 BC 00 00 80 00 -F00:5144 CLR.w d1 * clear low word, don't need it - S02:0000DA82: 42 41 -F00:5145 SWAP d1 * align high word - S02:0000DA84: 48 41 -F00:5146 ADD.l d0,d1 * add FAC2_L x FAC1_H (can't be carry) - S02:0000DA86: D2 80 -F00:5147 LAB_MUF1 -F00:5148 ADD.l d4,d1 * now add intermediate (FAC2_H x FAC1_L) - S02:0000DA88: D2 84 -F00:5149 BCC.s LAB_MUF2 * branch if no carry - S02:0000DA8A: 64 06 -F00:5150 -F00:5151 ADD.l #$10000,d3 * else correct result - S02:0000DA8C: D6 BC 00 01 00 00 -F00:5152 LAB_MUF2 -F00:5153 ADD.l #$8000,d1 * round up low word - S02:0000DA92: D2 BC 00 00 80 00 -F00:5154 CLR.w d1 * clear low word - S02:0000DA98: 42 41 -F00:5155 SWAP d1 * align for final add - S02:0000DA9A: 48 41 -F00:5156 ADD.l d3,d1 * add FAC2_H x FAC1_H, result - S02:0000DA9C: D2 83 -F00:5157 BMI.s LAB_MUF3 * branch if normalisation not needed - S02:0000DA9E: 6B 08 -F00:5158 -F00:5159 ADD.l d1,d1 * shift mantissa - S02:0000DAA0: D2 81 -F00:5160 SUBQ.b #1,FAC1_e(a3) * adjust exponent - S02:0000DAA2: 53 2B 05 94 -F00:5161 BEQ.s LAB_MUUF * branch if underflow - S02:0000DAA6: 67 0A -F00:5162 -F00:5163 LAB_MUF3 -F00:5164 MOVE.l d1,FAC1_m(a3) * save mantissa - S02:0000DAA8: 27 41 05 90 -F00:5165 LAB_MUEX -F00:5166 MOVEM.l (sp)+,d0-d4 * restore registers - S02:0000DAAC: 4C DF 00 1F -F00:5167 RTS - S02:0000DAB0: 4E 75 -F00:5168 * either zero or underflow result -F00:5169 LAB_MUUF -F00:5170 MOVEQ #0,d0 * quick clear - S02:0000DAB2: 70 00 -F00:5171 MOVE.l d0,FAC1_m(a3) * clear mantissa - S02:0000DAB4: 27 40 05 90 -F00:5172 MOVE.w d0,FAC1_e(a3) * clear sign and exponent - S02:0000DAB8: 37 40 05 94 -F00:5173 BRA.s LAB_MUEX * restore regs & exit - S02:0000DABC: 60 EE -F00:5174 -F00:5175 -F00:5176 ************************************************************************************* -F00:5177 * -F00:5178 * do FAC2/FAC1, result in FAC1 -F00:5179 * fast hardware divide version -F00:5180 -F00:5181 LAB_DIVIDE -F00:5182 MOVE.l d7,-(sp) * save d7 - S02:0000DABE: 2F 07 -F00:5183 MOVEQ #0,d0 * clear FAC2 exponent - S02:0000DAC0: 70 00 -F00:5184 MOVE.l d0,d2 * clear FAC1 exponent - S02:0000DAC2: 24 00 -F00:5185 -F00:5186 MOVE.b FAC1_e(a3),d2 * get FAC1 exponent - S02:0000DAC4: 14 2B 05 94 -F00:5187 BEQ LAB_DZER * if zero go do /0 error - S02:0000DAC8: 67 00 E6 90 -F00:5188 -F00:5189 MOVE.b FAC2_e(a3),d0 * get FAC2 exponent - S02:0000DACC: 10 2B 05 9C -F00:5190 BEQ.s LAB_DIV0 * if zero return zero - S02:0000DAD0: 67 66 -F00:5191 -F00:5192 SUB.w d2,d0 * get result exponent by subtracting - S02:0000DAD2: 90 42 -F00:5193 ADD.w #$80,d0 * correct 16 bit exponent result - S02:0000DAD4: D0 7C 00 80 -F00:5194 -F00:5195 MOVE.b FAC_sc(a3),FAC1_s(a3) * sign compare is result sign - S02:0000DAD8: 17 6B 05 9E 05 95 -F00:5196 -F00:5197 * now to do 32/32 bit mantissa divide -F00:5198 -F00:5199 CLR.b flag(a3) * clear 'flag' byte - S02:0000DADE: 42 2B 05 9F -F00:5200 MOVE.l FAC1_m(a3),d3 * get FAC1 mantissa - S02:0000DAE2: 26 2B 05 90 -F00:5201 MOVE.l FAC2_m(a3),d4 * get FAC2 mantissa - S02:0000DAE6: 28 2B 05 98 -F00:5202 CMP.l d3,d4 * compare FAC2 with FAC1 mantissa - S02:0000DAEA: B8 83 -F00:5203 BEQ.s LAB_MAN1 * set mantissa result = 1 if equal - S02:0000DAEC: 67 44 -F00:5204 -F00:5205 BCS.s AC1gtAC2 * branch if FAC1 > FAC2 - S02:0000DAEE: 65 06 -F00:5206 -F00:5207 SUB.l d3,d4 * subtract FAC1 from FAC2, result now must be <1 - S02:0000DAF0: 98 83 -F00:5208 ADDQ.b #3,flag(a3) * FAC2>FAC1 so set 'flag' byte - S02:0000DAF2: 56 2B 05 9F -F00:5209 AC1gtAC2 -F00:5210 BSR.s LAB_32_16 * do 32/16 divide - S02:0000DAF6: 61 46 -F00:5211 SWAP d1 * move 16 bit result to high word - S02:0000DAF8: 48 41 -F00:5212 MOVE.l d2,d4 * copy remainder longword - S02:0000DAFA: 28 02 -F00:5213 BSR.s LAB_3216 * do 32/16 divide again (skip copy d4 to d2) - S02:0000DAFC: 61 42 -F00:5214 DIVU.w d5,d2 * now divide remainder to make guard word - S02:0000DAFE: 84 C5 -F00:5215 MOVE.b flag(a3),d7 * now normalise, get flag byte back - S02:0000DB00: 1E 2B 05 9F -F00:5216 BEQ.s LAB_DIVX * skip add if null - S02:0000DB04: 67 08 -F00:5217 -F00:5218 * else result was >1 so we need to add 1 to result mantissa and adjust exponent -F00:5219 -F00:5220 LSR.b #1,d7 * shift 1 into eXtend - S02:0000DB06: E2 0F -F00:5221 ROXR.l #1,d1 * shift extend result >> - S02:0000DB08: E2 91 -F00:5222 ROXR.w #1,d2 * shift extend guard word >> - S02:0000DB0A: E2 52 -F00:5223 ADDQ.b #1,d0 * adjust exponent - S02:0000DB0C: 52 00 -F00:5224 -F00:5225 * now round result to 32 bits -F00:5226 -F00:5227 LAB_DIVX -F00:5228 ADD.w d2,d2 * guard bit into eXtend bit - S02:0000DB0E: D4 42 -F00:5229 BCC.s L_DIVRND * branch if guard=0 - S02:0000DB10: 64 08 -F00:5230 -F00:5231 ADDQ.l #1,d1 * add guard to mantissa - S02:0000DB12: 52 81 -F00:5232 BCC.s L_DIVRND * branch if no overflow - S02:0000DB14: 64 04 -F00:5233 -F00:5234 LAB_SET1 -F00:5235 ROXR.l #1,d1 * shift extend result >> - S02:0000DB16: E2 91 -F00:5236 ADDQ.w #1,d0 * adjust exponent - S02:0000DB18: 52 40 -F00:5237 -F00:5238 * test for over/under flow -F00:5239 L_DIVRND -F00:5240 MOVE.w d0,d3 * copy exponent - S02:0000DB1A: 36 00 -F00:5241 BMI.s LAB_DIV0 * if -ve return zero - S02:0000DB1C: 6B 1A -F00:5242 -F00:5243 ANDI.w #$FF00,d3 * mask word high byte - S02:0000DB1E: 02 43 FF 00 -F00:5244 BNE LAB_OFER * branch if overflow - S02:0000DB22: 66 00 E6 4A -F00:5245 -F00:5246 * move result into FAC1 -F00:5247 LAB_XDIV -F00:5248 MOVE.l (sp)+,d7 * restore d7 - S02:0000DB26: 2E 1F -F00:5249 MOVE.b d0,FAC1_e(a3) * save result exponent - S02:0000DB28: 17 40 05 94 -F00:5250 MOVE.l d1,FAC1_m(a3) * save result mantissa - S02:0000DB2C: 27 41 05 90 -F00:5251 RTS - S02:0000DB30: 4E 75 -F00:5252 -F00:5253 * FAC1 mantissa = FAC2 mantissa so set result mantissa -F00:5254 -F00:5255 LAB_MAN1 -F00:5256 MOVEQ #1,d1 * set bit - S02:0000DB32: 72 01 -F00:5257 LSR.l d1,d1 * bit into eXtend - S02:0000DB34: E2 A9 -F00:5258 BRA.s LAB_SET1 * set mantissa, adjust exponent and exit - S02:0000DB36: 60 DE -F00:5259 -F00:5260 * result is zero -F00:5261 -F00:5262 LAB_DIV0 -F00:5263 MOVEQ #0,d0 * zero exponent & sign - S02:0000DB38: 70 00 -F00:5264 MOVE.l d0,d1 * zero mantissa - S02:0000DB3A: 22 00 -F00:5265 BRA LAB_XDIV * exit divide - S02:0000DB3C: 60 E8 -F00:5266 -F00:5267 * divide 16 bits into 32, AB/Ex -F00:5268 * -F00:5269 * d4 AAAA BBBB * 32 bit numerator -F00:5270 * d3 EEEE xxxx * 16 bit denominator -F00:5271 * -F00:5272 * returns - -F00:5273 * -F00:5274 * d1 xxxx DDDD * 16 bit result -F00:5275 * d2 HHHH IIII * 32 bit remainder -F00:5276 -F00:5277 LAB_32_16 -F00:5278 MOVE.l d4,d2 * copy FAC2 mantissa (AB) - S02:0000DB3E: 24 04 -F00:5279 LAB_3216 -F00:5280 MOVE.l d3,d5 * copy FAC1 mantissa (EF) - S02:0000DB40: 2A 03 -F00:5281 CLR.w d5 * clear low word d1 (Ex) - S02:0000DB42: 42 45 -F00:5282 SWAP d5 * swap high word to low word (xE) - S02:0000DB44: 48 45 -F00:5283 -F00:5284 * d3 EEEE FFFF * denominator copy -F00:5285 * d5 0000 EEEE * denominator high word -F00:5286 * d2 AAAA BBBB * numerator copy -F00:5287 * d4 AAAA BBBB * numerator -F00:5288 -F00:5289 DIVU.w d5,d4 * do FAC2/FAC1 high word (AB/E) - S02:0000DB46: 88 C5 -F00:5290 BVC.s LAB_LT_1 * if no overflow DIV was ok - S02:0000DB48: 68 02 -F00:5291 -F00:5292 MOVEQ #-1,d4 * else set default value - S02:0000DB4A: 78 FF -F00:5293 -F00:5294 * done the divide, now check the result, we have ... -F00:5295 -F00:5296 * d3 EEEE FFFF * denominator copy -F00:5297 * d5 0000 EEEE * denominator high word -F00:5298 * d2 AAAA BBBB * numerator copy -F00:5299 * d4 MMMM DDDD * result MOD and DIV -F00:5300 -F00:5301 LAB_LT_1 -F00:5302 MOVE.w d4,d6 * copy 16 bit result - S02:0000DB4C: 3C 04 -F00:5303 MOVE.w d4,d1 * copy 16 bit result again - S02:0000DB4E: 32 04 -F00:5304 -F00:5305 * we now have .. -F00:5306 * d3 EEEE FFFF * denominator copy -F00:5307 * d5 0000 EEEE * denominator high word -F00:5308 * d6 xxxx DDDD * result DIV copy -F00:5309 * d1 xxxx DDDD * result DIV copy -F00:5310 * d2 AAAA BBBB * numerator copy -F00:5311 * d4 MMMM DDDD * result MOD and DIV -F00:5312 -F00:5313 * now multiply out 32 bit denominator by 16 bit result -F00:5314 * QRS = AB*D -F00:5315 -F00:5316 MULU.w d3,d6 * FFFF * DDDD = rrrr SSSS - S02:0000DB50: CC C3 -F00:5317 MULU.w d5,d4 * EEEE * DDDD = QQQQ rrrr - S02:0000DB52: C8 C5 -F00:5318 -F00:5319 * we now have .. -F00:5320 * d3 EEEE FFFF * denominator copy -F00:5321 * d5 0000 EEEE * denominator high word -F00:5322 * d6 rrrr SSSS * 48 bit result partial low -F00:5323 * d1 xxxx DDDD * result DIV copy -F00:5324 * d2 AAAA BBBB * numerator copy -F00:5325 * d4 QQQQ rrrr * 48 bit result partial -F00:5326 -F00:5327 MOVE.w d6,d7 * copy low word of low multiply - S02:0000DB54: 3E 06 -F00:5328 -F00:5329 * d7 xxxx SSSS * 48 bit result partial low -F00:5330 -F00:5331 CLR.w d6 * clear low word of low multiply - S02:0000DB56: 42 46 -F00:5332 SWAP d6 * high word of low multiply to low word - S02:0000DB58: 48 46 -F00:5333 -F00:5334 * d6 0000 rrrr * high word of 48 bit result partial low -F00:5335 -F00:5336 ADD.l d6,d4 - S02:0000DB5A: D8 86 -F00:5337 -F00:5338 * d4 QQQQ RRRR * 48 bit result partial high longword -F00:5339 -F00:5340 MOVEQ #0,d6 * clear to extend numerator to 48 bits - S02:0000DB5C: 7C 00 -F00:5341 -F00:5342 * now do GHI = AB0 - QRS (which is the remainder) -F00:5343 -F00:5344 SUB.w d7,d6 * low word subtract - S02:0000DB5E: 9C 47 -F00:5345 -F00:5346 * d6 xxxx IIII * remainder low word -F00:5347 -F00:5348 SUBX.l d4,d2 * high longword subtract - S02:0000DB60: 95 84 -F00:5349 -F00:5350 * d2 GGGG HHHH * remainder high longword -F00:5351 -F00:5352 * now if we got the divide correct then the remainder high longword will be +ve -F00:5353 -F00:5354 BPL.s L_DDIV * branch if result is ok ( FAC2 -F00:5550 * returns d0= 0 Cb=0 if FAC1 = FAC2 -F00:5551 * returns d0=-1 Cb=1 if FAC1 < FAC2 -F00:5552 -F00:5553 LAB_27FA -F00:5554 MOVE.b FAC2_e(a3),d1 * get FAC2 exponent - S02:0000DC38: 12 2B 05 9C -F00:5555 BEQ.s LAB_27CA * branch if FAC2 exponent=0 & get FAC1 sign - S02:0000DC3C: 67 C8 -F00:5556 * d0=-1,C=1/-ve d0=+1,C=0/+ve -F00:5557 -F00:5558 MOVE.b FAC_sc(a3),d0 * get FAC sign compare - S02:0000DC3E: 10 2B 05 9E -F00:5559 BMI.s LAB_27CE * if signs <> do return d0=-1,C=1/-ve - S02:0000DC42: 6B CA -F00:5560 * d0=+1,C=0/+ve & return -F00:5561 -F00:5562 MOVE.b FAC1_s(a3),d0 * get FAC1 sign - S02:0000DC44: 10 2B 05 95 -F00:5563 CMP.b FAC1_e(a3),d1 * compare FAC1 exponent with FAC2 exponent - S02:0000DC48: B2 2B 05 94 -F00:5564 BNE.s LAB_2828 * branch if different - S02:0000DC4C: 66 0A -F00:5565 -F00:5566 MOVE.l FAC2_m(a3),d1 * get FAC2 mantissa - S02:0000DC4E: 22 2B 05 98 -F00:5567 CMP.l FAC1_m(a3),d1 * compare mantissas - S02:0000DC52: B2 AB 05 90 -F00:5568 BEQ.s LAB_282F * exit if mantissas equal - S02:0000DC56: 67 08 -F00:5569 -F00:5570 * gets here if number <> FAC1 -F00:5571 -F00:5572 LAB_2828 -F00:5573 BCS.s LAB_27D0 * if FAC1 > FAC2 return d0=-1,C=1/-ve d0=+1, - S02:0000DC58: 65 B8 -F00:5574 * C=0/+ve -F00:5575 -F00:5576 EORI.b #$80,d0 * else toggle FAC1 sign - S02:0000DC5A: 0A 00 00 80 -F00:5577 LAB_282E -F00:5578 BRA.s LAB_27D0 * return d0=-1,C=1/-ve d0=+1,C=0/+ve - S02:0000DC5E: 60 B2 -F00:5579 -F00:5580 LAB_282F -F00:5581 MOVEQ #0,d0 * clear result - S02:0000DC60: 70 00 -F00:5582 RTS - S02:0000DC62: 4E 75 -F00:5583 -F00:5584 -F00:5585 ************************************************************************************* -F00:5586 * -F00:5587 * convert FAC1 floating to fixed -F00:5588 * result in d0 and Itemp, sets flags correctly -F00:5589 -F00:5590 LAB_2831 -F00:5591 MOVE.l FAC1_m(a3),d0 * copy mantissa - S02:0000DC64: 20 2B 05 90 -F00:5592 BEQ.s LAB_284J * branch if mantissa = 0 - S02:0000DC68: 67 30 -F00:5593 -F00:5594 MOVE.l d1,-(sp) * save d1 - S02:0000DC6A: 2F 01 -F00:5595 E2028 MOVEQ #$A0,d1 * set for no floating bits - S02:0000DC6C: 72 A0 -F00:5596 SUB.b FAC1_e(a3),d1 * subtract FAC1 exponent - S02:0000DC6E: 92 2B 05 94 -F00:5597 BCS LAB_OFER * do overflow if too big - S02:0000DC72: 65 00 E4 FA -F00:5598 -F00:5599 BNE.s LAB_284G * branch if exponent was not $A0 - S02:0000DC76: 66 0E -F00:5600 -F00:5601 TST.b FAC1_s(a3) * test FAC1 sign - S02:0000DC78: 4A 2B 05 95 -F00:5602 BPL.s LAB_284H * branch if FAC1 +ve - S02:0000DC7C: 6A 1A -F00:5603 -F00:5604 NEG.l d0 - S02:0000DC7E: 44 80 -F00:5605 BVS.s LAB_284H * branch if was $80000000 - S02:0000DC80: 69 16 -F00:5606 -F00:5607 BRA LAB_OFER * do overflow if too big - S02:0000DC82: 60 00 E4 EA -F00:5608 -F00:5609 LAB_284G -F00:5610 CMP.b #$20,d1 * compare with minimum result for integer - S02:0000DC86: B2 3C 00 20 -F00:5611 BCS.s LAB_284L * if < minimum just do shift - S02:0000DC8A: 65 02 -F00:5612 -F00:5613 MOVEQ #0,d0 * else return zero - S02:0000DC8C: 70 00 -F00:5614 LAB_284L -F00:5615 LSR.l d1,d0 * shift integer - S02:0000DC8E: E2 A8 -F00:5616 -F00:5617 TST.b FAC1_s(a3) * test FAC1 sign (b7) - S02:0000DC90: 4A 2B 05 95 -F00:5618 BPL.s LAB_284H * branch if FAC1 +ve - S02:0000DC94: 6A 02 -F00:5619 -F00:5620 NEG.l d0 * negate integer value - S02:0000DC96: 44 80 -F00:5621 LAB_284H -F00:5622 MOVE.l (sp)+,d1 * restore d1 - S02:0000DC98: 22 1F -F00:5623 LAB_284J -F00:5624 MOVE.l d0,Itemp(a3) * save result to Itemp - S02:0000DC9A: 27 40 04 2A -F00:5625 RTS - S02:0000DC9E: 4E 75 -F00:5626 -F00:5627 -F00:5628 ************************************************************************************* -F00:5629 * -F00:5630 * perform INT() -F00:5631 -F00:5632 LAB_INT -F00:5633 E2028 MOVEQ #$A0,d0 * set for no floating bits - S02:0000DCA0: 70 A0 -F00:5634 SUB.b FAC1_e(a3),d0 * subtract FAC1 exponent - S02:0000DCA2: 90 2B 05 94 -F00:5635 BLS.s LAB_IRTS * exit if exponent >= $A0 - S02:0000DCA6: 63 10 -F00:5636 * (too big for fraction part!) -F00:5637 -F00:5638 CMP.b #$20,d0 * compare with minimum result for integer - S02:0000DCA8: B0 3C 00 20 -F00:5639 BCC LAB_POZE * if >= minimum go return 0 - S02:0000DCAC: 64 00 02 5E -F00:5640 * (too small for integer part!) -F00:5641 -F00:5642 MOVEQ #-1,d1 * set integer mask - S02:0000DCB0: 72 FF -F00:5643 ASL.l d0,d1 * shift mask [8+2*d0] - S02:0000DCB2: E1 A1 -F00:5644 AND.l d1,FAC1_m(a3) * mask mantissa - S02:0000DCB4: C3 AB 05 90 -F00:5645 LAB_IRTS -F00:5646 RTS - S02:0000DCB8: 4E 75 -F00:5647 -F00:5648 -F00:5649 ************************************************************************************* -F00:5650 * -F00:5651 * print " in line [LINE #]" -F00:5652 -F00:5653 LAB_2953 -F00:5654 LEA LAB_LMSG(pc),a0 * point to " in line " message - S02:0000DCBA: 41 FA 17 F0 -F00:5655 BSR LAB_18C3 * print null terminated string - S02:0000DCBE: 61 00 ED 30 -F00:5656 -F00:5657 * Print Basic line # -F00:5658 MOVE.l Clinel(a3),d0 * get current line - S02:0000DCC2: 20 2B 04 52 -F00:5659 -F00:5660 -F00:5661 ************************************************************************************* -F00:5662 * -F00:5663 * print d0 as unsigned integer -F00:5664 -F00:5665 LAB_295E -F00:5666 LEA Bin2dec(pc),a1 * get table address - S02:0000DCC6: 43 FA 0D DE -F00:5667 MOVEQ #0,d1 * table index - S02:0000DCCA: 72 00 -F00:5668 LEA Usdss(a3),a0 * output string start - S02:0000DCCC: 41 EB 05 CC -F00:5669 MOVE.l d1,d2 * output string index - S02:0000DCD0: 24 01 -F00:5670 LAB_2967 -F00:5671 MOVE.l (a1,d1.w),d3 * get table value - S02:0000DCD2: 26 31 10 00 -F00:5672 BEQ.s LAB_2969 * exit if end marker - S02:0000DCD6: 67 14 -F00:5673 -F00:5674 MOVEQ #'0'-1,d4 * set character to "0"-1 - S02:0000DCD8: 78 2F -F00:5675 LAB_2968 -F00:5676 ADDQ.w #1,d4 * next numeric character - S02:0000DCDA: 52 44 -F00:5677 SUB.l d3,d0 * subtract table value - S02:0000DCDC: 90 83 -F00:5678 BPL.s LAB_2968 * not overdone so loop - S02:0000DCDE: 6A FA -F00:5679 -F00:5680 ADD.l d3,d0 * correct value - S02:0000DCE0: D0 83 -F00:5681 MOVE.b d4,(a0,d2.w) * character out to string - S02:0000DCE2: 11 84 20 00 -F00:5682 ADDQ.w #4,d1 * increment table pointer - S02:0000DCE6: 58 41 -F00:5683 ADDQ.w #1,d2 * increment output string pointer - S02:0000DCE8: 52 42 -F00:5684 BRA.s LAB_2967 * loop - S02:0000DCEA: 60 E6 -F00:5685 -F00:5686 LAB_2969 -F00:5687 ADD.b #'0',d0 * make last character - S02:0000DCEC: D0 3C 00 30 -F00:5688 MOVE.b d0,(a0,d2.w) * character out to string - S02:0000DCF0: 11 80 20 00 -F00:5689 SUBQ.w #1,a0 * decrement a0 (allow simple loop) - S02:0000DCF4: 53 48 -F00:5690 -F00:5691 * now find non zero start of string -F00:5692 LAB_296A -F00:5693 ADDQ.w #1,a0 * increment a0 (this will never carry to b16) - S02:0000DCF6: 52 48 -F00:5694 LEA BHsend-1(a3),a1 * get string end - S02:0000DCF8: 43 EB 05 D5 -F00:5695 CMPA.l a1,a0 * are we at end - S02:0000DCFC: B1 C9 -F00:5696 BEQ LAB_18C3 * if so print null terminated string and RETURN - S02:0000DCFE: 67 00 EC F0 -F00:5697 -F00:5698 CMPI.b #'0',(a0) * is character "0" ? - S02:0000DD02: 0C 10 00 30 -F00:5699 BEQ.s LAB_296A * loop if so - S02:0000DD06: 67 EE -F00:5700 -F00:5701 BRA LAB_18C3 * print null terminated string from memory & RET - S02:0000DD08: 60 00 EC E6 -F00:5702 -F00:5703 -F00:5704 ************************************************************************************* -F00:5705 * -F00:5706 * convert FAC1 to ASCII string result in (a0) -F00:5707 * STR$() function enters here -F00:5708 -F00:5709 * now outputs 7 significant digits -F00:5710 -F00:5711 * d0 is character out -F00:5712 * d1 is save index -F00:5713 * d2 is gash -F00:5714 -F00:5715 * a0 is output string pointer -F00:5716 -F00:5717 LAB_2970 -F00:5718 LEA Decss(a3),a1 * set output string start - S02:0000DD0C: 43 EB 05 C6 -F00:5719 -F00:5720 MOVEQ #' ',d2 * character = " ", assume +ve - S02:0000DD10: 74 20 -F00:5721 BCLR.b #7,FAC1_s(a3) * test and clear FAC1 sign (b7) - S02:0000DD12: 08 AB 00 07 05 95 -F00:5722 BEQ.s LAB_2978 * branch if +ve - S02:0000DD18: 67 02 -F00:5723 -F00:5724 MOVEQ #'-',d2 * else character = "-" - S02:0000DD1A: 74 2D -F00:5725 LAB_2978 -F00:5726 MOVE.b d2,(a1) * save the sign character - S02:0000DD1C: 12 82 -F00:5727 MOVE.b FAC1_e(a3),d2 * get FAC1 exponent - S02:0000DD1E: 14 2B 05 94 -F00:5728 BNE.s LAB_2989 * branch if FAC1<>0 - S02:0000DD22: 66 08 -F00:5729 -F00:5730 * exponent was $00 so FAC1 is 0 -F00:5731 MOVEQ #'0',d0 * set character = "0" - S02:0000DD24: 70 30 -F00:5732 MOVEQ #1,d1 * set output string index - S02:0000DD26: 72 01 -F00:5733 BRA LAB_2A89 * save last character, [EOT] & exit - S02:0000DD28: 60 00 01 A4 -F00:5734 -F00:5735 * FAC1 is some non zero value -F00:5736 LAB_2989 -F00:5737 MOVE.b #0,numexp(a3) * clear number exponent count - S02:0000DD2C: 17 7C 00 00 05 AC -F00:5738 CMP.b #$81,d2 * compare FAC1 exponent with $81 (>1.00000) - S02:0000DD32: B4 3C 00 81 -F00:5739 -F00:5740 BCC.s LAB_299C * branch if FAC1=>1 - S02:0000DD36: 64 48 -F00:5741 -F00:5742 * else FAC1 < 1 -F00:5743 MOVE.l #$98968000,FAC2_m(a3) * 10000000 mantissa - S02:0000DD38: 27 7C 98 96 80 00 05 98 -F00:5744 MOVE.w #$9800,FAC2_e(a3) * 10000000 exponent & sign - S02:0000DD40: 37 7C 98 00 05 9C -F00:5745 MOVE.b FAC1_s(a3),FAC_sc(a3) * make FAC1 sign sign compare - S02:0000DD46: 17 6B 05 95 05 9E -F00:5746 BSR LAB_MULTIPLY * do FAC2*FAC1 - S02:0000DD4C: 61 00 FC E4 -F00:5747 -F00:5748 MOVE.b #$F9,numexp(a3) * set number exponent count (-7) - S02:0000DD50: 17 7C 00 F9 05 AC -F00:5749 BRA.s LAB_299C * go test for fit - S02:0000DD56: 60 28 -F00:5750 -F00:5751 LAB_29B9 -F00:5752 MOVE.w FAC1_e(a3),FAC2_e(a3) * copy exponent & sign from FAC1 to FAC2 - S02:0000DD58: 37 6B 05 94 05 9C -F00:5753 MOVE.l FAC1_m(a3),FAC2_m(a3) * copy FAC1 mantissa to FAC2 mantissa - S02:0000DD5E: 27 6B 05 90 05 98 -F00:5754 MOVE.b FAC1_s(a3),FAC_sc(a3) * save FAC1_s as sign compare - S02:0000DD64: 17 6B 05 95 05 9E -F00:5755 -F00:5756 MOVE.l #$CCCCCCCD,FAC1_m(a3) * 1/10 mantissa - S02:0000DD6A: 27 7C CC CC CC CD 05 90 -F00:5757 MOVE.w #$7D00,FAC1_e(a3) * 1/10 exponent & sign - S02:0000DD72: 37 7C 7D 00 05 94 -F00:5758 BSR LAB_MULTIPLY * do FAC2*FAC1, effectively divide by 10 but - S02:0000DD78: 61 00 FC B8 -F00:5759 * faster -F00:5760 -F00:5761 ADDQ.b #1,numexp(a3) * increment number exponent count - S02:0000DD7C: 52 2B 05 AC -F00:5762 LAB_299C -F00:5763 MOVE.l #$98967F70,FAC2_m(a3) * 9999999.4375 mantissa - S02:0000DD80: 27 7C 98 96 7F 70 05 98 -F00:5764 MOVE.w #$9800,FAC2_e(a3) * 9999999.4375 exponent & sign - S02:0000DD88: 37 7C 98 00 05 9C -F00:5765 * (max before scientific notation) -F00:5766 BSR LAB_27F0 * fast compare FAC1 with FAC2 - S02:0000DD8E: 61 00 01 4C -F00:5767 * returns d0=+1 C=0 if FAC1 > FAC2 -F00:5768 * returns d0= 0 C=0 if FAC1 = FAC2 -F00:5769 * returns d0=-1 C=1 if FAC1 < FAC2 -F00:5770 BHI.s LAB_29B9 * go do /10 if FAC1 > 9999999.4375 - S02:0000DD92: 62 C4 -F00:5771 -F00:5772 BEQ.s LAB_29C3 * branch if FAC1 = 9999999.4375 - S02:0000DD94: 67 50 -F00:5773 -F00:5774 * FAC1 < 9999999.4375 -F00:5775 MOVE.l #$F423F800,FAC2_m(a3) * set mantissa for 999999.5 - S02:0000DD96: 27 7C F4 23 F8 00 05 98 -F00:5776 MOVE.w #$9400,FAC2_e(a3) * set exponent for 999999.5 - S02:0000DD9E: 37 7C 94 00 05 9C -F00:5777 -F00:5778 LEA FAC1_m(a3),a0 * set pointer for x10 - S02:0000DDA4: 41 EB 05 90 -F00:5779 LAB_29A7 -F00:5780 BSR LAB_27F0 * fast compare FAC1 with FAC2 - S02:0000DDA8: 61 00 01 32 -F00:5781 * returns d0=+1 C=0 if FAC1 > FAC2 -F00:5782 * returns d0= 0 C=0 if FAC1 = FAC2 -F00:5783 * returns d0=-1 C=1 if FAC1 < FAC2 -F00:5784 BHI.s LAB_29C0 * branch if FAC1 > 99999.9375,no decimal places - S02:0000DDAC: 62 20 -F00:5785 -F00:5786 * FAC1 <= 999999.5 so do x 10 -F00:5787 MOVE.l (a0),d0 * get FAC1 mantissa - S02:0000DDAE: 20 10 -F00:5788 MOVE.b 4(a0),d1 * get FAC1 exponent - S02:0000DDB0: 12 28 00 04 -F00:5789 MOVE.l d0,d2 * copy it - S02:0000DDB4: 24 00 -F00:5790 LSR.l #2,d0 * /4 - S02:0000DDB6: E4 88 -F00:5791 ADD.l d2,d0 * add FAC1 (x1.125) - S02:0000DDB8: D0 82 -F00:5792 BCC.s LAB_29B7 * branch if no carry - S02:0000DDBA: 64 04 -F00:5793 -F00:5794 ROXR.l #1,d0 * shift carry back in - S02:0000DDBC: E2 90 -F00:5795 ADDQ.b #1,d1 * increment exponent (never overflows) - S02:0000DDBE: 52 01 -F00:5796 LAB_29B7 -F00:5797 ADDQ.b #3,d1 * correct exponent ( 8 x 1.125 = 10 ) - S02:0000DDC0: 56 01 -F00:5798 * (never overflows) -F00:5799 MOVE.l d0,(a0) * save new mantissa - S02:0000DDC2: 20 80 -F00:5800 MOVE.b d1,4(a0) * save new exponent - S02:0000DDC4: 11 41 00 04 -F00:5801 SUBQ.b #1,numexp(a3) * decrement number exponent count - S02:0000DDC8: 53 2B 05 AC -F00:5802 BRA.s LAB_29A7 * go test again - S02:0000DDCC: 60 DA -F00:5803 -F00:5804 * now we have just the digits to do -F00:5805 LAB_29C0 -F00:5806 MOVE.l #$80000000,FAC2_m(a3) * set mantissa for 0.5 - S02:0000DDCE: 27 7C 80 00 00 00 05 98 -F00:5807 MOVE.w #$8000,FAC2_e(a3) * set exponent for 0.5 - S02:0000DDD6: 37 7C 80 00 05 9C -F00:5808 MOVE.b FAC1_s(a3),FAC_sc(a3) * sign compare = sign - S02:0000DDDC: 17 6B 05 95 05 9E -F00:5809 BSR LAB_ADD * add the 0.5 to FAC1 (round FAC1) - S02:0000DDE2: 61 00 FA AC -F00:5810 -F00:5811 LAB_29C3 -F00:5812 BSR LAB_2831 * convert FAC1 floating to fixed - S02:0000DDE6: 61 00 FE 7C -F00:5813 * result in d0 and Itemp -F00:5814 MOVEQ #$01,d2 * set default digits before dp = 1 - S02:0000DDEA: 74 01 -F00:5815 MOVE.b numexp(a3),d0 * get number exponent count - S02:0000DDEC: 10 2B 05 AC -F00:5816 ADD.b #8,d0 * allow 7 digits before point - S02:0000DDF0: 50 00 -F00:5817 BMI.s LAB_29D9 * if -ve then 1 digit before dp - S02:0000DDF2: 6B 0C -F00:5818 -F00:5819 CMP.b #$09,d0 * d0>=9 if n>=1E7 - S02:0000DDF4: B0 3C 00 09 -F00:5820 BCC.s LAB_29D9 * branch if >= $09 - S02:0000DDF8: 64 06 -F00:5821 -F00:5822 * < $08 -F00:5823 SUBQ.b #1,d0 * take 1 from digit count - S02:0000DDFA: 53 00 -F00:5824 MOVE.b d0,d2 * copy byte - S02:0000DDFC: 14 00 -F00:5825 MOVEQ #$02,d0 * set exponent adjust - S02:0000DDFE: 70 02 -F00:5826 LAB_29D9 -F00:5827 MOVEQ #0,d1 * set output string index - S02:0000DE00: 72 00 -F00:5828 SUBQ.b #2,d0 * -2 - S02:0000DE02: 55 00 -F00:5829 MOVE.b d0,expcnt(a3) * save exponent adjust - S02:0000DE04: 17 40 05 AD -F00:5830 MOVE.b d2,numexp(a3) * save digits before dp count - S02:0000DE08: 17 42 05 AC -F00:5831 MOVE.b d2,d0 * copy digits before dp count - S02:0000DE0C: 10 02 -F00:5832 BEQ.s LAB_29E4 * branch if no digits before dp - S02:0000DE0E: 67 02 -F00:5833 -F00:5834 BPL.s LAB_29F7 * branch if digits before dp - S02:0000DE10: 6A 14 -F00:5835 -F00:5836 LAB_29E4 -F00:5837 ADDQ.l #1,d1 * increment index - S02:0000DE12: 52 81 -F00:5838 MOVE.b #'.',(a1,d1.w) * save to output string - S02:0000DE14: 13 BC 00 2E 10 00 -F00:5839 -F00:5840 TST.b d2 * test digits before dp count - S02:0000DE1A: 4A 02 -F00:5841 BEQ.s LAB_29F7 * branch if no digits before dp - S02:0000DE1C: 67 08 -F00:5842 -F00:5843 ADDQ.l #1,d1 * increment index - S02:0000DE1E: 52 81 -F00:5844 MOVE.b #'0',(a1,d1.w) * save to output string - S02:0000DE20: 13 BC 00 30 10 00 -F00:5845 LAB_29F7 -F00:5846 MOVEQ #0,d2 * clear index (point to 1,000,000) - S02:0000DE26: 74 00 -F00:5847 MOVEQ #$80-$100,d0 * set output character - S02:0000DE28: 70 80 -F00:5848 LAB_29FB -F00:5849 LEA LAB_2A9A(pc),a0 * get base of table - S02:0000DE2A: 41 FA 11 14 -F00:5850 MOVE.l (a0,d2.w),d3 * get table value - S02:0000DE2E: 26 30 20 00 -F00:5851 LAB_29FD -F00:5852 ADDQ.b #1,d0 * increment output character - S02:0000DE32: 52 00 -F00:5853 ADD.l d3,Itemp(a3) * add to (now fixed) mantissa - S02:0000DE34: D7 AB 04 2A -F00:5854 BTST #7,d0 * set test sense (z flag only) - S02:0000DE38: 08 00 00 07 -F00:5855 BCS.s LAB_2A18 * did carry so has wrapped past zero - S02:0000DE3C: 65 04 -F00:5856 -F00:5857 BEQ.s LAB_29FD * no wrap and +ve test so try again - S02:0000DE3E: 67 F2 -F00:5858 -F00:5859 BRA.s LAB_2A1A * found this digit - S02:0000DE40: 60 02 -F00:5860 -F00:5861 LAB_2A18 -F00:5862 BNE.s LAB_29FD * wrap and -ve test so try again - S02:0000DE42: 66 EE -F00:5863 -F00:5864 LAB_2A1A -F00:5865 BCC.s LAB_2A21 * branch if +ve test result - S02:0000DE44: 64 06 -F00:5866 -F00:5867 NEG.b d0 * negate the digit number - S02:0000DE46: 44 00 -F00:5868 ADD.b #$0B,d0 * and subtract from 11 decimal - S02:0000DE48: D0 3C 00 0B -F00:5869 LAB_2A21 -F00:5870 ADD.b #$2F,d0 * add "0"-1 to result - S02:0000DE4C: D0 3C 00 2F -F00:5871 ADDQ.w #4,d2 * increment index to next less power of ten - S02:0000DE50: 58 42 -F00:5872 ADDQ.w #1,d1 * increment output string index - S02:0000DE52: 52 41 -F00:5873 MOVE.b d0,d3 * copy character to d3 - S02:0000DE54: 16 00 -F00:5874 AND.b #$7F,d3 * mask out top bit - S02:0000DE56: C6 3C 00 7F -F00:5875 MOVE.b d3,(a1,d1.w) * save to output string - S02:0000DE5A: 13 83 10 00 -F00:5876 SUB.b #1,numexp(a3) * decrement # of characters before the dp - S02:0000DE5E: 53 2B 05 AC -F00:5877 BNE.s LAB_2A3B * branch if still characters to do - S02:0000DE62: 66 08 -F00:5878 -F00:5879 * else output the point -F00:5880 ADDQ.l #1,d1 * increment index - S02:0000DE64: 52 81 -F00:5881 MOVE.b #'.',(a1,d1.w) * save to output string - S02:0000DE66: 13 BC 00 2E 10 00 -F00:5882 LAB_2A3B -F00:5883 AND.b #$80,d0 * mask test sense bit - S02:0000DE6C: C0 3C 00 80 -F00:5884 EORI.b #$80,d0 * invert it - S02:0000DE70: 0A 00 00 80 -F00:5885 CMP.b #LAB_2A9B-LAB_2A9A,d2 * compare table index with max+4 - S02:0000DE74: B4 3C 00 1C -F00:5886 BNE.s LAB_29FB * loop if not max - S02:0000DE78: 66 B0 -F00:5887 -F00:5888 * now remove trailing zeroes -F00:5889 LAB_2A4B -F00:5890 MOVE.b (a1,d1.w),d0 * get character from output string - S02:0000DE7A: 10 31 10 00 -F00:5891 SUBQ.l #1,d1 * decrement output string index - S02:0000DE7E: 53 81 -F00:5892 CMP.b #'0',d0 * compare with "0" - S02:0000DE80: B0 3C 00 30 -F00:5893 BEQ.s LAB_2A4B * loop until non "0" character found - S02:0000DE84: 67 F4 -F00:5894 -F00:5895 CMP.b #'.',d0 * compare with "." - S02:0000DE86: B0 3C 00 2E -F00:5896 BEQ.s LAB_2A58 * branch if was dp - S02:0000DE8A: 67 02 -F00:5897 -F00:5898 * else restore last character -F00:5899 ADDQ.l #1,d1 * increment output string index - S02:0000DE8C: 52 81 -F00:5900 LAB_2A58 -F00:5901 MOVE.b #'+',2(a1,d1.w) * save character "+" to output string - S02:0000DE8E: 13 BC 00 2B 10 02 -F00:5902 TST.b expcnt(a3) * test exponent count - S02:0000DE94: 4A 2B 05 AD -F00:5903 BEQ.s LAB_2A8C * if zero go set null terminator & exit - S02:0000DE98: 67 38 -F00:5904 -F00:5905 * exponent isn't zero so write exponent -F00:5906 BPL.s LAB_2A68 * branch if exponent count +ve - S02:0000DE9A: 6A 0A -F00:5907 -F00:5908 MOVE.b #'-',2(a1,d1.w) * save character "-" to output string - S02:0000DE9C: 13 BC 00 2D 10 02 -F00:5909 NEG.b expcnt(a3) * convert -ve to +ve - S02:0000DEA2: 44 2B 05 AD -F00:5910 LAB_2A68 -F00:5911 MOVE.b #'E',1(a1,d1.w) * save character "E" to output string - S02:0000DEA6: 13 BC 00 45 10 01 -F00:5912 MOVE.b expcnt(a3),d2 * get exponent count - S02:0000DEAC: 14 2B 05 AD -F00:5913 MOVEQ #$2F,d0 * one less than "0" character - S02:0000DEB0: 70 2F -F00:5914 LAB_2A74 -F00:5915 ADDQ.b #1,d0 * increment 10's character - S02:0000DEB2: 52 00 -F00:5916 SUB.b #$0A,d2 * subtract 10 from exponent count - S02:0000DEB4: 94 3C 00 0A -F00:5917 BCC.s LAB_2A74 * loop while still >= 0 - S02:0000DEB8: 64 F8 -F00:5918 -F00:5919 ADD.b #$3A,d2 * add character ":", $30+$0A, result is 10-value - S02:0000DEBA: D4 3C 00 3A -F00:5920 MOVE.b d0,3(a1,d1.w) * save 10's character to output string - S02:0000DEBE: 13 80 10 03 -F00:5921 MOVE.b d2,4(a1,d1.w) * save 1's character to output string - S02:0000DEC2: 13 82 10 04 -F00:5922 MOVE.b #0,5(a1,d1.w) * save null terminator after last character - S02:0000DEC6: 13 BC 00 00 10 05 -F00:5923 BRA.s LAB_2A91 * go set string pointer (a0) and exit - S02:0000DECC: 60 0A -F00:5924 -F00:5925 LAB_2A89 -F00:5926 MOVE.b d0,(a1,d1.w) * save last character to output string - S02:0000DECE: 13 80 10 00 -F00:5927 LAB_2A8C -F00:5928 MOVE.b #0,1(a1,d1.w) * save null terminator after last character - S02:0000DED2: 13 BC 00 00 10 01 -F00:5929 LAB_2A91 -F00:5930 MOVEA.l a1,a0 * set result string pointer (a0) - S02:0000DED8: 20 49 -F00:5931 RTS - S02:0000DEDA: 4E 75 -F00:5932 -F00:5933 -F00:5934 ************************************************************************************* -F00:5935 * -F00:5936 * fast compare FAC1 with FAC2 -F00:5937 * assumes both are +ve and FAC2>0 -F00:5938 * returns d0=+1 C=0 if FAC1 > FAC2 -F00:5939 * returns d0= 0 C=0 if FAC1 = FAC2 -F00:5940 * returns d0=-1 C=1 if FAC1 < FAC2 -F00:5941 -F00:5942 LAB_27F0 -F00:5943 MOVEQ #0,d0 * set for FAC1 = FAC2 - S02:0000DEDC: 70 00 -F00:5944 MOVE.b FAC2_e(a3),d1 * get FAC2 exponent - S02:0000DEDE: 12 2B 05 9C -F00:5945 CMP.b FAC1_e(a3),d1 * compare FAC1 exponent with FAC2 exponent - S02:0000DEE2: B2 2B 05 94 -F00:5946 BNE.s LAB_27F1 * branch if different - S02:0000DEE6: 66 0A -F00:5947 -F00:5948 MOVE.l FAC2_m(a3),d1 * get FAC2 mantissa - S02:0000DEE8: 22 2B 05 98 -F00:5949 CMP.l FAC1_m(a3),d1 * compare mantissas - S02:0000DEEC: B2 AB 05 90 -F00:5950 BEQ.s LAB_27F3 * exit if mantissas equal - S02:0000DEF0: 67 08 -F00:5951 -F00:5952 LAB_27F1 -F00:5953 BCS.s LAB_27F2 * if FAC1 > FAC2 return d0=+1,C=0 - S02:0000DEF2: 65 04 -F00:5954 -F00:5955 SUBQ.l #1,d0 * else FAC1 < FAC2 return d0=-1,C=1 - S02:0000DEF4: 53 80 -F00:5956 RTS - S02:0000DEF6: 4E 75 -F00:5957 -F00:5958 LAB_27F2 -F00:5959 ADDQ.l #1,d0 - S02:0000DEF8: 52 80 -F00:5960 LAB_27F3 -F00:5961 RTS - S02:0000DEFA: 4E 75 -F00:5962 -F00:5963 -F00:5964 ************************************************************************************* -F00:5965 * -F00:5966 * make FAC1 = 1 -F00:5967 -F00:5968 LAB_POON -F00:5969 MOVE.l #$80000000,FAC1_m(a3) * 1 mantissa - S02:0000DEFC: 27 7C 80 00 00 00 05 90 -F00:5970 MOVE.w #$8100,FAC1_e(a3) * 1 exonent & sign - S02:0000DF04: 37 7C 81 00 05 94 -F00:5971 RTS - S02:0000DF0A: 4E 75 -F00:5972 -F00:5973 -F00:5974 ************************************************************************************* -F00:5975 * -F00:5976 * make FAC1 = 0 -F00:5977 -F00:5978 LAB_POZE -F00:5979 MOVEQ #0,d0 * clear longword - S02:0000DF0C: 70 00 -F00:5980 MOVE.l d0,FAC1_m(a3) * 0 mantissa - S02:0000DF0E: 27 40 05 90 -F00:5981 MOVE.w d0,FAC1_e(a3) * 0 exonent & sign - S02:0000DF12: 37 40 05 94 -F00:5982 RTS - S02:0000DF16: 4E 75 -F00:5983 -F00:5984 -F00:5985 ************************************************************************************* -F00:5986 * -F00:5987 * perform power function -F00:5988 * the number is in FAC2, the power is in FAC1 -F00:5989 * no longer trashes Itemp -F00:5990 -F00:5991 LAB_POWER -F00:5992 TST.b FAC1_e(a3) * test power - S02:0000DF18: 4A 2B 05 94 -F00:5993 BEQ.s LAB_POON * if zero go return 1 - S02:0000DF1C: 67 DE -F00:5994 -F00:5995 TST.b FAC2_e(a3) * test number - S02:0000DF1E: 4A 2B 05 9C -F00:5996 BEQ.s LAB_POZE * if zero go return 0 - S02:0000DF22: 67 E8 -F00:5997 -F00:5998 MOVE.b FAC2_s(a3),-(sp) * save number sign - S02:0000DF24: 1F 2B 05 9D -F00:5999 BPL.s LAB_POWP * power of positive number - S02:0000DF28: 6A 20 -F00:6000 -F00:6001 MOVEQ #0,d1 * clear d1 - S02:0000DF2A: 72 00 -F00:6002 MOVE.b d1,FAC2_s(a3) * make sign +ve - S02:0000DF2C: 17 41 05 9D -F00:6003 -F00:6004 * number sign was -ve and can only be raised to -F00:6005 * an integer power which gives an x +j0 result, -F00:6006 * else do 'function call' error -F00:6007 MOVE.b FAC1_e(a3),d1 * get power exponent - S02:0000DF30: 12 2B 05 94 -F00:6008 SUB.w #$80,d1 * normalise to .5 - S02:0000DF34: 92 7C 00 80 -F00:6009 BLS LAB_FCER * if 0INT(power) then do 'function call' - S02:0000DF42: 66 00 E2 2E -F00:6015 * error -F00:6016 -F00:6017 BCS.s LAB_POWP * if integer value odd then leave result -ve - S02:0000DF46: 65 02 -F00:6018 -F00:6019 MOVE.b d0,(sp) * save result sign +ve - S02:0000DF48: 1E 80 -F00:6020 LAB_POWP -F00:6021 MOVE.l FAC1_m(a3),-(sp) * save power mantissa - S02:0000DF4A: 2F 2B 05 90 -F00:6022 MOVE.w FAC1_e(a3),-(sp) * save power sign & exponent - S02:0000DF4E: 3F 2B 05 94 -F00:6023 -F00:6024 BSR LAB_279B * copy number to FAC1 - S02:0000DF52: 61 00 FC 78 -F00:6025 BSR LAB_LOG * find log of number - S02:0000DF56: 61 00 F9 E8 -F00:6026 -F00:6027 MOVE.w (sp)+,d0 * get power sign & exponent - S02:0000DF5A: 30 1F -F00:6028 MOVE.l (sp)+,FAC2_m(a3) * get power mantissa - S02:0000DF5C: 27 5F 05 98 -F00:6029 MOVE.w d0,FAC2_e(a3) * save sign & exponent to FAC2 - S02:0000DF60: 37 40 05 9C -F00:6030 MOVE.b d0,FAC_sc(a3) * save sign as sign compare - S02:0000DF64: 17 40 05 9E -F00:6031 MOVE.b FAC1_s(a3),d0 * get FAC1 sign - S02:0000DF68: 10 2B 05 95 -F00:6032 EOR.b d0,FAC_sc(a3) * make sign compare (FAC1_s EOR FAC2_s) - S02:0000DF6C: B1 2B 05 9E -F00:6033 -F00:6034 BSR LAB_MULTIPLY * multiply by power - S02:0000DF70: 61 00 FA C0 -F00:6035 BSR.s LAB_EXP * find exponential - S02:0000DF74: 61 58 -F00:6036 MOVE.b (sp)+,FAC1_s(a3) * restore number sign - S02:0000DF76: 17 5F 05 95 -F00:6037 RTS - S02:0000DF7A: 4E 75 -F00:6038 -F00:6039 -F00:6040 ************************************************************************************* -F00:6041 * -F00:6042 * do - FAC1 -F00:6043 -F00:6044 LAB_GTHAN -F00:6045 TST.b FAC1_e(a3) * test for non zero FAC1 - S02:0000DF7C: 4A 2B 05 94 -F00:6046 BEQ.s RTS_020 * branch if null - S02:0000DF80: 67 06 -F00:6047 -F00:6048 EORI.b #$80,FAC1_s(a3) * (else) toggle FAC1 sign bit - S02:0000DF82: 0A 2B 00 80 05 95 -F00:6049 RTS_020 -F00:6050 RTS - S02:0000DF88: 4E 75 -F00:6051 -F00:6052 -F00:6053 ************************************************************************************* -F00:6054 * -F00:6055 * return +1 -F00:6056 LAB_EX1 -F00:6057 MOVE.l #$80000000,FAC1_m(a3) * +1 mantissa - S02:0000DF8A: 27 7C 80 00 00 00 05 90 -F00:6058 MOVE.w #$8100,FAC1_e(a3) * +1 sign & exponent - S02:0000DF92: 37 7C 81 00 05 94 -F00:6059 RTS - S02:0000DF98: 4E 75 -F00:6060 * do over/under flow -F00:6061 LAB_EXOU -F00:6062 TST.b FAC1_s(a3) * test sign - S02:0000DF9A: 4A 2B 05 95 -F00:6063 BPL LAB_OFER * was +ve so do overflow error - S02:0000DF9E: 6A 00 E1 CE -F00:6064 -F00:6065 * else underflow so return zero -F00:6066 MOVEQ #0,d0 * clear longword - S02:0000DFA2: 70 00 -F00:6067 MOVE.l d0,FAC1_m(a3) * 0 mantissa - S02:0000DFA4: 27 40 05 90 -F00:6068 MOVE.w d0,FAC1_e(a3) * 0 sign & exponent - S02:0000DFA8: 37 40 05 94 -F00:6069 RTS - S02:0000DFAC: 4E 75 -F00:6070 * fraction was zero so do 2^n -F00:6071 LAB_EXOF -F00:6072 MOVE.l #$80000000,FAC1_m(a3) * +n mantissa - S02:0000DFAE: 27 7C 80 00 00 00 05 90 -F00:6073 MOVE.b #0,FAC1_s(a3) * clear sign - S02:0000DFB6: 17 7C 00 00 05 95 -F00:6074 TST.b cosout(a3) * test sign flag - S02:0000DFBC: 4A 2B 05 B4 -F00:6075 BPL.s LAB_EXOL * branch if +ve - S02:0000DFC0: 6A 02 -F00:6076 -F00:6077 NEG.l d1 * else do 1/2^n - S02:0000DFC2: 44 81 -F00:6078 LAB_EXOL -F00:6079 ADD.b #$81,d1 * adjust exponent - S02:0000DFC4: D2 3C 00 81 -F00:6080 MOVE.b d1,FAC1_e(a3) * save exponent - S02:0000DFC8: 17 41 05 94 -F00:6081 RTS - S02:0000DFCC: 4E 75 -F00:6082 -F00:6083 * perform EXP() (x^e) -F00:6084 * valid input range is -88 to +88 -F00:6085 -F00:6086 LAB_EXP -F00:6087 MOVE.b FAC1_e(a3),d0 * get exponent - S02:0000DFCE: 10 2B 05 94 -F00:6088 BEQ.s LAB_EX1 * return 1 for zero in - S02:0000DFD2: 67 B6 -F00:6089 -F00:6090 CMP.b #$64,d0 * compare exponent with min - S02:0000DFD4: B0 3C 00 64 -F00:6091 BCS.s LAB_EX1 * if smaller just return 1 - S02:0000DFD8: 65 B0 -F00:6092 -F00:6093 ** MOVEM.l d1-d6/a0,-(sp) * save the registers -F00:6094 MOVE.b #0,cosout(a3) * flag +ve number - S02:0000DFDA: 17 7C 00 00 05 B4 -F00:6095 MOVE.l FAC1_m(a3),d1 * get mantissa - S02:0000DFE0: 22 2B 05 90 -F00:6096 CMP.b #$87,d0 * compare exponent with max - S02:0000DFE4: B0 3C 00 87 -F00:6097 BHI.s LAB_EXOU * go do over/under flow if greater - S02:0000DFE8: 62 B0 -F00:6098 -F00:6099 BNE.s LAB_EXCM * branch if less - S02:0000DFEA: 66 08 -F00:6100 -F00:6101 * else is 2^7 -F00:6102 CMP.l #$B00F33C7,d1 * compare mantissa with n*2^7 max - S02:0000DFEC: B2 BC B0 0F 33 C7 -F00:6103 BCC.s LAB_EXOU * if => go over/underflow - S02:0000DFF2: 64 A6 -F00:6104 -F00:6105 LAB_EXCM -F00:6106 TST.b FAC1_s(a3) * test sign - S02:0000DFF4: 4A 2B 05 95 -F00:6107 BPL.s LAB_EXPS * branch if arg +ve - S02:0000DFF8: 6A 0C -F00:6108 -F00:6109 MOVE.b #$FF,cosout(a3) * flag -ve number - S02:0000DFFA: 17 7C 00 FF 05 B4 -F00:6110 MOVE.b #0,FAC1_s(a3) * take absolute value - S02:0000E000: 17 7C 00 00 05 95 -F00:6111 LAB_EXPS -F00:6112 * now do n/LOG(2) -F00:6113 MOVE.l #$B8AA3B29,FAC2_m(a3) * 1/LOG(2) mantissa - S02:0000E006: 27 7C B8 AA 3B 29 05 98 -F00:6114 MOVE.w #$8100,FAC2_e(a3) * 1/LOG(2) exponent & sign - S02:0000E00E: 37 7C 81 00 05 9C -F00:6115 MOVE.b #0,FAC_sc(a3) * we know they're both +ve - S02:0000E014: 17 7C 00 00 05 9E -F00:6116 BSR LAB_MULTIPLY * effectively divide by log(2) - S02:0000E01A: 61 00 FA 16 -F00:6117 -F00:6118 * max here is +/- 127 -F00:6119 * now separate integer and fraction -F00:6120 MOVE.b #0,tpower(a3) * clear exponent add byte - S02:0000E01E: 17 7C 00 00 05 D9 -F00:6121 MOVE.b FAC1_e(a3),d5 * get exponent - S02:0000E024: 1A 2B 05 94 -F00:6122 SUB.b #$80,d5 * normalise - S02:0000E028: 9A 3C 00 80 -F00:6123 BLS.s LAB_ESML * branch if < 1 (d5 is 0 or -ve) - S02:0000E02C: 63 24 -F00:6124 -F00:6125 * result is > 1 -F00:6126 MOVE.l FAC1_m(a3),d0 * get mantissa - S02:0000E02E: 20 2B 05 90 -F00:6127 MOVE.l d0,d1 * copy it - S02:0000E032: 22 00 -F00:6128 MOVE.l d5,d6 * copy normalised exponent - S02:0000E034: 2C 05 -F00:6129 -F00:6130 NEG.w d6 * make -ve - S02:0000E036: 44 46 -F00:6131 ADD.w #32,d6 * is now 32-d6 - S02:0000E038: DC 7C 00 20 -F00:6132 LSR.l d6,d1 * just integer bits - S02:0000E03C: EC A9 -F00:6133 MOVE.b d1,tpower(a3) * set exponent add byte - S02:0000E03E: 17 41 05 D9 -F00:6134 -F00:6135 LSL.l d5,d0 * shift out integer bits - S02:0000E042: EB A8 -F00:6136 BEQ LAB_EXOF * fraction is zero so do 2^n - S02:0000E044: 67 00 FF 68 -F00:6137 -F00:6138 MOVE.l d0,FAC1_m(a3) * fraction to FAC1 - S02:0000E048: 27 40 05 90 -F00:6139 MOVE.w #$8000,FAC1_e(a3) * set exponent & sign - S02:0000E04C: 37 7C 80 00 05 94 -F00:6140 -F00:6141 * multiple was < 1 -F00:6142 LAB_ESML -F00:6143 MOVE.l #$B17217F8,FAC2_m(a3) * LOG(2) mantissa - S02:0000E052: 27 7C B1 72 17 F8 05 98 -F00:6144 MOVE.w #$8000,FAC2_e(a3) * LOG(2) exponent & sign - S02:0000E05A: 37 7C 80 00 05 9C -F00:6145 MOVE.b #0,FAC_sc(a3) * clear sign compare - S02:0000E060: 17 7C 00 00 05 9E -F00:6146 BSR LAB_MULTIPLY * multiply by log(2) - S02:0000E066: 61 00 F9 CA -F00:6147 -F00:6148 MOVE.l FAC1_m(a3),d0 * get mantissa - S02:0000E06A: 20 2B 05 90 -F00:6149 MOVE.b FAC1_e(a3),d5 * get exponent - S02:0000E06E: 1A 2B 05 94 -F00:6150 SUB.w #$82,d5 * normalise and -2 (result is -1 to -30) - S02:0000E072: 9A 7C 00 82 -F00:6151 NEG.w d5 * make +ve - S02:0000E076: 44 45 -F00:6152 LSR.l d5,d0 * shift for 2 integer bits - S02:0000E078: EA A8 -F00:6153 -F00:6154 * d0 = arg -F00:6155 * d6 = x, d1 = y -F00:6156 * d2 = x1, d3 = y1 -F00:6157 * d4 = shift count -F00:6158 * d5 = loop count -F00:6159 * now do cordic set-up -F00:6160 MOVEQ #0,d1 * y = 0 - S02:0000E07A: 72 00 -F00:6161 MOVE.l #KFCTSEED,d6 * x = 1 with jkh inverse factored out - S02:0000E07C: 2C 3C E6 A3 D1 10 -F00:6162 LEA TAB_HTHET(pc),a0 * get pointer to hyperbolic arctan table - S02:0000E082: 41 FA 0D 20 -F00:6163 MOVEQ #0,d4 * clear shift count - S02:0000E086: 78 00 -F00:6164 -F00:6165 * cordic loop, shifts 4 and 13 (and 39 -F00:6166 * if it went that far) need to be repeated -F00:6167 MOVEQ #3,d5 * 4 loops - S02:0000E088: 7A 03 -F00:6168 BSR.s LAB_EXCC * do loops 1 through 4 - S02:0000E08A: 61 36 -F00:6169 SUBQ.w #4,a0 * do table entry again - S02:0000E08C: 59 48 -F00:6170 SUBQ.l #1,d4 * do shift count again - S02:0000E08E: 53 84 -F00:6171 MOVEQ #9,d5 * 10 loops - S02:0000E090: 7A 09 -F00:6172 BSR.s LAB_EXCC * do loops 4 (again) through 13 - S02:0000E092: 61 2E -F00:6173 SUBQ.w #4,a0 * do table entry again - S02:0000E094: 59 48 -F00:6174 SUBQ.l #1,d4 * do shift count again - S02:0000E096: 53 84 -F00:6175 MOVEQ #18,d5 * 19 loops - S02:0000E098: 7A 12 -F00:6176 BSR.s LAB_EXCC * do loops 13 (again) through 31 - S02:0000E09A: 61 26 -F00:6177 -F00:6178 * now get the result -F00:6179 TST.b cosout(a3) * test sign flag - S02:0000E09C: 4A 2B 05 B4 -F00:6180 BPL.s LAB_EXPL * branch if +ve - S02:0000E0A0: 6A 06 -F00:6181 -F00:6182 NEG.l d1 * do -y - S02:0000E0A2: 44 81 -F00:6183 NEG.b tpower(a3) * do -exp - S02:0000E0A4: 44 2B 05 D9 -F00:6184 LAB_EXPL -F00:6185 MOVEQ #$83-$100,d0 * set exponent - S02:0000E0A8: 70 83 -F00:6186 ADD.l d1,d6 * y = y +/- x - S02:0000E0AA: DC 81 -F00:6187 BMI.s LAB_EXRN * branch if result normal - S02:0000E0AC: 6B 06 -F00:6188 -F00:6189 LAB_EXNN -F00:6190 SUBQ.l #1,d0 * decrement exponent - S02:0000E0AE: 53 80 -F00:6191 ADD.l d6,d6 * shift mantissa - S02:0000E0B0: DC 86 -F00:6192 BPL.s LAB_EXNN * loop if not normal - S02:0000E0B2: 6A FA -F00:6193 -F00:6194 LAB_EXRN -F00:6195 MOVE.l d6,FAC1_m(a3) * save exponent result - S02:0000E0B4: 27 46 05 90 -F00:6196 ADD.b tpower(a3),d0 * add integer part - S02:0000E0B8: D0 2B 05 D9 -F00:6197 MOVE.b d0,FAC1_e(a3) * save exponent - S02:0000E0BC: 17 40 05 94 -F00:6198 ** MOVEM.l (sp)+,d1-d6/a0 * restore registers -F00:6199 RTS - S02:0000E0C0: 4E 75 -F00:6200 -F00:6201 * cordic loop -F00:6202 LAB_EXCC -F00:6203 ADDQ.l #1,d4 * increment shift count - S02:0000E0C2: 52 84 -F00:6204 MOVE.l d6,d2 * x1 = x - S02:0000E0C4: 24 06 -F00:6205 ASR.l d4,d2 * x1 >> n - S02:0000E0C6: E8 A2 -F00:6206 MOVE.l d1,d3 * y1 = y - S02:0000E0C8: 26 01 -F00:6207 ASR.l d4,d3 * y1 >> n - S02:0000E0CA: E8 A3 -F00:6208 TST.l d0 * test arg - S02:0000E0CC: 4A 80 -F00:6209 BMI.s LAB_EXAD * branch if -ve - S02:0000E0CE: 6B 0C -F00:6210 -F00:6211 ADD.l d2,d1 * y = y + x1 - S02:0000E0D0: D2 82 -F00:6212 ADD.l d3,d6 * x = x + y1 - S02:0000E0D2: DC 83 -F00:6213 SUB.l (a0)+,d0 * arg = arg - atnh(a0) - S02:0000E0D4: 90 98 -F00:6214 DBF d5,LAB_EXCC * decrement and loop if not done - S02:0000E0D6: 51 CD FF EA -F00:6215 -F00:6216 RTS - S02:0000E0DA: 4E 75 -F00:6217 -F00:6218 LAB_EXAD -F00:6219 SUB.l d2,d1 * y = y - x1 - S02:0000E0DC: 92 82 -F00:6220 SUB.l d3,d6 * x = x + y1 - S02:0000E0DE: 9C 83 -F00:6221 ADD.l (a0)+,d0 * arg = arg + atnh(a0) - S02:0000E0E0: D0 98 -F00:6222 DBF d5,LAB_EXCC * decrement and loop if not done - S02:0000E0E2: 51 CD FF DE -F00:6223 -F00:6224 RTS - S02:0000E0E6: 4E 75 -F00:6225 -F00:6226 -F00:6227 ************************************************************************************* -F00:6228 * -F00:6229 * RND(n), 32 bit Galois version. make n=0 for 19th next number in sequence or n<>0 -F00:6230 * to get 19th next number in sequence after seed n. This version of the PRNG uses -F00:6231 * the Galois method and a sample of 65536 bytes produced gives the following values. -F00:6232 -F00:6233 * Entropy = 7.997442 bits per byte -F00:6234 * Optimum compression would reduce these 65536 bytes by 0 percent -F00:6235 -F00:6236 * Chi square distribution for 65536 samples is 232.01, and -F00:6237 * randomly would exceed this value 75.00 percent of the time -F00:6238 -F00:6239 * Arithmetic mean value of data bytes is 127.6724, 127.5 would be random -F00:6240 * Monte Carlo value for Pi is 3.122871269, error 0.60 percent -F00:6241 * Serial correlation coefficient is -0.000370, totally uncorrelated would be 0.0 -F00:6242 -F00:6243 LAB_RND -F00:6244 TST.b FAC1_e(a3) * get FAC1 exponent - S02:0000E0E8: 4A 2B 05 94 -F00:6245 BEQ.s NextPRN * do next random number if zero - S02:0000E0EC: 67 08 -F00:6246 -F00:6247 * else get seed into random number store -F00:6248 LEA PRNlword(a3),a0 * set PRNG pointer - S02:0000E0EE: 41 EB 05 A0 -F00:6249 BSR LAB_2778 * pack FAC1 into (a0) - S02:0000E0F2: 61 00 FA B2 -F00:6250 NextPRN -F00:6251 MOVEQ #$AF-$100,d1 * set EOR value - S02:0000E0F6: 72 AF -F00:6252 MOVEQ #18,d2 * do this 19 times - S02:0000E0F8: 74 12 -F00:6253 MOVE.l PRNlword(a3),d0 * get current - S02:0000E0FA: 20 2B 05 A0 -F00:6254 Ninc0 -F00:6255 ADD.l d0,d0 * shift left 1 bit - S02:0000E0FE: D0 80 -F00:6256 BCC.s Ninc1 * branch if bit 32 not set - S02:0000E100: 64 02 -F00:6257 -F00:6258 EOR.b d1,d0 * do Galois LFSR feedback - S02:0000E102: B3 00 -F00:6259 Ninc1 -F00:6260 DBF d2,Ninc0 * loop - S02:0000E104: 51 CA FF F8 -F00:6261 -F00:6262 MOVE.l d0,PRNlword(a3) * save back to seed word - S02:0000E108: 27 40 05 A0 -F00:6263 MOVE.l d0,FAC1_m(a3) * copy to FAC1 mantissa - S02:0000E10C: 27 40 05 90 -F00:6264 MOVE.w #$8000,FAC1_e(a3) * set the exponent and clear the sign - S02:0000E110: 37 7C 80 00 05 94 -F00:6265 BRA LAB_24D5 * normalise FAC1 & return - S02:0000E116: 60 00 F7 F2 -F00:6266 -F00:6267 -F00:6268 ************************************************************************************* -F00:6269 * -F00:6270 * cordic TAN(x) routine, TAN(x) = SIN(x)/COS(x) -F00:6271 * x = angle in radians -F00:6272 -F00:6273 LAB_TAN -F00:6274 BSR.s LAB_SIN * go do SIN/COS cordic compute - S02:0000E11A: 61 38 -F00:6275 MOVE.w FAC1_e(a3),FAC2_e(a3) * copy exponent & sign from FAC1 to FAC2 - S02:0000E11C: 37 6B 05 94 05 9C -F00:6276 MOVE.l FAC1_m(a3),FAC2_m(a3) * copy FAC1 mantissa to FAC2 mantissa - S02:0000E122: 27 6B 05 90 05 98 -F00:6277 MOVE.l d1,FAC1_m(a3) * get COS(x) mantissa - S02:0000E128: 27 41 05 90 -F00:6278 MOVE.b d3,FAC1_e(a3) * get COS(x) exponent - S02:0000E12C: 17 43 05 94 -F00:6279 BEQ LAB_OFER * do overflow if COS = 0 - S02:0000E130: 67 00 E0 3C -F00:6280 -F00:6281 BSR LAB_24D5 * normalise FAC1 - S02:0000E134: 61 00 F7 D4 -F00:6282 BRA LAB_DIVIDE * do FAC2/FAC1 and return, FAC_sc set by SIN - S02:0000E138: 60 00 F9 84 -F00:6283 * COS calculation -F00:6284 -F00:6285 -F00:6286 ************************************************************************************* -F00:6287 * -F00:6288 * cordic SIN(x), COS(x) routine -F00:6289 * x = angle in radians -F00:6290 -F00:6291 LAB_COS -F00:6292 MOVE.l #$C90FDAA3,FAC2_m(a3) * pi/2 mantissa (LSB is rounded up so - S02:0000E13C: 27 7C C9 0F DA A3 05 98 -F00:6293 * COS(PI/2)=0) -F00:6294 MOVE.w #$8100,FAC2_e(a3) * pi/2 exponent and sign - S02:0000E144: 37 7C 81 00 05 9C -F00:6295 MOVE.b FAC1_s(a3),FAC_sc(a3) * sign = FAC1 sign (b7) - S02:0000E14A: 17 6B 05 95 05 9E -F00:6296 BSR LAB_ADD * add FAC2 to FAC1, adjust for COS(x) - S02:0000E150: 61 00 F7 3E -F00:6297 -F00:6298 -F00:6299 ************************************************************************************* -F00:6300 * -F00:6301 * SIN/COS cordic calculator -F00:6302 -F00:6303 LAB_SIN -F00:6304 MOVE.b #0,cosout(a3) * set needed result - S02:0000E154: 17 7C 00 00 05 B4 -F00:6305 -F00:6306 MOVE.l #$A2F9836F,FAC2_m(a3) * 1/pi mantissa (LSB is rounded up so SIN(PI)=0) - S02:0000E15A: 27 7C A2 F9 83 6F 05 98 -F00:6307 MOVE.w #$7F00,FAC2_e(a3) * 1/pi exponent & sign - S02:0000E162: 37 7C 7F 00 05 9C -F00:6308 MOVE.b FAC1_s(a3),FAC_sc(a3) * sign = FAC1 sign (b7) - S02:0000E168: 17 6B 05 95 05 9E -F00:6309 BSR LAB_MULTIPLY * multiply by 1/pi - S02:0000E16E: 61 00 F8 C2 -F00:6310 -F00:6311 MOVE.b FAC1_e(a3),d0 * get FAC1 exponent - S02:0000E172: 10 2B 05 94 -F00:6312 BEQ.s LAB_SCZE * branch if zero - S02:0000E176: 67 1C -F00:6313 -F00:6314 LEA TAB_SNCO(pc),a0 * get pointer to constants table - S02:0000E178: 41 FA 0B 2A -F00:6315 MOVE.l FAC1_m(a3),d6 * get FAC1 mantissa - S02:0000E17C: 2C 2B 05 90 -F00:6316 SUBQ.b #1,d0 * 2 radians in 360 degrees so /2 - S02:0000E180: 53 00 -F00:6317 BEQ.s LAB_SCZE * branch if zero - S02:0000E182: 67 10 -F00:6318 -F00:6319 SUB.b #$80,d0 * normalise exponent - S02:0000E184: 90 3C 00 80 -F00:6320 BMI.s LAB_SCL0 * branch if < 1 - S02:0000E188: 6B 18 -F00:6321 -F00:6322 * X is > 1 -F00:6323 CMP.b #$20,d0 * is it >= 2^32 - S02:0000E18A: B0 3C 00 20 -F00:6324 BCC.s LAB_SCZE * may as well do zero - S02:0000E18E: 64 04 -F00:6325 -F00:6326 LSL.l d0,d6 * shift out integer part bits - S02:0000E190: E1 AE -F00:6327 BNE.s LAB_CORD * if fraction go test quadrant and adjust - S02:0000E192: 66 18 -F00:6328 -F00:6329 * else no fraction so do zero -F00:6330 LAB_SCZE -F00:6331 MOVEQ #$81-$100,d2 * set exponent for 1.0 - S02:0000E194: 74 81 -F00:6332 MOVEQ #0,d3 * set exponent for 0.0 - S02:0000E196: 76 00 -F00:6333 MOVE.l #$80000000,d0 * mantissa for 1.0 - S02:0000E198: 20 3C 80 00 00 00 -F00:6334 MOVE.l d3,d1 * mantissa for 0.0 - S02:0000E19E: 22 03 -F00:6335 BRA.s outloop * go output it - S02:0000E1A0: 60 5C -F00:6336 -F00:6337 * x is < 1 -F00:6338 LAB_SCL0 -F00:6339 NEG.b d0 * make +ve - S02:0000E1A2: 44 00 -F00:6340 CMP.b #$1E,d0 * is it <= 2^-30 - S02:0000E1A4: B0 3C 00 1E -F00:6341 BCC.s LAB_SCZE * may as well do zero - S02:0000E1A8: 64 EA -F00:6342 -F00:6343 LSR.l d0,d6 * shift out <= 2^-32 bits - S02:0000E1AA: E0 AE -F00:6344 -F00:6345 * cordic calculator, argument in d6 -F00:6346 * table pointer in a0, returns in d0-d3 -F00:6347 -F00:6348 LAB_CORD -F00:6349 MOVE.b FAC1_s(a3),FAC_sc(a3) * copy as sign compare for TAN - S02:0000E1AC: 17 6B 05 95 05 9E -F00:6350 ADD.l d6,d6 * shift 0.5 bit into carry - S02:0000E1B2: DC 86 -F00:6351 BCC.s LAB_LTPF * branch if less than 0.5 - S02:0000E1B4: 64 04 -F00:6352 -F00:6353 EORI.b #$FF,FAC1_s(a3) * toggle result sign - S02:0000E1B6: 46 2B 05 95 -F00:6354 LAB_LTPF -F00:6355 ADD.l d6,d6 * shift 0.25 bit into carry - S02:0000E1BA: DC 86 -F00:6356 BCC.s LAB_LTPT * branch if less than 0.25 - S02:0000E1BC: 64 08 -F00:6357 -F00:6358 EORI.b #$FF,cosout(a3) * toggle needed result - S02:0000E1BE: 46 2B 05 B4 -F00:6359 EORI.b #$FF,FAC_sc(a3) * toggle sign compare for TAN - S02:0000E1C2: 46 2B 05 9E -F00:6360 -F00:6361 LAB_LTPT -F00:6362 LSR.l #2,d6 * shift the bits back (clear integer bits) - S02:0000E1C6: E4 8E -F00:6363 BEQ.s LAB_SCZE * no fraction so go do zero - S02:0000E1C8: 67 CA -F00:6364 -F00:6365 * set start values -F00:6366 MOVEQ #1,d5 * set bit count - S02:0000E1CA: 7A 01 -F00:6367 MOVE.l -4(a0),d0 * get multiply constant (1st itteration d0) - S02:0000E1CC: 20 28 FF FC -F00:6368 MOVE.l d0,d1 * 1st itteration d1 - S02:0000E1D0: 22 00 -F00:6369 SUB.l (a0)+,d6 * 1st always +ve so do 1st step - S02:0000E1D2: 9C 98 -F00:6370 BRA.s mainloop * jump into routine - S02:0000E1D4: 60 08 -F00:6371 -F00:6372 subloop -F00:6373 SUB.l (a0)+,d6 * z = z - arctan(i)/2pi - S02:0000E1D6: 9C 98 -F00:6374 SUB.l d3,d0 * x = x - y1 - S02:0000E1D8: 90 83 -F00:6375 ADD.l d2,d1 * y = y + x1 - S02:0000E1DA: D2 82 -F00:6376 BRA.s nexta * back to main loop - S02:0000E1DC: 60 12 -F00:6377 -F00:6378 mainloop -F00:6379 MOVE.l d0,d2 * x1 = x - S02:0000E1DE: 24 00 -F00:6380 ASR.l d5,d2 * / (2 ^ i) - S02:0000E1E0: EA A2 -F00:6381 MOVE.l d1,d3 * y1 = y - S02:0000E1E2: 26 01 -F00:6382 ASR.l d5,d3 * / (2 ^ i) - S02:0000E1E4: EA A3 -F00:6383 TST.l d6 * test sign (is 2^0 bit) - S02:0000E1E6: 4A 86 -F00:6384 BPL.s subloop * go do subtract if > 1 - S02:0000E1E8: 6A EC -F00:6385 -F00:6386 ADD.l (a0)+,d6 * z = z + arctan(i)/2pi - S02:0000E1EA: DC 98 -F00:6387 ADD.l d3,d0 * x = x + y1 - S02:0000E1EC: D0 83 -F00:6388 SUB.l d2,d1 * y = y + x1 - S02:0000E1EE: 92 82 -F00:6389 nexta -F00:6390 ADDQ.l #1,d5 * i = i + 1 - S02:0000E1F0: 52 85 -F00:6391 CMP.l #$1E,d5 * check end condition - S02:0000E1F2: BA BC 00 00 00 1E -F00:6392 BNE.s mainloop * loop if not all done - S02:0000E1F8: 66 E4 -F00:6393 -F00:6394 * now untangle output value -F00:6395 MOVEQ #$81-$100,d2 * set exponent for 0 to .99 rec. - S02:0000E1FA: 74 81 -F00:6396 MOVE.l d2,d3 * copy it for cos output - S02:0000E1FC: 26 02 -F00:6397 outloop -F00:6398 TST.b cosout(a3) * did we want cos output? - S02:0000E1FE: 4A 2B 05 B4 -F00:6399 BMI.s subexit * if so skip - S02:0000E202: 6B 04 -F00:6400 -F00:6401 EXG d0,d1 * swap SIN and COS mantissas - S02:0000E204: C1 41 -F00:6402 EXG d2,d3 * swap SIN and COS exponents - S02:0000E206: C5 43 -F00:6403 subexit -F00:6404 MOVE.l d0,FAC1_m(a3) * set result mantissa - S02:0000E208: 27 40 05 90 -F00:6405 MOVE.b d2,FAC1_e(a3) * set result exponent - S02:0000E20C: 17 42 05 94 -F00:6406 BRA LAB_24D5 * normalise FAC1 & return - S02:0000E210: 60 00 F6 F8 -F00:6407 -F00:6408 -F00:6409 -F00:6410 ************************************************************************************* -F00:6411 * -F00:6412 * perform ATN() -F00:6413 -F00:6414 LAB_ATN -F00:6415 MOVE.b FAC1_e(a3),d0 * get FAC1 exponent - S02:0000E214: 10 2B 05 94 -F00:6416 BEQ RTS_021 * ATN(0) = 0 so skip calculation - S02:0000E218: 67 00 00 AA -F00:6417 -F00:6418 MOVE.b #0,cosout(a3) * set result needed - S02:0000E21C: 17 7C 00 00 05 B4 -F00:6419 CMP.b #$81,d0 * compare exponent with 1 - S02:0000E222: B0 3C 00 81 -F00:6420 BCS.s LAB_ATLE * branch if n<1 - S02:0000E226: 65 28 -F00:6421 -F00:6422 BNE.s LAB_ATGO * branch if n>1 - S02:0000E228: 66 08 -F00:6423 -F00:6424 MOVE.l FAC1_m(a3),d0 * get mantissa - S02:0000E22A: 20 2B 05 90 -F00:6425 ADD.l d0,d0 * shift left - S02:0000E22E: D0 80 -F00:6426 BEQ.s LAB_ATLE * branch if n=1 - S02:0000E230: 67 1E -F00:6427 -F00:6428 LAB_ATGO -F00:6429 MOVE.l #$80000000,FAC2_m(a3) * set mantissa for 1 - S02:0000E232: 27 7C 80 00 00 00 05 98 -F00:6430 MOVE.w #$8100,FAC2_e(a3) * set exponent for 1 - S02:0000E23A: 37 7C 81 00 05 9C -F00:6431 MOVE.b FAC1_s(a3),FAC_sc(a3) * sign compare = sign - S02:0000E240: 17 6B 05 95 05 9E -F00:6432 BSR LAB_DIVIDE * do 1/n - S02:0000E246: 61 00 F8 76 -F00:6433 MOVE.b #$FF,cosout(a3) * set inverse result needed - S02:0000E24A: 17 7C 00 FF 05 B4 -F00:6434 LAB_ATLE -F00:6435 MOVE.l FAC1_m(a3),d0 * get FAC1 mantissa - S02:0000E250: 20 2B 05 90 -F00:6436 E2028 MOVEQ #$82,d1 * set to correct exponent - S02:0000E254: 72 82 -F00:6437 SUB.b FAC1_e(a3),d1 * subtract FAC1 exponent (always <= 1) - S02:0000E256: 92 2B 05 94 -F00:6438 LSR.l d1,d0 * shift in two integer part bits - S02:0000E25A: E2 A8 -F00:6439 LEA TAB_ATNC(pc),a0 * get pointer to arctan table - S02:0000E25C: 41 FA 0A C6 -F00:6440 MOVEQ #0,d6 * Z = 0 - S02:0000E260: 7C 00 -F00:6441 MOVE.l #1<<30,d1 * y = 1 - S02:0000E262: 22 3C 40 00 00 00 -F00:6442 MOVEQ #29,d5 * loop 30 times - S02:0000E268: 7A 1D -F00:6443 MOVEQ #1,d4 * shift counter - S02:0000E26A: 78 01 -F00:6444 BRA.s LAB_ATCD * enter loop - S02:0000E26C: 60 06 -F00:6445 -F00:6446 LAB_ATNP -F00:6447 ASR.l d4,d2 * x1 / 2^i - S02:0000E26E: E8 A2 -F00:6448 ADD.l d2,d1 * y = y + x1 - S02:0000E270: D2 82 -F00:6449 ADD.l (a0),d6 * z = z + atn(i) - S02:0000E272: DC 90 -F00:6450 LAB_ATCD -F00:6451 MOVE.l d0,d2 * x1 = x - S02:0000E274: 24 00 -F00:6452 MOVE.l d1,d3 * y1 = y - S02:0000E276: 26 01 -F00:6453 ASR.l d4,d3 * y1 / 2^i - S02:0000E278: E8 A3 -F00:6454 LAB_CATN -F00:6455 SUB.l d3,d0 * x = x - y1 - S02:0000E27A: 90 83 -F00:6456 BPL.s LAB_ATNP * branch if x >= 0 - S02:0000E27C: 6A F0 -F00:6457 -F00:6458 MOVE.l d2,d0 * else get x back - S02:0000E27E: 20 02 -F00:6459 ADDQ.w #4,a0 * increment pointer - S02:0000E280: 58 48 -F00:6460 ADDQ.l #1,d4 * increment i - S02:0000E282: 52 84 -F00:6461 ASR.l #1,d3 * y1 / 2^i - S02:0000E284: E2 83 -F00:6462 DBF d5,LAB_CATN * decrement and loop if not done - S02:0000E286: 51 CD FF F2 -F00:6463 -F00:6464 MOVE.b #$82,FAC1_e(a3) * set new exponent - S02:0000E28A: 17 7C 00 82 05 94 -F00:6465 MOVE.l d6,FAC1_m(a3) * save mantissa - S02:0000E290: 27 46 05 90 -F00:6466 BSR LAB_24D5 * normalise FAC1 - S02:0000E294: 61 00 F6 74 -F00:6467 -F00:6468 TST.b cosout(a3) * was it > 1 ? - S02:0000E298: 4A 2B 05 B4 -F00:6469 BPL.s RTS_021 * branch if not - S02:0000E29C: 6A 26 -F00:6470 -F00:6471 MOVE.b FAC1_s(a3),d7 * get sign - S02:0000E29E: 1E 2B 05 95 -F00:6472 MOVE.b #0,FAC1_s(a3) * clear sign - S02:0000E2A2: 17 7C 00 00 05 95 -F00:6473 MOVE.l #$C90FDAA2,FAC2_m(a3) * set -(pi/2) - S02:0000E2A8: 27 7C C9 0F DA A2 05 98 -F00:6474 MOVE.w #$8180,FAC2_e(a3) * set exponent and sign - S02:0000E2B0: 37 7C 81 80 05 9C -F00:6475 MOVE.b #$FF,FAC_sc(a3) * set sign compare - S02:0000E2B6: 17 7C 00 FF 05 9E -F00:6476 BSR LAB_ADD * perform addition, FAC2 to FAC1 - S02:0000E2BC: 61 00 F5 D2 -F00:6477 MOVE.b d7,FAC1_s(a3) * restore sign - S02:0000E2C0: 17 47 05 95 -F00:6478 RTS_021 -F00:6479 RTS - S02:0000E2C4: 4E 75 -F00:6480 -F00:6481 -F00:6482 ************************************************************************************* -F00:6483 * -F00:6484 * perform BITSET -F00:6485 -F00:6486 LAB_BITSET -F00:6487 BSR LAB_GADB * get two parameters for POKE or WAIT - S02:0000E2C6: 61 00 F4 A8 -F00:6488 * first parameter in a0, second in d0 -F00:6489 CMP.b #$08,d0 * only 0 to 7 are allowed - S02:0000E2CA: B0 3C 00 08 -F00:6490 BCC LAB_FCER * branch if > 7 - S02:0000E2CE: 64 00 DE A2 -F00:6491 -F00:6492 BSET d0,(a0) * set bit - S02:0000E2D2: 01 D0 -F00:6493 RTS - S02:0000E2D4: 4E 75 -F00:6494 -F00:6495 -F00:6496 ************************************************************************************* -F00:6497 * -F00:6498 * perform BITCLR -F00:6499 -F00:6500 LAB_BITCLR -F00:6501 BSR LAB_GADB * get two parameters for POKE or WAIT - S02:0000E2D6: 61 00 F4 98 -F00:6502 * first parameter in a0, second in d0 -F00:6503 CMP.b #$08,d0 * only 0 to 7 are allowed - S02:0000E2DA: B0 3C 00 08 -F00:6504 BCC LAB_FCER * branch if > 7 - S02:0000E2DE: 64 00 DE 92 -F00:6505 -F00:6506 BCLR d0,(a0) * clear bit - S02:0000E2E2: 01 90 -F00:6507 RTS - S02:0000E2E4: 4E 75 -F00:6508 -F00:6509 -F00:6510 ************************************************************************************* -F00:6511 * -F00:6512 * perform BITTST() -F00:6513 -F00:6514 LAB_BTST -F00:6515 MOVE.b (a5)+,d0 * increment BASIC pointer - S02:0000E2E6: 10 1D -F00:6516 BSR LAB_GADB * get two parameters for POKE or WAIT - S02:0000E2E8: 61 00 F4 86 -F00:6517 * first parameter in a0, second in d0 -F00:6518 CMP.b #$08,d0 * only 0 to 7 are allowed - S02:0000E2EC: B0 3C 00 08 -F00:6519 BCC LAB_FCER * branch if > 7 - S02:0000E2F0: 64 00 DE 80 -F00:6520 -F00:6521 MOVE.l d0,d1 * copy bit # to test - S02:0000E2F4: 22 00 -F00:6522 BSR LAB_GBYT * get next BASIC byte - S02:0000E2F6: 61 00 EA C4 -F00:6523 CMP.b #')',d0 * is next character ")" - S02:0000E2FA: B0 3C 00 29 -F00:6524 BNE LAB_SNER * if not ")" go do syntax error, then warm start - S02:0000E2FE: 66 00 DE 7E -F00:6525 -F00:6526 BSR LAB_IGBY * update execute pointer (to character past ")") - S02:0000E302: 61 00 EA B6 -F00:6527 MOVEQ #0,d0 * set the result as zero - S02:0000E306: 70 00 -F00:6528 BTST d1,(a0) * test bit - S02:0000E308: 03 10 -F00:6529 BEQ LAB_27DB * branch if zero (already correct) - S02:0000E30A: 67 00 F9 14 -F00:6530 -F00:6531 MOVEQ #-1,d0 * set for -1 result - S02:0000E30E: 70 FF -F00:6532 BRA LAB_27DB * go do SGN tail - S02:0000E310: 60 00 F9 0E -F00:6533 -F00:6534 -F00:6535 ************************************************************************************* -F00:6536 * -F00:6537 * perform USING$() -F00:6538 -F00:6539 fsd EQU 0 * (sp) format string descriptor pointer -F00:6540 fsti EQU 4 * 4(sp) format string this index -F00:6541 fsli EQU 6 * 6(sp) format string last index -F00:6542 fsdpi EQU 8 * 8(sp) format string decimal point index -F00:6543 fsdc EQU 10 * 10(sp) format string decimal characters -F00:6544 fend EQU 12-4 * x(sp) end-4, fsd is popped by itself -F00:6545 -F00:6546 ofchr EQU '#' * the overflow character -F00:6547 -F00:6548 LAB_USINGS -F00:6549 TST.b Dtypef(a3) * test data type, $80=string - S02:0000E314: 4A 2B 05 B5 -F00:6550 BPL LAB_FOER * if not string type go do format error - S02:0000E318: 6A 00 DE 10 -F00:6551 -F00:6552 MOVEA.l FAC1_m(a3),a2 * get the format string descriptor pointer - S02:0000E31C: 24 6B 05 90 -F00:6553 MOVE.w 4(a2),d7 * get the format string length - S02:0000E320: 3E 2A 00 04 -F00:6554 BEQ LAB_FOER * if null string go do format error - S02:0000E324: 67 00 DE 04 -F00:6555 -F00:6556 * clear the format string values -F00:6557 -F00:6558 MOVEQ #0,d0 * clear d0 - S02:0000E328: 70 00 -F00:6559 MOVE.w d0,-(sp) * clear the format string decimal characters - S02:0000E32A: 3F 00 -F00:6560 MOVE.w d0,-(sp) * clear the format string decimal point index - S02:0000E32C: 3F 00 -F00:6561 MOVE.w d0,-(sp) * clear the format string last index - S02:0000E32E: 3F 00 -F00:6562 MOVE.w d0,-(sp) * clear the format string this index - S02:0000E330: 3F 00 -F00:6563 MOVE.l a2,-(sp) * save the format string descriptor pointer - S02:0000E332: 2F 0A -F00:6564 -F00:6565 * make a null return string for the first string add -F00:6566 -F00:6567 MOVEQ #0,d1 * make a null string - S02:0000E334: 72 00 -F00:6568 MOVEA.l d1,a0 * with a null pointer - S02:0000E336: 20 41 -F00:6569 BSR LAB_RTST * push a string on the descriptor stack - S02:0000E338: 61 00 F0 DA -F00:6570 * a0 = pointer, d1 = length -F00:6571 -F00:6572 * do the USING$() function next value -F00:6573 -F00:6574 MOVE.b (a5)+,d0 * get the next BASIC byte - S02:0000E33C: 10 1D -F00:6575 LAB_U002 -F00:6576 CMP.b #',',d0 * compare with comma - S02:0000E33E: B0 3C 00 2C -F00:6577 BNE LAB_SNER * if not "," go do syntax error - S02:0000E342: 66 00 DE 3A -F00:6578 -F00:6579 BSR LAB_ProcFo * process the format string - S02:0000E346: 61 00 02 8C -F00:6580 TST.b d2 * test the special characters flag - S02:0000E34A: 4A 02 -F00:6581 BEQ LAB_FOER * if no special characters go do format error - S02:0000E34C: 67 00 DD DC -F00:6582 -F00:6583 BSR LAB_EVEX * evaluate the expression - S02:0000E350: 61 00 E9 08 -F00:6584 TST.b Dtypef(a3) * test the data type - S02:0000E354: 4A 2B 05 B5 -F00:6585 BMI LAB_TMER * if string type go do type missmatch error - S02:0000E358: 6B 00 DD F8 -F00:6586 -F00:6587 TST.b FAC1_e(a3) * test FAC1 exponent - S02:0000E35C: 4A 2B 05 94 -F00:6588 BEQ.s LAB_U004 * if FAC1 = 0 skip the rounding - S02:0000E360: 67 32 -F00:6589 -F00:6590 MOVE.w fsdc(sp),d1 * get the format string decimal character count - S02:0000E362: 32 2F 00 0A -F00:6591 CMP.w #8,d1 * compare the fraction digit count with 8 - S02:0000E366: B2 7C 00 08 -F00:6592 BCC.s LAB_U004 * if >= 8 skip the rounding - S02:0000E36A: 64 28 -F00:6593 -F00:6594 MOVE.w d1,d0 * else copy the fraction digit count - S02:0000E36C: 30 01 -F00:6595 ADD.w d1,d1 * * 2 - S02:0000E36E: D2 41 -F00:6596 ADD.w d0,d1 * * 3 - S02:0000E370: D2 40 -F00:6597 ADD.w d1,d1 * * 6 - S02:0000E372: D2 41 -F00:6598 LEA LAB_P_10(pc),a0 * get the rounding table base - S02:0000E374: 41 FA 08 40 -F00:6599 MOVE.l 2(a0,d1.w),FAC2_m(a3) * get the rounding mantissa - S02:0000E378: 27 70 10 02 05 98 -F00:6600 MOVE.w (a0,d1.w),d0 * get the rounding exponent - S02:0000E37E: 30 30 10 00 -F00:6601 SUB.w #$100,d0 * effectively divide the mantissa by 2 - S02:0000E382: 90 7C 01 00 -F00:6602 MOVE.w d0,FAC2_e(a3) * save the rounding exponent - S02:0000E386: 37 40 05 9C -F00:6603 MOVE.b #$00,FAC_sc(a3) * clear the sign compare - S02:0000E38A: 17 7C 00 00 05 9E -F00:6604 BSR LAB_ADD * round the value to n places - S02:0000E390: 61 00 F4 FE -F00:6605 LAB_U004 -F00:6606 BSR LAB_2970 * convert FAC1 to string - not on stack - S02:0000E394: 61 00 F9 76 -F00:6607 -F00:6608 BSR LAB_DupFmt * duplicate the processed format string section - S02:0000E398: 61 00 01 FC -F00:6609 * returns length in d1, pointer in a0 -F00:6610 -F00:6611 * process the number string, length in d6, decimal point index in d2 -F00:6612 -F00:6613 LEA Decss(a3),a2 * set the number string start - S02:0000E39C: 45 EB 05 C6 -F00:6614 MOVEQ #0,d6 * clear the number string index - S02:0000E3A0: 7C 00 -F00:6615 MOVEQ #'.',d4 * set the decimal point character - S02:0000E3A2: 78 2E -F00:6616 LAB_U005 -F00:6617 MOVE.w d6,d2 * save the index to flag the decimal point - S02:0000E3A4: 34 06 -F00:6618 LAB_U006 -F00:6619 ADDQ.w #1,d6 * increment the number string index - S02:0000E3A6: 52 46 -F00:6620 MOVE.b (a2,d6.w),d0 * get a number string character - S02:0000E3A8: 10 32 60 00 -F00:6621 BEQ.s LAB_U010 * if null then number complete - S02:0000E3AC: 67 7A -F00:6622 -F00:6623 CMP.b #'E',d0 * compare the character with an "E" - S02:0000E3AE: B0 3C 00 45 -F00:6624 BEQ.s LAB_U008 * was sx[.x]Esxx so go handle sci notation - S02:0000E3B2: 67 06 -F00:6625 -F00:6626 CMP.b d4,d0 * compare the character with "." - S02:0000E3B4: B0 04 -F00:6627 BNE.s LAB_U006 * if not decimal point go get the next digit - S02:0000E3B6: 66 EE -F00:6628 -F00:6629 BRA.s LAB_U005 * go save the index and get the next digit - S02:0000E3B8: 60 EA -F00:6630 -F00:6631 * have found an sx[.x]Esxx number, the [.x] will not be present for a single digit -F00:6632 -F00:6633 LAB_U008 -F00:6634 MOVE.w d6,d3 * copy the index to the "E" - S02:0000E3BA: 36 06 -F00:6635 SUBQ.w #1,d3 * -1 gives the last digit index - S02:0000E3BC: 53 43 -F00:6636 -F00:6637 ADDQ.w #1,d6 * increment the index to the exponent sign - S02:0000E3BE: 52 46 -F00:6638 MOVE.b (a2,d6.w),d0 * get the exponent sign character - S02:0000E3C0: 10 32 60 00 -F00:6639 CMP.b #'-',d0 * compare the exponent sign with "-" - S02:0000E3C4: B0 3C 00 2D -F00:6640 BNE LAB_FCER * if it wasn't sx[.x]E-xx go do function - S02:0000E3C8: 66 00 DD A8 -F00:6641 * call error -F00:6642 -F00:6643 * found an sx[.x]E-xx number so check the exponent magnitude -F00:6644 -F00:6645 ADDQ.w #1,d6 * increment the index to the exponent 10s - S02:0000E3CC: 52 46 -F00:6646 MOVE.b (a2,d6.w),d0 * get the exponent 10s character - S02:0000E3CE: 10 32 60 00 -F00:6647 CMP.b #'0',d0 * compare the exponent 10s with "0" - S02:0000E3D2: B0 3C 00 30 -F00:6648 BEQ.s LAB_U009 * if it was sx[.x]E-0x go get the exponent - S02:0000E3D6: 67 04 -F00:6649 * 1s character -F00:6650 -F00:6651 MOVEQ #10,d0 * else start writing at index 10 - S02:0000E3D8: 70 0A -F00:6652 BRA.s LAB_U00A * go copy the digits - S02:0000E3DA: 60 08 -F00:6653 -F00:6654 * found an sx[.x]E-0x number so get the exponent magnitude -F00:6655 -F00:6656 LAB_U009 -F00:6657 ADDQ.w #1,d6 * increment the index to the exponent 1s - S02:0000E3DC: 52 46 -F00:6658 MOVEQ #$0F,d0 * set the mask for the exponent 1s digit - S02:0000E3DE: 70 0F -F00:6659 AND.b (a2,d6.w),d0 * get and convert the exponent 1s digit - S02:0000E3E0: C0 32 60 00 -F00:6660 LAB_U00A -F00:6661 MOVE.w d3,d2 * copy the number last digit index - S02:0000E3E4: 34 03 -F00:6662 CMPI.w #1,d2 * is the number of the form sxE-0x - S02:0000E3E6: 0C 42 00 01 -F00:6663 BNE.s LAB_U00B * if it is sx.xE-0x skip the increment - S02:0000E3EA: 66 02 -F00:6664 -F00:6665 * else make room for the decimal point -F00:6666 ADDQ.w #1,d2 * add 1 to the write index - S02:0000E3EC: 52 42 -F00:6667 LAB_U00B -F00:6668 ADD.w d0,d2 * add the exponent 1s to the write index - S02:0000E3EE: D4 40 -F00:6669 MOVEQ #10,d0 * set the maximum write index - S02:0000E3F0: 70 0A -F00:6670 SUB.w d2,d0 * compare the index with the maximum - S02:0000E3F2: 90 42 -F00:6671 BGT.s LAB_U00C * if the index < the maximum continue - S02:0000E3F4: 6E 0C -F00:6672 -F00:6673 ADD.w d0,d2 * else set the index to the maximum - S02:0000E3F6: D4 40 -F00:6674 ADD.w d0,d3 * adjust the read index - S02:0000E3F8: D6 40 -F00:6675 CMPI.w #1,d3 * compare the adjusted index with 1 - S02:0000E3FA: 0C 43 00 01 -F00:6676 BGT.s LAB_U00C * if > 1 continue - S02:0000E3FE: 6E 02 -F00:6677 -F00:6678 MOVEQ #0,d3 * else allow for the decimal point - S02:0000E400: 76 00 -F00:6679 LAB_U00C -F00:6680 MOVE.w d2,d6 * copy the write index as the number - S02:0000E402: 3C 02 -F00:6681 * string length -F00:6682 MOVEQ #0,d0 * clear d0 to null terminate the number - S02:0000E404: 70 00 -F00:6683 * string -F00:6684 LAB_U00D -F00:6685 MOVE.b d0,(a2,d2.w) * save the character to the number string - S02:0000E406: 15 80 20 00 -F00:6686 SUBQ.w #1,d2 * decrement the number write index - S02:0000E40A: 53 42 -F00:6687 CMPI.w #1,d2 * compare the number write index with 1 - S02:0000E40C: 0C 42 00 01 -F00:6688 BEQ.s LAB_U00F * if at the decimal point go save it - S02:0000E410: 67 12 -F00:6689 -F00:6690 * else write a digit to the number string -F00:6691 MOVEQ #'0',d0 * default to "0" - S02:0000E412: 70 30 -F00:6692 TST.w d3 * test the number read index - S02:0000E414: 4A 43 -F00:6693 BEQ.s LAB_U00D * if zero just go save the "0" - S02:0000E416: 67 EE -F00:6694 -F00:6695 LAB_U00E -F00:6696 MOVE.b (a2,d3.w),d0 * read the next number digit - S02:0000E418: 10 32 30 00 -F00:6697 SUBQ.w #1,d3 * decrement the read index - S02:0000E41C: 53 43 -F00:6698 CMP.b d4,d0 * compare the digit with "." - S02:0000E41E: B0 04 -F00:6699 BNE.s LAB_U00D * if not "." go save the digit - S02:0000E420: 66 E4 -F00:6700 -F00:6701 BRA.s LAB_U00E * else go get the next digit - S02:0000E422: 60 F4 -F00:6702 -F00:6703 LAB_U00F -F00:6704 MOVE.b d4,(a2,d2.w) * save the decimal point - S02:0000E424: 15 84 20 00 -F00:6705 LAB_U010 -F00:6706 TST.w d2 * test the number string decimal point index - S02:0000E428: 4A 42 -F00:6707 BNE.s LAB_U014 * if dp present skip the reset - S02:0000E42A: 66 02 -F00:6708 -F00:6709 MOVE.w d6,d2 * make the decimal point index = the length - S02:0000E42C: 34 06 -F00:6710 -F00:6711 * copy the fractional digit characters from the number string -F00:6712 -F00:6713 LAB_U014 -F00:6714 MOVE.w d2,d3 * copy the number string decimal point index - S02:0000E42E: 36 02 -F00:6715 ADDQ.w #1,d3 * increment the number string index - S02:0000E430: 52 43 -F00:6716 MOVE.w fsdpi(sp),d4 * get the new format string decimal point index - S02:0000E432: 38 2F 00 08 -F00:6717 LAB_U018 -F00:6718 ADDQ.w #1,d4 * increment the new format string index - S02:0000E436: 52 44 -F00:6719 CMP.w d4,d1 * compare it with the new format string length - S02:0000E438: B2 44 -F00:6720 BLS.s LAB_U022 * if done the fraction digits go do integer - S02:0000E43A: 63 22 -F00:6721 -F00:6722 MOVE.b (a0,d4.w),d0 * get a new format string character - S02:0000E43C: 10 30 40 00 -F00:6723 CMP.b #'%',d0 * compare it with "%" - S02:0000E440: B0 3C 00 25 -F00:6724 BEQ.s LAB_U01C * if "%" go copy a number character - S02:0000E444: 67 06 -F00:6725 -F00:6726 CMP.b #'#',d0 * compare it with "#" - S02:0000E446: B0 3C 00 23 -F00:6727 BNE.s LAB_U018 * if not "#" go do the next new format character - S02:0000E44A: 66 EA -F00:6728 -F00:6729 LAB_U01C -F00:6730 MOVEQ #'0',d0 * default to "0" character - S02:0000E44C: 70 30 -F00:6731 CMP.w d3,d6 * compare the number string index with length - S02:0000E44E: BC 43 -F00:6732 BLS.s LAB_U020 * if there skip the character get - S02:0000E450: 63 06 -F00:6733 -F00:6734 MOVE.b (a2,d3.w),d0 * get a character from the number string - S02:0000E452: 10 32 30 00 -F00:6735 ADDQ.w #1,d3 * increment the number string index - S02:0000E456: 52 43 -F00:6736 LAB_U020 -F00:6737 MOVE.b d0,(a0,d4.w) * save the number character to the new format - S02:0000E458: 11 80 40 00 -F00:6738 * string -F00:6739 BRA.s LAB_U018 * go do the next new format character - S02:0000E45C: 60 D8 -F00:6740 -F00:6741 * now copy the integer digit characters from the number string -F00:6742 -F00:6743 LAB_U022 -F00:6744 MOVEQ #0,d6 * clear the sign done flag - S02:0000E45E: 7C 00 -F00:6745 MOVEQ #0,d5 * clear the sign present flag - S02:0000E460: 7A 00 -F00:6746 SUBQ.w #1,d2 * decrement the number string index - S02:0000E462: 53 42 -F00:6747 BNE.s LAB_U026 * if not now at sign continue - S02:0000E464: 66 08 -F00:6748 -F00:6749 MOVEQ #1,d2 * increment the number string index - S02:0000E466: 74 01 -F00:6750 MOVE.b #'0',(a2,d2.w) * replace the point with a zero - S02:0000E468: 15 BC 00 30 20 00 -F00:6751 LAB_U026 -F00:6752 MOVE.w fsdpi(sp),d4 * get the new format string decimal point index - S02:0000E46E: 38 2F 00 08 -F00:6753 CMP.w d4,d1 * compare it with the new format string length - S02:0000E472: B2 44 -F00:6754 BCC.s LAB_U02A * if within the string go use the index - S02:0000E474: 64 02 -F00:6755 -F00:6756 MOVE.w d1,d4 * else set the index to the end of the string - S02:0000E476: 38 01 -F00:6757 LAB_U02A -F00:6758 SUBQ.w #1,d4 * decrement the new format string index - S02:0000E478: 53 44 -F00:6759 BMI.s LAB_U03E * if all done go test for any overflow - S02:0000E47A: 6B 62 -F00:6760 -F00:6761 MOVE.b (a0,d4.w),d0 * else get a new format string character - S02:0000E47C: 10 30 40 00 -F00:6762 -F00:6763 MOVEQ #'0',d7 * default to "0" character - S02:0000E480: 7E 30 -F00:6764 CMP.b #'%',d0 * compare it with "%" - S02:0000E482: B0 3C 00 25 -F00:6765 BEQ.s LAB_U02B * if "%" go copy a number character - S02:0000E486: 67 08 -F00:6766 -F00:6767 MOVEQ #' ',d7 * default to " " character - S02:0000E488: 7E 20 -F00:6768 CMP.b #'#',d0 * compare it with "#" - S02:0000E48A: B0 3C 00 23 -F00:6769 BNE.s LAB_U02C * if not "#" go try "," - S02:0000E48E: 66 06 -F00:6770 -F00:6771 LAB_U02B -F00:6772 TST.w d2 * test the number string index - S02:0000E490: 4A 42 -F00:6773 BNE.s LAB_U036 * if not at the sign go get a number character - S02:0000E492: 66 34 -F00:6774 -F00:6775 BRA.s LAB_U03C * else go save the default character - S02:0000E494: 60 42 -F00:6776 -F00:6777 LAB_U02C -F00:6778 CMP.b #',',d0 * compare it with "," - S02:0000E496: B0 3C 00 2C -F00:6779 BNE.s LAB_U030 * if not "," go try the sign characters - S02:0000E49A: 66 10 -F00:6780 -F00:6781 TST.w d2 * test the number string index - S02:0000E49C: 4A 42 -F00:6782 BNE.s LAB_U02E * if not at the sign keep the "," - S02:0000E49E: 66 08 -F00:6783 -F00:6784 CMP.b #'%',-1(a0,d4.w) * else compare the next format string character - S02:0000E4A0: 0C 30 00 25 40 FF -F00:6785 * with "%" -F00:6786 BNE.s LAB_U03C * if not "%" keep the default character - S02:0000E4A6: 66 30 -F00:6787 -F00:6788 LAB_U02E -F00:6789 MOVE.b d0,d7 * else use the "," character - S02:0000E4A8: 1E 00 -F00:6790 BRA.s LAB_U03C * go save the character to the string - S02:0000E4AA: 60 2C -F00:6791 -F00:6792 LAB_U030 -F00:6793 CMP.b #'-',d0 * compare it with "-" - S02:0000E4AC: B0 3C 00 2D -F00:6794 BEQ.s LAB_U034 * if "-" go do the sign character - S02:0000E4B0: 67 10 -F00:6795 -F00:6796 CMP.b #'+',d0 * compare it with "+" - S02:0000E4B2: B0 3C 00 2B -F00:6797 BNE.s LAB_U02A * if not "+" go do the next new format character - S02:0000E4B6: 66 C0 -F00:6798 -F00:6799 CMP.b #'-',(a2) * compare the sign character with "-" - S02:0000E4B8: 0C 12 00 2D -F00:6800 BEQ.s LAB_U034 * if "-" don't change the sign character - S02:0000E4BC: 67 04 -F00:6801 -F00:6802 MOVE.b #'+',(a2) * else make the sign character "+" - S02:0000E4BE: 14 BC 00 2B -F00:6803 LAB_U034 -F00:6804 MOVE.b d0,d5 * set the sign present flag - S02:0000E4C2: 1A 00 -F00:6805 TST.w d2 * test the number string index - S02:0000E4C4: 4A 42 -F00:6806 BEQ.s LAB_U038 * if at the sign keep the default character - S02:0000E4C6: 67 08 -F00:6807 -F00:6808 LAB_U036 -F00:6809 MOVE.b (a2,d2.w),d7 * else get a character from the number string - S02:0000E4C8: 1E 32 20 00 -F00:6810 SUBQ.w #1,d2 * decrement the number string index - S02:0000E4CC: 53 42 -F00:6811 BRA.s LAB_U03C * go save the character - S02:0000E4CE: 60 08 -F00:6812 -F00:6813 LAB_U038 -F00:6814 TST.b d6 * test the sign done flag - S02:0000E4D0: 4A 06 -F00:6815 BNE.s LAB_U03C * if the sign has been done go use the space - S02:0000E4D2: 66 04 -F00:6816 * character -F00:6817 -F00:6818 MOVE.b (a2),d7 * else get the sign character - S02:0000E4D4: 1E 12 -F00:6819 MOVE.b d7,d6 * flag that the sign has been done - S02:0000E4D6: 1C 07 -F00:6820 LAB_U03C -F00:6821 MOVE.b d7,(a0,d4.w) * save the number character to the new format - S02:0000E4D8: 11 87 40 00 -F00:6822 * string -F00:6823 BRA.s LAB_U02A * go do the next new format character - S02:0000E4DC: 60 9A -F00:6824 -F00:6825 * test for overflow conditions -F00:6826 -F00:6827 LAB_U03E -F00:6828 TST.w d2 * test the number string index - S02:0000E4DE: 4A 42 -F00:6829 BNE.s LAB_U040 * if all the digits aren't done go output - S02:0000E4E0: 66 14 -F00:6830 * an overflow indication -F00:6831 -F00:6832 * test for sign overflows -F00:6833 -F00:6834 TST.b d5 * test the sign present flag - S02:0000E4E2: 4A 05 -F00:6835 BEQ.s LAB_U04A * if no sign present go add the string - S02:0000E4E4: 67 54 -F00:6836 -F00:6837 * there was a sign in the format string -F00:6838 -F00:6839 TST.b d6 * test the sign done flag - S02:0000E4E6: 4A 06 -F00:6840 BNE.s LAB_U04A * if the sign is done go add the string - S02:0000E4E8: 66 50 -F00:6841 -F00:6842 * the sign isn't done so see if it was mandatory -F00:6843 -F00:6844 CMPI.b #'+',d5 * compare the sign with "+" - S02:0000E4EA: 0C 05 00 2B -F00:6845 BEQ.s LAB_U040 * if it was "+" go output an overflow - S02:0000E4EE: 67 06 -F00:6846 * indication -F00:6847 -F00:6848 * the sign wasn't mandatory but the number may have been negative -F00:6849 -F00:6850 CMP.b #'-',(a2) * compare the sign character with "-" - S02:0000E4F0: 0C 12 00 2D -F00:6851 BNE.s LAB_U04A * if it wasn't "-" go add the string - S02:0000E4F4: 66 44 -F00:6852 -F00:6853 * else the sign was "-" and a sign hasn't been output so .. -F00:6854 -F00:6855 * the number overflowed the format string so replace all the special format characters -F00:6856 * with the overflow character -F00:6857 -F00:6858 LAB_U040 -F00:6859 MOVEQ #ofchr,d5 * set the overflow character - S02:0000E4F6: 7A 23 -F00:6860 MOVE.w d1,d7 * copy the new format string length - S02:0000E4F8: 3E 01 -F00:6861 SUBQ.w #1,d7 * adjust for the loop type - S02:0000E4FA: 53 47 -F00:6862 MOVE.w fsti(sp),d6 * copy the new format string last index - S02:0000E4FC: 3C 2F 00 04 -F00:6863 SUBQ.w #1,d6 * -1 gives the last character of this string - S02:0000E500: 53 46 -F00:6864 BGT.s LAB_U044 * if not zero continue - S02:0000E502: 6E 02 -F00:6865 -F00:6866 MOVE.w d7,d6 * else set the format string index to the end - S02:0000E504: 3C 07 -F00:6867 LAB_U044 -F00:6868 MOVE.b (a1,d6.w),d0 * get a character from the format string - S02:0000E506: 10 31 60 00 -F00:6869 CMPI.b #'#',d0 * compare it with "#" special format character - S02:0000E50A: 0C 00 00 23 -F00:6870 BEQ.s LAB_U046 * if "#" go use the overflow character - S02:0000E50E: 67 1E -F00:6871 -F00:6872 CMPI.b #'%',d0 * compare it with "%" special format character - S02:0000E510: 0C 00 00 25 -F00:6873 BEQ.s LAB_U046 * if "%" go use the overflow character - S02:0000E514: 67 18 -F00:6874 -F00:6875 CMPI.b #',',d0 * compare it with "," special format character - S02:0000E516: 0C 00 00 2C -F00:6876 BEQ.s LAB_U046 * if "," go use the overflow character - S02:0000E51A: 67 12 -F00:6877 -F00:6878 CMPI.b #'+',d0 * compare it with "+" special format character - S02:0000E51C: 0C 00 00 2B -F00:6879 BEQ.s LAB_U046 * if "+" go use the overflow character - S02:0000E520: 67 0C -F00:6880 -F00:6881 CMPI.b #'-',d0 * compare it with "-" special format character - S02:0000E522: 0C 00 00 2D -F00:6882 BEQ.s LAB_U046 * if "-" go use the overflow character - S02:0000E526: 67 06 -F00:6883 -F00:6884 CMPI.b #'.',d0 * compare it with "." special format character - S02:0000E528: 0C 00 00 2E -F00:6885 BNE.s LAB_U048 * if not "." skip the using overflow character - S02:0000E52C: 66 02 -F00:6886 -F00:6887 LAB_U046 -F00:6888 MOVE.b d5,d0 * use the overflow character - S02:0000E52E: 10 05 -F00:6889 LAB_U048 -F00:6890 MOVE.b d0,(a0,d7.w) * save the character to the new format string - S02:0000E530: 11 80 70 00 -F00:6891 SUBQ.w #1,d6 * decrement the format string index - S02:0000E534: 53 46 -F00:6892 DBF d7,LAB_U044 * decrement the count and loop if not all done - S02:0000E536: 51 CF FF CE -F00:6893 -F00:6894 * add the new string to the previous string -F00:6895 -F00:6896 LAB_U04A -F00:6897 LEA 6(a4),a0 * get the descriptor pointer for string 1 - S02:0000E53A: 41 EC 00 06 -F00:6898 MOVE.l a4,FAC1_m(a3) * save the descriptor pointer for string 2 - S02:0000E53E: 27 4C 05 90 -F00:6899 BSR LAB_224E * concatenate the strings - S02:0000E542: 61 00 F0 18 -F00:6900 -F00:6901 * now check for any tail on the format string -F00:6902 -F00:6903 MOVE.w fsti(sp),d0 * get this index - S02:0000E546: 30 2F 00 04 -F00:6904 BEQ.s LAB_U04C * if at start of string skip the output - S02:0000E54A: 67 20 -F00:6905 -F00:6906 MOVE.w d0,fsli(sp) * save this index to the last index - S02:0000E54C: 3F 40 00 06 -F00:6907 BSR LAB_ProcFo * now process the format string - S02:0000E550: 61 00 00 82 -F00:6908 TST.b d2 * test the special characters flag - S02:0000E554: 4A 02 -F00:6909 BNE.s LAB_U04C * if special characters present skip the output - S02:0000E556: 66 14 -F00:6910 -F00:6911 * else output the new string part -F00:6912 -F00:6913 BSR.s LAB_DupFmt * duplicate the processed format string section - S02:0000E558: 61 3C -F00:6914 MOVE.w fsti(sp),fsli(sp) * copy this index to the last index - S02:0000E55A: 3F 6F 00 04 00 06 -F00:6915 -F00:6916 * add the new string to the previous string -F00:6917 -F00:6918 LEA 6(a4),a0 * get the descriptor pointer for string 1 - S02:0000E560: 41 EC 00 06 -F00:6919 MOVE.l a4,FAC1_m(a3) * save the descriptor pointer for string 2 - S02:0000E564: 27 4C 05 90 -F00:6920 BSR LAB_224E * concatenate the strings - S02:0000E568: 61 00 EF F2 -F00:6921 -F00:6922 * check for another value or end of function -F00:6923 -F00:6924 LAB_U04C -F00:6925 MOVE.b (a5)+,d0 * get the next BASIC byte - S02:0000E56C: 10 1D -F00:6926 CMP.b #')',d0 * compare with close bracket - S02:0000E56E: B0 3C 00 29 -F00:6927 BNE LAB_U002 * if not ")" go do next value - S02:0000E572: 66 00 FD CA -F00:6928 -F00:6929 * pop the result string off the descriptor stack -F00:6930 -F00:6931 MOVEA.l a4,a0 * copy the result string descriptor pointer - S02:0000E576: 20 4C -F00:6932 MOVE.l Sstorl(a3),d1 * save the bottom of string space - S02:0000E578: 22 2B 04 46 -F00:6933 BSR LAB_22BA * pop (a0) descriptor, returns with .. - S02:0000E57C: 61 00 F0 40 -F00:6934 * d0 = length, a0 = pointer -F00:6935 MOVE.l d1,Sstorl(a3) * restore the bottom of string space - S02:0000E580: 27 41 04 46 -F00:6936 MOVEA.l a0,a1 * copy the string result pointer - S02:0000E584: 22 48 -F00:6937 MOVE.w d0,d1 * copy the string result length - S02:0000E586: 32 00 -F00:6938 -F00:6939 * pop the format string off the descriptor stack -F00:6940 -F00:6941 MOVEA.l (sp)+,a0 * pull the format string descriptor pointer - S02:0000E588: 20 5F -F00:6942 BSR LAB_22BA * pop (a0) descriptor, returns with .. - S02:0000E58A: 61 00 F0 32 -F00:6943 * d0 = length, a0 = pointer -F00:6944 -F00:6945 LEA fend(sp),sp * dump the saved values - S02:0000E58E: 50 8F -F00:6946 -F00:6947 * push the result string back on the descriptor stack and return -F00:6948 -F00:6949 MOVEA.l a1,a0 * copy the result string pointer back - S02:0000E590: 20 49 -F00:6950 BRA LAB_RTST * push a string on the descriptor stack and - S02:0000E592: 60 00 EE 80 -F00:6951 * return. a0 = pointer, d1 = length -F00:6952 -F00:6953 -F00:6954 ************************************************************************************* -F00:6955 * -F00:6956 * duplicate the processed format string section -F00:6957 -F00:6958 * make a string as long as the format string -F00:6959 LAB_DupFmt -F00:6960 MOVEA.l 4+fsd(sp),a1 * get the format string descriptor pointer - S02:0000E596: 22 6F 00 04 -F00:6961 MOVE.w 4(a1),d7 * get the format string length - S02:0000E59A: 3E 29 00 04 -F00:6962 MOVE.w 4+fsli(sp),d2 * get the format string last index - S02:0000E59E: 34 2F 00 0A -F00:6963 MOVE.w 4+fsti(sp),d6 * get the format string this index - S02:0000E5A2: 3C 2F 00 08 -F00:6964 MOVE.w d6,d1 * copy the format string this index - S02:0000E5A6: 32 06 -F00:6965 SUB.w d2,d1 * subtract the format string last index - S02:0000E5A8: 92 42 -F00:6966 BHI.s LAB_D002 * if > 0 skip the correction - S02:0000E5AA: 62 02 -F00:6967 -F00:6968 ADD.w d7,d1 * else add the format string length as the - S02:0000E5AC: D2 47 -F00:6969 * correction -F00:6970 LAB_D002 -F00:6971 BSR LAB_2115 * make string space d1 bytes long - S02:0000E5AE: 61 00 EE 7E -F00:6972 * return a0/Sutill = pointer, others unchanged -F00:6973 -F00:6974 * push the new string on the descriptor stack -F00:6975 -F00:6976 BSR LAB_RTST * push a string on the descriptor stack and - S02:0000E5B2: 61 00 EE 60 -F00:6977 * return. a0 = pointer, d1 = length -F00:6978 -F00:6979 * copy the characters from the format string -F00:6980 -F00:6981 MOVEA.l 4+fsd(sp),a1 * get the format string descriptor pointer - S02:0000E5B6: 22 6F 00 04 -F00:6982 MOVEA.l (a1),a1 * get the format string pointer - S02:0000E5BA: 22 51 -F00:6983 MOVEQ #0,d4 * clear the new string index - S02:0000E5BC: 78 00 -F00:6984 LAB_D00A -F00:6985 MOVE.b (a1,d2.w),(a0,d4.w) * get a character from the format string and - S02:0000E5BE: 11 B1 20 00 40 00 -F00:6986 * save it to the new string -F00:6987 ADDQ.w #1,d4 * increment the new string index - S02:0000E5C4: 52 44 -F00:6988 ADDQ.w #1,d2 * increment the format string index - S02:0000E5C6: 52 42 -F00:6989 CMP.w d2,d7 * compare the format index with the length - S02:0000E5C8: BE 42 -F00:6990 BNE.s LAB_D00E * if not there skip the reset - S02:0000E5CA: 66 02 -F00:6991 -F00:6992 MOVEQ #0,d2 * else reset the format string index - S02:0000E5CC: 74 00 -F00:6993 LAB_D00E -F00:6994 CMP.w d2,d6 * compare the index with this index - S02:0000E5CE: BC 42 -F00:6995 BNE.s LAB_D00A * if not equal go do the next character - S02:0000E5D0: 66 EC -F00:6996 -F00:6997 RTS - S02:0000E5D2: 4E 75 -F00:6998 -F00:6999 -F00:7000 ************************************************************************************** -F00:7001 * -F00:7002 * process the format string -F00:7003 -F00:7004 LAB_ProcFo -F00:7005 MOVEA.l 4+fsd(sp),a1 * get the format string descriptor pointer - S02:0000E5D4: 22 6F 00 04 -F00:7006 MOVE.w 4(a1),d7 * get the format string length - S02:0000E5D8: 3E 29 00 04 -F00:7007 MOVEA.l (a1),a1 * get the format string pointer - S02:0000E5DC: 22 51 -F00:7008 MOVE.w 4+fsli(sp),d6 * get the format string last index - S02:0000E5DE: 3C 2F 00 0A -F00:7009 -F00:7010 MOVE.w d7,4+fsdpi(sp) * set the format string decimal point index - S02:0000E5E2: 3F 47 00 0C -F00:7011 *## MOVE.w #-1,4+fsdpi(sp) * set the format string decimal point index -F00:7012 MOVEQ #0,d5 * no decimal point - S02:0000E5E6: 7A 00 -F00:7013 MOVEQ #0,d3 * no decimal characters - S02:0000E5E8: 76 00 -F00:7014 MOVEQ #0,d2 * no special characters - S02:0000E5EA: 74 00 -F00:7015 LAB_P004 -F00:7016 MOVE.b (a1,d6.w),d0 * get a format string byte - S02:0000E5EC: 10 31 60 00 -F00:7017 -F00:7018 CMP.b #',',d0 * compare it with "," - S02:0000E5F0: B0 3C 00 2C -F00:7019 BEQ.s LAB_P01A * if "," go do the next format string byte - S02:0000E5F4: 67 42 -F00:7020 -F00:7021 CMP.b #'#',d0 * compare it with "#" - S02:0000E5F6: B0 3C 00 23 -F00:7022 BEQ.s LAB_P008 * if "#" go flag special characters - S02:0000E5FA: 67 06 -F00:7023 -F00:7024 CMP.b #'%',d0 * compare it with "%" - S02:0000E5FC: B0 3C 00 25 -F00:7025 BNE.s LAB_P00C * if not "%" go try "+" - S02:0000E600: 66 08 -F00:7026 -F00:7027 LAB_P008 -F00:7028 TST.l d5 * test the decimal point flag - S02:0000E602: 4A 85 -F00:7029 BPL.s LAB_P00E * if no point skip counting decimal characters - S02:0000E604: 6A 10 -F00:7030 -F00:7031 ADDQ.w #1,d3 * else increment the decimal character count - S02:0000E606: 52 43 -F00:7032 BRA.s LAB_P01A * go do the next character - S02:0000E608: 60 2E -F00:7033 -F00:7034 LAB_P00C -F00:7035 CMP.b #'+',d0 * compare it with "+" - S02:0000E60A: B0 3C 00 2B -F00:7036 BEQ.s LAB_P00E * if "+" go flag special characters - S02:0000E60E: 67 06 -F00:7037 -F00:7038 CMP.b #'-',d0 * compare it with "-" - S02:0000E610: B0 3C 00 2D -F00:7039 BNE.s LAB_P010 * if not "-" go check decimal point - S02:0000E614: 66 04 -F00:7040 -F00:7041 LAB_P00E -F00:7042 OR.b d0,d2 * flag special characters - S02:0000E616: 84 00 -F00:7043 BRA.s LAB_P01A * go do the next character - S02:0000E618: 60 1E -F00:7044 -F00:7045 LAB_P010 -F00:7046 CMP.b #'.',d0 * compare it with "." - S02:0000E61A: B0 3C 00 2E -F00:7047 BNE.s LAB_P018 * if not "." go check next - S02:0000E61E: 66 14 -F00:7048 -F00:7049 * "." a decimal point -F00:7050 -F00:7051 TST.l d5 * if there is already a decimal point - S02:0000E620: 4A 85 -F00:7052 BMI.s LAB_P01A * go do the next character - S02:0000E622: 6B 14 -F00:7053 -F00:7054 MOVE.w d6,d0 * copy the decimal point index - S02:0000E624: 30 06 -F00:7055 SUB.w 4+fsli(sp),d0 * calculate it from the scan start - S02:0000E626: 90 6F 00 0A -F00:7056 MOVE.w d0,4+fsdpi(sp) * save the decimal point index - S02:0000E62A: 3F 40 00 0C -F00:7057 MOVEQ #-1,d5 * flag decimal point - S02:0000E62E: 7A FF -F00:7058 OR.b d0,d2 * flag special characters - S02:0000E630: 84 00 -F00:7059 BRA.s LAB_P01A * go do the next character - S02:0000E632: 60 04 -F00:7060 -F00:7061 * was not a special character -F00:7062 -F00:7063 LAB_P018 -F00:7064 TST.b d2 * test if there have been special characters - S02:0000E634: 4A 02 -F00:7065 BNE.s LAB_P01E * if so exit the format string process - S02:0000E636: 66 08 -F00:7066 -F00:7067 LAB_P01A -F00:7068 ADDQ.w #1,d6 * increment the format string index - S02:0000E638: 52 46 -F00:7069 CMP.w d6,d7 * compare it with the format string length - S02:0000E63A: BE 46 -F00:7070 BHI.s LAB_P004 * if length > index go get the next character - S02:0000E63C: 62 AE -F00:7071 -F00:7072 MOVEQ #0,d6 * length = index so reset the format string - S02:0000E63E: 7C 00 -F00:7073 * index -F00:7074 LAB_P01E -F00:7075 MOVE.w d6,4+fsti(sp) * save the format string this index - S02:0000E640: 3F 46 00 08 -F00:7076 MOVE.w d3,4+fsdc(sp) * save the format string decimal characters - S02:0000E644: 3F 43 00 0E -F00:7077 -F00:7078 RTS - S02:0000E648: 4E 75 -F00:7079 -F00:7080 -F00:7081 ************************************************************************************* -F00:7082 * -F00:7083 * perform BIN$() -F00:7084 * # of leading 0s is in d1, the number is in d0 -F00:7085 -F00:7086 LAB_BINS -F00:7087 CMP.b #$21,d1 * max + 1 - S02:0000E64A: B2 3C 00 21 -F00:7088 BCC LAB_FCER * exit if too big ( > or = ) - S02:0000E64E: 64 00 DB 22 -F00:7089 -F00:7090 MOVEQ #$1F,d2 * bit count-1 - S02:0000E652: 74 1F -F00:7091 LEA Binss(a3),a0 * point to string - S02:0000E654: 41 EB 05 B6 -F00:7092 MOVEQ #$30,d4 * "0" character for ADDX - S02:0000E658: 78 30 -F00:7093 NextB1 -F00:7094 MOVEQ #0,d3 * clear byte - S02:0000E65A: 76 00 -F00:7095 LSR.l #1,d0 * shift bit into Xb - S02:0000E65C: E2 88 -F00:7096 ADDX.b d4,d3 * add carry and character to zero - S02:0000E65E: D7 04 -F00:7097 MOVE.b d3,(a0,d2.w) * save character to string - S02:0000E660: 11 83 20 00 -F00:7098 DBF d2,NextB1 * decrement and loop if not done - S02:0000E664: 51 CA FF F4 -F00:7099 -F00:7100 * this is the exit code and is also used by HEX$() -F00:7101 -F00:7102 EndBHS -F00:7103 MOVE.b #0,BHsend(a3) * null terminate the string - S02:0000E668: 17 7C 00 00 05 D6 -F00:7104 TST.b d1 * test # of characters - S02:0000E66E: 4A 01 -F00:7105 BEQ.s NextB2 * go truncate string - S02:0000E670: 67 0E -F00:7106 -F00:7107 NEG.l d1 * make -ve - S02:0000E672: 44 81 -F00:7108 ADD.l #BHsend,d1 * effectively (end-length) - S02:0000E674: D2 BC 00 00 05 D6 -F00:7109 LEA 0(a3,d1.w),a0 * effectively add (end-length) to pointer - S02:0000E67A: 41 F3 10 00 -F00:7110 BRA.s BinPr * go print string - S02:0000E67E: 60 0E -F00:7111 -F00:7112 * truncate string to remove leading "0"s -F00:7113 -F00:7114 NextB2 -F00:7115 MOVE.b (a0),d0 * get byte - S02:0000E680: 10 10 -F00:7116 BEQ.s BinPr * if null then end of string so add 1 and go - S02:0000E682: 67 0A -F00:7117 * print it -F00:7118 -F00:7119 CMP.b #'0',d0 * compare with "0" - S02:0000E684: B0 3C 00 30 -F00:7120 BNE.s GoPr * if not "0" then go print string from here - S02:0000E688: 66 0E -F00:7121 -F00:7122 ADDQ.w #1,a0 * else increment pointer - S02:0000E68A: 52 48 -F00:7123 BRA.s NextB2 * loop always - S02:0000E68C: 60 F2 -F00:7124 -F00:7125 * make fixed length output string - ignore overflows! -F00:7126 -F00:7127 BinPr -F00:7128 LEA BHsend(a3),a1 * get string end - S02:0000E68E: 43 EB 05 D6 -F00:7129 CMPA.l a1,a0 * are we at the string end - S02:0000E692: B1 C9 -F00:7130 BNE.s GoPr * branch if not - S02:0000E694: 66 02 -F00:7131 -F00:7132 SUBQ.w #1,a0 * else need at least one zero - S02:0000E696: 53 48 -F00:7133 GoPr -F00:7134 BRA LAB_20AE * print " terminated string to FAC1, stack & RET - S02:0000E698: 60 00 ED 34 -F00:7135 -F00:7136 -F00:7137 ************************************************************************************* -F00:7138 * -F00:7139 * perform HEX$() -F00:7140 * # of leading 0s is in d1, the number is in d0 -F00:7141 -F00:7142 LAB_HEXS -F00:7143 CMP.b #$09,d1 * max + 1 - S02:0000E69C: B2 3C 00 09 -F00:7144 BCC LAB_FCER * exit if too big ( > or = ) - S02:0000E6A0: 64 00 DA D0 -F00:7145 -F00:7146 MOVEQ #$07,d2 * nibble count-1 - S02:0000E6A4: 74 07 -F00:7147 LEA Hexss(a3),a0 * point to string - S02:0000E6A6: 41 EB 05 CE -F00:7148 MOVEQ #$30,d4 * "0" character for ABCD - S02:0000E6AA: 78 30 -F00:7149 NextH1 -F00:7150 MOVE.b d0,d3 * copy lowest byte - S02:0000E6AC: 16 00 -F00:7151 ROR.l #4,d0 * shift nibble into 0-3 - S02:0000E6AE: E8 98 -F00:7152 AND.b #$0F,d3 * just this nibble - S02:0000E6B0: C6 3C 00 0F -F00:7153 MOVE.b d3,d5 * copy it - S02:0000E6B4: 1A 03 -F00:7154 ADD.b #$F6,d5 * set extend bit - S02:0000E6B6: DA 3C 00 F6 -F00:7155 ABCD d4,d3 * decimal add extend and character to zero - S02:0000E6BA: C7 04 -F00:7156 MOVE.b d3,(a0,d2.w) * save character to string - S02:0000E6BC: 11 83 20 00 -F00:7157 DBF d2,NextH1 * decrement and loop if not done - S02:0000E6C0: 51 CA FF EA -F00:7158 -F00:7159 BRA.s EndBHS * go process string - S02:0000E6C4: 60 A2 -F00:7160 -F00:7161 -F00:7162 ************************************************************************************* -F00:7163 * -F00:7164 * ctrl-c check routine. includes limited "life" byte save for INGET routine -F00:7165 -F00:7166 VEC_CC -F00:7167 TST.b ccflag(a3) * check [CTRL-C] check flag - S02:0000E6C6: 4A 2B 05 E8 -F00:7168 BNE.s RTS_022 * exit if [CTRL-C] check inhibited - S02:0000E6CA: 66 1E -F00:7169 -F00:7170 JSR V_INPT(a3) * scan input device - S02:0000E6CC: 4E AB 04 0C -F00:7171 BCC.s LAB_FBA0 * exit if buffer empty - S02:0000E6D0: 64 0E -F00:7172 -F00:7173 MOVE.b d0,ccbyte(a3) * save received byte - S02:0000E6D2: 17 40 05 E9 -F00:7174 MOVE.b #$20,ccnull(a3) * set "life" timer for bytes countdown - S02:0000E6D6: 17 7C 00 20 05 EA -F00:7175 BRA LAB_1636 * return to BASIC - S02:0000E6DC: 60 00 DF 06 -F00:7176 -F00:7177 LAB_FBA0 -F00:7178 TST.b ccnull(a3) * get countdown byte - S02:0000E6E0: 4A 2B 05 EA -F00:7179 BEQ.s RTS_022 * exit if finished - S02:0000E6E4: 67 04 -F00:7180 -F00:7181 SUBQ.b #1,ccnull(a3) * else decrement countdown - S02:0000E6E6: 53 2B 05 EA -F00:7182 RTS_022 -F00:7183 RTS - S02:0000E6EA: 4E 75 -F00:7184 -F00:7185 -F00:7186 ************************************************************************************* -F00:7187 * -F00:7188 * get byte from input device, no waiting -F00:7189 * returns with carry set if byte in A -F00:7190 -F00:7191 INGET -F00:7192 JSR V_INPT(a3) * call scan input device - S02:0000E6EC: 4E AB 04 0C -F00:7193 BCS.s LAB_FB95 * if byte go reset timer - S02:0000E6F0: 65 0A -F00:7194 -F00:7195 MOVE.b ccnull(a3),d0 * get countdown - S02:0000E6F2: 10 2B 05 EA -F00:7196 BEQ.s RTS_022 * exit if empty - S02:0000E6F6: 67 F2 -F00:7197 -F00:7198 MOVE.b ccbyte(a3),d0 * get last received byte - S02:0000E6F8: 10 2B 05 E9 -F00:7199 LAB_FB95 -F00:7200 MOVE.b #$00,ccnull(a3) * clear timer because we got a byte - S02:0000E6FC: 17 7C 00 00 05 EA -F00:7201 ORI.b #1,CCR * set carry, flag we got a byte - S02:0000E702: 00 3C 00 01 -F00:7202 RTS - S02:0000E706: 4E 75 -F00:7203 -F00:7204 -F00:7205 ************************************************************************************* -F00:7206 * -F00:7207 * perform MAX() -F00:7208 -F00:7209 LAB_MAX -F00:7210 BSR LAB_EVEZ * evaluate expression (no decrement) - S02:0000E708: 61 00 E5 52 -F00:7211 TST.b Dtypef(a3) * test data type - S02:0000E70C: 4A 2B 05 B5 -F00:7212 BMI LAB_TMER * if string do Type missmatch Error/warm start - S02:0000E710: 6B 00 DA 40 -F00:7213 -F00:7214 LAB_MAXN -F00:7215 BSR.s LAB_PHFA * push FAC1, evaluate expression, - S02:0000E714: 61 2C -F00:7216 * pull FAC2 & compare with FAC1 -F00:7217 BCC.s LAB_MAXN * branch if no swap to do - S02:0000E716: 64 FC -F00:7218 -F00:7219 BSR LAB_279B * copy FAC2 to FAC1 - S02:0000E718: 61 00 F4 B2 -F00:7220 BRA.s LAB_MAXN * go do next - S02:0000E71C: 60 F6 -F00:7221 -F00:7222 -F00:7223 ************************************************************************************* -F00:7224 * -F00:7225 * perform MIN() -F00:7226 -F00:7227 LAB_MIN -F00:7228 BSR LAB_EVEZ * evaluate expression (no decrement) - S02:0000E71E: 61 00 E5 3C -F00:7229 TST.b Dtypef(a3) * test data type - S02:0000E722: 4A 2B 05 B5 -F00:7230 BMI LAB_TMER * if string do Type missmatch Error/warm start - S02:0000E726: 6B 00 DA 2A -F00:7231 -F00:7232 LAB_MINN -F00:7233 BSR.s LAB_PHFA * push FAC1, evaluate expression, - S02:0000E72A: 61 16 -F00:7234 * pull FAC2 & compare with FAC1 -F00:7235 BLS.s LAB_MINN * branch if no swap to do - S02:0000E72C: 63 FC -F00:7236 -F00:7237 BSR LAB_279B * copy FAC2 to FAC1 - S02:0000E72E: 61 00 F4 9C -F00:7238 BRA.s LAB_MINN * go do next (branch always) - S02:0000E732: 60 F6 -F00:7239 -F00:7240 * exit routine. don't bother returning to the loop code -F00:7241 * check for correct exit, else so syntax error -F00:7242 -F00:7243 LAB_MMEC -F00:7244 CMP.b #')',d0 * is it end of function? - S02:0000E734: B0 3C 00 29 -F00:7245 BNE LAB_SNER * if not do MAX MIN syntax error - S02:0000E738: 66 00 DA 44 -F00:7246 -F00:7247 LEA 4(sp),sp * dump return address (faster) - S02:0000E73C: 58 8F -F00:7248 BRA LAB_IGBY * update BASIC execute pointer (to chr past ")") - S02:0000E73E: 60 00 E6 7A -F00:7249 * and return -F00:7250 -F00:7251 * check for next, evaluate & return or exit -F00:7252 * this is the routine that does most of the work -F00:7253 -F00:7254 LAB_PHFA -F00:7255 BSR LAB_GBYT * get next BASIC byte - S02:0000E742: 61 00 E6 78 -F00:7256 CMP.b #',',d0 * is there more ? - S02:0000E746: B0 3C 00 2C -F00:7257 BNE.s LAB_MMEC * if not go do end check - S02:0000E74A: 66 E8 -F00:7258 -F00:7259 MOVE.w FAC1_e(a3),-(sp) * push exponent and sign - S02:0000E74C: 3F 2B 05 94 -F00:7260 MOVE.l FAC1_m(a3),-(sp) * push mantissa - S02:0000E750: 2F 2B 05 90 -F00:7261 -F00:7262 BSR LAB_EVEZ * evaluate expression (no decrement) - S02:0000E754: 61 00 E5 06 -F00:7263 TST.b Dtypef(a3) * test data type - S02:0000E758: 4A 2B 05 B5 -F00:7264 BMI LAB_TMER * if string do Type missmatch Error/warm start - S02:0000E75C: 6B 00 D9 F4 -F00:7265 -F00:7266 -F00:7267 * pop FAC2 (MAX/MIN expression so far) -F00:7268 MOVE.l (sp)+,FAC2_m(a3) * pop mantissa - S02:0000E760: 27 5F 05 98 -F00:7269 -F00:7270 MOVE.w (sp)+,d0 * pop exponent and sign - S02:0000E764: 30 1F -F00:7271 MOVE.w d0,FAC2_e(a3) * save exponent and sign - S02:0000E766: 37 40 05 9C -F00:7272 MOVE.b FAC1_s(a3),FAC_sc(a3) * get FAC1 sign - S02:0000E76A: 17 6B 05 95 05 9E -F00:7273 EOR.b d0,FAC_sc(a3) * EOR to create sign compare - S02:0000E770: B1 2B 05 9E -F00:7274 BRA LAB_27FA * compare FAC1 with FAC2 & return - S02:0000E774: 60 00 F4 C2 -F00:7275 * returns d0=+1 Cb=0 if FAC1 > FAC2 -F00:7276 * returns d0= 0 Cb=0 if FAC1 = FAC2 -F00:7277 * returns d0=-1 Cb=1 if FAC1 < FAC2 -F00:7278 -F00:7279 -F00:7280 ************************************************************************************* -F00:7281 * -F00:7282 * perform WIDTH -F00:7283 -F00:7284 LAB_WDTH -F00:7285 CMP.b #',',d0 * is next byte "," - S02:0000E778: B0 3C 00 2C -F00:7286 BEQ.s LAB_TBSZ * if so do tab size - S02:0000E77C: 67 2C -F00:7287 -F00:7288 BSR LAB_GTBY * get byte parameter, result in d0 and Itemp - S02:0000E77E: 61 00 EF 9A -F00:7289 TST.b d0 * test result - S02:0000E782: 4A 00 -F00:7290 BEQ.s LAB_NSTT * branch if set for infinite line - S02:0000E784: 67 12 -F00:7291 -F00:7292 CMP.b #$10,d0 * else make min width = 16d - S02:0000E786: B0 3C 00 10 -F00:7293 BCS LAB_FCER * if less do function call error & exit - S02:0000E78A: 65 00 D9 E6 -F00:7294 -F00:7295 * this next compare ensures that we can't exit WIDTH via an error leaving the -F00:7296 * tab size greater than the line length. -F00:7297 -F00:7298 CMP.b TabSiz(a3),d0 * compare with tab size - S02:0000E78E: B0 2B 05 E2 -F00:7299 BCC.s LAB_NSTT * branch if >= tab size - S02:0000E792: 64 04 -F00:7300 -F00:7301 MOVE.b d0,TabSiz(a3) * else make tab size = terminal width - S02:0000E794: 17 40 05 E2 -F00:7302 LAB_NSTT -F00:7303 MOVE.b d0,TWidth(a3) * set the terminal width - S02:0000E798: 17 40 05 E6 -F00:7304 BSR LAB_GBYT * get BASIC byte back - S02:0000E79C: 61 00 E6 1E -F00:7305 BEQ.s WExit * exit if no following - S02:0000E7A0: 67 2C -F00:7306 -F00:7307 CMP.b #',',d0 * else is it "," - S02:0000E7A2: B0 3C 00 2C -F00:7308 BNE LAB_SNER * if not do syntax error - S02:0000E7A6: 66 00 D9 D6 -F00:7309 -F00:7310 LAB_TBSZ -F00:7311 BSR LAB_SGBY * increment and get byte, result in d0 and Itemp - S02:0000E7AA: 61 00 EF 6A -F00:7312 TST.b d0 * test TAB size - S02:0000E7AE: 4A 00 -F00:7313 BMI LAB_FCER * if >127 do function call error & exit - S02:0000E7B0: 6B 00 D9 C0 -F00:7314 -F00:7315 CMP.b #1,d0 * compare with min-1 - S02:0000E7B4: B0 3C 00 01 -F00:7316 BCS LAB_FCER * if <=1 do function call error & exit - S02:0000E7B8: 65 00 D9 B8 -F00:7317 -F00:7318 MOVE.b TWidth(a3),d1 * set flags for width - S02:0000E7BC: 12 2B 05 E6 -F00:7319 BEQ.s LAB_SVTB * skip check if infinite line - S02:0000E7C0: 67 08 -F00:7320 -F00:7321 CMP.b TWidth(a3),d0 * compare TAB with width - S02:0000E7C2: B0 2B 05 E6 -F00:7322 BGT LAB_FCER * branch if too big - S02:0000E7C6: 6E 00 D9 AA -F00:7323 -F00:7324 LAB_SVTB -F00:7325 MOVE.b d0,TabSiz(a3) * save TAB size - S02:0000E7CA: 17 40 05 E2 -F00:7326 -F00:7327 * calculate tab column limit from TAB size. The Iclim is set to the last tab -F00:7328 * position on a line that still has at least one whole tab width between it -F00:7329 * and the end of the line. -F00:7330 -F00:7331 WExit -F00:7332 MOVE.b TWidth(a3),d0 * get width - S02:0000E7CE: 10 2B 05 E6 -F00:7333 BEQ.s LAB_WDLP * branch if infinite line - S02:0000E7D2: 67 0A -F00:7334 -F00:7335 CMP.b TabSiz(a3),d0 * compare with tab size - S02:0000E7D4: B0 2B 05 E2 -F00:7336 BCC.s LAB_WDLP * branch if >= tab size - S02:0000E7D8: 64 04 -F00:7337 -F00:7338 MOVE.b d0,TabSiz(a3) * else make tab size = terminal width - S02:0000E7DA: 17 40 05 E2 -F00:7339 LAB_WDLP -F00:7340 SUB.b TabSiz(a3),d0 * subtract tab size - S02:0000E7DE: 90 2B 05 E2 -F00:7341 BCC.s LAB_WDLP * loop while no borrow - S02:0000E7E2: 64 FA -F00:7342 -F00:7343 ADD.b TabSiz(a3),d0 * add tab size back - S02:0000E7E4: D0 2B 05 E2 -F00:7344 ADD.b TabSiz(a3),d0 * add tab size back again - S02:0000E7E8: D0 2B 05 E2 -F00:7345 -F00:7346 NEG.b d0 * make -ve - S02:0000E7EC: 44 00 -F00:7347 ADD.b TWidth(a3),d0 * subtract remainder from width - S02:0000E7EE: D0 2B 05 E6 -F00:7348 MOVE.b d0,Iclim(a3) * save tab column limit - S02:0000E7F2: 17 40 05 E7 -F00:7349 RTS_023 -F00:7350 RTS - S02:0000E7F6: 4E 75 -F00:7351 -F00:7352 -F00:7353 ************************************************************************************* -F00:7354 * -F00:7355 * perform SQR() -F00:7356 -F00:7357 * d0 is number to find the root of -F00:7358 * d1 is the root result -F00:7359 * d2 is the remainder -F00:7360 * d3 is a counter -F00:7361 * d4 is temp -F00:7362 -F00:7363 LAB_SQR -F00:7364 TST.b FAC1_s(a3) * test FAC1 sign - S02:0000E7F8: 4A 2B 05 95 -F00:7365 BMI LAB_FCER * if -ve do function call error - S02:0000E7FC: 6B 00 D9 74 -F00:7366 -F00:7367 TST.b FAC1_e(a3) * test exponent - S02:0000E800: 4A 2B 05 94 -F00:7368 BEQ.s RTS_023 * exit if zero - S02:0000E804: 67 F0 -F00:7369 -F00:7370 MOVEM.l d1-d4,-(sp) * save registers - S02:0000E806: 48 E7 78 00 -F00:7371 MOVE.l FAC1_m(a3),d0 * copy FAC1 - S02:0000E80A: 20 2B 05 90 -F00:7372 MOVEQ #0,d2 * clear remainder - S02:0000E80E: 74 00 -F00:7373 MOVE.l d2,d1 * clear root - S02:0000E810: 22 02 -F00:7374 -F00:7375 MOVEQ #$1F,d3 * $1F for DBF, 64 pairs of bits to - S02:0000E812: 76 1F -F00:7376 * do for a 32 bit result -F00:7377 BTST #0,FAC1_e(a3) * test exponent odd/even - S02:0000E814: 08 2B 00 00 05 94 -F00:7378 BNE.s LAB_SQE2 * if odd only 1 shift first time - S02:0000E81A: 66 06 -F00:7379 -F00:7380 LAB_SQE1 -F00:7381 ADD.l d0,d0 * shift highest bit of number .. - S02:0000E81C: D0 80 -F00:7382 ADDX.l d2,d2 * .. into remainder .. never overflows - S02:0000E81E: D5 82 -F00:7383 ADD.l d1,d1 * root = root * 2 .. never overflows - S02:0000E820: D2 81 -F00:7384 LAB_SQE2 -F00:7385 ADD.l d0,d0 * shift highest bit of number .. - S02:0000E822: D0 80 -F00:7386 ADDX.l d2,d2 * .. into remainder .. never overflows - S02:0000E824: D5 82 -F00:7387 -F00:7388 MOVE.l d1,d4 * copy root - S02:0000E826: 28 01 -F00:7389 ADD.l d4,d4 * 2n - S02:0000E828: D8 84 -F00:7390 ADDQ.l #1,d4 * 2n+1 - S02:0000E82A: 52 84 -F00:7391 -F00:7392 CMP.l d4,d2 * compare 2n+1 to remainder - S02:0000E82C: B4 84 -F00:7393 BCS.s LAB_SQNS * skip sub if remainder smaller - S02:0000E82E: 65 04 -F00:7394 -F00:7395 SUB.l d4,d2 * subtract temp from remainder - S02:0000E830: 94 84 -F00:7396 ADDQ.l #1,d1 * increment root - S02:0000E832: 52 81 -F00:7397 LAB_SQNS -F00:7398 DBF d3,LAB_SQE1 * loop if not all done - S02:0000E834: 51 CB FF E6 -F00:7399 -F00:7400 MOVE.l d1,FAC1_m(a3) * save result mantissa - S02:0000E838: 27 41 05 90 -F00:7401 MOVE.b FAC1_e(a3),d0 * get exponent (d0 is clear here) - S02:0000E83C: 10 2B 05 94 -F00:7402 SUB.w #$80,d0 * normalise - S02:0000E840: 90 7C 00 80 -F00:7403 LSR.w #1,d0 * /2 - S02:0000E844: E2 48 -F00:7404 BCC.s LAB_SQNA * skip increment if carry clear - S02:0000E846: 64 02 -F00:7405 -F00:7406 ADDQ.w #1,d0 * add bit zero back in (allow for half shift) - S02:0000E848: 52 40 -F00:7407 LAB_SQNA -F00:7408 ADD.w #$80,d0 * re-bias to $80 - S02:0000E84A: D0 7C 00 80 -F00:7409 MOVE.b d0,FAC1_e(a3) * save it - S02:0000E84E: 17 40 05 94 -F00:7410 MOVEM.l (sp)+,d1-d4 * restore registers - S02:0000E852: 4C DF 00 1E -F00:7411 BRA LAB_24D5 * normalise FAC1 & return - S02:0000E856: 60 00 F0 B2 -F00:7412 -F00:7413 -F00:7414 ************************************************************************************* -F00:7415 * -F00:7416 * perform VARPTR() -F00:7417 -F00:7418 LAB_VARPTR -F00:7419 MOVE.b (a5)+,d0 * increment pointer - S02:0000E85A: 10 1D -F00:7420 LAB_VARCALL -F00:7421 BSR LAB_GVAR * get variable address in a0 - S02:0000E85C: 61 00 E7 6A -F00:7422 BSR LAB_1BFB * scan for ")", else do syntax error/warm start - S02:0000E860: 61 00 E5 46 -F00:7423 MOVE.l a0,d0 * copy the variable address - S02:0000E864: 20 08 -F00:7424 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & return - S02:0000E866: 60 00 EA 50 -F00:7425 -F00:7426 -F00:7427 ************************************************************************************* -F00:7428 * -F00:7429 * perform RAMBASE -F00:7430 -F00:7431 LAB_RAM -F00:7432 LEA ram_base(a3),a0 * get start of EhBASIC RAM - S02:0000E86A: 41 EB 04 00 -F00:7433 MOVE.l a0,d0 * copy it - S02:0000E86E: 20 08 -F00:7434 BRA LAB_AYFC * convert d0 to signed longword in FAC1 & return - S02:0000E870: 60 00 EA 46 -F00:7435 -F00:7436 -F00:7437 ************************************************************************************* -F00:7438 * -F00:7439 * perform PI -F00:7440 -F00:7441 LAB_PI -F00:7442 MOVE.l #$C90FDAA2,FAC1_m(a3) * pi mantissa (32 bit) - S02:0000E874: 27 7C C9 0F DA A2 05 90 -F00:7443 MOVE.w #$8200,FAC1_e(a3) * pi exponent and sign - S02:0000E87C: 37 7C 82 00 05 94 -F00:7444 RTS - S02:0000E882: 4E 75 -F00:7445 -F00:7446 -F00:7447 ************************************************************************************* -F00:7448 * -F00:7449 * perform TWOPI -F00:7450 -F00:7451 LAB_TWOPI -F00:7452 MOVE.l #$C90FDAA2,FAC1_m(a3) * 2pi mantissa (32 bit) - S02:0000E884: 27 7C C9 0F DA A2 05 90 -F00:7453 MOVE.w #$8300,FAC1_e(a3) * 2pi exponent and sign - S02:0000E88C: 37 7C 83 00 05 94 -F00:7454 RTS - S02:0000E892: 4E 75 -F00:7455 -F00:7456 -F00:7457 ************************************************************************************* -F00:7458 * -F00:7459 * get ASCII string equivalent into FAC1 as integer32 or float -F00:7460 -F00:7461 * entry is with a5 pointing to the first character of the string -F00:7462 * exit with a5 pointing to the first character after the string -F00:7463 -F00:7464 * d0 is character -F00:7465 * d1 is mantissa -F00:7466 * d2 is partial and table mantissa -F00:7467 * d3 is mantissa exponent (decimal & binary) -F00:7468 * d4 is decimal exponent -F00:7469 -F00:7470 * get FAC1 from string -F00:7471 * this routine now handles hex and binary values from strings -F00:7472 * starting with "$" and "%" respectively -F00:7473 -F00:7474 LAB_2887 -F00:7475 MOVEM.l d1-d5,-(sp) * save registers - S02:0000E894: 48 E7 7C 00 -F00:7476 MOVEQ #$00,d1 * clear temp accumulator - S02:0000E898: 72 00 -F00:7477 MOVE.l d1,d3 * set mantissa decimal exponent count - S02:0000E89A: 26 01 -F00:7478 MOVE.l d1,d4 * clear decimal exponent - S02:0000E89C: 28 01 -F00:7479 MOVE.b d1,FAC1_s(a3) * clear sign byte - S02:0000E89E: 17 41 05 95 -F00:7480 MOVE.b d1,Dtypef(a3) * set float data type - S02:0000E8A2: 17 41 05 B5 -F00:7481 MOVE.b d1,expneg(a3) * clear exponent sign - S02:0000E8A6: 17 41 05 AF -F00:7482 BSR LAB_GBYT * get first byte back - S02:0000E8AA: 61 00 E5 10 -F00:7483 BCS.s LAB_28FE * go get floating if 1st character numeric - S02:0000E8AE: 65 3C -F00:7484 -F00:7485 CMP.b #'-',d0 * or is it -ve number - S02:0000E8B0: B0 3C 00 2D -F00:7486 BNE.s LAB_289A * branch if not - S02:0000E8B4: 66 08 -F00:7487 -F00:7488 MOVE.b #$FF,FAC1_s(a3) * set sign byte - S02:0000E8B6: 17 7C 00 FF 05 95 -F00:7489 BRA.s LAB_289C * now go scan & check for hex/bin/int - S02:0000E8BC: 60 06 -F00:7490 -F00:7491 LAB_289A -F00:7492 * first character wasn't numeric or - -F00:7493 CMP.b #'+',d0 * compare with '+' - S02:0000E8BE: B0 3C 00 2B -F00:7494 BNE.s LAB_289D * branch if not '+' (go check for '.'/hex/binary - S02:0000E8C2: 66 06 -F00:7495 * /integer) -F00:7496 -F00:7497 LAB_289C -F00:7498 * was "+" or "-" to start, so get next character -F00:7499 BSR LAB_IGBY * increment & scan memory - S02:0000E8C4: 61 00 E4 F4 -F00:7500 BCS.s LAB_28FE * branch if numeric character - S02:0000E8C8: 65 22 -F00:7501 -F00:7502 LAB_289D -F00:7503 CMP.b #'.',d0 * else compare with '.' - S02:0000E8CA: B0 3C 00 2E -F00:7504 BEQ LAB_2904 * branch if '.' - S02:0000E8CE: 67 00 00 92 -F00:7505 -F00:7506 * code here for hex/binary/integer numbers -F00:7507 CMP.b #'$',d0 * compare with '$' - S02:0000E8D2: B0 3C 00 24 -F00:7508 BEQ LAB_CHEX * branch if '$' - S02:0000E8D6: 67 00 01 0A -F00:7509 -F00:7510 CMP.b #'%',d0 * else compare with '%' - S02:0000E8DA: B0 3C 00 25 -F00:7511 BEQ LAB_CBIN * branch if '%' - S02:0000E8DE: 67 00 01 64 -F00:7512 -F00:7513 BRA LAB_2Y01 * not #.$%& so return 0 - S02:0000E8E2: 60 00 00 8C -F00:7514 -F00:7515 LAB_28FD -F00:7516 BSR LAB_IGBY * get next character - S02:0000E8E6: 61 00 E4 D2 -F00:7517 BCC.s LAB_2902 * exit loop if not a digit - S02:0000E8EA: 64 6C -F00:7518 -F00:7519 LAB_28FE -F00:7520 BSR d1x10 * multiply d1 by 10 and add character - S02:0000E8EC: 61 00 01 A8 -F00:7521 BCC.s LAB_28FD * loop for more if no overflow - S02:0000E8F0: 64 F4 -F00:7522 -F00:7523 LAB_28FF -F00:7524 * overflowed mantissa, count 10s exponent -F00:7525 ADDQ.l #1,d3 * increment mantissa decimal exponent count - S02:0000E8F2: 52 83 -F00:7526 BSR LAB_IGBY * get next character - S02:0000E8F4: 61 00 E4 C4 -F00:7527 BCS.s LAB_28FF * loop while numeric character - S02:0000E8F8: 65 F8 -F00:7528 -F00:7529 * done overflow, now flush fraction or do E -F00:7530 CMP.b #'.',d0 * else compare with '.' - S02:0000E8FA: B0 3C 00 2E -F00:7531 BNE.s LAB_2901 * branch if not '.' - S02:0000E8FE: 66 06 -F00:7532 -F00:7533 LAB_2900 -F00:7534 * flush remaining fraction digits -F00:7535 BSR LAB_IGBY * get next character - S02:0000E900: 61 00 E4 B8 -F00:7536 BCS LAB_2900 * loop while numeric character - S02:0000E904: 65 FA -F00:7537 -F00:7538 LAB_2901 -F00:7539 * done number, only (possible) exponent remains -F00:7540 CMP.b #'E',d0 * else compare with 'E' - S02:0000E906: B0 3C 00 45 -F00:7541 BNE.s LAB_2Y01 * if not 'E' all done, go evaluate - S02:0000E90A: 66 64 -F00:7542 -F00:7543 * process exponent -F00:7544 BSR LAB_IGBY * get next character - S02:0000E90C: 61 00 E4 AC -F00:7545 BCS.s LAB_2X04 * branch if digit - S02:0000E910: 65 28 -F00:7546 -F00:7547 CMP.b #'-',d0 * or is it -ve number - S02:0000E912: B0 3C 00 2D -F00:7548 BEQ.s LAB_2X01 * branch if so - S02:0000E916: 67 06 -F00:7549 -F00:7550 CMP.b #TK_MINUS,d0 * or is it -ve number - S02:0000E918: B0 3C 00 B3 -F00:7551 BNE.s LAB_2X02 * branch if not - S02:0000E91C: 66 08 -F00:7552 -F00:7553 LAB_2X01 -F00:7554 MOVE.b #$FF,expneg(a3) * set exponent sign - S02:0000E91E: 17 7C 00 FF 05 AF -F00:7555 BRA.s LAB_2X03 * now go scan & check exponent - S02:0000E924: 60 0E -F00:7556 -F00:7557 LAB_2X02 -F00:7558 CMP.b #'+',d0 * or is it +ve number - S02:0000E926: B0 3C 00 2B -F00:7559 BEQ.s LAB_2X03 * branch if so - S02:0000E92A: 67 08 -F00:7560 -F00:7561 CMP.b #TK_PLUS,d0 * or is it +ve number - S02:0000E92C: B0 3C 00 B2 -F00:7562 BNE LAB_SNER * wasn't - + TK_MINUS TK_PLUS or # so do error - S02:0000E930: 66 00 D8 4C -F00:7563 -F00:7564 LAB_2X03 -F00:7565 BSR LAB_IGBY * get next character - S02:0000E934: 61 00 E4 84 -F00:7566 BCC.s LAB_2Y01 * if not digit all done, go evaluate - S02:0000E938: 64 36 -F00:7567 LAB_2X04 -F00:7568 MULU #10,d4 * multiply decimal exponent by 10 - S02:0000E93A: C8 FC 00 0A -F00:7569 AND.l #$FF,d0 * mask character - S02:0000E93E: C0 BC 00 00 00 FF -F00:7570 SUB.b #'0',d0 * convert to value - S02:0000E944: 90 3C 00 30 -F00:7571 ADD.l d0,d4 * add to decimal exponent - S02:0000E948: D8 80 -F00:7572 CMP.b #48,d4 * compare with decimal exponent limit+10 - S02:0000E94A: B8 3C 00 30 -F00:7573 BLE.s LAB_2X03 * loop if no overflow/underflow - S02:0000E94E: 6F E4 -F00:7574 -F00:7575 LAB_2X05 -F00:7576 * exponent value has overflowed -F00:7577 BSR LAB_IGBY * get next character - S02:0000E950: 61 00 E4 68 -F00:7578 BCS.s LAB_2X05 * loop while numeric digit - S02:0000E954: 65 FA -F00:7579 -F00:7580 BRA.s LAB_2Y01 * all done, go evaluate - S02:0000E956: 60 18 -F00:7581 -F00:7582 LAB_2902 -F00:7583 CMP.b #'.',d0 * else compare with '.' - S02:0000E958: B0 3C 00 2E -F00:7584 BEQ.s LAB_2904 * branch if was '.' - S02:0000E95C: 67 04 -F00:7585 -F00:7586 BRA.s LAB_2901 * branch if not '.' (go check/do 'E') - S02:0000E95E: 60 A6 -F00:7587 -F00:7588 LAB_2903 -F00:7589 SUBQ.l #1,d3 * decrement mantissa decimal exponent - S02:0000E960: 53 83 -F00:7590 LAB_2904 -F00:7591 * was dp so get fraction part -F00:7592 BSR LAB_IGBY * get next character - S02:0000E962: 61 00 E4 56 -F00:7593 BCC.s LAB_2901 * exit loop if not a digit (go check/do 'E') - S02:0000E966: 64 9E -F00:7594 -F00:7595 BSR d1x10 * multiply d1 by 10 and add character - S02:0000E968: 61 00 01 2C -F00:7596 BCC.s LAB_2903 * loop for more if no overflow - S02:0000E96C: 64 F2 -F00:7597 -F00:7598 BRA.s LAB_2900 * else go flush remaining fraction part - S02:0000E96E: 60 90 -F00:7599 -F00:7600 LAB_2Y01 -F00:7601 * now evaluate result -F00:7602 TST.b expneg(a3) * test exponent sign - S02:0000E970: 4A 2B 05 AF -F00:7603 BPL.s LAB_2Y02 * branch if sign positive - S02:0000E974: 6A 02 -F00:7604 -F00:7605 NEG.l d4 * negate decimal exponent - S02:0000E976: 44 84 -F00:7606 LAB_2Y02 -F00:7607 ADD.l d3,d4 * add mantissa decimal exponent - S02:0000E978: D8 83 -F00:7608 MOVEQ #32,d3 * set up max binary exponent - S02:0000E97A: 76 20 -F00:7609 TST.l d1 * test mantissa - S02:0000E97C: 4A 81 -F00:7610 BEQ.s LAB_rtn0 * if mantissa=0 return 0 - S02:0000E97E: 67 52 -F00:7611 -F00:7612 BMI.s LAB_2Y04 * branch if already mormalised - S02:0000E980: 6B 08 -F00:7613 -F00:7614 SUBQ.l #1,d3 * decrement bianry exponent for DBMI loop - S02:0000E982: 53 83 -F00:7615 LAB_2Y03 -F00:7616 ADD.l d1,d1 * shift mantissa - S02:0000E984: D2 81 -F00:7617 DBMI d3,LAB_2Y03 * decrement & loop if not normalised - S02:0000E986: 5B CB FF FC -F00:7618 -F00:7619 * ensure not too big or small -F00:7620 LAB_2Y04 -F00:7621 CMP.l #38,d4 * compare decimal exponent with max exponent - S02:0000E98A: B8 BC 00 00 00 26 -F00:7622 BGT LAB_OFER * if greater do overflow error and warm start - S02:0000E990: 6E 00 D7 DC -F00:7623 -F00:7624 CMP.l #-38,d4 * compare decimal exponent with min exponent - S02:0000E994: B8 BC FF FF FF DA -F00:7625 BLT.s LAB_ret0 * if less just return zero - S02:0000E99A: 6D 34 -F00:7626 -F00:7627 NEG.l d4 * negate decimal exponent to go right way - S02:0000E99C: 44 84 -F00:7628 MULS #6,d4 * 6 bytes per entry - S02:0000E99E: C9 FC 00 06 -F00:7629 MOVE.l a0,-(sp) * save register - S02:0000E9A2: 2F 08 -F00:7630 LEA LAB_P_10(pc),a0 * point to table - S02:0000E9A4: 41 FA 02 10 -F00:7631 MOVE.b (a0,d4.w),FAC2_e(a3) * copy exponent for multiply - S02:0000E9A8: 17 70 40 00 05 9C -F00:7632 MOVE.l 2(a0,d4.w),FAC2_m(a3) * copy table mantissa - S02:0000E9AE: 27 70 40 02 05 98 -F00:7633 MOVE.l (sp)+,a0 * restore register - S02:0000E9B4: 20 5F -F00:7634 -F00:7635 EORI.b #$80,d3 * normalise input exponent - S02:0000E9B6: 0A 03 00 80 -F00:7636 MOVE.l d1,FAC1_m(a3) * save input mantissa - S02:0000E9BA: 27 41 05 90 -F00:7637 MOVE.b d3,FAC1_e(a3) * save input exponent - S02:0000E9BE: 17 43 05 94 -F00:7638 MOVE.b FAC1_s(a3),FAC_sc(a3) * set sign as sign compare - S02:0000E9C2: 17 6B 05 95 05 9E -F00:7639 -F00:7640 MOVEM.l (sp)+,d1-d5 * restore registers - S02:0000E9C8: 4C DF 00 3E -F00:7641 BRA LAB_MULTIPLY * go multiply input by table - S02:0000E9CC: 60 00 F0 64 -F00:7642 -F00:7643 LAB_ret0 -F00:7644 MOVEQ #0,d1 * clear mantissa - S02:0000E9D0: 72 00 -F00:7645 LAB_rtn0 -F00:7646 MOVE.l d1,d3 * clear exponent - S02:0000E9D2: 26 01 -F00:7647 MOVE.b d3,FAC1_e(a3) * save exponent - S02:0000E9D4: 17 43 05 94 -F00:7648 MOVE.l d1,FAC1_m(a3) * save mantissa - S02:0000E9D8: 27 41 05 90 -F00:7649 MOVEM.l (sp)+,d1-d5 * restore registers - S02:0000E9DC: 4C DF 00 3E -F00:7650 RTS - S02:0000E9E0: 4E 75 -F00:7651 -F00:7652 -F00:7653 ************************************************************************************* -F00:7654 * -F00:7655 * $ for hex add-on -F00:7656 -F00:7657 * gets here if the first character was "$" for hex -F00:7658 * get hex number -F00:7659 -F00:7660 LAB_CHEX -F00:7661 MOVE.b #$40,Dtypef(a3) * set integer numeric data type - S02:0000E9E2: 17 7C 00 40 05 B5 -F00:7662 MOVEQ #32,d3 * set up max binary exponent - S02:0000E9E8: 76 20 -F00:7663 LAB_CHXX -F00:7664 BSR LAB_IGBY * increment & scan memory - S02:0000E9EA: 61 00 E3 CE -F00:7665 BCS.s LAB_ISHN * branch if numeric character - S02:0000E9EE: 65 14 -F00:7666 -F00:7667 OR.b #$20,d0 * case convert, allow "A" to "F" and "a" to "f" - S02:0000E9F0: 80 3C 00 20 -F00:7668 SUB.b #'a',d0 * subtract "a" - S02:0000E9F4: 90 3C 00 61 -F00:7669 BCS.s LAB_CHX3 * exit if <"a" - S02:0000E9F8: 65 2A -F00:7670 -F00:7671 CMP.b #$06,d0 * compare normalised with $06 (max+1) - S02:0000E9FA: B0 3C 00 06 -F00:7672 BCC.s LAB_CHX3 * exit if >"f" - S02:0000E9FE: 64 24 -F00:7673 -F00:7674 ADD.b #$3A,d0 * convert to nibble+"0" - S02:0000EA00: D0 3C 00 3A -F00:7675 LAB_ISHN -F00:7676 BSR.s d1x16 * multiply d1 by 16 and add the character - S02:0000EA04: 61 6C -F00:7677 BCC.s LAB_CHXX * loop for more if no overflow - S02:0000EA06: 64 E2 -F00:7678 -F00:7679 * overflowed mantissa, count 16s exponent -F00:7680 LAB_CHX1 -F00:7681 ADDQ.l #4,d3 * increment mantissa exponent count - S02:0000EA08: 58 83 -F00:7682 BVS LAB_OFER * do overflow error if overflowed - S02:0000EA0A: 69 00 D7 62 -F00:7683 -F00:7684 BSR LAB_IGBY * get next character - S02:0000EA0E: 61 00 E3 AA -F00:7685 BCS.s LAB_CHX1 * loop while numeric character - S02:0000EA12: 65 F4 -F00:7686 -F00:7687 OR.b #$20,d0 * case convert, allow "A" to "F" and "a" to "f" - S02:0000EA14: 80 3C 00 20 -F00:7688 SUB.b #'a',d0 * subtract "a" - S02:0000EA18: 90 3C 00 61 -F00:7689 BCS.s LAB_CHX3 * exit if <"a" - S02:0000EA1C: 65 06 -F00:7690 -F00:7691 CMP.b #$06,d0 * compare normalised with $06 (max+1) - S02:0000EA1E: B0 3C 00 06 -F00:7692 BCS.s LAB_CHX1 * loop if <="f" - S02:0000EA22: 65 E4 -F00:7693 -F00:7694 * now return value -F00:7695 LAB_CHX3 -F00:7696 TST.l d1 * test mantissa - S02:0000EA24: 4A 81 -F00:7697 BEQ.s LAB_rtn0 * if mantissa=0 return 0 - S02:0000EA26: 67 AA -F00:7698 -F00:7699 BMI.s LAB_exxf * branch if already mormalised - S02:0000EA28: 6B 08 -F00:7700 -F00:7701 SUBQ.l #1,d3 * decrement bianry exponent for DBMI loop - S02:0000EA2A: 53 83 -F00:7702 LAB_CHX2 -F00:7703 ADD.l d1,d1 * shift mantissa - S02:0000EA2C: D2 81 -F00:7704 DBMI d3,LAB_CHX2 * decrement & loop if not normalised - S02:0000EA2E: 5B CB FF FC -F00:7705 -F00:7706 LAB_exxf -F00:7707 EORI.b #$80,d3 * normalise exponent - S02:0000EA32: 0A 03 00 80 -F00:7708 MOVE.b d3,FAC1_e(a3) * save exponent - S02:0000EA36: 17 43 05 94 -F00:7709 MOVE.l d1,FAC1_m(a3) * save mantissa - S02:0000EA3A: 27 41 05 90 -F00:7710 MOVEM.l (sp)+,d1-d5 * restore registers - S02:0000EA3E: 4C DF 00 3E -F00:7711 RTS_024 -F00:7712 RTS - S02:0000EA42: 4E 75 -F00:7713 -F00:7714 -F00:7715 ************************************************************************************* -F00:7716 * -F00:7717 * % for binary add-on -F00:7718 -F00:7719 * gets here if the first character was "%" for binary -F00:7720 * get binary number -F00:7721 -F00:7722 LAB_CBIN -F00:7723 MOVE.b #$40,Dtypef(a3) * set integer numeric data type - S02:0000EA44: 17 7C 00 40 05 B5 -F00:7724 MOVEQ #32,d3 * set up max binary exponent - S02:0000EA4A: 76 20 -F00:7725 LAB_CBXN -F00:7726 BSR LAB_IGBY * increment & scan memory - S02:0000EA4C: 61 00 E3 6C -F00:7727 BCC.s LAB_CHX3 * if not numeric character go return value - S02:0000EA50: 64 D2 -F00:7728 -F00:7729 CMP.b #'2',d0 * compare with "2" (max+1) - S02:0000EA52: B0 3C 00 32 -F00:7730 BCC.s LAB_CHX3 * if >="2" go return value - S02:0000EA56: 64 CC -F00:7731 -F00:7732 MOVE.l d1,d2 * copy value - S02:0000EA58: 24 01 -F00:7733 BSR.s d1x02 * multiply d1 by 2 and add character - S02:0000EA5A: 61 24 -F00:7734 BCC.s LAB_CBXN * loop for more if no overflow - S02:0000EA5C: 64 EE -F00:7735 -F00:7736 * overflowed mantissa, count 2s exponent -F00:7737 LAB_CBX1 -F00:7738 ADDQ.l #1,d3 * increment mantissa exponent count - S02:0000EA5E: 52 83 -F00:7739 BVS LAB_OFER * do overflow error if overflowed - S02:0000EA60: 69 00 D7 0C -F00:7740 -F00:7741 BSR LAB_IGBY * get next character - S02:0000EA64: 61 00 E3 54 -F00:7742 BCC.s LAB_CHX3 * if not numeric character go return value - S02:0000EA68: 64 BA -F00:7743 -F00:7744 CMP.b #'2',d0 * compare with "2" (max+1) - S02:0000EA6A: B0 3C 00 32 -F00:7745 BCS.s LAB_CBX1 * loop if <"2" - S02:0000EA6E: 65 EE -F00:7746 -F00:7747 BRA.s LAB_CHX3 * if not numeric character go return value - S02:0000EA70: 60 B2 -F00:7748 -F00:7749 * half way decent times 16 and times 2 with overflow checks -F00:7750 -F00:7751 d1x16 -F00:7752 MOVE.l d1,d2 * copy value - S02:0000EA72: 24 01 -F00:7753 ADD.l d2,d2 * times two - S02:0000EA74: D4 82 -F00:7754 BCS.s RTS_024 * return if overflow - S02:0000EA76: 65 CA -F00:7755 -F00:7756 ADD.l d2,d2 * times four - S02:0000EA78: D4 82 -F00:7757 BCS.s RTS_024 * return if overflow - S02:0000EA7A: 65 C6 -F00:7758 -F00:7759 ADD.l d2,d2 * times eight - S02:0000EA7C: D4 82 -F00:7760 BCS.s RTS_024 * return if overflow - S02:0000EA7E: 65 C2 -F00:7761 -F00:7762 d1x02 -F00:7763 ADD.l d2,d2 * times sixteen (ten/two) - S02:0000EA80: D4 82 -F00:7764 BCS.s RTS_024 * return if overflow - S02:0000EA82: 65 BE -F00:7765 -F00:7766 * now add in new digit -F00:7767 -F00:7768 AND.l #$FF,d0 * mask character - S02:0000EA84: C0 BC 00 00 00 FF -F00:7769 SUB.b #'0',d0 * convert to value - S02:0000EA8A: 90 3C 00 30 -F00:7770 ADD.l d0,d2 * add to result - S02:0000EA8E: D4 80 -F00:7771 BCS.s RTS_024 * return if overflow, it should never ever do - S02:0000EA90: 65 B0 -F00:7772 * this -F00:7773 -F00:7774 MOVE.l d2,d1 * copy result - S02:0000EA92: 22 02 -F00:7775 RTS - S02:0000EA94: 4E 75 -F00:7776 -F00:7777 * half way decent times 10 with overflow checks -F00:7778 -F00:7779 d1x10 -F00:7780 MOVE.l d1,d2 * copy value - S02:0000EA96: 24 01 -F00:7781 ADD.l d2,d2 * times two - S02:0000EA98: D4 82 -F00:7782 BCS.s RTS_025 * return if overflow - S02:0000EA9A: 65 08 -F00:7783 -F00:7784 ADD.l d2,d2 * times four - S02:0000EA9C: D4 82 -F00:7785 BCS.s RTS_025 * return if overflow - S02:0000EA9E: 65 04 -F00:7786 -F00:7787 ADD.l d1,d2 * times five - S02:0000EAA0: D4 81 -F00:7788 BCC.s d1x02 * do times two and add in new digit if ok - S02:0000EAA2: 64 DC -F00:7789 -F00:7790 RTS_025 -F00:7791 RTS - S02:0000EAA4: 4E 75 -F00:7792 -F00:7793 -F00:7794 ************************************************************************************* -F00:7795 * -F00:7796 * token values needed for BASIC -F00:7797 -F00:7798 TK_END EQU $80 * $80 -F00:7799 TK_FOR EQU TK_END+1 * $81 -F00:7800 TK_NEXT EQU TK_FOR+1 * $82 -F00:7801 TK_DATA EQU TK_NEXT+1 * $83 -F00:7802 TK_INPUT EQU TK_DATA+1 * $84 -F00:7803 TK_DIM EQU TK_INPUT+1 * $85 -F00:7804 TK_READ EQU TK_DIM+1 * $86 -F00:7805 TK_LET EQU TK_READ+1 * $87 -F00:7806 TK_DEC EQU TK_LET+1 * $88 -F00:7807 TK_GOTO EQU TK_DEC+1 * $89 -F00:7808 TK_RUN EQU TK_GOTO+1 * $8A -F00:7809 TK_IF EQU TK_RUN+1 * $8B -F00:7810 TK_RESTORE EQU TK_IF+1 * $8C -F00:7811 TK_GOSUB EQU TK_RESTORE+1 * $8D -F00:7812 TK_RETURN EQU TK_GOSUB+1 * $8E -F00:7813 TK_REM EQU TK_RETURN+1 * $8F -F00:7814 TK_STOP EQU TK_REM+1 * $90 -F00:7815 TK_ON EQU TK_STOP+1 * $91 -F00:7816 TK_NULL EQU TK_ON+1 * $92 -F00:7817 TK_INC EQU TK_NULL+1 * $93 -F00:7818 TK_WAIT EQU TK_INC+1 * $94 -F00:7819 TK_LOAD EQU TK_WAIT+1 * $95 -F00:7820 TK_SAVE EQU TK_LOAD+1 * $96 -F00:7821 TK_DEF EQU TK_SAVE+1 * $97 -F00:7822 TK_POKE EQU TK_DEF+1 * $98 -F00:7823 TK_DOKE EQU TK_POKE+1 * $99 -F00:7824 TK_LOKE EQU TK_DOKE+1 * $9A -F00:7825 TK_CALL EQU TK_LOKE+1 * $9B -F00:7826 TK_DO EQU TK_CALL+1 * $9C -F00:7827 TK_LOOP EQU TK_DO+1 * $9D -F00:7828 TK_PRINT EQU TK_LOOP+1 * $9E -F00:7829 TK_CONT EQU TK_PRINT+1 * $9F -F00:7830 TK_LIST EQU TK_CONT+1 * $A0 -F00:7831 TK_CLEAR EQU TK_LIST+1 * $A1 -F00:7832 TK_NEW EQU TK_CLEAR+1 * $A2 -F00:7833 TK_WIDTH EQU TK_NEW+1 * $A3 -F00:7834 TK_GET EQU TK_WIDTH+1 * $A4 -F00:7835 TK_SWAP EQU TK_GET+1 * $A5 -F00:7836 TK_BITSET EQU TK_SWAP+1 * $A6 -F00:7837 TK_BITCLR EQU TK_BITSET+1 * $A7 -F00:7838 TK_TAB EQU TK_BITCLR+1 * $A8 -F00:7839 TK_ELSE EQU TK_TAB+1 * $A9 -F00:7840 TK_TO EQU TK_ELSE+1 * $AA -F00:7841 TK_FN EQU TK_TO+1 * $AB -F00:7842 TK_SPC EQU TK_FN+1 * $AC -F00:7843 TK_THEN EQU TK_SPC+1 * $AD -F00:7844 TK_NOT EQU TK_THEN+1 * $AE -F00:7845 TK_STEP EQU TK_NOT+1 * $AF -F00:7846 TK_UNTIL EQU TK_STEP+1 * $B0 -F00:7847 TK_WHILE EQU TK_UNTIL+1 * $B1 -F00:7848 TK_PLUS EQU TK_WHILE+1 * $B2 -F00:7849 TK_MINUS EQU TK_PLUS+1 * $B3 -F00:7850 TK_MULT EQU TK_MINUS+1 * $B4 -F00:7851 TK_DIV EQU TK_MULT+1 * $B5 -F00:7852 TK_POWER EQU TK_DIV+1 * $B6 -F00:7853 TK_AND EQU TK_POWER+1 * $B7 -F00:7854 TK_EOR EQU TK_AND+1 * $B8 -F00:7855 TK_OR EQU TK_EOR+1 * $B9 -F00:7856 TK_RSHIFT EQU TK_OR+1 * $BA -F00:7857 TK_LSHIFT EQU TK_RSHIFT+1 * $BB -F00:7858 TK_GT EQU TK_LSHIFT+1 * $BC -F00:7859 TK_EQUAL EQU TK_GT+1 * $BD -F00:7860 TK_LT EQU TK_EQUAL+1 * $BE -F00:7861 TK_SGN EQU TK_LT+1 * $BF -F00:7862 TK_INT EQU TK_SGN+1 * $C0 -F00:7863 TK_ABS EQU TK_INT+1 * $C1 -F00:7864 TK_USR EQU TK_ABS+1 * $C2 -F00:7865 TK_FRE EQU TK_USR+1 * $C3 -F00:7866 TK_POS EQU TK_FRE+1 * $C4 -F00:7867 TK_SQR EQU TK_POS+1 * $C5 -F00:7868 TK_RND EQU TK_SQR+1 * $C6 -F00:7869 TK_LOG EQU TK_RND+1 * $C7 -F00:7870 TK_EXP EQU TK_LOG+1 * $C8 -F00:7871 TK_COS EQU TK_EXP+1 * $C9 -F00:7872 TK_SIN EQU TK_COS+1 * $CA -F00:7873 TK_TAN EQU TK_SIN+1 * $CB -F00:7874 TK_ATN EQU TK_TAN+1 * $CC -F00:7875 TK_PEEK EQU TK_ATN+1 * $CD -F00:7876 TK_DEEK EQU TK_PEEK+1 * $CE -F00:7877 TK_LEEK EQU TK_DEEK+1 * $CF -F00:7878 TK_LEN EQU TK_LEEK+1 * $D0 -F00:7879 TK_STRS EQU TK_LEN+1 * $D1 -F00:7880 TK_VAL EQU TK_STRS+1 * $D2 -F00:7881 TK_ASC EQU TK_VAL+1 * $D3 -F00:7882 TK_UCASES EQU TK_ASC+1 * $D4 -F00:7883 TK_LCASES EQU TK_UCASES+1 * $D5 -F00:7884 TK_CHRS EQU TK_LCASES+1 * $D6 -F00:7885 TK_HEXS EQU TK_CHRS+1 * $D7 -F00:7886 TK_BINS EQU TK_HEXS+1 * $D8 -F00:7887 TK_BITTST EQU TK_BINS+1 * $D9 -F00:7888 TK_MAX EQU TK_BITTST+1 * $DA -F00:7889 TK_MIN EQU TK_MAX+1 * $DB -F00:7890 TK_RAM EQU TK_MIN+1 * $DC -F00:7891 TK_PI EQU TK_RAM+1 * $DD -F00:7892 TK_TWOPI EQU TK_PI+1 * $DE -F00:7893 TK_VPTR EQU TK_TWOPI+1 * $DF -F00:7894 TK_SADD EQU TK_VPTR+1 * $E0 -F00:7895 TK_LEFTS EQU TK_SADD+1 * $E1 -F00:7896 TK_RIGHTS EQU TK_LEFTS+1 * $E2 -F00:7897 TK_MIDS EQU TK_RIGHTS+1 * $E3 -F00:7898 TK_USINGS EQU TK_MIDS+1 * $E4 -F00:7899 -F00:7900 -F00:7901 ************************************************************************************* -F00:7902 * -F00:7903 * binary to unsigned decimal table -F00:7904 -F00:7905 Bin2dec -F00:7906 dc.l $3B9ACA00 * 1000000000 - S02:0000EAA6: 3B 9A CA 00 -F00:7907 dc.l $05F5E100 * 100000000 - S02:0000EAAA: 05 F5 E1 00 -F00:7908 dc.l $00989680 * 10000000 - S02:0000EAAE: 00 98 96 80 -F00:7909 dc.l $000F4240 * 1000000 - S02:0000EAB2: 00 0F 42 40 -F00:7910 dc.l $000186A0 * 100000 - S02:0000EAB6: 00 01 86 A0 -F00:7911 dc.l $00002710 * 10000 - S02:0000EABA: 00 00 27 10 -F00:7912 dc.l $000003E8 * 1000 - S02:0000EABE: 00 00 03 E8 -F00:7913 dc.l $00000064 * 100 - S02:0000EAC2: 00 00 00 64 -F00:7914 dc.l $0000000A * 10 - S02:0000EAC6: 00 00 00 0A -F00:7915 dc.l $00000000 * 0 end marker - S02:0000EACA: 00 00 00 00 -F00:7916 -F00:7917 LAB_RSED -F00:7918 dc.l $332E3232 * 858665522 - S02:0000EACE: 33 2E 32 32 -F00:7919 -F00:7920 * string to value exponent table -F00:7921 -F00:7922 dc.w 255<<8 * 10**38 - S02:0000EAD2: FF 00 -F00:7923 dc.l $96769951 - S02:0000EAD4: 96 76 99 51 -F00:7924 dc.w 251<<8 * 10**37 - S02:0000EAD8: FB 00 -F00:7925 dc.l $F0BDC21B - S02:0000EADA: F0 BD C2 1B -F00:7926 dc.w 248<<8 * 10**36 - S02:0000EADE: F8 00 -F00:7927 dc.l $C097CE7C - S02:0000EAE0: C0 97 CE 7C -F00:7928 dc.w 245<<8 * 10**35 - S02:0000EAE4: F5 00 -F00:7929 dc.l $9A130B96 - S02:0000EAE6: 9A 13 0B 96 -F00:7930 dc.w 241<<8 * 10**34 - S02:0000EAEA: F1 00 -F00:7931 dc.l $F684DF57 - S02:0000EAEC: F6 84 DF 57 -F00:7932 dc.w 238<<8 * 10**33 - S02:0000EAF0: EE 00 -F00:7933 dc.l $C5371912 - S02:0000EAF2: C5 37 19 12 -F00:7934 dc.w 235<<8 * 10**32 - S02:0000EAF6: EB 00 -F00:7935 dc.l $9DC5ADA8 - S02:0000EAF8: 9D C5 AD A8 -F00:7936 dc.w 231<<8 * 10**31 - S02:0000EAFC: E7 00 -F00:7937 dc.l $FC6F7C40 - S02:0000EAFE: FC 6F 7C 40 -F00:7938 dc.w 228<<8 * 10**30 - S02:0000EB02: E4 00 -F00:7939 dc.l $C9F2C9CD - S02:0000EB04: C9 F2 C9 CD -F00:7940 dc.w 225<<8 * 10**29 - S02:0000EB08: E1 00 -F00:7941 dc.l $A18F07D7 - S02:0000EB0A: A1 8F 07 D7 -F00:7942 dc.w 222<<8 * 10**28 - S02:0000EB0E: DE 00 -F00:7943 dc.l $813F3979 - S02:0000EB10: 81 3F 39 79 -F00:7944 dc.w 218<<8 * 10**27 - S02:0000EB14: DA 00 -F00:7945 dc.l $CECB8F28 - S02:0000EB16: CE CB 8F 28 -F00:7946 dc.w 215<<8 * 10**26 - S02:0000EB1A: D7 00 -F00:7947 dc.l $A56FA5BA - S02:0000EB1C: A5 6F A5 BA -F00:7948 dc.w 212<<8 * 10**25 - S02:0000EB20: D4 00 -F00:7949 dc.l $84595161 - S02:0000EB22: 84 59 51 61 -F00:7950 dc.w 208<<8 * 10**24 - S02:0000EB26: D0 00 -F00:7951 dc.l $D3C21BCF - S02:0000EB28: D3 C2 1B CF -F00:7952 dc.w 205<<8 * 10**23 - S02:0000EB2C: CD 00 -F00:7953 dc.l $A968163F - S02:0000EB2E: A9 68 16 3F -F00:7954 dc.w 202<<8 * 10**22 - S02:0000EB32: CA 00 -F00:7955 dc.l $87867832 - S02:0000EB34: 87 86 78 32 -F00:7956 dc.w 198<<8 * 10**21 - S02:0000EB38: C6 00 -F00:7957 dc.l $D8D726B7 - S02:0000EB3A: D8 D7 26 B7 -F00:7958 dc.w 195<<8 * 10**20 - S02:0000EB3E: C3 00 -F00:7959 dc.l $AD78EBC6 - S02:0000EB40: AD 78 EB C6 -F00:7960 dc.w 192<<8 * 10**19 - S02:0000EB44: C0 00 -F00:7961 dc.l $8AC72305 - S02:0000EB46: 8A C7 23 05 -F00:7962 dc.w 188<<8 * 10**18 - S02:0000EB4A: BC 00 -F00:7963 dc.l $DE0B6B3A - S02:0000EB4C: DE 0B 6B 3A -F00:7964 dc.w 185<<8 * 10**17 - S02:0000EB50: B9 00 -F00:7965 dc.l $B1A2BC2F - S02:0000EB52: B1 A2 BC 2F -F00:7966 dc.w 182<<8 * 10**16 - S02:0000EB56: B6 00 -F00:7967 dc.l $8E1BC9BF - S02:0000EB58: 8E 1B C9 BF -F00:7968 dc.w 178<<8 * 10**15 - S02:0000EB5C: B2 00 -F00:7969 dc.l $E35FA932 - S02:0000EB5E: E3 5F A9 32 -F00:7970 dc.w 175<<8 * 10**14 - S02:0000EB62: AF 00 -F00:7971 dc.l $B5E620F5 - S02:0000EB64: B5 E6 20 F5 -F00:7972 dc.w 172<<8 * 10**13 - S02:0000EB68: AC 00 -F00:7973 dc.l $9184E72A - S02:0000EB6A: 91 84 E7 2A -F00:7974 dc.w 168<<8 * 10**12 - S02:0000EB6E: A8 00 -F00:7975 dc.l $E8D4A510 - S02:0000EB70: E8 D4 A5 10 -F00:7976 dc.w 165<<8 * 10**11 - S02:0000EB74: A5 00 -F00:7977 dc.l $BA43B740 - S02:0000EB76: BA 43 B7 40 -F00:7978 dc.w 162<<8 * 10**10 - S02:0000EB7A: A2 00 -F00:7979 dc.l $9502F900 - S02:0000EB7C: 95 02 F9 00 -F00:7980 dc.w 158<<8 * 10**9 - S02:0000EB80: 9E 00 -F00:7981 dc.l $EE6B2800 - S02:0000EB82: EE 6B 28 00 -F00:7982 dc.w 155<<8 * 10**8 - S02:0000EB86: 9B 00 -F00:7983 dc.l $BEBC2000 - S02:0000EB88: BE BC 20 00 -F00:7984 dc.w 152<<8 * 10**7 - S02:0000EB8C: 98 00 -F00:7985 dc.l $98968000 - S02:0000EB8E: 98 96 80 00 -F00:7986 dc.w 148<<8 * 10**6 - S02:0000EB92: 94 00 -F00:7987 dc.l $F4240000 - S02:0000EB94: F4 24 00 00 -F00:7988 dc.w 145<<8 * 10**5 - S02:0000EB98: 91 00 -F00:7989 dc.l $C3500000 - S02:0000EB9A: C3 50 00 00 -F00:7990 dc.w 142<<8 * 10**4 - S02:0000EB9E: 8E 00 -F00:7991 dc.l $9C400000 - S02:0000EBA0: 9C 40 00 00 -F00:7992 dc.w 138<<8 * 10**3 - S02:0000EBA4: 8A 00 -F00:7993 dc.l $FA000000 - S02:0000EBA6: FA 00 00 00 -F00:7994 dc.w 135<<8 * 10**2 - S02:0000EBAA: 87 00 -F00:7995 dc.l $C8000000 - S02:0000EBAC: C8 00 00 00 -F00:7996 dc.w 132<<8 * 10**1 - S02:0000EBB0: 84 00 -F00:7997 dc.l $A0000000 - S02:0000EBB2: A0 00 00 00 -F00:7998 LAB_P_10 -F00:7999 dc.w 129<<8 * 10**0 - S02:0000EBB6: 81 00 -F00:8000 dc.l $80000000 - S02:0000EBB8: 80 00 00 00 -F00:8001 dc.w 125<<8 * 10**-1 - S02:0000EBBC: 7D 00 -F00:8002 dc.l $CCCCCCCD - S02:0000EBBE: CC CC CC CD -F00:8003 dc.w 122<<8 * 10**-2 - S02:0000EBC2: 7A 00 -F00:8004 dc.l $A3D70A3D - S02:0000EBC4: A3 D7 0A 3D -F00:8005 dc.w 119<<8 * 10**-3 - S02:0000EBC8: 77 00 -F00:8006 dc.l $83126E98 - S02:0000EBCA: 83 12 6E 98 -F00:8007 dc.w 115<<8 * 10**-4 - S02:0000EBCE: 73 00 -F00:8008 dc.l $D1B71759 - S02:0000EBD0: D1 B7 17 59 -F00:8009 dc.w 112<<8 * 10**-5 - S02:0000EBD4: 70 00 -F00:8010 dc.l $A7C5AC47 - S02:0000EBD6: A7 C5 AC 47 -F00:8011 dc.w 109<<8 * 10**-6 - S02:0000EBDA: 6D 00 -F00:8012 dc.l $8637BD06 - S02:0000EBDC: 86 37 BD 06 -F00:8013 dc.w 105<<8 * 10**-7 - S02:0000EBE0: 69 00 -F00:8014 dc.l $D6BF94D6 - S02:0000EBE2: D6 BF 94 D6 -F00:8015 dc.w 102<<8 * 10**-8 - S02:0000EBE6: 66 00 -F00:8016 dc.l $ABCC7712 - S02:0000EBE8: AB CC 77 12 -F00:8017 dc.w 99<<8 * 10**-9 - S02:0000EBEC: 63 00 -F00:8018 dc.l $89705F41 - S02:0000EBEE: 89 70 5F 41 -F00:8019 dc.w 95<<8 * 10**-10 - S02:0000EBF2: 5F 00 -F00:8020 dc.l $DBE6FECF - S02:0000EBF4: DB E6 FE CF -F00:8021 dc.w 92<<8 * 10**-11 - S02:0000EBF8: 5C 00 -F00:8022 dc.l $AFEBFF0C - S02:0000EBFA: AF EB FF 0C -F00:8023 dc.w 89<<8 * 10**-12 - S02:0000EBFE: 59 00 -F00:8024 dc.l $8CBCCC09 - S02:0000EC00: 8C BC CC 09 -F00:8025 dc.w 85<<8 * 10**-13 - S02:0000EC04: 55 00 -F00:8026 dc.l $E12E1342 - S02:0000EC06: E1 2E 13 42 -F00:8027 dc.w 82<<8 * 10**-14 - S02:0000EC0A: 52 00 -F00:8028 dc.l $B424DC35 - S02:0000EC0C: B4 24 DC 35 -F00:8029 dc.w 79<<8 * 10**-15 - S02:0000EC10: 4F 00 -F00:8030 dc.l $901D7CF7 - S02:0000EC12: 90 1D 7C F7 -F00:8031 dc.w 75<<8 * 10**-16 - S02:0000EC16: 4B 00 -F00:8032 dc.l $E69594BF - S02:0000EC18: E6 95 94 BF -F00:8033 dc.w 72<<8 * 10**-17 - S02:0000EC1C: 48 00 -F00:8034 dc.l $B877AA32 - S02:0000EC1E: B8 77 AA 32 -F00:8035 dc.w 69<<8 * 10**-18 - S02:0000EC22: 45 00 -F00:8036 dc.l $9392EE8F - S02:0000EC24: 93 92 EE 8F -F00:8037 dc.w 65<<8 * 10**-19 - S02:0000EC28: 41 00 -F00:8038 dc.l $EC1E4A7E - S02:0000EC2A: EC 1E 4A 7E -F00:8039 dc.w 62<<8 * 10**-20 - S02:0000EC2E: 3E 00 -F00:8040 dc.l $BCE50865 - S02:0000EC30: BC E5 08 65 -F00:8041 dc.w 59<<8 * 10**-21 - S02:0000EC34: 3B 00 -F00:8042 dc.l $971DA050 - S02:0000EC36: 97 1D A0 50 -F00:8043 dc.w 55<<8 * 10**-22 - S02:0000EC3A: 37 00 -F00:8044 dc.l $F1C90081 - S02:0000EC3C: F1 C9 00 81 -F00:8045 dc.w 52<<8 * 10**-23 - S02:0000EC40: 34 00 -F00:8046 dc.l $C16D9A01 - S02:0000EC42: C1 6D 9A 01 -F00:8047 dc.w 49<<8 * 10**-24 - S02:0000EC46: 31 00 -F00:8048 dc.l $9ABE14CD - S02:0000EC48: 9A BE 14 CD -F00:8049 dc.w 45<<8 * 10**-25 - S02:0000EC4C: 2D 00 -F00:8050 dc.l $F79687AE - S02:0000EC4E: F7 96 87 AE -F00:8051 dc.w 42<<8 * 10**-26 - S02:0000EC52: 2A 00 -F00:8052 dc.l $C6120625 - S02:0000EC54: C6 12 06 25 -F00:8053 dc.w 39<<8 * 10**-27 - S02:0000EC58: 27 00 -F00:8054 dc.l $9E74D1B8 - S02:0000EC5A: 9E 74 D1 B8 -F00:8055 dc.w 35<<8 * 10**-28 - S02:0000EC5E: 23 00 -F00:8056 dc.l $FD87B5F3 - S02:0000EC60: FD 87 B5 F3 -F00:8057 dc.w 32<<8 * 10**-29 - S02:0000EC64: 20 00 -F00:8058 dc.l $CAD2F7F5 - S02:0000EC66: CA D2 F7 F5 -F00:8059 dc.w 29<<8 * 10**-30 - S02:0000EC6A: 1D 00 -F00:8060 dc.l $A2425FF7 - S02:0000EC6C: A2 42 5F F7 -F00:8061 dc.w 26<<8 * 10**-31 - S02:0000EC70: 1A 00 -F00:8062 dc.l $81CEB32C - S02:0000EC72: 81 CE B3 2C -F00:8063 dc.w 22<<8 * 10**-32 - S02:0000EC76: 16 00 -F00:8064 dc.l $CFB11EAD - S02:0000EC78: CF B1 1E AD -F00:8065 dc.w 19<<8 * 10**-33 - S02:0000EC7C: 13 00 -F00:8066 dc.l $A6274BBE - S02:0000EC7E: A6 27 4B BE -F00:8067 dc.w 16<<8 * 10**-34 - S02:0000EC82: 10 00 -F00:8068 dc.l $84EC3C98 - S02:0000EC84: 84 EC 3C 98 -F00:8069 dc.w 12<<8 * 10**-35 - S02:0000EC88: 0C 00 -F00:8070 dc.l $D4AD2DC0 - S02:0000EC8A: D4 AD 2D C0 -F00:8071 dc.w 9<<8 * 10**-36 - S02:0000EC8E: 09 00 -F00:8072 dc.l $AA242499 - S02:0000EC90: AA 24 24 99 -F00:8073 dc.w 6<<8 * 10**-37 - S02:0000EC94: 06 00 -F00:8074 dc.l $881CEA14 - S02:0000EC96: 88 1C EA 14 -F00:8075 dc.w 2<<8 * 10**-38 - S02:0000EC9A: 02 00 -F00:8076 dc.l $D9C7DCED - S02:0000EC9C: D9 C7 DC ED -F00:8077 -F00:8078 -F00:8079 ************************************************************************************* -F00:8080 * -F00:8081 * table of constants for cordic SIN/COS/TAN calculations -F00:8082 * constants are un normalised fractions and are atn(2^-i)/2pi -F00:8083 -F00:8084 dc.l $4DBA76D4 * SIN/COS multiply constant - S02:0000ECA0: 4D BA 76 D4 -F00:8085 TAB_SNCO -F00:8086 dc.l $20000000 * atn(2^0)/2pi - S02:0000ECA4: 20 00 00 00 -F00:8087 dc.l $12E4051E * atn(2^1)/2pi - S02:0000ECA8: 12 E4 05 1E -F00:8088 dc.l $09FB385C * atn(2^2)/2pi - S02:0000ECAC: 09 FB 38 5C -F00:8089 dc.l $051111D5 * atn(2^3)/2pi - S02:0000ECB0: 05 11 11 D5 -F00:8090 dc.l $028B0D44 * atn(2^4)/2pi - S02:0000ECB4: 02 8B 0D 44 -F00:8091 dc.l $0145D7E2 * atn(2^5)/2pi - S02:0000ECB8: 01 45 D7 E2 -F00:8092 dc.l $00A2F61F * atn(2^6)/2pi - S02:0000ECBC: 00 A2 F6 1F -F00:8093 dc.l $00517C56 * atn(2^7)/2pi - S02:0000ECC0: 00 51 7C 56 -F00:8094 dc.l $0028BE54 * atn(2^8)/2pi - S02:0000ECC4: 00 28 BE 54 -F00:8095 dc.l $00145F2F * atn(2^9)/2pi - S02:0000ECC8: 00 14 5F 2F -F00:8096 dc.l $000A2F99 * atn(2^10)/2pi - S02:0000ECCC: 00 0A 2F 99 -F00:8097 dc.l $000517CD * atn(2^11)/2pi - S02:0000ECD0: 00 05 17 CD -F00:8098 dc.l $00028BE7 * atn(2^12)/2pi - S02:0000ECD4: 00 02 8B E7 -F00:8099 dc.l $000145F4 * atn(2^13)/2pi - S02:0000ECD8: 00 01 45 F4 -F00:8100 dc.l $0000A2FA * atn(2^14)/2pi - S02:0000ECDC: 00 00 A2 FA -F00:8101 dc.l $0000517D * atn(2^15)/2pi - S02:0000ECE0: 00 00 51 7D -F00:8102 dc.l $000028BF * atn(2^16)/2pi - S02:0000ECE4: 00 00 28 BF -F00:8103 dc.l $00001460 * atn(2^17)/2pi - S02:0000ECE8: 00 00 14 60 -F00:8104 dc.l $00000A30 * atn(2^18)/2pi - S02:0000ECEC: 00 00 0A 30 -F00:8105 dc.l $00000518 * atn(2^19)/2pi - S02:0000ECF0: 00 00 05 18 -F00:8106 dc.l $0000028C * atn(2^20)/2pi - S02:0000ECF4: 00 00 02 8C -F00:8107 dc.l $00000146 * atn(2^21)/2pi - S02:0000ECF8: 00 00 01 46 -F00:8108 dc.l $000000A3 * atn(2^22)/2pi - S02:0000ECFC: 00 00 00 A3 -F00:8109 dc.l $00000052 * atn(2^23)/2pi - S02:0000ED00: 00 00 00 52 -F00:8110 dc.l $00000029 * atn(2^24)/2pi - S02:0000ED04: 00 00 00 29 -F00:8111 dc.l $00000015 * atn(2^25)/2pi - S02:0000ED08: 00 00 00 15 -F00:8112 dc.l $0000000B * atn(2^26)/2pi - S02:0000ED0C: 00 00 00 0B -F00:8113 dc.l $00000006 * atn(2^27)/2pi - S02:0000ED10: 00 00 00 06 -F00:8114 dc.l $00000003 * atn(2^28)/2pi - S02:0000ED14: 00 00 00 03 -F00:8115 dc.l $00000002 * atn(2^29)/2pi - S02:0000ED18: 00 00 00 02 -F00:8116 dc.l $00000001 * atn(2^30)/2pi - S02:0000ED1C: 00 00 00 01 -F00:8117 dc.l $00000001 * atn(2^31)/2pi - S02:0000ED20: 00 00 00 01 -F00:8118 -F00:8119 -F00:8120 ************************************************************************************* -F00:8121 * -F00:8122 * table of constants for cordic ATN calculation -F00:8123 * constants are normalised to two integer bits and are atn(2^-i) -F00:8124 -F00:8125 TAB_ATNC -F00:8126 dc.l $1DAC6705 * atn(2^-1) - S02:0000ED24: 1D AC 67 05 -F00:8127 dc.l $0FADBAFD * atn(2^-2) - S02:0000ED28: 0F AD BA FD -F00:8128 dc.l $07F56EA7 * atn(2^-3) - S02:0000ED2C: 07 F5 6E A7 -F00:8129 dc.l $03FEAB77 * atn(2^-4) - S02:0000ED30: 03 FE AB 77 -F00:8130 dc.l $01FFD55C * atn(2^-5) - S02:0000ED34: 01 FF D5 5C -F00:8131 dc.l $00FFFAAB * atn(2^-6) - S02:0000ED38: 00 FF FA AB -F00:8132 dc.l $007FFF55 * atn(2^-7) - S02:0000ED3C: 00 7F FF 55 -F00:8133 dc.l $003FFFEB * atn(2^-8) - S02:0000ED40: 00 3F FF EB -F00:8134 dc.l $001FFFFD * atn(2^-9) - S02:0000ED44: 00 1F FF FD -F00:8135 dc.l $00100000 * atn(2^-10) - S02:0000ED48: 00 10 00 00 -F00:8136 dc.l $00080000 * atn(2^-11) - S02:0000ED4C: 00 08 00 00 -F00:8137 dc.l $00040000 * atn(2^-12) - S02:0000ED50: 00 04 00 00 -F00:8138 dc.l $00020000 * atn(2^-13) - S02:0000ED54: 00 02 00 00 -F00:8139 dc.l $00010000 * atn(2^-14) - S02:0000ED58: 00 01 00 00 -F00:8140 dc.l $00008000 * atn(2^-15) - S02:0000ED5C: 00 00 80 00 -F00:8141 dc.l $00004000 * atn(2^-16) - S02:0000ED60: 00 00 40 00 -F00:8142 dc.l $00002000 * atn(2^-17) - S02:0000ED64: 00 00 20 00 -F00:8143 dc.l $00001000 * atn(2^-18) - S02:0000ED68: 00 00 10 00 -F00:8144 dc.l $00000800 * atn(2^-19) - S02:0000ED6C: 00 00 08 00 -F00:8145 dc.l $00000400 * atn(2^-20) - S02:0000ED70: 00 00 04 00 -F00:8146 dc.l $00000200 * atn(2^-21) - S02:0000ED74: 00 00 02 00 -F00:8147 dc.l $00000100 * atn(2^-22) - S02:0000ED78: 00 00 01 00 -F00:8148 dc.l $00000080 * atn(2^-23) - S02:0000ED7C: 00 00 00 80 -F00:8149 dc.l $00000040 * atn(2^-24) - S02:0000ED80: 00 00 00 40 -F00:8150 dc.l $00000020 * atn(2^-25) - S02:0000ED84: 00 00 00 20 -F00:8151 dc.l $00000010 * atn(2^-26) - S02:0000ED88: 00 00 00 10 -F00:8152 dc.l $00000008 * atn(2^-27) - S02:0000ED8C: 00 00 00 08 -F00:8153 dc.l $00000004 * atn(2^-28) - S02:0000ED90: 00 00 00 04 -F00:8154 dc.l $00000002 * atn(2^-29) - S02:0000ED94: 00 00 00 02 -F00:8155 dc.l $00000001 * atn(2^-30) - S02:0000ED98: 00 00 00 01 -F00:8156 LAB_1D96 -F00:8157 dc.l $00000000 * atn(2^-31) - S02:0000ED9C: 00 00 00 00 -F00:8158 dc.l $00000000 * atn(2^-32) - S02:0000EDA0: 00 00 00 00 -F00:8159 -F00:8160 * constants are normalised to n integer bits and are tanh(2^-i) -F00:8161 n equ 2 -F00:8162 TAB_HTHET -F00:8163 dc.l $8C9F53D0>>n * atnh(2^-1) .549306144 - S02:0000EDA4: E3 27 D4 F4 -F00:8164 dc.l $4162BBE8>>n * atnh(2^-2) .255412812 - S02:0000EDA8: 10 58 AE FA -F00:8165 dc.l $202B1238>>n * atnh(2^-3) - S02:0000EDAC: 08 0A C4 8E -F00:8166 dc.l $10055888>>n * atnh(2^-4) - S02:0000EDB0: 04 01 56 22 -F00:8167 dc.l $0800AAC0>>n * atnh(2^-5) - S02:0000EDB4: 02 00 2A B0 -F00:8168 dc.l $04001550>>n * atnh(2^-6) - S02:0000EDB8: 01 00 05 54 -F00:8169 dc.l $020002A8>>n * atnh(2^-7) - S02:0000EDBC: 00 80 00 AA -F00:8170 dc.l $01000050>>n * atnh(2^-8) - S02:0000EDC0: 00 40 00 14 -F00:8171 dc.l $00800008>>n * atnh(2^-9) - S02:0000EDC4: 00 20 00 02 -F00:8172 dc.l $00400000>>n * atnh(2^-10) - S02:0000EDC8: 00 10 00 00 -F00:8173 dc.l $00200000>>n * atnh(2^-11) - S02:0000EDCC: 00 08 00 00 -F00:8174 dc.l $00100000>>n * atnh(2^-12) - S02:0000EDD0: 00 04 00 00 -F00:8175 dc.l $00080000>>n * atnh(2^-13) - S02:0000EDD4: 00 02 00 00 -F00:8176 dc.l $00040000>>n * atnh(2^-14) - S02:0000EDD8: 00 01 00 00 -F00:8177 dc.l $00020000>>n * atnh(2^-15) - S02:0000EDDC: 00 00 80 00 -F00:8178 dc.l $00010000>>n * atnh(2^-16) - S02:0000EDE0: 00 00 40 00 -F00:8179 dc.l $00008000>>n * atnh(2^-17) - S02:0000EDE4: 00 00 20 00 -F00:8180 dc.l $00004000>>n * atnh(2^-18) - S02:0000EDE8: 00 00 10 00 -F00:8181 dc.l $00002000>>n * atnh(2^-19) - S02:0000EDEC: 00 00 08 00 -F00:8182 dc.l $00001000>>n * atnh(2^-20) - S02:0000EDF0: 00 00 04 00 -F00:8183 dc.l $00000800>>n * atnh(2^-21) - S02:0000EDF4: 00 00 02 00 -F00:8184 dc.l $00000400>>n * atnh(2^-22) - S02:0000EDF8: 00 00 01 00 -F00:8185 dc.l $00000200>>n * atnh(2^-23) - S02:0000EDFC: 00 00 00 80 -F00:8186 dc.l $00000100>>n * atnh(2^-24) - S02:0000EE00: 00 00 00 40 -F00:8187 dc.l $00000080>>n * atnh(2^-25) - S02:0000EE04: 00 00 00 20 -F00:8188 dc.l $00000040>>n * atnh(2^-26) - S02:0000EE08: 00 00 00 10 -F00:8189 dc.l $00000020>>n * atnh(2^-27) - S02:0000EE0C: 00 00 00 08 -F00:8190 dc.l $00000010>>n * atnh(2^-28) - S02:0000EE10: 00 00 00 04 -F00:8191 dc.l $00000008>>n * atnh(2^-29) - S02:0000EE14: 00 00 00 02 -F00:8192 dc.l $00000004>>n * atnh(2^-30) - S02:0000EE18: 00 00 00 01 -F00:8193 dc.l $00000002>>n * atnh(2^-31) - S02:0000EE1C: 00 00 00 00 -F00:8194 dc.l $00000001>>n * atnh(2^-32) - S02:0000EE20: 00 00 00 00 -F00:8195 -F00:8196 KFCTSEED equ $9A8F4441>>n * $26A3D110 -F00:8197 -F00:8198 -F00:8199 ************************************************************************************* -F00:8200 * -F00:8201 * command vector table -F00:8202 -F00:8203 LAB_CTBL -F00:8204 dc.w LAB_END-LAB_CTBL * END - S02:0000EE24: D7 C8 -F00:8205 dc.w LAB_FOR-LAB_CTBL * FOR - S02:0000EE26: D6 FC -F00:8206 dc.w LAB_NEXT-LAB_CTBL * NEXT - S02:0000EE28: DD 68 -F00:8207 dc.w LAB_DATA-LAB_CTBL * DATA - S02:0000EE2A: D9 1C -F00:8208 dc.w LAB_INPUT-LAB_CTBL * INPUT - S02:0000EE2C: DC 5C -F00:8209 dc.w LAB_DIM-LAB_CTBL * DIM - S02:0000EE2E: E1 36 -F00:8210 dc.w LAB_READ-LAB_CTBL * READ - S02:0000EE30: DC 82 -F00:8211 dc.w LAB_LET-LAB_CTBL * LET - S02:0000EE32: DA 8E -F00:8212 dc.w LAB_DEC-LAB_CTBL * DEC - S02:0000EE34: DA 2C -F00:8213 dc.w LAB_GOTO-LAB_CTBL * GOTO - S02:0000EE36: D8 84 -F00:8214 dc.w LAB_RUN-LAB_CTBL * RUN - S02:0000EE38: D8 4C -F00:8215 dc.w LAB_IF-LAB_CTBL * IF - S02:0000EE3A: D9 44 -F00:8216 dc.w LAB_RESTORE-LAB_CTBL * RESTORE - S02:0000EE3C: D7 F6 -F00:8217 dc.w LAB_GOSUB-LAB_CTBL * GOSUB - S02:0000EE3E: D8 72 -F00:8218 dc.w LAB_RETURN-LAB_CTBL * RETURN - S02:0000EE40: D9 08 -F00:8219 dc.w LAB_REM-LAB_CTBL * REM - S02:0000EE42: D9 B2 -F00:8220 dc.w LAB_STOP-LAB_CTBL * STOP - S02:0000EE44: D7 D0 -F00:8221 dc.w LAB_ON-LAB_CTBL * ON - S02:0000EE46: D9 BA -F00:8222 dc.w LAB_NULL-LAB_CTBL * NULL - S02:0000EE48: D8 24 -F00:8223 dc.w LAB_INC-LAB_CTBL * INC - S02:0000EE4A: DA 32 -F00:8224 dc.w LAB_WAIT-LAB_CTBL * WAIT - S02:0000EE4C: EA 34 -F00:8225 dc.w LAB_LOAD-LAB_CTBL * LOAD - S02:0000EE4E: EA 22 -F00:8226 dc.w LAB_SAVE-LAB_CTBL * SAVE - S02:0000EE50: EA 26 -F00:8227 dc.w LAB_DEF-LAB_CTBL * DEF - S02:0000EE52: E4 C6 -F00:8228 dc.w LAB_POKE-LAB_CTBL * POKE - S02:0000EE54: E9 A2 -F00:8229 dc.w LAB_DOKE-LAB_CTBL * DOKE - S02:0000EE56: E9 D2 -F00:8230 dc.w LAB_LOKE-LAB_CTBL * LOKE - S02:0000EE58: E9 D8 -F00:8231 dc.w LAB_CALL-LAB_CTBL * CALL - S02:0000EE5A: EA 2A -F00:8232 dc.w LAB_DO-LAB_CTBL * DO - S02:0000EE5C: D8 60 -F00:8233 dc.w LAB_LOOP-LAB_CTBL * LOOP - S02:0000EE5E: D8 B2 -F00:8234 dc.w LAB_PRINT-LAB_CTBL * PRINT - S02:0000EE60: DB 22 -F00:8235 dc.w LAB_CONT-LAB_CTBL * CONT - S02:0000EE62: D8 2E -F00:8236 dc.w LAB_LIST-LAB_CTBL * LIST - S02:0000EE64: D6 48 -F00:8237 dc.w LAB_CLEAR-LAB_CTBL * CLEAR - S02:0000EE66: D6 44 -F00:8238 dc.w LAB_NEW-LAB_CTBL * NEW - S02:0000EE68: D5 F4 -F00:8239 dc.w LAB_WDTH-LAB_CTBL * WIDTH - S02:0000EE6A: F9 54 -F00:8240 dc.w LAB_GET-LAB_CTBL * GET - S02:0000EE6C: DA E8 -F00:8241 dc.w LAB_SWAP-LAB_CTBL * SWAP - S02:0000EE6E: E9 EC -F00:8242 dc.w LAB_BITSET-LAB_CTBL * BITSET - S02:0000EE70: F4 A2 -F00:8243 dc.w LAB_BITCLR-LAB_CTBL * BITCLR - S02:0000EE72: F4 B2 -F00:8244 -F00:8245 -F00:8246 ************************************************************************************* -F00:8247 * -F00:8248 * function pre process routine table -F00:8249 -F00:8250 LAB_FTPP -F00:8251 dc.w LAB_PPFN-LAB_FTPP * SGN(n) process numeric expression in () - S02:0000EE74: DF E4 -F00:8252 dc.w LAB_PPFN-LAB_FTPP * INT(n) " - S02:0000EE76: DF E4 -F00:8253 dc.w LAB_PPFN-LAB_FTPP * ABS(n) " - S02:0000EE78: DF E4 -F00:8254 dc.w LAB_EVEZ-LAB_FTPP * USR(x) process any expression - S02:0000EE7A: DD E8 -F00:8255 dc.w LAB_1BF7-LAB_FTPP * FRE(x) process any expression in () - S02:0000EE7C: DF 30 -F00:8256 dc.w LAB_1BF7-LAB_FTPP * POS(x) " - S02:0000EE7E: DF 30 -F00:8257 dc.w LAB_PPFN-LAB_FTPP * SQR(n) process numeric expression in () - S02:0000EE80: DF E4 -F00:8258 dc.w LAB_PPFN-LAB_FTPP * RND(n) " - S02:0000EE82: DF E4 -F00:8259 dc.w LAB_PPFN-LAB_FTPP * LOG(n) " - S02:0000EE84: DF E4 -F00:8260 dc.w LAB_PPFN-LAB_FTPP * EXP(n) " - S02:0000EE86: DF E4 -F00:8261 dc.w LAB_PPFN-LAB_FTPP * COS(n) " - S02:0000EE88: DF E4 -F00:8262 dc.w LAB_PPFN-LAB_FTPP * SIN(n) " - S02:0000EE8A: DF E4 -F00:8263 dc.w LAB_PPFN-LAB_FTPP * TAN(n) " - S02:0000EE8C: DF E4 -F00:8264 dc.w LAB_PPFN-LAB_FTPP * ATN(n) " - S02:0000EE8E: DF E4 -F00:8265 dc.w LAB_PPFN-LAB_FTPP * PEEK(n) " - S02:0000EE90: DF E4 -F00:8266 dc.w LAB_PPFN-LAB_FTPP * DEEK(n) " - S02:0000EE92: DF E4 -F00:8267 dc.w LAB_PPFN-LAB_FTPP * LEEK(n) " - S02:0000EE94: DF E4 -F00:8268 dc.w LAB_PPFS-LAB_FTPP * LEN($) process string expression in () - S02:0000EE96: DF D6 -F00:8269 dc.w LAB_PPFN-LAB_FTPP * STR$(n) process numeric expression in () - S02:0000EE98: DF E4 -F00:8270 dc.w LAB_PPFS-LAB_FTPP * VAL($) process string expression in () - S02:0000EE9A: DF D6 -F00:8271 dc.w LAB_PPFS-LAB_FTPP * ASC($) " - S02:0000EE9C: DF D6 -F00:8272 dc.w LAB_PPFS-LAB_FTPP * UCASE$($) " - S02:0000EE9E: DF D6 -F00:8273 dc.w LAB_PPFS-LAB_FTPP * LCASE$($) " - S02:0000EEA0: DF D6 -F00:8274 dc.w LAB_PPFN-LAB_FTPP * CHR$(n) process numeric expression in () - S02:0000EEA2: DF E4 -F00:8275 dc.w LAB_BHSS-LAB_FTPP * HEX$() bin/hex pre process - S02:0000EEA4: E0 1E -F00:8276 dc.w LAB_BHSS-LAB_FTPP * BIN$() " - S02:0000EEA6: E0 1E -F00:8277 dc.w $0000 * BITTST() none - S02:0000EEA8: 00 00 -F00:8278 dc.w $0000 * MAX() " - S02:0000EEAA: 00 00 -F00:8279 dc.w $0000 * MIN() " - S02:0000EEAC: 00 00 -F00:8280 dc.w LAB_PPBI-LAB_FTPP * RAMBASE advance pointer - S02:0000EEAE: DF F2 -F00:8281 dc.w LAB_PPBI-LAB_FTPP * PI " - S02:0000EEB0: DF F2 -F00:8282 dc.w LAB_PPBI-LAB_FTPP * TWOPI " - S02:0000EEB2: DF F2 -F00:8283 dc.w $0000 * VARPTR() none - S02:0000EEB4: 00 00 -F00:8284 dc.w $0000 * SADD() " - S02:0000EEB6: 00 00 -F00:8285 dc.w LAB_LRMS-LAB_FTPP * LEFT$() process string expression - S02:0000EEB8: DF FC -F00:8286 dc.w LAB_LRMS-LAB_FTPP * RIGHT$() " - S02:0000EEBA: DF FC -F00:8287 dc.w LAB_LRMS-LAB_FTPP * MID$() " - S02:0000EEBC: DF FC -F00:8288 dc.w LAB_EVEZ-LAB_FTPP * USING$(x) process any expression - S02:0000EEBE: DD E8 -F00:8289 -F00:8290 -F00:8291 ************************************************************************************* -F00:8292 * -F00:8293 * action addresses for functions -F00:8294 -F00:8295 LAB_FTBL -F00:8296 dc.w LAB_SGN-LAB_FTBL * SGN() - S02:0000EEC0: ED 5E -F00:8297 dc.w LAB_INT-LAB_FTBL * INT() - S02:0000EEC2: ED E0 -F00:8298 dc.w LAB_ABS-LAB_FTBL * ABS() - S02:0000EEC4: ED 70 -F00:8299 dc.w LAB_USR-LAB_FTBL * USR() - S02:0000EEC6: E9 7E -F00:8300 dc.w LAB_FRE-LAB_FTBL * FRE() - S02:0000EEC8: E3 E2 -F00:8301 dc.w LAB_POS-LAB_FTBL * POS() - S02:0000EECA: E4 14 -F00:8302 dc.w LAB_SQR-LAB_FTBL * SQR() - S02:0000EECC: F9 38 -F00:8303 dc.w LAB_RND-LAB_FTBL * RND() - S02:0000EECE: F2 28 -F00:8304 dc.w LAB_LOG-LAB_FTBL * LOG() - S02:0000EED0: EA 80 -F00:8305 dc.w LAB_EXP-LAB_FTBL * EXP() - S02:0000EED2: F1 0E -F00:8306 dc.w LAB_COS-LAB_FTBL * COS() - S02:0000EED4: F2 7C -F00:8307 dc.w LAB_SIN-LAB_FTBL * SIN() - S02:0000EED6: F2 94 -F00:8308 dc.w LAB_TAN-LAB_FTBL * TAN() - S02:0000EED8: F2 5A -F00:8309 dc.w LAB_ATN-LAB_FTBL * ATN() - S02:0000EEDA: F3 54 -F00:8310 dc.w LAB_PEEK-LAB_FTBL * PEEK() - S02:0000EEDC: E8 FA -F00:8311 dc.w LAB_DEEK-LAB_FTBL * DEEK() - S02:0000EEDE: E9 0C -F00:8312 dc.w LAB_LEEK-LAB_FTBL * LEEK() - S02:0000EEE0: E9 22 -F00:8313 dc.w LAB_LENS-LAB_FTBL * LEN() - S02:0000EEE2: E8 3E -F00:8314 dc.w LAB_STRS-LAB_FTBL * STR$() - S02:0000EEE4: E5 0A -F00:8315 dc.w LAB_VAL-LAB_FTBL * VAL() - S02:0000EEE6: E8 82 -F00:8316 dc.w LAB_ASC-LAB_FTBL * ASC() - S02:0000EEE8: E8 46 -F00:8317 dc.w LAB_UCASE-LAB_FTBL * UCASE$() - S02:0000EEEA: E7 F4 -F00:8318 dc.w LAB_LCASE-LAB_FTBL * LCASE$() - S02:0000EEEC: E7 C4 -F00:8319 dc.w LAB_CHRS-LAB_FTBL * CHR$() - S02:0000EEEE: E7 2C -F00:8320 dc.w LAB_HEXS-LAB_FTBL * HEX$() - S02:0000EEF0: F7 DC -F00:8321 dc.w LAB_BINS-LAB_FTBL * BIN$() - S02:0000EEF2: F7 8A -F00:8322 dc.w LAB_BTST-LAB_FTBL * BITTST() - S02:0000EEF4: F4 26 -F00:8323 dc.w LAB_MAX-LAB_FTBL * MAX() - S02:0000EEF6: F8 48 -F00:8324 dc.w LAB_MIN-LAB_FTBL * MIN() - S02:0000EEF8: F8 5E -F00:8325 dc.w LAB_RAM-LAB_FTBL * RAMBASE - S02:0000EEFA: F9 AA -F00:8326 dc.w LAB_PI-LAB_FTBL * PI - S02:0000EEFC: F9 B4 -F00:8327 dc.w LAB_TWOPI-LAB_FTBL * TWOPI - S02:0000EEFE: F9 C4 -F00:8328 dc.w LAB_VARPTR-LAB_FTBL * VARPTR() - S02:0000EF00: F9 9A -F00:8329 dc.w LAB_SADD-LAB_FTBL * SADD() - S02:0000EF02: E8 26 -F00:8330 dc.w LAB_LEFT-LAB_FTBL * LEFT$() - S02:0000EF04: E7 3C -F00:8331 dc.w LAB_RIGHT-LAB_FTBL * RIGHT$() - S02:0000EF06: E7 50 -F00:8332 dc.w LAB_MIDS-LAB_FTBL * MID$() - S02:0000EF08: E7 80 -F00:8333 dc.w LAB_USINGS-LAB_FTBL * USING$() - S02:0000EF0A: F4 54 -F00:8334 -F00:8335 -F00:8336 ************************************************************************************* -F00:8337 * -F00:8338 * hierarchy and action addresses for operator -F00:8339 -F00:8340 LAB_OPPT -F00:8341 dc.w $0079 * + - S02:0000EF0C: 00 79 -F00:8342 dc.w LAB_ADD-LAB_OPPT - S02:0000EF0E: E9 84 -F00:8343 dc.w $0079 * - - S02:0000EF10: 00 79 -F00:8344 dc.w LAB_SUBTRACT-LAB_OPPT - S02:0000EF12: E9 70 -F00:8345 dc.w $007B * * - S02:0000EF14: 00 7B -F00:8346 dc.w LAB_MULTIPLY-LAB_OPPT - S02:0000EF16: EB 26 -F00:8347 dc.w $007B * / - S02:0000EF18: 00 7B -F00:8348 dc.w LAB_DIVIDE-LAB_OPPT - S02:0000EF1A: EB B2 -F00:8349 dc.w $007F * ^ - S02:0000EF1C: 00 7F -F00:8350 dc.w LAB_POWER-LAB_OPPT - S02:0000EF1E: F0 0C -F00:8351 dc.w $0050 * AND - S02:0000EF20: 00 50 -F00:8352 dc.w LAB_AND-LAB_OPPT - S02:0000EF22: DF C6 -F00:8353 dc.w $0046 * EOR - S02:0000EF24: 00 46 -F00:8354 dc.w LAB_EOR-LAB_OPPT - S02:0000EF26: DF B6 -F00:8355 dc.w $0046 * OR - S02:0000EF28: 00 46 -F00:8356 dc.w LAB_OR-LAB_OPPT - S02:0000EF2A: DF BE -F00:8357 dc.w $0056 * >> - S02:0000EF2C: 00 56 -F00:8358 dc.w LAB_RSHIFT-LAB_OPPT - S02:0000EF2E: E0 6A -F00:8359 dc.w $0056 * << - S02:0000EF30: 00 56 -F00:8360 dc.w LAB_LSHIFT-LAB_OPPT - S02:0000EF32: E0 5A -F00:8361 dc.w $007D * > - S02:0000EF34: 00 7D -F00:8362 dc.w LAB_GTHAN-LAB_OPPT * used to evaluate -n - S02:0000EF36: F0 70 -F00:8363 dc.w $005A * = - S02:0000EF38: 00 5A -F00:8364 dc.w LAB_EQUAL-LAB_OPPT * used to evaluate NOT - S02:0000EF3A: DF DC -F00:8365 dc.w $0064 * < - S02:0000EF3C: 00 64 -F00:8366 dc.w LAB_LTHAN-LAB_OPPT - S02:0000EF3E: DF E6 -F00:8367 -F00:8368 -F00:8369 ************************************************************************************* -F00:8370 * -F00:8371 * misc constants -F00:8372 -F00:8373 * This table is used in converting numbers to ASCII. -F00:8374 * first four entries for expansion to 9.25 digits -F00:8375 -F00:8376 LAB_2A9A -F00:8377 dc.l $FFF0BDC0 * -1000000 - S02:0000EF40: FF F0 BD C0 -F00:8378 dc.l $000186A0 * 100000 - S02:0000EF44: 00 01 86 A0 -F00:8379 dc.l $FFFFD8F0 * -10000 - S02:0000EF48: FF FF D8 F0 -F00:8380 dc.l $000003E8 * 1000 - S02:0000EF4C: 00 00 03 E8 -F00:8381 dc.l $FFFFFF9C * -100 - S02:0000EF50: FF FF FF 9C -F00:8382 dc.l $0000000A * 10 - S02:0000EF54: 00 00 00 0A -F00:8383 dc.l $FFFFFFFF * -1 - S02:0000EF58: FF FF FF FF -F00:8384 LAB_2A9B -F00:8385 -F00:8386 -F00:8387 ************************************************************************************* -F00:8388 * -F00:8389 * new keyword tables -F00:8390 -F00:8391 * offsets to keyword tables -F00:8392 -F00:8393 TAB_CHRT -F00:8394 dc.w TAB_STAR-TAB_STAR * "*" $2A - S02:0000EF5C: 00 00 -F00:8395 dc.w TAB_PLUS-TAB_STAR * "+" $2B - S02:0000EF5E: 00 02 -F00:8396 dc.w -1 * "," $2C no keywords - S02:0000EF60: FF FF -F00:8397 dc.w TAB_MNUS-TAB_STAR * "-" $2D - S02:0000EF62: 00 04 -F00:8398 dc.w -1 * "." $2E no keywords - S02:0000EF64: FF FF -F00:8399 dc.w TAB_SLAS-TAB_STAR * "/" $2F - S02:0000EF66: 00 06 -F00:8400 dc.w -1 * "0" $30 no keywords - S02:0000EF68: FF FF -F00:8401 dc.w -1 * "1" $31 no keywords - S02:0000EF6A: FF FF -F00:8402 dc.w -1 * "2" $32 no keywords - S02:0000EF6C: FF FF -F00:8403 dc.w -1 * "3" $33 no keywords - S02:0000EF6E: FF FF -F00:8404 dc.w -1 * "4" $34 no keywords - S02:0000EF70: FF FF -F00:8405 dc.w -1 * "5" $35 no keywords - S02:0000EF72: FF FF -F00:8406 dc.w -1 * "6" $36 no keywords - S02:0000EF74: FF FF -F00:8407 dc.w -1 * "7" $37 no keywords - S02:0000EF76: FF FF -F00:8408 dc.w -1 * "8" $38 no keywords - S02:0000EF78: FF FF -F00:8409 dc.w -1 * "9" $39 no keywords - S02:0000EF7A: FF FF -F00:8410 dc.w -1 * ";" $3A no keywords - S02:0000EF7C: FF FF -F00:8411 dc.w -1 * ":" $3B no keywords - S02:0000EF7E: FF FF -F00:8412 dc.w TAB_LESS-TAB_STAR * "<" $3C - S02:0000EF80: 00 08 -F00:8413 dc.w TAB_EQUL-TAB_STAR * "=" $3D - S02:0000EF82: 00 0C -F00:8414 dc.w TAB_MORE-TAB_STAR * ">" $3E - S02:0000EF84: 00 0E -F00:8415 dc.w TAB_QEST-TAB_STAR * "?" $3F - S02:0000EF86: 00 12 -F00:8416 dc.w -1 * "@" $40 no keywords - S02:0000EF88: FF FF -F00:8417 dc.w TAB_ASCA-TAB_STAR * "A" $41 - S02:0000EF8A: 00 14 -F00:8418 dc.w TAB_ASCB-TAB_STAR * "B" $42 - S02:0000EF8C: 00 24 -F00:8419 dc.w TAB_ASCC-TAB_STAR * "C" $43 - S02:0000EF8E: 00 3D -F00:8420 dc.w TAB_ASCD-TAB_STAR * "D" $44 - S02:0000EF90: 00 54 -F00:8421 dc.w TAB_ASCE-TAB_STAR * "E" $45 - S02:0000EF92: 00 6D -F00:8422 dc.w TAB_ASCF-TAB_STAR * "F" $46 - S02:0000EF94: 00 7C -F00:8423 dc.w TAB_ASCG-TAB_STAR * "G" $47 - S02:0000EF96: 00 86 -F00:8424 dc.w TAB_ASCH-TAB_STAR * "H" $48 - S02:0000EF98: 00 93 -F00:8425 dc.w TAB_ASCI-TAB_STAR * "I" $49 - S02:0000EF9A: 00 99 -F00:8426 dc.w -1 * "J" $4A no keywords - S02:0000EF9C: FF FF -F00:8427 dc.w -1 * "K" $4B no keywords - S02:0000EF9E: FF FF -F00:8428 dc.w TAB_ASCL-TAB_STAR * "L" $4C - S02:0000EFA0: 00 A8 -F00:8429 dc.w TAB_ASCM-TAB_STAR * "M" $4D - S02:0000EFA2: 00 D6 -F00:8430 dc.w TAB_ASCN-TAB_STAR * "N" $4E - S02:0000EFA4: 00 E4 -F00:8431 dc.w TAB_ASCO-TAB_STAR * "O" $4F - S02:0000EFA6: 00 F3 -F00:8432 dc.w TAB_ASCP-TAB_STAR * "P" $50 - S02:0000EFA8: 00 F8 -F00:8433 dc.w -1 * "Q" $51 no keywords - S02:0000EFAA: FF FF -F00:8434 dc.w TAB_ASCR-TAB_STAR * "R" $52 - S02:0000EFAC: 01 0D -F00:8435 dc.w TAB_ASCS-TAB_STAR * "S" $53 - S02:0000EFAE: 01 37 -F00:8436 dc.w TAB_ASCT-TAB_STAR * "T" $54 - S02:0000EFB0: 01 62 -F00:8437 dc.w TAB_ASCU-TAB_STAR * "U" $55 - S02:0000EFB2: 01 76 -F00:8438 dc.w TAB_ASCV-TAB_STAR * "V" $56 - S02:0000EFB4: 01 8E -F00:8439 dc.w TAB_ASCW-TAB_STAR * "W" $57 - S02:0000EFB6: 01 9A -F00:8440 dc.w -1 * "X" $58 no keywords - S02:0000EFB8: FF FF -F00:8441 dc.w -1 * "Y" $59 no keywords - S02:0000EFBA: FF FF -F00:8442 dc.w -1 * "Z" $5A no keywords - S02:0000EFBC: FF FF -F00:8443 dc.w -1 * "[" $5B no keywords - S02:0000EFBE: FF FF -F00:8444 dc.w -1 * "\" $5C no keywords - S02:0000EFC0: FF FF -F00:8445 dc.w -1 * "]" $5D no keywords - S02:0000EFC2: FF FF -F00:8446 dc.w TAB_POWR-TAB_STAR * "^" $5E - S02:0000EFC4: 01 A9 -F00:8447 -F00:8448 -F00:8449 ************************************************************************************* -F00:8450 * -F00:8451 * Table of Basic keywords for LIST command -F00:8452 * [byte]first character,[byte]remaining length -1 -F00:8453 * [word]offset from table start -F00:8454 -F00:8455 LAB_KEYT -F00:8456 dc.b 'E',1 - S02:0000EFC6: 45 - S02:0000EFC7: 01 -F00:8457 dc.w KEY_END-TAB_STAR * END - S02:0000EFC8: 00 71 -F00:8458 dc.b 'F',1 - S02:0000EFCA: 46 - S02:0000EFCB: 01 -F00:8459 dc.w KEY_FOR-TAB_STAR * FOR - S02:0000EFCC: 00 7C -F00:8460 dc.b 'N',2 - S02:0000EFCE: 4E - S02:0000EFCF: 02 -F00:8461 dc.w KEY_NEXT-TAB_STAR * NEXT - S02:0000EFD0: 00 E7 -F00:8462 dc.b 'D',2 - S02:0000EFD2: 44 - S02:0000EFD3: 02 -F00:8463 dc.w KEY_DATA-TAB_STAR * DATA - S02:0000EFD4: 00 54 -F00:8464 dc.b 'I',3 - S02:0000EFD6: 49 - S02:0000EFD7: 03 -F00:8465 dc.w KEY_INPUT-TAB_STAR * INPUT - S02:0000EFD8: 00 9E -F00:8466 dc.b 'D',1 - S02:0000EFDA: 44 - S02:0000EFDB: 01 -F00:8467 dc.w KEY_DIM-TAB_STAR * DIM - S02:0000EFDC: 00 63 -F00:8468 dc.b 'R',2 - S02:0000EFDE: 52 - S02:0000EFDF: 02 -F00:8469 dc.w KEY_READ-TAB_STAR * READ - S02:0000EFE0: 01 14 -F00:8470 dc.b 'L',1 - S02:0000EFE2: 4C - S02:0000EFE3: 01 -F00:8471 dc.w KEY_LET-TAB_STAR * LET - S02:0000EFE4: 00 BE -F00:8472 dc.b 'D',1 - S02:0000EFE6: 44 - S02:0000EFE7: 01 -F00:8473 dc.w KEY_DEC-TAB_STAR * DEC - S02:0000EFE8: 00 58 -F00:8474 dc.b 'G',2 - S02:0000EFEA: 47 - S02:0000EFEB: 02 -F00:8475 dc.w KEY_GOTO-TAB_STAR * GOTO - S02:0000EFEC: 00 89 -F00:8476 dc.b 'R',1 - S02:0000EFEE: 52 - S02:0000EFEF: 01 -F00:8477 dc.w KEY_RUN-TAB_STAR * RUN - S02:0000EFF0: 01 33 -F00:8478 dc.b 'I',0 - S02:0000EFF2: 49 - S02:0000EFF3: 00 -F00:8479 dc.w KEY_IF-TAB_STAR * IF - S02:0000EFF4: 00 99 -F00:8480 dc.b 'R',5 - S02:0000EFF6: 52 - S02:0000EFF7: 05 -F00:8481 dc.w KEY_RESTORE-TAB_STAR * RESTORE - S02:0000EFF8: 01 1B -F00:8482 dc.b 'G',3 - S02:0000EFFA: 47 - S02:0000EFFB: 03 -F00:8483 dc.w KEY_GOSUB-TAB_STAR * GOSUB - S02:0000EFFC: 00 8D -F00:8484 dc.b 'R',4 - S02:0000EFFE: 52 - S02:0000EFFF: 04 -F00:8485 dc.w KEY_RETURN-TAB_STAR * RETURN - S02:0000F000: 01 22 -F00:8486 dc.b 'R',1 - S02:0000F002: 52 - S02:0000F003: 01 -F00:8487 dc.w KEY_REM-TAB_STAR * REM - S02:0000F004: 01 18 -F00:8488 dc.b 'S',2 - S02:0000F006: 53 - S02:0000F007: 02 -F00:8489 dc.w KEY_STOP-TAB_STAR * STOP - S02:0000F008: 01 54 -F00:8490 dc.b 'O',0 - S02:0000F00A: 4F - S02:0000F00B: 00 -F00:8491 dc.w KEY_ON-TAB_STAR * ON - S02:0000F00C: 00 F3 -F00:8492 dc.b 'N',2 - S02:0000F00E: 4E - S02:0000F00F: 02 -F00:8493 dc.w KEY_NULL-TAB_STAR * NULL - S02:0000F010: 00 EE -F00:8494 dc.b 'I',1 - S02:0000F012: 49 - S02:0000F013: 01 -F00:8495 dc.w KEY_INC-TAB_STAR * INC - S02:0000F014: 00 9B -F00:8496 dc.b 'W',2 - S02:0000F016: 57 - S02:0000F017: 02 -F00:8497 dc.w KEY_WAIT-TAB_STAR * WAIT - S02:0000F018: 01 9A -F00:8498 dc.b 'L',2 - S02:0000F01A: 4C - S02:0000F01B: 02 -F00:8499 dc.w KEY_LOAD-TAB_STAR * LOAD - S02:0000F01C: 00 C5 -F00:8500 dc.b 'S',2 - S02:0000F01E: 53 - S02:0000F01F: 02 -F00:8501 dc.w KEY_SAVE-TAB_STAR * SAVE - S02:0000F020: 01 3C -F00:8502 dc.b 'D',1 - S02:0000F022: 44 - S02:0000F023: 01 -F00:8503 dc.w KEY_DEF-TAB_STAR * DEF - S02:0000F024: 00 60 -F00:8504 dc.b 'P',2 - S02:0000F026: 50 - S02:0000F027: 02 -F00:8505 dc.w KEY_POKE-TAB_STAR * POKE - S02:0000F028: 00 FF -F00:8506 dc.b 'D',2 - S02:0000F02A: 44 - S02:0000F02B: 02 -F00:8507 dc.w KEY_DOKE-TAB_STAR * DOKE - S02:0000F02C: 00 66 -F00:8508 dc.b 'L',2 - S02:0000F02E: 4C - S02:0000F02F: 02 -F00:8509 dc.w KEY_LOKE-TAB_STAR * LOKE - S02:0000F030: 00 CD -F00:8510 dc.b 'C',2 - S02:0000F032: 43 - S02:0000F033: 02 -F00:8511 dc.w KEY_CALL-TAB_STAR * CALL - S02:0000F034: 00 3D -F00:8512 dc.b 'D',0 - S02:0000F036: 44 - S02:0000F037: 00 -F00:8513 dc.w KEY_DO-TAB_STAR * DO - S02:0000F038: 00 6A -F00:8514 dc.b 'L',2 - S02:0000F03A: 4C - S02:0000F03B: 02 -F00:8515 dc.w KEY_LOOP-TAB_STAR * LOOP - S02:0000F03C: 00 D1 -F00:8516 dc.b 'P',3 - S02:0000F03E: 50 - S02:0000F03F: 03 -F00:8517 dc.w KEY_PRINT-TAB_STAR * PRINT - S02:0000F040: 01 07 -F00:8518 dc.b 'C',2 - S02:0000F042: 43 - S02:0000F043: 02 -F00:8519 dc.w KEY_CONT-TAB_STAR * CONT - S02:0000F044: 00 4B -F00:8520 dc.b 'L',2 - S02:0000F046: 4C - S02:0000F047: 02 -F00:8521 dc.w KEY_LIST-TAB_STAR * LIST - S02:0000F048: 00 C1 -F00:8522 dc.b 'C',3 - S02:0000F04A: 43 - S02:0000F04B: 03 -F00:8523 dc.w KEY_CLEAR-TAB_STAR * CLEAR - S02:0000F04C: 00 46 -F00:8524 dc.b 'N',1 - S02:0000F04E: 4E - S02:0000F04F: 01 -F00:8525 dc.w KEY_NEW-TAB_STAR * NEW - S02:0000F050: 00 E4 -F00:8526 dc.b 'W',3 - S02:0000F052: 57 - S02:0000F053: 03 -F00:8527 dc.w KEY_WIDTH-TAB_STAR * WIDTH - S02:0000F054: 01 A3 -F00:8528 dc.b 'G',1 - S02:0000F056: 47 - S02:0000F057: 01 -F00:8529 dc.w KEY_GET-TAB_STAR * GET - S02:0000F058: 00 86 -F00:8530 dc.b 'S',2 - S02:0000F05A: 53 - S02:0000F05B: 02 -F00:8531 dc.w KEY_SWAP-TAB_STAR * SWAP - S02:0000F05C: 01 5D -F00:8532 dc.b 'B',4 - S02:0000F05E: 42 - S02:0000F05F: 04 -F00:8533 dc.w KEY_BITSET-TAB_STAR * BITSET - S02:0000F060: 00 2F -F00:8534 dc.b 'B',4 - S02:0000F062: 42 - S02:0000F063: 04 -F00:8535 dc.w KEY_BITCLR-TAB_STAR * BITCLR - S02:0000F064: 00 29 -F00:8536 dc.b 'T',2 - S02:0000F066: 54 - S02:0000F067: 02 -F00:8537 dc.w KEY_TAB-TAB_STAR * TAB( - S02:0000F068: 01 62 -F00:8538 dc.b 'E',2 - S02:0000F06A: 45 - S02:0000F06B: 02 -F00:8539 dc.w KEY_ELSE-TAB_STAR * ELSE - S02:0000F06C: 00 6D -F00:8540 dc.b 'T',0 - S02:0000F06E: 54 - S02:0000F06F: 00 -F00:8541 dc.w KEY_TO-TAB_STAR * TO - S02:0000F070: 01 6E -F00:8542 dc.b 'F',0 - S02:0000F072: 46 - S02:0000F073: 00 -F00:8543 dc.w KEY_FN-TAB_STAR * FN - S02:0000F074: 00 7F -F00:8544 dc.b 'S',2 - S02:0000F076: 53 - S02:0000F077: 02 -F00:8545 dc.w KEY_SPC-TAB_STAR * SPC( - S02:0000F078: 01 48 -F00:8546 dc.b 'T',2 - S02:0000F07A: 54 - S02:0000F07B: 02 -F00:8547 dc.w KEY_THEN-TAB_STAR * THEN - S02:0000F07C: 01 6A -F00:8548 dc.b 'N',1 - S02:0000F07E: 4E - S02:0000F07F: 01 -F00:8549 dc.w KEY_NOT-TAB_STAR * NOT - S02:0000F080: 00 EB -F00:8550 dc.b 'S',2 - S02:0000F082: 53 - S02:0000F083: 02 -F00:8551 dc.w KEY_STEP-TAB_STAR * STEP - S02:0000F084: 01 50 -F00:8552 dc.b 'U',3 - S02:0000F086: 55 - S02:0000F087: 03 -F00:8553 dc.w KEY_UNTIL-TAB_STAR * UNTIL - S02:0000F088: 01 7D -F00:8554 dc.b 'W',3 - S02:0000F08A: 57 - S02:0000F08B: 03 -F00:8555 dc.w KEY_WHILE-TAB_STAR * WHILE - S02:0000F08C: 01 9E -F00:8556 -F00:8557 dc.b '+',-1 - S02:0000F08E: 2B - S02:0000F08F: FF -F00:8558 dc.w KEY_PLUS-TAB_STAR * + - S02:0000F090: 00 02 -F00:8559 dc.b '-',-1 - S02:0000F092: 2D - S02:0000F093: FF -F00:8560 dc.w KEY_MINUS-TAB_STAR * - - S02:0000F094: 00 04 -F00:8561 dc.b '*',-1 - S02:0000F096: 2A - S02:0000F097: FF -F00:8562 dc.w KEY_MULT-TAB_STAR * * - S02:0000F098: 00 00 -F00:8563 dc.b '/',-1 - S02:0000F09A: 2F - S02:0000F09B: FF -F00:8564 dc.w KEY_DIV-TAB_STAR * / - S02:0000F09C: 00 06 -F00:8565 dc.b '^',-1 - S02:0000F09E: 5E - S02:0000F09F: FF -F00:8566 dc.w KEY_POWER-TAB_STAR * ^ - S02:0000F0A0: 01 A9 -F00:8567 dc.b 'A',1 - S02:0000F0A2: 41 - S02:0000F0A3: 01 -F00:8568 dc.w KEY_AND-TAB_STAR * AND - S02:0000F0A4: 00 18 -F00:8569 dc.b 'E',1 - S02:0000F0A6: 45 - S02:0000F0A7: 01 -F00:8570 dc.w KEY_EOR-TAB_STAR * EOR - S02:0000F0A8: 00 74 -F00:8571 dc.b 'O',0 - S02:0000F0AA: 4F - S02:0000F0AB: 00 -F00:8572 dc.w KEY_OR-TAB_STAR * OR - S02:0000F0AC: 00 F5 -F00:8573 dc.b '>',0 - S02:0000F0AE: 3E - S02:0000F0AF: 00 -F00:8574 dc.w KEY_RSHIFT-TAB_STAR * >> - S02:0000F0B0: 00 0E -F00:8575 dc.b '<',0 - S02:0000F0B2: 3C - S02:0000F0B3: 00 -F00:8576 dc.w KEY_LSHIFT-TAB_STAR * << - S02:0000F0B4: 00 08 -F00:8577 dc.b '>',-1 - S02:0000F0B6: 3E - S02:0000F0B7: FF -F00:8578 dc.w KEY_GT-TAB_STAR * > - S02:0000F0B8: 00 10 -F00:8579 dc.b '=',-1 - S02:0000F0BA: 3D - S02:0000F0BB: FF -F00:8580 dc.w KEY_EQUAL-TAB_STAR * = - S02:0000F0BC: 00 0C -F00:8581 dc.b '<',-1 - S02:0000F0BE: 3C - S02:0000F0BF: FF -F00:8582 dc.w KEY_LT-TAB_STAR * < - S02:0000F0C0: 00 0A -F00:8583 -F00:8584 dc.b 'S',2 - S02:0000F0C2: 53 - S02:0000F0C3: 02 -F00:8585 dc.w KEY_SGN-TAB_STAR * SGN( - S02:0000F0C4: 01 40 -F00:8586 dc.b 'I',2 - S02:0000F0C6: 49 - S02:0000F0C7: 02 -F00:8587 dc.w KEY_INT-TAB_STAR * INT( - S02:0000F0C8: 00 A3 -F00:8588 dc.b 'A',2 - S02:0000F0CA: 41 - S02:0000F0CB: 02 -F00:8589 dc.w KEY_ABS-TAB_STAR * ABS( - S02:0000F0CC: 00 14 -F00:8590 dc.b 'U',2 - S02:0000F0CE: 55 - S02:0000F0CF: 02 -F00:8591 dc.w KEY_USR-TAB_STAR * USR( - S02:0000F0D0: 01 89 -F00:8592 dc.b 'F',2 - S02:0000F0D2: 46 - S02:0000F0D3: 02 -F00:8593 dc.w KEY_FRE-TAB_STAR * FRE( - S02:0000F0D4: 00 81 -F00:8594 dc.b 'P',2 - S02:0000F0D6: 50 - S02:0000F0D7: 02 -F00:8595 dc.w KEY_POS-TAB_STAR * POS( - S02:0000F0D8: 01 03 -F00:8596 dc.b 'S',2 - S02:0000F0DA: 53 - S02:0000F0DB: 02 -F00:8597 dc.w KEY_SQR-TAB_STAR * SQR( - S02:0000F0DC: 01 4C -F00:8598 dc.b 'R',2 - S02:0000F0DE: 52 - S02:0000F0DF: 02 -F00:8599 dc.w KEY_RND-TAB_STAR * RND( - S02:0000F0E0: 01 2F -F00:8600 dc.b 'L',2 - S02:0000F0E2: 4C - S02:0000F0E3: 02 -F00:8601 dc.w KEY_LOG-TAB_STAR * LOG( - S02:0000F0E4: 00 C9 -F00:8602 dc.b 'E',2 - S02:0000F0E6: 45 - S02:0000F0E7: 02 -F00:8603 dc.w KEY_EXP-TAB_STAR * EXP( - S02:0000F0E8: 00 77 -F00:8604 dc.b 'C',2 - S02:0000F0EA: 43 - S02:0000F0EB: 02 -F00:8605 dc.w KEY_COS-TAB_STAR * COS( - S02:0000F0EC: 00 4F -F00:8606 dc.b 'S',2 - S02:0000F0EE: 53 - S02:0000F0EF: 02 -F00:8607 dc.w KEY_SIN-TAB_STAR * SIN( - S02:0000F0F0: 01 44 -F00:8608 dc.b 'T',2 - S02:0000F0F2: 54 - S02:0000F0F3: 02 -F00:8609 dc.w KEY_TAN-TAB_STAR * TAN( - S02:0000F0F4: 01 66 -F00:8610 dc.b 'A',2 - S02:0000F0F6: 41 - S02:0000F0F7: 02 -F00:8611 dc.w KEY_ATN-TAB_STAR * ATN( - S02:0000F0F8: 00 1F -F00:8612 dc.b 'P',3 - S02:0000F0FA: 50 - S02:0000F0FB: 03 -F00:8613 dc.w KEY_PEEK-TAB_STAR * PEEK( - S02:0000F0FC: 00 F8 -F00:8614 dc.b 'D',3 - S02:0000F0FE: 44 - S02:0000F0FF: 03 -F00:8615 dc.w KEY_DEEK-TAB_STAR * DEEK( - S02:0000F100: 00 5B -F00:8616 dc.b 'L',3 - S02:0000F102: 4C - S02:0000F103: 03 -F00:8617 dc.w KEY_LEEK-TAB_STAR * LEEK( - S02:0000F104: 00 AF -F00:8618 dc.b 'L',2 - S02:0000F106: 4C - S02:0000F107: 02 -F00:8619 dc.w KEY_LEN-TAB_STAR * LEN( - S02:0000F108: 00 BA -F00:8620 dc.b 'S',3 - S02:0000F10A: 53 - S02:0000F10B: 03 -F00:8621 dc.w KEY_STRS-TAB_STAR * STR$( - S02:0000F10C: 01 58 -F00:8622 dc.b 'V',2 - S02:0000F10E: 56 - S02:0000F10F: 02 -F00:8623 dc.w KEY_VAL-TAB_STAR * VAL( - S02:0000F110: 01 8E -F00:8624 dc.b 'A',2 - S02:0000F112: 41 - S02:0000F113: 02 -F00:8625 dc.w KEY_ASC-TAB_STAR * ASC( - S02:0000F114: 00 1B -F00:8626 dc.b 'U',5 - S02:0000F116: 55 - S02:0000F117: 05 -F00:8627 dc.w KEY_UCASES-TAB_STAR * UCASE$( - S02:0000F118: 01 76 -F00:8628 dc.b 'L',5 - S02:0000F11A: 4C - S02:0000F11B: 05 -F00:8629 dc.w KEY_LCASES-TAB_STAR * LCASE$( - S02:0000F11C: 00 A8 -F00:8630 dc.b 'C',3 - S02:0000F11E: 43 - S02:0000F11F: 03 -F00:8631 dc.w KEY_CHRS-TAB_STAR * CHR$( - S02:0000F120: 00 41 -F00:8632 dc.b 'H',3 - S02:0000F122: 48 - S02:0000F123: 03 -F00:8633 dc.w KEY_HEXS-TAB_STAR * HEX$( - S02:0000F124: 00 93 -F00:8634 dc.b 'B',3 - S02:0000F126: 42 - S02:0000F127: 03 -F00:8635 dc.w KEY_BINS-TAB_STAR * BIN$( - S02:0000F128: 00 24 -F00:8636 dc.b 'B',5 - S02:0000F12A: 42 - S02:0000F12B: 05 -F00:8637 dc.w KEY_BITTST-TAB_STAR * BITTST( - S02:0000F12C: 00 35 -F00:8638 dc.b 'M',2 - S02:0000F12E: 4D - S02:0000F12F: 02 -F00:8639 dc.w KEY_MAX-TAB_STAR * MAX( - S02:0000F130: 00 D6 -F00:8640 dc.b 'M',2 - S02:0000F132: 4D - S02:0000F133: 02 -F00:8641 dc.w KEY_MIN-TAB_STAR * MIN( - S02:0000F134: 00 DF -F00:8642 dc.b 'R',5 - S02:0000F136: 52 - S02:0000F137: 05 -F00:8643 dc.w KEY_RAM-TAB_STAR * RAMBASE - S02:0000F138: 01 0D -F00:8644 dc.b 'P',0 - S02:0000F13A: 50 - S02:0000F13B: 00 -F00:8645 dc.w KEY_PI-TAB_STAR * PI - S02:0000F13C: 00 FD -F00:8646 dc.b 'T',3 - S02:0000F13E: 54 - S02:0000F13F: 03 -F00:8647 dc.w KEY_TWOPI-TAB_STAR * TWOPI - S02:0000F140: 01 70 -F00:8648 dc.b 'V',5 - S02:0000F142: 56 - S02:0000F143: 05 -F00:8649 dc.w KEY_VPTR-TAB_STAR * VARPTR( - S02:0000F144: 01 92 -F00:8650 dc.b 'S',3 - S02:0000F146: 53 - S02:0000F147: 03 -F00:8651 dc.w KEY_SADD-TAB_STAR * SADD( - S02:0000F148: 01 37 -F00:8652 dc.b 'L',4 - S02:0000F14A: 4C - S02:0000F14B: 04 -F00:8653 dc.w KEY_LEFTS-TAB_STAR * LEFT$( - S02:0000F14C: 00 B4 -F00:8654 dc.b 'R',5 - S02:0000F14E: 52 - S02:0000F14F: 05 -F00:8655 dc.w KEY_RIGHTS-TAB_STAR * RIGHT$( - S02:0000F150: 01 28 -F00:8656 dc.b 'M',3 - S02:0000F152: 4D - S02:0000F153: 03 -F00:8657 dc.w KEY_MIDS-TAB_STAR * MID$( - S02:0000F154: 00 DA -F00:8658 dc.b 'U',5 - S02:0000F156: 55 - S02:0000F157: 05 -F00:8659 dc.w KEY_USINGS-TAB_STAR * USING$( - S02:0000F158: 01 82 -F00:8660 -F00:8661 -F00:8662 ************************************************************************************* -F00:8663 * -F00:8664 * BASIC error messages -F00:8665 -F00:8666 LAB_BAER -F00:8667 dc.w LAB_NF-LAB_BAER * $00 NEXT without FOR - S02:0000F15A: 00 30 -F00:8668 dc.w LAB_SN-LAB_BAER * $02 syntax - S02:0000F15C: 00 41 -F00:8669 dc.w LAB_RG-LAB_BAER * $04 RETURN without GOSUB - S02:0000F15E: 00 48 -F00:8670 dc.w LAB_OD-LAB_BAER * $06 out of data - S02:0000F160: 00 5D -F00:8671 dc.w LAB_FC-LAB_BAER * $08 function call - S02:0000F162: 00 69 -F00:8672 dc.w LAB_OV-LAB_BAER * $0A overflow - S02:0000F164: 00 77 -F00:8673 dc.w LAB_OM-LAB_BAER * $0C out of memory - S02:0000F166: 00 80 -F00:8674 dc.w LAB_US-LAB_BAER * $0E undefined statement - S02:0000F168: 00 8E -F00:8675 dc.w LAB_BS-LAB_BAER * $10 array bounds - S02:0000F16A: 00 A2 -F00:8676 dc.w LAB_DD-LAB_BAER * $12 double dimension array - S02:0000F16C: 00 AF -F00:8677 dc.w LAB_D0-LAB_BAER * $14 divide by 0 - S02:0000F16E: 00 C0 -F00:8678 dc.w LAB_ID-LAB_BAER * $16 illegal direct - S02:0000F170: 00 CF -F00:8679 dc.w LAB_TM-LAB_BAER * $18 type mismatch - S02:0000F172: 00 DE -F00:8680 dc.w LAB_LS-LAB_BAER * $1A long string - S02:0000F174: 00 EC -F00:8681 dc.w LAB_ST-LAB_BAER * $1C string too complex - S02:0000F176: 00 FC -F00:8682 dc.w LAB_CN-LAB_BAER * $1E continue error - S02:0000F178: 01 0F -F00:8683 dc.w LAB_UF-LAB_BAER * $20 undefined function - S02:0000F17A: 01 1E -F00:8684 dc.w LAB_LD-LAB_BAER * $22 LOOP without DO - S02:0000F17C: 01 31 -F00:8685 dc.w LAB_UV-LAB_BAER * $24 undefined variable - S02:0000F17E: 01 41 -F00:8686 dc.w LAB_UA-LAB_BAER * $26 undimensioned array - S02:0000F180: 01 54 -F00:8687 dc.w LAB_WD-LAB_BAER * $28 wrong dimensions - S02:0000F182: 01 68 -F00:8688 dc.w LAB_AD-LAB_BAER * $2A address - S02:0000F184: 01 79 -F00:8689 dc.w LAB_FO-LAB_BAER * $2C format - S02:0000F186: 01 81 -F00:8690 dc.w LAB_NI-LAB_BAER * $2E not implemented - S02:0000F188: 01 88 -F00:8691 -F00:8692 LAB_NF dc.b 'NEXT without FOR',$00 - S02:0000F18A: 4E 45 58 54 20 77 69 74 68 6F 75 74 20 46 4F 52 - S02:0000F19A: 00 -F00:8693 LAB_SN dc.b 'Syntax',$00 - S02:0000F19B: 53 79 6E 74 61 78 - S02:0000F1A1: 00 -F00:8694 LAB_RG dc.b 'RETURN without GOSUB',$00 - S02:0000F1A2: 52 45 54 55 52 4E 20 77 69 74 68 6F 75 74 20 47 - S02:0000F1B2: 4F 53 55 42 - S02:0000F1B6: 00 -F00:8695 LAB_OD dc.b 'Out of DATA',$00 - S02:0000F1B7: 4F 75 74 20 6F 66 20 44 41 54 41 - S02:0000F1C2: 00 -F00:8696 LAB_FC dc.b 'Function call',$00 - S02:0000F1C3: 46 75 6E 63 74 69 6F 6E 20 63 61 6C 6C - S02:0000F1D0: 00 -F00:8697 LAB_OV dc.b 'Overflow',$00 - S02:0000F1D1: 4F 76 65 72 66 6C 6F 77 - S02:0000F1D9: 00 -F00:8698 LAB_OM dc.b 'Out of memory',$00 - S02:0000F1DA: 4F 75 74 20 6F 66 20 6D 65 6D 6F 72 79 - S02:0000F1E7: 00 -F00:8699 LAB_US dc.b 'Undefined statement',$00 - S02:0000F1E8: 55 6E 64 65 66 69 6E 65 64 20 73 74 61 74 65 6D - S02:0000F1F8: 65 6E 74 - S02:0000F1FB: 00 -F00:8700 LAB_BS dc.b 'Array bounds',$00 - S02:0000F1FC: 41 72 72 61 79 20 62 6F 75 6E 64 73 - S02:0000F208: 00 -F00:8701 LAB_DD dc.b 'Double dimension',$00 - S02:0000F209: 44 6F 75 62 6C 65 20 64 69 6D 65 6E 73 69 6F 6E - S02:0000F219: 00 -F00:8702 LAB_D0 dc.b 'Divide by zero',$00 - S02:0000F21A: 44 69 76 69 64 65 20 62 79 20 7A 65 72 6F - S02:0000F228: 00 -F00:8703 LAB_ID dc.b 'Illegal direct',$00 - S02:0000F229: 49 6C 6C 65 67 61 6C 20 64 69 72 65 63 74 - S02:0000F237: 00 -F00:8704 LAB_TM dc.b 'Type mismatch',$00 - S02:0000F238: 54 79 70 65 20 6D 69 73 6D 61 74 63 68 - S02:0000F245: 00 -F00:8705 LAB_LS dc.b 'String too long',$00 - S02:0000F246: 53 74 72 69 6E 67 20 74 6F 6F 20 6C 6F 6E 67 - S02:0000F255: 00 -F00:8706 LAB_ST dc.b 'String too complex',$00 - S02:0000F256: 53 74 72 69 6E 67 20 74 6F 6F 20 63 6F 6D 70 6C - S02:0000F266: 65 78 - S02:0000F268: 00 -F00:8707 LAB_CN dc.b 'Can''t continue',$00 - S02:0000F269: 43 61 6E 27 74 20 63 6F 6E 74 69 6E 75 65 - S02:0000F277: 00 -F00:8708 LAB_UF dc.b 'Undefined function',$00 - S02:0000F278: 55 6E 64 65 66 69 6E 65 64 20 66 75 6E 63 74 69 - S02:0000F288: 6F 6E - S02:0000F28A: 00 -F00:8709 LAB_LD dc.b 'LOOP without DO',$00 - S02:0000F28B: 4C 4F 4F 50 20 77 69 74 68 6F 75 74 20 44 4F - S02:0000F29A: 00 -F00:8710 LAB_UV dc.b 'Undefined variable',$00 - S02:0000F29B: 55 6E 64 65 66 69 6E 65 64 20 76 61 72 69 61 62 - S02:0000F2AB: 6C 65 - S02:0000F2AD: 00 -F00:8711 LAB_UA dc.b 'Undimensioned array',$00 - S02:0000F2AE: 55 6E 64 69 6D 65 6E 73 69 6F 6E 65 64 20 61 72 - S02:0000F2BE: 72 61 79 - S02:0000F2C1: 00 -F00:8712 LAB_WD dc.b 'Wrong dimensions',$00 - S02:0000F2C2: 57 72 6F 6E 67 20 64 69 6D 65 6E 73 69 6F 6E 73 - S02:0000F2D2: 00 -F00:8713 LAB_AD dc.b 'Address',$00 - S02:0000F2D3: 41 64 64 72 65 73 73 - S02:0000F2DA: 00 -F00:8714 LAB_FO dc.b 'Format',$00 - S02:0000F2DB: 46 6F 72 6D 61 74 - S02:0000F2E1: 00 -F00:8715 LAB_NI dc.b 'Not implemented',$00 - S02:0000F2E2: 4E 6F 74 20 69 6D 70 6C 65 6D 65 6E 74 65 64 - S02:0000F2F1: 00 -F00:8716 -F00:8717 -F00:8718 ************************************************************************************* -F00:8719 * -F00:8720 * keyword table for line (un)crunching -F00:8721 -F00:8722 * [keyword,token -F00:8723 * [keyword,token]] -F00:8724 * end marker (#$00) -F00:8725 -F00:8726 TAB_STAR -F00:8727 KEY_MULT -F00:8728 dc.b TK_MULT,$00 * * - S02:0000F2F2: B4 - S02:0000F2F3: 00 -F00:8729 TAB_PLUS -F00:8730 KEY_PLUS -F00:8731 dc.b TK_PLUS,$00 * + - S02:0000F2F4: B2 - S02:0000F2F5: 00 -F00:8732 TAB_MNUS -F00:8733 KEY_MINUS -F00:8734 dc.b TK_MINUS,$00 * - - S02:0000F2F6: B3 - S02:0000F2F7: 00 -F00:8735 TAB_SLAS -F00:8736 KEY_DIV -F00:8737 dc.b TK_DIV,$00 * / - S02:0000F2F8: B5 - S02:0000F2F9: 00 -F00:8738 TAB_LESS -F00:8739 KEY_LSHIFT -F00:8740 dc.b '<',TK_LSHIFT * << - S02:0000F2FA: 3C - S02:0000F2FB: BB -F00:8741 KEY_LT -F00:8742 dc.b TK_LT * < - S02:0000F2FC: BE -F00:8743 dc.b $00 - S02:0000F2FD: 00 -F00:8744 TAB_EQUL -F00:8745 KEY_EQUAL -F00:8746 dc.b TK_EQUAL,$00 * = - S02:0000F2FE: BD - S02:0000F2FF: 00 -F00:8747 TAB_MORE -F00:8748 KEY_RSHIFT -F00:8749 dc.b '>',TK_RSHIFT * >> - S02:0000F300: 3E - S02:0000F301: BA -F00:8750 KEY_GT -F00:8751 dc.b TK_GT * > - S02:0000F302: BC -F00:8752 dc.b $00 - S02:0000F303: 00 -F00:8753 TAB_QEST -F00:8754 dc.b TK_PRINT,$00 * ? - S02:0000F304: 9E - S02:0000F305: 00 -F00:8755 TAB_ASCA -F00:8756 KEY_ABS -F00:8757 dc.b 'BS(',TK_ABS * ABS( - S02:0000F306: 42 53 28 - S02:0000F309: C1 -F00:8758 KEY_AND -F00:8759 dc.b 'ND',TK_AND * AND - S02:0000F30A: 4E 44 - S02:0000F30C: B7 -F00:8760 KEY_ASC -F00:8761 dc.b 'SC(',TK_ASC * ASC( - S02:0000F30D: 53 43 28 - S02:0000F310: D3 -F00:8762 KEY_ATN -F00:8763 dc.b 'TN(',TK_ATN * ATN( - S02:0000F311: 54 4E 28 - S02:0000F314: CC -F00:8764 dc.b $00 - S02:0000F315: 00 -F00:8765 TAB_ASCB -F00:8766 KEY_BINS -F00:8767 dc.b 'IN$(',TK_BINS * BIN$( - S02:0000F316: 49 4E 24 28 - S02:0000F31A: D8 -F00:8768 KEY_BITCLR -F00:8769 dc.b 'ITCLR',TK_BITCLR * BITCLR - S02:0000F31B: 49 54 43 4C 52 - S02:0000F320: A7 -F00:8770 KEY_BITSET -F00:8771 dc.b 'ITSET',TK_BITSET * BITSET - S02:0000F321: 49 54 53 45 54 - S02:0000F326: A6 -F00:8772 KEY_BITTST -F00:8773 dc.b 'ITTST(',TK_BITTST * BITTST( - S02:0000F327: 49 54 54 53 54 28 - S02:0000F32D: D9 -F00:8774 dc.b $00 - S02:0000F32E: 00 -F00:8775 TAB_ASCC -F00:8776 KEY_CALL -F00:8777 dc.b 'ALL',TK_CALL * CALL - S02:0000F32F: 41 4C 4C - S02:0000F332: 9B -F00:8778 KEY_CHRS -F00:8779 dc.b 'HR$(',TK_CHRS * CHR$( - S02:0000F333: 48 52 24 28 - S02:0000F337: D6 -F00:8780 KEY_CLEAR -F00:8781 dc.b 'LEAR',TK_CLEAR * CLEAR - S02:0000F338: 4C 45 41 52 - S02:0000F33C: A1 -F00:8782 KEY_CONT -F00:8783 dc.b 'ONT',TK_CONT * CONT - S02:0000F33D: 4F 4E 54 - S02:0000F340: 9F -F00:8784 KEY_COS -F00:8785 dc.b 'OS(',TK_COS * COS( - S02:0000F341: 4F 53 28 - S02:0000F344: C9 -F00:8786 dc.b $00 - S02:0000F345: 00 -F00:8787 TAB_ASCD -F00:8788 KEY_DATA -F00:8789 dc.b 'ATA',TK_DATA * DATA - S02:0000F346: 41 54 41 - S02:0000F349: 83 -F00:8790 KEY_DEC -F00:8791 dc.b 'EC',TK_DEC * DEC - S02:0000F34A: 45 43 - S02:0000F34C: 88 -F00:8792 KEY_DEEK -F00:8793 dc.b 'EEK(',TK_DEEK * DEEK( - S02:0000F34D: 45 45 4B 28 - S02:0000F351: CE -F00:8794 KEY_DEF -F00:8795 dc.b 'EF',TK_DEF * DEF - S02:0000F352: 45 46 - S02:0000F354: 97 -F00:8796 KEY_DIM -F00:8797 dc.b 'IM',TK_DIM * DIM - S02:0000F355: 49 4D - S02:0000F357: 85 -F00:8798 KEY_DOKE -F00:8799 dc.b 'OKE',TK_DOKE * DOKE - S02:0000F358: 4F 4B 45 - S02:0000F35B: 99 -F00:8800 KEY_DO -F00:8801 dc.b 'O',TK_DO * DO - S02:0000F35C: 4F - S02:0000F35D: 9C -F00:8802 dc.b $00 - S02:0000F35E: 00 -F00:8803 TAB_ASCE -F00:8804 KEY_ELSE -F00:8805 dc.b 'LSE',TK_ELSE * ELSE - S02:0000F35F: 4C 53 45 - S02:0000F362: A9 -F00:8806 KEY_END -F00:8807 dc.b 'ND',TK_END * END - S02:0000F363: 4E 44 - S02:0000F365: 80 -F00:8808 KEY_EOR -F00:8809 dc.b 'OR',TK_EOR * EOR - S02:0000F366: 4F 52 - S02:0000F368: B8 -F00:8810 KEY_EXP -F00:8811 dc.b 'XP(',TK_EXP * EXP( - S02:0000F369: 58 50 28 - S02:0000F36C: C8 -F00:8812 dc.b $00 - S02:0000F36D: 00 -F00:8813 TAB_ASCF -F00:8814 KEY_FOR -F00:8815 dc.b 'OR',TK_FOR * FOR - S02:0000F36E: 4F 52 - S02:0000F370: 81 -F00:8816 KEY_FN -F00:8817 dc.b 'N',TK_FN * FN - S02:0000F371: 4E - S02:0000F372: AB -F00:8818 KEY_FRE -F00:8819 dc.b 'RE(',TK_FRE * FRE( - S02:0000F373: 52 45 28 - S02:0000F376: C3 -F00:8820 dc.b $00 - S02:0000F377: 00 -F00:8821 TAB_ASCG -F00:8822 KEY_GET -F00:8823 dc.b 'ET',TK_GET * GET - S02:0000F378: 45 54 - S02:0000F37A: A4 -F00:8824 KEY_GOTO -F00:8825 dc.b 'OTO',TK_GOTO * GOTO - S02:0000F37B: 4F 54 4F - S02:0000F37E: 89 -F00:8826 KEY_GOSUB -F00:8827 dc.b 'OSUB',TK_GOSUB * GOSUB - S02:0000F37F: 4F 53 55 42 - S02:0000F383: 8D -F00:8828 dc.b $00 - S02:0000F384: 00 -F00:8829 TAB_ASCH -F00:8830 KEY_HEXS -F00:8831 dc.b 'EX$(',TK_HEXS,$00 * HEX$( - S02:0000F385: 45 58 24 28 - S02:0000F389: D7 - S02:0000F38A: 00 -F00:8832 TAB_ASCI -F00:8833 KEY_IF -F00:8834 dc.b 'F',TK_IF * IF - S02:0000F38B: 46 - S02:0000F38C: 8B -F00:8835 KEY_INC -F00:8836 dc.b 'NC',TK_INC * INC - S02:0000F38D: 4E 43 - S02:0000F38F: 93 -F00:8837 KEY_INPUT -F00:8838 dc.b 'NPUT',TK_INPUT * INPUT - S02:0000F390: 4E 50 55 54 - S02:0000F394: 84 -F00:8839 KEY_INT -F00:8840 dc.b 'NT(',TK_INT * INT( - S02:0000F395: 4E 54 28 - S02:0000F398: C0 -F00:8841 dc.b $00 - S02:0000F399: 00 -F00:8842 TAB_ASCL -F00:8843 KEY_LCASES -F00:8844 dc.b 'CASE$(',TK_LCASES * LCASE$( - S02:0000F39A: 43 41 53 45 24 28 - S02:0000F3A0: D5 -F00:8845 KEY_LEEK -F00:8846 dc.b 'EEK(',TK_LEEK * LEEK( - S02:0000F3A1: 45 45 4B 28 - S02:0000F3A5: CF -F00:8847 KEY_LEFTS -F00:8848 dc.b 'EFT$(',TK_LEFTS * LEFT$( - S02:0000F3A6: 45 46 54 24 28 - S02:0000F3AB: E1 -F00:8849 KEY_LEN -F00:8850 dc.b 'EN(',TK_LEN * LEN( - S02:0000F3AC: 45 4E 28 - S02:0000F3AF: D0 -F00:8851 KEY_LET -F00:8852 dc.b 'ET',TK_LET * LET - S02:0000F3B0: 45 54 - S02:0000F3B2: 87 -F00:8853 KEY_LIST -F00:8854 dc.b 'IST',TK_LIST * LIST - S02:0000F3B3: 49 53 54 - S02:0000F3B6: A0 -F00:8855 KEY_LOAD -F00:8856 dc.b 'OAD',TK_LOAD * LOAD - S02:0000F3B7: 4F 41 44 - S02:0000F3BA: 95 -F00:8857 KEY_LOG -F00:8858 dc.b 'OG(',TK_LOG * LOG( - S02:0000F3BB: 4F 47 28 - S02:0000F3BE: C7 -F00:8859 KEY_LOKE -F00:8860 dc.b 'OKE',TK_LOKE * LOKE - S02:0000F3BF: 4F 4B 45 - S02:0000F3C2: 9A -F00:8861 KEY_LOOP -F00:8862 dc.b 'OOP',TK_LOOP * LOOP - S02:0000F3C3: 4F 4F 50 - S02:0000F3C6: 9D -F00:8863 dc.b $00 - S02:0000F3C7: 00 -F00:8864 TAB_ASCM -F00:8865 KEY_MAX -F00:8866 dc.b 'AX(',TK_MAX * MAX( - S02:0000F3C8: 41 58 28 - S02:0000F3CB: DA -F00:8867 KEY_MIDS -F00:8868 dc.b 'ID$(',TK_MIDS * MID$( - S02:0000F3CC: 49 44 24 28 - S02:0000F3D0: E3 -F00:8869 KEY_MIN -F00:8870 dc.b 'IN(',TK_MIN * MIN( - S02:0000F3D1: 49 4E 28 - S02:0000F3D4: DB -F00:8871 dc.b $00 - S02:0000F3D5: 00 -F00:8872 TAB_ASCN -F00:8873 KEY_NEW -F00:8874 dc.b 'EW',TK_NEW * NEW - S02:0000F3D6: 45 57 - S02:0000F3D8: A2 -F00:8875 KEY_NEXT -F00:8876 dc.b 'EXT',TK_NEXT * NEXT - S02:0000F3D9: 45 58 54 - S02:0000F3DC: 82 -F00:8877 KEY_NOT -F00:8878 dc.b 'OT',TK_NOT * NOT - S02:0000F3DD: 4F 54 - S02:0000F3DF: AE -F00:8879 KEY_NULL -F00:8880 dc.b 'ULL',TK_NULL * NULL - S02:0000F3E0: 55 4C 4C - S02:0000F3E3: 92 -F00:8881 dc.b $00 - S02:0000F3E4: 00 -F00:8882 TAB_ASCO -F00:8883 KEY_ON -F00:8884 dc.b 'N',TK_ON * ON - S02:0000F3E5: 4E - S02:0000F3E6: 91 -F00:8885 KEY_OR -F00:8886 dc.b 'R',TK_OR * OR - S02:0000F3E7: 52 - S02:0000F3E8: B9 -F00:8887 dc.b $00 - S02:0000F3E9: 00 -F00:8888 TAB_ASCP -F00:8889 KEY_PEEK -F00:8890 dc.b 'EEK(',TK_PEEK * PEEK( - S02:0000F3EA: 45 45 4B 28 - S02:0000F3EE: CD -F00:8891 KEY_PI -F00:8892 dc.b 'I',TK_PI * PI - S02:0000F3EF: 49 - S02:0000F3F0: DD -F00:8893 KEY_POKE -F00:8894 dc.b 'OKE',TK_POKE * POKE - S02:0000F3F1: 4F 4B 45 - S02:0000F3F4: 98 -F00:8895 KEY_POS -F00:8896 dc.b 'OS(',TK_POS * POS( - S02:0000F3F5: 4F 53 28 - S02:0000F3F8: C4 -F00:8897 KEY_PRINT -F00:8898 dc.b 'RINT',TK_PRINT * PRINT - S02:0000F3F9: 52 49 4E 54 - S02:0000F3FD: 9E -F00:8899 dc.b $00 - S02:0000F3FE: 00 -F00:8900 TAB_ASCR -F00:8901 KEY_RAM -F00:8902 dc.b 'AMBASE',TK_RAM * RAMBASE - S02:0000F3FF: 41 4D 42 41 53 45 - S02:0000F405: DC -F00:8903 KEY_READ -F00:8904 dc.b 'EAD',TK_READ * READ - S02:0000F406: 45 41 44 - S02:0000F409: 86 -F00:8905 KEY_REM -F00:8906 dc.b 'EM',TK_REM * REM - S02:0000F40A: 45 4D - S02:0000F40C: 8F -F00:8907 KEY_RESTORE -F00:8908 dc.b 'ESTORE',TK_RESTORE * RESTORE - S02:0000F40D: 45 53 54 4F 52 45 - S02:0000F413: 8C -F00:8909 KEY_RETURN -F00:8910 dc.b 'ETURN',TK_RETURN * RETURN - S02:0000F414: 45 54 55 52 4E - S02:0000F419: 8E -F00:8911 KEY_RIGHTS -F00:8912 dc.b 'IGHT$(',TK_RIGHTS * RIGHT$( - S02:0000F41A: 49 47 48 54 24 28 - S02:0000F420: E2 -F00:8913 KEY_RND -F00:8914 dc.b 'ND(',TK_RND * RND( - S02:0000F421: 4E 44 28 - S02:0000F424: C6 -F00:8915 KEY_RUN -F00:8916 dc.b 'UN',TK_RUN * RUN - S02:0000F425: 55 4E - S02:0000F427: 8A -F00:8917 dc.b $00 - S02:0000F428: 00 -F00:8918 TAB_ASCS -F00:8919 KEY_SADD -F00:8920 dc.b 'ADD(',TK_SADD * SADD( - S02:0000F429: 41 44 44 28 - S02:0000F42D: E0 -F00:8921 KEY_SAVE -F00:8922 dc.b 'AVE',TK_SAVE * SAVE - S02:0000F42E: 41 56 45 - S02:0000F431: 96 -F00:8923 KEY_SGN -F00:8924 dc.b 'GN(',TK_SGN * SGN( - S02:0000F432: 47 4E 28 - S02:0000F435: BF -F00:8925 KEY_SIN -F00:8926 dc.b 'IN(',TK_SIN * SIN( - S02:0000F436: 49 4E 28 - S02:0000F439: CA -F00:8927 KEY_SPC -F00:8928 dc.b 'PC(',TK_SPC * SPC( - S02:0000F43A: 50 43 28 - S02:0000F43D: AC -F00:8929 KEY_SQR -F00:8930 dc.b 'QR(',TK_SQR * SQR( - S02:0000F43E: 51 52 28 - S02:0000F441: C5 -F00:8931 KEY_STEP -F00:8932 dc.b 'TEP',TK_STEP * STEP - S02:0000F442: 54 45 50 - S02:0000F445: AF -F00:8933 KEY_STOP -F00:8934 dc.b 'TOP',TK_STOP * STOP - S02:0000F446: 54 4F 50 - S02:0000F449: 90 -F00:8935 KEY_STRS -F00:8936 dc.b 'TR$(',TK_STRS * STR$( - S02:0000F44A: 54 52 24 28 - S02:0000F44E: D1 -F00:8937 KEY_SWAP -F00:8938 dc.b 'WAP',TK_SWAP * SWAP - S02:0000F44F: 57 41 50 - S02:0000F452: A5 -F00:8939 dc.b $00 - S02:0000F453: 00 -F00:8940 TAB_ASCT -F00:8941 KEY_TAB -F00:8942 dc.b 'AB(',TK_TAB * TAB( - S02:0000F454: 41 42 28 - S02:0000F457: A8 -F00:8943 KEY_TAN -F00:8944 dc.b 'AN(',TK_TAN * TAN - S02:0000F458: 41 4E 28 - S02:0000F45B: CB -F00:8945 KEY_THEN -F00:8946 dc.b 'HEN',TK_THEN * THEN - S02:0000F45C: 48 45 4E - S02:0000F45F: AD -F00:8947 KEY_TO -F00:8948 dc.b 'O',TK_TO * TO - S02:0000F460: 4F - S02:0000F461: AA -F00:8949 KEY_TWOPI -F00:8950 dc.b 'WOPI',TK_TWOPI * TWOPI - S02:0000F462: 57 4F 50 49 - S02:0000F466: DE -F00:8951 dc.b $00 - S02:0000F467: 00 -F00:8952 TAB_ASCU -F00:8953 KEY_UCASES -F00:8954 dc.b 'CASE$(',TK_UCASES * UCASE$( - S02:0000F468: 43 41 53 45 24 28 - S02:0000F46E: D4 -F00:8955 KEY_UNTIL -F00:8956 dc.b 'NTIL',TK_UNTIL * UNTIL - S02:0000F46F: 4E 54 49 4C - S02:0000F473: B0 -F00:8957 KEY_USINGS -F00:8958 dc.b 'SING$(',TK_USINGS * USING$( - S02:0000F474: 53 49 4E 47 24 28 - S02:0000F47A: E4 -F00:8959 KEY_USR -F00:8960 dc.b 'SR(',TK_USR * USR( - S02:0000F47B: 53 52 28 - S02:0000F47E: C2 -F00:8961 dc.b $00 - S02:0000F47F: 00 -F00:8962 TAB_ASCV -F00:8963 KEY_VAL -F00:8964 dc.b 'AL(',TK_VAL * VAL( - S02:0000F480: 41 4C 28 - S02:0000F483: D2 -F00:8965 KEY_VPTR -F00:8966 dc.b 'ARPTR(',TK_VPTR * VARPTR( - S02:0000F484: 41 52 50 54 52 28 - S02:0000F48A: DF -F00:8967 dc.b $00 - S02:0000F48B: 00 -F00:8968 TAB_ASCW -F00:8969 KEY_WAIT -F00:8970 dc.b 'AIT',TK_WAIT * WAIT - S02:0000F48C: 41 49 54 - S02:0000F48F: 94 -F00:8971 KEY_WHILE -F00:8972 dc.b 'HILE',TK_WHILE * WHILE - S02:0000F490: 48 49 4C 45 - S02:0000F494: B1 -F00:8973 KEY_WIDTH -F00:8974 dc.b 'IDTH',TK_WIDTH * WIDTH - S02:0000F495: 49 44 54 48 - S02:0000F499: A3 -F00:8975 dc.b $00 - S02:0000F49A: 00 -F00:8976 TAB_POWR -F00:8977 KEY_POWER -F00:8978 dc.b TK_POWER,$00 * ^ - S02:0000F49B: B6 - S02:0000F49C: 00 -F00:8979 -F00:8980 -F00:8981 ************************************************************************************* -F00:8982 * -F00:8983 * just messages -F00:8984 -F00:8985 LAB_BMSG -F00:8986 dc.b $0D,$0A,'Break',$00 - S02:0000F49D: 0D - S02:0000F49E: 0A - S02:0000F49F: 42 72 65 61 6B - S02:0000F4A4: 00 -F00:8987 LAB_EMSG -F00:8988 dc.b ' Error',$00 - S02:0000F4A5: 20 45 72 72 6F 72 - S02:0000F4AB: 00 -F00:8989 LAB_LMSG -F00:8990 dc.b ' in line ',$00 - S02:0000F4AC: 20 69 6E 20 6C 69 6E 65 20 - S02:0000F4B5: 00 -F00:8991 LAB_IMSG -F00:8992 dc.b 'Extra ignored',$0D,$0A,$00 - S02:0000F4B6: 45 78 74 72 61 20 69 67 6E 6F 72 65 64 - S02:0000F4C3: 0D - S02:0000F4C4: 0A - S02:0000F4C5: 00 -F00:8993 LAB_REDO -F00:8994 dc.b 'Redo from start',$0D,$0A,$00 - S02:0000F4C6: 52 65 64 6F 20 66 72 6F 6D 20 73 74 61 72 74 - S02:0000F4D5: 0D - S02:0000F4D6: 0A - S02:0000F4D7: 00 -F00:8995 LAB_RMSG -F00:8996 dc.b $0D,$0A,'Ready',$0D,$0A,$00 - S02:0000F4D8: 0D - S02:0000F4D9: 0A - S02:0000F4DA: 52 65 61 64 79 - S02:0000F4DF: 0D - S02:0000F4E0: 0A - S02:0000F4E1: 00 -F00:8997 LAB_SMSG -F00:8998 dc.b ' Bytes free',$0D,$0A,$0A - S02:0000F4E2: 20 42 79 74 65 73 20 66 72 65 65 - S02:0000F4ED: 0D - S02:0000F4EE: 0A - S02:0000F4EF: 0A -F00:8999 dc.b 'Enhanced 68k BASIC Version 3.52',$0D,$0A,$00 - S02:0000F4F0: 45 6E 68 61 6E 63 65 64 20 36 38 6B 20 42 41 53 - S02:0000F500: 49 43 20 56 65 72 73 69 6F 6E 20 33 2E 35 32 - S02:0000F50F: 0D - S02:0000F510: 0A - S02:0000F511: 00 -F00:9000 -F00:9001 -F00:9002 ************************************************************************************* -F00:9003 * EhBASIC keywords quick reference list * -F00:9004 ************************************************************************************* -F00:9005 -F00:9006 * glossary -F00:9007 -F00:9008 * <.> required -F00:9009 * {.|.} one of required -F00:9010 * [.] optional -F00:9011 * ... may repeat as last -F00:9012 -F00:9013 * any = anything -F00:9014 * num = number -F00:9015 * state = statement -F00:9016 * n = positive integer -F00:9017 * str = string -F00:9018 * var = variable -F00:9019 * nvar = numeric variable -F00:9020 * svar = string variable -F00:9021 * expr = expression -F00:9022 * nexpr = numeric expression -F00:9023 * sexpr = string expression -F00:9024 -F00:9025 * statement separator -F00:9026 -F00:9027 * : . [] : [] * done -F00:9028 -F00:9029 * number bases -F00:9030 -F00:9031 * % . % * done -F00:9032 * $ . $ * done -F00:9033 -F00:9034 * commands -F00:9035 -F00:9036 * END . END * done -F00:9037 * FOR . FOR = TO [STEP ] * done -F00:9038 * NEXT . NEXT [[,]...] * done -F00:9039 * DATA . DATA [{num|["]str["]}[,{num|["]str["]}]...] * done -F00:9040 * INPUT . INPUT [<">str<">;] [,[,]...] * done -F00:9041 * DIM . DIM ([,[,]]) * done -F00:9042 * READ . READ [,[,]...] * done -F00:9043 * LET . [LET] = * done -F00:9044 * DEC . DEC [,[,]...] * done -F00:9045 * GOTO . GOTO * done -F00:9046 * RUN . RUN [] * done -F00:9047 * IF . IF {GOTO|THEN<{n|comm}>}[ELSE <{n|comm}>] * done -F00:9048 * RESTORE . RESTORE [] * done -F00:9049 * GOSUB . GOSUB * done -F00:9050 * RETURN . RETURN * done -F00:9051 * REM . REM [] * done -F00:9052 * STOP . STOP * done -F00:9053 * ON . ON {GOTO|GOSUB}[,[,]...] * done -F00:9054 * NULL . NULL * done -F00:9055 * INC . INC [,[,]...] * done -F00:9056 * WAIT . WAIT ,[,] * done -F00:9057 * LOAD . LOAD [] * done for sim -F00:9058 * SAVE . SAVE [][,[][-]] * done for sim -F00:9059 * DEF . DEF FN()= * done -F00:9060 * POKE . POKE , * done -F00:9061 * DOKE . DOKE , * done -F00:9062 * LOKE . LOKE , * done -F00:9063 * CALL . CALL * done -F00:9064 * DO . DO * done -F00:9065 * LOOP . LOOP [{WHILE|UNTIL}] * done -F00:9066 * PRINT . PRINT [{;|,}][][{;|,}[]...] * done -F00:9067 * CONT . CONT * done -F00:9068 * LIST . LIST [][-] * done -F00:9069 * CLEAR . CLEAR * done -F00:9070 * NEW . NEW * done -F00:9071 * WIDTH . WIDTH [][,] * done -F00:9072 * GET . GET * done -F00:9073 * SWAP . SWAP , * done -F00:9074 * BITSET . BITSET , * done -F00:9075 * BITCLR . BITCLR , * done -F00:9076 -F00:9077 * sub commands (may not start a statement) -F00:9078 -F00:9079 * TAB . TAB() * done -F00:9080 * ELSE . IF {GOTO|THEN<{n|comm}>}[ELSE <{n|comm}>] * done -F00:9081 * TO . FOR = TO [STEP ] * done -F00:9082 * FN . FN () * done -F00:9083 * SPC . SPC() * done -F00:9084 * THEN . IF {THEN <{n|comm}>|GOTO } * done -F00:9085 * NOT . NOT * done -F00:9086 * STEP . FOR = TO [STEP ] * done -F00:9087 * UNTIL . LOOP [{WHILE|UNTIL}] * done -F00:9088 * WHILE . LOOP [{WHILE|UNTIL}] * done -F00:9089 -F00:9090 * operators -F00:9091 -F00:9092 * + . [expr] + * done -F00:9093 * - . [nexpr] - * done -F00:9094 * * . * * done fast hardware -F00:9095 * / . / * done fast hardware -F00:9096 * ^ . ^ * done -F00:9097 * AND . AND * done -F00:9098 * EOR . EOR * done -F00:9099 * OR . OR * done -F00:9100 * >> . >> * done -F00:9101 * << . << * done -F00:9102 -F00:9103 * compare functions -F00:9104 -F00:9105 * < . < * done -F00:9106 * = . = * done -F00:9107 * > . > * done -F00:9108 -F00:9109 * functions -F00:9110 -F00:9111 * SGN . SGN() * done -F00:9112 * INT . INT() * done -F00:9113 * ABS . ABS() * done -F00:9114 * USR . USR() * done -F00:9115 * FRE . FRE() * done -F00:9116 * POS . POS() * done -F00:9117 * SQR . SQR() * done fast shift/sub -F00:9118 * RND . RND() * done 32 bit PRNG -F00:9119 * LOG . LOG() * done fast cordic -F00:9120 * EXP . EXP() * done fast cordic -F00:9121 * COS . COS() * done fast cordic -F00:9122 * SIN . SIN() * done fast cordic -F00:9123 * TAN . TAN() * done fast cordic -F00:9124 * ATN . ATN() * done fast cordic -F00:9125 * PEEK . PEEK() * done -F00:9126 * DEEK . DEEK() * done -F00:9127 * LEEK . LEEK() * done -F00:9128 * LEN . LEN() * done -F00:9129 * STR$ . STR$() * done -F00:9130 * VAL . VAL() * done -F00:9131 * ASC . ASC() * done -F00:9132 * UCASE$ . UCASE$() * done -F00:9133 * LCASE$ . LCASE$() * done -F00:9134 * CHR$ . CHR$() * done -F00:9135 * HEX$ . HEX$() * done -F00:9136 * BIN$ . BIN$() * done -F00:9137 * BTST . BTST(,) * done -F00:9138 * MAX . MAX([,[,]...]) * done -F00:9139 * MIN . MIN([,[,]...]) * done -F00:9140 * PI . PI * done -F00:9141 * TWOPI . TWOPI * done -F00:9142 * VARPTR . VARPTR() * done -F00:9143 * SADD . SADD() * done -F00:9144 * LEFT$ . LEFT$(,) * done -F00:9145 * RIGHT$ . RIGHT$(,) * done -F00:9146 * MID$ . MID$(,[,]) * done -F00:9147 * USING$ . USING$(,[,]...]) * done -F00:9148 -F00:9149 -F00:9150 ************************************************************************************* -F00:9151 -F00:9152 END code_start -F00:9153 -F00:9154 ************************************************************************************* -F00:9155 - - -Sections: -S01 seg0 -S02 segc000 - - -Sources: -F00 basic68k.asm -F01 basic68k.inc - - -Symbols: -LAB_NI EXPR(62178=0xf2e2) ABS -LAB_FO EXPR(62171=0xf2db) ABS -LAB_AD EXPR(62163=0xf2d3) ABS -LAB_WD EXPR(62146=0xf2c2) ABS -LAB_UA EXPR(62126=0xf2ae) ABS -LAB_UV EXPR(62107=0xf29b) ABS -LAB_LD EXPR(62091=0xf28b) ABS -LAB_UF EXPR(62072=0xf278) ABS -LAB_CN EXPR(62057=0xf269) ABS -LAB_ST EXPR(62038=0xf256) ABS -LAB_LS EXPR(62022=0xf246) ABS -LAB_TM EXPR(62008=0xf238) ABS -LAB_ID EXPR(61993=0xf229) ABS -LAB_D0 EXPR(61978=0xf21a) ABS -LAB_DD EXPR(61961=0xf209) ABS -LAB_BS EXPR(61948=0xf1fc) ABS -LAB_US EXPR(61928=0xf1e8) ABS -LAB_OM EXPR(61914=0xf1da) ABS -LAB_OV EXPR(61905=0xf1d1) ABS -LAB_FC EXPR(61891=0xf1c3) ABS -LAB_OD EXPR(61879=0xf1b7) ABS -LAB_RG EXPR(61858=0xf1a2) ABS -LAB_SN EXPR(61851=0xf19b) ABS -LAB_NF EXPR(61834=0xf18a) ABS -KEY_USINGS EXPR(62580=0xf474) ABS -KEY_MIDS EXPR(62412=0xf3cc) ABS -KEY_RIGHTS EXPR(62490=0xf41a) ABS -KEY_LEFTS EXPR(62374=0xf3a6) ABS -KEY_SADD EXPR(62505=0xf429) ABS -KEY_VPTR EXPR(62596=0xf484) ABS -KEY_TWOPI EXPR(62562=0xf462) ABS -KEY_PI EXPR(62447=0xf3ef) ABS -KEY_RAM EXPR(62463=0xf3ff) ABS -KEY_MIN EXPR(62417=0xf3d1) ABS -KEY_MAX EXPR(62408=0xf3c8) ABS -KEY_BITTST EXPR(62247=0xf327) ABS -KEY_BINS EXPR(62230=0xf316) ABS -KEY_HEXS EXPR(62341=0xf385) ABS -KEY_CHRS EXPR(62259=0xf333) ABS -KEY_LCASES EXPR(62362=0xf39a) ABS -KEY_UCASES EXPR(62568=0xf468) ABS -KEY_ASC EXPR(62221=0xf30d) ABS -KEY_VAL EXPR(62592=0xf480) ABS -KEY_STRS EXPR(62538=0xf44a) ABS -KEY_LEN EXPR(62380=0xf3ac) ABS -KEY_LEEK EXPR(62369=0xf3a1) ABS -KEY_DEEK EXPR(62285=0xf34d) ABS -KEY_PEEK EXPR(62442=0xf3ea) ABS -KEY_ATN EXPR(62225=0xf311) ABS -KEY_TAN EXPR(62552=0xf458) ABS -KEY_SIN EXPR(62518=0xf436) ABS -KEY_COS EXPR(62273=0xf341) ABS -KEY_EXP EXPR(62313=0xf369) ABS -KEY_LOG EXPR(62395=0xf3bb) ABS -KEY_RND EXPR(62497=0xf421) ABS -KEY_SQR EXPR(62526=0xf43e) ABS -KEY_POS EXPR(62453=0xf3f5) ABS -KEY_FRE EXPR(62323=0xf373) ABS -KEY_USR EXPR(62587=0xf47b) ABS -KEY_ABS EXPR(62214=0xf306) ABS -KEY_INT EXPR(62357=0xf395) ABS -KEY_SGN EXPR(62514=0xf432) ABS -KEY_LT EXPR(62204=0xf2fc) ABS -KEY_EQUAL EXPR(62206=0xf2fe) ABS -KEY_GT EXPR(62210=0xf302) ABS -KEY_LSHIFT EXPR(62202=0xf2fa) ABS -KEY_RSHIFT EXPR(62208=0xf300) ABS -KEY_OR EXPR(62439=0xf3e7) ABS -KEY_EOR EXPR(62310=0xf366) ABS -KEY_AND EXPR(62218=0xf30a) ABS -KEY_POWER EXPR(62619=0xf49b) ABS -KEY_DIV EXPR(62200=0xf2f8) ABS -KEY_MULT EXPR(62194=0xf2f2) ABS -KEY_MINUS EXPR(62198=0xf2f6) ABS -KEY_PLUS EXPR(62196=0xf2f4) ABS -KEY_WHILE EXPR(62608=0xf490) ABS -KEY_UNTIL EXPR(62575=0xf46f) ABS -KEY_STEP EXPR(62530=0xf442) ABS -KEY_NOT EXPR(62429=0xf3dd) ABS -KEY_THEN EXPR(62556=0xf45c) ABS -KEY_SPC EXPR(62522=0xf43a) ABS -KEY_FN EXPR(62321=0xf371) ABS -KEY_TO EXPR(62560=0xf460) ABS -KEY_ELSE EXPR(62303=0xf35f) ABS -KEY_TAB EXPR(62548=0xf454) ABS -KEY_BITCLR EXPR(62235=0xf31b) ABS -KEY_BITSET EXPR(62241=0xf321) ABS -KEY_SWAP EXPR(62543=0xf44f) ABS -KEY_GET EXPR(62328=0xf378) ABS -KEY_WIDTH EXPR(62613=0xf495) ABS -KEY_NEW EXPR(62422=0xf3d6) ABS -KEY_CLEAR EXPR(62264=0xf338) ABS -KEY_LIST EXPR(62387=0xf3b3) ABS -KEY_CONT EXPR(62269=0xf33d) ABS -KEY_PRINT EXPR(62457=0xf3f9) ABS -KEY_LOOP EXPR(62403=0xf3c3) ABS -KEY_DO EXPR(62300=0xf35c) ABS -KEY_CALL EXPR(62255=0xf32f) ABS -KEY_LOKE EXPR(62399=0xf3bf) ABS -KEY_DOKE EXPR(62296=0xf358) ABS -KEY_POKE EXPR(62449=0xf3f1) ABS -KEY_DEF EXPR(62290=0xf352) ABS -KEY_SAVE EXPR(62510=0xf42e) ABS -KEY_LOAD EXPR(62391=0xf3b7) ABS -KEY_WAIT EXPR(62604=0xf48c) ABS -KEY_INC EXPR(62349=0xf38d) ABS -KEY_NULL EXPR(62432=0xf3e0) ABS -KEY_ON EXPR(62437=0xf3e5) ABS -KEY_STOP EXPR(62534=0xf446) ABS -KEY_REM EXPR(62474=0xf40a) ABS -KEY_RETURN EXPR(62484=0xf414) ABS -KEY_GOSUB EXPR(62335=0xf37f) ABS -KEY_RESTORE EXPR(62477=0xf40d) ABS -KEY_IF EXPR(62347=0xf38b) ABS -KEY_RUN EXPR(62501=0xf425) ABS -KEY_GOTO EXPR(62331=0xf37b) ABS -KEY_DEC EXPR(62282=0xf34a) ABS -KEY_LET EXPR(62384=0xf3b0) ABS -KEY_READ EXPR(62470=0xf406) ABS -KEY_DIM EXPR(62293=0xf355) ABS -KEY_INPUT EXPR(62352=0xf390) ABS -KEY_DATA EXPR(62278=0xf346) ABS -KEY_NEXT EXPR(62425=0xf3d9) ABS -KEY_FOR EXPR(62318=0xf36e) ABS -KEY_END EXPR(62307=0xf363) ABS -TAB_POWR EXPR(62619=0xf49b) ABS -TAB_ASCW EXPR(62604=0xf48c) ABS -TAB_ASCV EXPR(62592=0xf480) ABS -TAB_ASCU EXPR(62568=0xf468) ABS -TAB_ASCT EXPR(62548=0xf454) ABS -TAB_ASCS EXPR(62505=0xf429) ABS -TAB_ASCR EXPR(62463=0xf3ff) ABS -TAB_ASCP EXPR(62442=0xf3ea) ABS -TAB_ASCO EXPR(62437=0xf3e5) ABS -TAB_ASCN EXPR(62422=0xf3d6) ABS -TAB_ASCM EXPR(62408=0xf3c8) ABS -TAB_ASCL EXPR(62362=0xf39a) ABS -TAB_ASCI EXPR(62347=0xf38b) ABS -TAB_ASCH EXPR(62341=0xf385) ABS -TAB_ASCG EXPR(62328=0xf378) ABS -TAB_ASCF EXPR(62318=0xf36e) ABS -TAB_ASCE EXPR(62303=0xf35f) ABS -TAB_ASCD EXPR(62278=0xf346) ABS -TAB_ASCC EXPR(62255=0xf32f) ABS -TAB_ASCB EXPR(62230=0xf316) ABS -TAB_ASCA EXPR(62214=0xf306) ABS -TAB_QEST EXPR(62212=0xf304) ABS -TAB_MORE EXPR(62208=0xf300) ABS -TAB_EQUL EXPR(62206=0xf2fe) ABS -TAB_LESS EXPR(62202=0xf2fa) ABS -TAB_SLAS EXPR(62200=0xf2f8) ABS -TAB_MNUS EXPR(62198=0xf2f6) ABS -TAB_PLUS EXPR(62196=0xf2f4) ABS -n EXPR(2=0x2) EQU -LAB_1D96 EXPR(60828=0xed9c) UNUSED ABS -TK_USINGS EXPR(228=0xe4) EQU -TK_MIDS EXPR(227=0xe3) EQU -TK_RIGHTS EXPR(226=0xe2) EQU -TK_LEFTS EXPR(225=0xe1) EQU -TK_SADD EXPR(224=0xe0) EQU -TK_VPTR EXPR(223=0xdf) EQU -TK_TWOPI EXPR(222=0xde) EQU -TK_PI EXPR(221=0xdd) EQU -TK_RAM EXPR(220=0xdc) EQU -TK_MIN EXPR(219=0xdb) EQU -TK_MAX EXPR(218=0xda) EQU -TK_BITTST EXPR(217=0xd9) EQU -TK_BINS EXPR(216=0xd8) EQU -TK_HEXS EXPR(215=0xd7) EQU -TK_CHRS EXPR(214=0xd6) EQU -TK_LCASES EXPR(213=0xd5) EQU -TK_UCASES EXPR(212=0xd4) EQU -TK_ASC EXPR(211=0xd3) EQU -TK_VAL EXPR(210=0xd2) EQU -TK_STRS EXPR(209=0xd1) EQU -TK_LEN EXPR(208=0xd0) EQU -TK_LEEK EXPR(207=0xcf) EQU -TK_DEEK EXPR(206=0xce) EQU -TK_PEEK EXPR(205=0xcd) EQU -TK_ATN EXPR(204=0xcc) EQU -TK_TAN EXPR(203=0xcb) EQU -TK_SIN EXPR(202=0xca) EQU -TK_COS EXPR(201=0xc9) EQU -TK_EXP EXPR(200=0xc8) EQU -TK_LOG EXPR(199=0xc7) EQU -TK_RND EXPR(198=0xc6) EQU -TK_SQR EXPR(197=0xc5) EQU -TK_POS EXPR(196=0xc4) EQU -TK_FRE EXPR(195=0xc3) EQU -TK_USR EXPR(194=0xc2) EQU -TK_ABS EXPR(193=0xc1) EQU -TK_INT EXPR(192=0xc0) EQU -TK_LSHIFT EXPR(187=0xbb) EQU -TK_RSHIFT EXPR(186=0xba) EQU -TK_OR EXPR(185=0xb9) EQU -TK_EOR EXPR(184=0xb8) EQU -TK_AND EXPR(183=0xb7) EQU -TK_POWER EXPR(182=0xb6) EQU -TK_DIV EXPR(181=0xb5) EQU -TK_MULT EXPR(180=0xb4) EQU -TK_WHILE EXPR(177=0xb1) EQU -TK_BITCLR EXPR(167=0xa7) EQU -TK_BITSET EXPR(166=0xa6) EQU -TK_SWAP EXPR(165=0xa5) EQU -TK_GET EXPR(164=0xa4) EQU -TK_WIDTH EXPR(163=0xa3) EQU -TK_NEW EXPR(162=0xa2) EQU -TK_CLEAR EXPR(161=0xa1) EQU -TK_LIST EXPR(160=0xa0) EQU -TK_CONT EXPR(159=0x9f) EQU -TK_PRINT EXPR(158=0x9e) EQU -TK_LOOP EXPR(157=0x9d) EQU -TK_CALL EXPR(155=0x9b) EQU -TK_LOKE EXPR(154=0x9a) EQU -TK_DOKE EXPR(153=0x99) EQU -TK_POKE EXPR(152=0x98) EQU -TK_DEF EXPR(151=0x97) EQU -TK_SAVE EXPR(150=0x96) EQU -TK_LOAD EXPR(149=0x95) EQU -TK_WAIT EXPR(148=0x94) EQU -TK_INC EXPR(147=0x93) EQU -TK_NULL EXPR(146=0x92) EQU -TK_ON EXPR(145=0x91) EQU -TK_STOP EXPR(144=0x90) EQU -TK_RESTORE EXPR(140=0x8c) EQU -TK_RUN EXPR(138=0x8a) EQU -TK_DEC EXPR(136=0x88) EQU -TK_LET EXPR(135=0x87) EQU -TK_READ EXPR(134=0x86) EQU -TK_DIM EXPR(133=0x85) EQU -TK_INPUT EXPR(132=0x84) EQU -TK_NEXT EXPR(130=0x82) EQU -TK_END EXPR(128=0x80) EQU -RTS_025 EXPR(60068=0xeaa4) ABS -LAB_CBX1 EXPR(59998=0xea5e) ABS -d1x02 EXPR(60032=0xea80) ABS -LAB_CBXN EXPR(59980=0xea4c) ABS -RTS_024 EXPR(59970=0xea42) ABS -LAB_CHX2 EXPR(59948=0xea2c) ABS -LAB_exxf EXPR(59954=0xea32) ABS -LAB_CHX1 EXPR(59912=0xea08) ABS -d1x16 EXPR(60018=0xea72) ABS -LAB_CHX3 EXPR(59940=0xea24) ABS -LAB_ISHN EXPR(59908=0xea04) ABS -LAB_CHXX EXPR(59882=0xe9ea) ABS -LAB_ret0 EXPR(59856=0xe9d0) ABS -LAB_2Y03 EXPR(59780=0xe984) ABS -LAB_2Y04 EXPR(59786=0xe98a) ABS -LAB_rtn0 EXPR(59858=0xe9d2) ABS -LAB_2Y02 EXPR(59768=0xe978) ABS -LAB_2903 EXPR(59744=0xe960) ABS -LAB_2X05 EXPR(59728=0xe950) ABS -LAB_2X03 EXPR(59700=0xe934) ABS -LAB_2X02 EXPR(59686=0xe926) ABS -LAB_2X01 EXPR(59678=0xe91e) ABS -LAB_2X04 EXPR(59706=0xe93a) ABS -LAB_2900 EXPR(59648=0xe900) ABS -LAB_2901 EXPR(59654=0xe906) ABS -LAB_28FF EXPR(59634=0xe8f2) ABS -d1x10 EXPR(60054=0xea96) ABS -LAB_2902 EXPR(59736=0xe958) ABS -LAB_28FD EXPR(59622=0xe8e6) ABS -LAB_2Y01 EXPR(59760=0xe970) ABS -LAB_CBIN EXPR(59972=0xea44) ABS -LAB_CHEX EXPR(59874=0xe9e2) ABS -LAB_2904 EXPR(59746=0xe962) ABS -LAB_289D EXPR(59594=0xe8ca) ABS -LAB_289C EXPR(59588=0xe8c4) ABS -LAB_289A EXPR(59582=0xe8be) ABS -LAB_28FE EXPR(59628=0xe8ec) ABS -LAB_TWOPI EXPR(59524=0xe884) ABS -LAB_PI EXPR(59508=0xe874) ABS -LAB_RAM EXPR(59498=0xe86a) ABS -LAB_VARCALL EXPR(59484=0xe85c) UNUSED ABS -LAB_VARPTR EXPR(59482=0xe85a) ABS -LAB_SQNA EXPR(59466=0xe84a) ABS -LAB_SQNS EXPR(59444=0xe834) ABS -LAB_SQE1 EXPR(59420=0xe81c) ABS -LAB_SQE2 EXPR(59426=0xe822) ABS -LAB_SQR EXPR(59384=0xe7f8) ABS -RTS_023 EXPR(59382=0xe7f6) ABS -LAB_WDLP EXPR(59358=0xe7de) ABS -LAB_SVTB EXPR(59338=0xe7ca) ABS -WExit EXPR(59342=0xe7ce) ABS -LAB_NSTT EXPR(59288=0xe798) ABS -LAB_TBSZ EXPR(59306=0xe7aa) ABS -LAB_WDTH EXPR(59256=0xe778) ABS -LAB_MMEC EXPR(59188=0xe734) ABS -LAB_MINN EXPR(59178=0xe72a) ABS -LAB_MIN EXPR(59166=0xe71e) ABS -LAB_PHFA EXPR(59202=0xe742) ABS -LAB_MAXN EXPR(59156=0xe714) ABS -LAB_MAX EXPR(59144=0xe708) ABS -LAB_FB95 EXPR(59132=0xe6fc) ABS -LAB_FBA0 EXPR(59104=0xe6e0) ABS -RTS_022 EXPR(59114=0xe6ea) ABS -NextH1 EXPR(59052=0xe6ac) ABS -LAB_HEXS EXPR(59036=0xe69c) ABS -GoPr EXPR(59032=0xe698) ABS -BinPr EXPR(59022=0xe68e) ABS -NextB2 EXPR(59008=0xe680) ABS -EndBHS EXPR(58984=0xe668) ABS -NextB1 EXPR(58970=0xe65a) ABS -LAB_BINS EXPR(58954=0xe64a) ABS -LAB_P01E EXPR(58944=0xe640) ABS -LAB_P018 EXPR(58932=0xe634) ABS -LAB_P010 EXPR(58906=0xe61a) ABS -LAB_P00E EXPR(58902=0xe616) ABS -LAB_P00C EXPR(58890=0xe60a) ABS -LAB_P008 EXPR(58882=0xe602) ABS -LAB_P01A EXPR(58936=0xe638) ABS -LAB_P004 EXPR(58860=0xe5ec) ABS -LAB_D00E EXPR(58830=0xe5ce) ABS -LAB_D00A EXPR(58814=0xe5be) ABS -LAB_D002 EXPR(58798=0xe5ae) ABS -LAB_U04C EXPR(58732=0xe56c) ABS -LAB_U048 EXPR(58672=0xe530) ABS -LAB_U046 EXPR(58670=0xe52e) ABS -LAB_U044 EXPR(58630=0xe506) ABS -LAB_U04A EXPR(58682=0xe53a) ABS -LAB_U040 EXPR(58614=0xe4f6) ABS -LAB_U038 EXPR(58576=0xe4d0) ABS -LAB_U034 EXPR(58562=0xe4c2) ABS -LAB_U02E EXPR(58536=0xe4a8) ABS -LAB_U030 EXPR(58540=0xe4ac) ABS -LAB_U03C EXPR(58584=0xe4d8) ABS -LAB_U036 EXPR(58568=0xe4c8) ABS -LAB_U02C EXPR(58518=0xe496) ABS -LAB_U02B EXPR(58512=0xe490) ABS -LAB_U03E EXPR(58590=0xe4de) ABS -LAB_U02A EXPR(58488=0xe478) ABS -LAB_U026 EXPR(58478=0xe46e) ABS -LAB_U020 EXPR(58456=0xe458) ABS -LAB_U01C EXPR(58444=0xe44c) ABS -LAB_U022 EXPR(58462=0xe45e) ABS -LAB_U018 EXPR(58422=0xe436) ABS -LAB_U014 EXPR(58414=0xe42e) ABS -LAB_U00E EXPR(58392=0xe418) ABS -LAB_U00F EXPR(58404=0xe424) ABS -LAB_U00D EXPR(58374=0xe406) ABS -LAB_U00C EXPR(58370=0xe402) ABS -LAB_U00B EXPR(58350=0xe3ee) ABS -LAB_U00A EXPR(58340=0xe3e4) ABS -LAB_U009 EXPR(58332=0xe3dc) ABS -LAB_U008 EXPR(58298=0xe3ba) ABS -LAB_U010 EXPR(58408=0xe428) ABS -LAB_U006 EXPR(58278=0xe3a6) ABS -LAB_U005 EXPR(58276=0xe3a4) ABS -LAB_DupFmt EXPR(58774=0xe596) ABS -LAB_P_10 EXPR(60342=0xebb6) ABS -LAB_U004 EXPR(58260=0xe394) ABS -LAB_ProcFo EXPR(58836=0xe5d4) ABS -LAB_U002 EXPR(58174=0xe33e) ABS -LAB_USINGS EXPR(58132=0xe314) ABS -ofchr EXPR(35=0x23) EQU -fend EXPR(8=0x8) EQU -fsdc EXPR(10=0xa) EQU -fsdpi EXPR(8=0x8) EQU -fsli EXPR(6=0x6) EQU -fsti EXPR(4=0x4) EQU -fsd EXPR(0=0x0) EQU -LAB_BTST EXPR(58086=0xe2e6) ABS -LAB_BITCLR EXPR(58070=0xe2d6) ABS -LAB_BITSET EXPR(58054=0xe2c6) ABS -LAB_CATN EXPR(57978=0xe27a) ABS -LAB_ATNP EXPR(57966=0xe26e) ABS -LAB_ATCD EXPR(57972=0xe274) ABS -TAB_ATNC EXPR(60708=0xed24) ABS -LAB_ATGO EXPR(57906=0xe232) ABS -LAB_ATLE EXPR(57936=0xe250) ABS -RTS_021 EXPR(58052=0xe2c4) ABS -LAB_ATN EXPR(57876=0xe214) ABS -subexit EXPR(57864=0xe208) ABS -nexta EXPR(57840=0xe1f0) ABS -subloop EXPR(57814=0xe1d6) ABS -mainloop EXPR(57822=0xe1de) ABS -LAB_LTPT EXPR(57798=0xe1c6) ABS -LAB_LTPF EXPR(57786=0xe1ba) ABS -outloop EXPR(57854=0xe1fe) ABS -LAB_CORD EXPR(57772=0xe1ac) ABS -LAB_SCL0 EXPR(57762=0xe1a2) ABS -TAB_SNCO EXPR(60580=0xeca4) ABS -LAB_SCZE EXPR(57748=0xe194) ABS -LAB_COS EXPR(57660=0xe13c) ABS -LAB_SIN EXPR(57684=0xe154) ABS -LAB_TAN EXPR(57626=0xe11a) ABS -Ninc1 EXPR(57604=0xe104) ABS -Ninc0 EXPR(57598=0xe0fe) ABS -NextPRN EXPR(57590=0xe0f6) ABS -LAB_EXAD EXPR(57564=0xe0dc) ABS -LAB_EXNN EXPR(57518=0xe0ae) ABS -LAB_EXRN EXPR(57524=0xe0b4) ABS -LAB_EXPL EXPR(57512=0xe0a8) ABS -LAB_EXCC EXPR(57538=0xe0c2) ABS -KFCTSEED EXPR(-425471728=0xe6a3d110) EQU -LAB_ESML EXPR(57426=0xe052) ABS -LAB_EXPS EXPR(57350=0xe006) ABS -LAB_EXCM EXPR(57332=0xdff4) ABS -LAB_EXOL EXPR(57284=0xdfc4) ABS -LAB_EXOF EXPR(57262=0xdfae) ABS -LAB_EXOU EXPR(57242=0xdf9a) ABS -LAB_EX1 EXPR(57226=0xdf8a) ABS -RTS_020 EXPR(57224=0xdf88) ABS -LAB_GTHAN EXPR(57212=0xdf7c) ABS -LAB_EXP EXPR(57294=0xdfce) ABS -LAB_POWP EXPR(57162=0xdf4a) ABS -LAB_POWER EXPR(57112=0xdf18) ABS -LAB_POON EXPR(57084=0xdefc) ABS -LAB_27F2 EXPR(57080=0xdef8) ABS -LAB_27F3 EXPR(57082=0xdefa) ABS -LAB_27F1 EXPR(57074=0xdef2) ABS -LAB_2A91 EXPR(57048=0xded8) ABS -LAB_2A74 EXPR(57010=0xdeb2) ABS -LAB_2A68 EXPR(56998=0xdea6) ABS -LAB_2A8C EXPR(57042=0xded2) ABS -LAB_2A58 EXPR(56974=0xde8e) ABS -LAB_2A4B EXPR(56954=0xde7a) ABS -LAB_2A9B EXPR(61276=0xef5c) ABS -LAB_2A3B EXPR(56940=0xde6c) ABS -LAB_2A21 EXPR(56908=0xde4c) ABS -LAB_2A1A EXPR(56900=0xde44) ABS -LAB_2A18 EXPR(56898=0xde42) ABS -LAB_29FD EXPR(56882=0xde32) ABS -LAB_2A9A EXPR(61248=0xef40) ABS -LAB_29FB EXPR(56874=0xde2a) ABS -LAB_29F7 EXPR(56870=0xde26) ABS -LAB_29E4 EXPR(56850=0xde12) ABS -LAB_29D9 EXPR(56832=0xde00) ABS -LAB_29B7 EXPR(56768=0xddc0) ABS -LAB_29C0 EXPR(56782=0xddce) ABS -LAB_29A7 EXPR(56744=0xdda8) ABS -LAB_29C3 EXPR(56806=0xdde6) ABS -LAB_27F0 EXPR(57052=0xdedc) ABS -LAB_29B9 EXPR(56664=0xdd58) ABS -LAB_299C EXPR(56704=0xdd80) ABS -LAB_2A89 EXPR(57038=0xdece) ABS -LAB_2989 EXPR(56620=0xdd2c) ABS -LAB_2978 EXPR(56604=0xdd1c) ABS -LAB_296A EXPR(56566=0xdcf6) ABS -LAB_2968 EXPR(56538=0xdcda) ABS -LAB_2969 EXPR(56556=0xdcec) ABS -LAB_2967 EXPR(56530=0xdcd2) ABS -Bin2dec EXPR(60070=0xeaa6) ABS -LAB_LMSG EXPR(62636=0xf4ac) ABS -LAB_POZE EXPR(57100=0xdf0c) ABS -LAB_IRTS EXPR(56504=0xdcb8) ABS -LAB_INT EXPR(56480=0xdca0) ABS -LAB_284L EXPR(56462=0xdc8e) ABS -LAB_284H EXPR(56472=0xdc98) ABS -LAB_284G EXPR(56454=0xdc86) ABS -LAB_284J EXPR(56474=0xdc9a) ABS -LAB_282E EXPR(56414=0xdc5e) UNUSED ABS -LAB_282F EXPR(56416=0xdc60) ABS -LAB_2828 EXPR(56408=0xdc58) ABS -LAB_ABS EXPR(56368=0xdc30) ABS -LAB_SGN EXPR(56350=0xdc1e) ABS -LAB_27D0 EXPR(56338=0xdc12) ABS -LAB_27CE EXPR(56334=0xdc0e) ABS -LAB_27CA EXPR(56326=0xdc06) ABS -RTS_017 EXPR(56324=0xdc04) ABS -LAB_27C3 EXPR(56310=0xdbf6) ABS -LAB_27C4 EXPR(56320=0xdc00) ABS -LAB_27BA EXPR(56282=0xdbda) ABS -LAB_277C EXPR(56232=0xdba8) ABS -LAB_NB1T EXPR(56196=0xdb84) ABS -LAB_REMM EXPR(56164=0xdb64) ABS -L_DDIV EXPR(56172=0xdb6c) ABS -LAB_LT_1 EXPR(56140=0xdb4c) ABS -LAB_XDIV EXPR(56102=0xdb26) ABS -LAB_SET1 EXPR(56086=0xdb16) ABS -L_DIVRND EXPR(56090=0xdb1a) ABS -LAB_DIVX EXPR(56078=0xdb0e) ABS -LAB_3216 EXPR(56128=0xdb40) ABS -LAB_32_16 EXPR(56126=0xdb3e) ABS -AC1gtAC2 EXPR(56054=0xdaf6) ABS -LAB_MAN1 EXPR(56114=0xdb32) ABS -LAB_DIV0 EXPR(56120=0xdb38) ABS -LAB_MUEX EXPR(55980=0xdaac) ABS -LAB_MUF3 EXPR(55976=0xdaa8) ABS -LAB_MUF2 EXPR(55954=0xda92) ABS -LAB_MUF1 EXPR(55944=0xda88) UNUSED ABS -LAB_MADD EXPR(55902=0xda5e) ABS -LAB_MNOC EXPR(55896=0xda58) ABS -LAB_MUUF EXPR(55986=0xdab2) ABS -LAB_LOWZ EXPR(55856=0xda30) ABS -LAB_MULTIPLY EXPR(55858=0xda32) ABS -LAB_LONE EXPR(55798=0xd9f6) ABS -LAB_LOXP EXPR(55788=0xd9ec) ABS -LAB_LOXO EXPR(55804=0xd9fc) ABS -LAB_LOCX EXPR(55770=0xd9da) ABS -LAB_LOLP EXPR(55752=0xd9c8) ABS -LAB_LAAD EXPR(55736=0xd9b8) ABS -LAB_LOCC EXPR(55742=0xd9be) ABS -TAB_HTHET EXPR(60836=0xeda4) ABS -LAB_DIVIDE EXPR(55998=0xdabe) ABS -LAB_LONN EXPR(55774=0xd9de) ABS -LAB_LOG EXPR(55616=0xd940) ABS -LAB_24D7 EXPR(55602=0xd932) ABS -LAB_24D6 EXPR(55588=0xd924) ABS -LAB_24D8 EXPR(55608=0xd938) ABS -LAB_24D9 EXPR(55576=0xd918) ABS -LAB_24DA EXPR(55614=0xd93e) ABS -LAB_24D5 EXPR(55562=0xd90a) ABS -LAB_24B4 EXPR(55540=0xd8f4) ABS -LAB_24F7 EXPR(55524=0xd8e4) ABS -LAB_24F8 EXPR(55530=0xd8ea) ABS -LAB_2468 EXPR(55494=0xd8c6) ABS -LAB_2467 EXPR(55490=0xd8c2) ABS -LAB_249C EXPR(55476=0xd8b4) ABS -LAB_24A8 EXPR(55498=0xd8ca) ABS -RTS_016 EXPR(55528=0xd8e8) ABS -LAB_SUBTRACT EXPR(55420=0xd87c) ABS -LAB_2445 EXPR(55410=0xd872) ABS -LAB_2441 EXPR(55406=0xd86e) ABS -LAB_WAIT EXPR(55384=0xd858) ABS -LAB_CALL EXPR(55374=0xd84e) ABS -LAB_SAVE EXPR(55370=0xd84a) ABS -LAB_LOAD EXPR(55366=0xd846) ABS -LAB_USR EXPR(55358=0xd83e) ABS -LAB_SWAP EXPR(55312=0xd810) ABS -RTS_015 EXPR(55310=0xd80e) ABS -LAB_LOKE EXPR(55292=0xd7fc) ABS -LAB_DOKE EXPR(55286=0xd7f6) ABS -LAB_LEEK EXPR(55266=0xd7e2) ABS -LAB_DEEK EXPR(55244=0xd7cc) ABS -LAB_POKE EXPR(55238=0xd7c6) ABS -LAB_PEEK EXPR(55226=0xd7ba) ABS -LAB_XGADW EXPR(55198=0xd79e) ABS -LAB_GEAD EXPR(55204=0xd7a4) ABS -LAB_GADW EXPR(55172=0xd784) ABS -LAB_GADB EXPR(55152=0xd770) ABS -LAB_VALZ EXPR(55146=0xd76a) ABS -LAB_VAL EXPR(55106=0xd742) ABS -LAB_ASC EXPR(55046=0xd706) ABS -LAB_LENS EXPR(55038=0xd6fe) ABS -LAB_SADD EXPR(55014=0xd6e6) ABS -NoLcase EXPR(55004=0xd6dc) ABS -UC_loop EXPR(54986=0xd6ca) ABS -LAB_UCASE EXPR(54964=0xd6b4) ABS -NoUcase EXPR(54956=0xd6ac) ABS -LC_loop EXPR(54938=0xd69a) ABS -NoString EXPR(55010=0xd6e2) ABS -LAB_LCASE EXPR(54916=0xd684) ABS -LAB_2368 EXPR(54908=0xd67c) ABS -LAB_2358 EXPR(54876=0xd65c) ABS -LAB_MIDS EXPR(54848=0xd640) ABS -LAB_2316 EXPR(54818=0xd622) UNUSED ABS -LAB_RIGHT EXPR(54800=0xd610) ABS -LAB_2317 EXPR(54820=0xd624) ABS -LAB_231C EXPR(54824=0xd628) ABS -LAB_LEFT EXPR(54780=0xd5fc) ABS -LAB_MKCHR EXPR(54768=0xd5f0) UNUSED ABS -LAB_CHRS EXPR(54764=0xd5ec) ABS -LAB_22E6 EXPR(54754=0xd5e2) ABS -LAB_22BD EXPR(54728=0xd5c8) ABS -LAB_22A0 EXPR(54700=0xd5ac) ABS -RTS_013 EXPR(54712=0xd5b8) ABS -LAB_229E EXPR(54688=0xd5a0) ABS -LAB_224E EXPR(54620=0xd55c) ABS -LAB_2212 EXPR(54592=0xd540) ABS -RTS_012 EXPR(54596=0xd544) ABS -LAB_2216 EXPR(54530=0xd502) ABS -LAB_2240 EXPR(54538=0xd50a) ABS -LAB_21D1 EXPR(54546=0xd512) ABS -LAB_21C2 EXPR(54490=0xd4da) ABS -LAB_21C4 EXPR(54494=0xd4de) ABS -LAB_2183 EXPR(54468=0xd4c4) ABS -LAB_218B EXPR(54476=0xd4cc) ABS -LAB_217E EXPR(54442=0xd4aa) ABS -LAB_218F EXPR(54478=0xd4ce) ABS -LAB_2206 EXPR(54552=0xd518) ABS -LAB_2161 EXPR(54424=0xd498) ABS -LAB_2176 EXPR(54430=0xd49e) ABS -LAB_214B EXPR(54404=0xd484) ABS -LAB_2137 EXPR(54372=0xd464) ABS -LAB_2117 EXPR(54342=0xd446) ABS -LAB_2128 EXPR(54368=0xd460) ABS -LAB_20E0 EXPR(54286=0xd40e) ABS -LAB_20D8 EXPR(54278=0xd406) ABS -LAB_20CB EXPR(54248=0xd3e8) ABS -LAB_20D0 EXPR(54256=0xd3f0) ABS -LAB_20BE EXPR(54232=0xd3d8) ABS -LAB_STRS EXPR(54218=0xd3ca) ABS -LAB_2778 EXPR(56230=0xdba6) ABS -LAB_2044 EXPR(54194=0xd3b2) ABS -LAB_204T EXPR(54192=0xd3b0) ABS -LAB_2045 EXPR(54204=0xd3bc) ABS -LAB_204S EXPR(54146=0xd382) ABS -LAB_2043 EXPR(54144=0xd380) ABS -LAB_DEF EXPR(53994=0xd2ea) ABS -LAB_POS EXPR(53972=0xd2d4) ABS -LAB_24D0 EXPR(55552=0xd900) ABS -LAB_1FB4 EXPR(53932=0xd2ac) ABS -LAB_FRE EXPR(53922=0xd2a2) ABS -LAB_1F6B EXPR(53880=0xd278) ABS -LAB_1F6A EXPR(53868=0xd26c) ABS -LAB_1F5A EXPR(53828=0xd244) ABS -LAB_1F2C EXPR(53814=0xd236) ABS -RTS_011 EXPR(53884=0xd27c) ABS -LAB_1F07 EXPR(53782=0xd216) ABS -LAB_1ED8 EXPR(53764=0xd204) ABS -LAB_GARB EXPR(54394=0xd47a) ABS -LAB_1ED6 EXPR(53750=0xd1f6) ABS -LAB_1F7C EXPR(53886=0xd27e) ABS -LAB_1EC0 EXPR(53706=0xd1ca) ABS -LAB_1EDF EXPR(53694=0xd1be) ABS -LAB_1F28 EXPR(53808=0xd230) ABS -LAB_1E8D EXPR(53638=0xd186) ABS -LAB_1EA1 EXPR(53666=0xd1a2) ABS -LAB_1E5C EXPR(53610=0xd16a) ABS -LAB_1E1F EXPR(53552=0xd130) ABS -LAB_EVPI EXPR(53500=0xd0fc) ABS -LAB_EVIN EXPR(53492=0xd0f4) ABS -LAB_1DE6 EXPR(53480=0xd0e8) ABS -LAB_1DB1 EXPR(53426=0xd0b2) ABS -LAB_1DB2 EXPR(53430=0xd0b6) ABS -LAB_1DB0 EXPR(53422=0xd0ae) ABS -LAB_1DAE EXPR(53396=0xd094) ABS -LAB_1DAC EXPR(53394=0xd092) ABS -LAB_1DAF EXPR(53408=0xd0a0) ABS -LAB_1D98 EXPR(53368=0xd078) UNUSED ABS -LAB_1D94 EXPR(53358=0xd06e) ABS -LAB_1DD7 EXPR(53454=0xd0ce) ABS -LAB_1D5D EXPR(53332=0xd054) ABS -LAB_1D5E EXPR(53338=0xd05a) ABS -LAB_1D4A EXPR(53308=0xd03c) ABS -LAB_1E17 EXPR(53546=0xd12a) ABS -LAB_1D4B EXPR(53324=0xd04c) ABS -LAB_1D49 EXPR(53304=0xd038) ABS -LAB_1D48 EXPR(53296=0xd030) ABS -LAB_1D45 EXPR(53276=0xd01c) ABS -LAB_1D44 EXPR(53260=0xd00c) ABS -LAB_1D2E EXPR(53232=0xcff0) ABS -LAB_1D2D EXPR(53220=0xcfe4) ABS -LAB_1D12 EXPR(53202=0xcfd2) ABS -LAB_FVAR EXPR(53190=0xcfc6) ABS -LAB_1D8A EXPR(53176=0xcfb8) ABS -LAB_CAUC EXPR(53166=0xcfae) UNUSED ABS -LAB_1D83 EXPR(53182=0xcfbe) ABS -LAB_CASC EXPR(53160=0xcfa8) ABS -LAB_EVBY EXPR(55070=0xd71e) ABS -Not2Big EXPR(53130=0xcf8a) ABS -LAB_RSHIFT EXPR(53110=0xcf76) ABS -TooBig EXPR(53136=0xcf90) ABS -NoShift EXPR(53106=0xcf72) ABS -GetPair EXPR(53142=0xcf96) ABS -LAB_LSHIFT EXPR(53094=0xcf66) ABS -LAB_1D10 EXPR(53198=0xcfce) ABS -LAB_DIM EXPR(53082=0xcf5a) ABS -LAB_1CFE EXPR(53078=0xcf56) ABS -LAB_27DB EXPR(56352=0xdc20) ABS -LAB_1CDB EXPR(53054=0xcf3e) ABS -LAB_1CE6 EXPR(53040=0xcf30) ABS -LAB_1CD6 EXPR(53038=0xcf2e) ABS -LAB_1CD4 EXPR(53030=0xcf26) ABS -LAB_1CD5 EXPR(53036=0xcf2c) ABS -LAB_1CB5 EXPR(53020=0xcf1c) ABS -LAB_22BA EXPR(54718=0xd5be) ABS -LAB_1CF2 EXPR(53056=0xcf40) ABS -LAB_1CAE EXPR(52990=0xcefe) ABS -LAB_LTHAN EXPR(52978=0xcef2) ABS -LAB_EQUAL EXPR(52968=0xcee8) ABS -LAB_279B EXPR(56268=0xdbcc) ABS -LAB_EVIR EXPR(53508=0xd104) ABS -LAB_AND EXPR(52946=0xced2) ABS -LAB_OR EXPR(52938=0xceca) ABS -GetFirst EXPR(52954=0xceda) ABS -LAB_EOR EXPR(52930=0xcec2) ABS -LAB_BHCB EXPR(52920=0xceb8) ABS -LAB_2831 EXPR(56420=0xdc64) ABS -LAB_BHSS EXPR(52882=0xce92) ABS -LAB_GTWO EXPR(55086=0xd72e) ABS -LAB_LRMS EXPR(52848=0xce70) ABS -LAB_PPBI EXPR(52838=0xce66) ABS -LAB_PPFN EXPR(52824=0xce58) ABS -LAB_PPFS EXPR(52810=0xce4a) ABS -LAB_1C2A EXPR(52822=0xce56) ABS -LAB_FTPP EXPR(61044=0xee74) ABS -LAB_FTBL EXPR(61120=0xeec0) ABS -TK_SGN EXPR(191=0xbf) EQU -LAB_201E EXPR(54066=0xd332) ABS -TK_FN EXPR(171=0xab) EQU -LAB_1BE7 EXPR(52760=0xce18) ABS -TK_NOT EXPR(174=0xae) EQU -LAB_AYFC EXPR(53944=0xd2b8) ABS -LAB_1C1A EXPR(52728=0xcdf8) ABS -LAB_1C13 EXPR(52702=0xcdde) ABS -LAB_1C11 EXPR(52696=0xcdd8) ABS -RTS_001 EXPR(52694=0xcdd6) ABS -LAB_SCGB EXPR(52652=0xcdac) ABS -LAB_1BFB EXPR(52648=0xcda8) ABS -LAB_1BF7 EXPR(52644=0xcda4) ABS -LAB_1C18 EXPR(52708=0xcde4) ABS -LAB_1BF3 EXPR(52638=0xcd9e) ABS -LAB_1BD0 EXPR(52734=0xcdfe) ABS -LAB_1B84 EXPR(52538=0xcd3a) ABS -LAB_1B9D EXPR(52578=0xcd62) ABS -TK_LT EXPR(190=0xbe) EQU -LAB_1B86 EXPR(52542=0xcd3e) ABS -LAB_1B7B EXPR(52526=0xcd2e) ABS -LAB_1B3C EXPR(52510=0xcd1e) ABS -LAB_1B1D EXPR(52464=0xccf0) ABS -LAB_1B1C EXPR(52462=0xccee) ABS -LAB_1B7D EXPR(52528=0xcd30) ABS -LAB_1B13 EXPR(52446=0xccde) ABS -LAB_224D EXPR(54598=0xd546) ABS -LAB_1B0B EXPR(52438=0xccd6) ABS -TK_PLUS EXPR(178=0xb2) EQU -LAB_1B78 EXPR(52522=0xcd2a) ABS -LAB_1B2A EXPR(52482=0xcd02) ABS -LAB_1AE0 EXPR(52390=0xcca6) ABS -LAB_1AFA EXPR(52416=0xccc0) ABS -TK_GT EXPR(188=0xbc) EQU -LAB_1ADE EXPR(52368=0xcc90) ABS -LAB_1ADB EXPR(52364=0xcc8c) ABS -LAB_GVAL EXPR(52584=0xcd68) ABS -LAB_OPPT EXPR(61196=0xef0c) ABS -LAB_1B43 EXPR(52324=0xcc64) ABS -LAB_1ACD EXPR(52352=0xcc80) ABS -LAB_EVEZ EXPR(52316=0xcc5c) ABS -LAB_1ABA EXPR(52308=0xcc54) ABS -LAB_1A9B EXPR(52266=0xcc2a) ABS -LAB_1A90 EXPR(52252=0xcc1c) ABS -LAB_27FA EXPR(56376=0xdc38) ABS -LAB_1C19 EXPR(52712=0xcde8) ABS -LAB_11A5 EXPR(52140=0xcbac) ABS -LAB_11A6 EXPR(52142=0xcbae) ABS -LAB_11BD EXPR(52154=0xcbba) ABS -LAB_1A46 EXPR(52126=0xcb9e) ABS -LAB_NEXT EXPR(52108=0xcb8c) ABS -LAB_IMSG EXPR(62646=0xf4b6) ABS -LAB_1A1B EXPR(52100=0xcb84) ABS -LAB_1A0E EXPR(52094=0xcb7e) ABS -LAB_19F6 EXPR(52064=0xcb60) ABS -LAB_1C01 EXPR(52656=0xcdb0) ABS -LAB_1A03 EXPR(52078=0xcb6e) ABS -LAB_19C2 EXPR(52012=0xcb2c) ABS -LAB_2887 EXPR(59540=0xe894) ABS -LAB_19B6 EXPR(51996=0xcb1c) ABS -LAB_20B4 EXPR(54226=0xd3d2) ABS -LAB_1999 EXPR(51962=0xcafa) ABS -LAB_19B0 EXPR(51980=0xcb0c) ABS -LAB_1985 EXPR(51938=0xcae2) ABS -LAB_1984 EXPR(51934=0xcade) ABS -LAB_19DD EXPR(52032=0xcb40) ABS -LAB_1986 EXPR(51942=0xcae6) ABS -LAB_1961 EXPR(51902=0xcabe) UNUSED ABS -LAB_195B EXPR(51892=0xcab4) ABS -LAB_READ EXPR(51878=0xcaa6) ABS -LAB_1953 EXPR(51884=0xcaac) ABS -LAB_1BC1 EXPR(52626=0xcd92) ABS -LAB_1934 EXPR(51864=0xca98) ABS -LAB_CKRN EXPR(53984=0xd2e0) ABS -LAB_INPUT EXPR(51840=0xca80) ABS -LAB_REDO EXPR(62662=0xf4c6) ABS -LAB_1913 EXPR(51826=0xca72) ABS -LAB_1904 EXPR(51808=0xca60) ABS -LAB_1880 EXPR(51790=0xca4e) ABS -LAB_1886 EXPR(51800=0xca58) ABS -LAB_188A EXPR(51804=0xca5c) ABS -LAB_18F7 EXPR(51766=0xca36) ABS -LAB_18F0 EXPR(51752=0xca28) ABS -LAB_18F9 EXPR(51770=0xca3a) ABS -LAB_18CD EXPR(51710=0xc9fe) ABS -RTS_009 EXPR(51718=0xca06) ABS -LAB_22B6 EXPR(54714=0xd5ba) ABS -LAB_18B8 EXPR(51680=0xc9e0) ABS -LAB_SGBY EXPR(55062=0xd716) ABS -LAB_18B7 EXPR(51668=0xc9d4) ABS -LAB_1898 EXPR(51624=0xc9a8) ABS -LAB_185E EXPR(51592=0xc988) ABS -LAB_20AE EXPR(54222=0xd3ce) ABS -LAB_2970 EXPR(56588=0xdd0c) ABS -LAB_18BD EXPR(51686=0xc9e6) ABS -LAB_188B EXPR(51610=0xc99a) ABS -TK_SPC EXPR(172=0xac) EQU -LAB_18A2 EXPR(51634=0xc9b2) ABS -LAB_1831 EXPR(51528=0xc948) ABS -LAB_PRINT EXPR(51526=0xc946) ABS -LAB_182C EXPR(51522=0xc942) ABS -LAB_18C6 EXPR(51700=0xc9f4) ABS -LAB_1829 EXPR(51518=0xc93e) ABS -LAB_RTST EXPR(54292=0xd414) ABS -LAB_2115 EXPR(54318=0xd42e) ABS -LAB_NoSt EXPR(51512=0xc938) ABS -LAB_1FD0 EXPR(53976=0xd2d8) ABS -INGET EXPR(59116=0xe6ec) ABS -LAB_GETS EXPR(51494=0xc926) ABS -LAB_GET EXPR(51468=0xc90c) ABS -RTS_008 EXPR(51466=0xc90a) UNUSED ABS -LAB_1813 EXPR(51462=0xc906) ABS -LAB_20C9 EXPR(54268=0xd3fc) ABS -LAB_1810 EXPR(51440=0xc8f0) UNUSED ABS -LAB_1811 EXPR(51456=0xc900) ABS -LAB_17D6 EXPR(51422=0xc8de) ABS -LAB_17D5 EXPR(51418=0xc8da) ABS -LAB_CKTM EXPR(52294=0xcc46) ABS -TK_EQUAL EXPR(189=0xbd) EQU -LAB_SVAR EXPR(53188=0xcfc4) ABS -LAB_DECI EXPR(51374=0xc8ae) ABS -LAB_INCT EXPR(51350=0xc896) ABS -LAB_PFAC EXPR(56206=0xdb8e) ABS -LAB_ADD EXPR(55440=0xd890) ABS -LAB_INCI EXPR(51364=0xc8a4) ABS -LAB_GVAR EXPR(53192=0xcfc8) ABS -LAB_17B8 EXPR(51292=0xc85c) ABS -LAB_INC EXPR(51286=0xc856) ABS -LAB_17B7 EXPR(51296=0xc860) ABS -LAB_DEC EXPR(51280=0xc850) ABS -LAB_1785 EXPR(51230=0xc81e) ABS -LAB_1786 EXPR(51274=0xc84a) ABS -LAB_1773 EXPR(51202=0xc802) ABS -LAB_176C EXPR(51192=0xc7f8) ABS -LAB_ON EXPR(51166=0xc7de) ABS -LAB_REM EXPR(51158=0xc7d6) ABS -LAB_1756 EXPR(51142=0xc7c6) UNUSED ABS -LAB_1752 EXPR(51138=0xc7c2) ABS -LAB_1754 EXPR(51162=0xc7da) ABS -LAB_1750 EXPR(51126=0xc7b6) ABS -TK_IF EXPR(139=0x8b) EQU -TK_ELSE EXPR(169=0xa9) EQU -TK_RETURN EXPR(142=0x8e) EQU -LAB_174E EXPR(51118=0xc7ae) ABS -TK_GOTO EXPR(137=0x89) EQU -LAB_174B EXPR(51082=0xc78a) ABS -TK_THEN EXPR(173=0xad) EQU -LAB_IF EXPR(51048=0xc768) ABS -LAB_1723 EXPR(51038=0xc75e) ABS -LAB_1725 EXPR(51042=0xc762) ABS -RTS_007a EXPR(51034=0xc75a) ABS -LAB_172C EXPR(51022=0xc74e) ABS -LAB_172D EXPR(51030=0xc756) ABS -RTS_007 EXPR(51012=0xc744) ABS -LAB_RETURN EXPR(50988=0xc72c) ABS -LAB_DATA EXPR(51008=0xc740) ABS -LoopDone EXPR(50982=0xc726) ABS -DoCmp EXPR(50956=0xc70c) ABS -LAB_EVEX EXPR(52314=0xcc5a) ABS -DoRest EXPR(50936=0xc6f8) ABS -TK_UNTIL EXPR(176=0xb0) EQU -LoopAlways EXPR(50962=0xc712) ABS -LAB_LOOP EXPR(50902=0xc6d6) ABS -LAB_GOTs EXPR(50872=0xc6b8) ABS -LAB_16D0 EXPR(50884=0xc6c4) ABS -LAB_GOTO EXPR(50856=0xc6a8) ABS -TK_GOSUB EXPR(141=0x8d) EQU -LAB_GOSUB EXPR(50838=0xc696) ABS -TK_DO EXPR(156=0x9c) EQU -LAB_DO EXPR(50820=0xc684) ABS -LAB_16B0 EXPR(50848=0xc6a0) ABS -LAB_RUNn EXPR(50814=0xc67e) ABS -LAB_RUN EXPR(50800=0xc670) ABS -LAB_CONT EXPR(50770=0xc652) ABS -LAB_GTBY EXPR(55066=0xd71a) ABS -LAB_NULL EXPR(50760=0xc648) ABS -LAB_RESs EXPR(50732=0xc62c) ABS -LAB_GSCH EXPR(50744=0xc638) ABS -LAB_1624 EXPR(50752=0xc640) ABS -LAB_BMSG EXPR(62621=0xf49d) ABS -LAB_1647 EXPR(50690=0xc602) ABS -LAB_164F EXPR(50696=0xc608) ABS -LAB_STOP EXPR(50676=0xc5f4) ABS -LAB_END EXPR(50668=0xc5ec) ABS -LAB_1639 EXPR(50666=0xc5ea) ABS -LAB_163B EXPR(50678=0xc5f6) ABS -LAB_1636 EXPR(50660=0xc5e4) ABS -LAB_CTBL EXPR(60964=0xee24) ABS -TK_TAB EXPR(168=0xa8) EQU -LAB_1602 EXPR(50620=0xc5bc) ABS -RTS_006 EXPR(50758=0xc646) ABS -LAB_15D1 EXPR(50602=0xc5aa) ABS -LAB_15FF EXPR(50616=0xc5b8) ABS -LAB_15DC EXPR(50566=0xc586) ABS -LAB_15C2 EXPR(50590=0xc59e) ABS -TK_FOR EXPR(129=0x81) EQU -LAB_15B3 EXPR(50548=0xc574) ABS -TK_STEP EXPR(175=0xaf) EQU -LAB_EVNM EXPR(52290=0xcc42) ABS -LAB_CTNM EXPR(52292=0xcc44) ABS -LAB_SCCA EXPR(52658=0xcdb2) ABS -TK_TO EXPR(170=0xaa) EQU -LAB_SNBS EXPR(51014=0xc746) ABS -LAB_LET EXPR(51378=0xc8b2) ABS -LAB_FOR EXPR(50464=0xc520) ABS -LAB_1540 EXPR(50452=0xc514) ABS -LAB_KEYT EXPR(61382=0xefc6) ABS -LAB_152E EXPR(50408=0xc4e8) ABS -LAB_1519 EXPR(50396=0xc4dc) ABS -LAB_150C EXPR(50382=0xc4ce) ABS -LAB_14E2 EXPR(50368=0xc4c0) UNUSED ABS -LAB_1629 EXPR(50656=0xc5e0) ABS -LAB_IGBY EXPR(52666=0xcdba) ABS -LAB_14D4 EXPR(50340=0xc4a4) ABS -TK_MINUS EXPR(179=0xb3) EQU -LAB_14C0 EXPR(50308=0xc484) ABS -LAB_14BD EXPR(50304=0xc480) ABS -LAB_LIST EXPR(50284=0xc46c) ABS -LAB_CLEAR EXPR(50280=0xc468) ABS -LAB_RESTORE EXPR(50714=0xc61a) ABS -LAB_1480 EXPR(50246=0xc446) UNUSED ABS -LAB_147A EXPR(50220=0xc42c) ABS -RTS_005 EXPR(50278=0xc466) ABS -LAB_NEW EXPR(50200=0xc418) ABS -LAB_145E EXPR(50194=0xc412) ABS -LAB_145F EXPR(50180=0xc404) ABS -LAB_SCLN EXPR(50182=0xc406) ABS -LAB_142C EXPR(50168=0xc3f8) ABS -LAB_141B EXPR(50134=0xc3d6) ABS -LAB_1408 EXPR(50110=0xc3be) ABS -TK_REM EXPR(143=0x8f) EQU -LAB_1401 EXPR(50098=0xc3b2) ABS -TK_DATA EXPR(131=0x83) EQU -LAB_13FF EXPR(50094=0xc3ae) ABS -LAB_142A EXPR(50156=0xc3ec) ABS -LAB_1417 EXPR(50132=0xc3d4) ABS -LAB_13EA EXPR(50068=0xc394) ABS -LAB_13D8 EXPR(50056=0xc388) ABS -LAB_13D6 EXPR(50050=0xc382) ABS -TAB_STAR EXPR(62194=0xf2f2) ABS -LAB_141F EXPR(50150=0xc3e6) ABS -TAB_CHRT EXPR(61276=0xef5c) ABS -LAB_1410 EXPR(50122=0xc3ca) ABS -LAB_13AC EXPR(49968=0xc330) ABS -LAB_13CC EXPR(50016=0xc360) ABS -LAB_13C6 EXPR(50010=0xc35a) ABS -LAB_13EC EXPR(50070=0xc396) ABS -LAB_1392 EXPR(49908=0xc2f4) ABS -LAB_137F EXPR(49898=0xc2ea) ABS -LAB_138E EXPR(49904=0xc2f0) ABS -LAB_1374 EXPR(49880=0xc2d8) ABS -LAB_1866 EXPR(51596=0xc98c) ABS -LAB_1378 EXPR(49886=0xc2de) ABS -LAB_18E3 EXPR(51720=0xca08) ABS -LAB_INLN EXPR(49832=0xc2a8) ABS -LAB_1359 EXPR(49848=0xc2b8) ABS -LAB_PRNA EXPR(51722=0xca0a) ABS -LAB_134B EXPR(49812=0xc294) ABS -LAB_1477 EXPR(50214=0xc426) ABS -LAB_1330 EXPR(49784=0xc278) ABS -LAB_132E EXPR(49782=0xc276) ABS -LAB_1303 EXPR(49774=0xc26e) ABS -LAB_1301 EXPR(49744=0xc250) ABS -LAB_12FF EXPR(49742=0xc24e) ABS -LAB_1325 EXPR(49798=0xc286) ABS -LAB_12B0 EXPR(49660=0xc1fc) ABS -LAB_12AE EXPR(49658=0xc1fa) ABS -LAB_12E6 EXPR(49692=0xc21c) ABS -LAB_SSLN EXPR(50174=0xc3fe) ABS -LAB_GFPN EXPR(51218=0xc812) ABS -LAB_15F6 EXPR(50584=0xc598) ABS -LAB_13A6 EXPR(49960=0xc328) ABS -LAB_1295 EXPR(49624=0xc1d8) ABS -LAB_GBYT EXPR(52668=0xcdbc) ABS -LAB_1357 EXPR(49842=0xc2b2) ABS -LAB_127E EXPR(49604=0xc1c4) ABS -LAB_127D EXPR(49590=0xc1b6) ABS -LAB_RMSG EXPR(62680=0xf4d8) ABS -LAB_2953 EXPR(56506=0xdcba) ABS -LAB_1269 EXPR(49568=0xc1a0) ABS -LAB_EMSG EXPR(62629=0xf4a5) ABS -LAB_BAER EXPR(61786=0xf15a) ABS -LAB_1491 EXPR(50256=0xc450) ABS -LAB_NFER EXPR(49538=0xc182) ABS -LAB_SNER EXPR(49534=0xc17e) ABS -LAB_RGER EXPR(49530=0xc17a) ABS -LAB_ODER EXPR(49526=0xc176) ABS -LAB_OFER EXPR(49518=0xc16e) ABS -LAB_OMER EXPR(49514=0xc16a) ABS -LAB_USER EXPR(49510=0xc166) ABS -LAB_ABER EXPR(49506=0xc162) ABS -LAB_DDER EXPR(49502=0xc15e) ABS -LAB_DZER EXPR(49498=0xc15a) ABS -LAB_IDER EXPR(49494=0xc156) ABS -LAB_TMER EXPR(49490=0xc152) ABS -LAB_SLER EXPR(49486=0xc14e) ABS -LAB_SCER EXPR(49482=0xc14a) ABS -LAB_CCER EXPR(49478=0xc146) ABS -LAB_UFER EXPR(49474=0xc142) ABS -LAB_LDER EXPR(49470=0xc13e) ABS -LAB_UVER EXPR(49466=0xc13a) ABS -LAB_UDER EXPR(49462=0xc136) ABS -LAB_WDER EXPR(49458=0xc132) ABS -LAB_ADER EXPR(49454=0xc12e) ABS -LAB_FOER EXPR(49450=0xc12a) ABS -LAB_RND EXPR(57576=0xe0e8) ABS -LAB_1274 EXPR(49582=0xc1ae) ABS -LAB_UFAC EXPR(56178=0xdb72) ABS -LAB_RSED EXPR(60110=0xeace) ABS -LAB_18C3 EXPR(51696=0xc9f0) ABS -LAB_SMSG EXPR(62690=0xf4e2) ABS -LAB_295E EXPR(56518=0xdcc6) ABS -LAB_CRLF EXPR(51602=0xc992) ABS -LAB_1463 EXPR(50202=0xc41a) ABS -VEC_CC EXPR(59078=0xe6c6) ABS -LAB_FCER EXPR(49522=0xc172) ABS -LAB_sizok EXPR(49272=0xc078) ABS -LAB_COLD EXPR(49256=0xc068) ABS -VEC_SV EXPR(49230=0xc04e) ABS -LAB_XERR EXPR(49540=0xc184) ABS -VEC_LD EXPR(49224=0xc048) ABS -RXNOTREADY EXPR(49214=0xc03e) ABS -VEC_IN EXPR(49182=0xc01e) ABS -TXNOTREADY EXPR(49164=0xc00c) ABS -VEC_OUT EXPR(49154=0xc002) ABS -code_start EXPR(49236=0xc054) ABS -ACIA_1 EXPR(65600=0x10040) EQU -ram_size EXPR(24576=0x6000) EQU -ram_addr EXPR(8192=0x2000) EQU -prg_strt EXPR(1520=0x5f0) ABS -file_id EXPR(1516=0x5ec) UNUSED ABS -file_byte EXPR(1515=0x5eb) UNUSED ABS -ccnull EXPR(1514=0x5ea) ABS -ccbyte EXPR(1513=0x5e9) ABS -ccflag EXPR(1512=0x5e8) ABS -Iclim EXPR(1511=0x5e7) ABS -TWidth EXPR(1510=0x5e6) ABS -TPos EXPR(1509=0x5e5) ABS -Nullct EXPR(1508=0x5e4) ABS -comp_f EXPR(1507=0x5e3) ABS -TabSiz EXPR(1506=0x5e2) ABS -Cflag EXPR(1505=0x5e1) ABS -Imode EXPR(1504=0x5e0) ABS -Sufnxf EXPR(1503=0x5df) ABS -Gclctd EXPR(1502=0x5de) ABS -Oquote EXPR(1501=0x5dd) ABS -Breakf EXPR(1500=0x5dc) ABS -Dimcnt EXPR(1499=0x5db) ABS -Asrch EXPR(1498=0x5da) ABS -tpower EXPR(1497=0x5d9) ABS -prstk EXPR(1496=0x5d8) ABS -BHsend EXPR(1494=0x5d6) ABS -Hexss EXPR(1486=0x5ce) ABS -Usdss EXPR(1484=0x5cc) ABS -Decss EXPR(1478=0x5c6) ABS -Binss EXPR(1462=0x5b6) ABS -Dtypef LAB (0x5b5) EQU align=1 sec=seg0 -cosout LAB (0x5b4) EQU align=1 sec=seg0 -Defdim EXPR(1460=0x5b4) ABS -func_l EXPR(1456=0x5b0) ABS -expneg LAB (0x5af) EQU align=1 sec=seg0 -expcnt LAB (0x5ad) EQU align=1 sec=seg0 -numexp LAB (0x5ac) EQU align=1 sec=seg0 -Astrtl EXPR(1452=0x5ac) ABS -Asptl EXPR(1448=0x5a8) ABS -ut1_pl EXPR(1444=0x5a4) UNUSED ABS -PRNlword EXPR(1440=0x5a0) ABS -flag LAB (0x59f) EQU align=1 sec=seg0 -FAC_sc LAB (0x59e) EQU align=1 sec=seg0 -FAC2_s LAB (0x59d) EQU align=1 sec=seg0 -FAC2_e EXPR(1436=0x59c) ABS -FAC2_m EXPR(1432=0x598) ABS -FAC1_s LAB (0x595) EQU align=1 sec=seg0 -FAC1_e EXPR(1428=0x594) ABS -FAC1_m EXPR(1424=0x590) ABS -Ibuffe EXPR(1424=0x590) ABS -Ibuffs EXPR(1168=0x490) ABS -des_sk EXPR(1166=0x48e) ABS -des_sk_e EXPR(1142=0x476) ABS -Lvarpl EXPR(1138=0x472) ABS -Cvaral EXPR(1134=0x46e) UNUSED ABS -Varname EXPR(1130=0x46a) ABS -Rdptrl EXPR(1126=0x466) ABS -Dptrl EXPR(1122=0x462) ABS -Dlinel EXPR(1118=0x45e) ABS -Cpntrl EXPR(1114=0x45a) ABS -Blinel EXPR(1110=0x456) ABS -Clinel EXPR(1106=0x452) ABS -Sutill EXPR(1102=0x44e) ABS -Ememl EXPR(1098=0x44a) ABS -Sstorl EXPR(1094=0x446) ABS -Earryl EXPR(1090=0x442) ABS -Sarryl EXPR(1086=0x43e) ABS -Sstrl EXPR(1082=0x43a) ABS -Svarl EXPR(1078=0x436) ABS -Sfncl EXPR(1074=0x432) ABS -Smeml EXPR(1070=0x42e) ABS -Itemp EXPR(1066=0x42a) ABS -V_CTLCv EXPR(1062=0x426) UNUSED ABS -V_CTLC EXPR(1060=0x424) ABS -V_SAVEv EXPR(1056=0x420) UNUSED ABS -V_SAVE EXPR(1054=0x41e) ABS -V_LOADv EXPR(1050=0x41a) UNUSED ABS -V_LOAD EXPR(1048=0x418) ABS -V_OUTPv EXPR(1044=0x414) UNUSED ABS -V_OUTP EXPR(1042=0x412) ABS -V_INPTv EXPR(1038=0x40e) UNUSED ABS -V_INPT EXPR(1036=0x40c) ABS -Usrjpv EXPR(1032=0x408) UNUSED ABS -Usrjmp EXPR(1030=0x406) ABS -Wrmjpv EXPR(1026=0x402) ABS -LAB_WARM EXPR(1024=0x400) ABS -ram_base EXPR(1024=0x400) ABS -ram_strt EXPR(0=0x0) UNUSED ABS -nobrk EXPR(0=0x0) EQU -novar EXPR(0=0x0) EQU -__LINE__ EXPR(9152=0x23c0) INTERNAL -__FO EXPR(0=0x0) INTERNAL -__RS EXPR(0=0x0) INTERNAL -REPTN EXPR(-1=0xffffffff) INTERNAL -__VASM EXPR(1=0x1) INTERNAL - -There have been no errors. diff --git a/roms/ehbasic/basic68k.run b/roms/ehbasic/basic68k.run deleted file mode 100644 index 5ad55e8..0000000 --- a/roms/ehbasic/basic68k.run +++ /dev/null @@ -1,1026 +0,0 @@ -S00700007365673089 -S113C000605248E7408041F90001004012100801E5 -S113C010000167F8114000024CDF01024E7548E749 -S113C020408041F900010040121008010000670E31 -S113C030102800024CDF0102003C00014E754CDF69 -S113C0400102023C00FE4E757E2E600001387E2EF9 -S113C0506000013241F90001004010BC0015307C41 -S113C0602000203C00006000B0BC000040006C08D0 -S113C07070051E3C00E44E4E2648D1C02748044AB1 -S113C0804FEB0400303C4EF9204F30C043FAFFDA46 -S113C09020C930C043FA00DC20C930C043FAFF8015 -S113C0A020C930C043FAFF5C20C930C043FAFF9A6C -S113C0B020C930C043FAFF9820C930C043FA26088B -S113C0C020C97000174005E4174005E5174005E84E -S113C0D0374005EE374005D6177C005005E6177C3F -S113C0E0000E05E2177C003805E749EB048E41EBAE -S113C0F005F02748042E6100032261000896202BD6 -S113C100044A90AB042E61001BBE41FA33D6610091 -S113C11008E041FA29BA61001A5A41FA0092274804 -S113C120040261001FC44EEB04007E2C60567E2A7C -S113C13060527E28604E7E26604A7E2460467E22BF -S113C14060427E20603E7E1E603A7E1C60367E1A0F -S113C15060327E18602E7E16602A7E1460267E125F -S113C16060227E10601E7E0E601A7E0C60167E0AAF -S113C17060127E08600E7E06600A7E0460067E02FF -S113C18060027E00610002CA6100080843FA2FCCF5 -S113C1903E31700041F170006100085641FA3307E6 -S113C1A06100084E202B04526B0461001B0E41FAFF -S113C1B033286100083C72FF27410452174105DC13 -S113C1C04BEB0490610000EC61000BF267F665082C -S113C1D061000156600003C2610006386100014A33 -S113C1E0222B042A6100021865322250202B0432CB -S113C1F09089E288538048402448484034D951C843 -S113C200FFFC484051C8FFF4274A0432274A043649 -S113C210274A043A274A043E274A0442102B049032 -S113C2206764226B043245F12008274A0432274A06 -S113C2300436274A043A274A043E274A0442276B15 -S113C240044A044622099288E289538148414841BC -S113C250352151C9FFFC484151C9FFF443EB049017 -S113C260244872FF24C124EB042AE24A534234D9FD -S113C27051CAFFFC601050484A1866FC320802415B -S113C2800001D0C1228822484A9066EA61000198E0 -S113C2906000FF246100077470206100076E70085D -S113C2A061000768534160106100075E70206100FF -S113C2B0075A720041EB04904EAB040C64FA67F821 -S113C2C0B03C00076718B03C000D670006C04A4147 -S113C2D06606B03C002063E0B03C000867B6B27C60 -S113C2E000FF640C1180100052416100071E60C8F9 -S113C2F0700760F611802000524252411035100040 -S113C30067000094B03C002067EAB03C0030654A06 -S113C310B03C003963DE7ADFCA00BA3C00416540B4 -S113C320BA3C004663CE603872002401174105DD33 -S113C330700010351000675EB03C005F6458B03C7C -S113C340003C641CB03C0030644C174005DAB03C3F -S113C35000226776B03C0024679AB03C002A653618 -S113C360082B000605DD662E903C002AD04043FAD7 -S113C3702BEC303100006B6E43FA2F78D2C076FF7D -S113C38038015243103130006B0A5244B03540003A -S113C39067F06040320411802000524252414A004A -S113C3A0674A903C003A6706B03C0049660417406F -S113C3B005DD903C00556600FF78174005DA10351E -S113C3C0100067D2B02B05DA67CC118020005242EE -S113C3D0524160EA38015243103130006AF8524346 -S113C3E01031300066A21035100060AA70000102FE -S113C3F06706118020005242218020004E75206B78 -S113C400042E6002204020186708B2906EF6594846 -S113C4104E75594853804E75664C206B042E70003F -S113C42020C0274804322A6B042E534D276B044A3C -S113C4300446202B0432274004362740043A274080 -S113C440043E274004427000174005EA610001CC15 -S113C45049EB048E201F4FEB04002F00700027408F -S113C460045A174005DF4E7567C24E75651272FF98 -S113C4702741042A72004A00670AB03C00B366E60A -S113C480610003906100FF78610009326716B03CD7 -S113C49000B366D272FF2741042A6100091E6704B3 -S113C4A061000370177C000005DD610004E62018BC -S113C4B067B422406100012A2018B0AB042A62A6A6 -S113C4C048E700C0610018004CDF030070206100E1 -S113C4D0053AB03C00226604462B05DD10186608B8 -S113C4E02049200866BE4E756AE44A2B05DD6BDEE2 -S113C4F045FA2AD4727FC200E54945F21000101AA9 -S113C500610005087200121A6BD2301245FA2DE44C -S113C51045F20000101A610004F251C9FFF860BC32 -S113C52061000390202B0472B0AB043A6C00FC242D -S113C530610002142E882F2B045270AA6100087423 -S113C540610007021F2B05B5610006F82F2B05902B -S113C5503F2B0594277C800000000590377C8100E8 -S113C560059461000858B03C00AF66086100084CAF -S113C570610006D02F2B05903F2B05942F2B0472BE -S113C5803F3C00816018300DC07C0001DAC0201DE2 -S113C5906700FC1C275D045261000822611A614097 -S113C5A04A2B04526B04274D045A101D67D8B03C23 -S113C5B0003A67E46000FBC86700008C0A00008052 -S113C5C06B0002F0B03C00286400FBB44880D0400B -S113C5D041FA28523030000048700000600007DC47 -S113C5E04EEB0424B03C0003670C4E7566FC177CCC -S113C5F0000005DC66F443EB0590BBC9650A274DD2 -S113C600045A276B04520456584F102B05DC67005C -S113C610FB9E41FA2E896000FB88206B042E672064 -S113C620610001F0B2AB0452630E204D4A1866FC5F -S113C6303008C07C0001D0C06100FDCC6500FB283F -S113C6404A20274804624E75610010D0174005E463 -S113C6504E756600FB2A4A2B04526A00FAEA202B24 -S113C660045A6700FAE22A40276B045604524E75B6 -S113C670660C6100FDB2274D045A6000FF22610080 -S113C680FDAC601C2F0D2F2B04523F3C009C487ABC -S113C690FF0E600007282F0D2F2B04523F3C008D06 -S113C6A06100071A487AFEF861000168206B042EC5 -S113C6B0B2AB0452630E204D4A1866FC3008C07CAD -S113C6C00001D0C06100FD406500FA9C2A48534D2A -S113C6D0274D045A4E750C6F009C00046600FA60E6 -S113C6E01E00672EBE3C003A67289E3C00B06708D7 -S113C6F053076600FA8A7EFF610006C06100055C8C -S113C7004A2B05946706177C00FF0594BF2B0594FC -S113C7106614276F000604522A6F000A41FAFE804D -S113C7202E88600006984FEF000E601466160C6F9A -S113C730008D00046600FA445C4F275F04522A5FB0 -S113C74061042A484E75204D7222743A6008B40080 -S113C7506708B200670C101866F453484E75B200AF -S113C76067F4101866F860F2610004F06100064E88 -S113C770B03C00AD6714B03C00896600FA02204D5D -S113C780610006382A486400F9F6102B0594671EE8 -S113C790610006286500FF12B03C008E6700FE1E93 -S113C7A06100FE161015B03C00A967944E75101D6B -S113C7B076A9788B7A00101D6720B0046604524570 -S113C7C060F4B00366F051CDFFEE610005F0650042 -S113C7D0FED86000FDE44A1D66FC534D4E756100B1 -S113C7E00F3A1400610005D63F00B03C008D670885 -S113C7F0B03C00896600F98853026606301F600069 -S113C800FDBC610005B6610AB03C002C67EA301F2C -S113C8104E7572002001610005A4642E2F022401CC -S113C820D2816500F95AD2816500F954D28265003B -S113C830F94ED2816500F948903C0030D2806900FD -S113C840F93E6100057665D6241F2741042A4E75FA -S113C8503F3C8180600A3F3C810060046100055CCC -S113C860610007664A2B05B56B00F8E86636274871 -S113C8700472610012FE277C8000000005983017C6 -S113C8803740059C176B0595059EB12B059E6100ED -S113C8901000610012FA610005240C00002C67BC32 -S113C8A0544F4E754A2F00016604529060E853902D -S113C8B060E461000710274804721F2B05B570BDA2 -S113C8C0610004F061000394102B05B5175F05B5F2 -S113C8D0E31861000372670012B6246B0472206BC4 -S113C8E005902250B3EB04466516B1EB0432651093 -S113C8F0720032280004205061000B02206B059066 -S113C900B9C866025C4C24D834904E75610006B6F2 -S113C910274804724A2B05B56B0C61001DD06100D9 -S113C92009B86000126A7200204161001DC06408E9 -S113C930720161000AFA108061000ADA609C6100E9 -S113C94000B461000478674AB03C00A86764B03C56 -S113C95000AC675EB03C002C6740B03C003B670015 -S113C9600086610002F64A2B05B56BD26100139E66 -S113C97061000A5C7000102B05E6670C902C000720 -S113C980902B05E56402610A616A60B611BC00007F -S113C9901000700D6174700A6070142B05E5B42BDF -S113C9A005E7650461EC603E942B05E264FA4402F9 -S113C9B060223F0061000D60340061000400B03C5F -S113C9C000296600F7BA301FB03C00A86606942B15 -S113C9D005E5631270005300C480670A7020530297 -S113C9E0612851CAFFFC610003D26600FF5C4E75EA -S113C9F0610009DC61000BC4670C3200534110185C -S113CA00610851C9FFFA4E75703F2F01B03C0020F8 -S113CA106528122B05E66610122B05E5922B05E21C -S113CA206614174105E5600EB22B05E566082F0074 -S113CA306100FF60201F522B05E54EAB0412B03C91 -S113CA40000D66187200122B05E4670C70004EABE3 -S113CA50041251C9FFFA700D174105E5221F4E75E6 -S113CA602A5F4A2B05E06A0A276B045E04526000C1 -S113CA70F6E241FA2A526100FF782A6B045A4E7595 -S113CA806100085EB03C0022660E61000306703B44 -S113CA90610003206100FF5E6100F80E70004A101F -S113CAA0660A6000FB5E206B04627098174005E024 -S113CAB0274804666100050E274804722F0D2A6B6F -S113CAC00466610002F8661E4A2B05E06B72610081 -S113CAD0FF386100F7D44A1066046000FB262A4838 -S113CAE0534D610002D64A2B05B56A201400B03CB0 -S113CAF000226706743A702C534D524D1600204D97 -S113CB00610008D02A4A6100FDD260101F2B05B5D0 -S113CB1061001D82175F05B5610010746100029EFB -S113CB20670AB03C002C6600FF38524D274D04665E -S113CB302A5F610002886736487AFF7A60000272D1 -S113CB406100FC042A48524DB03C003A6712320D91 -S113CB50C27C0001DAC1241D6700F61C275D045E57 -S113CB606100025AB03C00836700FF7860D2206BFA -S113CB7004664A2B05E06A06274804624E754A108B -S113CB8066024E7541FA29306000FE666610584F01 -S113CB900C5700816600F5EC206F0002601C6100F8 -S113CBA00428584F303C0081721C6002DFC1B0572A -S113CBB06600F5D0B1EF000266F2376F0006059CFF -S113CBC0276F00080598176F001205B56100021A57 -S113CBD0176B059D059E102B0595B12B059E2748C7 -S113CBE0047261000CAC176F001205B561000FA050 -S113CBF0376F000C059C276F000E0598176B059D79 -S113CC00059E102B0595B12B059E6100102C322F2B -S113CC100006B1414A0067044A016A0E276F0014F6 -S113CC2004522A6F00186000F9764FEF001C61006F -S113CC30018CB03C002C6600F9666100017E610045 -S113CC40FF5E6116B040082B000705B56606650057 -S113CC50F5024E756400F4FC4E75534D7200174195 -S113CC6005B5601C41FA22A630301002487000005D -S113CC702F2B05903F2B05941F2B05E3323010001A -S113CC803F01610000E4177C000005E36100012E10 -S113CC90903C00BC652AB03C0003650A4A2B05E3BE -S113CCA06660600000867201E121102B05E3B32B5E -S113CCB005E3B02B05E36400F4C6610000FE60D018 -S113CCC04A2B05E3663CD03C000A645E66084A2BA6 -S113CCD005B56B0008727200D000D0001200301F3E -S113CCE041FA222AB070100064466100FF583F00E8 -S113CCF06100FF72301F222B05D86A223000672E94 -S113CD00603C102B05B5122B05E3D000D301177C32 -S113CD10000005B5174105E3534D723060C041FA78 -S113CD2021ECB0701000641660C472FF301F6732CB -S113CD30B07C006467046100FF0C274105D8101F14 -S113CD401200E208174005E1375F059C275F05984C -S113CD50176B059D059E102B0595B12B059EE209C9 -S113CD604E75102B05944E75615065001B284A00C2 -S113CD706B00008CB03C002467001B1AB03C0025FB -S113CD8067001B12B03C002E67001B0AB03C002257 -S113CD90660C101D204D610006362A4A4E75B03CC3 -S113CDA0002866406100FEB670296006487A096C66 -S113CDB0702CB01D67066000F3C6101D1015B03C42 -S113CDC0002067F6B03C00A9640CB03C003A64064D -S113CDD07CD0D00690064E756100FE6A7228588F8A -S113CDE06000FF0E610001E24A2B05B567000D8467 -S113CDF06A06274805904E752010600004BCB03CBC -S113CE0000B367D4B03C00B26700FF5EB03C00AE34 -S113CE106606323C002C60C6B03C00AB67000514CB -S113CE20903C00BF6500F358C07C007FD04041FABD -S113CE302090323000004870100041FA2038303021 -S113CE400000671241F000004ED06100FF584A2BE9 -S113CE5005B56A00F2FE4E756100FF4A4A2B05B51E -S113CE606B00F2F04E75177C000005B5101D4E7571 -S113CE706100FDEA4A2B05B56A00F2D8141DB43CE2 -S113CE80002C6600F2FA2F2B0590610008A2205FA7 -S113CE904E756100FDC84A2B05B56B00F2B6610002 -S113CEA00DC47200141DB43C002C660C2F006100EC -S113CEB0086A2200201F141DB43C00296600F2C039 -S113CEC04E756116B580600003F0610E80826000CB -S113CED003E86106C082600003E0610002282400C8 -S113CEE061000CEA6000021E6100021A46806000C4 -S113CEF003C86100FD52650661000D3E6042177C67 -S113CF00000005B5610006B422482200206B059894 -S113CF10610006AC240066044A8167249481670C8E -S113CF20650470FF600822007001600220025381D2 -S113CF30B30856C9FFFC6708640470FF60027001FF -S113CF40520012007001E338C02B05E167000CD2D7 -S113CF5070FF60000CCC6100FE5872FF61706100CC -S113CF60FE5C66F24E75612E6708B43C00206420B6 -S113CF70E5A060000344611E67F8B43C0020650A24 -S113CF804A806A0C70FF60000330E4A06000032A4A -S113CF9070006000032461000786140061000C2EF9 -S113CFA0610001624A024E75B03C00616410B03CFD -S113CFB00041640480404E75B03C005B4E75B03C4B -S113CFC0007B4E7561024E7572006100FDF01741E1 -S113CFD005B461D46400F1A8720041EB046A2081B5 -S113CFE0174105B5B27C000464061180100052415B -S113CFF06100FDC865EE61B065EAB03C0024660CD2 -S113D000002B0080046B6100FDB26010B03C002670 -S113D010660A002B0080046C6100FDA04A2B05DF2A -S113D020670E6A14202B046A720841EB0432601CF8 -S113D030903C0028670000F4202B046A720441EB42 -S113D0400436080000176704544158482268000455 -S113D05020506006B0986776D1C1B1C966F64A2BF4 -S113D06005DF660A45FAFF60B5D76600F0CE082BE7 -S113D070000005DF6600F0CC246B0442240A948986 -S113D080204A5881D5C1274A0442E28A6712538252 -S113D09048424842352051CAFFFC484251CAFFF475 -S113D0A04A2B05DF6B0808000017660A6004D3AB3F -S113D0B00436D3AB043AD3AB043E20C020BC0000FA -S113D0C00000080000176706317C000000042200FD -S113D0D0D2814841E219E249C23C00C0174105B57A -S113D0E0177C000005DF4E757005D02B05DBD08062 -S113D0F0D0884E756100FCC46100FB484A2B05953D -S113D1006B00F0700C2B00A0059465000B586600B2 -S113D110F0624A2B05956A000B4C202B0590448045 -S113D1206800F0502740042A4E753F2B05B4720066 -S113D1303F012F2B046A61BC48404A406600F0243A -S113D140275F046A321F301F3F2B042C3F005241DB -S113D1506100FC6AB03C002C67D6174105DB610016 -S113D160FC48375F05B4206B043E274805ACB1EB9F -S113D1700442672E2010B0AB046A670A20680004DA -S113D180D1EB05AC60E44A2B05B46600EFD2610034 -S113D190FF5850483018B02B05DB6700009460003E -S113D1A0EF924A2B05B46700EF8E6100FF3C202B01 -S113D1B0046A20C07204080000176702720627413F -S113D1C005A8122B05DB584830C1321F30C161005D -S113D1D000AE274005A8532B05DB66EED1EB05A86E -S113D1E06500EF88B1EB0446650C6100028EB1EB7B -S113D1F004466400EF76274804427000222B05A8F9 -S113D200E2895341310051C9FFFC48414A41670654 -S113D2105341484160EE206B05AC202B04429088BA -S113D220214000044A2B05B466525048375805DBA8 -S113D2307000274005A83218B2576500EF264A80CF -S113D2406702613A7200321FD081274005A8532B30 -S113D25005DB66E2177C000005B572034A2B046BFC -S113D2606A0A7205177C008005B5600C4A2B046CB1 -S113D2706A06177C004005B56104D1C04E75202BA9 -S113D28005A824004842C0C1C4C148424A426600BD -S113D290EEDAD0826500EED4D0AB05A86500EECC02 -S113D2A04E754A2B05B56A0461000310610001CC78 -S113D2B0202B044690AB0442177C000005B5377C54 -S113D2C0A0000594274005906A000636003C000142 -S113D2D06000062E102B05E5C0BC000000FF60D8DE -S113D2E04A2B04526B00EE704E7570AB6100FAC4A9 -S113D2F0177C008005DF6100FCDA274805B061E097 -S113D3000C1D00286600EE78177C007E05DF6100A6 -S113D310FCB46100FA9470BD6100FA982F2B046A82 -S113D3202F0D6100F41C206B05B0209F215F0004C9 -S113D3304E75177C008105DF6100FA806100FC9462 -S113D3401F2B05B52F080C1500286600EE3261006E -S113D350FA54205F274805B01F2B05B52028000488 -S113D3606100FCDA101FE3186100F8DC671243EB7C -S113D3700476B9C96700EDD4392800042910600285 -S113D3802F102F081F2B05B561322F0D206B05B010 -S113D3902A506100F8C66100FA246600EDE22A5FB3 -S113D3A0101F205F4A006A08209C315C0004600260 -S113D3B0209F101FE3186100F88E4E754A2B05B5A7 -S113D3C06A0007E424486000F516610009407422ED -S113D3D03602720053412448524110301000671045 -S113D3E0B0026704B00366F0B03C00226602524A01 -S113D3F0D5C1B1CB651EB1EB042E641822482001BF -S113D40066042041600E6126D1C1D3C1534011216D -S113D41051C8FFFC43EB0476B9C96700ED2E39010E -S113D4202908274C0590177C008005B54E754A41A4 -S113D430672E2F007000174005DE7001C041D041F7 -S113D440640470014840206B044691C0B1EB04426F -S113D4506512274804462748044E201F4A414E754A -S113D46030414E754A2B05DE6B00ED002F09610A31 -S113D470225F177C008005DE60CC48E7E0E0276B84 -S113D480044A0446222B044270002240206B043AD2 -S113D4905888246B043E6006617E41E8000AB1CAE4 -S113D4A065F65988246B0442602424280004D48837 -S113D4B0201008000017671430280008D040D0C09E -S113D4C041E8000A61525C48B1C266F82042B5C81E -S113D4D066D8204C45EB048E6004613C5C88B5C87A -S113D4E066F82009672C2051720032290004528109 -S113D4F0C23C00FED1C1246B0446B1CA670CE28968 -S113D5005341352051C9FFFC228A2751044660004B -S113D510FF744CDF07074E7520106728B28064241F -S113D520B0AB0446641E70FF302800044440C03C85 -S113D53000FED0AB0446B0906706221022484E7518 -S113D540274004464E75487AF7442F2B0590610016 -S113D550F8184A2B05B56A00EBFA205F226B059098 -S113D56032280004D26900046500EBE42F0861004E -S113D570FEBE27480598205730280004205061201B -S113D580206B059061386118205F6132206B05982B -S113D59022086700FE804481D2AB044E6000FE7610 -S113D5A032006714226B044E2F09534012D851C81D -S113D5B0FFFC2749044E205F4E75206B059048E719 -S113D5C04040B9C866025C4C700022583018B9C893 -S113D5D06610B3EB0446660A7201C240D280D3AB34 -S113D5E0044620494CDF02024A804E756100013036 -S113D5F072016100FE3A10806000FE1AC1416100B0 -S113D600F7A84A8167227000B2680004651A6014A2 -S113D610C1416100F7944A81670E3028000490816B -S113D620640670003228000422486100FE0220498A -S113D6302F00618AD1DF30016100FF666000FDD6F2 -S113D6407E0053472F006100F774B03C002C660C39 -S113D650101D2F08610000D8205F2E006100F74ADA -S113D660201F720053806B00EB0AB068000464B89A -S113D6702207DE406506BE68000465AC322800045B -S113D680924060A46100FF34220067562248610082 -S113D690FD9ED1C1D3C1340153421021B03C005B83 -S113D6A0640AB03C0041650400000020110051CA26 -S113D6B0FFEA602E6100FF04220067262248610011 -S113D6C0FD6ED1C1D3C1340153421021B03C00617D -S113D6D0650AB03C007B6404020000DF110051CAFB -S113D6E0FFEA6000FD30101D6100F8DE6100F6BA4B -S113D6F04A2B05B56A00EA5C20106000FBBC487A3E -S113D700FBB86000FEB66100FEB24A406700EA64FE -S113D71010106000FBC46100F6A26100F5266100F0 -S113D720F9DC7280D281C2806600EA484E756100DD -S113D730F5126100F9C848404A406600EA3648409C -S113D7404E756100FE7667222C4D2A48D1C0101018 -S113D7503F002F0810BC00006100F6626100113622 -S113D760205F301F10802A4E4E75374005944E7549 -S113D7706100F4D06100F98E2F006100F634619AE3 -S113D780205F4E75611E6100F6286100F4B66100E9 -S113D790F97448404A40670652406600E9D648405A -S113D7A0205F4E756100F49C6100F95A0800000086 -S113D7B06600E97C20572E804ED06100F948204055 -S113D7C010106000FB1461A810804E756100F936DA -S113D7D0E2086500E95AD000C1887000301060008A -S113D7E0FAD86100F920E2086500E944D000C18854 -S113D7F020106000FAC4618C30804E7561A661000F -S113D800F5B06100F43E6100F8FC205F20804E75A5 -S113D8106100F7B62F08182B05B56100F594610077 -S113D820F7A8245FB82B05B56600E928201020D29C -S113D83024C04A046AD83010309234804E754EABFE -S113D84004066000F5644EEB04184EEB041E487A9F -S113D850F56C6100FF504E756100FF162F083F0004 -S113D86074006100F55867066100F5422400321F18 -S113D870205F1010B500C00167F84E750A2B0080B8 -S113D8800595176B059D059E102B0595B12B059EDF -S113D890102B05946700033641EB0598102B059C6B -S113D8A06746902B05946722650A376B059C05949F -S113D8B04400514844002F01B03C00206D04720024 -S113D8C060042210E0A92081221F4A2B059E6B1AB6 -S113D8D0202B0598D0AB0590640AE290522B059456 -S113D8E06500E88C274005904E7543EB0590B3C85E -S113D8F066025049201122102740059093AB0590F1 -S113D9006408462B059544AB0590202B05906B2E9F -S113D9106606374005944E752F0122007000102BC7 -S113D92005946714D2815BC8FFFC4A40670A6A0207 -S113D9307001530027410590221F174005944E752E -S113D9404A2B05956B00E82C7E001747059E1E2B7D -S113D95005946700E81E9EBC00000081177C0081CE -S113D96005942C2B0590277C800000000598377CBB -S113D9708100059C6100FF1A70003740059CDC861D -S113D980274605986758377C8000059C6100013064 -S113D9904A2B05946748122B0594923C008244015B -S113D9A0202B0590E2A87C00223C4000000041FAB4 -S113D9B013F47A1E78016006E8A29282DC902400B7 -S113D9C02601E8A36402528390836AEC200258483B -S113D9D05284E28B670451CDFFF0DC8620062800D8 -S113D9E07A004A8767166A0444877A801745059542 -S113D9F04847E18F7A885385DE876AFA274705907E -S113DA0017450594277CB17217F80598377C800078 -S113DA10059C176B0595059E6118274405986710AA -S113DA20377C8200059C176B0595059E6100FE629C -S113DA304E7548E7F8004A2B05946776102B059C31 -S113DA406770176B059E0595D02B0594640A903C6E -S113DA5000806400E71A6006903C0080655417401B -S113DA600594222B0590242B059838012001484069 -S113DA703600C2C2C0C24842C8C2C6C2D2BC00003C -S113DA80800042414841D280D2846406D6BC000161 -S113DA900000D2BC0000800042414841D2836B08A0 -S113DAA0D281532B0594670A274105904CDF001F50 -S113DAB04E757000274005903740059460EE2F079F -S113DAC070002400142B05946700E690102B059C2D -S113DAD067669042D07C0080176B059E0595422BAB -S113DAE0059F262B0590282B0598B8836744650667 -S113DAF09883562B059F614648412802614284C59C -S113DB001E2B059F6708E20FE291E2525200D442B5 -S113DB10640852816404E291524036006B1A024355 -S113DB20FF006600E64A2E1F174005942741059022 -S113DB304E757201E2A960DE7000220060E82404E0 -S113DB402A034245484588C5680278FF3C043204EC -S113DB50CCC3C8C53E0642464846D8867C009C478E -S113DB6095846A085341DC43D5856BF848423406F2 -S113DB704E7520104840374005946708807C00802B -S113DB804840E18027400590102B05944E752F08DE -S113DB90206B0472082B000605B5670C610000C6F3 -S113DBA02080205F4E752F086100FD60612C202BC2 -S113DBB00590E0984840C07C007F022B00800595CA -S113DBC0806B059448402080205F4E75376B059C20 -S113DBD00594276B059805904E75102B05946720C6 -S113DBE0202B0590D0BC00000080640AE290522BE8 -S113DBF005946500E57AC03C0000274005904E7509 -S113DC00174005954E757000102B059467F6102B80 -S113DC100595488048C0E08065EA70014E7561E66C -S113DC2027400590377CA0000594D0806000FCD28A -S113DC30177C000005954E75122B059C67C8102BA8 -S113DC40059E6BCA102B0595B22B0594660A222BF0 -S113DC500598B2AB0590670865B80A00008060B209 -S113DC6070004E75202B059067302F0172A0922B07 -S113DC7005946500E4FA660E4A2B05956A1A4480F9 -S113DC8069166000E4EAB23C002065027000E2A874 -S113DC904A2B05956A024480221F2740042A4E75A8 -S113DCA070A0902B05946310B03C00206400025EC9 -S113DCB072FFE1A1C3AB05904E7541FA17F0610004 -S113DCC0ED30202B045243FA0DDE720041EB05CCFB -S113DCD02401263110006714782F524490836AFA85 -S113DCE0D083118420005841524260E6D03C003079 -S113DCF0118020005348524843EB05D5B1C9670051 -S113DD00ECF00C10003067EE6000ECE643EB05C667 -S113DD10742008AB000705956702742D1282142B3A -S113DD200594660870307201600001A4177C00003D -S113DD3005ACB43C00816448277C98968000059823 -S113DD40377C9800059C176B0595059E6100FCE4E3 -S113DD50177C00F905AC6028376B0594059C276B8C -S113DD6005900598176B0595059E277CCCCCCCCDEA -S113DD700590377C7D0005946100FCB8522B05ACFE -S113DD80277C98967F700598377C9800059C6100E5 -S113DD90014C62C46750277CF423F8000598377C53 -S113DDA09400059C41EB0590610001326220201033 -S113DDB0122800042400E488D0826404E290520112 -S113DDC05601208011410004532B05AC60DA277CF6 -S113DDD0800000000598377C8000059C176B059532 -S113DDE0059E6100FAAC6100FE7C7401102B05AC49 -S113DDF050006B0CB03C0009640653001400700220 -S113DE0072005500174005AD174205AC10026702B9 -S113DE106A14528113BC002E10004A026708528112 -S113DE2013BC003010007400708041FA11142630C5 -S113DE3020005200D7AB042A08000007650467F2EB -S113DE40600266EE64064400D03C000BD03C002F18 -S113DE50584252411600C63C007F13831000532BD6 -S113DE6005AC6608528113BC002E1000C03C008033 -S113DE700A000080B43C001C66B0103110005381CD -S113DE80B03C003067F4B03C002E6702528113BCF2 -S113DE90002B10024A2B05AD67386A0A13BC002D0B -S113DEA01002442B05AD13BC00451001142B05AD25 -S113DEB0702F5200943C000A64F8D43C003A13805A -S113DEC010031382100413BC00001005600A1380B1 -S113DED0100013BC0000100120494E757000122B75 -S113DEE0059CB22B0594660A222B0598B2AB0590CB -S113DEF06708650453804E7552804E75277C8000F8 -S113DF0000000590377C810005944E757000274011 -S113DF100590374005944E754A2B059467DE4A2BCD -S113DF20059C67E81F2B059D6A2072001741059D1B -S113DF30122B0594927C00806300E238202B05901C -S113DF40E3A06600E22E65021E802F2B05903F2B76 -S113DF5005946100FC786100F9E8301F275F05989B -S113DF603740059C1740059E102B0595B12B059E47 -S113DF706100FAC06158175F05954E754A2B0594E8 -S113DF8067060A2B008005954E75277C80000000EB -S113DF900590377C810005944E754A2B05956A00DF -S113DFA0E1CE700027400590374005944E75277CDC -S113DFB0800000000590177C000005954A2B05B4ED -S113DFC06A024481D23C0081174105944E75102B9E -S113DFD0059467B6B03C006465B0177C000005B4D6 -S113DFE0222B0590B03C008762B06608B2BCB00F2B -S113DFF033C764A64A2B05956A0C177C00FF05B449 -S113E000177C00000595277CB8AA3B290598377C26 -S113E0108100059C177C0000059E6100FA16177CA0 -S113E020000005D91A2B05949A3C00806324202B08 -S113E030059022002C054446DC7C0020ECA9174105 -S113E04005D9EBA86700FF6827400590377C80005E -S113E0500594277CB17217F80598377C8000059CDD -S113E060177C0000059E6100F9CA202B05901A2B2D -S113E07005949A7C00824445EAA872002C3CE6A3ED -S113E080D11041FA0D2078007A036136594853843F -S113E0907A09612E594853847A1261264A2B05B4B1 -S113E0A06A064481442B05D97083DC816B06538056 -S113E0B0DC866AFA27460590D02B05D917400594CB -S113E0C04E7552842406E8A22601E8A34A806B0C0C -S113E0D0D282DC83909851CDFFEA4E7592829C8364 -S113E0E0D09851CDFFDE4E754A2B0594670841EB5D -S113E0F005A06100FAB272AF7412202B05A0D08083 -S113E1006402B30051CAFFF8274005A027400590D8 -S113E110377C800005946000F7F26138376B059412 -S113E120059C276B05900598274105901743059496 -S113E1306700E03C6100F7D46000F984277CC90FD4 -S113E140DAA30598377C8100059C176B0595059E1D -S113E1506100F73E177C000005B4277CA2F9836FA9 -S113E1600598377C7F00059C176B0595059E61001B -S113E170F8C2102B0594671C41FA0B2A2C2B05902E -S113E18053006710903C00806B18B03C002064047E -S113E190E1AE661874817600203C80000000220302 -S113E1A0605C4400B03C001E64EAE0AE176B059569 -S113E1B0059EDC866404462B0595DC866408462BA4 -S113E1C005B4462B059EE48E67CA7A012028FFFC1D -S113E1D022009C9860089C989083D282601224004C -S113E1E0EAA22601EAA34A866AECDC98D0839282EA -S113E1F05285BABC0000001E66E4748126024A2BD4 -S113E20005B46B04C141C5432740059017420594EA -S113E2106000F6F8102B0594670000AA177C000034 -S113E22005B4B03C008165286608202B0590D08099 -S113E230671E277C800000000598377C8100059CC0 -S113E240176B0595059E6100F876177C00FF05B4F1 -S113E250202B05907282922B0594E2A841FA0AC6FB -S113E2607C00223C400000007A1D78016006E8A290 -S113E270D282DC9024002601E8A390836AF0200275 -S113E28058485284E28351CDFFF2177C00820594F2 -S113E290274605906100F6744A2B05B46A261E2BA6 -S113E2A00595177C00000595277CC90FDAA205980F -S113E2B0377C8180059C177C00FF059E6100F5D2A8 -S113E2C0174705954E756100F4A8B03C000864003A -S113E2D0DEA201D04E756100F498B03C00086400E1 -S113E2E0DE9201904E75101D6100F486B03C00086A -S113E2F06400DE8022006100EAC4B03C00296600AC -S113E300DE7E6100EAB6700003106700F91470FF46 -S113E3106000F90E4A2B05B56A00DE10246B0590E7 -S113E3203E2A00046700DE0470003F003F003F0007 -S113E3303F002F0A720020416100F0DA101DB03C4A -S113E340002C6600DE3A6100028C4A026700DDDCC4 -S113E3506100E9084A2B05B56B00DDF84A2B0594EA -S113E3606732322F000AB27C000864283001D2419F -S113E370D240D24141FA084027701002059830304B -S113E3801000907C01003740059C177C0000059E1E -S113E3906100F4FE6100F976610001FC45EB05C6FD -S113E3A07C00782E3406524610326000677AB03C06 -S113E3B000456706B00466EE60EA360653435246EB -S113E3C010326000B03C002D6600DDA852461032C9 -S113E3D06000B03C00306704700A60085246700F59 -S113E3E0C032600034030C42000166025242D44041 -S113E3F0700A90426E0CD440D6400C4300016E0269 -S113E40076003C0270001580200053420C4200014B -S113E410671270304A4367EE103230005343B00441 -S113E42066E460F4158420004A426602340636022B -S113E4305243382F00085244B24463221030400043 -S113E440B03C00256706B03C002366EA7030BC434C -S113E45063061032300052431180400060D87C00C3 -S113E4607A0053426608740115BC00302000382F2E -S113E4700008B2446402380153446B621030400017 -S113E4807E30B03C002567087E20B03C0023660641 -S113E4904A4266346042B03C002C66104A42660828 -S113E4A00C30002540FF66301E00602CB03C002D6F -S113E4B06710B03C002B66C00C12002D670414BC1E -S113E4C0002B1A004A4267081E322000534260089B -S113E4D04A0666041E121C0711874000609A4A42CD -S113E4E066144A0567544A0666500C05002B6706F5 -S113E4F00C12002D66447A233E0153473C2F00043E -S113E50053466E023C07103160000C000023671E66 -S113E5100C00002567180C00002C67120C00002B5F -S113E520670C0C00002D67060C00002E6602100517 -S113E53011807000534651CFFFCE41EC0006274CAA -S113E54005906100F018302F000467203F4000065A -S113E550610000824A026614613C3F6F00040006B9 -S113E56041EC0006274C05906100EFF2101DB03C11 -S113E57000296600FDCA204C222B04466100F040AD -S113E5802741044622483200205F6100F032508F58 -S113E59020496000EE80226F00043E290004342FDD -S113E5A0000A3C2F0008320692426202D247610000 -S113E5B0EE7E6100EE60226F00042251780011B1FA -S113E5C02000400052445242BE4266027400BC42E3 -S113E5D066EC4E75226F00043E29000422513C2F44 -S113E5E0000A3F47000C7A00760074001031600086 -S113E5F0B03C002C6742B03C00236706B03C0025C9 -S113E60066084A856A105243602EB03C002B6706A8 -S113E610B03C002D66048400601EB03C002E6614DD -S113E6204A856B143006906F000A3F40000C7AFF55 -S113E630840060044A0266085246BE4662AE7C000C -S113E6403F4600083F43000E4E75B23C0021640073 -S113E650DB22741F41EB05B678307600E288D704DC -S113E6601183200051CAFFF4177C000005D64A012B -S113E670670E4481D2BC000005D641F31000600E41 -S113E6801010670AB03C0030660E524860F243EB4B -S113E69005D6B1C9660253486000ED34B23C0009A6 -S113E6A06400DAD0740741EB05CE78301600E898A0 -S113E6B0C63C000F1A03DA3C00F6C704118320009D -S113E6C051CAFFEA60A24A2B05E8661E4EAB040C51 -S113E6D0640E174005E9177C002005EA6000DF0698 -S113E6E04A2B05EA6704532B05EA4E754EAB040C1E -S113E6F0650A102B05EA67F2102B05E9177C000068 -S113E70005EA003C00014E756100E5524A2B05B54F -S113E7106B00DA40612C64FC6100F4B260F66100C5 -S113E720E53C4A2B05B56B00DA2A611663FC6100EF -S113E730F49C60F6B03C00296600DA44588F60000F -S113E740E67A6100E678B03C002C66E83F2B05943D -S113E7502F2B05906100E5064A2B05B56B00D9F413 -S113E760275F0598301F3740059C176B0595059E5C -S113E770B12B059E6000F4C2B03C002C672C6100F4 -S113E780EF9A4A006712B03C00106500D9E6B02B3E -S113E79005E26404174005E2174005E66100E61E41 -S113E7A0672CB03C002C6600D9D66100EF6A4A00A1 -S113E7B06B00D9C0B03C00016500D9B8122B05E646 -S113E7C06708B02B05E66E00D9AA174005E2102BA6 -S113E7D005E6670AB02B05E26404174005E2902BB6 -S113E7E005E264FAD02B05E2D02B05E24400D02BDD -S113E7F005E6174005E74E754A2B05956B00D9745D -S113E8004A2B059467F048E77800202B05907400A4 -S113E8102202761F082B000005946606D080D5825C -S113E820D281D080D5822801D8845284B4846504EE -S113E8309484528151CBFFE627410590102B059417 -S113E840907C0080E24864025240D07C00801740F3 -S113E85005944CDF001E6000F0B2101D6100E76AF1 -S113E8606100E54620086000EA5041EB04002008FE -S113E8706000EA46277CC90FDAA20590377C820043 -S113E88005944E75277CC90FDAA20590377C830066 -S113E89005944E7548E77C00720026012801174153 -S113E8A00595174105B5174105AF6100E510653CB5 -S113E8B0B03C002D6608177C00FF05956006B03C4F -S113E8C0002B66066100E4F46522B03C002E67006C -S113E8D00092B03C00246700010AB03C00256700A8 -S113E8E001646000008C6100E4D2646C610001A8E2 -S113E8F064F452836100E4C465F8B03C002E6606FB -S113E9006100E4B865FAB03C004566646100E4ACBB -S113E9106528B03C002D6706B03C00B36608177C40 -S113E92000FF05AF600EB03C002B6708B03C00B29E -S113E9306600D84C6100E4846436C8FC000AC0BC9C -S113E940000000FF903C0030D880B83C00306FE4F9 -S113E9506100E46865FA6018B03C002E670460A6A4 -S113E96053836100E456649E6100012C64F260905C -S113E9704A2B05AF6A024484D88376204A816752C1 -S113E9806B085383D2815BCBFFFCB8BC000000262C -S113E9906E00D7DCB8BCFFFFFFDA6D344484C9FCD9 -S113E9A000062F0841FA021017704000059C2770DA -S113E9B040020598205F0A03008027410590174311 -S113E9C00594176B0595059E4CDF003E6000F064CE -S113E9D07200260117430594274105904CDF003E41 -S113E9E04E75177C004005B576206100E3CE6514B2 -S113E9F0803C0020903C0061652AB03C0006642401 -S113EA00D03C003A616C64E258836900D7626100CB -S113EA10E3AA65F4803C0020903C00616506B03CAC -S113EA20000665E44A8167AA6B085383D2815BCBF5 -S113EA30FFFC0A03008017430594274105904CDF2F -S113EA40003E4E75177C004005B576206100E36CEE -S113EA5064D2B03C003264CC2401612464EE52835D -S113EA606900D70C6100E35464BAB03C003265EE2F -S113EA7060B22401D48265CAD48265C6D48265C2D8 -S113EA80D48265BEC0BC000000FF903C0030D4803E -S113EA9065B022024E752401D4826508D4826504CF -S113EAA0D48164DC4E753B9ACA0005F5E1000098F8 -S113EAB09680000F4240000186A00000271000004D -S113EAC003E8000000640000000A00000000332E88 -S113EAD03232FF0096769951FB00F0BDC21BF8005C -S113EAE0C097CE7CF5009A130B96F100F684DF579D -S113EAF0EE00C5371912EB009DC5ADA8E700FC6F09 -S113EB007C40E400C9F2C9CDE100A18F07D7DE0043 -S113EB10813F3979DA00CECB8F28D700A56FA5BA0B -S113EB20D40084595161D000D3C21BCFCD00A96851 -S113EB30163FCA0087867832C600D8D726B7C300E6 -S113EB40AD78EBC6C0008AC72305BC00DE0B6B3A68 -S113EB50B900B1A2BC2FB6008E1BC9BFB200E35FDF -S113EB60A932AF00B5E620F5AC009184E72AA800ED -S113EB70E8D4A510A500BA43B740A2009502F90055 -S113EB809E00EE6B28009B00BEBC20009800989667 -S113EB9080009400F42400009100C35000008E0013 -S113EBA09C4000008A00FA0000008700C8000000B2 -S113EBB08400A00000008100800000007D00CCCC17 -S113EBC0CCCD7A00A3D70A3D770083126E987300E8 -S113EBD0D1B717597000A7C5AC476D008637BD067D -S113EBE06900D6BF94D66600ABCC771263008970F7 -S113EBF05F415F00DBE6FECF5C00AFEBFF0C59002A -S113EC008CBCCC095500E12E13425200B424DC35EF -S113EC104F00901D7CF74B00E69594BF4800B877F1 -S113EC20AA3245009392EE8F4100EC1E4A7E3E00CC -S113EC30BCE508653B00971DA0503700F1C9008171 -S113EC403400C16D9A0131009ABE14CD2D00F7969F -S113EC5087AE2A00C612062527009E74D1B8230069 -S113EC60FD87B5F32000CAD2F7F51D00A2425FF775 -S113EC701A0081CEB32C1600CFB11EAD1300A62707 -S113EC804BBE100084EC3C980C00D4AD2DC00900A0 -S113EC90AA2424990600881CEA140200D9C7DCEDD2 -S113ECA04DBA76D42000000012E4051E09FB385C3E -S113ECB0051111D5028B0D440145D7E200A2F61FC0 -S113ECC000517C560028BE5400145F2F000A2F996F -S113ECD0000517CD00028BE7000145F40000A2FAFD -S113ECE00000517D000028BF0000146000000A30BD -S113ECF0000005180000028C00000146000000A37B -S113ED000000005200000029000000150000000B64 -S113ED1000000006000000030000000200000001E3 -S113ED20000000011DAC67050FADBAFD07F56EA725 -S113ED3003FEAB7701FFD55C00FFFAAB007FFF5504 -S113ED40003FFFEB001FFFFD001000000008000063 -S113ED500004000000020000000100000000800028 -S113ED600000400000002000000010000000080027 -S113ED700000040000000200000001000000008008 -S113ED800000004000000020000000100000000807 -S113ED900000000400000002000000010000000068 -S113EDA000000000E327D4F41058AEFA080AC48E19 -S113EDB00401562202002AB001000554008000AA72 -S113EDC000400014002000020010000000080000B1 -S113EDD000040000000200000001000000008000A8 -S113EDE000004000000020000000100000000800A7 -S113EDF00000040000000200000001000000008088 -S113EE000000004000000020000000100000000886 -S113EE1000000004000000020000000100000000E7 -S113EE2000000000D7C8D6FCDD68D91CDC5CE136E4 -S113EE30DC82DA8EDA2CD884D84CD944D7F6D8724E -S113EE40D908D9B2D7D0D9BAD824DA32EA34EA22E6 -S113EE50EA26E4C6E9A2E9D2E9D8EA2AD860D8B217 -S113EE60DB22D82ED648D644D5F4F954DAE8E9ECB6 -S113EE70F4A2F4B2DFE4DFE4DFE4DDE8DF30DF3026 -S113EE80DFE4DFE4DFE4DFE4DFE4DFE4DFE4DFE466 -S113EE90DFE4DFE4DFE4DFD6DFE4DFD6DFD6DFD68E -S113EEA0DFD6DFE4E01EE01E000000000000DFF219 -S113EEB0DFF2DFF200000000DFFCDFFCDFFCDDE856 -S113EEC0ED5EEDE0ED70E97EE3E2E414F938F2285A -S113EED0EA80F10EF27CF294F25AF354E8FAE90C67 -S113EEE0E922E83EE50AE882E846E7F4E7C4E72CCD -S113EEF0F7DCF78AF426F848F85EF9AAF9B4F9C4FD -S113EF00F99AE826E73CE750E780F4540079E9846D -S113EF100079E970007BEB26007BEBB2007FF00CFC -S113EF200050DFC60046DFB60046DFBE0056E06A8A -S113EF300056E05A007DF070005ADFDC0064DFE622 -S113EF40FFF0BDC0000186A0FFFFD8F0000003E879 -S113EF50FFFFFF9C0000000AFFFFFFFF000000020C -S113EF60FFFF0004FFFF0006FFFFFFFFFFFFFFFF9F -S113EF70FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9D -S113EF800008000C000E0012FFFF00140024003DD6 -S113EF900054006D007C008600930099FFFFFFFF82 -S113EFA000A800D600E400F300F8FFFF010D0137CC -S113EFB001620176018E019AFFFFFFFFFFFFFFFF51 -S113EFC0FFFFFFFF01A9450100714601007C4E02CD -S113EFD000E7440200544903009E440100635202C6 -S113EFE001144C0100BE440100584702008952013B -S113EFF00133490000995205011B4703008D520457 -S113F000012252010118530201544F0000F34E0231 -S113F01000EE4901009B5702019A4C0200C55302BD -S113F020013C44010060500200FF440200664C02AF -S113F03000CD4302003D4400006A4C0200D150035D -S113F04001074302004B4C0200C1430300464E013A -S113F05000E4570301A3470100865302015D420403 -S113F060002F42040029540201624502006D54003D -S113F070016E4600007F530201485402016A4E01AA -S113F08000EB530201505503017D5703019E2BFFF2 -S113F09000022DFF00042AFF00002FFF00065EFF80 -S113F0A001A941010018450100744F0000F53E001C -S113F0B0000E3C0000083EFF00103DFF000C3CFF2A -S113F0C0000A53020140490200A341020014550200 -S113F0D0018946020081500201035302014C52028D -S113F0E0012F4C0200C9450200774302004F53022E -S113F0F00144540201664102001F500300F8440316 -S113F100005B4C0300AF4C0200BA53030158560293 -S113F110018E4102001B550501764C0500A84303EE -S113F12000414803009342030024420500354D0288 -S113F13000D64D0200DF5205010D500000FD5403BE -S113F140017056050192530301374C0400B4520573 -S113F15001284D0300DA55050182003000410048C2 -S113F160005D006900770080008E00A200AF00C03F -S113F17000CF00DE00EC00FC010F011E0131014153 -S113F180015401680179018101884E455854207762 -S113F1906974686F757420464F520053796E7461B8 -S113F1A0780052455455524E20776974686F7574CF -S113F1B020474F535542004F7574206F66204441D9 -S113F1C054410046756E6374696F6E2063616C6CA4 -S113F1D0004F766572666C6F77004F7574206F66AA -S113F1E0206D656D6F727900556E646566696E6534 -S113F1F0642073746174656D656E7400417272612C -S113F2007920626F756E647300446F75626C65205B -S113F21064696D656E73696F6E00446976696465CF -S113F220206279207A65726F00496C6C6567616C45 -S113F230206469726563740054797065206D697324 -S113F2406D6174636800537472696E6720746F6FC4 -S113F250206C6F6E6700537472696E6720746F6FF1 -S113F26020636F6D706C65780043616E2774206352 -S113F2706F6E74696E756500556E646566696E655A -S113F280642066756E6374696F6E004C4F4F502036 -S113F290776974686F757420444F00556E646566B1 -S113F2A0696E6564207661726961626C6500556E91 -S113F2B064696D656E73696F6E65642061727261F5 -S113F2C0790057726F6E672064696D656E73696F3C -S113F2D06E73004164647265737300466F726D618E -S113F2E074004E6F7420696D706C656D656E746525 -S113F2F06400B400B200B300B5003CBBBE00BD0066 -S113F3003EBABC009E00425328C14E44B753432822 -S113F310D3544E28CC00494E2428D84954434C5247 -S113F320A74954534554A6495454535428D9004129 -S113F3304C4C9B48522428D64C454152A14F4E5424 -S113F3409F4F5328C9004154418345438845454B49 -S113F35028CE454697494D854F4B45994F9C004CC7 -S113F3605345A94E44804F52B8585028C8004F52B4 -S113F370814EAB524528C3004554A44F544F894F86 -S113F3805355428D0045582428D700468B4E43934D -S113F3904E505554844E5428C000434153452428AC -S113F3A0D545454B28CF4546542428E1454E28D021 -S113F3B0455487495354A04F4144954F4728C74F5C -S113F3C04B459A4F4F509D00415828DA4944242810 -S113F3D0E3494E28DB004557A2455854824F54AEAA -S113F3E0554C4C92004E9152B90045454B28CD499D -S113F3F0DD4F4B45984F5328C452494E549E00410B -S113F4004D42415345DC45414486454D8F45535457 -S113F4104F52458C455455524E8E494748542428E2 -S113F420E24E4428C6554E8A0041444428E04156E1 -S113F4304596474E28BF494E28CA504328AC5152DE -S113F44028C5544550AF544F509054522428D15796 -S113F4504150A500414228A8414E28CB48454EAD15 -S113F4604FAA574F5049DE00434153452428D44EF8 -S113F47054494CB053494E472428E4535228C200FF -S113F480414C28D2415250545228DF0041495494EF -S113F49048494C45B149445448A300B6000D0A42BA -S113F4A07265616B00204572726F720020696E2074 -S113F4B06C696E65200045787472612069676E6FAF -S113F4C07265640D0A005265646F2066726F6D2068 -S113F4D073746172740D0A000D0A52656164790DCA -S113F4E00A0020427974657320667265650D0A0A04 -S113F4F0456E68616E6365642036386B2042415303 -S113F50049432056657273696F6E20332E35320D70 -S113F5100A000000000000000000000000000000DD -S113F52000000000000000000000000000000000D7 -S113F53000000000000000000000000000000000C7 -S113F54000000000000000000000000000000000B7 -S113F55000000000000000000000000000000000A7 -S113F5600000000000000000000000000000000097 -S113F5700000000000000000000000000000000087 -S113F5800000000000000000000000000000000077 -S113F5900000000000000000000000000000000067 -S113F5A00000000000000000000000000000000057 -S113F5B00000000000000000000000000000000047 -S113F5C00000000000000000000000000000000037 -S113F5D00000000000000000000000000000000027 -S113F5E00000000000000000000000000000000017 -S113F5F00000000000000000000000000000000007 -S113F60000000000000000000000000000000000F6 -S113F61000000000000000000000000000000000E6 -S113F62000000000000000000000000000000000D6 -S113F63000000000000000000000000000000000C6 -S113F64000000000000000000000000000000000B6 -S113F65000000000000000000000000000000000A6 -S113F6600000000000000000000000000000000096 -S113F6700000000000000000000000000000000086 -S113F6800000000000000000000000000000000076 -S113F6900000000000000000000000000000000066 -S113F6A00000000000000000000000000000000056 -S113F6B00000000000000000000000000000000046 -S113F6C00000000000000000000000000000000036 -S113F6D00000000000000000000000000000000026 -S113F6E00000000000000000000000000000000016 -S113F6F00000000000000000000000000000000006 -S113F70000000000000000000000000000000000F5 -S113F71000000000000000000000000000000000E5 -S113F72000000000000000000000000000000000D5 -S113F73000000000000000000000000000000000C5 -S113F74000000000000000000000000000000000B5 -S113F75000000000000000000000000000000000A5 -S113F7600000000000000000000000000000000095 -S113F7700000000000000000000000000000000085 -S113F7800000000000000000000000000000000075 -S113F7900000000000000000000000000000000065 -S113F7A00000000000000000000000000000000055 -S113F7B00000000000000000000000000000000045 -S113F7C00000000000000000000000000000000035 -S113F7D00000000000000000000000000000000025 -S113F7E00000000000000000000000000000000015 -S113F7F00000000000000000000000000000000005 -S113F80000000000000000000000000000000000F4 -S113F81000000000000000000000000000000000E4 -S113F82000000000000000000000000000000000D4 -S113F83000000000000000000000000000000000C4 -S113F84000000000000000000000000000000000B4 -S113F85000000000000000000000000000000000A4 -S113F8600000000000000000000000000000000094 -S113F8700000000000000000000000000000000084 -S113F8800000000000000000000000000000000074 -S113F8900000000000000000000000000000000064 -S113F8A00000000000000000000000000000000054 -S113F8B00000000000000000000000000000000044 -S113F8C00000000000000000000000000000000034 -S113F8D00000000000000000000000000000000024 -S113F8E00000000000000000000000000000000014 -S113F8F00000000000000000000000000000000004 -S113F90000000000000000000000000000000000F3 -S113F91000000000000000000000000000000000E3 -S113F92000000000000000000000000000000000D3 -S113F93000000000000000000000000000000000C3 -S113F94000000000000000000000000000000000B3 -S113F95000000000000000000000000000000000A3 -S113F9600000000000000000000000000000000093 -S113F9700000000000000000000000000000000083 -S113F9800000000000000000000000000000000073 -S113F9900000000000000000000000000000000063 -S113F9A00000000000000000000000000000000053 -S113F9B00000000000000000000000000000000043 -S113F9C00000000000000000000000000000000033 -S113F9D00000000000000000000000000000000023 -S113F9E00000000000000000000000000000000013 -S113F9F00000000000000000000000000000000003 -S113FA0000000000000000000000000000000000F2 -S113FA1000000000000000000000000000000000E2 -S113FA2000000000000000000000000000000000D2 -S113FA3000000000000000000000000000000000C2 -S113FA4000000000000000000000000000000000B2 -S113FA5000000000000000000000000000000000A2 -S113FA600000000000000000000000000000000092 -S113FA700000000000000000000000000000000082 -S113FA800000000000000000000000000000000072 -S113FA900000000000000000000000000000000062 -S113FAA00000000000000000000000000000000052 -S113FAB00000000000000000000000000000000042 -S113FAC00000000000000000000000000000000032 -S113FAD00000000000000000000000000000000022 -S113FAE00000000000000000000000000000000012 -S113FAF00000000000000000000000000000000002 -S113FB0000000000000000000000000000000000F1 -S113FB1000000000000000000000000000000000E1 -S113FB2000000000000000000000000000000000D1 -S113FB3000000000000000000000000000000000C1 -S113FB4000000000000000000000000000000000B1 -S113FB5000000000000000000000000000000000A1 -S113FB600000000000000000000000000000000091 -S113FB700000000000000000000000000000000081 -S113FB800000000000000000000000000000000071 -S113FB900000000000000000000000000000000061 -S113FBA00000000000000000000000000000000051 -S113FBB00000000000000000000000000000000041 -S113FBC00000000000000000000000000000000031 -S113FBD00000000000000000000000000000000021 -S113FBE00000000000000000000000000000000011 -S113FBF00000000000000000000000000000000001 -S113FC0000000000000000000000000000000000F0 -S113FC1000000000000000000000000000000000E0 -S113FC2000000000000000000000000000000000D0 -S113FC3000000000000000000000000000000000C0 -S113FC4000000000000000000000000000000000B0 -S113FC5000000000000000000000000000000000A0 -S113FC600000000000000000000000000000000090 -S113FC700000000000000000000000000000000080 -S113FC800000000000000000000000000000000070 -S113FC900000000000000000000000000000000060 -S113FCA00000000000000000000000000000000050 -S113FCB00000000000000000000000000000000040 -S113FCC00000000000000000000000000000000030 -S113FCD00000000000000000000000000000000020 -S113FCE00000000000000000000000000000000010 -S113FCF00000000000000000000000000000000000 -S113FD0000000000000000000000000000000000EF -S113FD1000000000000000000000000000000000DF -S113FD2000000000000000000000000000000000CF -S113FD3000000000000000000000000000000000BF -S113FD4000000000000000000000000000000000AF -S113FD50000000000000000000000000000000009F -S113FD60000000000000000000000000000000008F -S113FD70000000000000000000000000000000007F -S113FD80000000000000000000000000000000006F -S113FD90000000000000000000000000000000005F -S113FDA0000000000000000000000000000000004F -S113FDB0000000000000000000000000000000003F -S113FDC0000000000000000000000000000000002F -S113FDD0000000000000000000000000000000001F -S113FDE0000000000000000000000000000000000F -S113FDF000000000000000000000000000000000FF -S113FE0000000000000000000000000000000000EE -S113FE1000000000000000000000000000000000DE -S113FE2000000000000000000000000000000000CE -S113FE3000000000000000000000000000000000BE -S113FE4000000000000000000000000000000000AE -S113FE50000000000000000000000000000000009E -S113FE60000000000000000000000000000000008E -S113FE70000000000000000000000000000000007E -S113FE80000000000000000000000000000000006E -S113FE90000000000000000000000000000000005E -S113FEA0000000000000000000000000000000004E -S113FEB0000000000000000000000000000000003E -S113FEC0000000000000000000000000000000002E -S113FED0000000000000000000000000000000001E -S113FEE0000000000000000000000000000000000E -S113FEF000000000000000000000000000000000FE -S113FF0000000000000000000000000000000000ED -S113FF1000000000000000000000000000000000DD -S113FF2000000000000000000000000000000000CD -S113FF3000000000000000000000000000000000BD -S113FF4000000000000000000000000000000000AD -S113FF50000000000000000000000000000000009D -S113FF60000000000000000000000000000000008D -S113FF70000000000000000000000000000000007D -S113FF80000000000000000000000000000000006D -S113FF90000000000000000000000000000000005D -S113FFA0000000000000000000000000000000004D -S113FFB0000000000000000000000000000000003D -S113FFC0000000000000000000000000000000002D -S113FFD0000000000000000000000000000000001D -S113FFE0000000000000000000000000000000000D -S112FFF0000000000000000000000000000000FE -S5030400F8 diff --git a/roms/ehbasic/basic_0.BIN b/roms/ehbasic/basic_0.BIN new file mode 100644 index 0000000..ac23df8 Binary files /dev/null and b/roms/ehbasic/basic_0.BIN differ diff --git a/roms/ehbasic/basic_0.hex b/roms/ehbasic/basic_0.hex index 57869d9..265ec18 100644 --- a/roms/ehbasic/basic_0.hex +++ b/roms/ehbasic/basic_0.hex @@ -1,7 +1,7 @@ 00 -0E +E0 00 -0B +08 00 00 00 @@ -1023,6 +1023,7 @@ 00 00 60 +00 08 00 00 @@ -1057,7 +1058,8 @@ 00 10 00 -30 +20 +00 40 20 00 @@ -1115,7 +1117,7 @@ FF 17 05 37 -05 +07 37 05 17 @@ -1130,7 +1132,7 @@ FF 49 04 41 -05 +08 27 04 61 @@ -1446,11 +1448,11 @@ B0 00 05 66 -90 +04 00 D0 43 -2B +2C 30 00 6B @@ -1475,7 +1477,7 @@ B0 52 4A 67 -90 +04 00 67 B0 @@ -1483,7 +1485,7 @@ B0 66 17 05 -90 +04 00 66 FF @@ -1630,7 +1632,8 @@ B0 B0 00 66 -46 +0A +00 05 10 66 @@ -1895,7 +1898,7 @@ FA BE 00 67 -9E +04 00 67 53 @@ -2062,7 +2065,7 @@ F9 D2 65 F9 -90 +04 00 D2 69 @@ -2092,7 +2095,7 @@ F8 27 04 61 -12 +13 27 80 00 @@ -2108,7 +2111,7 @@ B1 61 10 61 -12 +13 61 05 0C @@ -2567,7 +2570,7 @@ B1 00 60 F9 -4F +DE 00 61 01 @@ -2618,7 +2621,7 @@ F4 05 61 01 -90 +04 00 65 B0 @@ -2645,7 +2648,7 @@ F4 4A 05 66 -D0 +06 00 64 66 @@ -2690,7 +2693,7 @@ D3 72 60 41 -21 +22 B0 10 64 @@ -2785,7 +2788,8 @@ D0 61 FE 72 -58 +4F +00 60 FF 61 @@ -2818,7 +2822,7 @@ B0 00 67 05 -90 +04 00 65 F3 @@ -3082,7 +3086,7 @@ FD 41 04 60 -90 +04 00 67 00 @@ -3623,7 +3627,7 @@ B1 4A 05 6B -ED +EC 2F 61 22 @@ -3642,16 +3646,19 @@ E0 22 20 04 -58 +41 +00 24 04 60 61 +00 41 00 B1 65 -59 +41 +FF 24 04 60 @@ -3680,7 +3687,8 @@ B5 04 60 61 -5C +41 +00 B5 66 20 @@ -3848,7 +3856,7 @@ F7 00 22 61 -FE +FD 20 2F 61 @@ -3878,7 +3886,7 @@ F7 72 53 6B -EB +EA B0 00 64 @@ -4211,7 +4219,8 @@ B3 93 05 64 -46 +0A +00 05 44 05 @@ -4253,7 +4262,7 @@ E8 05 67 E8 -9E +04 00 00 17 @@ -4287,7 +4296,7 @@ DC 67 12 05 -92 +04 00 44 20 @@ -4377,12 +4386,12 @@ F8 D0 05 64 -90 +04 00 64 E7 60 -90 +04 00 65 17 @@ -4400,7 +4409,7 @@ C0 48 C8 C6 -D2 +06 00 80 42 @@ -4408,10 +4417,10 @@ D2 D2 D2 64 -D6 +06 00 00 -D2 +06 00 80 42 @@ -4444,7 +4453,7 @@ E6 05 67 90 -D0 +06 00 17 05 @@ -4580,7 +4589,7 @@ C0 67 20 05 -D0 +06 00 00 64 @@ -4712,7 +4721,7 @@ D0 58 52 60 -D0 +06 00 11 20 @@ -4886,9 +4895,9 @@ D7 66 64 44 -D0 +06 00 -D0 +06 00 58 52 @@ -4940,10 +4949,10 @@ B0 05 70 52 -94 +04 00 64 -D4 +06 00 13 10 @@ -5004,7 +5013,7 @@ B2 05 12 05 -92 +04 00 63 E2 @@ -5076,7 +5085,7 @@ E1 05 6A 44 -D2 +06 00 17 05 @@ -5126,7 +5135,7 @@ FA 05 1A 05 -9A +04 00 63 20 @@ -5134,7 +5143,7 @@ FA 22 2C 44 -DC +06 00 EC 17 @@ -5163,13 +5172,13 @@ F9 05 1A 05 -9A +04 00 44 EA 72 2C -E6 +26 D1 41 0D @@ -5300,7 +5309,7 @@ F8 05 53 67 -90 +04 00 6B B0 @@ -5325,13 +5334,16 @@ E0 05 DC 64 -46 +0A +00 05 DC 64 -46 +0A +00 05 -46 +0A +00 05 E4 67 @@ -5503,13 +5515,13 @@ F9 4A 05 6A -DE +DD 24 05 3E 00 67 -DE +DD 70 3F 3F @@ -5531,7 +5543,7 @@ DE 67 DD 61 -E9 +E8 4A 05 6B @@ -5555,7 +5567,7 @@ D2 05 30 10 -90 +04 01 37 05 @@ -5817,7 +5829,8 @@ F0 20 61 F0 -50 +4F +00 20 60 EE @@ -5932,7 +5945,7 @@ FF 4A 67 44 -D2 +06 00 05 41 @@ -5965,7 +5978,7 @@ E8 C6 00 1A -DA +06 00 C7 11 @@ -5985,7 +5998,7 @@ FF 00 05 60 -DF +DE 4A 05 67 @@ -6032,7 +6045,8 @@ B0 00 66 DA -58 +4F +00 60 E6 61 @@ -6045,7 +6059,7 @@ B0 2F 05 61 -E5 +E4 4A 05 6B @@ -6162,12 +6176,12 @@ FF 05 10 05 -90 +04 00 E2 64 52 -D0 +06 00 17 05 @@ -6216,7 +6230,7 @@ DA 17 05 61 -E5 +E4 65 B0 00 @@ -6292,7 +6306,7 @@ C8 C0 00 00 -90 +04 00 D8 B8 @@ -6380,13 +6394,13 @@ E3 65 80 00 -90 +04 00 65 B0 00 64 -D0 +06 00 61 64 @@ -6398,7 +6412,7 @@ E3 65 80 00 -90 +04 00 65 B0 @@ -6435,7 +6449,7 @@ B0 64 52 69 -D7 +D6 61 E3 64 @@ -6455,7 +6469,7 @@ D4 C0 00 00 -90 +04 00 D4 65 @@ -6852,7 +6866,7 @@ FF 00 00 00 -E3 +23 D4 10 AE @@ -6930,7 +6944,7 @@ D8 D9 D7 D8 -D9 +D8 D9 D7 D9 @@ -7012,7 +7026,7 @@ E8 E9 E9 E8 -E5 +E4 E8 E8 E7 @@ -7802,391 +7816,4 @@ B1 20 2E 32 -0A -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 \ No newline at end of file +0A \ No newline at end of file diff --git a/roms/ehbasic/basic_1.BIN b/roms/ehbasic/basic_1.BIN new file mode 100644 index 0000000..40aa50e Binary files /dev/null and b/roms/ehbasic/basic_1.BIN differ diff --git a/roms/ehbasic/basic_1.hex b/roms/ehbasic/basic_1.hex index 1fb40bb..4b06174 100644 --- a/roms/ehbasic/basic_1.hex +++ b/roms/ehbasic/basic_1.hex @@ -1,7 +1,5 @@ 00 00 -A0 -B4 00 00 00 @@ -1022,7 +1020,10 @@ B4 00 00 00 -3A +00 +00 +00 +3C 39 01 F0 @@ -1048,10 +1049,10 @@ FE 75 2E 00 -38 +3A 2E 00 -32 +34 F9 F0 09 @@ -1059,6 +1060,7 @@ BC 15 7C 00 +00 3C 00 00 @@ -1089,23 +1091,23 @@ DC C9 C0 FA -8E +8C C9 C0 FA -74 +72 C9 C0 FA -9A +98 C9 C0 FA -98 +96 C9 C0 FA -08 +1E C9 00 40 @@ -1115,7 +1117,7 @@ E5 40 E8 40 -EE +FE 40 D6 7C @@ -1130,33 +1132,33 @@ E7 EB 8E EB -F0 +00 48 2E 00 22 00 -96 +98 2B 4A AB 2E 00 -BE +CC FA -D6 +EE 00 -E0 +E2 FA -BA +D2 00 -5A +68 FA 92 48 02 00 -C4 +D2 EB 00 2C @@ -1207,28 +1209,28 @@ EB 00 CA 00 -08 +0A FA -CC +E4 31 00 F1 00 00 -56 +58 FA -07 +1F 00 -4E +50 2B 52 04 00 -0E +1C FA -28 +40 00 -3C +3E FF 41 52 @@ -1239,15 +1241,15 @@ EB 00 EC 00 -F2 +F4 F6 08 00 56 00 -C2 +C4 00 -38 +3A 00 4A 2B @@ -1341,20 +1343,20 @@ EA 00 24 00 -74 +76 20 00 -6E +70 08 00 -68 +6A 41 10 00 -5E +60 20 00 -5A +5C 00 EB 90 @@ -1368,7 +1370,7 @@ F8 3C 0D 00 -C0 +C2 41 06 3C @@ -1384,7 +1386,7 @@ FF 00 41 00 -1E +20 C8 07 F6 @@ -1446,16 +1448,16 @@ DA 06 DD 2E -3C +00 2A 40 FA -EC +04 31 00 6E FA -78 +90 C0 FF 01 @@ -1475,7 +1477,7 @@ F0 41 00 4A -3C +00 3A 06 3C @@ -1483,7 +1485,7 @@ F0 04 40 DD -3C +00 55 00 78 @@ -1561,7 +1563,7 @@ C0 40 EA 00 -CC +CE EB 8E 1F @@ -1587,11 +1589,11 @@ FF B3 E6 00 -90 +92 00 78 00 -32 +34 16 3C B3 @@ -1600,20 +1602,20 @@ FF 41 2A 00 -1E +20 04 00 -70 +72 7C 00 DD 00 -E6 +E8 18 B4 40 00 -2A +2C 18 AB 2A @@ -1621,29 +1623,30 @@ A6 E7 C0 00 -00 +0E DF 00 20 00 -3A +3C 3C 22 -04 +06 2B +FF DD 18 08 49 08 -BE +BC 75 -E4 +E2 2B DD -DE +DC FA -D4 +EA 7F 00 49 @@ -1657,7 +1660,7 @@ F2 D2 12 FA -E4 +FA F2 00 1A @@ -1673,7 +1676,7 @@ BC AB 3A 00 -24 +22 00 14 88 @@ -1723,7 +1726,7 @@ D0 C0 1D 00 -1C +1A 5D 52 00 @@ -1741,7 +1744,7 @@ D8 3A E4 00 -C8 +C6 00 8C 00 @@ -1751,11 +1754,11 @@ F0 3C 28 00 -B4 +B2 80 40 FA -52 +68 30 00 70 @@ -1786,11 +1789,11 @@ C9 2B DC 00 -9E +9C FA -89 +9F 00 -88 +86 6B 2E 20 @@ -1807,28 +1810,28 @@ FC 01 C0 00 -CC +CA 00 -28 +26 20 48 62 75 00 -D0 +DA 40 E4 75 00 -2A +28 2B 52 00 -EA +E8 2B 5A 00 -E2 +E0 40 6B 56 @@ -1836,13 +1839,13 @@ E2 75 0C 00 -B2 +B0 4D 5A 00 22 00 -AC +AA 1C 0D 2B @@ -1877,9 +1880,9 @@ FC 01 C0 00 -40 +3E 00 -9C +9A 48 4D 4D @@ -1889,18 +1892,18 @@ C0 9C 04 00 -60 +5E 00 2E 3C 3A 28 -3C +07 B0 08 07 00 -8A +88 FF 00 C0 @@ -1933,7 +1936,7 @@ EF 8D 04 00 -44 +42 4F 5F 52 @@ -1968,13 +1971,13 @@ AD 3C 89 00 -02 +00 4D 00 38 48 00 -F6 +F4 2B 94 1E @@ -2018,7 +2021,7 @@ FC 4D 75 00 -3A +44 00 00 D6 @@ -2029,7 +2032,7 @@ D6 3C 89 00 -88 +86 02 06 1F @@ -2052,21 +2055,21 @@ A4 01 81 00 -5A +58 81 00 -54 +52 82 00 -4E +4C 81 00 -48 -3C +46 +00 30 80 00 -3E +3C 00 76 D6 @@ -2083,16 +2086,16 @@ D6 00 5C 00 -66 +68 2B B5 00 -E8 +E6 36 48 72 00 -FE +0A 7C 00 00 @@ -2106,9 +2109,9 @@ FE 2B 9E 00 +0A 00 -00 -FA +06 00 24 00 @@ -2124,7 +2127,7 @@ E8 90 E4 00 -10 +12 48 72 2B @@ -2142,7 +2145,7 @@ B5 00 72 00 -B6 +C2 6B 72 6B @@ -2159,7 +2162,7 @@ EB 04 50 00 -02 +04 6B 90 C8 @@ -2169,29 +2172,29 @@ D8 90 75 00 -B6 +B8 48 72 2B B5 0C 00 -D0 +E4 00 -B8 +BA 00 -6A +76 00 41 00 -C0 +D4 08 01 00 -FA +FC 80 00 -DA +DC 9C 00 B4 @@ -2217,9 +2220,9 @@ F6 B5 D2 00 -9E +AA 00 -5C +5E 00 2B E6 @@ -2253,14 +2256,14 @@ FA 22 00 00 -60 +6A 00 00 00 3C 29 00 -BA +B8 1F 3C A8 @@ -2283,9 +2286,9 @@ D2 5C 75 00 -DC +DE 00 -C4 +CE 0C 00 41 @@ -2346,16 +2349,16 @@ E0 5E 52 00 -E2 +E0 FA -52 +68 00 78 6B 5A 75 00 -5E +60 3C 22 0E @@ -2367,7 +2370,7 @@ FA 00 5E 00 -0E +0C 00 10 0A @@ -2381,7 +2384,7 @@ E0 48 66 00 -0E +10 48 72 0D @@ -2396,7 +2399,7 @@ E0 00 38 00 -D4 +D2 10 04 00 @@ -2419,7 +2422,7 @@ B5 00 4D 00 -D0 +D2 4A 00 D2 @@ -2427,11 +2430,11 @@ D2 2B B5 00 -82 +98 5F B5 00 -74 +80 00 9E 0A @@ -2463,7 +2466,7 @@ B5 C1 1D 00 -1C +1A 5D 5E 00 @@ -2485,7 +2488,7 @@ E0 02 75 FA -30 +46 00 66 10 @@ -2493,12 +2496,12 @@ FA 57 81 00 -EC +EA 6F 02 1C 00 -28 +2A 4F 3C 81 @@ -2507,7 +2510,7 @@ EC C1 57 00 -D0 +CE EF 02 F2 @@ -2521,7 +2524,7 @@ F2 12 B5 00 -1A +1C 6B 9D 9E @@ -2532,12 +2535,12 @@ B5 48 72 00 -AC +B6 6F 12 B5 00 -A0 +AC 6F 0C 9C @@ -2552,7 +2555,7 @@ A0 2B 9E 00 -2C +38 2F 06 41 @@ -2567,7 +2570,7 @@ A0 18 00 76 -EF +FC 1C 00 8C @@ -2586,10 +2589,10 @@ EF B5 06 00 -02 +00 75 00 -FC +FA 75 4D 00 @@ -2597,7 +2600,7 @@ FC B5 1C FA -A6 +BC 30 02 70 @@ -2618,7 +2621,7 @@ E4 E3 00 2E -3C +00 BC 2A 3C @@ -2638,28 +2641,28 @@ E3 2B E3 00 -C6 +C4 00 FE D0 2B E3 3C -3C +00 0A 5E 08 2B B5 00 -72 +7C 00 00 00 00 1F FA -2A +40 70 00 46 @@ -2690,7 +2693,7 @@ E3 30 C0 FA -EC +02 70 00 16 @@ -2728,45 +2731,45 @@ E1 75 50 00 -28 +3E 00 00 -8C +8E 3C 24 00 -1A +30 3C 25 00 -12 +28 3C 2E 00 -0A +20 3C 22 0C 1D 4D 00 -36 +38 4A 75 3C 28 -40 +42 00 B6 29 06 7A -6C +76 2C 1D 06 00 -C6 +C4 1D 15 3C @@ -2785,15 +2788,16 @@ D0 00 6A 28 -8F +EF +04 00 -0E +0C 00 E2 2B B5 00 -84 +8E 06 48 90 @@ -2803,36 +2807,36 @@ B5 BC 3C B3 -D4 +D2 3C B2 00 -5E +5C 3C AE 06 3C 2C -C6 +C4 3C AB 00 14 -3C +00 BF 00 -58 +54 7C 7F 40 FA -90 +A4 30 00 70 00 FA -38 +4C 30 00 12 @@ -2840,18 +2844,18 @@ F0 00 D0 00 -58 +56 2B B5 00 -FE +FA 75 00 -4A +48 2B B5 00 -F0 +EC 75 7C 00 @@ -2859,30 +2863,30 @@ B5 1D 75 00 -EA +E8 2B B5 00 -D8 +D4 1D 3C 2C 00 -FA +F6 2B 90 00 -A2 +AA 5F 75 00 -C8 +C6 2B B5 00 -B6 +B2 00 -C4 +CE 00 1D 3C @@ -2890,14 +2894,14 @@ C4 0C 00 00 -6A +72 00 1F 1D 3C 29 00 -C0 +BC 75 16 80 @@ -2915,7 +2919,7 @@ E0 28 00 00 -EA +F4 00 1E 00 @@ -2924,22 +2928,22 @@ EA 00 C8 00 -52 +50 06 00 -3E +48 42 7C 00 B5 00 -B4 +BC 48 00 6B 98 00 -AC +B4 00 04 81 @@ -2969,16 +2973,16 @@ FF 2B E1 00 -D2 +DC FF 00 -CC +D6 00 -58 +56 FF 70 00 -5C +5A F2 75 2E @@ -3006,10 +3010,10 @@ A0 00 24 00 -86 +8E 00 00 -2E +38 00 62 02 @@ -3032,12 +3036,12 @@ A0 75 00 00 -F0 +EE 41 B4 D4 00 -A8 +A4 00 EB 6A @@ -3051,7 +3055,7 @@ B5 00 41 00 -C8 +C6 EE B0 EA @@ -3062,7 +3066,7 @@ EA 80 6B 00 -B2 +B0 10 3C 26 @@ -3071,7 +3075,7 @@ B2 80 6C 00 -A0 +9E 2B DF 0E @@ -3082,7 +3086,7 @@ DF EB 32 1C -3C +00 28 00 F4 @@ -3112,12 +3116,12 @@ FA 60 D7 00 -CE +CA 2B 00 DF 00 -CC +C8 6B 42 0A @@ -3181,29 +3185,29 @@ DB 88 75 00 -C4 +C2 00 -48 +46 2B 95 00 -70 +6C 2B A0 94 00 -58 -00 62 +00 +5E 2B 95 00 -4C +56 2B 90 80 00 -50 +4C 40 2A 75 @@ -3217,7 +3221,7 @@ BC 40 40 00 -24 +20 5F 6A 1F @@ -3227,14 +3231,14 @@ BC 00 41 00 -6A +68 3C 2C D6 41 DB 00 -48 +46 5F B4 6B @@ -3256,7 +3260,7 @@ E4 2B B4 00 -D2 +CE 00 58 48 @@ -3266,11 +3270,11 @@ DB 00 94 00 -92 +8E 2B B4 00 -8E +8A 00 3C 2B @@ -3299,7 +3303,7 @@ EE EB A8 00 -88 +84 EB 46 0C @@ -3308,7 +3312,7 @@ EB EB 46 00 -76 +72 48 42 00 @@ -3344,7 +3348,7 @@ A8 18 57 00 -26 +22 80 02 3A @@ -3386,20 +3390,20 @@ C1 42 42 00 -DA +D6 82 00 -D4 +D0 AB A8 00 -CC +C8 75 2B B5 04 00 -10 +18 00 CC 2B @@ -3415,11 +3419,11 @@ B5 40 90 00 -36 +3E 3C 01 00 -2E +36 2B E5 BC @@ -3429,11 +3433,11 @@ D8 2B 52 00 -70 +6C 75 AB 00 -C4 +C2 7C 80 DF @@ -3445,22 +3449,22 @@ E0 1D 28 00 -78 +74 7C 7E DF 00 B4 00 -94 +92 BD 00 -98 +96 2B 6A 0D 00 -1C +1A 6B B0 9F @@ -3471,7 +3475,7 @@ B0 81 DF 00 -80 +7E 00 94 2B @@ -3480,9 +3484,9 @@ B5 15 28 00 -32 +2E 00 -54 +52 5F 48 B0 @@ -3495,13 +3499,13 @@ DA 1F 18 00 -DC +DA 12 EB 76 C9 00 -D4 +D0 28 04 10 @@ -3516,11 +3520,11 @@ B5 B0 50 00 -C6 +C4 00 -24 +22 00 -E2 +DE 5F 1F 5F @@ -3534,17 +3538,17 @@ E2 1F 18 00 -8E +8C 75 2B B5 00 -E4 +EE 48 00 -16 +14 00 -40 +4A 22 02 00 @@ -3584,7 +3588,7 @@ EB 76 C9 00 -2E +2A 01 08 4C @@ -3623,7 +3627,7 @@ EB 2B DE 00 -00 +FC 09 0A 5F @@ -3642,16 +3646,19 @@ E0 40 6B 3A -88 +E8 +04 6B 3E -06 -7E +08 +00 +84 E8 0A CA -F6 -88 +F4 +E8 +FC 6B 42 24 @@ -3668,7 +3675,7 @@ F6 C0 E8 0A -52 +54 48 C2 F8 @@ -3678,11 +3685,12 @@ D8 4C EB 8E -04 -3C -88 +06 +3E +E8 +06 C8 -F8 +F6 09 2C 51 @@ -3706,7 +3714,7 @@ FC 51 46 00 -74 +6C DF 07 75 @@ -3734,15 +3742,15 @@ AB 46 75 7A -44 +3A 2B 90 00 -18 +0E 2B B5 00 -FA +EE 5F 6B 90 @@ -3751,10 +3759,10 @@ FA 69 04 00 -E4 +D8 08 00 -BE +B6 48 98 57 @@ -3772,12 +3780,12 @@ BE 98 08 00 -80 +78 81 AB 4E 00 -76 +6E 00 14 6B @@ -3820,13 +3828,13 @@ DF 30 01 00 -3A +32 80 00 -1A +12 41 00 -A8 +9E 81 22 00 @@ -3836,7 +3844,7 @@ A8 14 41 00 -94 +8A 81 0E 28 @@ -3848,7 +3856,7 @@ A8 04 48 00 -02 +FA 49 00 8A @@ -3857,12 +3865,12 @@ DF 00 66 00 -D6 +CE 00 47 00 00 -74 +6A 3C 2C 0C @@ -3873,12 +3881,12 @@ D8 5F 00 00 -4A +40 1F 00 80 00 -0A +FE 68 04 B8 @@ -3898,7 +3906,7 @@ A4 56 48 00 -9E +96 C1 C1 01 @@ -3922,7 +3930,7 @@ EA 26 48 00 -6E +66 C1 C1 01 @@ -3940,51 +3948,51 @@ DF CA EA 00 -30 +28 1D 00 -DE +D6 00 -BA +B0 2B B5 00 -5C +50 10 00 -BC +B4 7A -B8 +B0 00 B6 00 B2 40 00 -64 +58 10 00 -C4 +BC 00 -A2 +98 00 -26 +1C 00 -DC +D4 80 81 80 00 -48 +3C 75 00 -12 +08 00 -C8 +C0 40 40 00 -36 +2A 40 75 00 @@ -3999,9 +4007,9 @@ C0 BC 00 00 -62 +58 00 -36 +42 5F 1F 80 @@ -4011,99 +4019,99 @@ BC 94 75 00 -D0 +C6 00 -8E +86 00 00 -34 +2A 9A 5F 75 1E 00 -28 +1E 00 -B6 +AC 00 -74 +6C 40 40 06 40 00 -D6 +CA 40 5F 75 00 -9C +92 00 -5A +52 00 00 00 -7C +70 57 80 D0 00 -48 +40 40 10 00 -14 +0C A8 80 75 00 -36 +2E 08 00 -5A +4E 00 88 00 10 00 -D8 +D0 00 -20 +18 08 00 -44 +38 00 88 10 00 -C4 +BC 8C 80 75 A6 00 -B0 +A6 00 -3E +34 00 -FC +F4 5F 80 75 00 -B6 +AE 08 2B B5 00 -94 +8A 00 -A8 +A0 5F 2B B5 00 -28 +1C 10 D2 C0 @@ -4116,13 +4124,13 @@ D8 AB 06 00 -64 +5A EB 18 EB 1E 7A -6C +62 00 50 75 @@ -4132,10 +4140,10 @@ EB 00 00 00 -58 +4E 06 00 -42 +38 00 1F 5F @@ -4157,7 +4165,7 @@ F8 2B 94 00 -36 +38 EB 98 2B @@ -4195,7 +4203,7 @@ AB 2B 94 00 -8C +80 40 90 75 @@ -4210,8 +4218,9 @@ C8 90 AB 90 -08 +0A 2B +FF 95 AB 90 @@ -4245,15 +4254,15 @@ FC 2B 95 00 -2C +1E 00 47 9E 2B 94 00 -1E -BC +10 +87 00 81 7C @@ -4269,7 +4278,7 @@ BC 00 9C 00 -1A +18 00 40 9C @@ -4287,7 +4296,7 @@ BC 48 2B 94 -3C +01 82 01 2B @@ -4298,7 +4307,7 @@ A8 00 00 FA -F4 +FE 1E 01 06 @@ -4361,7 +4370,7 @@ F8 95 9E 00 -62 +60 75 E7 00 @@ -4377,12 +4386,12 @@ E7 2B 94 0A -3C +00 80 00 -1A +0C 06 -3C +00 80 54 40 @@ -4400,7 +4409,7 @@ C2 42 C2 C2 -BC +81 00 00 41 @@ -4408,10 +4417,10 @@ BC 80 84 06 -BC +83 01 00 -BC +81 00 00 41 @@ -4439,12 +4448,12 @@ EE 2B 94 00 -90 +82 2B 9C 66 42 -7C +40 80 6B 9E @@ -4484,7 +4493,7 @@ C5 43 00 00 -4A +3C 1F 40 94 @@ -4580,7 +4589,7 @@ C6 20 2B 90 -BC +80 00 80 0A @@ -4588,7 +4597,7 @@ BC 2B 94 00 -7A +6C 3C 00 40 @@ -4617,7 +4626,7 @@ E6 94 80 00 -D2 +D0 7C 00 95 @@ -4652,7 +4661,7 @@ A0 2B 94 00 -FA +EC 0E 2B 95 @@ -4660,7 +4669,7 @@ FA 80 16 00 -EA +DC 3C 20 02 @@ -4688,13 +4697,13 @@ AB 90 75 FA -F0 +FA 00 -30 +24 2B 52 FA -DE +E8 00 EB CC @@ -4712,7 +4721,7 @@ FA 41 42 E6 -3C +00 30 80 00 @@ -4722,12 +4731,12 @@ EB D5 C9 00 -F0 +E4 10 30 EE 00 -E6 +DA EB C6 20 @@ -4836,7 +4845,7 @@ DA 95 9E 00 -AC +AA 00 7C 01 @@ -4872,7 +4881,7 @@ BC 00 80 FA -14 +1E 30 00 00 @@ -4886,9 +4895,9 @@ F2 EE 06 00 -3C +00 0B -3C +00 2F 42 41 @@ -4940,10 +4949,10 @@ BC AD 2F 00 -3C +02 0A F8 -3C +02 3A 80 03 @@ -5004,15 +5013,15 @@ E8 9D 2B 94 -7C +41 80 00 -38 +2A 2B 90 A0 00 -2E +20 02 80 2B @@ -5058,7 +5067,7 @@ C0 2B 95 00 -CE +C0 00 40 90 @@ -5076,7 +5085,7 @@ CE B4 02 81 -3C +01 81 41 94 @@ -5126,7 +5135,7 @@ AA D9 2B 94 -3C +05 80 24 2B @@ -5134,7 +5143,7 @@ D9 00 05 46 -7C +46 20 A9 41 @@ -5163,7 +5172,7 @@ CA 90 2B 94 -7C +45 82 45 A8 @@ -5172,7 +5181,7 @@ A8 A3 10 FA -20 +2A 00 03 36 @@ -5259,7 +5268,7 @@ F2 43 94 00 -3C +2E 00 D4 00 @@ -5275,7 +5284,7 @@ A3 95 9E 00 -3E +3C 7C 00 B4 @@ -5295,12 +5304,12 @@ C2 94 1C FA -2A +34 2B 90 00 10 -3C +00 80 18 3C @@ -5314,7 +5323,7 @@ AE 00 00 03 -5C +62 00 3C 1E @@ -5324,17 +5333,20 @@ AE 95 9E 86 -04 +06 2B +FF 95 86 -08 +0C 2B +FF B4 2B +FF 9E 8E -CA +C4 01 28 FC @@ -5371,7 +5383,7 @@ B4 42 94 00 -F8 +F2 2B 94 00 @@ -5398,7 +5410,7 @@ B4 95 9E 00 -76 +70 7C FF B4 @@ -5409,7 +5421,7 @@ B4 94 A8 FA -C6 +CA 00 3C 00 @@ -5437,7 +5449,7 @@ F2 46 90 00 -74 +6E 2B B4 26 @@ -5457,59 +5469,59 @@ A2 FF 9E 00 -D2 +CA 47 95 75 00 -A8 +A0 3C 08 00 -A2 +8E D0 75 00 -98 +90 3C 08 00 -92 +7E 90 75 1D 00 -86 +7E 3C 08 00 -80 +6C 00 00 -C4 +B2 3C 29 00 -7E +6A 00 -B6 +A4 00 10 00 -14 +0E FF 00 -0E +08 2B B5 00 -10 +FC 6B 90 2A 04 00 -04 +F0 00 00 00 @@ -5519,23 +5531,23 @@ B5 00 41 00 -DA +CA 1D 3C 2C 00 -3A +26 00 -8C +8E 02 00 -DC +C8 00 -08 +F6 2B B5 00 -F8 +E4 2B 94 32 @@ -5549,13 +5561,13 @@ F8 40 41 FA -40 +44 70 02 98 30 00 -7C +40 00 40 9C @@ -5563,11 +5575,11 @@ FA 00 9E 00 -FE +F6 00 -76 +70 00 -FC +FE EB C6 00 @@ -5591,7 +5603,7 @@ EA 3C 2D 00 -A8 +94 46 32 00 @@ -5780,17 +5792,17 @@ EC 4C 90 00 -18 +10 2F 04 20 40 06 00 -82 +84 02 14 -3C +3E 6F 04 06 @@ -5799,7 +5811,7 @@ EC 4C 90 00 -F2 +EA 1D 3C 29 @@ -5809,18 +5821,19 @@ CA 2B 46 00 -40 +38 41 46 48 00 5F 00 -32 -8F +2A +EF +08 49 00 -80 +6E 6F 04 29 @@ -5834,9 +5847,9 @@ CA 02 47 00 -7E +6C 00 -60 +4E 6F 04 51 @@ -5914,7 +5927,7 @@ AE 3C 21 00 -22 +0C 1F EB B6 @@ -5932,7 +5945,7 @@ D6 01 0E 81 -BC +81 00 D6 F3 @@ -5951,11 +5964,11 @@ C9 02 48 00 -34 +22 3C 09 00 -D0 +BA 07 EB CE @@ -5965,7 +5978,7 @@ CE 3C 0F 03 -3C +05 F6 04 83 @@ -5985,7 +5998,7 @@ E9 20 EA 00 -06 +F2 2B EA 04 @@ -6007,49 +6020,50 @@ EA 01 75 00 -52 +3E 2B B5 00 -40 -2C +2A +2E FC 00 -B2 +AA F6 00 -3C +28 2B B5 00 -2A -16 +14 +18 FC 00 -9C +94 F6 3C 29 00 -44 -8F +2E +EF +04 00 -7A +64 00 -78 +62 3C 2C -E8 +E6 2B 94 2B 90 00 -06 +F0 2B B5 00 -F4 +DC 5F 98 1F @@ -6061,18 +6075,18 @@ F4 2B 9E 00 -C2 +B8 3C 2C 2C 00 -9A +8E 00 12 3C 10 00 -E6 +CE 2B E2 04 @@ -6081,28 +6095,28 @@ E2 40 E6 00 -1E +08 2C 3C 2C 00 -D6 +BE 00 -6A +5E 00 00 -C0 +A8 3C 01 00 -B8 +A0 2B E6 08 2B E6 00 -AA +92 40 E2 2B @@ -6129,7 +6143,7 @@ E7 2B 95 00 -74 +5C 2B 94 F0 @@ -6162,32 +6176,32 @@ E6 90 2B 94 -7C +40 80 48 02 40 -7C +40 80 40 94 DF 1E 00 -B2 +A8 1D 00 -6A +56 00 -46 +30 08 00 -50 +3C EB 00 08 00 -46 +32 7C 0F A2 @@ -6216,7 +6230,7 @@ B5 41 AF 00 -10 +FA 3C 3C 2D @@ -6229,7 +6243,7 @@ FF 2B 06 00 -F4 +DE 22 3C 2E @@ -6246,26 +6260,26 @@ F4 00 8C 00 -D2 +BC 6C 00 A8 F4 83 00 -C4 +AE F8 3C 2E 06 00 -B8 +A2 FA 3C 45 64 00 -AC +96 28 3C 2D @@ -6283,23 +6297,23 @@ AF 3C B2 00 -4C +34 00 -84 +6E 36 FC 0A BC 00 FF -3C +00 30 80 3C 30 E4 00 -68 +52 FA 18 3C @@ -6308,7 +6322,7 @@ FA A6 83 00 -56 +40 9E 00 2C @@ -6331,7 +6345,7 @@ BC 00 26 00 -DC +C4 BC FF DA @@ -6361,7 +6375,7 @@ FA DF 3E 00 -64 +5A 00 01 43 @@ -6376,29 +6390,29 @@ DF B5 20 00 -CE +B8 14 3C 20 -3C +00 61 2A 3C 06 24 -3C +00 3A 6C E2 83 00 -62 +4A 00 -AA +94 F4 3C 20 -3C +00 61 06 3C @@ -6425,7 +6439,7 @@ DF B5 20 00 -6C +56 D2 3C 32 @@ -6435,9 +6449,9 @@ CC EE 83 00 -0C +F4 00 -54 +3E BA 3C 32 @@ -6455,7 +6469,7 @@ BE BC 00 FF -3C +00 30 80 B0 @@ -6916,148 +6930,148 @@ AA 00 00 00 -C8 -FC -68 -1C -5C -36 -82 -8E -2C -84 -4C -44 -F6 -72 -08 -B2 -D0 -BA -24 -32 -34 -22 -26 -C6 -A2 -D2 -D8 -2A -60 B2 +E6 +52 +06 +46 22 +6C +78 +16 +6E +36 2E -48 -44 -F4 -54 -E8 -EC -A2 +E0 +5C +F2 +9C +BA +A4 +0E +1C +28 +16 +1A B2 -E4 -E4 -E4 -E8 -30 -30 -E4 -E4 -E4 -E4 -E4 -E4 -E4 -E4 -E4 -E4 -E4 -D6 -E4 -D6 -D6 -D6 -D6 -E4 -1E +96 +C6 +CC 1E +4A +9C +0C +18 +30 +2C +DC +54 +D2 +E0 +9E +AE +D0 +D0 +D0 +D2 +1A +1A +D0 +D0 +D0 +D0 +D0 +D0 +D0 +D0 +D0 +D0 +D0 +C2 +D0 +C2 +C2 +C2 +C2 +D0 +0A +0A +00 +00 +00 +DE +DE +DE 00 00 -00 -F2 -F2 -F2 -00 -00 -FC -FC -FC E8 -5E -E0 -70 -7E -E2 -14 -38 -28 -80 -0E -7C -94 -5A +E8 +E8 +D2 54 -FA -0C +D6 +66 +72 +CE +00 +38 +1E +76 +04 +72 +8A +50 +50 +EE +00 +16 +32 +F6 +76 +3A +E8 +B8 +20 +DA +88 22 -3E -0A -82 46 -F4 -C4 -2C -DC -8A -26 -48 -5E +5C AA B4 C4 9A -26 -3C +1A +30 +44 +74 50 -80 -54 79 -84 +78 79 -70 +64 7B -26 +1C 7B -B2 +A8 7F -0C +02 50 -C6 +B2 46 -B6 +A2 46 -BE +AA 56 -6A 56 -5A +56 +46 7D -70 +66 5A -DC +C8 64 -E6 +D2 F0 C0 01 @@ -7803,389 +7817,3 @@ B6 35 0D 00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 -00 \ No newline at end of file diff --git a/roms/helloworld.L68 b/roms/helloworld.L68 index 9bf6682..1248e86 100644 --- a/roms/helloworld.L68 +++ b/roms/helloworld.L68 @@ -1,6 +1,6 @@ 00010008 Starting Address Assembler used: EASy68K Editor/Assembler v5.16.01 -Created On: 10/07/2020 17:04:20 +Created On: 15/08/2020 15:51:42 00000000 1 *----------------------------------------------------------- 00000000 2 * Program :Hello World diff --git a/zed68k.hw/hw_1/hw.xml b/zed68k.hw/hw_1/hw.xml index 4324e9c..8e2b94a 100644 --- a/zed68k.hw/hw_1/hw.xml +++ b/zed68k.hw/hw_1/hw.xml @@ -4,7 +4,7 @@ - + diff --git a/zed68k.hw/hw_1/layout/hw_ila_1.layout b/zed68k.hw/hw_1/layout/hw_ila_1.layout deleted file mode 100644 index 04cd0bb..0000000 --- a/zed68k.hw/hw_1/layout/hw_ila_1.layout +++ /dev/null @@ -1,4782 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/zed68k.ip_user_files/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_sim_netlist.v b/zed68k.ip_user_files/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_sim_netlist.v index b0206d8..ae3e1fe 100644 --- a/zed68k.ip_user_files/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_sim_netlist.v +++ b/zed68k.ip_user_files/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_sim_netlist.v @@ -1,7 +1,7 @@ // Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. // -------------------------------------------------------------------------------- // Tool Version: Vivado v.2020.1 (win64) Build 2902540 Wed May 27 19:54:49 MDT 2020 -// Date : Sat Aug 1 16:05:46 2020 +// Date : Sat Aug 15 12:49:04 2020 // Host : DESKTOP-ID021MN running 64-bit major release (build 9200) // Command : write_verilog -force -mode funcsim // d:/code/zed-68k/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_sim_netlist.v @@ -27,7 +27,7 @@ module design_1_UART_FIFO_IO_cntl_pr_0_0 uart_tx_wr_en, fifoM_wr_en, fifoM_rd_en); - (* x_interface_info = "xilinx.com:signal:clock:1.0 clk CLK" *) (* x_interface_parameter = "XIL_INTERFACENAME clk, ASSOCIATED_RESET rst, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.0, CLK_DOMAIN /clk_wiz_0_clk_out1, INSERT_VIP 0" *) input clk; + (* x_interface_info = "xilinx.com:signal:clock:1.0 clk CLK" *) (* x_interface_parameter = "XIL_INTERFACENAME clk, ASSOCIATED_RESET rst, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.000, CLK_DOMAIN design_1_clk100_i, INSERT_VIP 0" *) input clk; (* x_interface_info = "xilinx.com:signal:reset:1.0 rst RST" *) (* x_interface_parameter = "XIL_INTERFACENAME rst, POLARITY ACTIVE_LOW, INSERT_VIP 0" *) input rst; input uart_rx_dv; input uart_tx_rfd; diff --git a/zed68k.ip_user_files/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_sim_netlist.vhdl b/zed68k.ip_user_files/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_sim_netlist.vhdl index 2cc512a..a128eae 100644 --- a/zed68k.ip_user_files/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_sim_netlist.vhdl +++ b/zed68k.ip_user_files/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_sim_netlist.vhdl @@ -1,7 +1,7 @@ -- Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. -- -------------------------------------------------------------------------------- -- Tool Version: Vivado v.2020.1 (win64) Build 2902540 Wed May 27 19:54:49 MDT 2020 --- Date : Sat Aug 1 16:05:46 2020 +-- Date : Sat Aug 15 12:49:04 2020 -- Host : DESKTOP-ID021MN running 64-bit major release (build 9200) -- Command : write_vhdl -force -mode funcsim -- d:/code/zed-68k/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_sim_netlist.vhdl @@ -140,7 +140,7 @@ architecture STRUCTURE of design_1_UART_FIFO_IO_cntl_pr_0_0 is attribute x_interface_info : string; attribute x_interface_info of clk : signal is "xilinx.com:signal:clock:1.0 clk CLK"; attribute x_interface_parameter : string; - attribute x_interface_parameter of clk : signal is "XIL_INTERFACENAME clk, ASSOCIATED_RESET rst, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.0, CLK_DOMAIN /clk_wiz_0_clk_out1, INSERT_VIP 0"; + attribute x_interface_parameter of clk : signal is "XIL_INTERFACENAME clk, ASSOCIATED_RESET rst, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.000, CLK_DOMAIN design_1_clk100_i, INSERT_VIP 0"; attribute x_interface_info of rst : signal is "xilinx.com:signal:reset:1.0 rst RST"; attribute x_interface_parameter of rst : signal is "XIL_INTERFACENAME rst, POLARITY ACTIVE_LOW, INSERT_VIP 0"; begin diff --git a/zed68k.ip_user_files/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/sim/design_1_UART_FIFO_IO_cntl_pr_0_0.vhd b/zed68k.ip_user_files/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/sim/design_1_UART_FIFO_IO_cntl_pr_0_0.vhd index c9df430..19881a3 100644 --- a/zed68k.ip_user_files/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/sim/design_1_UART_FIFO_IO_cntl_pr_0_0.vhd +++ b/zed68k.ip_user_files/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/sim/design_1_UART_FIFO_IO_cntl_pr_0_0.vhd @@ -93,7 +93,7 @@ ARCHITECTURE design_1_UART_FIFO_IO_cntl_pr_0_0_arch OF design_1_UART_FIFO_IO_cnt ATTRIBUTE X_INTERFACE_PARAMETER : STRING; ATTRIBUTE X_INTERFACE_PARAMETER OF rst: SIGNAL IS "XIL_INTERFACENAME rst, POLARITY ACTIVE_LOW, INSERT_VIP 0"; ATTRIBUTE X_INTERFACE_INFO OF rst: SIGNAL IS "xilinx.com:signal:reset:1.0 rst RST"; - ATTRIBUTE X_INTERFACE_PARAMETER OF clk: SIGNAL IS "XIL_INTERFACENAME clk, ASSOCIATED_RESET rst, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.0, CLK_DOMAIN /clk_wiz_0_clk_out1, INSERT_VIP 0"; + ATTRIBUTE X_INTERFACE_PARAMETER OF clk: SIGNAL IS "XIL_INTERFACENAME clk, ASSOCIATED_RESET rst, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.000, CLK_DOMAIN design_1_clk100_i, INSERT_VIP 0"; ATTRIBUTE X_INTERFACE_INFO OF clk: SIGNAL IS "xilinx.com:signal:clock:1.0 clk CLK"; BEGIN U0 : UART_FIFO_IO_cntl_proc diff --git a/zed68k.ip_user_files/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_sim_netlist.v b/zed68k.ip_user_files/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_sim_netlist.v index 3c3ed6a..23b4b18 100644 --- a/zed68k.ip_user_files/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_sim_netlist.v +++ b/zed68k.ip_user_files/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_sim_netlist.v @@ -1,7 +1,7 @@ // Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. // -------------------------------------------------------------------------------- // Tool Version: Vivado v.2020.1 (win64) Build 2902540 Wed May 27 19:54:49 MDT 2020 -// Date : Sat Aug 1 16:05:47 2020 +// Date : Sat Aug 15 12:49:05 2020 // Host : DESKTOP-ID021MN running 64-bit major release (build 9200) // Command : write_verilog -force -mode funcsim // d:/code/zed-68k/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_sim_netlist.v @@ -20,7 +20,7 @@ module design_1_UART_RX_0_0 i_RX_Serial, o_RX_DV, o_RX_Byte); - (* x_interface_info = "xilinx.com:signal:clock:1.0 i_Clk CLK" *) (* x_interface_parameter = "XIL_INTERFACENAME i_Clk, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.0, CLK_DOMAIN /clk_wiz_0_clk_out1, INSERT_VIP 0" *) input i_Clk; + (* x_interface_info = "xilinx.com:signal:clock:1.0 i_Clk CLK" *) (* x_interface_parameter = "XIL_INTERFACENAME i_Clk, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.000, CLK_DOMAIN design_1_clk100_i, INSERT_VIP 0" *) input i_Clk; input i_RX_Serial; output o_RX_DV; output [7:0]o_RX_Byte; diff --git a/zed68k.ip_user_files/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_sim_netlist.vhdl b/zed68k.ip_user_files/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_sim_netlist.vhdl index f90857c..3f4903c 100644 --- a/zed68k.ip_user_files/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_sim_netlist.vhdl +++ b/zed68k.ip_user_files/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_sim_netlist.vhdl @@ -1,7 +1,7 @@ -- Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. -- -------------------------------------------------------------------------------- -- Tool Version: Vivado v.2020.1 (win64) Build 2902540 Wed May 27 19:54:49 MDT 2020 --- Date : Sat Aug 1 16:05:47 2020 +-- Date : Sat Aug 15 12:49:05 2020 -- Host : DESKTOP-ID021MN running 64-bit major release (build 9200) -- Command : write_vhdl -force -mode funcsim -- d:/code/zed-68k/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_sim_netlist.vhdl @@ -900,7 +900,7 @@ architecture STRUCTURE of design_1_UART_RX_0_0 is attribute x_interface_info : string; attribute x_interface_info of i_Clk : signal is "xilinx.com:signal:clock:1.0 i_Clk CLK"; attribute x_interface_parameter : string; - attribute x_interface_parameter of i_Clk : signal is "XIL_INTERFACENAME i_Clk, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.0, CLK_DOMAIN /clk_wiz_0_clk_out1, INSERT_VIP 0"; + attribute x_interface_parameter of i_Clk : signal is "XIL_INTERFACENAME i_Clk, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.000, CLK_DOMAIN design_1_clk100_i, INSERT_VIP 0"; begin U0: entity work.design_1_UART_RX_0_0_UART_RX port map ( diff --git a/zed68k.ip_user_files/bd/design_1/ip/design_1_UART_RX_0_0/sim/design_1_UART_RX_0_0.vhd b/zed68k.ip_user_files/bd/design_1/ip/design_1_UART_RX_0_0/sim/design_1_UART_RX_0_0.vhd index 6c3f185..eba737c 100644 --- a/zed68k.ip_user_files/bd/design_1/ip/design_1_UART_RX_0_0/sim/design_1_UART_RX_0_0.vhd +++ b/zed68k.ip_user_files/bd/design_1/ip/design_1_UART_RX_0_0/sim/design_1_UART_RX_0_0.vhd @@ -80,7 +80,7 @@ ARCHITECTURE design_1_UART_RX_0_0_arch OF design_1_UART_RX_0_0 IS ATTRIBUTE IP_DEFINITION_SOURCE OF design_1_UART_RX_0_0_arch: ARCHITECTURE IS "module_ref"; ATTRIBUTE X_INTERFACE_INFO : STRING; ATTRIBUTE X_INTERFACE_PARAMETER : STRING; - ATTRIBUTE X_INTERFACE_PARAMETER OF i_Clk: SIGNAL IS "XIL_INTERFACENAME i_Clk, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.0, CLK_DOMAIN /clk_wiz_0_clk_out1, INSERT_VIP 0"; + ATTRIBUTE X_INTERFACE_PARAMETER OF i_Clk: SIGNAL IS "XIL_INTERFACENAME i_Clk, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.000, CLK_DOMAIN design_1_clk100_i, INSERT_VIP 0"; ATTRIBUTE X_INTERFACE_INFO OF i_Clk: SIGNAL IS "xilinx.com:signal:clock:1.0 i_Clk CLK"; BEGIN U0 : UART_RX diff --git a/zed68k.ip_user_files/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_sim_netlist.v b/zed68k.ip_user_files/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_sim_netlist.v index d7eebc8..ab12859 100644 --- a/zed68k.ip_user_files/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_sim_netlist.v +++ b/zed68k.ip_user_files/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_sim_netlist.v @@ -1,10 +1,10 @@ // Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. // -------------------------------------------------------------------------------- // Tool Version: Vivado v.2020.1 (win64) Build 2902540 Wed May 27 19:54:49 MDT 2020 -// Date : Sat Aug 1 21:12:25 2020 +// Date : Sat Aug 1 21:12:24 2020 // Host : DESKTOP-ID021MN running 64-bit major release (build 9200) -// Command : write_verilog -force -mode funcsim -// d:/code/zed-68k/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_sim_netlist.v +// Command : write_verilog -force -mode funcsim -rename_top design_1_fifo_generator_0_0 -prefix +// design_1_fifo_generator_0_0_ design_1_fifo_generator_0_0_sim_netlist.v // Design : design_1_fifo_generator_0_0 // Purpose : This verilog netlist is a functional simulation representation of the design and should not be modified // or synthesized. This netlist cannot be used for SDF annotated simulation. @@ -609,10 +609,10 @@ module design_1_fifo_generator_0_0 .wr_rst_busy(NLW_U0_wr_rst_busy_UNCONNECTED)); endmodule -(* DEST_SYNC_FF = "2" *) (* INIT_SYNC_FF = "0" *) (* ORIG_REF_NAME = "xpm_cdc_gray" *) -(* REG_OUTPUT = "1" *) (* SIM_ASSERT_CHK = "0" *) (* SIM_LOSSLESS_GRAY_CHK = "0" *) -(* VERSION = "0" *) (* WIDTH = "9" *) (* XPM_MODULE = "TRUE" *) -(* keep_hierarchy = "true" *) (* xpm_cdc = "GRAY" *) +(* DEST_SYNC_FF = "2" *) (* INIT_SYNC_FF = "0" *) (* REG_OUTPUT = "1" *) +(* SIM_ASSERT_CHK = "0" *) (* SIM_LOSSLESS_GRAY_CHK = "0" *) (* VERSION = "0" *) +(* WIDTH = "9" *) (* XPM_MODULE = "TRUE" *) (* keep_hierarchy = "true" *) +(* xpm_cdc = "GRAY" *) module design_1_fifo_generator_0_0_xpm_cdc_gray (src_clk, src_in_bin, @@ -1435,7 +1435,6 @@ module design_1_fifo_generator_0_0_xpm_cdc_gray__2 .R(1'b0)); endmodule -(* ORIG_REF_NAME = "blk_mem_gen_generic_cstr" *) module design_1_fifo_generator_0_0_blk_mem_gen_generic_cstr (dout, rd_clk, @@ -1474,7 +1473,6 @@ module design_1_fifo_generator_0_0_blk_mem_gen_generic_cstr .wr_clk(wr_clk)); endmodule -(* ORIG_REF_NAME = "blk_mem_gen_prim_width" *) module design_1_fifo_generator_0_0_blk_mem_gen_prim_width (dout, rd_clk, @@ -1513,7 +1511,6 @@ module design_1_fifo_generator_0_0_blk_mem_gen_prim_width .wr_clk(wr_clk)); endmodule -(* ORIG_REF_NAME = "blk_mem_gen_prim_wrapper" *) module design_1_fifo_generator_0_0_blk_mem_gen_prim_wrapper (dout, rd_clk, @@ -1695,7 +1692,6 @@ module design_1_fifo_generator_0_0_blk_mem_gen_prim_wrapper .WEBWE({\DEVICE_7SERIES.NO_BMM_INFO.SDP.WIDE_PRIM18.ram_0 ,\DEVICE_7SERIES.NO_BMM_INFO.SDP.WIDE_PRIM18.ram_0 ,\DEVICE_7SERIES.NO_BMM_INFO.SDP.WIDE_PRIM18.ram_0 ,\DEVICE_7SERIES.NO_BMM_INFO.SDP.WIDE_PRIM18.ram_0 })); endmodule -(* ORIG_REF_NAME = "blk_mem_gen_top" *) module design_1_fifo_generator_0_0_blk_mem_gen_top (dout, rd_clk, @@ -1734,7 +1730,6 @@ module design_1_fifo_generator_0_0_blk_mem_gen_top .wr_clk(wr_clk)); endmodule -(* ORIG_REF_NAME = "blk_mem_gen_v8_4_4" *) module design_1_fifo_generator_0_0_blk_mem_gen_v8_4_4 (dout, rd_clk, @@ -1773,7 +1768,6 @@ module design_1_fifo_generator_0_0_blk_mem_gen_v8_4_4 .wr_clk(wr_clk)); endmodule -(* ORIG_REF_NAME = "blk_mem_gen_v8_4_4_synth" *) module design_1_fifo_generator_0_0_blk_mem_gen_v8_4_4_synth (dout, rd_clk, @@ -1812,7 +1806,6 @@ module design_1_fifo_generator_0_0_blk_mem_gen_v8_4_4_synth .wr_clk(wr_clk)); endmodule -(* ORIG_REF_NAME = "clk_x_pntrs" *) module design_1_fifo_generator_0_0_clk_x_pntrs (S, WR_PNTR_RD, @@ -2062,7 +2055,6 @@ module design_1_fifo_generator_0_0_clk_x_pntrs .src_in_bin(\src_gray_ff_reg[8] )); endmodule -(* ORIG_REF_NAME = "compare" *) module design_1_fifo_generator_0_0_compare (wr_en_0, \gmux.gm[4].gms.ms_0 , @@ -2274,7 +2266,6 @@ module design_1_fifo_generator_0_0_compare_2 .S({\NLW_gmux.gm[4].gms.ms_CARRY4_S_UNCONNECTED [3:1],ram_empty_fb_i_reg})); endmodule -(* ORIG_REF_NAME = "fifo_generator_ramfifo" *) module design_1_fifo_generator_0_0_fifo_generator_ramfifo (dout, empty, @@ -2395,7 +2386,6 @@ module design_1_fifo_generator_0_0_fifo_generator_ramfifo .wr_clk(wr_clk)); endmodule -(* ORIG_REF_NAME = "fifo_generator_top" *) module design_1_fifo_generator_0_0_fifo_generator_top (dout, empty, @@ -2517,7 +2507,7 @@ endmodule (* C_WR_DEPTH_WRCH = "16" *) (* C_WR_FREQ = "1" *) (* C_WR_PNTR_WIDTH = "9" *) (* C_WR_PNTR_WIDTH_AXIS = "10" *) (* C_WR_PNTR_WIDTH_RACH = "4" *) (* C_WR_PNTR_WIDTH_RDCH = "10" *) (* C_WR_PNTR_WIDTH_WACH = "4" *) (* C_WR_PNTR_WIDTH_WDCH = "10" *) (* C_WR_PNTR_WIDTH_WRCH = "4" *) -(* C_WR_RESPONSE_LATENCY = "1" *) (* ORIG_REF_NAME = "fifo_generator_v13_2_5" *) +(* C_WR_RESPONSE_LATENCY = "1" *) module design_1_fifo_generator_0_0_fifo_generator_v13_2_5 (backup, backup_marker, @@ -3518,7 +3508,6 @@ module design_1_fifo_generator_0_0_fifo_generator_v13_2_5 .wr_en(wr_en)); endmodule -(* ORIG_REF_NAME = "fifo_generator_v13_2_5_synth" *) module design_1_fifo_generator_0_0_fifo_generator_v13_2_5_synth (dout, empty, @@ -3573,7 +3562,6 @@ module design_1_fifo_generator_0_0_fifo_generator_v13_2_5_synth .wr_en(wr_en)); endmodule -(* ORIG_REF_NAME = "memory" *) module design_1_fifo_generator_0_0_memory (dout, rd_clk, @@ -3612,7 +3600,6 @@ module design_1_fifo_generator_0_0_memory .wr_clk(wr_clk)); endmodule -(* ORIG_REF_NAME = "rd_bin_cntr" *) module design_1_fifo_generator_0_0_rd_bin_cntr (Q, v1_reg, @@ -3897,7 +3884,6 @@ module design_1_fifo_generator_0_0_rd_bin_cntr .O(v1_reg[3])); endmodule -(* ORIG_REF_NAME = "rd_dc_as" *) module design_1_fifo_generator_0_0_rd_dc_as (rd_data_count, WR_PNTR_RD, @@ -4028,7 +4014,6 @@ module design_1_fifo_generator_0_0_rd_dc_as .R(1'b0)); endmodule -(* ORIG_REF_NAME = "rd_handshaking_flags" *) module design_1_fifo_generator_0_0_rd_handshaking_flags (valid, ram_valid_i, @@ -4051,7 +4036,6 @@ module design_1_fifo_generator_0_0_rd_handshaking_flags .R(1'b0)); endmodule -(* ORIG_REF_NAME = "rd_logic" *) module design_1_fifo_generator_0_0_rd_logic (empty, valid, @@ -4132,7 +4116,6 @@ module design_1_fifo_generator_0_0_rd_logic .v1_reg(\c1/v1_reg )); endmodule -(* ORIG_REF_NAME = "rd_status_flags_as" *) module design_1_fifo_generator_0_0_rd_status_flags_as (empty, E, @@ -4214,7 +4197,6 @@ module design_1_fifo_generator_0_0_rd_status_flags_as .R(1'b0)); endmodule -(* ORIG_REF_NAME = "reset_blk_ramfifo" *) module design_1_fifo_generator_0_0_reset_blk_ramfifo (); @@ -4227,7 +4209,6 @@ module design_1_fifo_generator_0_0_reset_blk_ramfifo .O(rst_wr_reg2)); endmodule -(* ORIG_REF_NAME = "wr_bin_cntr" *) module design_1_fifo_generator_0_0_wr_bin_cntr (S, Q, @@ -4634,7 +4615,6 @@ module design_1_fifo_generator_0_0_wr_bin_cntr .O(S[0])); endmodule -(* ORIG_REF_NAME = "wr_dc_as" *) module design_1_fifo_generator_0_0_wr_dc_as (wr_data_count, Q, @@ -4773,7 +4753,6 @@ module design_1_fifo_generator_0_0_wr_dc_as .R(1'b0)); endmodule -(* ORIG_REF_NAME = "wr_handshaking_flags" *) module design_1_fifo_generator_0_0_wr_handshaking_flags (wr_ack, E, @@ -4794,7 +4773,6 @@ module design_1_fifo_generator_0_0_wr_handshaking_flags .R(1'b0)); endmodule -(* ORIG_REF_NAME = "wr_logic" *) module design_1_fifo_generator_0_0_wr_logic (full, wr_ack, @@ -4879,7 +4857,6 @@ module design_1_fifo_generator_0_0_wr_logic .wr_clk(wr_clk)); endmodule -(* ORIG_REF_NAME = "wr_status_flags_as" *) module design_1_fifo_generator_0_0_wr_status_flags_as (full, E, diff --git a/zed68k.ip_user_files/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_sim_netlist.vhdl b/zed68k.ip_user_files/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_sim_netlist.vhdl index 8f83a6b..6c7200e 100644 --- a/zed68k.ip_user_files/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_sim_netlist.vhdl +++ b/zed68k.ip_user_files/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_sim_netlist.vhdl @@ -1,10 +1,10 @@ -- Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. -- -------------------------------------------------------------------------------- -- Tool Version: Vivado v.2020.1 (win64) Build 2902540 Wed May 27 19:54:49 MDT 2020 --- Date : Sat Aug 1 21:12:25 2020 +-- Date : Sat Aug 1 21:12:24 2020 -- Host : DESKTOP-ID021MN running 64-bit major release (build 9200) --- Command : write_vhdl -force -mode funcsim --- d:/code/zed-68k/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_sim_netlist.vhdl +-- Command : write_vhdl -force -mode funcsim -rename_top design_1_fifo_generator_0_0 -prefix +-- design_1_fifo_generator_0_0_ design_1_fifo_generator_0_0_sim_netlist.vhdl -- Design : design_1_fifo_generator_0_0 -- Purpose : This VHDL netlist is a functional simulation representation of the design and should not be modified or -- synthesized. This netlist cannot be used for SDF annotated simulation. @@ -25,8 +25,6 @@ entity design_1_fifo_generator_0_0_xpm_cdc_gray is attribute DEST_SYNC_FF of design_1_fifo_generator_0_0_xpm_cdc_gray : entity is 2; attribute INIT_SYNC_FF : integer; attribute INIT_SYNC_FF of design_1_fifo_generator_0_0_xpm_cdc_gray : entity is 0; - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_xpm_cdc_gray : entity is "xpm_cdc_gray"; attribute REG_OUTPUT : integer; attribute REG_OUTPUT of design_1_fifo_generator_0_0_xpm_cdc_gray : entity is 1; attribute SIM_ASSERT_CHK : integer; @@ -1147,8 +1145,6 @@ entity design_1_fifo_generator_0_0_blk_mem_gen_prim_wrapper is Q : in STD_LOGIC_VECTOR ( 8 downto 0 ); din : in STD_LOGIC_VECTOR ( 7 downto 0 ) ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_blk_mem_gen_prim_wrapper : entity is "blk_mem_gen_prim_wrapper"; end design_1_fifo_generator_0_0_blk_mem_gen_prim_wrapper; architecture STRUCTURE of design_1_fifo_generator_0_0_blk_mem_gen_prim_wrapper is @@ -1362,8 +1358,6 @@ entity design_1_fifo_generator_0_0_compare is \out\ : in STD_LOGIC; comp2 : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_compare : entity is "compare"; end design_1_fifo_generator_0_0_compare; architecture STRUCTURE of design_1_fifo_generator_0_0_compare is @@ -1628,8 +1622,6 @@ entity design_1_fifo_generator_0_0_rd_bin_cntr is E : in STD_LOGIC_VECTOR ( 0 to 0 ); rd_clk : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_rd_bin_cntr : entity is "rd_bin_cntr"; end design_1_fifo_generator_0_0_rd_bin_cntr; architecture STRUCTURE of design_1_fifo_generator_0_0_rd_bin_cntr is @@ -2008,8 +2000,6 @@ entity design_1_fifo_generator_0_0_rd_dc_as is \rd_dc_i_reg[8]_0\ : in STD_LOGIC_VECTOR ( 0 to 0 ); rd_clk : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_rd_dc_as : entity is "rd_dc_as"; end design_1_fifo_generator_0_0_rd_dc_as; architecture STRUCTURE of design_1_fifo_generator_0_0_rd_dc_as is @@ -2174,8 +2164,6 @@ entity design_1_fifo_generator_0_0_rd_handshaking_flags is ram_valid_i : in STD_LOGIC; rd_clk : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_rd_handshaking_flags : entity is "rd_handshaking_flags"; end design_1_fifo_generator_0_0_rd_handshaking_flags; architecture STRUCTURE of design_1_fifo_generator_0_0_rd_handshaking_flags is @@ -2197,8 +2185,6 @@ use IEEE.STD_LOGIC_1164.ALL; library UNISIM; use UNISIM.VCOMPONENTS.ALL; entity design_1_fifo_generator_0_0_reset_blk_ramfifo is - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_reset_blk_ramfifo : entity is "reset_blk_ramfifo"; end design_1_fifo_generator_0_0_reset_blk_ramfifo; architecture STRUCTURE of design_1_fifo_generator_0_0_reset_blk_ramfifo is @@ -2235,8 +2221,6 @@ entity design_1_fifo_generator_0_0_wr_bin_cntr is E : in STD_LOGIC_VECTOR ( 0 to 0 ); wr_clk : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_wr_bin_cntr : entity is "wr_bin_cntr"; end design_1_fifo_generator_0_0_wr_bin_cntr; architecture STRUCTURE of design_1_fifo_generator_0_0_wr_bin_cntr is @@ -2774,8 +2758,6 @@ entity design_1_fifo_generator_0_0_wr_dc_as is \wr_data_count_i_reg[8]_0\ : in STD_LOGIC_VECTOR ( 0 to 0 ); wr_clk : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_wr_dc_as : entity is "wr_dc_as"; end design_1_fifo_generator_0_0_wr_dc_as; architecture STRUCTURE of design_1_fifo_generator_0_0_wr_dc_as is @@ -2954,8 +2936,6 @@ entity design_1_fifo_generator_0_0_wr_handshaking_flags is E : in STD_LOGIC_VECTOR ( 0 to 0 ); wr_clk : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_wr_handshaking_flags : entity is "wr_handshaking_flags"; end design_1_fifo_generator_0_0_wr_handshaking_flags; architecture STRUCTURE of design_1_fifo_generator_0_0_wr_handshaking_flags is @@ -2984,8 +2964,6 @@ entity design_1_fifo_generator_0_0_blk_mem_gen_prim_width is Q : in STD_LOGIC_VECTOR ( 8 downto 0 ); din : in STD_LOGIC_VECTOR ( 7 downto 0 ) ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_blk_mem_gen_prim_width : entity is "blk_mem_gen_prim_width"; end design_1_fifo_generator_0_0_blk_mem_gen_prim_width; architecture STRUCTURE of design_1_fifo_generator_0_0_blk_mem_gen_prim_width is @@ -3026,8 +3004,6 @@ entity design_1_fifo_generator_0_0_clk_x_pntrs is \src_gray_ff_reg[8]\ : in STD_LOGIC_VECTOR ( 8 downto 0 ); rd_clk : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_clk_x_pntrs : entity is "clk_x_pntrs"; end design_1_fifo_generator_0_0_clk_x_pntrs; architecture STRUCTURE of design_1_fifo_generator_0_0_clk_x_pntrs is @@ -3330,8 +3306,6 @@ entity design_1_fifo_generator_0_0_rd_status_flags_as is rd_clk : in STD_LOGIC; rd_en : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_rd_status_flags_as : entity is "rd_status_flags_as"; end design_1_fifo_generator_0_0_rd_status_flags_as; architecture STRUCTURE of design_1_fifo_generator_0_0_rd_status_flags_as is @@ -3423,8 +3397,6 @@ entity design_1_fifo_generator_0_0_wr_status_flags_as is wr_clk : in STD_LOGIC; wr_en : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_wr_status_flags_as : entity is "wr_status_flags_as"; end design_1_fifo_generator_0_0_wr_status_flags_as; architecture STRUCTURE of design_1_fifo_generator_0_0_wr_status_flags_as is @@ -3507,8 +3479,6 @@ entity design_1_fifo_generator_0_0_blk_mem_gen_generic_cstr is Q : in STD_LOGIC_VECTOR ( 8 downto 0 ); din : in STD_LOGIC_VECTOR ( 7 downto 0 ) ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_blk_mem_gen_generic_cstr : entity is "blk_mem_gen_generic_cstr"; end design_1_fifo_generator_0_0_blk_mem_gen_generic_cstr; architecture STRUCTURE of design_1_fifo_generator_0_0_blk_mem_gen_generic_cstr is @@ -3547,8 +3517,6 @@ entity design_1_fifo_generator_0_0_rd_logic is \rd_dc_i_reg[8]\ : in STD_LOGIC_VECTOR ( 0 to 0 ); rd_en : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_rd_logic : entity is "rd_logic"; end design_1_fifo_generator_0_0_rd_logic; architecture STRUCTURE of design_1_fifo_generator_0_0_rd_logic is @@ -3613,8 +3581,6 @@ entity design_1_fifo_generator_0_0_wr_logic is RD_PNTR_WR : in STD_LOGIC_VECTOR ( 8 downto 0 ); wr_en : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_wr_logic : entity is "wr_logic"; end design_1_fifo_generator_0_0_wr_logic; architecture STRUCTURE of design_1_fifo_generator_0_0_wr_logic is @@ -3702,8 +3668,6 @@ entity design_1_fifo_generator_0_0_blk_mem_gen_top is Q : in STD_LOGIC_VECTOR ( 8 downto 0 ); din : in STD_LOGIC_VECTOR ( 7 downto 0 ) ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_blk_mem_gen_top : entity is "blk_mem_gen_top"; end design_1_fifo_generator_0_0_blk_mem_gen_top; architecture STRUCTURE of design_1_fifo_generator_0_0_blk_mem_gen_top is @@ -3735,8 +3699,6 @@ entity design_1_fifo_generator_0_0_blk_mem_gen_v8_4_4_synth is Q : in STD_LOGIC_VECTOR ( 8 downto 0 ); din : in STD_LOGIC_VECTOR ( 7 downto 0 ) ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_blk_mem_gen_v8_4_4_synth : entity is "blk_mem_gen_v8_4_4_synth"; end design_1_fifo_generator_0_0_blk_mem_gen_v8_4_4_synth; architecture STRUCTURE of design_1_fifo_generator_0_0_blk_mem_gen_v8_4_4_synth is @@ -3768,8 +3730,6 @@ entity design_1_fifo_generator_0_0_blk_mem_gen_v8_4_4 is Q : in STD_LOGIC_VECTOR ( 8 downto 0 ); din : in STD_LOGIC_VECTOR ( 7 downto 0 ) ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_blk_mem_gen_v8_4_4 : entity is "blk_mem_gen_v8_4_4"; end design_1_fifo_generator_0_0_blk_mem_gen_v8_4_4; architecture STRUCTURE of design_1_fifo_generator_0_0_blk_mem_gen_v8_4_4 is @@ -3801,8 +3761,6 @@ entity design_1_fifo_generator_0_0_memory is Q : in STD_LOGIC_VECTOR ( 8 downto 0 ); din : in STD_LOGIC_VECTOR ( 7 downto 0 ) ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_memory : entity is "memory"; end design_1_fifo_generator_0_0_memory; architecture STRUCTURE of design_1_fifo_generator_0_0_memory is @@ -3838,8 +3796,6 @@ entity design_1_fifo_generator_0_0_fifo_generator_ramfifo is rd_en : in STD_LOGIC; wr_en : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_fifo_generator_ramfifo : entity is "fifo_generator_ramfifo"; end design_1_fifo_generator_0_0_fifo_generator_ramfifo; architecture STRUCTURE of design_1_fifo_generator_0_0_fifo_generator_ramfifo is @@ -3963,8 +3919,6 @@ entity design_1_fifo_generator_0_0_fifo_generator_top is rd_en : in STD_LOGIC; wr_en : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_fifo_generator_top : entity is "fifo_generator_top"; end design_1_fifo_generator_0_0_fifo_generator_top; architecture STRUCTURE of design_1_fifo_generator_0_0_fifo_generator_top is @@ -4004,8 +3958,6 @@ entity design_1_fifo_generator_0_0_fifo_generator_v13_2_5_synth is rd_en : in STD_LOGIC; wr_en : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_fifo_generator_v13_2_5_synth : entity is "fifo_generator_v13_2_5_synth"; end design_1_fifo_generator_0_0_fifo_generator_v13_2_5_synth; architecture STRUCTURE of design_1_fifo_generator_0_0_fifo_generator_v13_2_5_synth is @@ -4668,8 +4620,6 @@ entity design_1_fifo_generator_0_0_fifo_generator_v13_2_5 is attribute C_WR_PNTR_WIDTH_WRCH of design_1_fifo_generator_0_0_fifo_generator_v13_2_5 : entity is 4; attribute C_WR_RESPONSE_LATENCY : integer; attribute C_WR_RESPONSE_LATENCY of design_1_fifo_generator_0_0_fifo_generator_v13_2_5 : entity is 1; - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_fifo_generator_v13_2_5 : entity is "fifo_generator_v13_2_5"; end design_1_fifo_generator_0_0_fifo_generator_v13_2_5; architecture STRUCTURE of design_1_fifo_generator_0_0_fifo_generator_v13_2_5 is diff --git a/zed68k.ip_user_files/bd/design_1/ip/design_1_fifo_generator_0_0/sim/design_1_fifo_generator_0_0.v b/zed68k.ip_user_files/bd/design_1/ip/design_1_fifo_generator_0_0/sim/design_1_fifo_generator_0_0.v index eb85ca8..5bfc2d5 100644 --- a/zed68k.ip_user_files/bd/design_1/ip/design_1_fifo_generator_0_0/sim/design_1_fifo_generator_0_0.v +++ b/zed68k.ip_user_files/bd/design_1/ip/design_1_fifo_generator_0_0/sim/design_1_fifo_generator_0_0.v @@ -68,7 +68,7 @@ module design_1_fifo_generator_0_0 ( wr_data_count ); -(* X_INTERFACE_PARAMETER = "XIL_INTERFACENAME write_clk, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.0, CLK_DOMAIN /clk_wiz_0_clk_out1, INSERT_VIP 0" *) +(* X_INTERFACE_PARAMETER = "XIL_INTERFACENAME write_clk, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.000, CLK_DOMAIN design_1_clk100_i, INSERT_VIP 0" *) (* X_INTERFACE_INFO = "xilinx.com:signal:clock:1.0 write_clk CLK" *) input wire wr_clk; (* X_INTERFACE_PARAMETER = "XIL_INTERFACENAME read_clk, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.000, CLK_DOMAIN design_1_rd_clk, INSERT_VIP 0" *) diff --git a/zed68k.ip_user_files/bd/design_1/sim/design_1.vhd b/zed68k.ip_user_files/bd/design_1/sim/design_1.vhd index f4ce4b3..aa9f231 100644 --- a/zed68k.ip_user_files/bd/design_1/sim/design_1.vhd +++ b/zed68k.ip_user_files/bd/design_1/sim/design_1.vhd @@ -1,7 +1,7 @@ --Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. ---------------------------------------------------------------------------------- --Tool Version: Vivado v.2020.1 (win64) Build 2902540 Wed May 27 19:54:49 MDT 2020 ---Date : Tue Aug 4 21:00:57 2020 +--Date : Sat Aug 15 12:47:18 2020 --Host : DESKTOP-ID021MN running 64-bit major release (build 9200) --Command : generate_target design_1.bd --Design : design_1 diff --git a/zed68k.ip_user_files/sim_scripts/design_1/activehdl/README.txt b/zed68k.ip_user_files/sim_scripts/design_1/activehdl/README.txt index 90aa69d..4e03779 100644 --- a/zed68k.ip_user_files/sim_scripts/design_1/activehdl/README.txt +++ b/zed68k.ip_user_files/sim_scripts/design_1/activehdl/README.txt @@ -4,7 +4,7 @@ # README.txt: Please read the sections below to understand the steps required to # run the exported script and information about the source files. # -# Generated by export_simulation on Tue Aug 04 21:00:58 +0100 2020 +# Generated by export_simulation on Sat Aug 15 12:47:25 +0100 2020 # ################################################################################ diff --git a/zed68k.ip_user_files/sim_scripts/design_1/activehdl/design_1.sh b/zed68k.ip_user_files/sim_scripts/design_1/activehdl/design_1.sh index 91ecefe..f86bca4 100644 --- a/zed68k.ip_user_files/sim_scripts/design_1/activehdl/design_1.sh +++ b/zed68k.ip_user_files/sim_scripts/design_1/activehdl/design_1.sh @@ -9,7 +9,7 @@ # directory, add the library logical mappings in the simulator setup file, create default # 'do/prj' file, execute compilation, elaboration and simulation steps. # -# Generated by Vivado on Tue Aug 04 21:00:58 +0100 2020 +# Generated by Vivado on Sat Aug 15 12:47:25 +0100 2020 # SW Build 2902540 on Wed May 27 19:54:49 MDT 2020 # # Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. diff --git a/zed68k.ip_user_files/sim_scripts/design_1/ies/README.txt b/zed68k.ip_user_files/sim_scripts/design_1/ies/README.txt index b41a15e..5fd677d 100644 --- a/zed68k.ip_user_files/sim_scripts/design_1/ies/README.txt +++ b/zed68k.ip_user_files/sim_scripts/design_1/ies/README.txt @@ -4,7 +4,7 @@ # README.txt: Please read the sections below to understand the steps required to # run the exported script and information about the source files. # -# Generated by export_simulation on Tue Aug 04 21:00:58 +0100 2020 +# Generated by export_simulation on Sat Aug 15 12:47:25 +0100 2020 # ################################################################################ diff --git a/zed68k.ip_user_files/sim_scripts/design_1/ies/design_1.sh b/zed68k.ip_user_files/sim_scripts/design_1/ies/design_1.sh index d4088d8..c3e1242 100644 --- a/zed68k.ip_user_files/sim_scripts/design_1/ies/design_1.sh +++ b/zed68k.ip_user_files/sim_scripts/design_1/ies/design_1.sh @@ -9,7 +9,7 @@ # directory, add the library logical mappings in the simulator setup file, create default # 'do/prj' file, execute compilation, elaboration and simulation steps. # -# Generated by Vivado on Tue Aug 04 21:00:58 +0100 2020 +# Generated by Vivado on Sat Aug 15 12:47:25 +0100 2020 # SW Build 2902540 on Wed May 27 19:54:49 MDT 2020 # # Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. diff --git a/zed68k.ip_user_files/sim_scripts/design_1/modelsim/README.txt b/zed68k.ip_user_files/sim_scripts/design_1/modelsim/README.txt index 90aa69d..4e03779 100644 --- a/zed68k.ip_user_files/sim_scripts/design_1/modelsim/README.txt +++ b/zed68k.ip_user_files/sim_scripts/design_1/modelsim/README.txt @@ -4,7 +4,7 @@ # README.txt: Please read the sections below to understand the steps required to # run the exported script and information about the source files. # -# Generated by export_simulation on Tue Aug 04 21:00:58 +0100 2020 +# Generated by export_simulation on Sat Aug 15 12:47:25 +0100 2020 # ################################################################################ diff --git a/zed68k.ip_user_files/sim_scripts/design_1/modelsim/design_1.sh b/zed68k.ip_user_files/sim_scripts/design_1/modelsim/design_1.sh index fa4b935..666e361 100644 --- a/zed68k.ip_user_files/sim_scripts/design_1/modelsim/design_1.sh +++ b/zed68k.ip_user_files/sim_scripts/design_1/modelsim/design_1.sh @@ -9,7 +9,7 @@ # directory, add the library logical mappings in the simulator setup file, create default # 'do/prj' file, execute compilation, elaboration and simulation steps. # -# Generated by Vivado on Tue Aug 04 21:00:58 +0100 2020 +# Generated by Vivado on Sat Aug 15 12:47:25 +0100 2020 # SW Build 2902540 on Wed May 27 19:54:49 MDT 2020 # # Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. diff --git a/zed68k.ip_user_files/sim_scripts/design_1/questa/README.txt b/zed68k.ip_user_files/sim_scripts/design_1/questa/README.txt index 90aa69d..4e03779 100644 --- a/zed68k.ip_user_files/sim_scripts/design_1/questa/README.txt +++ b/zed68k.ip_user_files/sim_scripts/design_1/questa/README.txt @@ -4,7 +4,7 @@ # README.txt: Please read the sections below to understand the steps required to # run the exported script and information about the source files. # -# Generated by export_simulation on Tue Aug 04 21:00:58 +0100 2020 +# Generated by export_simulation on Sat Aug 15 12:47:25 +0100 2020 # ################################################################################ diff --git a/zed68k.ip_user_files/sim_scripts/design_1/questa/design_1.sh b/zed68k.ip_user_files/sim_scripts/design_1/questa/design_1.sh index ae3da88..2c8f604 100644 --- a/zed68k.ip_user_files/sim_scripts/design_1/questa/design_1.sh +++ b/zed68k.ip_user_files/sim_scripts/design_1/questa/design_1.sh @@ -9,7 +9,7 @@ # directory, add the library logical mappings in the simulator setup file, create default # 'do/prj' file, execute compilation, elaboration and simulation steps. # -# Generated by Vivado on Tue Aug 04 21:00:58 +0100 2020 +# Generated by Vivado on Sat Aug 15 12:47:25 +0100 2020 # SW Build 2902540 on Wed May 27 19:54:49 MDT 2020 # # Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. diff --git a/zed68k.ip_user_files/sim_scripts/design_1/riviera/README.txt b/zed68k.ip_user_files/sim_scripts/design_1/riviera/README.txt index 90aa69d..4e03779 100644 --- a/zed68k.ip_user_files/sim_scripts/design_1/riviera/README.txt +++ b/zed68k.ip_user_files/sim_scripts/design_1/riviera/README.txt @@ -4,7 +4,7 @@ # README.txt: Please read the sections below to understand the steps required to # run the exported script and information about the source files. # -# Generated by export_simulation on Tue Aug 04 21:00:58 +0100 2020 +# Generated by export_simulation on Sat Aug 15 12:47:25 +0100 2020 # ################################################################################ diff --git a/zed68k.ip_user_files/sim_scripts/design_1/riviera/design_1.sh b/zed68k.ip_user_files/sim_scripts/design_1/riviera/design_1.sh index 7819880..f22f024 100644 --- a/zed68k.ip_user_files/sim_scripts/design_1/riviera/design_1.sh +++ b/zed68k.ip_user_files/sim_scripts/design_1/riviera/design_1.sh @@ -9,7 +9,7 @@ # directory, add the library logical mappings in the simulator setup file, create default # 'do/prj' file, execute compilation, elaboration and simulation steps. # -# Generated by Vivado on Tue Aug 04 21:00:58 +0100 2020 +# Generated by Vivado on Sat Aug 15 12:47:25 +0100 2020 # SW Build 2902540 on Wed May 27 19:54:49 MDT 2020 # # Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. diff --git a/zed68k.ip_user_files/sim_scripts/design_1/vcs/README.txt b/zed68k.ip_user_files/sim_scripts/design_1/vcs/README.txt index 90aa69d..4e03779 100644 --- a/zed68k.ip_user_files/sim_scripts/design_1/vcs/README.txt +++ b/zed68k.ip_user_files/sim_scripts/design_1/vcs/README.txt @@ -4,7 +4,7 @@ # README.txt: Please read the sections below to understand the steps required to # run the exported script and information about the source files. # -# Generated by export_simulation on Tue Aug 04 21:00:58 +0100 2020 +# Generated by export_simulation on Sat Aug 15 12:47:25 +0100 2020 # ################################################################################ diff --git a/zed68k.ip_user_files/sim_scripts/design_1/vcs/design_1.sh b/zed68k.ip_user_files/sim_scripts/design_1/vcs/design_1.sh index 468898e..6b23b2f 100644 --- a/zed68k.ip_user_files/sim_scripts/design_1/vcs/design_1.sh +++ b/zed68k.ip_user_files/sim_scripts/design_1/vcs/design_1.sh @@ -9,7 +9,7 @@ # directory, add the library logical mappings in the simulator setup file, create default # 'do/prj' file, execute compilation, elaboration and simulation steps. # -# Generated by Vivado on Tue Aug 04 21:00:58 +0100 2020 +# Generated by Vivado on Sat Aug 15 12:47:25 +0100 2020 # SW Build 2902540 on Wed May 27 19:54:49 MDT 2020 # # Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. diff --git a/zed68k.ip_user_files/sim_scripts/design_1/xcelium/README.txt b/zed68k.ip_user_files/sim_scripts/design_1/xcelium/README.txt index b41a15e..5fd677d 100644 --- a/zed68k.ip_user_files/sim_scripts/design_1/xcelium/README.txt +++ b/zed68k.ip_user_files/sim_scripts/design_1/xcelium/README.txt @@ -4,7 +4,7 @@ # README.txt: Please read the sections below to understand the steps required to # run the exported script and information about the source files. # -# Generated by export_simulation on Tue Aug 04 21:00:58 +0100 2020 +# Generated by export_simulation on Sat Aug 15 12:47:25 +0100 2020 # ################################################################################ diff --git a/zed68k.ip_user_files/sim_scripts/design_1/xcelium/design_1.sh b/zed68k.ip_user_files/sim_scripts/design_1/xcelium/design_1.sh index ec3f3ad..20e6e39 100644 --- a/zed68k.ip_user_files/sim_scripts/design_1/xcelium/design_1.sh +++ b/zed68k.ip_user_files/sim_scripts/design_1/xcelium/design_1.sh @@ -9,7 +9,7 @@ # directory, add the library logical mappings in the simulator setup file, create default # 'do/prj' file, execute compilation, elaboration and simulation steps. # -# Generated by Vivado on Tue Aug 04 21:00:58 +0100 2020 +# Generated by Vivado on Sat Aug 15 12:47:25 +0100 2020 # SW Build 2902540 on Wed May 27 19:54:49 MDT 2020 # # Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. diff --git a/zed68k.ip_user_files/sim_scripts/design_1/xsim/README.txt b/zed68k.ip_user_files/sim_scripts/design_1/xsim/README.txt index 90aa69d..4e03779 100644 --- a/zed68k.ip_user_files/sim_scripts/design_1/xsim/README.txt +++ b/zed68k.ip_user_files/sim_scripts/design_1/xsim/README.txt @@ -4,7 +4,7 @@ # README.txt: Please read the sections below to understand the steps required to # run the exported script and information about the source files. # -# Generated by export_simulation on Tue Aug 04 21:00:58 +0100 2020 +# Generated by export_simulation on Sat Aug 15 12:47:25 +0100 2020 # ################################################################################ diff --git a/zed68k.ip_user_files/sim_scripts/design_1/xsim/design_1.sh b/zed68k.ip_user_files/sim_scripts/design_1/xsim/design_1.sh index 681228d..41194df 100644 --- a/zed68k.ip_user_files/sim_scripts/design_1/xsim/design_1.sh +++ b/zed68k.ip_user_files/sim_scripts/design_1/xsim/design_1.sh @@ -9,7 +9,7 @@ # directory, add the library logical mappings in the simulator setup file, create default # 'do/prj' file, execute compilation, elaboration and simulation steps. # -# Generated by Vivado on Tue Aug 04 21:00:58 +0100 2020 +# Generated by Vivado on Sat Aug 15 12:47:25 +0100 2020 # SW Build 2902540 on Wed May 27 19:54:49 MDT 2020 # # Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. diff --git a/zed68k.srcs/constrs_1/imports/ep08_-_ALU/comp.xdc b/zed68k.srcs/constrs_1/imports/ep08_-_ALU/comp.xdc index 384fb8d..e3fdffe 100644 --- a/zed68k.srcs/constrs_1/imports/ep08_-_ALU/comp.xdc +++ b/zed68k.srcs/constrs_1/imports/ep08_-_ALU/comp.xdc @@ -22,6 +22,13 @@ set_property -dict {PACKAGE_PIN B12 IOSTANDARD LVCMOS33} [get_ports vSync] set_property PULLUP true [get_ports ps2Clk] set_property PULLUP true [get_ports ps2Data] +##USB-RS232 Interface + +set_property -dict { PACKAGE_PIN C4 IOSTANDARD LVCMOS33 } [get_ports { rxd1 }]; #IO_L7P_T1_AD6P_35 Sch=uart_txd_in +set_property -dict { PACKAGE_PIN D4 IOSTANDARD LVCMOS33 } [get_ports { txd1 }]; #IO_L11N_T1_SRCC_35 Sch=uart_rxd_out +set_property -dict { PACKAGE_PIN D3 IOSTANDARD LVCMOS33 } [get_ports { cts1 }]; #IO_L12N_T1_MRCC_35 Sch=uart_cts +set_property -dict { PACKAGE_PIN E5 IOSTANDARD LVCMOS33 } [get_ports { rts1 }]; #IO_L5N_T0_AD13N_35 Sch=uart_rts + ##Micro SD Connector set_property -dict {PACKAGE_PIN E2 IOSTANDARD LVCMOS33} [get_ports SD_RESET] @@ -45,6 +52,18 @@ set_property -dict {PACKAGE_PIN E18 IOSTANDARD LVCMOS33} [get_ports ps2Clk] #set_property -dict { PACKAGE_PIN F18 IOSTANDARD LVCMOS33 } [get_ports { JA[9] }]; #IO_L22N_T3_A16_15 Sch=ja[9] #set_property -dict { PACKAGE_PIN G18 IOSTANDARD LVCMOS33 } [get_ports { JA[10] }]; #IO_L22P_T3_A17_15 Sch=ja[10] +##Pmod Header JD + +set_property -dict { PACKAGE_PIN H4 IOSTANDARD LVCMOS33 } [get_ports {rxd2 }]; #IO_L21N_T3_DQS_35 Sch=jd[1] +#set_property -dict { PACKAGE_PIN H1 IOSTANDARD LVCMOS33 } [get_ports { JD[2] }]; #IO_L17P_T2_35 Sch=jd[2] +#set_property -dict { PACKAGE_PIN G1 IOSTANDARD LVCMOS33 } [get_ports { JD[3] }]; #IO_L17N_T2_35 Sch=jd[3] +#set_property -dict { PACKAGE_PIN G3 IOSTANDARD LVCMOS33 } [get_ports { JD[4] }]; #IO_L20N_T3_35 Sch=jd[4] +#set_property -dict { PACKAGE_PIN H2 IOSTANDARD LVCMOS33 } [get_ports { JD[7] }]; #IO_L15P_T2_DQS_35 Sch=jd[7] +#set_property -dict { PACKAGE_PIN G4 IOSTANDARD LVCMOS33 } [get_ports { JD[8] }]; #IO_L20P_T3_35 Sch=jd[8] +#set_property -dict { PACKAGE_PIN G2 IOSTANDARD LVCMOS33 } [get_ports { JD[9] }]; #IO_L15N_T2_DQS_35 Sch=jd[9] +#set_property -dict { PACKAGE_PIN F3 IOSTANDARD LVCMOS33 } [get_ports { JD[10] }]; #IO_L13N_T2_MRCC_35 Sch=jd[10] + + ## Clock definition #set_property -dict {PACKAGE_PIN E3 IOSTANDARD LVCMOS33} [get_ports sys_clock] #create_clock -period 10.000 -name sys_clk_pin -waveform {0.000 5.000} -add [get_ports sys_clock] @@ -306,13 +325,6 @@ set_property -dict { PACKAGE_PIN N16 IOSTANDARD LVCMOS33 } [get_ports { LED17_ #set_property -dict { PACKAGE_PIN D12 IOSTANDARD LVCMOS33 } [get_ports { AUD_SD }]; #IO_L6P_T0_15 Sch=aud_sd -##USB-RS232 Interface - -set_property -dict { PACKAGE_PIN C4 IOSTANDARD LVCMOS33 } [get_ports { rxd1 }]; #IO_L7P_T1_AD6P_35 Sch=uart_txd_in -set_property -dict { PACKAGE_PIN D4 IOSTANDARD LVCMOS33 } [get_ports { txd1 }]; #IO_L11N_T1_SRCC_35 Sch=uart_rxd_out -#set_property -dict { PACKAGE_PIN D3 IOSTANDARD LVCMOS33 } [get_ports { cts1 }]; #IO_L12N_T1_MRCC_35 Sch=uart_cts -#set_property -dict { PACKAGE_PIN E5 IOSTANDARD LVCMOS33 } [get_ports { UART_RTS }]; #IO_L5N_T0_AD13N_35 Sch=uart_rts - ##USB HID (PS/2) #set_property -dict { PACKAGE_PIN F4 IOSTANDARD LVCMOS33 } [get_ports { PS2_CLK }]; #IO_L13P_T2_MRCC_35 Sch=ps2_clk diff --git a/zed68k.srcs/sim_1/new/cpu68k_tb.vhd b/zed68k.srcs/sim_1/new/cpu68k_tb.vhd index 01052d2..623b29b 100644 --- a/zed68k.srcs/sim_1/new/cpu68k_tb.vhd +++ b/zed68k.srcs/sim_1/new/cpu68k_tb.vhd @@ -146,6 +146,9 @@ begin rxd1 => usb_uart_rxd, txd1 => open, + cts1 => '1', + rts1 => open, + rxd2 => '0', -- DDR2 interface ddr2_addr => ddr2_addr, diff --git a/zed68k.srcs/sources_1/bd/design_1/design_1.bxml b/zed68k.srcs/sources_1/bd/design_1/design_1.bxml index c4579fc..fad821a 100644 --- a/zed68k.srcs/sources_1/bd/design_1/design_1.bxml +++ b/zed68k.srcs/sources_1/bd/design_1/design_1.bxml @@ -2,10 +2,10 @@ Composite Fileset - - - - + + + + diff --git a/zed68k.srcs/sources_1/bd/design_1/hdl/design_1_wrapper.vhd b/zed68k.srcs/sources_1/bd/design_1/hdl/design_1_wrapper.vhd index 95d26d9..4fe4e46 100644 --- a/zed68k.srcs/sources_1/bd/design_1/hdl/design_1_wrapper.vhd +++ b/zed68k.srcs/sources_1/bd/design_1/hdl/design_1_wrapper.vhd @@ -1,7 +1,7 @@ --Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. ---------------------------------------------------------------------------------- --Tool Version: Vivado v.2020.1 (win64) Build 2902540 Wed May 27 19:54:49 MDT 2020 ---Date : Tue Aug 4 21:00:57 2020 +--Date : Sat Aug 15 12:47:18 2020 --Host : DESKTOP-ID021MN running 64-bit major release (build 9200) --Command : generate_target design_1_wrapper.bd --Design : design_1_wrapper diff --git a/zed68k.srcs/sources_1/bd/design_1/hw_handoff/design_1.hwh b/zed68k.srcs/sources_1/bd/design_1/hw_handoff/design_1.hwh index be7d4bf..31efa55 100644 --- a/zed68k.srcs/sources_1/bd/design_1/hw_handoff/design_1.hwh +++ b/zed68k.srcs/sources_1/bd/design_1/hw_handoff/design_1.hwh @@ -1,5 +1,5 @@  - + diff --git a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0.dcp b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0.dcp index ea0f6e9..78deff2 100644 Binary files a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0.dcp and b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0.dcp differ diff --git a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0.xml b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0.xml index c4a9697..2cf344e 100644 --- a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0.xml +++ b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0.xml @@ -155,7 +155,7 @@ GENtimestamp - Sat Aug 01 15:03:52 UTC 2020 + Sat Aug 15 11:47:19 UTC 2020 outputProductCRC @@ -187,7 +187,7 @@ GENtimestamp - Sat Aug 01 15:03:52 UTC 2020 + Sat Aug 15 11:47:19 UTC 2020 outputProductCRC @@ -205,7 +205,7 @@ GENtimestamp - Sat Aug 01 15:05:46 UTC 2020 + Sat Aug 15 11:49:04 UTC 2020 outputProductCRC diff --git a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_sim_netlist.v b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_sim_netlist.v index b0206d8..ae3e1fe 100644 --- a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_sim_netlist.v +++ b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_sim_netlist.v @@ -1,7 +1,7 @@ // Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. // -------------------------------------------------------------------------------- // Tool Version: Vivado v.2020.1 (win64) Build 2902540 Wed May 27 19:54:49 MDT 2020 -// Date : Sat Aug 1 16:05:46 2020 +// Date : Sat Aug 15 12:49:04 2020 // Host : DESKTOP-ID021MN running 64-bit major release (build 9200) // Command : write_verilog -force -mode funcsim // d:/code/zed-68k/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_sim_netlist.v @@ -27,7 +27,7 @@ module design_1_UART_FIFO_IO_cntl_pr_0_0 uart_tx_wr_en, fifoM_wr_en, fifoM_rd_en); - (* x_interface_info = "xilinx.com:signal:clock:1.0 clk CLK" *) (* x_interface_parameter = "XIL_INTERFACENAME clk, ASSOCIATED_RESET rst, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.0, CLK_DOMAIN /clk_wiz_0_clk_out1, INSERT_VIP 0" *) input clk; + (* x_interface_info = "xilinx.com:signal:clock:1.0 clk CLK" *) (* x_interface_parameter = "XIL_INTERFACENAME clk, ASSOCIATED_RESET rst, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.000, CLK_DOMAIN design_1_clk100_i, INSERT_VIP 0" *) input clk; (* x_interface_info = "xilinx.com:signal:reset:1.0 rst RST" *) (* x_interface_parameter = "XIL_INTERFACENAME rst, POLARITY ACTIVE_LOW, INSERT_VIP 0" *) input rst; input uart_rx_dv; input uart_tx_rfd; diff --git a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_sim_netlist.vhdl b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_sim_netlist.vhdl index 2cc512a..a128eae 100644 --- a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_sim_netlist.vhdl +++ b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_sim_netlist.vhdl @@ -1,7 +1,7 @@ -- Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. -- -------------------------------------------------------------------------------- -- Tool Version: Vivado v.2020.1 (win64) Build 2902540 Wed May 27 19:54:49 MDT 2020 --- Date : Sat Aug 1 16:05:46 2020 +-- Date : Sat Aug 15 12:49:04 2020 -- Host : DESKTOP-ID021MN running 64-bit major release (build 9200) -- Command : write_vhdl -force -mode funcsim -- d:/code/zed-68k/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_sim_netlist.vhdl @@ -140,7 +140,7 @@ architecture STRUCTURE of design_1_UART_FIFO_IO_cntl_pr_0_0 is attribute x_interface_info : string; attribute x_interface_info of clk : signal is "xilinx.com:signal:clock:1.0 clk CLK"; attribute x_interface_parameter : string; - attribute x_interface_parameter of clk : signal is "XIL_INTERFACENAME clk, ASSOCIATED_RESET rst, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.0, CLK_DOMAIN /clk_wiz_0_clk_out1, INSERT_VIP 0"; + attribute x_interface_parameter of clk : signal is "XIL_INTERFACENAME clk, ASSOCIATED_RESET rst, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.000, CLK_DOMAIN design_1_clk100_i, INSERT_VIP 0"; attribute x_interface_info of rst : signal is "xilinx.com:signal:reset:1.0 rst RST"; attribute x_interface_parameter of rst : signal is "XIL_INTERFACENAME rst, POLARITY ACTIVE_LOW, INSERT_VIP 0"; begin diff --git a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_stub.v b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_stub.v index 84955b0..64b417f 100644 --- a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_stub.v +++ b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_stub.v @@ -1,7 +1,7 @@ // Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. // -------------------------------------------------------------------------------- // Tool Version: Vivado v.2020.1 (win64) Build 2902540 Wed May 27 19:54:49 MDT 2020 -// Date : Sat Aug 1 16:05:46 2020 +// Date : Sat Aug 15 12:49:04 2020 // Host : DESKTOP-ID021MN running 64-bit major release (build 9200) // Command : write_verilog -force -mode synth_stub // d:/code/zed-68k/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_stub.v diff --git a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_stub.vhdl b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_stub.vhdl index c40ddf0..3bbddeb 100644 --- a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_stub.vhdl +++ b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_stub.vhdl @@ -1,7 +1,7 @@ -- Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. -- -------------------------------------------------------------------------------- -- Tool Version: Vivado v.2020.1 (win64) Build 2902540 Wed May 27 19:54:49 MDT 2020 --- Date : Sat Aug 1 16:05:46 2020 +-- Date : Sat Aug 15 12:49:04 2020 -- Host : DESKTOP-ID021MN running 64-bit major release (build 9200) -- Command : write_vhdl -force -mode synth_stub -- d:/code/zed-68k/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/design_1_UART_FIFO_IO_cntl_pr_0_0_stub.vhdl diff --git a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/sim/design_1_UART_FIFO_IO_cntl_pr_0_0.vhd b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/sim/design_1_UART_FIFO_IO_cntl_pr_0_0.vhd index c9df430..19881a3 100644 --- a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/sim/design_1_UART_FIFO_IO_cntl_pr_0_0.vhd +++ b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/sim/design_1_UART_FIFO_IO_cntl_pr_0_0.vhd @@ -93,7 +93,7 @@ ARCHITECTURE design_1_UART_FIFO_IO_cntl_pr_0_0_arch OF design_1_UART_FIFO_IO_cnt ATTRIBUTE X_INTERFACE_PARAMETER : STRING; ATTRIBUTE X_INTERFACE_PARAMETER OF rst: SIGNAL IS "XIL_INTERFACENAME rst, POLARITY ACTIVE_LOW, INSERT_VIP 0"; ATTRIBUTE X_INTERFACE_INFO OF rst: SIGNAL IS "xilinx.com:signal:reset:1.0 rst RST"; - ATTRIBUTE X_INTERFACE_PARAMETER OF clk: SIGNAL IS "XIL_INTERFACENAME clk, ASSOCIATED_RESET rst, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.0, CLK_DOMAIN /clk_wiz_0_clk_out1, INSERT_VIP 0"; + ATTRIBUTE X_INTERFACE_PARAMETER OF clk: SIGNAL IS "XIL_INTERFACENAME clk, ASSOCIATED_RESET rst, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.000, CLK_DOMAIN design_1_clk100_i, INSERT_VIP 0"; ATTRIBUTE X_INTERFACE_INFO OF clk: SIGNAL IS "xilinx.com:signal:clock:1.0 clk CLK"; BEGIN U0 : UART_FIFO_IO_cntl_proc diff --git a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/synth/design_1_UART_FIFO_IO_cntl_pr_0_0.vhd b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/synth/design_1_UART_FIFO_IO_cntl_pr_0_0.vhd index ffc52a7..af701d4 100644 --- a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/synth/design_1_UART_FIFO_IO_cntl_pr_0_0.vhd +++ b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_FIFO_IO_cntl_pr_0_0/synth/design_1_UART_FIFO_IO_cntl_pr_0_0.vhd @@ -99,7 +99,7 @@ ARCHITECTURE design_1_UART_FIFO_IO_cntl_pr_0_0_arch OF design_1_UART_FIFO_IO_cnt ATTRIBUTE X_INTERFACE_PARAMETER : STRING; ATTRIBUTE X_INTERFACE_PARAMETER OF rst: SIGNAL IS "XIL_INTERFACENAME rst, POLARITY ACTIVE_LOW, INSERT_VIP 0"; ATTRIBUTE X_INTERFACE_INFO OF rst: SIGNAL IS "xilinx.com:signal:reset:1.0 rst RST"; - ATTRIBUTE X_INTERFACE_PARAMETER OF clk: SIGNAL IS "XIL_INTERFACENAME clk, ASSOCIATED_RESET rst, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.0, CLK_DOMAIN /clk_wiz_0_clk_out1, INSERT_VIP 0"; + ATTRIBUTE X_INTERFACE_PARAMETER OF clk: SIGNAL IS "XIL_INTERFACENAME clk, ASSOCIATED_RESET rst, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.000, CLK_DOMAIN design_1_clk100_i, INSERT_VIP 0"; ATTRIBUTE X_INTERFACE_INFO OF clk: SIGNAL IS "xilinx.com:signal:clock:1.0 clk CLK"; BEGIN U0 : UART_FIFO_IO_cntl_proc diff --git a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0.dcp b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0.dcp index d5b2e90..f43a6c5 100644 Binary files a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0.dcp and b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0.dcp differ diff --git a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0.xml b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0.xml index 01584e7..5de030b 100644 --- a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0.xml +++ b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0.xml @@ -124,7 +124,7 @@ GENtimestamp - Sat Aug 01 15:03:52 UTC 2020 + Sat Aug 15 11:47:19 UTC 2020 outputProductCRC @@ -156,7 +156,7 @@ GENtimestamp - Sat Aug 01 15:03:52 UTC 2020 + Sat Aug 15 11:47:19 UTC 2020 outputProductCRC @@ -174,7 +174,7 @@ GENtimestamp - Sat Aug 01 15:05:47 UTC 2020 + Sat Aug 15 11:49:05 UTC 2020 outputProductCRC diff --git a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_sim_netlist.v b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_sim_netlist.v index 3c3ed6a..23b4b18 100644 --- a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_sim_netlist.v +++ b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_sim_netlist.v @@ -1,7 +1,7 @@ // Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. // -------------------------------------------------------------------------------- // Tool Version: Vivado v.2020.1 (win64) Build 2902540 Wed May 27 19:54:49 MDT 2020 -// Date : Sat Aug 1 16:05:47 2020 +// Date : Sat Aug 15 12:49:05 2020 // Host : DESKTOP-ID021MN running 64-bit major release (build 9200) // Command : write_verilog -force -mode funcsim // d:/code/zed-68k/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_sim_netlist.v @@ -20,7 +20,7 @@ module design_1_UART_RX_0_0 i_RX_Serial, o_RX_DV, o_RX_Byte); - (* x_interface_info = "xilinx.com:signal:clock:1.0 i_Clk CLK" *) (* x_interface_parameter = "XIL_INTERFACENAME i_Clk, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.0, CLK_DOMAIN /clk_wiz_0_clk_out1, INSERT_VIP 0" *) input i_Clk; + (* x_interface_info = "xilinx.com:signal:clock:1.0 i_Clk CLK" *) (* x_interface_parameter = "XIL_INTERFACENAME i_Clk, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.000, CLK_DOMAIN design_1_clk100_i, INSERT_VIP 0" *) input i_Clk; input i_RX_Serial; output o_RX_DV; output [7:0]o_RX_Byte; diff --git a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_sim_netlist.vhdl b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_sim_netlist.vhdl index f90857c..3f4903c 100644 --- a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_sim_netlist.vhdl +++ b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_sim_netlist.vhdl @@ -1,7 +1,7 @@ -- Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. -- -------------------------------------------------------------------------------- -- Tool Version: Vivado v.2020.1 (win64) Build 2902540 Wed May 27 19:54:49 MDT 2020 --- Date : Sat Aug 1 16:05:47 2020 +-- Date : Sat Aug 15 12:49:05 2020 -- Host : DESKTOP-ID021MN running 64-bit major release (build 9200) -- Command : write_vhdl -force -mode funcsim -- d:/code/zed-68k/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_sim_netlist.vhdl @@ -900,7 +900,7 @@ architecture STRUCTURE of design_1_UART_RX_0_0 is attribute x_interface_info : string; attribute x_interface_info of i_Clk : signal is "xilinx.com:signal:clock:1.0 i_Clk CLK"; attribute x_interface_parameter : string; - attribute x_interface_parameter of i_Clk : signal is "XIL_INTERFACENAME i_Clk, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.0, CLK_DOMAIN /clk_wiz_0_clk_out1, INSERT_VIP 0"; + attribute x_interface_parameter of i_Clk : signal is "XIL_INTERFACENAME i_Clk, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.000, CLK_DOMAIN design_1_clk100_i, INSERT_VIP 0"; begin U0: entity work.design_1_UART_RX_0_0_UART_RX port map ( diff --git a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_stub.v b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_stub.v index 9404128..4bf00df 100644 --- a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_stub.v +++ b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_stub.v @@ -1,7 +1,7 @@ // Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. // -------------------------------------------------------------------------------- // Tool Version: Vivado v.2020.1 (win64) Build 2902540 Wed May 27 19:54:49 MDT 2020 -// Date : Sat Aug 1 16:05:47 2020 +// Date : Sat Aug 15 12:49:05 2020 // Host : DESKTOP-ID021MN running 64-bit major release (build 9200) // Command : write_verilog -force -mode synth_stub // d:/code/zed-68k/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_stub.v diff --git a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_stub.vhdl b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_stub.vhdl index 52a32b7..41adc8f 100644 --- a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_stub.vhdl +++ b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_stub.vhdl @@ -1,7 +1,7 @@ -- Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. -- -------------------------------------------------------------------------------- -- Tool Version: Vivado v.2020.1 (win64) Build 2902540 Wed May 27 19:54:49 MDT 2020 --- Date : Sat Aug 1 16:05:47 2020 +-- Date : Sat Aug 15 12:49:05 2020 -- Host : DESKTOP-ID021MN running 64-bit major release (build 9200) -- Command : write_vhdl -force -mode synth_stub -- d:/code/zed-68k/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/design_1_UART_RX_0_0_stub.vhdl diff --git a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/sim/design_1_UART_RX_0_0.vhd b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/sim/design_1_UART_RX_0_0.vhd index 6c3f185..eba737c 100644 --- a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/sim/design_1_UART_RX_0_0.vhd +++ b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/sim/design_1_UART_RX_0_0.vhd @@ -80,7 +80,7 @@ ARCHITECTURE design_1_UART_RX_0_0_arch OF design_1_UART_RX_0_0 IS ATTRIBUTE IP_DEFINITION_SOURCE OF design_1_UART_RX_0_0_arch: ARCHITECTURE IS "module_ref"; ATTRIBUTE X_INTERFACE_INFO : STRING; ATTRIBUTE X_INTERFACE_PARAMETER : STRING; - ATTRIBUTE X_INTERFACE_PARAMETER OF i_Clk: SIGNAL IS "XIL_INTERFACENAME i_Clk, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.0, CLK_DOMAIN /clk_wiz_0_clk_out1, INSERT_VIP 0"; + ATTRIBUTE X_INTERFACE_PARAMETER OF i_Clk: SIGNAL IS "XIL_INTERFACENAME i_Clk, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.000, CLK_DOMAIN design_1_clk100_i, INSERT_VIP 0"; ATTRIBUTE X_INTERFACE_INFO OF i_Clk: SIGNAL IS "xilinx.com:signal:clock:1.0 i_Clk CLK"; BEGIN U0 : UART_RX diff --git a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/synth/design_1_UART_RX_0_0.vhd b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/synth/design_1_UART_RX_0_0.vhd index cf2432c..d56303c 100644 --- a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/synth/design_1_UART_RX_0_0.vhd +++ b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_UART_RX_0_0/synth/design_1_UART_RX_0_0.vhd @@ -86,7 +86,7 @@ ARCHITECTURE design_1_UART_RX_0_0_arch OF design_1_UART_RX_0_0 IS ATTRIBUTE IP_DEFINITION_SOURCE OF design_1_UART_RX_0_0_arch: ARCHITECTURE IS "module_ref"; ATTRIBUTE X_INTERFACE_INFO : STRING; ATTRIBUTE X_INTERFACE_PARAMETER : STRING; - ATTRIBUTE X_INTERFACE_PARAMETER OF i_Clk: SIGNAL IS "XIL_INTERFACENAME i_Clk, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.0, CLK_DOMAIN /clk_wiz_0_clk_out1, INSERT_VIP 0"; + ATTRIBUTE X_INTERFACE_PARAMETER OF i_Clk: SIGNAL IS "XIL_INTERFACENAME i_Clk, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.000, CLK_DOMAIN design_1_clk100_i, INSERT_VIP 0"; ATTRIBUTE X_INTERFACE_INFO OF i_Clk: SIGNAL IS "xilinx.com:signal:clock:1.0 i_Clk CLK"; BEGIN U0 : UART_RX diff --git a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0.dcp b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0.dcp index 6deb0d9..773724d 100644 Binary files a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0.dcp and b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0.dcp differ diff --git a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0.xml b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0.xml index 1e1cb03..74d64e3 100644 --- a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0.xml +++ b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0.xml @@ -2297,7 +2297,7 @@ GENtimestamp - Sat Aug 01 15:03:50 UTC 2020 + Sat Aug 15 11:47:19 UTC 2020 outputProductCRC @@ -2315,7 +2315,7 @@ GENtimestamp - Sat Aug 01 20:10:12 UTC 2020 + Sat Aug 15 11:47:19 UTC 2020 outputProductCRC @@ -2335,7 +2335,7 @@ GENtimestamp - Sat Aug 01 20:10:12 UTC 2020 + Sat Aug 15 11:47:19 UTC 2020 outputProductCRC @@ -2354,7 +2354,7 @@ GENtimestamp - Sat Aug 01 15:03:50 UTC 2020 + Sat Aug 15 11:47:19 UTC 2020 outputProductCRC @@ -2374,7 +2374,7 @@ GENtimestamp - Sat Aug 01 20:10:12 UTC 2020 + Sat Aug 15 11:47:19 UTC 2020 outputProductCRC @@ -2392,7 +2392,7 @@ GENtimestamp - Sat Aug 01 20:12:25 UTC 2020 + Sat Aug 15 11:47:20 UTC 2020 outputProductCRC @@ -9273,29 +9273,29 @@ xil_defaultlib - design_1_fifo_generator_0_0_stub.v + design_1_fifo_generator_0_0_sim_netlist.v verilogSource - USED_IN_synth_blackbox_stub + USED_IN_simulation + USED_IN_single_language xil_defaultlib - design_1_fifo_generator_0_0_stub.vhdl + design_1_fifo_generator_0_0_sim_netlist.vhdl vhdlSource - USED_IN_synth_blackbox_stub + USED_IN_simulation + USED_IN_single_language xil_defaultlib - design_1_fifo_generator_0_0_sim_netlist.v + design_1_fifo_generator_0_0_stub.v verilogSource - USED_IN_simulation - USED_IN_single_language + USED_IN_synth_blackbox_stub xil_defaultlib - design_1_fifo_generator_0_0_sim_netlist.vhdl + design_1_fifo_generator_0_0_stub.vhdl vhdlSource - USED_IN_simulation - USED_IN_single_language + USED_IN_synth_blackbox_stub xil_defaultlib diff --git a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_sim_netlist.v b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_sim_netlist.v index d7eebc8..ab12859 100644 --- a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_sim_netlist.v +++ b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_sim_netlist.v @@ -1,10 +1,10 @@ // Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. // -------------------------------------------------------------------------------- // Tool Version: Vivado v.2020.1 (win64) Build 2902540 Wed May 27 19:54:49 MDT 2020 -// Date : Sat Aug 1 21:12:25 2020 +// Date : Sat Aug 1 21:12:24 2020 // Host : DESKTOP-ID021MN running 64-bit major release (build 9200) -// Command : write_verilog -force -mode funcsim -// d:/code/zed-68k/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_sim_netlist.v +// Command : write_verilog -force -mode funcsim -rename_top design_1_fifo_generator_0_0 -prefix +// design_1_fifo_generator_0_0_ design_1_fifo_generator_0_0_sim_netlist.v // Design : design_1_fifo_generator_0_0 // Purpose : This verilog netlist is a functional simulation representation of the design and should not be modified // or synthesized. This netlist cannot be used for SDF annotated simulation. @@ -609,10 +609,10 @@ module design_1_fifo_generator_0_0 .wr_rst_busy(NLW_U0_wr_rst_busy_UNCONNECTED)); endmodule -(* DEST_SYNC_FF = "2" *) (* INIT_SYNC_FF = "0" *) (* ORIG_REF_NAME = "xpm_cdc_gray" *) -(* REG_OUTPUT = "1" *) (* SIM_ASSERT_CHK = "0" *) (* SIM_LOSSLESS_GRAY_CHK = "0" *) -(* VERSION = "0" *) (* WIDTH = "9" *) (* XPM_MODULE = "TRUE" *) -(* keep_hierarchy = "true" *) (* xpm_cdc = "GRAY" *) +(* DEST_SYNC_FF = "2" *) (* INIT_SYNC_FF = "0" *) (* REG_OUTPUT = "1" *) +(* SIM_ASSERT_CHK = "0" *) (* SIM_LOSSLESS_GRAY_CHK = "0" *) (* VERSION = "0" *) +(* WIDTH = "9" *) (* XPM_MODULE = "TRUE" *) (* keep_hierarchy = "true" *) +(* xpm_cdc = "GRAY" *) module design_1_fifo_generator_0_0_xpm_cdc_gray (src_clk, src_in_bin, @@ -1435,7 +1435,6 @@ module design_1_fifo_generator_0_0_xpm_cdc_gray__2 .R(1'b0)); endmodule -(* ORIG_REF_NAME = "blk_mem_gen_generic_cstr" *) module design_1_fifo_generator_0_0_blk_mem_gen_generic_cstr (dout, rd_clk, @@ -1474,7 +1473,6 @@ module design_1_fifo_generator_0_0_blk_mem_gen_generic_cstr .wr_clk(wr_clk)); endmodule -(* ORIG_REF_NAME = "blk_mem_gen_prim_width" *) module design_1_fifo_generator_0_0_blk_mem_gen_prim_width (dout, rd_clk, @@ -1513,7 +1511,6 @@ module design_1_fifo_generator_0_0_blk_mem_gen_prim_width .wr_clk(wr_clk)); endmodule -(* ORIG_REF_NAME = "blk_mem_gen_prim_wrapper" *) module design_1_fifo_generator_0_0_blk_mem_gen_prim_wrapper (dout, rd_clk, @@ -1695,7 +1692,6 @@ module design_1_fifo_generator_0_0_blk_mem_gen_prim_wrapper .WEBWE({\DEVICE_7SERIES.NO_BMM_INFO.SDP.WIDE_PRIM18.ram_0 ,\DEVICE_7SERIES.NO_BMM_INFO.SDP.WIDE_PRIM18.ram_0 ,\DEVICE_7SERIES.NO_BMM_INFO.SDP.WIDE_PRIM18.ram_0 ,\DEVICE_7SERIES.NO_BMM_INFO.SDP.WIDE_PRIM18.ram_0 })); endmodule -(* ORIG_REF_NAME = "blk_mem_gen_top" *) module design_1_fifo_generator_0_0_blk_mem_gen_top (dout, rd_clk, @@ -1734,7 +1730,6 @@ module design_1_fifo_generator_0_0_blk_mem_gen_top .wr_clk(wr_clk)); endmodule -(* ORIG_REF_NAME = "blk_mem_gen_v8_4_4" *) module design_1_fifo_generator_0_0_blk_mem_gen_v8_4_4 (dout, rd_clk, @@ -1773,7 +1768,6 @@ module design_1_fifo_generator_0_0_blk_mem_gen_v8_4_4 .wr_clk(wr_clk)); endmodule -(* ORIG_REF_NAME = "blk_mem_gen_v8_4_4_synth" *) module design_1_fifo_generator_0_0_blk_mem_gen_v8_4_4_synth (dout, rd_clk, @@ -1812,7 +1806,6 @@ module design_1_fifo_generator_0_0_blk_mem_gen_v8_4_4_synth .wr_clk(wr_clk)); endmodule -(* ORIG_REF_NAME = "clk_x_pntrs" *) module design_1_fifo_generator_0_0_clk_x_pntrs (S, WR_PNTR_RD, @@ -2062,7 +2055,6 @@ module design_1_fifo_generator_0_0_clk_x_pntrs .src_in_bin(\src_gray_ff_reg[8] )); endmodule -(* ORIG_REF_NAME = "compare" *) module design_1_fifo_generator_0_0_compare (wr_en_0, \gmux.gm[4].gms.ms_0 , @@ -2274,7 +2266,6 @@ module design_1_fifo_generator_0_0_compare_2 .S({\NLW_gmux.gm[4].gms.ms_CARRY4_S_UNCONNECTED [3:1],ram_empty_fb_i_reg})); endmodule -(* ORIG_REF_NAME = "fifo_generator_ramfifo" *) module design_1_fifo_generator_0_0_fifo_generator_ramfifo (dout, empty, @@ -2395,7 +2386,6 @@ module design_1_fifo_generator_0_0_fifo_generator_ramfifo .wr_clk(wr_clk)); endmodule -(* ORIG_REF_NAME = "fifo_generator_top" *) module design_1_fifo_generator_0_0_fifo_generator_top (dout, empty, @@ -2517,7 +2507,7 @@ endmodule (* C_WR_DEPTH_WRCH = "16" *) (* C_WR_FREQ = "1" *) (* C_WR_PNTR_WIDTH = "9" *) (* C_WR_PNTR_WIDTH_AXIS = "10" *) (* C_WR_PNTR_WIDTH_RACH = "4" *) (* C_WR_PNTR_WIDTH_RDCH = "10" *) (* C_WR_PNTR_WIDTH_WACH = "4" *) (* C_WR_PNTR_WIDTH_WDCH = "10" *) (* C_WR_PNTR_WIDTH_WRCH = "4" *) -(* C_WR_RESPONSE_LATENCY = "1" *) (* ORIG_REF_NAME = "fifo_generator_v13_2_5" *) +(* C_WR_RESPONSE_LATENCY = "1" *) module design_1_fifo_generator_0_0_fifo_generator_v13_2_5 (backup, backup_marker, @@ -3518,7 +3508,6 @@ module design_1_fifo_generator_0_0_fifo_generator_v13_2_5 .wr_en(wr_en)); endmodule -(* ORIG_REF_NAME = "fifo_generator_v13_2_5_synth" *) module design_1_fifo_generator_0_0_fifo_generator_v13_2_5_synth (dout, empty, @@ -3573,7 +3562,6 @@ module design_1_fifo_generator_0_0_fifo_generator_v13_2_5_synth .wr_en(wr_en)); endmodule -(* ORIG_REF_NAME = "memory" *) module design_1_fifo_generator_0_0_memory (dout, rd_clk, @@ -3612,7 +3600,6 @@ module design_1_fifo_generator_0_0_memory .wr_clk(wr_clk)); endmodule -(* ORIG_REF_NAME = "rd_bin_cntr" *) module design_1_fifo_generator_0_0_rd_bin_cntr (Q, v1_reg, @@ -3897,7 +3884,6 @@ module design_1_fifo_generator_0_0_rd_bin_cntr .O(v1_reg[3])); endmodule -(* ORIG_REF_NAME = "rd_dc_as" *) module design_1_fifo_generator_0_0_rd_dc_as (rd_data_count, WR_PNTR_RD, @@ -4028,7 +4014,6 @@ module design_1_fifo_generator_0_0_rd_dc_as .R(1'b0)); endmodule -(* ORIG_REF_NAME = "rd_handshaking_flags" *) module design_1_fifo_generator_0_0_rd_handshaking_flags (valid, ram_valid_i, @@ -4051,7 +4036,6 @@ module design_1_fifo_generator_0_0_rd_handshaking_flags .R(1'b0)); endmodule -(* ORIG_REF_NAME = "rd_logic" *) module design_1_fifo_generator_0_0_rd_logic (empty, valid, @@ -4132,7 +4116,6 @@ module design_1_fifo_generator_0_0_rd_logic .v1_reg(\c1/v1_reg )); endmodule -(* ORIG_REF_NAME = "rd_status_flags_as" *) module design_1_fifo_generator_0_0_rd_status_flags_as (empty, E, @@ -4214,7 +4197,6 @@ module design_1_fifo_generator_0_0_rd_status_flags_as .R(1'b0)); endmodule -(* ORIG_REF_NAME = "reset_blk_ramfifo" *) module design_1_fifo_generator_0_0_reset_blk_ramfifo (); @@ -4227,7 +4209,6 @@ module design_1_fifo_generator_0_0_reset_blk_ramfifo .O(rst_wr_reg2)); endmodule -(* ORIG_REF_NAME = "wr_bin_cntr" *) module design_1_fifo_generator_0_0_wr_bin_cntr (S, Q, @@ -4634,7 +4615,6 @@ module design_1_fifo_generator_0_0_wr_bin_cntr .O(S[0])); endmodule -(* ORIG_REF_NAME = "wr_dc_as" *) module design_1_fifo_generator_0_0_wr_dc_as (wr_data_count, Q, @@ -4773,7 +4753,6 @@ module design_1_fifo_generator_0_0_wr_dc_as .R(1'b0)); endmodule -(* ORIG_REF_NAME = "wr_handshaking_flags" *) module design_1_fifo_generator_0_0_wr_handshaking_flags (wr_ack, E, @@ -4794,7 +4773,6 @@ module design_1_fifo_generator_0_0_wr_handshaking_flags .R(1'b0)); endmodule -(* ORIG_REF_NAME = "wr_logic" *) module design_1_fifo_generator_0_0_wr_logic (full, wr_ack, @@ -4879,7 +4857,6 @@ module design_1_fifo_generator_0_0_wr_logic .wr_clk(wr_clk)); endmodule -(* ORIG_REF_NAME = "wr_status_flags_as" *) module design_1_fifo_generator_0_0_wr_status_flags_as (full, E, diff --git a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_sim_netlist.vhdl b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_sim_netlist.vhdl index 8f83a6b..6c7200e 100644 --- a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_sim_netlist.vhdl +++ b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_sim_netlist.vhdl @@ -1,10 +1,10 @@ -- Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. -- -------------------------------------------------------------------------------- -- Tool Version: Vivado v.2020.1 (win64) Build 2902540 Wed May 27 19:54:49 MDT 2020 --- Date : Sat Aug 1 21:12:25 2020 +-- Date : Sat Aug 1 21:12:24 2020 -- Host : DESKTOP-ID021MN running 64-bit major release (build 9200) --- Command : write_vhdl -force -mode funcsim --- d:/code/zed-68k/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_sim_netlist.vhdl +-- Command : write_vhdl -force -mode funcsim -rename_top design_1_fifo_generator_0_0 -prefix +-- design_1_fifo_generator_0_0_ design_1_fifo_generator_0_0_sim_netlist.vhdl -- Design : design_1_fifo_generator_0_0 -- Purpose : This VHDL netlist is a functional simulation representation of the design and should not be modified or -- synthesized. This netlist cannot be used for SDF annotated simulation. @@ -25,8 +25,6 @@ entity design_1_fifo_generator_0_0_xpm_cdc_gray is attribute DEST_SYNC_FF of design_1_fifo_generator_0_0_xpm_cdc_gray : entity is 2; attribute INIT_SYNC_FF : integer; attribute INIT_SYNC_FF of design_1_fifo_generator_0_0_xpm_cdc_gray : entity is 0; - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_xpm_cdc_gray : entity is "xpm_cdc_gray"; attribute REG_OUTPUT : integer; attribute REG_OUTPUT of design_1_fifo_generator_0_0_xpm_cdc_gray : entity is 1; attribute SIM_ASSERT_CHK : integer; @@ -1147,8 +1145,6 @@ entity design_1_fifo_generator_0_0_blk_mem_gen_prim_wrapper is Q : in STD_LOGIC_VECTOR ( 8 downto 0 ); din : in STD_LOGIC_VECTOR ( 7 downto 0 ) ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_blk_mem_gen_prim_wrapper : entity is "blk_mem_gen_prim_wrapper"; end design_1_fifo_generator_0_0_blk_mem_gen_prim_wrapper; architecture STRUCTURE of design_1_fifo_generator_0_0_blk_mem_gen_prim_wrapper is @@ -1362,8 +1358,6 @@ entity design_1_fifo_generator_0_0_compare is \out\ : in STD_LOGIC; comp2 : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_compare : entity is "compare"; end design_1_fifo_generator_0_0_compare; architecture STRUCTURE of design_1_fifo_generator_0_0_compare is @@ -1628,8 +1622,6 @@ entity design_1_fifo_generator_0_0_rd_bin_cntr is E : in STD_LOGIC_VECTOR ( 0 to 0 ); rd_clk : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_rd_bin_cntr : entity is "rd_bin_cntr"; end design_1_fifo_generator_0_0_rd_bin_cntr; architecture STRUCTURE of design_1_fifo_generator_0_0_rd_bin_cntr is @@ -2008,8 +2000,6 @@ entity design_1_fifo_generator_0_0_rd_dc_as is \rd_dc_i_reg[8]_0\ : in STD_LOGIC_VECTOR ( 0 to 0 ); rd_clk : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_rd_dc_as : entity is "rd_dc_as"; end design_1_fifo_generator_0_0_rd_dc_as; architecture STRUCTURE of design_1_fifo_generator_0_0_rd_dc_as is @@ -2174,8 +2164,6 @@ entity design_1_fifo_generator_0_0_rd_handshaking_flags is ram_valid_i : in STD_LOGIC; rd_clk : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_rd_handshaking_flags : entity is "rd_handshaking_flags"; end design_1_fifo_generator_0_0_rd_handshaking_flags; architecture STRUCTURE of design_1_fifo_generator_0_0_rd_handshaking_flags is @@ -2197,8 +2185,6 @@ use IEEE.STD_LOGIC_1164.ALL; library UNISIM; use UNISIM.VCOMPONENTS.ALL; entity design_1_fifo_generator_0_0_reset_blk_ramfifo is - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_reset_blk_ramfifo : entity is "reset_blk_ramfifo"; end design_1_fifo_generator_0_0_reset_blk_ramfifo; architecture STRUCTURE of design_1_fifo_generator_0_0_reset_blk_ramfifo is @@ -2235,8 +2221,6 @@ entity design_1_fifo_generator_0_0_wr_bin_cntr is E : in STD_LOGIC_VECTOR ( 0 to 0 ); wr_clk : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_wr_bin_cntr : entity is "wr_bin_cntr"; end design_1_fifo_generator_0_0_wr_bin_cntr; architecture STRUCTURE of design_1_fifo_generator_0_0_wr_bin_cntr is @@ -2774,8 +2758,6 @@ entity design_1_fifo_generator_0_0_wr_dc_as is \wr_data_count_i_reg[8]_0\ : in STD_LOGIC_VECTOR ( 0 to 0 ); wr_clk : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_wr_dc_as : entity is "wr_dc_as"; end design_1_fifo_generator_0_0_wr_dc_as; architecture STRUCTURE of design_1_fifo_generator_0_0_wr_dc_as is @@ -2954,8 +2936,6 @@ entity design_1_fifo_generator_0_0_wr_handshaking_flags is E : in STD_LOGIC_VECTOR ( 0 to 0 ); wr_clk : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_wr_handshaking_flags : entity is "wr_handshaking_flags"; end design_1_fifo_generator_0_0_wr_handshaking_flags; architecture STRUCTURE of design_1_fifo_generator_0_0_wr_handshaking_flags is @@ -2984,8 +2964,6 @@ entity design_1_fifo_generator_0_0_blk_mem_gen_prim_width is Q : in STD_LOGIC_VECTOR ( 8 downto 0 ); din : in STD_LOGIC_VECTOR ( 7 downto 0 ) ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_blk_mem_gen_prim_width : entity is "blk_mem_gen_prim_width"; end design_1_fifo_generator_0_0_blk_mem_gen_prim_width; architecture STRUCTURE of design_1_fifo_generator_0_0_blk_mem_gen_prim_width is @@ -3026,8 +3004,6 @@ entity design_1_fifo_generator_0_0_clk_x_pntrs is \src_gray_ff_reg[8]\ : in STD_LOGIC_VECTOR ( 8 downto 0 ); rd_clk : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_clk_x_pntrs : entity is "clk_x_pntrs"; end design_1_fifo_generator_0_0_clk_x_pntrs; architecture STRUCTURE of design_1_fifo_generator_0_0_clk_x_pntrs is @@ -3330,8 +3306,6 @@ entity design_1_fifo_generator_0_0_rd_status_flags_as is rd_clk : in STD_LOGIC; rd_en : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_rd_status_flags_as : entity is "rd_status_flags_as"; end design_1_fifo_generator_0_0_rd_status_flags_as; architecture STRUCTURE of design_1_fifo_generator_0_0_rd_status_flags_as is @@ -3423,8 +3397,6 @@ entity design_1_fifo_generator_0_0_wr_status_flags_as is wr_clk : in STD_LOGIC; wr_en : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_wr_status_flags_as : entity is "wr_status_flags_as"; end design_1_fifo_generator_0_0_wr_status_flags_as; architecture STRUCTURE of design_1_fifo_generator_0_0_wr_status_flags_as is @@ -3507,8 +3479,6 @@ entity design_1_fifo_generator_0_0_blk_mem_gen_generic_cstr is Q : in STD_LOGIC_VECTOR ( 8 downto 0 ); din : in STD_LOGIC_VECTOR ( 7 downto 0 ) ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_blk_mem_gen_generic_cstr : entity is "blk_mem_gen_generic_cstr"; end design_1_fifo_generator_0_0_blk_mem_gen_generic_cstr; architecture STRUCTURE of design_1_fifo_generator_0_0_blk_mem_gen_generic_cstr is @@ -3547,8 +3517,6 @@ entity design_1_fifo_generator_0_0_rd_logic is \rd_dc_i_reg[8]\ : in STD_LOGIC_VECTOR ( 0 to 0 ); rd_en : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_rd_logic : entity is "rd_logic"; end design_1_fifo_generator_0_0_rd_logic; architecture STRUCTURE of design_1_fifo_generator_0_0_rd_logic is @@ -3613,8 +3581,6 @@ entity design_1_fifo_generator_0_0_wr_logic is RD_PNTR_WR : in STD_LOGIC_VECTOR ( 8 downto 0 ); wr_en : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_wr_logic : entity is "wr_logic"; end design_1_fifo_generator_0_0_wr_logic; architecture STRUCTURE of design_1_fifo_generator_0_0_wr_logic is @@ -3702,8 +3668,6 @@ entity design_1_fifo_generator_0_0_blk_mem_gen_top is Q : in STD_LOGIC_VECTOR ( 8 downto 0 ); din : in STD_LOGIC_VECTOR ( 7 downto 0 ) ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_blk_mem_gen_top : entity is "blk_mem_gen_top"; end design_1_fifo_generator_0_0_blk_mem_gen_top; architecture STRUCTURE of design_1_fifo_generator_0_0_blk_mem_gen_top is @@ -3735,8 +3699,6 @@ entity design_1_fifo_generator_0_0_blk_mem_gen_v8_4_4_synth is Q : in STD_LOGIC_VECTOR ( 8 downto 0 ); din : in STD_LOGIC_VECTOR ( 7 downto 0 ) ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_blk_mem_gen_v8_4_4_synth : entity is "blk_mem_gen_v8_4_4_synth"; end design_1_fifo_generator_0_0_blk_mem_gen_v8_4_4_synth; architecture STRUCTURE of design_1_fifo_generator_0_0_blk_mem_gen_v8_4_4_synth is @@ -3768,8 +3730,6 @@ entity design_1_fifo_generator_0_0_blk_mem_gen_v8_4_4 is Q : in STD_LOGIC_VECTOR ( 8 downto 0 ); din : in STD_LOGIC_VECTOR ( 7 downto 0 ) ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_blk_mem_gen_v8_4_4 : entity is "blk_mem_gen_v8_4_4"; end design_1_fifo_generator_0_0_blk_mem_gen_v8_4_4; architecture STRUCTURE of design_1_fifo_generator_0_0_blk_mem_gen_v8_4_4 is @@ -3801,8 +3761,6 @@ entity design_1_fifo_generator_0_0_memory is Q : in STD_LOGIC_VECTOR ( 8 downto 0 ); din : in STD_LOGIC_VECTOR ( 7 downto 0 ) ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_memory : entity is "memory"; end design_1_fifo_generator_0_0_memory; architecture STRUCTURE of design_1_fifo_generator_0_0_memory is @@ -3838,8 +3796,6 @@ entity design_1_fifo_generator_0_0_fifo_generator_ramfifo is rd_en : in STD_LOGIC; wr_en : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_fifo_generator_ramfifo : entity is "fifo_generator_ramfifo"; end design_1_fifo_generator_0_0_fifo_generator_ramfifo; architecture STRUCTURE of design_1_fifo_generator_0_0_fifo_generator_ramfifo is @@ -3963,8 +3919,6 @@ entity design_1_fifo_generator_0_0_fifo_generator_top is rd_en : in STD_LOGIC; wr_en : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_fifo_generator_top : entity is "fifo_generator_top"; end design_1_fifo_generator_0_0_fifo_generator_top; architecture STRUCTURE of design_1_fifo_generator_0_0_fifo_generator_top is @@ -4004,8 +3958,6 @@ entity design_1_fifo_generator_0_0_fifo_generator_v13_2_5_synth is rd_en : in STD_LOGIC; wr_en : in STD_LOGIC ); - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_fifo_generator_v13_2_5_synth : entity is "fifo_generator_v13_2_5_synth"; end design_1_fifo_generator_0_0_fifo_generator_v13_2_5_synth; architecture STRUCTURE of design_1_fifo_generator_0_0_fifo_generator_v13_2_5_synth is @@ -4668,8 +4620,6 @@ entity design_1_fifo_generator_0_0_fifo_generator_v13_2_5 is attribute C_WR_PNTR_WIDTH_WRCH of design_1_fifo_generator_0_0_fifo_generator_v13_2_5 : entity is 4; attribute C_WR_RESPONSE_LATENCY : integer; attribute C_WR_RESPONSE_LATENCY of design_1_fifo_generator_0_0_fifo_generator_v13_2_5 : entity is 1; - attribute ORIG_REF_NAME : string; - attribute ORIG_REF_NAME of design_1_fifo_generator_0_0_fifo_generator_v13_2_5 : entity is "fifo_generator_v13_2_5"; end design_1_fifo_generator_0_0_fifo_generator_v13_2_5; architecture STRUCTURE of design_1_fifo_generator_0_0_fifo_generator_v13_2_5 is diff --git a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_stub.v b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_stub.v index 50bc6ce..73b8e96 100644 --- a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_stub.v +++ b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_stub.v @@ -1,10 +1,10 @@ // Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. // -------------------------------------------------------------------------------- // Tool Version: Vivado v.2020.1 (win64) Build 2902540 Wed May 27 19:54:49 MDT 2020 -// Date : Sat Aug 1 21:12:25 2020 +// Date : Sat Aug 1 21:12:24 2020 // Host : DESKTOP-ID021MN running 64-bit major release (build 9200) -// Command : write_verilog -force -mode synth_stub -// d:/code/zed-68k/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_stub.v +// Command : write_verilog -force -mode synth_stub -rename_top design_1_fifo_generator_0_0 -prefix +// design_1_fifo_generator_0_0_ design_1_fifo_generator_0_0_stub.v // Design : design_1_fifo_generator_0_0 // Purpose : Stub declaration of top-level module interface // Device : xc7a100tcsg324-1 diff --git a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_stub.vhdl b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_stub.vhdl index 8eda933..90ee26c 100644 --- a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_stub.vhdl +++ b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_stub.vhdl @@ -1,10 +1,10 @@ -- Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. -- -------------------------------------------------------------------------------- -- Tool Version: Vivado v.2020.1 (win64) Build 2902540 Wed May 27 19:54:49 MDT 2020 --- Date : Sat Aug 1 21:12:25 2020 +-- Date : Sat Aug 1 21:12:24 2020 -- Host : DESKTOP-ID021MN running 64-bit major release (build 9200) --- Command : write_vhdl -force -mode synth_stub --- d:/code/zed-68k/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/design_1_fifo_generator_0_0_stub.vhdl +-- Command : write_vhdl -force -mode synth_stub -rename_top design_1_fifo_generator_0_0 -prefix +-- design_1_fifo_generator_0_0_ design_1_fifo_generator_0_0_stub.vhdl -- Design : design_1_fifo_generator_0_0 -- Purpose : Stub declaration of top-level module interface -- Device : xc7a100tcsg324-1 diff --git a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/sim/design_1_fifo_generator_0_0.v b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/sim/design_1_fifo_generator_0_0.v index eb85ca8..5bfc2d5 100644 --- a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/sim/design_1_fifo_generator_0_0.v +++ b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/sim/design_1_fifo_generator_0_0.v @@ -68,7 +68,7 @@ module design_1_fifo_generator_0_0 ( wr_data_count ); -(* X_INTERFACE_PARAMETER = "XIL_INTERFACENAME write_clk, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.0, CLK_DOMAIN /clk_wiz_0_clk_out1, INSERT_VIP 0" *) +(* X_INTERFACE_PARAMETER = "XIL_INTERFACENAME write_clk, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.000, CLK_DOMAIN design_1_clk100_i, INSERT_VIP 0" *) (* X_INTERFACE_INFO = "xilinx.com:signal:clock:1.0 write_clk CLK" *) input wire wr_clk; (* X_INTERFACE_PARAMETER = "XIL_INTERFACENAME read_clk, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.000, CLK_DOMAIN design_1_rd_clk, INSERT_VIP 0" *) diff --git a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/synth/design_1_fifo_generator_0_0.vhd b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/synth/design_1_fifo_generator_0_0.vhd index b5e24ed..3558f39 100644 --- a/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/synth/design_1_fifo_generator_0_0.vhd +++ b/zed68k.srcs/sources_1/bd/design_1/ip/design_1_fifo_generator_0_0/synth/design_1_fifo_generator_0_0.vhd @@ -540,7 +540,7 @@ ARCHITECTURE design_1_fifo_generator_0_0_arch OF design_1_fifo_generator_0_0 IS ATTRIBUTE X_INTERFACE_INFO OF din: SIGNAL IS "xilinx.com:interface:fifo_write:1.0 FIFO_WRITE WR_DATA"; ATTRIBUTE X_INTERFACE_PARAMETER OF rd_clk: SIGNAL IS "XIL_INTERFACENAME read_clk, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.000, CLK_DOMAIN design_1_rd_clk, INSERT_VIP 0"; ATTRIBUTE X_INTERFACE_INFO OF rd_clk: SIGNAL IS "xilinx.com:signal:clock:1.0 read_clk CLK"; - ATTRIBUTE X_INTERFACE_PARAMETER OF wr_clk: SIGNAL IS "XIL_INTERFACENAME write_clk, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.0, CLK_DOMAIN /clk_wiz_0_clk_out1, INSERT_VIP 0"; + ATTRIBUTE X_INTERFACE_PARAMETER OF wr_clk: SIGNAL IS "XIL_INTERFACENAME write_clk, FREQ_HZ 100000000, FREQ_TOLERANCE_HZ 0, PHASE 0.000, CLK_DOMAIN design_1_clk100_i, INSERT_VIP 0"; ATTRIBUTE X_INTERFACE_INFO OF wr_clk: SIGNAL IS "xilinx.com:signal:clock:1.0 write_clk CLK"; BEGIN U0 : fifo_generator_v13_2_5 diff --git a/zed68k.srcs/sources_1/bd/design_1/sim/design_1.vhd b/zed68k.srcs/sources_1/bd/design_1/sim/design_1.vhd index f4ce4b3..aa9f231 100644 --- a/zed68k.srcs/sources_1/bd/design_1/sim/design_1.vhd +++ b/zed68k.srcs/sources_1/bd/design_1/sim/design_1.vhd @@ -1,7 +1,7 @@ --Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. ---------------------------------------------------------------------------------- --Tool Version: Vivado v.2020.1 (win64) Build 2902540 Wed May 27 19:54:49 MDT 2020 ---Date : Tue Aug 4 21:00:57 2020 +--Date : Sat Aug 15 12:47:18 2020 --Host : DESKTOP-ID021MN running 64-bit major release (build 9200) --Command : generate_target design_1.bd --Design : design_1 diff --git a/zed68k.srcs/sources_1/bd/design_1/synth/design_1.hwdef b/zed68k.srcs/sources_1/bd/design_1/synth/design_1.hwdef index 6303a47..6fb2ba3 100644 Binary files a/zed68k.srcs/sources_1/bd/design_1/synth/design_1.hwdef and b/zed68k.srcs/sources_1/bd/design_1/synth/design_1.hwdef differ diff --git a/zed68k.srcs/sources_1/bd/design_1/synth/design_1.vhd b/zed68k.srcs/sources_1/bd/design_1/synth/design_1.vhd index f4ce4b3..aa9f231 100644 --- a/zed68k.srcs/sources_1/bd/design_1/synth/design_1.vhd +++ b/zed68k.srcs/sources_1/bd/design_1/synth/design_1.vhd @@ -1,7 +1,7 @@ --Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. ---------------------------------------------------------------------------------- --Tool Version: Vivado v.2020.1 (win64) Build 2902540 Wed May 27 19:54:49 MDT 2020 ---Date : Tue Aug 4 21:00:57 2020 +--Date : Sat Aug 15 12:47:18 2020 --Host : DESKTOP-ID021MN running 64-bit major release (build 9200) --Command : generate_target design_1.bd --Design : design_1 diff --git a/zed68k.srcs/sources_1/imports/UART/bufferedUART.vhd b/zed68k.srcs/sources_1/imports/UART/bufferedUART.vhd new file mode 100644 index 0000000..5a96029 --- /dev/null +++ b/zed68k.srcs/sources_1/imports/UART/bufferedUART.vhd @@ -0,0 +1,282 @@ +-- 6850 ACIA COMPATIBLE UART WITH HARDWARE INPUT BUFFER AND HANDSHAKE + +-- This file is copyright by Grant Searle 2013 +-- You are free to use this file in your own projects but must never charge for it nor use it without +-- acknowledgement. +-- Please ask permission from Grant Searle before republishing elsewhere. +-- If you use this file or any part of it, please add an acknowledgement to myself and +-- a link back to my main web site http://searle.hostei.com/grant/ +-- and to the "multicomp" page at http://searle.hostei.com/grant/Multicomp/index.html +-- +-- Please check on the above web pages to see if there are any updates before using this file. +-- If for some reason the page is no longer available, please search for "Grant Searle" +-- on the internet to see if I have moved to another web hosting service. +-- +-- Grant Searle +-- eMail address available on my main web page link above. + +library ieee; + use ieee.std_logic_1164.all; + use ieee.numeric_std.all; + use ieee.std_logic_unsigned.all; + +entity bufferedUART is + port ( + clk : in std_logic; + n_wr : in std_logic; + n_rd : in std_logic; + regSel : in std_logic; + dataIn : in std_logic_vector(7 downto 0); + dataOut : out std_logic_vector(7 downto 0); + n_int : out std_logic; + rxClock : in std_logic; -- 16 x baud rate + txClock : in std_logic; -- 16 x baud rate + rxd : in std_logic; + txd : out std_logic; + n_rts : out std_logic :='0'; + n_cts : in std_logic; + n_dcd : in std_logic + ); +end bufferedUART; + +architecture rtl of bufferedUART is + +signal n_int_internal : std_logic := '1'; +signal statusReg : std_logic_vector(7 downto 0) := (others => '0'); +signal controlReg : std_logic_vector(7 downto 0) := "00000000"; + +signal rxBitCount: std_logic_vector(3 DOWNTO 0); +signal txBitCount: std_logic_vector(3 DOWNTO 0); + +signal rxClockCount: std_logic_vector(5 DOWNTO 0); +signal txClockCount: std_logic_vector(5 DOWNTO 0); + +signal rxCurrentByteBuffer: std_logic_vector(7 DOWNTO 0); +signal txBuffer: std_logic_vector(7 DOWNTO 0); + +signal txByteLatch: std_logic_vector(7 DOWNTO 0); + +-- Use bit toggling to determine change of state +-- If byte sent over serial, change "txByteSent" flag from 0-->1, or from 1-->0 +-- If byte written to tx buffer, change "txByteWritten" flag from 0-->1, or from 1-->0 +-- So, if "txByteSent" = "txByteWritten" then no new data to be sent +-- otherwise (if "txByteSent" /= "txByteWritten") then new data available ready to be sent +signal txByteWritten : std_logic := '0'; +signal txByteSent : std_logic := '0'; + +type serialStateType is ( idle, dataBit, stopBit ); +signal rxState : serialStateType; +signal txState : serialStateType; + +signal reset : std_logic := '0'; + +type rxBuffArray is array (0 to 15) of std_logic_vector(7 downto 0); +signal rxBuffer : rxBuffArray; + +signal rxInPointer: integer range 0 to 63 :=0; +signal rxReadPointer: integer range 0 to 63 :=0; +signal rxBuffCount: integer range 0 to 63 :=0; + +signal rxFilter : integer range 0 to 50; + +signal rxdFiltered : std_logic := '1'; + +begin + -- minimal 6850 compatibility + statusReg(0) <= '0' when rxInPointer=rxReadPointer else '1'; + statusReg(1) <= '1' when txByteWritten=txByteSent else '0'; + statusReg(2) <= n_dcd; + statusReg(3) <= n_cts; + statusReg(7) <= not(n_int_internal); + + -- interrupt mask + n_int <= n_int_internal; + n_int_internal <= '0' when (rxInPointer /= rxReadPointer) and controlReg(7)='1' + else '0' when (txByteWritten=txByteSent) and controlReg(6)='0' and controlReg(5)='1' + else '1'; + +-- raise (inhibit) n_rts when buffer over half-full +-- 6850 implementatit = n_rts <= '1' when controlReg(6)='1' and controlReg(5)='0' else '0'; + + rxBuffCount <= 0 + rxInPointer - rxReadPointer when rxInPointer >= rxReadPointer + else 16 + rxInPointer - rxReadPointer; + + -- RTS with hysteresis + -- enable flow if less than 2 characters in buffer + -- stop flow if greater that 8 chars in buffer (to allow 8 byte overflow) + process (clk) + begin + if falling_edge(clk) then + if rxBuffCount<2 then + n_rts <= '0'; + end if; + if rxBuffCount>8 then + n_rts <= '1'; + end if; + end if; + end process; + +-- n_rts <= '1' when rxBuffCount > 24 else '0'; + + -- control reg + -- 7 6 5 4 3 2 1 0 + -- Rx int en | Tx control (INT/RTS) | Tx control (RTS) | ignored | ignored | ignored | reset A | reset B + -- [ 0 1 ] = RTS LOW + -- RESET = [ 1 1 ] + + -- status reg + -- 7 6 5 4 3 2 1 0 + -- irq | parity error | overrun | frame err | n_cts | n_dcd | tx empty | rx full + -- always 0 (no parity) n/a n/a + + -- write of xxxxxx11 to control reg will reset + reset <= '1' when n_wr = '0' and dataIn(1 downto 0) = "11" and regSel = '0' else '0'; + + + -- RX de-glitcher - important because the FPGA is very sensistive + -- Filtered RX will not switch low to high until there is 50 more high samples than lows + -- hysteresis will then not switch high to low until there is 50 more low samples than highs. + -- Introduces a minor (1uS) delay with 50MHz clock + -- However, then makes serial comms 100% reliable + process (clk) + begin + if falling_edge(clk) then + if rxd = '1' and rxFilter=50 then + rxdFiltered <= '1'; + end if; + if rxd = '1' and rxFilter /= 50 then + rxFilter <= rxFilter+1; + end if; + if rxd = '0' and rxFilter=0 then + rxdFiltered <= '0'; + end if; + if rxd = '0' and rxFilter/=0 then + rxFilter <= rxFilter-1; + end if; + end if; + end process; + + process( n_rd ) + begin + if falling_edge(n_rd) then -- Standard CPU - present data on leading edge of rd + if regSel='1' then + dataOut <= rxBuffer(rxReadPointer); + if rxInPointer /= rxReadPointer then + if rxReadPointer < 15 then + rxReadPointer <= rxReadPointer+1; + else + rxReadPointer <= 0; + end if; + end if; + else + dataOut <= statusReg; + end if; + end if; + end process; + + process( n_wr ) + begin + if rising_edge(n_wr) then -- Standard CPU - capture data on trailing edge of wr + if regSel='1' then + if txByteWritten=txByteSent then + txByteWritten <= not txByteWritten; + end if; + txByteLatch <= dataIn; + else + controlReg <= dataIn; + end if; + end if; + end process; + + process( rxClock , reset ) + begin + if reset='1' then + rxState <= idle; + rxBitCount<=(others=>'0'); + rxClockCount<=(others=>'0'); + elsif falling_edge(rxClock) then + case rxState is + when idle => + if rxdFiltered='1' then -- high so idle + rxBitCount<=(others=>'0'); + rxClockCount<=(others=>'0'); + else -- low so in start bit + if rxClockCount= 7 then -- wait to half way through bit + rxClockCount<=(others=>'0'); + rxState <=dataBit; + else + rxClockCount<=rxClockCount+1; + end if; + end if; + when dataBit => + if rxClockCount= 15 then -- 1 bit later - sample + rxClockCount<=(others=>'0'); + rxBitCount <=rxBitCount+1; + rxCurrentByteBuffer <= rxdFiltered & rxCurrentByteBuffer(7 downto 1); + if rxBitCount= 7 then -- 8 bits read - handle stop bit + rxState<=stopBit; + end if; + else + rxClockCount<=rxClockCount+1; + end if; + when stopBit => + if rxClockCount= 15 then + rxBuffer(rxInPointer) <= rxCurrentByteBuffer; + if rxInPointer < 15 then + rxInPointer <= rxInPointer+1; + else + rxInPointer <= 0; + end if; + rxClockCount<=(others=>'0'); + rxState <=idle; + else + rxClockCount<=rxClockCount+1; + end if; + end case; + end if; + end process; + + process( txClock , reset ) + begin + if reset='1' then + txState <= idle; + txBitCount<=(others=>'0'); + txClockCount<=(others=>'0'); + txByteSent <= '0'; + + elsif falling_edge(txClock) then + case txState is + when idle => + txd <= '1'; + if (txByteWritten /= txByteSent) and n_cts='0' and n_dcd='0' then + txBuffer <= txByteLatch; + txByteSent <= not txByteSent; + txState <=dataBit; + txd <= '0'; -- start bit + txBitCount<=(others=>'0'); + txClockCount<=(others=>'0'); + end if; + when dataBit => + if txClockCount= 15 then -- 1 bit later + txClockCount<=(others=>'0'); + if txBitCount= 8 then -- 8 bits read - handle stop bit + txd <= '1'; + txState<=stopBit; + else + txd <= txBuffer(0); + txBuffer <= '0' & txBuffer(7 downto 1); + txBitCount <=txBitCount+1; + end if; + else + txClockCount<=txClockCount+1; + end if; + when stopBit => + if txClockCount= 15 then + txState <=idle; + else + txClockCount<=txClockCount+1; + end if; + end case; + end if; + end process; + end rtl; diff --git a/zed68k.srcs/sources_1/imports/sources_1/imports/Microcomputer/Microcomputer.vhd b/zed68k.srcs/sources_1/imports/sources_1/imports/Microcomputer/Microcomputer.vhd index ef2d429..81127b6 100644 --- a/zed68k.srcs/sources_1/imports/sources_1/imports/Microcomputer/Microcomputer.vhd +++ b/zed68k.srcs/sources_1/imports/sources_1/imports/Microcomputer/Microcomputer.vhd @@ -51,6 +51,12 @@ entity Microcomputer is serialStatus: in std_logic_vector(7 downto 0); serialData: in std_logic_vector(7 downto 0); + rxd1 : in STD_LOGIC; + txd1 : out STD_LOGIC; + cts1 : in STD_LOGIC; + rts1 : out STD_LOGIC; + serialClock : in STD_LOGIC; + -- RAM interface ram_a : out std_logic_vector(26 downto 0); ram_dq_i : out std_logic_vector(15 downto 0); @@ -236,33 +242,23 @@ ram1 : entity work.ram --64k -- ____________________________________________________________________________________ -- INPUT/OUTPUT DEVICES GO HERE - io1 : entity work.SBCTextDisplayRGB - port map ( - n_reset => n_reset, - clk => vgaclock, - - -- RGB video signals - hSync => hSync, - vSync => vSync, - videoR0 => videoR0, - videoR1 => videoR1, - videoG0 => videoG0, - videoG1 => videoG1, - videoB0 => videoB0, - videoB1 => videoB1, - - -- Monochrome video signals (when using TV timings only) - sync => open, - video => open, - + + io1 : entity work.bufferedUART + port map( + clk => clk, n_wr => n_interface1CS or cpu_r_w, n_rd => n_interface1CS or (not cpu_r_w), n_int => n_int1, regSel => regsel, dataIn => cpuDataOut(7 downto 0), dataOut => interface1DataOut, - ps2Clk => ps2Clk, - ps2Data => ps2Data + rxClock => serialClock, + txClock => serialClock, + rxd => rxd1, + txd => txd1, + n_cts => '0', + n_dcd => '0', + n_rts => rts1 ); -- ____________________________________________________________________________________ @@ -275,14 +271,14 @@ regsel <= '0' when cpuAddress = X"f00009" else '1'; serialRead_en <= '1' when cpuAddress = X"f2000b" else '0'; -- f200000 n_sdCardCS <= '0' when cpuAddress(15 downto 0) >= x"f30009" and cpuAddress(15 downto 0) <= x"f3000f" else '1'; -n_internalRam1CS <= '0' when cpuAddress > x"0008" and cpuAddress <= X"FFFF" +n_internalRam1CS <= '0' when cpuAddress <= X"FFFF" and cpu_uds = '0' else '1' ; --4k at bottom -n_internalRam2CS <= '0' when cpuAddress > x"0008" and cpuAddress <= X"FFFF" +n_internalRam2CS <= '0' when cpuAddress <= X"FFFF" and cpu_lds = '0' else '1' ; --4k at bottom -- external ram cpuAddress > X"FFFF" and -ram_cen <= '0' when n_internalRam1CS = '1' and cpuAddress < X"A00000" and n_reset = '1' else '1'; --n_internalRam1CS = '1' andand +ram_cen <= '0' when cpuAddress > X"FFFF" and cpuAddress < X"A00000" and n_reset = '1' else '1'; --n_internalRam1CS = '1' andand ram_oen <= ram_cen or (not cpu_r_w); -- ram read ram_wen <= ram_cen or cpu_r_w; -- ram write ram_a <= cpuAddress(26 downto 0) when ram_cen ='0' else (others => '0'); -- address @@ -314,7 +310,7 @@ when n_interface1CS = '0' else basRomData(7 downto 0) when n_basRom2CS = '0' else internalRam2DataOut -when n_internalRam1CS = '0' else +when n_internalRam2CS = '0' else "00000" & cpuAddress(3 downto 1) when cpuAddress(31 downto 16) = X"FFFF" and cpu_r_w = '0' else r_Vec(vecAddress)(7 downto 0) diff --git a/zed68k.srcs/sources_1/imports/sources_1/new/multicomp_wrapper.vhd b/zed68k.srcs/sources_1/imports/sources_1/new/multicomp_wrapper.vhd index a1de3e9..4201ca3 100644 --- a/zed68k.srcs/sources_1/imports/sources_1/new/multicomp_wrapper.vhd +++ b/zed68k.srcs/sources_1/imports/sources_1/new/multicomp_wrapper.vhd @@ -72,6 +72,10 @@ port( LED : out STD_LOGIC_VECTOR ( 15 downto 0 ); rxd1 : in STD_LOGIC; txd1 : out STD_LOGIC; + cts1 : in STD_LOGIC; + rts1 : out STD_LOGIC; + + rxd2 : in STD_LOGIC; ddr2_addr : out std_logic_vector(12 downto 0); ddr2_ba : out std_logic_vector(2 downto 0); @@ -101,8 +105,6 @@ architecture Behavioral of multicomp_wrapper is signal serialStatus: std_logic_vector(7 downto 0) := x"00"; signal rxSerialData: std_logic_vector(7 downto 0) := x"00"; signal serialData: std_logic_vector(7 downto 0) := x"00"; - signal serialIdle: std_logic := '0'; - signal serialEOF: std_logic_vector(0 downto 0) := "0"; signal serialRead_en: std_logic := '0'; signal rxDataReady : std_logic := '0' ; @@ -111,7 +113,8 @@ architecture Behavioral of multicomp_wrapper is signal count: std_logic_vector( 7 downto 0) := x"00"; signal data_trigger: std_logic := '0'; signal clk_locked: std_logic := '0'; - + signal serialClkCount : std_logic_vector(15 downto 0) := (others => '0'); + signal serialClock : std_logic; -- RAM interface @@ -259,7 +262,13 @@ begin ram_lb => cpuLower, ram_ack => ram_ack, - cpu_as => cpuAS + cpu_as => cpuAS, + + rxd1 => rxd1, + txd1 => txd1, + cts1 => cts1, + rts1 => rts1, + serialClock => serialClock ); --only using spi do drive dat1&2 high & reset is low. @@ -272,15 +281,18 @@ begin LED => LED(7 downto 0), rd_en => serialRead_en, m68_rxd => serialData, - rd_clk => clk50, + rd_clk => sys_clock100, reset_n => resetn and mem_ready and clk_locked, - rxd1 => rxd1, + rxd1 => rxd2, rd_data_cnt(8 downto 1) => count, rd_data_cnt(0) => data_trigger, clk100_i => sys_clock100, cts => open, rts => open ); + + + LED(8) <= serialRead_en; LED(9) <= serialStatus(0); @@ -288,5 +300,25 @@ begin LED(10) <= mem_ready; LED (15 downto 11) <= (others => '0'); serialStatus(0) <= '1' when count > x"00" else '0'; + + -- SUB-CIRCUIT CLOCK SIGNALS + serialClock <= serialClkCount(15); + process (clk50) + begin + if rising_edge(clk50) then + + + -- Serial clock DDS + -- 50MHz master input clock: + -- Baud Increment + -- 115200 2416 + -- 38400 805 + -- 19200 403 + -- 9600 201 + -- 4800 101 + -- 2400 50 + serialClkCount <= serialClkCount + 201; + end if; + end process; end Behavioral; \ No newline at end of file diff --git a/zed68k.srcs/sources_1/new/mem_control.vhd b/zed68k.srcs/sources_1/new/mem_control.vhd index 2ddc176..853007a 100644 --- a/zed68k.srcs/sources_1/new/mem_control.vhd +++ b/zed68k.srcs/sources_1/new/mem_control.vhd @@ -111,7 +111,7 @@ component mem_example end component; -signal boot_rom : std_logic := '1'; +signal boot_rom : std_logic := '0'; signal oldAddress : std_logic_vector(26 downto 0) := (others => '0'); signal initial_stack: std_logic_vector(31 downto 0) := x"00000E00"; diff --git a/zed68k.xpr b/zed68k.xpr index 2377ccd..5a11632 100644 --- a/zed68k.xpr +++ b/zed68k.xpr @@ -46,20 +46,20 @@ @@ -140,6 +137,14 @@ + + + + + + + + @@ -208,22 +213,6 @@ - - - - - - - - - - - - - - - - @@ -254,6 +243,24 @@ + + + + + + + + + + + + + + + + + + @@ -409,24 +416,6 @@