BASICEXPAND for the Commodore PET 2001n32

BASICEXPAND comes on a ROM for the Commodore PET. Documentation is in a .txt file at zimmers.net.

I was interested in figuring out how to make the add on ROMs work in MAME for the Commodore PET. Several of them are documented in the pet_rom.xml file. After a bit of experimenting, it seems that you need to mount the rom in the correct slot and use the rom program by calling it with the correct SYS address.


BASIC Expand

D:\mame>mame64 pet2001n32 -cart2 basicexp <Enter>
SYS 40960 <RETURN> or SYS 41595 <RETURN>

BASIC Expand

Commands: Abbreviated commands (first letter then Shift + second letter then <RETURN>) are supported.
AUTO 100,10 – Generates new line number after return is pressed. Parameters are start line number and an optional increment. The default is line 100 and increments of 10. Turn off by pressing <RETURN> on an empty line.

RENUMBER 100,10 – Renumber BASIC lines to end of program. Parameters are start line number and an optional increment. Default is line 100 and increments of 10.

FIND V,10-100 – Search lines for the variable (or command) specified (or string if the parameter is placed in quotes) with an option to search through a range of line numbers.

DELETE 10-50 – Delete line or range of lines. The dash second line number is optional.

HELP – After a program aborts due to an error, this command displays the line and highlights the error in inverse video.

DUMP  – Prints all used variables with their contents in the order of appearance in the program.

TRACE  – Prints results of program one command at a time. The corresponding line number is printed in inverse video at the upper right of the screen. Press the SHIFT key for the next command.
SHIFT in this command does not work as documented.

STEP –  like TRACE, but automatic switching.   Slower with shift button (approx. 2 rows/sec).

OFF – Turns off TRACE and STEP.

APPEND NAME – Adds program (called NAME in this example) on disk to the program in memory.

DCOMMAND – Send commands to the floppy. DCOMMANDI1 initializes drive “1”.

DSTATUS – Prints floppy disk status (error message).

DLISTNAME – Print programs on floppy. There is no <SPACE> between DLIST and the program name. The instruction manual has the NAME (and SPACE) as optional, but it only works if the program name is included.

