0000- 12 .TF softy2.bin ; object file 0000- 13 ; 0000- 14 ; Registers 0000- 15 ; 0000- 16 ; Pointer Register 1 (P1) Cursor Pointer 0000- 17 ; Pointer Register 2 (P2) Register Pointer, set to $0B00 to point at IC21 RAM 0000- 18 ; between $0B00 and $0BFF and with negative offsets 0000- 19 ; at IC21 I/O between $0620 and $06A4 0000- 20 ; Pointer Register 3 (P3) Subroutine Pointer 0000- 21 ; 0000- 22 ; Processor Flag Outputs 0000- 23 ; 0000- 24 ; Flag 0 cursor write 0000- 25 ; Flag 1 EPROM VDD pulse enable 0000- 26 ; Flag 2 HALT Latch 0000- 27 ; 0000- 28 ; SENSE-A Keypress Input 0000- 29 ; SENSE-B Serial Input 0000- 30 ; 0000- 31 ; 8154 I/O ($0A80 to $0A7F) 0000- 32 ; 0000- 33 ; (offset from P2: $0B00) FFFFFFA0- 34 PORTA .EQ -$60 ; Port A Data Register (address $0AA0) FFFFFFA1- 35 PORTB .EQ -$5F ; Port B Data Register (address $0AA1) FFFFFFA2- 36 ODRA .EQ -$5E ; Port A Output Definition Register (address $0AA2) FFFFFFA3- 37 ODRB .EQ -$5D ; Port B Output Definition Register (address $0AA3) 0000- 38 ; 0000- 39 ; Port A: PA0 to PA2 screen page select (outputs) 0000- 40 ; PA3 to PA7 keyboard column scan (outputs), PA3 not used, avaliable at JB 0000- 41 ; Port B: PB0 to PB7 keyboard row scan (inputs), PB7 not used, avaliable at JB 0000- 42 ; 0000- 43 ; 8154 RAM ($0B00 to $0B7F) 0000- 44 ; ; 0B00 set to $3E at start ? 0000- 45 ; ; 0B01 0000- 46 ; 0000- 47 ; Status Line (top line of display) 0000- 48 ; (offsets from P2 $0B00) 0070- 49 curpH .EQ $70 ; $0770 Cursor Pointer high byte (P1H) 0071- 50 curpL .EQ $71 ; $0771 Cursor Pointer low byte (P1L) 0072- 51 acurpH .EQ $72 ; $0772 Alternate Cursor high byte 0073- 52 acurpL .EQ $73 ; $0773 Alternate Cursor low byte 0074- 53 subpH .EQ $74 ; $0774 Subroutine Pointer high byte (P3H) 0075- 54 subpL .EQ $75 ; $0775 Subroutine Pointer low byte (P3L) 0076- 55 accum .EQ $76 ; $0776 Accumulator (A) 0077- 56 extreg .EQ $77 ; $0777 Extension Register (E) 0078- 57 streg .EQ $78 ; $0778 Status Register (SR) 0079- 58 ppword .EQ $79 ; $0779 Parallel Parity Word 007A- 59 matchb .EQ $7A ; $077A Matchbyte (highlighted) 007B- 60 keywrd .EQ $7B ; $077B Keyword 007C- 61 curspd .EQ $7C ; $077C Cursor Speed Counter 007D- 62 endarc .EQ $7D ; $077D End Around Carry (flags 1st/2nd digit of entered byte) 007E- 63 hexdif .EQ $7E ; $077E Hexadecimal Difference between cursors 007F- 64 prompt .EQ $7F ; $077F Prompt, Mode etc. 0000- 65 ; 0000- 66 .org $0000 0000- 67 ; Source file: softy2.asm *** Warning: Instruction starts at page boundary 68 NOP 0000-08 68 ( 5) NOP 0001- 69 ; Entry point on Reset 0001-C4 0A 70 ( 10) LDI $0A 0003-36 71 ( 8) XPAH P2 0004-C4 70 72 ( 10) LDI $70 0006-32 73 ( 8) XPAL P2 ; P2 = $0A70 0007-CE 01 74 ( 18) L0007: ST @1(P2) ; (A = 0), clear $0A70 to $0AFF ?? 0009-32 75 ( 8) XPAL P2 ; test P2L 000A-98 03 76 (9/11) JZ DONE ; exit loop if P2L zero 000C-32 77 ( 8) XPAL P2 ; restore P2L and A 000D-90 F8 78 ( 11) JMP L0007 ; and go round again 000F-C4 18 79 ( 10) DONE: LDI $18 ; point cursor pointers at page $18 (P2 = $0B00 from here on) 0011-CA 70 80 ( 18) ST curpH(P2) 0013-CA 72 81 ( 18) ST acurpH(P2) 0015-C4 00 82 ( 10) LDI $00 0017-CA A3 83 ( 18) ST ODRB(P2) ; set Port B to all inputs 0019-C4 FF 84 ( 10) LDI $FF 001B-CA A2 85 ( 18) ST ODRA(P2) ; set Port A to all outputs 001D-C4 3E 86 ( 10) LDI $3E 001F-CA 00 87 ( 18) ST 0(P2) ; $0B00=$3E 0021-C4 00 88 ( 10) L0021: LDI $00 0023-07 89 ( 6) CAS ; clear all Flags 0024-31 90 ( 8) XPAL P1 0025-C4 18 91 ( 10) LDI $18 0027-35 92 ( 8) XPAH P1 ; P1=$1800 (RAM Buffer) 0028-C4 10 93 ( 10) L0028: LDI $10 002A-01 94 ( 7) XAE ; E=$10 002B-C1 00 95 ( 18) LD 0(P1) ; clear cursor 002D-CD 01 96 ( 18) ST @1(P1) ; and increment pointer 002F-35 97 ( 8) XPAH P1 0030-01 98 ( 7) XAE ; E=P1H, A=$10 0031-60 99 ( 6) XRE 0032-98 04 100 (9/11) JZ L0038 ; finished ? 0034-01 101 ( 7) XAE ; restore P1H 0035-35 102 ( 8) XPAH P1 0036-90 F0 103 ( 11) JMP L0028 ; continue 0038- 104 ; 0038- 105 ; routine to ?? 0038-C2 70 106 ( 18) L0038: LD curpH(P2) ; copy Cursor Pointer to P1 003A-35 107 ( 8) XPAH P1 003B-C2 71 108 ( 18) LD curpL(P2) 003D-31 109 ( 8) XPAL P1 003E-C4 07 110 ( 10) SCANKEYP3: LDI $07 ; setup subroutine call 0040-37 111 ( 8) XPAH P3 0041-C4 00 112 ( 10) LDI $00 0043-33 113 ( 8) XPAL P3 ; P3=$0700 0044-3F 114 ( 7) SCANKEY: XPPC P3 ; call routine at $0701 0045-00 115 ( 8) HALT ; and HALT awaiting a keypress 0046-C2 7B 116 ( 18) LD keywrd(P2) ; then retrieve Keyword 0048-1E 117 ( 5) RR ; rotate right 4-bits - swap nibble order 0049-1E 118 ( 5) RR 004A-1E 119 ( 5) RR 004B-1E 120 ( 5) RR 004C-01 121 ( 7) XAE ; E = Keyword (nibbles reversed) 004D-C4 01 122 ( 10) LDI $01 004F-50 123 ( 6) ANE ; AND with E 0050-9C 16 124 (9/11) JNZ FUNCTION ; jump if bit 1 set (Function ?) 0052-AA 7F 125 ( 22) ILD prompt(P2) ; increment Prompt, result in A 0054-D4 01 126 ( 10) ANI $01 ; AND with $01 0056-98 05 127 (9/11) JZ DIGIT2 ; jump if bit 1 is clear (2nd digit of byte 0058-01 128 ( 7) XAE ; retrieve E (Keyword with nibbles reversed) 0059-C9 00 129 ( 18) ST 0(P1) ; and store at cursor pointer location (1st digit of byte) 005B-90 E7 130 ( 11) JMP SCANKEY ; scan keyboard again 005D- 131 ; 005D-C2 78 132 ( 18) DIGIT2: LD streg(P2) ; load Status Line Status Register 005F-07 133 ( 6) CAS ; and transfer to SR 0060-C1 00 134 ( 18) LD 0(P1) ; load value at Cursor Pointer location 0062-DA 7B 135 ( 18) OR keywrd(P2) ; OR with Keyword (2nd digit of byte) 0064-CD 01 136 ( 18) ST @1(P1) ; put back and increment Cursor Pointer 0066-90 DC 137 ( 11) JMP SCANKEY ; scan keyboard again 0068- 138 ; 0068-C4 00 139 ( 10) FUNCTION: LDI $00 ; A=0 006A-CA 7F 140 ( 18) ST prompt(P2) ; clear Prompt (reset to 1st digit for next time) 006C-C4 41 141 ( 10) LDI $41 ; EXECUTE Command ? 006E-60 142 ( 6) XRE 006F-9C 23 143 (9/11) JNZ LEFT ; jump if not EXECUTE 0071- 144 ; EXECUTE - ? 0071-C5 FF 145 ( 18) LD @-1(P1) 0073-C2 74 146 ( 18) LD subpH(P2) ; transfer Subroutine Pointer to P3 0075-37 147 ( 8) XPAH P3 ; high byte 0076-C2 75 148 ( 18) LD subpL(P2) 0078-33 149 ( 8) XPAL P3 ; low byte 0079-C2 78 150 ( 18) LD streg(P2) ; load Status Line Status Register 007B-07 151 ( 6) CAS ; and transfer to SR 007C-C2 77 152 ( 18) LD extreg(P2) ; load Status Line Extension Register 007E-01 153 ( 7) XAE ; and transfer to E 007F-C2 76 154 ( 18) LD accum(P2) ; load Status Line Accumulator 0081-3D 155 ( 7) XPPC P1 ; call P1 ?? 0082-CA 76 156 ( 18) ST accum(P2) ; update Status Line Accumulator 0084-01 157 ( 7) XAE ; transfer E to A 0085-CA 77 158 ( 18) ST extreg(P2) ; update Status Line Extension Register 0087-06 159 ( 5) CSA ; transfer SR to A 0088-CA 78 160 ( 18) ST streg(P2) ; update Status Line Status Register 008A-33 161 ( 8) XPAL P3 ; update Status Line Subroutine Pointer 008B-CA 75 162 ( 18) ST subpL(P2) ; low byte 008D-37 163 ( 8) XPAH P3 008E-CA 74 164 ( 18) ST subpH(P2) ; high byte 0090-90 AC 165 ( 11) L0090: JMP SCANKEYP3 ; call keyboard scan routine (restoring P3) 0092- 166 ; 0092-90 8D 167 ( 11) L0092: JMP L0021 0094- 168 ; 0094-C4 71 169 ( 10) LEFT: LDI $71 ; LEFT Command ? 0096-60 170 ( 6) XRE 0097-9C 0B 171 (9/11) JNZ INSERT ; jump if not LEFT 0099- 172 ; LEFT ?? 0099-C2 78 173 ( 18) LD streg(P2) ; load Status Line Status Register 009B-07 174 ( 6) CAS ; transfer to SR 009C-C1 00 175 ( 18) LD 0(P1) ; clear Cursor at Cursor Pointer 009E-C9 00 176 ( 18) ST 0(P1) 00A0-C5 FF 177 ( 18) LD @-1(P1) 00A2-90 EC 178 ( 11) JMP L0090 ; jump to call keyboard scan routine (restoring P3) 00A4- 179 ; 00A4-C4 91 180 ( 10) INSERT: LDI $91 ; INSERT Command ? 00A6-60 181 ( 6) XRE 00A7-9C 20 182 (9/11) JNZ L00C9 ; jump if not INSERT 00A9- 183 ; INSERT - ?? 00A9-C4 DD 184 ( 10) LDI $DD 00AB-33 185 ( 8) XPAL P3 ; P3=$xxDD 00AC-3F 186 ( 7) XPPC P3 ; return 00AD-C1 FE 187 ( 18) L00AD: LD -2(P1) 00AF-CD FF 188 ( 18) ST @-1(P1) 00B1-35 189 ( 8) XPAH P1 00B2-01 190 ( 7) XAE 00B3-C2 70 191 ( 18) LD curpH(P2) 00B5-60 192 ( 6) XRE 00B6-98 04 193 (9/11) JZ L00BC 00B8-40 194 ( 6) LDE 00B9-35 195 ( 8) XPAH P1 00BA-90 F1 196 ( 11) JMP L00AD 00BC- 197 ; 00BC-40 198 ( 6) L00BC: LDE 00BD-35 199 ( 8) XPAH P1 00BE-31 200 ( 8) XPAL P1 00BF-01 201 ( 7) XAE 00C0-C2 71 202 ( 18) LD curpL(P2) 00C2-60 203 ( 6) XRE 00C3-98 CD 204 (9/11) L00C3: JZ L0092 00C5-40 205 ( 6) LDE 00C6-31 206 ( 8) XPAL P1 00C7-90 E4 207 ( 11) JMP L00AD 00C9- 208 ; 00C9-C4 A1 209 ( 10) L00C9: LDI $A1 ; DELETE Command ? 00CB-60 210 ( 6) XRE 00CC-9C 27 211 (9/11) JNZ L00F5 ; jump if not DELETE 00CE- 212 ; DELETE - ?? 00CE-C4 DD 213 ( 10) LDI $DD 00D0-33 214 ( 8) XPAL P3 ; P3=$xxDD 00D1-3F 215 ( 7) XPPC P3 ; return 00D2-C4 FF 216 ( 10) LDI $FF 00D4-01 217 ( 7) XAE ; E=$FF 00D5-C5 FF 218 ( 18) L00D5: LD @-1(P1) ; get byte at cursor and decrement P1 00D7-01 219 ( 7) XAE ; put in E (A=$FF) 00D8-C9 00 220 ( 18) ST 0(P1) ; put $FF at cursor location 00DA-01 221 ( 7) XAE 00DB-35 222 ( 8) XPAH P1 00DC-01 223 ( 7) XAE ; E=P1H 00DD-C2 70 224 ( 18) LD curpH(P2) 00DF-60 225 ( 6) XRE 00E0-98 05 226 (9/11) JZ L00E7 00E2-01 227 ( 7) XAE ; restore P1H 00E3-35 228 ( 8) XPAH P1 00E4-01 229 ( 7) XAE 00E5-90 EE 230 ( 11) JMP L00D5 00E7- 231 ; 00E7-01 232 ( 7) L00E7: XAE 00E8-35 233 ( 8) XPAH P1 00E9-31 234 ( 8) XPAL P1 00EA-01 235 ( 7) XAE 00EB-C2 71 236 ( 18) LD curpL(P2) 00ED-60 237 ( 6) XRE 00EE-98 D3 238 (9/11) JZ L00C3 00F0-01 239 ( 7) XAE 00F1-31 240 ( 8) XPAL P1 00F2-01 241 ( 7) XAE 00F3-90 E0 242 ( 11) JMP L00D5 00F5- 243 ; 00F5-C4 81 244 ( 10) L00F5: LDI $81 ; $81 Command ? RIGHT ?? 00F7-60 245 ( 6) XRE 00F8-9C 07 246 (9/11) JNZ MOVE ; jump if not $81 00FA- 247 ; $81 ?? 00FA-07 248 ( 6) CAS ; clear SR 00FB-C1 00 249 ( 18) LD 0(P1) ; get byte at cursor 00FD-CD 01 250 ( 18) ST @1(P1) ; put back and decrement P1 00FF-90 8F 251 ( 11) JMP L0090 0101- 252 ; 0101-C4 11 253 ( 10) MOVE: LDI $11 ; MOVE Command ? 0103-60 254 ( 6) XRE 0104-9C 67 255 (9/11) JNZ STORE ; jump if not MOVE 0106- 256 ; MOVE - moves a DEFINEd block through the RAM Buffer 0106-C4 EE 257 ( 10) LDI $EE 0108-CA 7F 258 ( 18) ST prompt(P2) ; Prompt=$EE 010A-3F 259 ( 7) L010A: XPPC P3 ; return 010B-00 260 ( 8) HALT 010C-C2 7B 261 ( 18) LD keywrd(P2) ; retrieve Keyword 010E-01 262 ( 7) XAE ; put in E 010F-C4 18 263 ( 10) LDI $18 ; FORWARD Command ? 0111-60 264 ( 6) XRE 0112-9C 22 265 (9/11) JNZ L0136 ; jump if not FORWARD 0114-AA 7E 266 ( 22) ILD hexdif(P2) 0116-01 267 ( 7) XAE 0117-C1 80 268 ( 18) LD E(P1) 0119-CA 7D 269 ( 18) ST endarc(P2) 011B-C4 01 270 ( 10) L011B: LDI $01 011D-07 271 ( 6) CAS ; set Flag 0 (Cursor) (clear Carry) 011E-BA 7E 272 ( 22) DLD hexdif(P2) 0120-01 273 ( 7) XAE 0121-C1 80 274 ( 18) LD E(P1) 0123-01 275 ( 7) XAE 0124-F4 01 276 ( 11) ADI $01 ; add 1 0126-01 277 ( 7) XAE 0127-C9 80 278 ( 18) ST E(P1) 0129-01 279 ( 7) XAE 012A-9C EF 280 (9/11) JNZ L011B 012C-07 281 ( 6) CAS ; clear SR 012D-08 282 ( 5) NOP 012E-C2 7D 283 ( 18) LD endarc(P2) 0130-CD 01 284 ( 18) ST @1(P1) 0132-AA 73 285 ( 22) ILD acurpL(P2) 0134-90 D4 286 ( 11) JMP L010A 0136- 287 ; 0136-C4 17 288 ( 10) L0136: LDI $17 ; BACK Command ? 0138-60 289 ( 6) XRE 0139-98 06 290 (9/11) JZ L0141 ; jump if not BACK 013B-C4 00 291 ( 10) LDI $00 013D-CA 78 292 ( 18) ST streg(P2) 013F-90 56 293 ( 11) JMP L0197 0141- 294 ; 0141-C1 FF 295 ( 18) L0141: LD -1(P1) 0143-CA 7D 296 ( 18) ST endarc(P2) 0145-AA 7E 297 ( 22) ILD hexdif(P2) 0147-C4 00 298 ( 10) LDI $00 0149-01 299 ( 7) XAE 014A-C4 01 300 ( 10) L014A: LDI $01 014C-07 301 ( 6) CAS ; set Flag 0 (Cursor) 014D-C1 80 302 ( 18) LD E(P1) 014F-01 303 ( 7) XAE 0150-F4 FF 304 ( 11) ADI $FF 0152-01 305 ( 7) XAE 0153-C9 80 306 ( 18) ST E(P1) 0155-02 307 ( 5) CCL 0156-01 308 ( 7) XAE 0157-F4 02 309 ( 11) ADI $02 0159-01 310 ( 7) XAE 015A-C2 7E 311 ( 18) LD hexdif(P2) 015C-60 312 ( 6) XRE 015D-9C EB 313 (9/11) JNZ L014A 015F-07 314 ( 6) CAS ; clear all Flags 0160-BA 7E 315 ( 22) DLD hexdif(P2) 0162-01 316 ( 7) XAE 0163-C2 7D 317 ( 18) LD endarc(P2) 0165-C9 80 318 ( 18) ST E(P1) 0167-BA 73 319 ( 22) DLD acurpL(P2) 0169-C5 FF 320 ( 18) LD @-1(P1) 016B-90 9D 321 ( 11) JMP L010A 016D- 322 ; 016D-C4 21 323 ( 10) STORE: LDI $21 ; STORE Command ? 016F-60 324 ( 6) XRE 0170-9C 29 325 (9/11) JNZ REPLACE ; jump if not STORE 0172- 326 ; STORE - ?? 0172-CA 78 327 ( 18) ST streg(P2) 0174-01 328 ( 7) XAE 0175-AA 7E 329 ( 22) ILD hexdif(P2) 0177-C1 80 330 ( 18) L0177: LD E(P1) 0179-01 331 ( 7) XAE 017A-02 332 ( 5) CCL 017B-F4 01 333 ( 11) ADI $01 017D-01 334 ( 7) XAE 017E-CA 80 335 ( 18) ST E(P2) 0180-C2 7E 336 ( 18) LD hexdif(P2) 0182-60 337 ( 6) XRE 0183-9C F2 338 (9/11) JNZ L0177 0185-01 339 ( 7) XAE 0186-CA 6F 340 ( 18) ST $6F(P2) 0188-AA 7E 341 ( 22) ILD hexdif(P2) 018A-01 342 ( 7) XAE 018B-C4 90 343 ( 10) LDI $90 018D-CA 80 344 ( 18) ST E(P2) 018F-AA 7E 345 ( 22) ILD hexdif(P2) 0191-01 346 ( 7) XAE 0192-C4 00 347 ( 10) LDI $00 0194-07 348 ( 6) CAS ; clear all Flags 0195-FA 7E 349 ( 20) CAD hexdif(P2) 0197-CA 80 350 ( 18) L0197: ST E(P2) 0199-90 70 351 ( 11) JMP L020B 019B- 352 ; 019B-C4 31 353 ( 10) REPLACE: LDI $31 ; REPLACE Command ? 019D-60 354 ( 6) XRE 019E-9C 16 355 (9/11) JNZ L01B6 ; jump if not REPLACE 01A0- 356 ; REPLACE - ?? 01A0-01 357 ( 7) XAE 01A1-C2 6F 358 ( 18) L01A1: LD $6F(P2) 01A3-60 359 ( 6) XRE 01A4-9C 05 360 (9/11) JNZ L01AB 01A6-C4 3D 361 ( 10) LDI $3D 01A8-33 362 ( 8) XPAL P3 ; P3=$xx3D 01A9-90 6F 363 ( 11) JMP L021A 01AB- 364 ; 01AB-01 365 ( 7) L01AB: XAE 01AC-02 366 ( 5) CCL 01AD-F4 01 367 ( 11) ADI $01 01AF-01 368 ( 7) XAE 01B0-C2 80 369 ( 18) LD E(P2) 01B2-CD 01 370 ( 18) ST @1(P1) 01B4-90 EB 371 ( 11) JMP L01A1 01B6- 372 ; 01B6-C4 61 373 ( 10) L01B6: LDI $61 ; PAGE Command ? 01B8-60 374 ( 6) XRE 01B9-9C 0E 375 (9/11) JNZ DEFINE ; jump if not PAGE 01BB- 376 ; PAGE - permits a direct jump between RAM Buffer pages by entering 01BB- 377 ; a single digit for the page required 01BB-C4 CC 378 ( 10) LDI $CC 01BD-CA 7F 379 ( 18) ST prompt(P2) ; Prompt=$CC 01BF-3F 380 ( 7) XPPC P3 ; return 01C0-00 381 ( 8) HALT 01C1-C2 7B 382 ( 18) LD keywrd(P2) ; retrieve Keyword (Page) 01C3-F4 10 383 ( 11) ADI $10 ; add $10 01C5-CA 70 384 ( 18) ST curpH(P2) 01C7-90 4A 385 ( 11) JMP L0213 01C9- 386 ; 01C9-C4 01 387 ( 10) DEFINE: LDI $01 ; DEFINE Command ? 01CB-60 388 ( 6) XRE 01CC-9C 12 389 (9/11) JNZ L01E0 ; jump if not DEFINE Command 01CE- 390 ; DEFINE - move cursor backwards to enclose a Block of data 01CE-C4 DD 391 ( 10) LDI $DD 01D0-CA 7F 392 ( 18) ST prompt(P2) ; Prompt=$DD 01D2-C4 01 393 ( 10) LDI $01 01D4-CA 78 394 ( 18) ST streg(P2) ; Status Line Status Register = $01 01D6-C2 70 395 ( 18) LD curpH(P2) ; copy Cursor Pointer to Alternate Cursor Pointer 01D8-CA 72 396 ( 18) ST acurpH(P2) 01DA-C2 71 397 ( 18) LD curpL(P2) 01DC-CA 73 398 ( 18) ST acurpL(P2) 01DE-90 37 399 ( 11) JMP L0217 01E0- 400 ; 01E0-C4 55 401 ( 10) L01E0: LDI $55 ; set Prompt to keypad Function Keycode entry 01E2-CA 7F 402 ( 18) ST prompt(P2) 01E4-3F 403 ( 7) XPPC P3 ; return 01E5-00 404 ( 8) HALT 01E6-C4 00 405 ( 10) LDI $00 ; $SWAP Command ? 01E8-CA 7F 406 ( 18) ST prompt(P2) 01EA-C2 7B 407 ( 18) LD keywrd(P2) 01EC-9C 10 408 (9/11) JNZ FIX ; jump if not SWAP 01EE- 409 ; SWAP - exchanges the Current Pointer with the Alternate Cursor 01EE-C2 72 410 ( 18) LD acurpH(P2) ; copy Alternate Cursor Pointer to Cursor Pointer 01F0-CA 70 411 ( 18) ST curpH(P2) 01F2-C2 73 412 ( 18) LD acurpL(P2) 01F4-CA 71 413 ( 18) ST curpL(P2) 01F6-35 414 ( 8) XPAH P1 ; copy P1(Cursor Pointer) to Alternate Cursor Pointer 01F7-CA 72 415 ( 18) ST acurpH(P2) 01F9-31 416 ( 8) XPAL P1 01FA-CA 73 417 ( 18) ST acurpL(P2) 01FC-90 15 418 ( 11) JMP L0213 01FE- 419 ; 01FE-01 420 ( 7) FIX: XAE 01FF-C4 01 421 ( 10) LDI $01 ; $FIX Command ? 0201-60 422 ( 6) XRE 0202-9C 0A 423 (9/11) JNZ SHIFT ; jump if not FIX 0204- 424 ; FIX - provides the alternate cursor function by copying the 0204- 425 ; Current Cursor to the Alternate Cursor 0204-35 426 ( 8) XPAH P1 ; copy high byte 0205-CA 72 427 ( 18) ST acurpH(P2) 0207-35 428 ( 8) XPAH P1 ; put current cursor high byte back in P1 0208-31 429 ( 8) XPAL P1 ; and low byte 0209-CA 73 430 ( 18) ST acurpL(P2) 020B-31 431 ( 8) L020B: XPAL P1 ; put current cursor low byte back in P1 020C-90 05 432 ( 11) JMP L0213 020E- 433 ; 020E-C4 15 434 ( 10) SHIFT: LDI $15 ; SHIFT Command ? 0210-60 435 ( 6) XRE 0211-9C 0B 436 (9/11) JNZ SEROUT ; jump if not SHIFT 0213- 437 ; SHIFT - (was FUNCTION in SOFTY1) gives access to the keypad second functions, 0213- 438 ; the prompt location will contain $55 0213-C4 00 439 ( 10) L0213: LDI $00 0215-CA 7F 440 ( 18) ST prompt(P2) ; Prompt = 0 0217-C4 20 441 ( 10) L0217: LDI $20 ; setup subroutine call 0219-33 442 ( 8) XPAL P3 021A-C4 00 443 ( 10) L021A: LDI $00 021C-37 444 ( 8) XPAH P3 ; P3=$0020 021D-3F 445 ( 7) XPPC P3 ; call routine at $0021 021E- 446 ; 021E-C4 02 447 ( 10) SEROUT: LDI $02 ; $SERIAL OUT Command ? 0220-60 448 ( 6) XRE 0221-9C 5E 449 (9/11) JNZ PAROUT ; jump if not SERIAL OUT 0223- 450 ; SERIAL OUT - outputs a block of data serially 0223- 451 ; after selection press a single digit to select the baud rate: 0223- 452 ; (1=110, 3=300, 6=600, C=1200, F=2400) 0223-C4 BA 453 ( 10) LDI $BA 0225-CA 7F 454 ( 18) ST prompt(P2) ; Prompt=$BA (baud rate ?) 0227-3F 455 ( 7) XPPC P3 ; return 0228-00 456 ( 8) HALT 0229-C4 06 457 ( 10) LDI $06 ; setup subroutine call 022B-37 458 ( 8) XPAH P3 022C-C4 D9 459 ( 10) LDI $D9 022E-33 460 ( 8) XPAL P3 ; P3=06D9 022F-C7 01 461 ( 18) L022F: LD @1(P3) 0231-CE 01 462 ( 18) ST @1(P2) 0233-33 463 ( 8) XPAL P3 0234-98 03 464 (9/11) JZ L0239 0236-33 465 ( 8) XPAL P3 0237-90 F6 466 ( 11) JMP L022F 0239- 467 ; 0239-C4 00 468 ( 10) L0239: LDI $00 023B-32 469 ( 8) XPAL P2 ; P2=$xx00 023C-C4 00 470 ( 10) LDI $00 023E-33 471 ( 8) XPAL P3 023F-C4 0A 472 ( 10) LDI $0A 0241-37 473 ( 8) XPAH P3 ; P3=$0A00 0242-C2 7B 474 ( 18) LD keywrd(P2) 0244-01 475 ( 7) XAE 0245-C4 01 476 ( 10) LDI $01 ; FIX Command ? 0247-60 477 ( 6) XRE 0248-9C 07 478 (9/11) JNZ SIN ; jump if not FIX 024A- 479 ; FIX - 024A-C4 83 480 ( 10) LDI $83 024C-01 481 ( 7) XAE ; E=$83 024D-C4 11 482 ( 10) LDI $11 ; A=$11 024F-90 22 483 ( 11) JMP L0273 0251- 484 ; 0251-C4 03 485 ( 10) SIN: LDI $03 ; $SERIAL IN Command ? 0253-60 486 ( 6) XRE 0254-9C 07 487 (9/11) JNZ RUN2 ; jump if not SERIAL IN 0256- 488 ; SERIAL IN - receives a block of data from the serial input 0256- 489 ; after selection press a single digit to select the baud rate: 0256- 490 ; (1=110, 3=300, 6=600, C=1200, F=2400) 0256-C4 4E 491 ( 10) LDI $4E 0258-01 492 ( 7) XAE ; E=$4E 0259-C4 06 493 ( 10) LDI $06 ; A=$06 025B-90 16 494 ( 11) JMP L0273 025D- 495 ; 025D-C4 06 496 ( 10) RUN2: LDI $06 ; RUN Command ? 025F-60 497 ( 6) XRE 0260-9C 07 498 (9/11) JNZ L0269 ; jump if not RUN 0262- 499 ; RUN - ?? 0262-C4 10 500 ( 10) LDI $10 0264-01 501 ( 7) XAE ; E=$10 0265-C4 03 502 ( 10) LDI $03 ; A=$03 0267-90 0A 503 ( 11) JMP L0273 0269- 504 ; 0269-C4 0C 505 ( 10) L0269: LDI $0C ; $COPY Command ? 026B-60 506 ( 6) XRE 026C-9C 11 507 (9/11) JNZ L027F ; jump if not COPY 026E- 508 ; COPY - copies the contents of an EPROM in the Programming Socket 026E- 509 ; to RAM Buffer (screen) 026E-C4 72 510 ( 10) LDI $72 0270-01 511 ( 7) XAE ; E=$72 0271-C4 01 512 ( 10) LDI $01 ; A=$01 0273-CA 13 513 ( 18) L0273: ST $13(P2) 0275-CA 20 514 ( 18) ST $20(P2) 0277-40 515 ( 6) LDE ; A=E 0278-CA 11 516 ( 18) ST $11(P2) 027A-02 517 ( 5) CCL ; clear carry 027B-F4 0E 518 ( 11) ADI $0E ; add $0E 027D-CA 1E 519 ( 18) ST $1E(P2) 027F-90 10 520 ( 11) L027F: JMP L0291 0281- 521 ; 0281-C4 04 522 ( 10) PAROUT: LDI $04 ; $PARALLEL OUT Command ? 0283-60 523 ( 6) XRE 0284-9C 6A 524 (9/11) JNZ SERIN ; jump if not PARALLEL OUT 0286- 525 ; PARALLEL OUT - ouputs Block of data to e.g. a printer, 0286- 526 ; each byts is transmitted as 2 ASCII characters with spaces in between 0286- 527 ; together with LF and CRs 0286-C4 40 528 ( 10) LDI $40 0288-CA A3 529 ( 18) ST -$5D(P2) 028A-C4 60 530 ( 10) LDI $60 028C-CA A4 531 ( 18) ST -$5C(P2) 028E-C4 A0 532 ( 10) LDI $A0 0290-33 533 ( 8) XPAL P3 ; P3=$xxA0 $02A0 ? 0291-C2 70 534 ( 18) L0291: LD curpH(P2) ; copy Cursor Pointer to P1 0293-35 535 ( 8) XPAH P1 0294-C2 71 536 ( 18) LD curpL(P2) 0296-31 537 ( 8) XPAL P1 0297-C4 0D 538 ( 10) L0297: LDI $0D ; send a CR 0299-3F 539 ( 7) XPPC P3 029A-C4 0D 540 ( 10) L029A: LDI $0D ; send a CR 029C-3F 541 ( 7) XPPC P3 029D-C4 0A 542 ( 10) LDI $0A ; send a LF 029F-3F 543 ( 7) XPPC P3 02A0-C1 00 544 ( 18) L02A0: LD 0(P1) ; get byte to send 02A2-1C 545 ( 5) SR ; shift upper nibble to lower nibble 02A3-1C 546 ( 5) SR 02A4-1C 547 ( 5) SR 02A5-1C 548 ( 5) SR 02A6-F4 36 549 ( 11) ADI $36 ; add $36 02A8-01 550 ( 7) XAE ; and transfer to E 02A9-C0 80 551 ( 18) LD E 02AB-3F 552 ( 7) XPPC P3 ; send first digit 02AC-C5 01 553 ( 18) LD @1(P1) 02AE-D4 0F 554 ( 10) ANI $0F ; AND with $0F to mask off lower nibble 02B0-F4 2C 555 ( 11) ADI $2C ; add $2C 02B2-01 556 ( 7) XAE ; and transfer to E 02B3-C0 80 557 ( 18) LD E 02B5-3F 558 ( 7) XPPC P3 ; send 2nd digit 02B6-C4 20 559 ( 10) LDI $20 ; send a Space 02B8-3F 560 ( 7) XPPC P3 02B9-35 561 ( 8) XPAH P1 02BA-01 562 ( 7) XAE ; E=P1H 02BB-C2 72 563 ( 18) LD acurpH(P2) 02BD-60 564 ( 6) XRE ; finished ? 02BE-9C 0B 565 (9/11) JNZ L02CB 02C0-40 566 ( 6) LDE 02C1-31 567 ( 8) XPAL P1 02C2-01 568 ( 7) XAE 02C3-C2 73 569 ( 18) LD acurpL(P2) 02C5-60 570 ( 6) XRE 02C6-98 B8 571 (9/11) JZ L027F+1 ; jump to the middle of an instruction ? 02C8-40 572 ( 6) LDE 02C9-31 573 ( 8) XPAL P1 02CA-01 574 ( 7) XAE 02CB-C4 10 575 ( 10) L02CB: LDI $10 ; A=$10 02CD-60 576 ( 6) XRE ; XOR with E 02CE-98 B0 577 (9/11) JZ L027F+1 ; jump to the middle of an instruction ? 02D0-40 578 ( 6) LDE 02D1-35 579 ( 8) XPAH P1 02D2-31 580 ( 8) XPAL P1 02D3-01 581 ( 7) XAE 02D4-40 582 ( 6) LDE 02D5-31 583 ( 8) XPAL P1 02D6-C4 0F 584 ( 10) LDI $0F ; A=$0F 02D8-50 585 ( 6) ANE ; AND with E to mask off lower nibble 02D9-9C C5 586 (9/11) JNZ L02A0 02DB-40 587 ( 6) LDE 02DC-98 B9 588 (9/11) JZ L0297 02DE-90 BA 589 ( 11) JMP L029A 02E0- 590 ; 02E0-30 591 L02DF: .db $30 ; ASCII 0 02E1-31 592 .db $31 ; ASCII 1 02E2-32 593 .db $32 ; ASCII 2 02E3-33 594 .db $33 ; ASCII 3 02E4-34 595 .db $34 ; ASCII 4 02E5-35 596 .db $35 ; ASCII 5 02E6-36 597 .db $36 ; ASCII 6 02E7-37 598 .db $37 ; ASCII 7 02E8-38 599 .db $38 ; ASCII 8 02E9-39 600 .db $39 ; ASCII 9 02EA-41 601 .db $41 ; ASCII A 02EB-42 602 .db $42 ; ASCII B 02EC-43 603 .db $43 ; ASCII C 02ED-44 604 .db $44 ; ASCII D 02EE-45 605 .db $45 ; ASCII E 02EF-46 606 .db $46 ; ASCII F 02F0- 607 ; 02F0-C4 03 608 ( 10) SERIN: LDI $03 ; $SERIAL IN Command ? 02F2-60 609 ( 6) XRE 02F3-9C 16 610 (9/11) JNZ JMPPARIN ; jump if not SERIAL IN 02F5- 611 ; SERIAL IN - ?? 02F5-C4 BA 612 ( 10) LDI $BA 02F7-CA 7F 613 ( 18) ST prompt(P2) 02F9-3F 614 ( 7) XPPC P3 ; return 02FA-00 615 ( 8) HALT 02FB-C4 D9 616 ( 10) LDI $D9 02FD-33 617 ( 8) XPAL P3 02FE-C4 05 618 ( 10) LDI $05 0300-37 619 ( 8) XPAH P3 ; P3=$05D9 0301-C7 01 620 ( 18) L0301: LD @1(P3) 0303-CE 01 621 ( 18) ST @1(P2) 0305-33 622 ( 8) XPAL P3 0306-98 05 623 (9/11) JZ L030D 0308-33 624 ( 8) XPAL P3 0309-90 F6 625 ( 11) JMP L0301 030B- 626 ; 030B-90 6A 627 ( 11) JMPPARIN: JMP PARIN ; jump to PARALLEL IN command 030D- 628 ; 030D-33 629 ( 8) L030D: XPAL P3 030E-C4 0A 630 ( 10) LDI $0A 0310-37 631 ( 8) XPAH P3 0311-C4 00 632 ( 10) LDI $00 ; P3=$000A 0313-32 633 ( 8) XPAL P2 ; P2=$xx00 0314-C2 7B 634 ( 18) LD keywrd(P2) ; load Cursor Speed Counter 0316-01 635 ( 7) XAE ; and move to E 0317-C4 01 636 ( 10) LDI $01 ; A=$01 0319-60 637 ( 6) XRE ; XOR with E 031A-9C 14 638 (9/11) JNZ L0330 031C-C4 C2 639 ( 10) LDI $C2 ; A=$C2 031E-CA 0D 640 ( 18) ST $0D(P2) 0320-CA 21 641 ( 18) ST $21(P2) 0322-C4 08 642 ( 10) LDI $08 ; A=$08 0324-CA 0F 643 ( 18) ST $0F(P2) 0326-CA 23 644 ( 18) ST $23(P2) 0328-C4 92 645 ( 10) LDI $92 ; A=$92 032A-CA 18 646 ( 18) ST $18(P2) 032C-C4 11 647 ( 10) LDI $11 ; A=$11 032E-CA 1A 648 ( 18) ST $1A(P2) 0330-C4 03 649 ( 10) L0330: LDI $03 ; A=$03 0332-60 650 ( 6) XRE ; XOR with E 0333-9C 14 651 (9/11) JNZ L0349 0335-C4 28 652 ( 10) LDI $28 ; A=$28 0337-CA 0D 653 ( 18) ST $0D(P2) 0339-CA 21 654 ( 18) ST $21(P2) 033B-C4 03 655 ( 10) LDI $03 ; A=$03 033D-CA 0F 656 ( 18) ST $0F(P2) 033F-CA 23 657 ( 18) ST $23(P2) 0341-C4 5E 658 ( 10) LDI $5E ; A=$5E 0343-CA 18 659 ( 18) ST $18(P2) 0345-C4 06 660 ( 10) LDI $06 ; A=$06 0347-CA 1A 661 ( 18) ST $1A(P2) 0349-C4 06 662 ( 10) L0349: LDI $06 ; A=$06 034B-60 663 ( 6) XRE ; XOR with E 034C-9C 14 664 (9/11) JNZ L0362 034E-C4 89 665 ( 10) LDI $89 ; A=$89 0350-CA 0D 666 ( 18) ST $0D(P2) 0352-CA 21 667 ( 18) ST $21(P2) 0354-C4 01 668 ( 10) LDI $01 ; A=$01 0356-CA 0F 669 ( 18) ST $0F(P2) 0358-CA 23 670 ( 18) ST $23(P2) 035A-C4 20 671 ( 10) LDI $20 ; A=$20 035C-CA 18 672 ( 18) ST $18(P2) 035E-C4 03 673 ( 10) LDI $03 ; A=$03 0360-CA 1A 674 ( 18) ST $1A(P2) 0362-C4 0C 675 ( 10) L0362: LDI $0C ; A=$0C 0364-60 676 ( 6) XRE ; XOR with E 0365-9C 0E 677 (9/11) JNZ L0375 0367-C4 BA 678 ( 10) LDI $BA ; A=$BA 0369-CA 0D 679 ( 18) ST $0D(P2) 036B-CA 21 680 ( 18) ST $21(P2) 036D-C4 01 681 ( 10) LDI $01 ; A=$01 036F-CA 1A 682 ( 18) ST $1A(P2) 0371-C4 81 683 ( 10) LDI $81 ; A=$81 0373-CA 18 684 ( 18) ST $18(P2) 0375-90 0B 685 ( 11) L0375: JMP L0382 0377- 686 ; 0377-C4 05 687 ( 10) PARIN: LDI $05 ; $PARALLEL IN Command ? 0379-60 688 ( 6) XRE 037A-9C 4B 689 (9/11) JNZ CPYFIRM ; jump if not PARALLEL IN 037C- 690 ; PARALLEL IN - ?? 037C-C4 77 691 ( 10) LDI $77 037E-33 692 ( 8) XPAL P3 ; setup subroutine call 037F-C4 06 693 ( 10) LDI $06 0381-37 694 ( 8) XPAH P3 ; P3=$0677 0382-3F 695 ( 7) L0382: XPPC P3 ; call subroutine at $0678 0383-01 696 ( 7) XAE 0384-C4 70 697 ( 10) LDI $70 0386-50 698 ( 6) ANE 0387-E4 30 699 ( 10) XRI $30 0389-98 14 700 (9/11) JZ L039F 038B-E4 70 701 ( 10) XRI $70 038D-9C F3 702 (9/11) JNZ L0382 038F-C4 0F 703 ( 10) LDI $0F 0391-50 704 ( 6) ANE 0392-98 EE 705 (9/11) JZ L0382 0394-02 706 ( 5) CCL ; clear carry 0395-F4 09 707 ( 11) ADI $09 ; add decimal 9 0397-01 708 ( 7) XAE 0398-C4 30 709 ( 10) LDI $30 039A-50 710 ( 6) ANE 039B-9C E5 711 (9/11) JNZ L0382 039D-90 0B 712 ( 11) JMP L03AA 039F- 713 ; 039F-C4 0F 714 ( 10) L039F: LDI $0F 03A1-50 715 ( 6) ANE 03A2-01 716 ( 7) XAE 03A3-40 717 ( 6) LDE 03A4-F4 06 718 ( 11) ADI $06 03A6-D4 10 719 ( 10) ANI $10 03A8-9C D8 720 (9/11) JNZ L0382 03AA-AA 7F 721 ( 22) L03AA: ILD prompt(P2) ; increment Prompt 03AC-D4 01 722 ( 10) ANI $01 03AE-98 09 723 (9/11) JZ L03B9 03B0-40 724 ( 6) LDE 03B1-1E 725 ( 5) RR 03B2-1E 726 ( 5) RR 03B3-1E 727 ( 5) RR 03B4-1E 728 ( 5) RR 03B5-C9 00 729 ( 18) ST 0(P1) 03B7-90 C9 730 ( 11) JMP L0382 03B9- 731 ; 03B9-C1 00 732 ( 18) L03B9: LD 0(P1) 03BB-58 733 ( 6) ORE 03BC-CD 01 734 ( 18) ST @1(P1) 03BE-90 C2 735 ( 11) JMP L0382 03C0- 736 ; 03C0-C4 20 737 ( 10) L03C0: LDI $20 ; setup subroutine call 03C2-33 738 ( 8) XPAL P3 03C3-C4 00 739 ( 10) LDI $00 03C5-37 740 ( 8) XPAH P3 ; P3=$0020 03C6-3F 741 ( 7) XPPC P3 ; call routine at $0021 03C7- 742 ; 03C7-C4 09 743 ( 10) CPYFIRM: LDI $09 ; $COPYFIRM Command ? 03C9-60 744 ( 6) XRE 03CA-9C 1C 745 (9/11) JNZ DELETE ; jump if not COPYFIRM 03CC- 746 ; COPYFIRM - copy contents of Softy 2 firmware to working RAM 03CC-C4 00 747 ( 10) LDI $00 03CE-31 748 ( 8) XPAL P1 03CF-C4 00 749 ( 10) LDI $00 03D1-33 750 ( 8) XPAL P3 03D2-C4 00 751 ( 10) LDI $00 03D4-37 752 ( 8) XPAH P3 ; P3=$0000 (Firmware EPROM) 03D5-C4 18 753 ( 10) LDI $18 03D7-35 754 ( 8) XPAH P1 ; P1=$1800 (RAM Buffer) 03D8-C4 10 755 ( 10) DOFIRM: LDI $10 03DA-01 756 ( 7) XAE ; E=$10 03DB-C7 01 757 ( 18) LD @1(P3) ; copy Firmware EPROM to RAM Buffer 03DD-CD 01 758 ( 18) ST @1(P1) 03DF-35 759 ( 8) XPAH P1 03E0-01 760 ( 7) XAE ; E=P1H 03E1-60 761 ( 6) XRE 03E2-98 DC 762 (9/11) L03E2: JZ L03C0 ; finished ? 03E4-01 763 ( 7) XAE ; restore P1H 03E5-35 764 ( 8) XPAH P1 03E6-90 F0 765 ( 11) JMP DOFIRM ; continue copying 03E8- 766 ; 03E8-C4 1A 767 ( 10) DELETE: LDI $1A ; $CLEAR BACKWARDS Command ? 03EA-60 768 ( 6) XRE 03EB-9C 0F 769 (9/11) JNZ CLEARFRWD ; jump if not CLEAR BACKWARDS 03ED- 770 ; CLEAR BACKWARDS - writes $FF into the RAM Buffer behind the cursor 03ED-C4 FF 771 ( 10) LDI $FF ; byte to CLEAR with 03EF-CD FF 772 ( 18) CLEARBACK: ST @-1(P1) ; store at cusor location (and decrement pointer) 03F1-35 773 ( 8) XPAH P1 03F2-01 774 ( 7) XAE ; E=P1H 03F3-C4 17 775 ( 10) LDI $17 03F5-60 776 ( 6) XRE 03F6-98 EA 777 (9/11) L03F6: JZ L03E2 ; finished ? 03F8-01 778 ( 7) XAE ; restore P1H 03F9-35 779 ( 8) XPAH P1 ; and A (=$FF) 03FA-90 F3 780 ( 11) JMP CLEARBACK ; continue CLEARing 03FC- 781 ; 03FC-C4 19 782 ( 10) CLEARFRWD: LDI $19 ; $CLEAR FORWARDS ? 03FE-60 783 ( 6) XRE 03FF-9C 10 784 (9/11) JNZ GOSUB ; jump if not CLEAR FORWARDS 0401- 785 ; CLEAR FORWARDS - writes $FF into the RAM Buffer in front of the cursor 0401-C4 10 786 ( 10) L0401: LDI $10 0403-01 787 ( 7) XAE ; E=$10 0404-C4 FF 788 ( 10) LDI $FF ; byte to CLEAR with 0406-CD 01 789 ( 18) ST @1(P1) ; store at cursor location ( and increment pointer) 0408-35 790 ( 8) XPAH P1 0409-01 791 ( 7) XAE ; E=P1H 040A-60 792 ( 6) XRE 040B-98 E9 793 (9/11) JZ L03F6 ; finished ? 040D-01 794 ( 7) XAE ; restore P1H 040E-35 795 ( 8) XPAH P1 040F-90 F0 796 ( 11) JMP L0401 ; continue 0411- 797 ; 0411-C4 14 798 ( 10) GOSUB: LDI $14 ; GOSUB Command ? 0413-60 799 ( 6) XRE 0414-9C 03 800 (9/11) JNZ MATCH ; jump if not GOSUB 0416- 801 ; GOSUB - ?? 0416-3E 802 ( 7) XPPC P2 0417-90 A7 803 ( 11) JMP L03C0 0419- 804 ; 0419-C4 0F 805 ( 10) MATCH: LDI $0F ; $MATCH Command ? 041B-60 806 ( 6) XRE 041C-9C 50 807 (9/11) JNZ EXRAM ; jump if not MATCH 041E- 808 ; MATCH - highlights all occurances of the next byte to be entered 041E- 809 ; at the keypad 041E-C4 BB 810 ( 10) LDI $BB 0420-CA 7F 811 ( 18) ST prompt(P2) ; Prompt=$BB 0422-3F 812 ( 7) XPPC P3 ; return 0423-00 813 ( 8) HALT 0424-C2 7B 814 ( 18) LD keywrd(P2) ; retrieve Keyword 0426-1E 815 ( 5) RR ; rotate to lower nibble ? 0427-1E 816 ( 5) RR 0428-1E 817 ( 5) RR 0429-1E 818 ( 5) RR 042A-01 819 ( 7) XAE ; put result in E 042B-C4 01 820 ( 10) LDI $01 042D-50 821 ( 6) ANE ; AND with E 042E-9C CD 822 (9/11) L042E: JNZ CLEARFRWD+1 ; jump to the middle of an instruction ? 0430-01 823 ( 7) XAE 0431-CA 7F 824 ( 18) ST prompt(P2) 0433-3F 825 ( 7) XPPC P3 ; return 0434-00 826 ( 8) HALT 0435-C2 7B 827 ( 18) LD keywrd(P2) 0437-01 828 ( 7) XAE ; E=Keyword 0438-C4 10 829 ( 10) LDI $10 043A-50 830 ( 6) ANE ; AND with $10 043B-9C F1 831 (9/11) JNZ L042E ; jump if bit set 043D-C2 7F 832 ( 18) LD prompt(P2) 043F-58 833 ( 6) ORE ; OR with E 0440-CA 7F 834 ( 18) ST prompt(P2) 0442-C2 70 835 ( 18) LD curpH(P2) 0444-D4 1C 836 ( 10) ANI $1C ; AND with $1C 0446-35 837 ( 8) XPAH P1 0447-C4 00 838 ( 10) LDI $00 0449-31 839 ( 8) XPAL P1 ; P1=$xx00 044A-C2 7F 840 ( 18) L044A: LD prompt(P2) 044C-01 841 ( 7) XAE 044D-C5 01 842 ( 18) LD @1(P1) 044F-60 843 ( 6) XRE 0450-9C 0A 844 (9/11) JNZ L045C 0452-C4 01 845 ( 10) LDI $01 0454-07 846 ( 6) CAS ; set Flag 0 (Cursor) 0455-C1 FF 847 ( 18) LD -1(P1) ; update cursor 0457-C9 FF 848 ( 18) ST -1(P1) 0459-C4 00 849 ( 10) LDI $00 045B-07 850 ( 6) CAS ; clear all Flags 045C-35 851 ( 8) L045C: XPAH P1 045D-01 852 ( 7) XAE 045E-02 853 ( 5) CCL ; clear Carry 045F-C2 70 854 ( 18) LD curpH(P2) 0461-F4 04 855 ( 11) ADI $04 ; add 4 0463-D4 1C 856 ( 10) ANI $1C 0465-DC 10 857 ( 10) ORI $10 0467-60 858 ( 6) XRE 0468-98 7D 859 (9/11) JZ L04E7 046A-01 860 ( 7) XAE 046B-35 861 ( 8) XPAH P1 046C-90 DC 862 ( 11) JMP L044A 046E- 863 ; 046E-C4 18 864 ( 10) EXRAM: LDI $18 0470-35 865 ( 8) XPAH P1 0471-C4 00 866 ( 10) LDI $00 0473-31 867 ( 8) XPAL P1 ; P1=$1800 (RAM Buffer) 0474-C4 00 868 ( 10) LDI $00 0476-33 869 ( 8) XPAL P3 ; P3=$xx00 0477-C4 0E 870 ( 10) LDI $0E ; EX-RAM Command ? 0479-60 871 ( 6) XRE 047A-9C 16 872 (9/11) JNZ COPY ; jump if not EX-RAM 047C- 873 ; $EX-RAM - copies the contents of the RAM Buffer to a 047C- 874 ; RAM in the Programming Socket 047C-C4 18 875 ( 10) LDI $18 047E-37 876 ( 8) XPAH P3 ; P3=$1800 (RAM Buffer) 047F-C4 10 877 ( 10) LDI $10 0481-35 878 ( 8) XPAH P1 ; P1=$1000 (Programming Socket) 0482-C4 10 879 ( 10) DOEXRAM: LDI $10 0484-01 880 ( 7) XAE ; E=$10 0485-C7 01 881 ( 18) LD @1(P3) ; copy byte from RAM Buffer to Programming Socket 0487-CD 01 882 ( 18) ST @1(P1) 0489-37 883 ( 8) XPAH P3 048A-01 884 ( 7) XAE ; E=P3H 048B-60 885 ( 6) XRE 048C-98 21 886 (9/11) JZ DOWN ; finished ? 048E-01 887 ( 7) XAE ; restore P3H 048F-37 888 ( 8) XPAH P3 0490-90 F0 889 ( 11) JMP DOEXRAM ; continue copying 0492- 890 ; 0492-C4 0C 891 ( 10) COPY: LDI $0C ; $COPY Command ? 0494-60 892 ( 6) XRE 0495-9C 13 893 (9/11) JNZ UP ; jump if not COPY 0497- 894 ; COPY - transfers the contents of the Programming Socket 0497- 895 ; to the RAM Buffer 0497-C4 10 896 ( 10) LDI $10 0499-37 897 ( 8) XPAH P3 ; P3=$1000 (Programming Socket) 049A-C4 10 898 ( 10) DOCOPY: LDI $10 049C-01 899 ( 7) XAE ; E=$10 049D-C7 01 900 ( 18) LD @1(P3) ; copy byte from Programming Socket to RAM Buffer 049F-CD 01 901 ( 18) ST @1(P1) 04A1-35 902 ( 8) XPAH P1 04A2-01 903 ( 7) XAE ; E=P3H 04A3-60 904 ( 6) XRE 04A4-98 15 905 (9/11) JZ L04BB ; finished ? 04A6-01 906 ( 7) XAE ; restore P3H 04A7-35 907 ( 8) XPAH P1 04A8-90 F0 908 ( 11) JMP DOCOPY ; continue copying 04AA- 909 ; 04AA-C4 17 910 ( 10) UP: LDI $17 ; $UP Command ? 04AC-60 911 ( 6) XRE 04AD-98 05 912 (9/11) JZ DOUPDOWN ; jump if UP 04AF- 913 04AF-C4 18 914 ( 10) DOWN: LDI $18 ; $DOWN Command ? 04B1-60 915 ( 6) XRE 04B2-9C 09 916 (9/11) JNZ COMPARE ; jump if not DOWN 04B4- 917 ; UP and DOWN - 04B4-C4 0F 918 ( 10) DOUPDOWN: LDI $0F 04B6-CA 7C 919 ( 18) ST curspd(P2) ; Cursor Speed Counter=$0F 04B8-40 920 ( 6) LDE ; A=E 04B9-CA 7B 921 ( 18) ST keywrd(P2) 04BB-90 3D 922 ( 11) L04BB: JMP L04FA 04BD- 923 ; 04BD-C4 0A 924 ( 10) COMPARE: LDI $0A ; $COMPARE Command ? 04BF-60 925 ( 6) XRE 04C0-9C 3F 926 (9/11) JNZ BURN ; jump if not COMPARE 04C2- 927 ; COMPARE - compares the contents of an EPROM in the 04C2- 928 ; Programming Socket with Working RAM (screen) 04C2-CA 7F 929 ( 18) VERIFY: ST prompt(P2) ; Prompt=0 04C4-C4 18 930 ( 10) LDI $18 04C6-35 931 ( 8) XPAH P1 04C7-C4 00 932 ( 10) LDI $00 04C9-31 933 ( 8) XPAL P1 ; P1=$1800 (RAM Buffer) 04CA-C4 10 934 ( 10) LDI $10 04CC-37 935 ( 8) XPAH P3 04CD-C4 00 936 ( 10) LDI $00 04CF-33 937 ( 8) XPAL P3 ; P3=$1000 (Programming Socket) 04D0-C7 01 938 ( 18) DOCOMP: LD @1(P3) ; compare Programming Socket and RAM Buffer 04D2-E5 01 939 ( 18) XOR @1(P1) 04D4-9C 0B 940 (9/11) JNZ DIFF ; jump if different 04D6-35 941 ( 8) CNTCOMP: XPAH P1 04D7-01 942 ( 7) XAE 04D8-C4 10 943 ( 10) L04D8: LDI $10 04DA-60 944 ( 6) XRE 04DB-98 1D 945 (9/11) JZ L04FA ; finished ? 04DD-01 946 ( 7) XAE 04DE-35 947 ( 8) XPAH P1 04DF-90 EF 948 ( 11) JMP DOCOMP ; continue COMPAREing 04E1- 949 ; 04E1-AA 7F 950 ( 22) DIFF: ILD prompt(P2) ; increment differences found count 04E3-35 951 ( 8) XPAH P1 04E4-01 952 ( 7) XAE ; E=P1H 04E5-C2 70 953 ( 18) LD curpH(P2) 04E7-60 954 ( 6) L04E7: XRE 04E8-D4 1C 955 ( 10) ANI $1C 04EA-9C EC 956 (9/11) JNZ L04D8 04EC-01 957 ( 7) XAE 04ED-35 958 ( 8) XPAH P1 ; restore P1H 04EE-C4 01 959 ( 10) LDI $01 04F0-07 960 ( 6) CAS ; set Flag 0 (Cursor) 04F1-C1 FF 961 ( 18) LD -1(P1) ; mark the difference 04F3-C9 FF 962 ( 18) ST -1(P1) 04F5-C4 00 963 ( 10) LDI $00 04F7-07 964 ( 6) CAS ; clear all Flags 04F8-90 DC 965 ( 11) JMP CNTCOMP ; continue COMPAREing 04FA- 966 ; 04FA-C4 37 967 ( 10) L04FA: LDI $37 ; setup subroutine call 04FC-33 968 ( 8) XPAL P3 04FD-C4 00 969 ( 10) LDI $00 04FF-37 970 ( 8) XPAH P3 ; P3=$0037 0500-3F 971 ( 7) XPPC P3 ; call routine at $0038 0501- 972 ; 0501-C4 0B 973 ( 10) BURN: LDI $0B ; $BURN Command ? 0503-60 974 ( 6) XRE 0504-9C 22 975 (9/11) JNZ RUN ; jump if not BURN 0506- 976 ; BURN - Program EPROM in Programming Socket from RAM buffer 0506-C4 18 977 ( 10) LDI $18 0508-35 978 ( 8) XPAH P1 ; P1=$1800 (RAM Buffer) 0509-C4 02 979 ( 10) LDI $02 050B-07 980 ( 6) CAS ; set Flag 1 (EPROM Vpp) 050C-C4 10 981 ( 10) L050C: LDI $10 050E-01 982 ( 7) XAE ; E=$10 050F-C4 FF 983 ( 10) LDI $FF ; A=$FF 0511-E5 01 984 ( 18) XOR @1(P1) ; if RAM Buffer location is $FF 0513-98 04 985 (9/11) JZ FF ; no need to program 0515-E4 FF 986 ( 10) XRI $FF 0517-C9 FF 987 ( 18) ST -1(P1) 0519-08 988 ( 5) FF: NOP ; delay ? 051A-08 989 ( 5) NOP 051B-08 990 ( 5) NOP 051C-35 991 ( 8) XPAH P1 051D-01 992 ( 7) XAE ; E=P1H 051E-60 993 ( 6) XRE 051F-98 04 994 (9/11) JZ L0525 ; finished ? 0521-01 995 ( 7) XAE ; restore P1H 0522-35 996 ( 8) XPAH P1 0523-90 E7 997 ( 11) JMP L050C ; continue BURNing 0525- 998 ; 0525-07 999 ( 6) L0525: CAS ; clear flags 0526-90 9A 1000 ( 11) JMP VERIFY ; jump to COMPARE command to verify 0528- 1001 ; 0528-C4 06 1002 ( 10) RUN: LDI $06 ; $RUN Command ? 052A-60 1003 ( 6) XRE 052B-9C 07 1004 (9/11) JNZ PRETEST ; jump if not RUN 052D- 1005 ; RUN - hand control to a user program in the Programming Socket 052D-C4 10 1006 ( 10) LDI $10 052F-37 1007 ( 8) XPAH P3 0530-C4 00 1008 ( 10) LDI $00 0532-33 1009 ( 8) XPAL P3 ; P3=$1000 (Programming Socket) 0533-3F 1010 ( 7) XPPC P3 ; call routine at $1001 0534- 1011 ; 0534-C4 0D 1012 ( 10) PRETEST: LDI $0D ; $PRETEST Command ? 0536-60 1013 ( 6) XRE 0537-9C 4C 1014 (9/11) JNZ TRANSIN ; jump if not PRETEST 0539- 1015 ; PRETEST - check an EPROM in the Programming Socket can be programmed 0539- 1016 ; with the contents of the RAM Buffer i.e. can only program from 1 to 0 0539-CA 7F 1017 ( 18) ST prompt(P2) ; Prompt=0 (reset count) 053B-C4 10 1018 ( 10) LDI $10 053D-37 1019 ( 8) XPAH P3 ; P3=$1000 (Programming Socket) 053E-C4 18 1020 ( 10) LDI $18 0540-35 1021 ( 8) XPAH P1 ; P1=$1800 (RAM Buffer) 0541-C5 01 1022 ( 18) DOPRETEST: LD @1(P1) ; load byte from RAM Buffer (and increment P1) 0543-E3 00 1023 ( 18) XOR 0(P3) ; and compare with Programming Socket 0545-01 1024 ( 7) XAE ; put result in E (0 if the same) 0546-C4 FF 1025 ( 10) LDI $FF ; A=$FF 0548-E7 01 1026 ( 18) XOR @1(P3) ; invert byte in Programming Socket (and increment P3) 054A-50 1027 ( 6) ANE ; AND with E to check can be programmed 054B-9C 0B 1028 (9/11) JNZ NOPROG ; if not jump 054D-35 1029 ( 8) XPAH P1 054E-01 1030 ( 7) XAE ; E=P1H 054F-C4 10 1031 ( 10) L054F: LDI $10 ; A=$10 0551-60 1032 ( 6) XRE 0552-98 1D 1033 (9/11) JZ L0571 ; finished ? 0554-01 1034 ( 7) XAE ; restore P1H 0555-35 1035 ( 8) XPAH P1 0556-90 E9 1036 ( 11) JMP DOPRETEST ; continue PRETESTing 0558- 1037 ; 0558-AA 7F 1038 ( 22) NOPROG: ILD prompt(P2) ; increment the count of non-programmable locations 055A-35 1039 ( 8) XPAH P1 055B-01 1040 ( 7) XAE ; E=P1H 055C-C2 70 1041 ( 18) LD curpH(P2) 055E-60 1042 ( 6) XRE 055F-D4 1C 1043 ( 10) ANI $1C 0561-9C EC 1044 (9/11) JNZ L054F 0563-01 1045 ( 7) XAE ; restore P1H 0564-35 1046 ( 8) XPAH P1 0565-C4 01 1047 ( 10) LDI $01 0567-07 1048 ( 6) CAS ; set Flag 0 (Cursor) 0568-C1 FF 1049 ( 18) LD -1(P1) ; mark non-programmable location 056A-C9 FF 1050 ( 18) ST -1(P1) 056C-C4 00 1051 ( 10) LDI $00 056E-07 1052 ( 6) CAS ; clear all Flags 056F-90 D0 1053 ( 11) JMP DOPRETEST ; continue PRETESTing 0571- 1054 ; 0571-C4 37 1055 ( 10) L0571: LDI $37 ; setup subroutine call 0573-33 1056 ( 8) XPAL P3 0574-C4 00 1057 ( 10) LDI $00 0576-37 1058 ( 8) XPAH P3 ; P3=$0037 0577-3F 1059 ( 7) XPPC P3 ; call routine at $0038 0578- 1060 ; 0578- 1061 ; Packing - fill space between $0578 and $0584 with $FF 0578-FF FF FF FF FF FF 1062 .db $FF,$FF,$FF,$FF,$FF,$FF 057E- 1063 L057E: 057E-FF FF FF FF FF FF FF 1064 .db $FF,$FF,$FF,$FF,$FF,$FF,$FF 0585- 1065 ; 0585-C4 08 1066 ( 10) TRANSIN: LDI $08 ; $TRANSWIFT IN Command ? 0587-60 1067 ( 6) XRE 0588-9C 76 1068 (9/11) JNZ TRANSOUT ; jump if not TRANSWIFT IN 058A- 1069 ; TRANSWIFT IN - 058A-C4 AC 1070 ( 10) LDI $AC 058C-33 1071 ( 8) XPAL P3 ; P3=$xxAC 058D-C4 30 1072 ( 10) L058D: LDI $30 058F-CA 7F 1073 ( 18) ST prompt(P2) ; Prompt=$30 0591-3F 1074 ( 7) L0591: XPPC P3 ; return 0592-C4 AA 1075 ( 10) LDI $AA 0594-60 1076 ( 6) XRE ; compare with $AA 0595-98 05 1077 (9/11) JZ L059C 0597-C4 55 1078 ( 10) LDI $55 0599-60 1079 ( 6) XRE ; compare with $55 059A-9C F1 1080 (9/11) JNZ L058D 059C-BA 7F 1081 ( 22) L059C: DLD prompt(P2) ; decrement Prompt 059E-9C F1 1082 (9/11) JNZ L0591 05A0-3F 1083 ( 7) L05A0: XPPC P3 ; return 05A1-C4 69 1084 ( 10) LDI $69 05A3-60 1085 ( 6) XRE ; compare with $69 05A4-9C FA 1086 (9/11) JNZ L05A0 05A6-3F 1087 ( 7) L05A6: XPPC P3 ; return 05A7-3F 1088 ( 7) XPPC P3 ; return 05A8-3F 1089 ( 7) XPPC P3 ; return 05A9-3F 1090 ( 7) XPPC P3 ; return 05AA-3F 1091 ( 7) XPPC P3 ; return 05AB-3F 1092 ( 7) XPPC P3 ; return 05AC-3F 1093 ( 7) XPPC P3 ; return 05AD-3F 1094 ( 7) XPPC P3 ; return 05AE-CD 01 1095 ( 18) ST @1(P1) 05B0-35 1096 ( 8) XPAH P1 05B1-01 1097 ( 7) XAE ; E=P1H 05B2-C4 10 1098 ( 10) LDI $10 05B4-60 1099 ( 6) XRE ; compare with $10 05B5-98 04 1100 (9/11) JZ L05BB 05B7-01 1101 ( 7) XAE ; restore P1H 05B8-35 1102 ( 8) XPAH P1 05B9-90 EB 1103 ( 11) JMP L05A6 05BB- 1104 ; 05BB-C4 18 1105 ( 10) L05BB: LDI $18 05BD-35 1106 ( 8) XPAH P1 ; P1=18xx 05BE-3F 1107 ( 7) XPPC P3 ; return 05BF-3F 1108 ( 7) XPPC P3 ; return 05C0-3F 1109 ( 7) XPPC P3 ; return 05C1-3F 1110 ( 7) XPPC P3 ; return 05C2-3F 1111 ( 7) XPPC P3 ; return 05C3-3F 1112 ( 7) XPPC P3 ; return 05C4-3F 1113 ( 7) XPPC P3 ; return 05C5-3F 1114 ( 7) XPPC P3 ; return 05C6-E5 01 1115 ( 18) L05C6: XOR @1(P1) 05C8-35 1116 ( 8) XPAH P1 05C9-01 1117 ( 7) XAE ; E=P1H 05CA-C4 10 1118 ( 10) LDI $10 05CC-60 1119 ( 6) XRE ; E=$10 05CD-98 04 1120 (9/11) JZ L05D3 05CF-01 1121 ( 7) XAE ; restore P1H 05D0-35 1122 ( 8) XPAH P1 05D1-90 F3 1123 ( 11) JMP L05C6 05D3- 1124 ; 05D3-01 1125 ( 7) L05D3: XAE ; restore P1H 05D4-35 1126 ( 8) XPAH P1 05D5-CA 7F 1127 ( 18) ST prompt(P2) 05D7-90 A5 1128 ( 11) JMP L057E 05D9- 1129 ; 05D9-3F 1130 ( 7) L05D9: XPPC P3 ; return 05DA-C4 08 1131 ( 10) LDI $08 05DC-C8 23 1132 ( 18) ST TRANSOUT ; ?? 05DE-C4 00 1133 ( 10) L05DE: LDI $00 05E0-01 1134 ( 7) XAE 05E1-19 1135 ( 5) SIO ; serial I/O 05E2-40 1136 ( 6) LDE 05E3-9C F9 1137 (9/11) JNZ L05DE 05E5-C4 52 1138 ( 10) LDI $52 05E7-8F 00 1139 ( 13+) DLY $00 ; delay 177uS (13+2*82+512*0)uS (13+2*A+512*DISP) 05E9-19 1140 ( 5) SIO ; serial I/O 05EA-01 1141 ( 7) XAE 05EB-9C F1 1142 (9/11) JNZ L05DE 05ED-C4 00 1143 ( 10) LDI $00 05EF-01 1144 ( 7) XAE 05F0-C4 B2 1145 ( 10) L05F0: LDI $B2 05F2-8F 00 1146 ( 13+) DLY $00 ; delay 369uS (13+2*178+512*0)uS (13+2*A+512*DISP) 05F4-19 1147 ( 5) SIO ; serial I/O 05F5-B8 0A 1148 ( 22) DLD $0A(P0) 05F7-9C F7 1149 (9/11) JNZ L05F0 05F9-C4 52 1150 ( 10) LDI $52 05FB-8F 00 1151 ( 13+) DLY $00 ; delay 177uS (13+2*82+512*0)uS (13+2*A+512*DISP) 05FD-01 1152 ( 7) XAE 05FE-90 D9 1153 ( 11) JMP L05D9 0600- 1154 ; 0600-C4 07 1155 ( 10) TRANSOUT: LDI $07 ; $TRANSWIFT OUT Command ? 0602-60 1156 ( 6) XRE 0603-9C 6C 1157 (9/11) JNZ L0671 ; jump if not TRANSWIFT OUT 0605- 1158 ; TRANSWIFT OUT - 0605-C4 01 1159 ( 10) LDI $01 0607-01 1160 ( 7) XAE 0608-19 1161 ( 5) SIO ; serial I/O 0609-C4 60 1162 ( 10) LDI $60 060B-8F 00 1163 ( 13+) DLY $00 ; delay 49mS (13+2*1+512*96)uS (13+2*A+512*DISP) 060D-C4 BF 1164 ( 10) LDI $BF 060F-33 1165 ( 8) XPAL P3 ; P3=$xxBF 0610-C4 20 1166 ( 10) LDI $20 0612-CA 7F 1167 ( 18) ST prompt(P2) ; Prompt=$20 0614-C4 AA 1168 ( 10) LDI $AA ; A=$AA 0616-CA 7E 1169 ( 18) ST hexdif(P2) 0618-C2 7F 1170 ( 18) L0618: LD prompt(P2) ; update Prompt 061A-98 12 1171 (9/11) JZ L062E 061C-C4 AA 1172 ( 10) LDI $AA ; A=$AA 061E-01 1173 ( 7) XAE 061F-BA 7F 1174 ( 22) DLD prompt(P2) ; decrement Prompt 0621-98 04 1175 (9/11) JZ L0627 0623-C4 0A 1176 ( 10) LDI $0A ; A=$0A 0625-90 11 1177 ( 11) JMP L0638 0627- 1178 ; 0627-C4 69 1179 ( 10) L0627: LDI $69 0629-01 1180 ( 7) XAE ; E=$69 062A-C4 02 1181 ( 10) LDI $02 062C-90 0A 1182 ( 11) JMP L0638 062E- 1183 ; 062E-C5 01 1184 ( 18) L062E: LD @1(P1) 0630-01 1185 ( 7) XAE 0631-C2 7E 1186 ( 18) LD hexdif(P2) 0633-60 1187 ( 6) XRE 0634-CA 7E 1188 ( 18) ST hexdif(P2) 0636-C4 01 1189 ( 10) LDI $01 0638-8F 00 1190 ( 13+) L0638: DLY $00 ; delay 15uS (13+2*1+512*0)uS (13+2*A+512*DISP) 063A-3F 1191 ( 7) XPPC P3 ; return 063B-8F 00 1192 ( 13+) DLY $00 ; delay 15uS (13+2*1+512*0)uS (13+2*A+512*DISP) 063D-3F 1193 ( 7) XPPC P3 ; return 063E-8F 00 1194 ( 13+) DLY $00 ; delay 15uS (13+2*1+512*0)uS (13+2*A+512*DISP) 0640-3F 1195 ( 7) XPPC P3 ; return 0641-8F 00 1196 ( 13+) DLY $00 ; delay 15uS (13+2*1+512*0)uS (13+2*A+512*DISP) 0643-3F 1197 ( 7) XPPC P3 ; return 0644-8F 00 1198 ( 13+) DLY $00 ; delay 15uS (13+2*1+512*0)uS (13+2*A+512*DISP) 0646-3F 1199 ( 7) XPPC P3 ; return 0647-8F 00 1200 ( 13+) DLY $00 ; delay 15uS (13+2*1+512*0)uS (13+2*A+512*DISP) 0649-3F 1201 ( 7) XPPC P3 ; return 064A-8F 00 1202 ( 13+) DLY $00 ; delay 15uS (13+2*1+512*0)uS (13+2*A+512*DISP) 064C-3F 1203 ( 7) XPPC P3 ; return 064D-8F 00 1204 ( 13+) DLY $00 ; delay 15uS (13+2*1+512*0)uS (13+2*A+512*DISP) 064F-3F 1205 ( 7) XPPC P3 ; return 0650-35 1206 ( 8) XPAH P1 0651-01 1207 ( 7) XAE ; E=P1H 0652-C4 10 1208 ( 10) LDI $10 0654-60 1209 ( 6) XRE 0655-98 04 1210 (9/11) JZ L065B 0657-01 1211 ( 7) XAE ; restore P1H 0658-35 1212 ( 8) XPAH P1 0659-90 BD 1213 ( 11) JMP L0618 065B- 1214 ; 065B-01 1215 ( 7) L065B: XAE 065C-35 1216 ( 8) XPAH P1 ; restore P1H 065D-C2 7F 1217 ( 18) LD prompt(P2) 065F-9C 0B 1218 (9/11) JNZ L066C 0661-C4 AA 1219 ( 10) LDI $AA 0663-CA 7F 1220 ( 18) ST prompt(P2) ; Prompt =$AA 0665-C2 7E 1221 ( 18) LD hexdif(P2) 0667-01 1222 ( 7) XAE 0668-C4 0C 1223 ( 10) LDI $0C ; A=$0C 066A-90 CC 1224 ( 11) JMP L0638 066C- 1225 ; 066C-C4 1E 1226 ( 10) L066C: LDI $1E 066E-8F 00 1227 ( 13+) DLY $00 ; delay 73uS (13+2*30+512*0)uS (13+2*A+512*DISP) 0670-3F 1228 ( 7) XPPC P3 ; return from subroutine call 0671- 1229 ; 0671-C4 20 1230 ( 10) L0671: LDI $20 ; setup subroutine call at $0021 0673-33 1231 ( 8) XPAL P3 0674-C4 00 1232 ( 10) LDI $00 0676-37 1233 ( 8) XPAH P3 ; P3=$0020 0677-3F 1234 ( 7) XPPC P3 ; call subroutine at $0021 0678- 1235 ; 0678-C4 00 1236 ( 10) L0678: LDI $00 ; subroutine ? 067A-CA A2 1237 ( 18) ST -$5E(P2) 067C-C4 40 1238 ( 10) LDI $40 067E-CA A3 1239 ( 18) ST -$5D(P2) 0680-C4 20 1240 ( 10) LDI $20 0682-CA A4 1241 ( 18) ST -$5C(P2) 0684-C2 8E 1242 ( 18) L0684: LD -$72(P2) 0686-98 FC 1243 (9/11) JZ L0684 0688-C2 A0 1244 ( 18) LD -$60(P2) 068A-3F 1245 ( 7) XPPC P3 ; return 068B-90 F7 1246 ( 11) JMP L0684 068D- 1247 ; 068D- 1248 ; Packing - fill space between $068D and $06C4 with $FF 068D-FF FF FF FF FF FF FF FF 1249 .db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF 0695-FF FF FF FF FF FF FF FF 1250 .db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF 069D-FF FF FF FF FF FF FF FF 1251 .db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF 06A5-FF FF FF FF FF FF FF FF 1252 .db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF 06AD-FF FF FF FF FF FF FF FF 1253 .db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF 06B5-FF FF FF FF FF FF FF FF 1254 .db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF 06BD-FF FF FF FF FF FF FF FF 1255 .db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF 06C5- 1256 ; 06C5-08 1257 ( 5) L06C5: NOP 06C6-C4 0F 1258 ( 10) LDI $0F 06C8-CA 7A 1259 ( 18) ST matchb(P2) 06CA-C4 01 1260 ( 10) L06CA: LDI $01 06CC-01 1261 ( 7) XAE ; E=1 06CD-19 1262 ( 5) SIO 06CE-8F 01 1263 ( 13+) DLY $01 ; delay 527uS (13+2*1+512*1)uS (13+2*A+512*DISP) 06D0-19 1264 ( 5) SIO 06D1-8F 01 1265 ( 13+) DLY $01 ; delay 527uS (13+2*1+512*1)uS (13+2*A+512*DISP) 06D3-BA 7A 1266 ( 22) DLD matchb(P2) 06D5-9C F3 1267 (9/11) JNZ L06CA 06D7-90 2B 1268 ( 11) JMP KEYSCAN 06D9- 1269 ; 06D9-3F 1270 ( 7) L06D9: XPPC P3 ; return 06DA-E4 FF 1271 ( 10) XRI $FF ; subroutine ? 06DC-01 1272 ( 7) XAE 06DD-C4 00 1273 ( 10) L06DD: LDI $00 06DF-01 1274 ( 7) XAE 06E0-19 1275 ( 5) SIO ; serial I/O 06E1-01 1276 ( 7) XAE 06E2-98 F9 1277 (9/11) JZ L06DD 06E4-C4 01 1278 ( 10) LDI $01 06E6-01 1279 ( 7) XAE 06E7-19 1280 ( 5) SIO ; serial I/O 06E8-01 1281 ( 7) XAE 06E9-C4 B1 1282 ( 10) LDI $B1 06EB-8F 00 1283 ( 13+) DLY $00 ; delay 90.637mS (13+2*0+512*177)uS (13+2*A+512*DISP) 06ED-C4 0B 1284 ( 10) LDI $0B 06EF-C8 10 1285 ( 18) ST L0700 06F1-19 1286 ( 5) L06F1: SIO ; serial I/O 06F2-40 1287 ( 6) LDE 06F3-D4 7F 1288 ( 10) ANI $7F 06F5-01 1289 ( 7) XAE 06F6-C4 A2 1290 ( 10) LDI $A2 06F8-8F 00 1291 ( 13+) DLY $00 ; delay 83.981mS (13+2*0+512*164)uS (13+2*A+512*DISP) 06FA-B8 05 1292 ( 22) DLD $05(P0) 06FC-9C F3 1293 (9/11) JNZ L06F1 06FE-90 D9 1294 ( 11) JMP L06D9 0700- 1295 ; 0700-3F 1296 ( 7) L0700: XPPC P3 ; return from subroutine call 0701-90 C2 1297 ( 11) L0701: JMP L06C5 0703- 1298 ; 0703-3F 1299 ( 7) L0703: XPPC P3 ; return from subroutine call 0704- 1300 ; 0704- 1301 ; ; Scan Keyboard Routine 0704-35 1302 ( 8) KEYSCAN: XPAH P1 ; P1 is a copy of the cursor pointer 0705-CA 70 1303 ( 18) ST curpH(P2) ; save the high byte 0707-35 1304 ( 8) XPAH P1 ; and restore P1 0708-C2 70 1305 ( 18) LD curpH(P2) 070A-1C 1306 ( 5) SR ; shift 1 bit right to provide screen Page,RAM/EPROM selects 070B-CA A0 1307 ( 18) ST PORTA(P2) ; write screen Page,RAM/EPROM selects and clear keyboard Row 070D-C4 85 1308 ( 10) LDI $85 070F-07 1309 ( 6) CAS ; set Flag 0 (Cursor), Flag 2 (HALT Latch) and Carry 0710-31 1310 ( 8) XPAL P1 ; A=P1 low byte 0711-CA 71 1311 ( 18) ST curpL(P2) ; save as Cursor Pointer low byte 0713-01 1312 ( 7) XAE ; E=Cursor Pointer low byte 0714-C2 73 1313 ( 18) LD acurpL(P2) ; A=Alternate Cursor Pointer low byte 0716-78 1314 ( 8) CAE ; calculate the difference 0717-CA 7E 1315 ( 18) ST hexdif(P2) ; and save as Hex Diference 0719-01 1316 ( 7) XAE ; A=Cursor Pointer low byte 071A-31 1317 ( 8) XPAL P1 ; restore P1 cursor pointer low byte 071B-C1 00 1318 ( 18) LD 0(P1) ; update Cursor position 071D-C9 00 1319 ( 18) ST 0(P1) 071F-C2 7B 1320 ( 18) LD keywrd(P2) 0721-01 1321 ( 7) XAE ; E = last key pressed 0722-C4 17 1322 ( 10) LDI $17 ; LEFT ? 0724-60 1323 ( 6) XRE 0725-98 05 1324 (9/11) JZ L072C ; jump if LEFT 0727-C4 18 1325 ( 10) LDI $18 ; RIGHT ? 0729-60 1326 ( 6) XRE 072A-9C 21 1327 (9/11) JNZ L074D ; jump if not RIGHT 072C-AA 7C 1328 ( 22) L072C: ILD curspd(P2) ; LEFT or FORWARD - increment and load Cursor Speed Counter 072E-01 1329 ( 7) XAE ; transfer to E 072F-C4 F0 1330 ( 10) LDI $F0 0731-50 1331 ( 6) ANE ; A AND E - clear lower nibble 0732-98 0D 1332 (9/11) JZ L0741 ; jump if high nibble was zero 0734-C4 0F 1333 ( 10) LDI $0F 0736-50 1334 ( 6) ANE ; A AND E - clear high nibble 0737-98 08 1335 (9/11) JZ L0741 ; jump if low nibble was zero 0739-DC 30 1336 ( 10) ORI $30 ; set bits 4 and 5 073B-CA 7C 1337 ( 18) ST curspd(P2) ; and update Cursor Speed Counter 073D-C7 01 1338 ( 18) L073D: LD @1(P3) ; increment P3 ?? 073F-90 BF 1339 ( 11) L073F: JMP L0700 ; return from subroutine call 0741- 1340 ; 0741-8F FF 1341 ( 13+) L0741: DLY $FF ; delay 130mS (13+2*0+512*255)uS (13+2*A+512*DISP) 0743-8F FF 1342 ( 13+) DLY $FF ; delay 130mS (13+2*0+512*255)uS (13+2*A+512*DISP) 0745-C2 A1 1343 ( 18) LD PORTB(P2) ; read keyboard column 0747-DC 80 1344 ( 10) ORI $80 ; set bit 7 0749-E4 FF 1345 ( 10) XRI $FF ; invert all bits 074B-9C F0 1346 (9/11) JNZ L073D ; result will be non-zero if key pressed, return 074D-C2 A1 1347 ( 18) L074D: LD PORTB(P2) ; read keyboard column 074F-DC 80 1348 ( 10) ORI $80 ; set bit 7 0751-E4 FF 1349 ( 10) XRI $FF ; invert all bits 0753-01 1350 ( 7) XAE ; put result in E 0754-8F 10 1351 ( 13+) DLY $10 ; debounce 8.2mS (13+2*0+512*16)uS (13+2*A+512*DISP) 0756-C2 A1 1352 ( 18) LD PORTB(P2) ; reread keyboard column 0758-DC 80 1353 ( 10) ORI $80 ; set bit 7 075A-E4 FF 1354 ( 10) XRI $FF ; invert all bits 075C-58 1355 ( 6) ORE ; OR with previous value read 075D-9C EE 1356 (9/11) JNZ L074D ; result non-zero if key pressed, round again waiting for release 075F-C4 00 1357 ( 10) LDI $00 ; key released 0761-CA 7C 1358 ( 18) ST curspd(P2) ; clear Cursor Speed Counter 0763-CA 7B 1359 ( 18) ST keywrd(P2) ; clear Keyword 0765-05 1360 ( 6) IEN ; enable interrupts 0766-3F 1361 ( 7) XPPC P3 ; and return 0767- 1362 ; 0767- 1363 ; Interrupt Service Routine 0767-07 1364 ( 6) CAS ; clear all flags 0768-C2 A1 1365 ( 18) LD PORTB(P2) ; read keyboard column 076A-DC 80 1366 ( 10) ORI $80 ; set bit 7 076C-E4 FF 1367 ( 10) XRI $FF ; invert all bits 076E-9C 04 1368 (9/11) JNZ L0774 0770-CF FE 1369 ( 18) L0770: ST @-2(P3) ; decrement P3 ?? 0772-90 8F 1370 ( 11) JMP L0703 ; return ?? 0774- 1371 ; 0774-1C 1372 ( 5) L0774: SR 0775-98 06 1373 (9/11) JZ L077D ; jump if zero 0777-01 1374 ( 7) XAE ; save A in E 0778-AA 7B 1375 ( 22) ILD keywrd(P2) ; increment Keyword 077A-01 1376 ( 7) XAE ; retrieve A 077B-90 F7 1377 ( 11) JMP L0774 077D- 1378 ; 077D-02 1379 ( 5) L077D: CCL ; clear carry ready for addition 077E-C4 FF 1380 ( 10) LDI $FF 0780-1C 1381 ( 5) L0780: SR 0781-98 ED 1382 (9/11) JZ L0770 0783-CA A0 1383 ( 18) ST -$60(P2) 0785-01 1384 ( 7) XAE 0786-C2 A1 1385 ( 18) LD PORTB(P2) ; read keyboard column 0788-DC 80 1386 ( 10) ORI $80 ; set bit 7 078A-E4 FF 1387 ( 10) XRI $FF ; invert all bits 078C-9C B1 1388 (9/11) JNZ L073F ; return ?? 078E-C2 7B 1389 ( 18) LD keywrd(P2) 0790-F4 07 1390 ( 11) ADI $07 ; add $07 to Keyword (7 keys in a Row) 0792-CA 7B 1391 ( 18) ST keywrd(P2) 0794-01 1392 ( 7) XAE 0795-90 E9 1393 ( 11) JMP L0780 ; and round again 0797- 1394 ; 0797- 1395 ; Packing - fill space between $0797 and $079F with $FF 0797-FF FF FF FF FF FF FF FF 1396 .db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF 079F-FF 1397 .db $FF 07A0- 1398 ; 07A0-3F 1399 ( 7) L07A0: XPPC P3 ; return 07A1-CA A0 1400 ( 18) ST -$60(P2) 07A3-C2 8E 1401 ( 18) L07A3: LD -$72(P2) 07A5-98 FC 1402 (9/11) JZ L07A3 07A7-90 F7 1403 ( 11) JMP L07A0 07A9- 1404 ; 07A9- 1405 ; Packing - fill space between $07A9 and $07AB with $FF 07A9-FF FF FF 1406 .db $FF,$FF,$FF 07AC- 1407 ; 07AC-3F 1408 ( 7) L07AC: XPPC P3 ; return 07AD-06 1409 ( 5) L07AD: CSA 07AE-D4 20 1410 ( 10) ANI $20 07B0-9C FB 1411 (9/11) JNZ L07AD 07B2-06 1412 ( 5) L07B2: CSA ; A=SR 07B3-D4 20 1413 ( 10) ANI $20 ; mask Sense B 07B5-98 FB 1414 (9/11) JZ L07B2 ; jump if not high 07B7-C4 80 1415 ( 10) LDI $80 07B9-8F 00 1416 ( 13+) DLY $00 ; delay 269uS (13+2*128+512*0)uS (13+2*A+512*DISP) 07BB-19 1417 ( 5) SIO ; serial I/O 07BC-40 1418 ( 6) LDE 07BD-90 ED 1419 ( 11) JMP L07AC 07BF- 1420 ; 07BF-3F 1421 ( 7) L07BF: XPPC P3 ; return 07C0-C4 01 1422 ( 10) LDI $01 07C2-50 1423 ( 6) ANE 07C3-19 1424 ( 5) SIO ; serial I/O 07C4-98 0D 1425 (9/11) JZ L07D3 07C6-C4 61 1426 ( 10) LDI $61 07C8-8F 00 1427 ( 13+) DLY $00 ; delay 205S (13+2*97+512*0)uS (13+2*A+512*DISP) 07CA-C4 00 1428 ( 10) LDI $00 07CC-01 1429 ( 7) XAE 07CD-19 1430 ( 5) SIO ; serial I/O 07CE-01 1431 ( 7) XAE 07CF-C4 6E 1432 ( 10) LDI $6E 07D1-8F 00 1433 ( 13+) DLY $00 ; delay 233uS (13+2*110+512*0)uS (13+2*A+512*DISP) 07D3-C4 67 1434 ( 10) L07D3: LDI $67 07D5-8F 00 1435 ( 13+) DLY $00 ; delay 219uS (13+2*103+512*0)uS (13+2*A+512*DISP) 07D7-01 1436 ( 7) XAE 07D8-19 1437 ( 5) SIO ; serial I/O 07D9-01 1438 ( 7) XAE 07DA-C4 57 1439 ( 10) LDI $57 07DC-90 E1 1440 ( 11) JMP L07BF 07DE- 1441 ; 07DE-C4 03 1442 ( 10) L07DE: LDI $03 07E0-CA 7D 1443 ( 18) ST endarc(P2) 07E2-C4 10 1444 ( 10) L07E2: LDI $10 07E4-01 1445 ( 7) XAE 07E5-C4 FF 1446 ( 10) LDI $FF 07E7-E5 01 1447 ( 18) XOR @1(P1) 07E9-9C 05 1448 (9/11) JNZ L07F0 07EB-BA 7D 1449 ( 22) DLD endarc(P2) 07ED-9C F3 1450 (9/11) JNZ L07E2 07EF-3F 1451 ( 7) XPPC P3 ; return 07F0- 1452 ; 07F0-35 1453 ( 8) L07F0: XPAH P1 07F1-01 1454 ( 7) XAE ; E=P1H 07F2-60 1455 ( 6) XRE 07F3-98 04 1456 (9/11) JZ L07F9 07F5-01 1457 ( 7) XAE ; restore P1H 07F6-35 1458 ( 8) XPAH P1 07F7-90 E5 1459 ( 11) JMP L07DE 07F9- 1460 ; 07F9-C4 00 1461 ( 10) L07F9: LDI $00 ; setup subroutine call 07FB-37 1462 ( 8) XPAH P3 07FC-C4 20 1463 ( 10) LDI $20 07FE-33 1464 ( 8) XPAL P3 ; P3=$0020 07FF-3F 1465 ( 7) XPPC P3 ; call routine at $0021 0800- 1466 0800- 1467