DPRINT – Prints program to printer (device# 4).

DSEQ – Print data files on floppy.

DIRECTORY :N* –  Prints disk directory (or directories of both disk for multiple disk system). You can use an optional wildcard with colon then letter(s) then asterisk.

DRUNNAME – loads and runs program on floppy. The instruction manual has the NAME (and SPACE) as optional, but it only works if the program name is included.

KILL – exit from basic expand.


Disassembly

     ; Initialization at $A000-$A019 and $A27B-$A295 modifies CHRGET, displays
     ; *BASICEXPAND*, and initializes zero page variables $7F-$87 for BASIC EXPAND.
     ; CHRGET LDA TXTPTR as before then JMP $A296 to process new CHRGOT routine.
$A000 4C 7B A2     JMP $A27B     ; Starting location SYS 40960
$A003 A9 0A        LDA #$0A      ; Initialize BASICEXP variables
$A005 8D E3 03     STA $03E2     ;     $03E3-$03E2 = $000A
$A008 A9 00        LDA #$00      ;
$A00A 8D E3 03     STA $03E3     ;
$A00D 85 83        STA $83       ;     $83 = #$00 - ADDR LSB
$A00F 85 7C        STA $7C       ;     $7C = #$00
$A011 85 81        STA $81       ;     $81 = #$00 - ADDR LSB
$A013 A9 64        LDA #$64      ;
$A015 85 82        STA $82       ;     $82 = #$64 - ADDR MSB
$A017 85 80        STA $80       ;     $80 = #$64 - ADDR MSB
$A019 60           RTS           ;
     ;
$A01A 20 70 00     JSR $0070     ; CHRGET
$A01D F0 32        BEQ $A051     ;     if it is the last, we are done
$A01F B0 17        BCS $A038     ;
$A021 20 73 C8     JSR $C873     ; Fetch integer from BASIC (usually line number)
$A024 48           PHA           ;
$A025 A5 12        LDA $12       ; Integer address (computed for GOTO, etc)
$A027 A6 11        LDX $11       ; Integer address (computed for GOTO, etc)
$A029 85 83        STA $83       ;
$A02B 86 82        STX $82       ;
$A02D 85 81        STA $81       ;
$A02F 86 80        STX $80       ;
$A031 68           PLA           ;
$A032 F0 1D        BEQ $A051     ;
$A034 C9 2C        CMP #$2C      ;
$A036 F0 03        BEQ $A03B     ;
$A038 4C 03 CE     JMP $CE03     ; ?SYNTAX ERROR and return to READY
$A03B 20 70 00     JSR $0070     ; CHRGET
$A03E B0 F8        BCS $A038     ;
$A040 20 73 C8     JSR $C873     ; Fetch integer from BASIC (usually line number)
$A043 48           PHA           ;
$A044 A5 12        LDA $12       ; Integer address (computed for GOTO, etc)
$A046 A6 11        LDX $11       ; Integer address (computed for GOTO, etc)
$A048 8D E3 03     STA $03E3     ; BE stack save
$A04B 8E E2 03     LDX $03E2     ; BE stack save
$A04E 68           PLA           ;
$A04F D0 E7        BNE $A038     ;
$A051 60           RTS           ;
     ;
$A052 18           CLC           ;
$A053 A5 80        LDA $80       ;
$A055 6D E2 03     ADC $03E2     ; BE stack save
$A058 85 80        STA $80       ;
$A05A A5 81        LDA $81       ;
$A05C 6D E3 03     ADC $03E3     ; BE stack save
$A05F 85 81        STA $81       ;
$A061 B0 02        BCS $A065     ;
$A063 C9 FA        CMP #$FA      ;
$A065 60           RTS           ;
     ;
$A066 20 03 A0     JSR $A003     ; initialize BASICEXP variables
$A069 20 1A A0     JSR $A01A     ;
$A06C 20 4F A2     JSR $A24F     ;
$A06F 28           PLP           ;
$A070 5C           ???           ;
$A071 20 DF A0     JSR $A0DF     ;
$A074 D0 03        BNE $A079     ;
$A076 4C AE A0     JMP $A0AE     ;
$A079 20 52 A0     JSR $A052     ;
$A07C 90 F3        BCC $A071     ;
$A07E 4C 38 A2     JMP $A238     ;
$A081 A9 FF        LDA #$FF      ;
$A083 85 37        STA $37       ; Current line number MSB
$A085 4C 89 C3     JMP $C389     ; Print READY
$A088 A5 82        LDA $82       ;
$A08A 85 80        STA $80       ;
$A08C A5 83        LDA $83       ;
$A08E 85 81        STA $81       ;
$A090 20 4F A2     JSR $A24F     ;
$A093 28           PLP           ;
$A094 5C           ???           ;
$A095 A0 03        LDY #$03      ;
$A097 A5 81        LDA $81       ;
$A099 91 5C        STA ($5C),Y   ;
$A09B 88           DEY           ;
$A09C A5 80        LDA $80       ;
$A09E 91 5C        STA ($5C),Y   ;
$A0A0 20 52 A0     JSR $A052     ;
$A0A3 20 DF A0     JSR $A0DF     ;
$A0A6 D0 ED        BNE $A095     ;
$A0A8 20 72 C5     JSR $C572     ; Perform NEW subset
$A0AB 4C 81 A0     JMP $A081     ;
$A0AE 20 72 A2     JSR $A272     ;
$A0B1 20 DF A0     JSR $A0DF     ;
$A0B4 F0 D2        BEQ $A088     ;
$A0B6 A0 04        LDY #$04      ;
$A0B8 84 09        STY $09       ; Flag used in DATA/LIST/garbage
$A0BA B1 5C        LDA ($5C),Y   ; Pointer in search for line number
$A0BC F0 F3        BEQ $A0B1     ;
$A0BE C9 22        CMP #$22      ;
$A0C0 D0 08        BNE $A0CA     ;
$A0C2 A5 09        LDA $09       ; Flag used in DATA/LIST/garbage
$A0C4 49 FF        EOR #$FF      ;
$A0C6 85 09        STA $09       ; Flag used in DATA/LIST/garbage
$A0C8 D0 12        BNE $A0DC     ;
$A0CA 24 09        BIT $09       ;
$A0CC 30 0E        BMI $A0DC     ;
$A0CE C9 8F        CMP #$8F      ;
$A0D0 F0 DF        BEQ $A0B1     ;
$A0D2 A2 06        LDX #$06      ;
$A0D4 DD 31 A2     CMP $A231,X   ;
$A0D7 F0 15        BEQ $A0EE     ;
$A0D9 CA           DEX           ;
$A0DA D0 F8        BNE $A0DA     ;
$A0DC C8           INY           ;
$A0DD D0 DB        BNE $A0BA     ;
$A0DF A0 00        LDY #$00      ;
$A0E1 B1 5C        LDA ($5C),Y   ; Pointer in search for line number
$A0E3 AA           TAX           ;
$A0E4 C8           INY           ;
$A0E5 B1 5C        LDA ($5C),Y   ; Pointer in search for line number
$A0E7 86 5C        STX $5C       ; Pointer LSB in search for line number
$A0E9 85 5D        STX $5D       ; Pointer MSB in search for line number
$A0EB B1 5C        LDA ($5C),Y   ; Pointer in search for line number
$A0ED 60           RTS           ;
     ;
$A0EE 18           CLC           ;
$A0EF 98           TYA           ;
$A0F0 65 5C        ADC $5C       ; Pointer in search for line number
$A0F2 85 77        STA $77       ;
$A0F4 85 57        STA $57       ; Temporary pointer
$A0F6 A6 5D        LDX $5D       ; Pointer in search for line number
$A0F8 90 01        BCC $A0FB     ;
$A0FA E8           INX           ;
$A0FB 86 78        STX $78       ;
$A0FD 86 58        STX $58       ;
$A0FF 20 70 00     JSR $0070     ; CHRGET
$A102 90 0A        BCC $A10E     ;
$A104 C9 AB        CMP #$AB      ;
$A106 F0 36        BEQ $A13E     ;
$A108 C9 A4        CMP #$A4      ;
$A10A D0 D0        BNE $A0DC     ;
$A10C F0 30        BEQ $A13E     ;
$A10E 20 73 C8     JSR $C873     ; Fetch integer from BASIC (usually line number)
$A111 20 56 A1     JSR $A156     ;
$A114 20 4F A2     JSR $A24F     ; 
$A117 57 77        ???           ;
$A119 A2 00        LDX #$00      ;
$A11B 0A 00        LDY #$00      ;
$A11D BD 01        LDA $0101,X   ;
$A120 F0 0F        BEQ $A131     ;
$A122 48           PHA           ;
$A123 20 70 00     JSE $0070     ; CHRGET
$A126 90 03        BCC $A12B     ;
$A128 20 9D 03     JSR $A19D     ;
$A12B 68           PLA           ;
$A12C 91 77        STA ($77),Y   ;
$A12E E8           INX           ;
$A12F D0 EC        BNE $A11D     ;
$A131 20 70 00     JSR $0070     ; CHRGET
$A134 20 76 00     JSR $0076     ;
$A137 B0 05        BCS $A13E     ;
$A139 20 0A A2     JSR $A20A     ;
$A13C F0 F6        BEQ $A134     ;
$A13E AA           TAX           ;
$A13F 38           SEC           ;
$A140 A5 77        LDA $77       ;
$A142 E5 5C        SBC $5C       ; Pointer in search for line number
$A144 A8           TAY           ;
$A145 8A           TXA           ;
$A146 C9 2C        CMP #$2C      ;
$A148 F0 A4        BEQ $A1EE     ;
$A14A C9 AB        CMP #$AB      ;
$A14C F0 A0        BEQ $A0EE     ;
$A14E C9 A4        CMP #$A4      ;
$A150 F0 9C        BEQ $A0EE     ;
$A152 AA           TAX           ;
$A153 4C BC A0     JMP $A0BC     ;
$A156 A5 82        LDA $82       ;
$A158 A6 83        LDX $83       ;
$A15A 85 80        STA $80       ;
$A15C 86 81        STX $81       ;
$A15E 20 4F A2     JSR $A24F     ;
$A161 28           PLP           ;
$A162 21 A0        AND ($A0,X)   ;
$A164 03           ???           ;
$A165 B1 21        LDA ($21),Y   ;
$A167 C5 12        CMP $12       ; Integer address (computed for GOTO, etc)
$A169 D0 18        BNE $A183     ;
$A16B 88           DEY           ;
$A16C B1 21        LDA ($21),Y   ;
$A16E C5 11        CMP $11       ; Integer address (computed for GOTO, etc)
$A170 D0 11        BNE $A183     ;
$A172 A5 81        LDA $81       ;
$A174 A6 80        LDX $80       ;
$A176 85 5F        STA $5F       ;
$A178 86 60        STX $60       ;
$A17A A2 90        LDX #$90      ;
$A17C 38           SEC           ;
$A17D 20 55 DB     JSR $DB55     ;
$A180 4C E9 DC     JMP $DCE9     ;
$A183 20 52 A0     JSR $A052     ;
$A186 A0 01        LDY #$01      ;
$A188 B1 21        LDA ($21),Y   ;
$A18A D0 06        BNE $A192     ;
$A18C A9 F9        LDA $F9       ; Cassette flag
$A18E A2 FF        LDX $FF       ; area for conversion of numerals into ASCII string format for printing
$A190 D0 E4        BNE $A176     ;
$A192 AA           TAX           ;
$A193 88           DEY           ;
$A194 B1 21        STA ($21),Y   ;
$A196 86 22        STX $22       ;
$A198 85 21        STA $21       ;
$A19A 4C 63 A1     JMP $A163     ;
$A19D 86 87        STX $87       ;
$A19F A6 2A        LDX $2A       ; Pointer LSB to start of variables / end of program
$A1A1 A4 2B        LDY $2B       ; Pointer MSB to start of variables / end of program
$A1A3 86 55        STX $55       ;
$A1A5 84 56        STY $56       ;
$A1A7 E8           INX           ;
$A1A8 D0 01        BNE $A1AB     ;
$A1AA C8           INY           ;
$A1AB 38           SEC           ;
$A1AC 8A           TXA           ;
$A1AD E5 34        SBC $34       ;
$A1AF 98           TYA           ;
$A1B0 E5 35        SBC $35       ;
$A1B2 90 03        BCC $A1B7     ;
$A1B4 4C 55 C3     JMP $C355     ; Print 'OUT OF MEMORY ERROR'
$A1B7 84 2B        STY $2B       ; Pointer MSB to start of variables / end of program
$A1B9 86 2A        STX $2A       ; Pointer LSB to start of variables / end of program
$A1BB A0 01        LDY #$01      ;
$A1BD A2 00        LDX #$00      ;
$A1BF A1 55        LDA ($55,X)   ;
$A1C1 91 55        STA ($55),Y   ;
$A1C3 A5 55        LDA $55       ;
$A1C5 D0 02        BNE $A1C9     ;
$A1C7 C6 56        DEC $56       ;
$A1C9 C6 55        DEC $55       ;
$A1CB 38           SEC           ;
$A1CC A5 55        LDA $55       ;
$A1CE E5 77        SBC $77       ;
$A1D0 A5 56        LDA $56       ;
$A1D2 E5 78        SBC $78       ;
$A1D4 B0 E9        BCS $A1BF     ;
$A1D6 08           PHP           ;
$A1D7 20 4F A2     JSR $A24F     ;
$A1DA 5C           ???           ;
$A1DB 57           ???           ;
$A1DC 28           PLP           ;
$A1DD A0 01        LDY #$01      ;
$A1DF B1 57        LDA ($57),Y   ;
$A1E1 D0 04        BNE $A1E7     ;
$A1E3 A6 87        LDX $87       ;
$A1E5 88           DEY           ;
$A1E6 60           RTS           ;
     ;
$A1E7 AA           TAX           ;
$A1E8 88           DEY           ;
$A1E9 B1 57        LDA ($57),Y   ;
$A1EB A8           TAY           ;
$A1EC B0 06        BCS $A1F4     ;
$A1EE C8           INY           ;
$A1EF D0 07        BNE $A1F8     ;
$A1F1 E8           INX           ;
$A1F2 D0 04        BNE $A1F8     ;
$A1F4 D0 01        BNE $A1F7     ;
$A1F6 CA           DEX           ;
$A1F7 88           DEY           ;
$A1F8 98           TYA           ;
$A1F9 A0 00        LDY #$00      ;
$A1FB 91 57        STA ($57),Y   ;
$A1FD 48           PHA           ;
$A1FE 8A           TXA           ;
$A1FF C8           INY           ;
$A200 91 57        STA ($57),Y   ;
$A202 85 58        STA $58       ;
$A204 68           PLA           ;
$A205 85 57        STA $57       ;
$A207 4C DF A1     JMP $A1DF     ;
$A20A A5 2A        LDA $2A       ; Pointer LSB to start of variables / end of program
$A20C D0 02        BNE $A210     ;
$A20E C6 2B        DEC $2B       ; Pointer MSB to start of variables / end of program
$A210 C6 2A        DEC $2A       ; Pointer LSB to start of variables / end of program
$A212 20 4F A2     JSR $A24F     ;
$A215 77           ???           ;
$A216 55 A0        EOR $A0,X     ;
$A218 01 A2        ORA ($A2,X)   ;
$A21A 00           BRK           ;
$A21B B1 55        LDA ($55),Y   ;
$A21D 81 55        STA ($55,X)   ;
$A21F E6 55        INC $55       ;
$A221 D0 02        BNE $A225     ;
$A223 E6 55        INC $56       ;
$A225 38           SEC           ;
$A226 A5 55        LDA $55       ;
$A228 E5 2A        SBC $2A       ; Pointer LSB to start of variables / end of program
$A22A A5 56        LDA $56       ;
$A22C E5 2B        SBC $2B       ; Pointer MSB to start of variables / end of program
$A22E 90 EB        BCC $A21B     ;
$A230 B0 A4        BCS $A1D6     ;
$A232 9B 8A A7 89 8D CB          ;
$A238 20 03 A0     JSR $A003     ; initialize BASICEXP variables
$A23B A9 45        LDA #$45      ; display ?OVERFLOW
$A23D A0 A2        LDY #$A2      ;     $A245
$A23F 20 1C CA     JSR $CA1C     ;     CHAROUT
$A242 4C 77 C3     JMP $C377     ; print error message (from $C357)
$A245 3F 4F 56 45 52 46 4C 4F    ; ASCII ?OVERFLO
$A2AC 57 00                      ; W[end of text]
$A24F 18           CLC           ;
$A250 68           PLA           ;
$A251 85 84        STA $84       ;
$A253 69 02        ADC #$02      ;
$A255 AA           TAX           ;
$A256 68           PLA           ;
$A257 85 85        STA $85       ;
$A259 69 00        ADC #$00      ;
$A25B 48           PHA           ;
$A25C 8A           TXA           ;
$A25D 48           PHA           ;
$A25E A0 01        LDY #$01      ;
$A260 B1 84        LDA ($84),Y   ;
$A262 AA           TAX           ;
$A263 C8           INY           ;
$A264 B1 84        LDA ($84),Y   ;
$A266 A8           TAY           ;
$A267 B5 00        LDA $00,X     ;
$A269 99 00 00     STA $0000,Y   ;
$A26C B5 01        LDA $01,X     ;
$A26E 99 01 00     STA $0001,Y   ;
$A271 60           RTS           ;
     ; 
$A272 A9 28        LDA #$28      ;
$A274 85 5C        STA $5C       ; Pointer in search for line number
$A276 A2 00        LDX #$00      ;
$A278 86 5D        STX $5D       ;
$A27A 60           RTS           ;
     ; modify CHRGOT so after loading A with current BASIC character
     ; routine jumps to $A296 for processing.
     ; also wedges in $A2CO to check for BASICEXPAND command
$A27B A2 07        LDX #$07      ; transfer $A28F-$A295 to $79-$7E
$A27D BD 8E A2     LDA $A28E,X   ;     modify CHRGOT to include $A296
$A280 95 78        STA $78,X     ;
$A282 CA           DEX           ;
$A283 D0 F8        BNE $A27D     ;
$A285 A9 F4        LDA #$F4      ; display *BASICEXPAND*
$A287 A0 A7        LDY #$A7      ;      $A7F4
$A289 20 1C CA     JSR $CA1C     ;      CHAROUT
$A28C 4C 03 A0     JMP $A003     ; initialize BASICEXP variables
$A28F 4C 96 A2     JMP $A296     ; new CHRGET $79
$A292 00           BRK           ;            $7C
$A293 4C C0 A2     JMP $A2C0     ;            $7D
     ; modified CHRGET - what is it checking for?
$A296 48           PHA           ; save stack to $78
$A297 86 87        STX $87       ; save X      to $87
$A299 A5 78        LDA $78       ; load high byte TXTPTR
$A29B C9 02        CMP #$02      ; is it the original high byte TXTPTR?
$A29D D0 08        BNE $A2A7     ;      if yes then skip check for next byte
$A29F A5 77        LDA $77       ; load the low byte TXTPTR
$A2A1 C9 00        CMP #$00      ; is it 0?
$A2A3 F0 26        BEQ $A2CB     ;      if yes we need to adjust the stack
$A2A5 D0 04        BNE $A2AB     ;      if no 
$A2A7 A5 77        LDA $77       ; load the low byte TXTPTR
$A2A9 85 86        STA $86       ;      and store it temporarily
$A2AB A5 7C        LDA $7C       ; 
$A2AD F0 0A        BEQ $A2B9     ;      if no change then we are done
$A2AF C9 01        CMP #$01      ;      is it a "1"
$A2B1 D0 03        BNE $A2B6     ;      if yes then we need to branch out to ___ routines
$A2B3 4C D7 A6     JMP $A6D7     ;      if not then we need to jump to ____
$A2B6 4C FB A4     JMP $A4FB     ;
$A2B9 A6 87        LDX $87       ; restore the original X
$A2BB 68           PLA           ; restore stack pointer
     ; CHRGET test to see if it is a BASICEXPAND command (step 1)
$A2BC C9 3A        CMP #$3A      ; is it ASCII ":"? (> ASCII "9")
$A2BE B0 0A        BCS $A2CA     ;     if yes then it is a character
$A2C0 C9 20        CMP #$20      ; is it ASCII space ?
$A2C2 D0 03        BNE $A2C7     ;     if no then check for BASICEXPAND command
$A2C4 4C 70 00     JMP $0070     ;     if yes then next character (skip spaces)
$A2C7 4C 0A E1     JMP $E10A     ; Entry to ROM CHRGET
$A2CA 60           RTS           ;
     ;
$A2CB BA           TSX           ; save stack to X
$A2CC BD 03 01     LDA $0103,X   ; don't know the math for this stack offset
$A2CF C9 C3        CMP #$C3      ;
$A2D1 D0 D8        BNE $A2AB     ;      if not then ___
$A2D3 A0 00        LDY #$00      ;
$A2D5 84 05        STY $05       ; save Y to COUNT input buffer counter
$A2D7 A2 FF        LDX #$FF      ;
$A2D9 E8           INX           ; new CHRGET parsing?
$A2DA BD 00 02     LDA $0200,X   ;
$A2DD 30 CC        BMI $A2AB     ;     until it is a negative
$A2DF C9 20        CMP #$20      ;     is it a space?
$A2E1 F0 F6        BEQ $A2D9     ;     skip spaces?
$A2E3 B9 16 A3     LDA $A316,Y   ; lookup table for extended basic commands
$A2E6 F0 C3        BEQ $A2AB     ;     Y starts at 0
$A2E8 5D 00 02     EOR $0200,X   ;     0200,X contains character to parse
$A2EB D0 04        BNE $A2F1     ;     not a BASICEXTEND command
$A2ED C8           INY           ;     next BASICEXTEND character ?
$A2EE E8           INX           ;
$A2EF 10 F2        BPL $A2E3     ;
$A2F1 C9 80        CMP #$80      ;
$A2F3 F0 0A        BEQ $A2FF     ;
$A2F5 C8           INY           ;
$A2F6 B9 15 A3     LDA $A315,Y   ;
$A2F9 10 FA        BPL $A2F5     ;
$A2FB E6 05        INC $05       ;
$A2FD D0 D8        BNE $A2D7     ;
$A2FF E6 77        INC $77       ;
$A301 CA           DEX           ;
$A302 D0 FB        BNE $A2FF     ;
$A304 A6 05        LDX $05       ;
$A306 E0 02        CPX #$02      ;
$A308 30 02        BMI $A30C     ;
$A30A 68           PLA           ;
$A30B 68           PLA           ;
$A30C 68           PLA           ;
$A30D BD 15 A8     LDA $A815,X   ;
$A310 48           PHA           ;
$A311 BD 2A A8     LDA $A824,X   ;
$A314 48           PHA           ;
$A315 60           RTS           ;
     ; BASICEXPAND Commands
$A316 52 55 CE                   ; RUN       the last character
$A319 41 55 54 CF                ; AUTO      is ___ higher
$A31D 53 54 45 D0                ; STEP      in ASCII character
$A321 54 52 41 43 C5             ; TRACE     table.
$A326 4F 46 C6                   ; OFF       the match at ___
$A329 52 45 4E 55 4D 42 45 D2    ; RENUMBER  is used to check
$A331 44 45 4C 45 54 C5          ; DELETE    for end of command.
$A337 48 45 4C D0                ; HELP
$A33B 46 49 4E C4                ; FIND
$A33F 44 55 4D D0                ; DUMP
$A343 41 50 50 45 4E C4          ; APPEND
$A349 44 43 4F 4D 4D 41 4E C4    ; DCOMMAND
$A351 44 53 54 41 54 55 D3       ; DSTATUS
$A358 44 4C 49 53 D4             ; DLIST
$A35D 44 50 52 49 4E D4          ; DPRINT
$A363 44 53 45 D1                ; DSEQ
$A367 44 49 52 45 43 54 4F 52 D9 ; DIRECTORY
$A370 44 52 55 CE                ; DRUN
$A374 4B 49 4C CC                ; KILL
$A378 00                         ; end of text
$A379 A2 0E        LDX #$0E      ;
$A37B A9 FF        LDA #$FF      ;
$A37D 9D E3 03     STA $03E3,X   ;
$A380 CA           DEX           ;
$A381 D0 FA        BNE $A37D     ;
$A383 A2 00        LDX #$00      ;
$A385 86 77        STX $77       ;
$A387 48           PHA           ;
$A388 4C B9 A2     JMP $A2B9     ;
$A38B 0D 11 41 50 50 45 4E 44    ; ASCII [return][cursor_down]APPEND
$A383 49 4E 47 00                ; ING[end of text]
$A397 4C 81 A0     JMP $A081     ;
$A39A 4C 03 CE     JMP $CE03     ; ?SYNTAX ERROR and return to READY
$A39D 20 70 00     JSR $0070     ; CHRGET
$A3A0 C9 01        CMP #$01      ;
$A3A2 30 F6        BMI $A39A     ;
$A3A4 C9 2C        CMP #$2C      ;
$A3A6 F0 F2        BEQ $A39A     ;
$A3A8 A2 00        LDX #$00      ;
$A3AA 8E E0 03     STX $03E0     ;
$A3AD C9 22        CMP #$22      ;
$A3AF F0 09        BEQ $A3BA     ;
$A3B1 20 95 C4     JSR $C495     ; Tokenize the input buffer
$A3B4 20 70 00     JSR $0070     ; CHRGET
$A3B7 4C C7 A3     JMP $A3C7     ;
$A3BA CE E0 03     DEC $03E0     ;
$A3BD 20 70 00     JSR $0070     ; CHRGET
$A3C0 AA           TAX           ;
$A3C1 F0 D7        BEQ $A39A     ;
$A3C3 C9 22        CMP #$22      ;
$A3C5 F0 D3        BEQ $A39A     ;
$A3C7 A5 77        LDA $77       ;
$A3C9 85 09        STA $09       ;
$A3CB 20 70 00     JSR $0070     ; CHRGET
$A3CE AA           TAX           ;
$A3CF F0 07        BEQ $A3D8     ;
$A3D1 C9 2C        CMP #$2C      ;
$A3D3 D0 F6        BNE $A3CB     ;
$A3D5 20 70 00     JSR $0070     ; CHRGET
$A3D8 20 ED A5     JSR $A5ED     ;
$A3DB C9 00        CMP #$00      ;
$A3DD D0 BB        BNE $A39A     ;
$A3DF C0 4F A2     JSR $A24F     ;
$A3E2 55 5C        EOR $5C,X     ; Pointer in search for line number
$A3E4 90 05        BCC $A3EB     ;
$A3E6 20 DF A0     JSR $A0DF     ;
$A3E9 F0 AC        BEQ $A397     ;
$A3EB 38           SEC           ;
$A3EC A0 02        LDY #$02      ;
$A3EE A5 11        LDA $11       ; Integer address (computed for GOTO, etc)
$A3F0 F1 5C        SBC ($5C),Y   ; Pointer in search for line number
$A3F2 A5 12        LDA $12       ; Integer address (computed for GOTO, etc)
$A3F4 C8           INY           ;
$A3F5 F1 5C        SBC ($5C),Y   ; Pointer in search for line number
$A3F7 90 9E        BCC $A397     ;
$A3F9 A0 04        LDY #$04      ;
$A3FB 98           TYA           ;
$A3FC 4D E0 03     EOR $03E0     ;
$A3FF 85 87        STA $87       ;
$A401 B1 5C        LDA ($5C),Y   ; Pointer in search for line number
$A403 F0 E1        BEQ $A3E6     ;
$A405 C9 22        CMP #$22      ;
$A407 D0 08        BNE $A411     ;
$A409 A5 87        LDA $87       ;
$A40B 49 FF        EOR #$FF      ;
$A40D 85 87        STA $87       ;
$A40F D0 03        BNE $A44F     ;
$A411 24 87        BIT $87       ;
$A413 30 3A        BMI $A44F     ;
$A415 A6 09        LDX $09       ;
$A417 8C E1 03     STY $03E1     ;
$A41A BD 00 02     LDA $0200,X   ;
$A41D F0 17        BEQ $A436     ;
$A41F C9 22        CMP #$22      ;
$A421 F0 13        BEQ $A436     ;
$A423 D1 5C        CMP ($5C),Y   ; Pointer in search for line number
$A425 F0 0B        BEQ $A432     ;
$A427 C9 2C        CMP #$2C      ;
$A429 D0 21        BNE $A44C     ;
$A42B AD E0 03     LDA $03E0     ;
$A42E F0 06        BEQ $A436     ;
$A430 D0 1A        BNE $A44C     ;
$A432 E8           INX           ;
$A433 C8           INY           ;
$A434 D0 04        BNE $A41A     ;
$A436 20 E1 FF     JSR $FFE1     ; Test STOP key
$A439 A0 02        LDY #$02      ;
$A43B 84 86        STY $86       ;
$A43D B1 5C        LDA ($5C),Y   ; Pointer in search for line number
$A43F AA           TAX           ;
$A440 C8           INY           ;
$A441 B1 5C        LDA ($5C),Y   ; Pointer in search for line number
$A443 20 D9 DC     JSR $DCD9     ;
$A446 20 77 A6     JSR $A677     ;
$A449 4C E6 A3     JMP $A3E6     ;
$A44C AC E1 03     LDY $03E1     ;
$A44F C8           INY           ;
$A450 D0 AF        BNE $A401     ;
$A452 4C 03 CE     JMP $CE03     ; ?SYNTAX ERROR and return to READY
$A455 20 D6 A9     JSR $A9D6     ;
$A458 A9 60        LDA #$60      ;
$A45A 85 D3        STA $D3       ;
$A45C A9 00        LDA #$00      ;
$A45E 85 9D        STA $9D       ;
$A460 38           SEC           ;
$A461 A5 2A        LDA $2A       ; Pointer LSB to start of variables / end of program
$A463 E9 02        SBC #$02      ;
$A465 85 FB        STA $FB       ; MLM/tape pointer
$A467 A5 2B        LDA $2B       ; Pointer MSB to start of variables / end of program
$A469 E9 00        SBC #$00      ;
$A46B 85 FC        STA $FC       ; MLM/tape pointer
$A46D 20 0F F4     JSR $F40F     ; Print Searching if in direct mode (subset of $F40A)
$A470 20 66 F4     JSR $F466     ; Send string name to IEEE-488 bus
$A473 20 6C A9     JSR $A96C     ;
$A476 B0 73        BCS $A4EB     ;
$A478 20 B6 F0     JSR $F0B6     ; send 'Talk' on IEEE-488 bus
$A47B A9 8B        LDA #$8B      ; display APPENDING
$A47D A0 A3        LDY #$A3      ;     $A38B
$A47F 20 1C CA     JSR $CA1C     ;     CHAROUT
$A482 A5 D3        LDA $D3       ; current secondary address OR'd e.g. with #$60
$A484 20 28 F1     JSR $F128     ; send one character and clear ATN
$A487 20 8C F1     JSR $F18C     ; get one character from the IEEE-488 bus
$A48A 20 8C F1     JSR $F18C     ; get one character from the IEEE-488 bus
$A48D 20 55 F3     JSR $F355     ; loop which loads data into RAM or verifies data already in RAM
$A490 20 D0 A4     JSR $A4D0     ;
$A493 4C EF F3     JMP $F3EF     ; Entry point from VERIFY (subset of $F3C6)
$A496 20 D6 A9     JSR $A9D6     ;
$A499 A9 60        LDA #$60      ;
$A49B 85 D3        STA $D3       ;
$A49D 20 0F F4     JSR $F40F     ; Print SEARCHING if in direct mode
$A4A0 20 66 F4     JSR $F466     ; Send name string to IEEE-488 bus
$A4A3 20 6C A9     JSR $A96C     ;
$A4A6 B0 43        BCS $A4EB     ;
$A4A8 20 B6 F0     JSR $F0B6     ; send 'Talk' on IEEE-488 bus
$A4AB 20 43 F3     JSR $F343     ; Load from any IEEE device subset of $F32F
$A4AE 20 D0 A4     JSR $A4D0     ;
$A4B1 20 84 F3     JSR $F384     ; Check bit 6 of ST (EOI) and continue with loop if this is $ (subset of $F37A)
$A4B4 30 06        BMI $A4BC     ;
$A4B6 E6 C9        INC $C9       ; End of address LSB for tape load
$A4B8 D0 02        BNE $A4BC     ;
$A4BA E6 CA        INC $CA       ; End of address MSB for tape load 
$A4BC A5 CA        LDA $CA       ; End of address MSB for tape load
$A4BE 85 2B        STA $2B       ; Pointer MSB to start of variables / end of program
$A4C0 A5 C9        LDA $C9       ; End of address LSB for tape load
$A4C2 85 2A        STA $2A       ; Pointer LSB to start of variables / end of program
$A4C4 20 75 C5     JSR $C575     ; Perform NEW subset
$A4C7 20 42 C4     JSR $C442     ; Rechain BASIC program in memory
$A4CA 20 A7 C5     JSR $C5A7     ; Reset GETCHR to start of program
$A4CD 4C C4 C6     JMP $C6C4     ; BASIC warm start
$A4D0 A5 96        LDA $96       ; Status byte ST from which ST is computed
$A4D2 29 10        AND #$10      ;
$A4D4 D0 01        BNE $A4D7     ;
$A4D6 60           RTS           ;
$A4D7 4C E6 73     JMP $F3E6     ; Entry point from VERIFY (subset of $F3C6)
$A4DA 00           BRK           ;
     ; maybe this is the TRACE command
$A4DB 4C B9 A2     JMP $A2B9     ;
$A4DE A2 1C        LDX #$1C      ;
$A4E0 BD F8 E0     LDA $E0F8,X   ; CHRGET routine for relocation into RAM
$A4E3 95 6F        STA $6F,X     ;
$A4E5 CA           DEX           ;
$A4E6 D0 F8        BNE $A4E0     ;
$A4E8 4C 89 C3     JMP $C389     ; Print READY
$A4EB 20 F0 F6     JSR $F6F0     ; Save to IEEE-488 subset of $F6B3
$A4EE A9 00        LDA #$00      ;
$A4F0 2C A9 02     BIT $02A9     ;
$A4F3 2C A9 03     BIT $03A9     ;
$A4F6 85 7C        STA $7C       ;
$A4F8 4C 81 A0     JMP $A081     ;
$A4FB A6 78        LDX $78       ; load the temporary high byte TXTPTR
$A4FD E0 02        CPX #$02      ; is it a "2"
$A4FF F0 DA        BEQ $A4DB     ;      if yes then 
$A501 A5 37        LDA $37       ; load CURLIN low byte (BASIC line #)
$A503 C9 FA        CMP #$FA      ; is it "250"
$A505 90 06        BCC $A50D     ;
$A507 A9 00        LDA #$00      ; load a "0"
$A509 85 7C        STA $7C       ;     store temporarily
$A50B F0 CE        BEQ $A4DB     ;
$A50D A6 36        LDX $36       ; load CURLIN high byte (BASIC line #)
$A50F CD E5 03     CMP $03E5     ;
$A512 D0 05        BNE $A519     ;
$A514 EC E4 03     CPX $03E4     ;
$A517 F0 C2        BEQ $A4DB     ;
$A519 8D E5 03     STA $03E5     ;
$A51C 8E E4 03     STX $03E4     ;
$A51F A2 0B        LDX #$0B      ;
$A521 BD E4 03     LDA $03E4,X   ;
$A524 9D E6 03     STA $03E6,X   ;
$A527 CA           DEX           ;
$A528 10 F7        BPL $A521     ;
$A52A 30 1F        BMI $A54B     ;
$A52C A5 7C        LDA $7C       ;
$A52E C9 03        CMP #$03      ;
$A530 D0 09        BNE $A53B     ;
$A532 20 E1 FF     JSR $FFE1     ; Test STOP key
$A535 A5 98        LDA $98       ;
$A537 F0 F9        BEQ $A532     ;
$A539 D0 04        BNE $A53F     ;
$A53B A5 98        LDA $98       ; Shift key pressed? 1=yes
$A53D D0 02        BNE $A541     ;
$A53F A9 FF        LDA #$FF      ;
$A541 A8           TAY           ;
$A542 AA           TAX           ;
$A543 E8           INX           ;
$A544 D0 FD        BNE $A543     ;
$A546 C8           INY           ;
$A547 D0 F9        BNE $A542     ;
$A549 F0 CC        BEQ $A517     ;
$A54B A2 05        LDX #$05      ;
$A54D BD 99 A5     LDA $A599,X   ;
$A550 85 55        STA $55       ;
$A552 A9 80        LDA #$80      ;
$A554 85 56        STA $55       ;
$A556 8A           TXA           ;
$A557 0A           ASL           ;
$A558 A8           TAY           ;
$A559 86 87        STX $87       ;
$A55B BE E6 03     LDX $03E6,Y   ;
$A55E B9 E7 03     LDA $03E7,Y   ;
$A561 C9 FF        CMP #$FF      ;
$A563 F0 21        BEQ $A586     ;
$A565 20 76 A1     JSR $A176     ;
$A568 A0 00        LDY #$00      ;
$A56A A9 23        LDA #$23      ; ASCII "#"
$A56C 20 8A A5     JSR $A58A     ; 
$A56F B9 00 01     LDA $0100,Y   ;
$A572 D0 F8        BNE $A56C     ;
$A574 C0 06        CPY #$06      ;
$A576 B0 07        BCS $A57F     ;
$A578 A9 20        LDA #$20      ; ASCII space
$A57A 20 8A A5     JSR $A58A     ;
$A57D D0 F5        BNE $A574     ;
$A57F A6 87        LDX $87       ;
$A581 CA           DEX           ;
$A582 10 C9        BPL $A54D     ; continue if there is more line number to print
$A584 30 A6        BMI $A52C     ;
$A586 A0 00        LDY #$00      ; if 00 then print space
$A588 F0 EE        BEQ $A578     ;
$A58A 09 80        ORA #$80      ;
$A58C AA           TAX           ;
$A58D AD 40 E8     LDA $E840     ; VIA
$A590 29 20        AND #$20      ;
$A592 D0 F9        BNE $A58D     ;
$A594 8A           TXA           ;
$A595 91 55        STA ($55),Y   ;
$A597 C8           INY           ;
$A598 60           RTS           ;
     ;
$A599 EA C2 9A 72 4A 22          ;
$A59F 20 70 00     JSR $0070     ; CHRGET
$A5A2 20 ED A5     JSR $A5ED     ;
$A5A5 F0 03        BEQ $A5AA     ;
$A5A7 4C 03 CE     JMP $CE03     ; ?SYNTAX ERROR and return to READY
$A5AA 20 2C C5     JSR $C52C     ; Search for BASIC linenumber
$A5AD 90 0C        BCC $A5BB     ;
$A5AF A0 00        LDY #$00      ;
$A5B1 B1 57        LDA ($57),Y   ;
$A5B3 AA           TAX           ;
$A5B4 C8           INY           ;
$A5B5 B1 57        LDA ($57),Y   ;
$A5B7 85 58        STA $58       ;
$A5B9 86 57        STX $57       ;
$A5BB A0 00        LDY #$00      ;
$A5BD B1 57        LDA ($57),Y   ;
$A5BF 91 55        STA ($55),Y   ;
$A5C1 E6 55        INC $55       ;
$A5C3 D0 02        BNE $A5C7     ;
$A5C5 E6 56        INC $56       ;
$A5C7 E6 57        INC $57       ;
$A5C9 D0 02        BNE $A5CD     ;
$A5CB E6 58        INC $58       ;
$A5CD 20 E2 A5     JSR $A5E2     ;
$A5D0 D0 E9        BNE $A5BB     ;
$A5D2 A5 55        LDA $55       ;
$A5D4 85 2A        STA $2A       ; Pointer LSB to start of variables / end of program
$A5D6 A5 56        LDA $56       ;
$A5D8 85 2B        STA $2B       ; Pointer MSB to start of variables / end of program
$A5DA A0 AE        LDY #$AE      ;
$A5DC 20 56 F1     JSR $F156     ; Print message from table
$A5DF 4C 39 C4     JMP $C439     ; Reset BASIC execution to start; clear; and chain.
$A5E2 A6 2A        LDX $2A       ; Pointer LSB to start of variables / end of program
$A5E4 E4 57        CPX $57       ;
$A5E6 D0 04        BNE $A5EC     ;
$A5E8 A4 2B        LDY $2B       ; Pointer MSB to start of variables / end of program
$A5EA C4 58        CPY $58       ;
$A5EC 60           RTS           ;
     ;
$A5ED 20 4F A2     JSR $A24F     ;
$A5F0 28 55        ???           ;
$A5F2 20 DE A7     JSR $A7DE     ;
$A5F5 20 4F A2     JSR $A24F     ;
$A5F8 5C 57        ???           ;
$A5FA A2 FF        LDX #$FF      ;
$A5FC 86 12        STX $12       ; Integer address (computed for GOTO, etc)
$A5FE 20 76 00     JSR $0076     ;
$A601 90 0F        BCC $A612     ;
$A603 C9 2D        CMP #$2D      ;
$A605 F0 04        BEQ $A60B     ;
$A607 C9 AB        CMP #$AB      ;
$A609 D0 41        BNE $A64C     ;
$A60B C0 70 00     JSR $0070     ; CHRGET
$A60E 90 22        BCC $A632     ;
$A610 B0 F1        BCS $A603     ;
$A612 20 73 C8     JSR $C873     ; Fetch integer from BASIC (usually line number)
$A615 48           PHA           ;
$A616 20 2C C5     JSR $C52C     ; Search BASIC for a line number
$A619 20 4F A2     JSR $A24F     ;
$A61C 5C           ???           ;
$A61D 55 68        EOR $68,X     ;
$A61F F0 19        BEQ $A63A     ;
$A621 A2 FF        LDX #$FF      ;
$A623 86 12        STX $12       ; Integer address (computed for GOTO, etc)
$A625 C9 2D        CMP #$2D      ;
$A627 F0 04        BEQ $A62D     ;
$A629 C9 AB        CMP #$AB      ;
$A62B D0 1F        BNE $A64C     ;
$A62D 20 70 00     JSR $0070     ; CHRGET
$A630 B0 1A        BCS $A64C     ;
$A632 20 73 C8     JSR $C873     ; Fetch integer from BASIC (usually line number)
$A635 D0 15        BNE $A64C     ;
$A637 20 2C C5     JSR $C52C     ; Search BASIC for a line number
$A63A 20 4F A2     JSR $A24F     ;
$A63D 5C 57        ???           ;
$A63F 38           SEC           ;
$A640 A5 57        LDA $57       ;
$A642 E5 55        SBC $55       ;
$A644 A5 58        LDA $58       ;
$A646 E5 56        SBC $56       ;
$A648 90 03        BCC $A64D     ;
$A64A A9 00        LDA #$00      ;
$A64C 60           RTS           ;
$A64D A9 01        LDA #$01      ;
$A64F 60           RTS           ;
     ;
$A650 A6 37        LDX $37       ; load CURLIN LSB (BASIC line #)
$A652 86 12        STX $12       ;      store it at LINNUM (Temp Integer Value)
$A654 E8           INX           ;      OLDLIN MSB
$A655 F0 1D        BEQ $A674     ;      if it is the same then ???
$A657 A5 36        LDA $36       ; load CURLIN MSB (BASIC line #)
$A659 85 11        STA $11       ;      store it at LINNUM (Temp Integer Value)
$A65B 20 D5 DC     JSR $DCD5     ;
$A65E A2 FF        LDX #$FF      ;
$A660 86 37        STX $37       ;
$A662 E8           INX           ;
$A663 86 7C        STX $7C       ;
$A665 20 2C C5     JSR $C52C     ; Search BASIC for a line number
$A668 38           SEC           ;
$A669 A5 86        LDA $86       ;
$A66B E5 5C        SBC $5C       ; Pointer in search for line number
$A66D 85 86        STA $86       ;
$A66F C6 86        DEC $86       ;
$A671 20 77 A6     JSR $A677     ;
$A674 4C 89 C3     JMP $C389     ; Print READY
$A677 A0 03        LDY #$03      ;
$A679 84 05        STY $05       ;
$A67B 84 87        STY $87       ;
$A67D A9 20        LDA #$20      ;
$A67F A4 87        LDY $87       ;
$A681 29 7F        AND #$7F      ;
$A683 20 45 CA     JSR $CA45     ; print ? for error message
$A686 C9 22        CMP #$22      ;
$A688 D0 06        BNE $A690     ;
$A68A A5 05        LDA $05       ;
$A68C 49 FF        EOR #$FF      ;
$A68E 85 05        STA $05       ;
$A690 A9 00        LDA #$00      ;
$A692 85 9F        STA $9F       ;
$A694 C8           INY           ;
$A695 C4 86        CPY $86       ;
$A697 D0 02        BNE $A69B     ;
$A699 84 9F        STY $9F       ;
$A69B B1 5C        LDA ($5C),Y   ; Pointer in search for line number
$A69D D0 03        BNE $A6A2     ;
$A69F 4C E2 C9     JMP $C9E2     ; print CRLF or CR
$A6A2 10 DF        BPL $A683     ;
$A6A4 C9 FF        CMP #$FF      ;
$A6A6 F0 DB        BEQ $A683     ;
$A6A8 24 05        BIT $05       ;
$A6AA 30 D7        BMI $A683     ;
$A6AC 38           SEC           ;
$A6AD E9 7F        SBC #$7F      ;
$A6AF AA           TAX           ;
$A6B0 84 87        STY $87       ;
$A6B2 A0 FF        LDY #$FF      ;
$A6B4 CA           DEX           ;
$A6B5 F0 08        BEQ $A6BF     ;
$A6B7 C8           INY           ;
$A6B8 B9 92 C0     LDA $C092,Y   ; basic Keywords
$A6BB 10 FA        BPL $A6B7     ;
$A6BD 30 F5        BMI $A6B4     ;
$A6BF C8           INY           ;
$A6C0 B9 92 C0     LDA $C092,Y   ; basic Keywords
$A6C3 30 BA        BMI $A67F     ;
$A6C5 20 45 CA     JSR $CA45     ; print ? for error message
$A6C8 D0 F5        BNE $A6BF     ;
$A6CA 20 1A A0     JSR $A01A     ;
$A6CD 20 0E A7     JSR $A70E     ;
$A6D0 A9 01        LDA #$01      ;
$A6D2 85 7C        STA $7C       ;
$A6D4 A9 00        LDA #$00      ;
$A6D6 60           RTS           ;
     ;
$A6D7 68           PLA           ;
$A6D8 48           PHA           ;
$A6D9 D0 09        BNE $A6E4     ;
$A6DB A9 00        LDA #$00      ;
$A6DD 85 7C        STA $7C       ;
$A6DF 85 9E        STA $9E       ;
$A6E1 4C B9 A2     JMP $A2B9     ;
$A6E4 C9 20        CMP #$20      ;
$A6E6 F0 F9        BEQ $A6E1     ;
$A6E8 C9 3A        CMP #$3A      ;
$A6EA B0 04        BCS $A6F0     ;
$A6EC C9 30        CMP #$30      ;
$A6EE B0 F1        BCS $A6E1     ;
$A6F0 38           SEC           ;
$A6F1 A5 11        LDA $11       ; Integer address (computed for GOTO, etc)
$A6F3 A8           TAY           ;
$A6F4 E5 80        SBC $80       ;
$A6F6 A5 12        LDA $12       ; Integer address (computed for GOTO, etc)
$A6F8 AA           TAX           ;
$A6F9 E5 81        SBC $81       ;
$A6FB 90 0C        BCC $A709     ;
$A6FD 84 80        STY $80       ;
$A6FF 86 81        STX $81       ;
$A701 20 52 A0     JSR $A052     ;
$A704 90 03        BCC $A709     ;
$A706 4C 38 A2     JMP $A238     ;
$A709 20 0E A7     JSR $A70E     ;
$A70C 10 D3        BPL $A6E1     ;
$A70E 20 72 A1     JSR $A172     ;
$A711 A0 00        LDY #$00      ;
$A713 C8           INY           ;
$A714 B9 FF 00     LDA $00FF,Y   ;
$A717 99 6E 02     STA $026E,Y   ;
$A71A D0 F7        BNE $A713     ;
$A71C A9 20        LDA #$20      ;
$A71E 99 6E 02     STA $026E,Y   ;
$A721 84 9E        STY $9E       ;
$A723 60           RTS           ;
     ;
$A724 20 4F A2     JSR $A24F     ;
$A727 2A           ROL           ;
$A728 5C           ???           ;
$A729 38           SEC           ;
$A72A A5 5C        LDA $5C       ; Pointer in search for line number
$A72C E5 2C        SBC $2C       ;
$A72E AD 5D        LDA $5D       ;
$A730 E5 2D        SBC $2D       ;
$A732 90 03        BCC $A737     ;
$A734 4C 81 A0     JMP $A081     ;
$A737 A0 00        LDY #$00      ;
$A739 84 87        STY $87       ;
$A73B C8           INY           ;
$A73C B1 5C        LDA ($5C),Y   ;
$A73E 0A           ASL           ;
$A73F 26 87        ROL $87       ;
$A741 4A           LSR           ;
$A742 99 42 00     STA $0042,Y   ;
$A745 88           DEY           ;
$A746 10 F4        BPL $A73C     ;
$A748 A5 87        LDA $87       ;
$A74A F0 2B        BEW $A777     ;
$A74C C9 01        CMP #$01      ;
$A74E F0 69        BEQ $A7B9     ;
$A750 C9 02        CMP #$02      ;
$A752 F0 3E        BEQ $A792     ;
$A754 20 D1 A7     JSR $A7D1     ;
$A757 A9 25        LDA #$25      ;
$A759 20 45 CA     JSR $CA45     ; print ? for error message
$A75C A9 3D        LDA #$3D      ;
$A75E 20 45 CA     JSR $CA45     ; print ? for error message
$A761 A0 02        LDY #$02      ;
$A763 B1 5C        LDA ($5C),Y   ;
$A765 48           PHA           ;
$A766 C8           INY           ;
$A767 B1 5C        LDA ($5C),Y   ; Pointer in search for line number
$A769 A8           TAY           ;
$A76A 68           PLA           ;
$A76B 20 6D D2     JSR $D26D     ;
$A76E 20 E9 DC     JSR $DCE9     ;
$A771 20 1C CA     JSR $CA1C     ; CHAROUT
$A774 4C B6 A7     JMP $A7B6     ;
$A777 20 D1 A7     JSR $A7D1     ;
$A77A A9 3D        LDA #$3D      ;
$A77C 20 45 CA     JSR $CA45     ; print ? for error message
$A77F 20 69 D0     JSR $D069     ;
$A782 A5 44        LDA $44       ;
$A784 A4 45        LDY $45       ;
$A786 20 AE DA     JSR $DAAE     ;
$A789 20 E3 DC     JSR $DCE3     ;
$A78C 4C B6 A7     JMP $A7B6     ;
$A78F 22           ???           ;
$A790 3D 24 20     AND $2024,X   ;
$A793 D1 A7        CMP ($A7),Y   ;
$A795 A2 02        LDX #$02      ;
$A797 BD 8F A7     LDA $A78F,X   ;
$A79A 20 45 CA     JSR $CA45     ; print ? for error message
$A79D CA           DEX           ;
$A79E 10 F7        BPL $A797     ;
$A7A0 A0 04        LDY #$04      ;
$A7A2 B1 5C        LDA ($5C),Y   ; Pointer in search for line number
$A7A4 85 20        STA $20       ; Pointer for memory-move / string in memory
$A7A6 88           DEY           ;
$A7A7 B1 5C        LDA ($5C),Y   ; Pointer in search for line number
$A7A9 85 1F        STA $1F       ;
$A7AB 88           DEY           ;
$A7AC B1 5C        LDA ($5C),Y   ; Pointer in search for line number
$A7AE 20 22 CA     JSR $CA22     ; CHAROUT subset
$A7B1 A9 22        LDA #$22      ;
$A7B3 20 45 CA     JSR $CA45     ; print ? for error message
$A7B6 20 DE C9     JSR $C9DE     ; print string subset
$A7B9 20 E1 FF     JSR $FFE1     ; Test STOP key
$A7BC A5 98        LDA $98       ;
$A7BE D0 FC        BNE $A7BC     ;
$A7C0 18           CLC           ;
$A7C1 A5 5C        LDA $5C       ; Pointer in search for line number
$A7C3 69 07        ADC #$07      ;
$A7C5 85 5C        STA $5C       ; Pointer in search for line number
$A7C7 A6 5D        LDX $5D       ;
$A7C9 90 01        BCC $A7CC     ;
$A7CB E8           INX           ;
$A7CC 86 5D        STX $5D       ;
$A7CE 4C 29 A7     JMP $A729     ;
$A7D1 A5 42        LDA $42       ;
$A7D3 20 45 CA     JSR $CA45     ; print ? for error message
$A7D6 A5 43        LDA $43       ;
$A7D8 F0 03        BEQ $A7DD     ;
$A7DA 20 45 CA     JSR $CA45     ; print ? for error message
$A7DD 60           RTS           ;
     ;
$A7DE 20 72 A2     JSR $A272     ;
$A7E1 20 DF A0     JSR $A0DF     ;
$A7E4 D0 FB        BNE $A7E1     ;
$A7E6 18           CLC           ;
$A7E7 8A           TXA           ;
$A7E8 A6 5D        LDX $5D       ;
$A7EA 69 02        ADC #$02      ;
$A7EC 85 CA        STA $2A       ; Pointer LSB to start of variables / end of program
$A7EE 90 01        BCC $A7F1     ;
$A7F0 E8           INX           ;
$A7F1 86 2B        STX $2B       ; Pointer MSB to start of variables / end of program
$A7F3 60           RTS           ;
$A7F4 93 12 2A 42 41 53 49 43    ; ASCII [clear][rvs on]*BASIC
$A7FE 45 58 50 41 4E 44 2A 92    ;       EXPAND*[rvs off]
$A804 20 20 20 20 20 20 20 20    ;       8x[space]
$A80E 20 20 20 20 20 20 20 0D    ;       7x[space][return]
$A814 00                         ;       end of text
$A815 A3 A6 A4 A4 A4 A0 A5 A6    ;
$A81D A3 A7 A4 A8 A8 A8 A8 A8    ;
$A825 A9 A4 A4 00 00 78 C9 F3    ;
$A82D F0 ED 65 9E 4F 9C 23 54    ;
$A835 62 3E BD C0 86 A7 95 DD    ;
$A83D 42 55                      ;
$A83F A9 08        LDA #$08      ;
$A841 85 D4        STA $D4       ;
$A843 20 B6 F0     JSR $F086     ; Table of messages for file handling subset of $F000
$A846 A9 6F        LDA #$6F      ;
$A848 85 D3        STA $D3       ;
$A84A 20 28 F1     JSR $F128     ; Send one character and clear ATN
$A84D 20 8C F1     JSR $F18C     ; Get one character from the IEEE-488 bus
$A850 C9 0D        CMP #$0D      ;
$A852 F0 06        BEQ $A854     ;
$A854 20 D8 E3     JSR $E3D8     ; Print ASCII character to the screen
$A857 4C 4D A8     JMP $A84D     ;
$A85A 20 D8 E3     JSR $E3D8     ; Print ASCII character to the screen
$A85D 20 7F F1     JSR $F17F     ; Send 'untalk'
$A860 4C B6 A8     JMP $A8B6     ;
$A863 A9 08        LDA #$08      ;
$A865 85 D4        STA $D4       ;
$A867 A9 6F        LDA #$6F      ;
$A869 85 D3        STA $D3       ;
$A86B 20 BA F0     JSR $F0BA     ; Send 'listen'
$A86E A5 D3        LDA $D3       ;
$A870 20 28 F1     JSR $F128     ; Send one character and clear ATN
$A873 E6 77        INC $77       ;
$A875 A0 00        LDA #$00      ;
$A877 B1 77        LDA ($77),Y   ;
$A879 F0 06        BEQ $A881     ;
$A87B 20 6F F1     JSR $F16F     ; Send IEEE character
$A87E 4C 73 A8     JMP $A873     ;
$A881 20 83 F1     JSR $F183     ; Send 'unlisten'
$A884 4C 89 C3     JMP $C389     ; Print READY
$A887 20 D6 A9     JSR $A9D6     ;
$A88A A9 6E        LDA #$6E      ;
$A88C 85 D3        STA $D3       ;
$A88E 20 66 F4     JSR $F466     ; Send string name to IEEE-488 bus
$A891 20 6C A9     JSR $A96C     ;
$A894 B0 1A        BCS $A8B0     ;
$A896 20 B6 F0     JSR $F0B6     ; send 'Talk' on IEEE-488 bus
$A899 A5 D3        LDA $D3       ;
$A89B 20 28 F1     JSR $F128     ; Send one character and clear ATN
$A89E 20 8C F1     JSR $F18C     ; Get one character from the IEEE-488 bus
$A8A1 20 D8 E3     JSR $E3D8     ; Print ASCII character to the screen
$A8A4 20 67 A9     JSR $A967     ;
$A8A7 20 01 F3     JSR $F301     ; Close devices #0 and #3 subset of $F2E4
$A8AA F0 04        BEQ $A8B0     ;
$A8AC A5 96        LDA $96       ;
$A8AE F0 EE        BEQ $A89E     ;
$A8B0 20 8F F3     JSR $F38F     ; Set end address when LOAD or VERIFY is finished subset of $F387
$A8B3 20 B7 CA     JSR $CAB7     ;
$A8B6 A9 85        LDA #$85      ;
$A8B8 8D 92 A6     STA $A692     ;
$A8BB 4C 89 C3     JMP $C389     ; Print READY
$A8BE A9 00        LDA #$00      ;
$A8C0 2C A9 04     BIT $04A9     ;
$A8C3 85 80        STA $80       ;
$A8C5 20 6E F2     JSR $F26E     ; Abort all files and I/O activity
$A8C8 46 0D        LSR $0D       ;
$A8CA A9 00        LDA #$00      ;
$A8CC 85 0E        STA $0E       ;
$A8CE A9 60        LDA #$60      ;
$A8D0 85 D3        STA $D3       ;
$A8D2 85 81        STA $81       ;
$A8D4 20 D6 A9     JSR $A9D6     ;
$A8D7 85 D2        STA $D2       ;
$A8D9 20 24 F5     JSR $F524     ; Perform OPEN subset of $F521
$A8DC 20 6C A9     JSR $A96C     ;
$A8DF B0 77        BCS $A958     ;
$A8E1 A5 80        LDA $80       ;
$A8E3 F0 0B        BEQ $A8F0     ;
$A8E5 85 D4        STA $D4       ;
$A8E7 85 D2        STA $D2       ;
$A8E9 A9 00        LDA #$00      ;
$A8EB 85 D1        STA $D1       ;
$A8ED 20 24 F5     JSR $F524     ; Perform OPEN subset of $F521
$A8F0 A2 08        LDX #$08      ;
$A8F2 20 70 F7     JSR $F770     ;
$A8F5 A5 81        LDA $81       ;
$A8F7 F0 0A        BEQ $A903     ;
$A8F9 20 8C F1     JSR $F18C     ; Get one character from the IEEE-488 bus
$A8FC 20 8C F1     JSR $F18C     ; Get one character from the IEEE-488 bus
$A8FF A9 00        LDA #$00      ;
$A901 85 81        STA $81       ;
$A903 20 8C F1     JSR $F18C     ; Get one character from the IEEE-488 bus
$A906 20 8C F1     JSR $F18C     ; Get one character from the IEEE-488 bus
$A909 F0 4D        BEQ $A958     ;
$A90B A2 02        LDX #$02      ;
$A90D 20 8C F1     JSR $F18C     ; Get one character from the IEEE-488 bus
$A910 9D 3A 03     STA $033A,X   ;
$A913 E8           INX           ;
$A914 20 8C F1     JSR $F18C     ; Get one character from the IEEE-488 bus
$A917 9D 3A 03     STA $033A,X   ;
$A91A E8           INX           ;
$A91B A5 96        LDA $96       ;
$A91D D0 39        BNE $A958     ;
$A91F 20 8C F1     JSR $F18C     ; Get one character from the IEEE-488 bus
$A922 9D 3A 03     STA $033A,X   ;
$A925 D0 F3        BNE $A91A     ;
$A927 20 72 F2     JSR $F272     ; Abort all files and I/O activity subset of $F26E
$A92A A6 80        LDX $80       ;
$A92C F0 03        BEQ $A931     ;
$A92E 20 BC F7     JSR $F7BC     ; Set output device
$A931 AE 3C 03     LDX $033C     ;
$A934 AD 3D 03     LDA $033D     ;
$A937 20 D9 DC     JSR $DCD9     ;
$A93A A9 03        LDA #$03      ;
$A93C A2 3A        LDX #$3A      ;
$A93E 85 5D        STA $5D       ; Pointer MSB in search for line number
$A940 86 5C        STX $5C       ; Pointer LSB in search for line number
$A942 A9 FF        LDA #$FF      ;
$A944 85 86        STA $86       ;
$A946 20 77 A6     JSR $A677     ;
$A949 20 72 F2     JSR $F272     ; Abort all files and I/O activity subset of $F26E
$A94C A5 80        LDA $80       ;
$A94E D0 03        BNE $A953     ;
$A950 20 67 A9     JSR $A967     ;
$A953 20 01 F3     JSR $F301     ; CLOSE devices #0 and #3 subset of $F2E4
$A956 D0 98        BNE $A8F0     ;
$A958 A9 08        LDA #$08      ;
$A95A 20 AE F2     JSR $F2AE     ;
$A95D A5 80        LDA $80       ;
$A95F F0 03        BEQ $A964     ;
$A961 20 AE F2     JSR $F2AE     ; Perform CLOSe subset of $F2A9
$A964 4C B3 A8     JMP $A8B3     ;
$A967 A5 98        LDA $98       ;
$A969 D0 FC        BNE $A967     ;
$A96B 60           RTS           ;
     ;
$A96C A5 D3        LDA $D3       ;
$A96E 48           PHA           ;
$A96F 20 B6 F0     JSR $F0B6     ; send 'Talk' on IEEE-488 bus
$A972 A9 6F        LDA #$6F      ;
$A974 85 D3        STA $D3       ;
$A976 20 28 F1     JSR $F128     ; Send one character and clear ATN
$A979 20 8C F1     JSR $F18C     ; Get one character from the IEEE-488 bus
$A97C C9 30        CMP #$30      ;
$A97E D0 0F        BNE #A98F     ;
$A980 EA EA EA EA EA EA EA       ; NOP
$A987 20 7F F1     JSR $F17F     ; Send 'Untalk'
$A98A 68           PLA           ;
$A98B 85 D3        STA $D3       ;
$A98D 18           CLC           ;
$A98E 60           RTS           ;
     ;
$A98F 48           PHA           ;
$A990 A9 0D        LDA #$0D      ;
$A992 20 D8 E3     JSR $E3D8     ; Print ASCII character to the screen
$A995 68           PLA           ;
$A996 20 D8 E3     JSR $E3D8     ; Print ASCII character to the screen
$A999 20 8C F1     JSR $F18C     ; Get one character from the IEEE-488 bus
$A99C C9 0D        CMP #$0D      ;
$A99E D0 F6        BNE $A996     ;
$A9A0 20 D8 E3     JSR $E3D8     ; Print ASCII character to the screen
$A9A3 68           PLA           ;
$A9A4 85 D3        STA $D3       ;
$A9A6 38           SEC           ;
$A9A7 60           RTS           ;
     ;
$A9A8 A9 24        LDA #$24      ;
$A9AA A2 00        LDX #$00      ;
$A9AC 81 77        STA ($77,X)   ;
$A9AE 8D 92 A6     STA $A692     ;
$A9B1 C6 77        DEC $77       ;
$A9B3 A5 B0        LDA $B0       ;
$A9B5 C9 04        CMP #$04      ;
$A9B7 90 06        BCC $A9BF     ;
$A9B9 20 83 F1     JSR $F183     ; Send 'unlisten'
$A9BC A5 0E        LDA $0E       ;
$A9BE 2C A9 00     BIT $00A9     ;
$A9C1 85 80        STA $80       ;
$A9C3 46 0D        LSR $0D       ;
$A9C5 20 D6 A9     JSR $A9D6     ;
$A9C8 85 D2        STA $D2       ;
$A9CA A9 60        LDA #$60      ;
$A9CC 85 D3        STA $D3       ;
$A9CE 85 81        STA $81       ;
$A9D0 20 24 F5     JSR $F524     ; Perform OPEN subset of $F521
$A9D3 4C F0 A8     JMP $A8F0     ;
$A9D6 A0 00        LDY $$00      ;
$A9D8 A5 77        LDA $77       ;
$A9DA 85 DA        STA $DA       ;
$A9DC E6 DA        INC $DA       ;
$A9DE A5 78        LDA $78       ;
$A9E0 85 DB        STA $DB       ;
$A9E2 C8           INY           ;
$A9E3 B1 77        LDA ($77),Y   ;
$A9E5 D0 FB        BNE $A9E2     ;
$A9E7 88           DEY           ;
$A9E8 F0 0D        BEQ $A9F7     ;
$A9EA 84 D1        STY $D1       ;
$A9EC A9 00        LDA #$00      ;
$A9EE 85 96        STA $96       ;
$A9F0 85 9D        STA $9D       ;
$A9F2 A9 08        LDA #$08      ;
$A9F4 85 D4        STA $D4       ;
$A9F6 60           RTS           ;
     ; print error message
$A9F7 68           PLA           ;
$A9F8 68           PLA           ;
$A9F9 A9 00        LDA #$00      ;     $AA00
$A9FB A0 AA        LDY #$AA      ;
$A9FD 4C 3F A2     JMP $A23F     ;     CHAROUT + 
$AA00 0D 3F 4D 49 53 53 49 4E    ; ASCII [return]?MISSIN
$AA08 47 20 46 49 4C 45 4E 41    ;       G[space]FILENA
$AA10 4D 45 00                   ;       ME[end of text]
$AA13 - $AF6F filled with 00
$AF70 33 B4 13 0A B3 20 37 2D F3 59 72 2C 23 14 F3 58
$AF80 33 38 33 38 33 33 33 32 F3 B3 33 3F 73 30 33 30
$AF90 33 DC B3 38 33 13 23 30 B3 23 F3 08 73 30 32 01
$AFA0 23 CC 93 DA B3 CE 23 8C F2 CC EF CC 7F CC A7 88
$AFB0 33 4C 37 DC 37 DC A3 9E E3 7C BF DC 13 OC 27 18
$AFC0 33 20 23 31 37 30 33 3F 7B 3E 3B 3B 33 39 33 34
$AFD0 33 25 23 BO 33 10 33 3F 73 5E 3B 3B B7 19 63 96
$AFE0 33 CD A3 D8 B3 DO 83 CE FB CC 7B CC C7 C9 63 DC
$AFF0 33 3D 33 B8 13 38 B3 3E 33 3C B3 34 43 38 23 OA

.ini settings

snapsize                  640×480

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s