C64 ROM | Routines |
Prev: A68E | Up: Map | Next: A71A |
|
||||
A69C | 90 06 | BCC $A6A4 | branch if next character not token (LIST n...) | |
A69E | F0 04 | BEQ $A6A4 | branch if next character [NULL] (LIST) | |
A6A0 | C9 AB | CMP #$AB | compare with token for - | |
A6A2 | D0 E9 | BNE $A68D | exit if not - (LIST -m) | |
LIST [[n][-m]]; this bit sets the n, if present, as the start and end
|
||||
A6A4 | 20 6B A9 | JSR $A96B | get fixed-point number into temporary integer | |
A6A7 | 20 13 A6 | JSR $A613 | search BASIC for temporary integer line number | |
A6AA | 20 79 00 | JSR $0079 | scan memory | |
A6AD | F0 0C | BEQ $A6BB | branch if no more chrs | |
this bit checks the - is present
|
||||
A6AF | C9 AB | CMP #$AB | compare with token for - | |
A6B1 | D0 8E | BNE $A641 | return if not "-" (will be SN error) | |
LIST [n]-m; the - was there so set m as the end value
|
||||
A6B3 | 20 73 00 | JSR $0073 | increment and scan memory | |
A6B6 | 20 6B A9 | JSR $A96B | get fixed-point number into temporary integer | |
A6B9 | D0 86 | BNE $A641 | exit if not ok | |
A6BB | 68 | PLA | dump return address low byte, exit via warm start | |
A6BC | 68 | PLA | dump return address high byte | |
A6BD | A5 14 | LDA $14 | get temporary integer low byte | |
A6BF | 05 15 | ORA $15 | OR temporary integer high byte | |
A6C1 | D0 06 | BNE $A6C9 | branch if start set | |
A6C3 | A9 FF | LDA #$FF | set for -1 | |
A6C5 | 85 14 | STA $14 | set temporary integer low byte | |
A6C7 | 85 15 | STA $15 | set temporary integer high byte | |
A6C9 | A0 01 | LDY #$01 | set index for line | |
A6CB | 84 0F | STY $0F | clear open quote flag | |
A6CD | B1 5F | LDA ($5F),Y | get next line pointer high byte | |
A6CF | F0 43 | BEQ $A714 | if null all done so exit | |
A6D1 | 20 2C A8 | JSR $A82C | do CRTL-C check vector | |
A6D4 | 20 D7 AA | JSR $AAD7 | print CR/LF | |
A6D7 | C8 | INY | increment index for line | |
A6D8 | B1 5F | LDA ($5F),Y | get line number low byte | |
A6DA | AA | TAX | copy to X | |
A6DB | C8 | INY | increment index | |
A6DC | B1 5F | LDA ($5F),Y | get line number high byte | |
A6DE | C5 15 | CMP $15 | compare with temporary integer high byte | |
A6E0 | D0 04 | BNE $A6E6 | branch if no high byte match | |
A6E2 | E4 14 | CPX $14 | compare with temporary integer low byte | |
A6E4 | F0 02 | BEQ $A6E8 | branch if = last line to do, < will pass next branch | |
else ...
|
||||
A6E6 | B0 2C | BCS $A714 | if greater all done so exit | |
A6E8 | 84 49 | STY $49 | save index for line | |
A6EA | 20 CD BD | JSR $BDCD | print XA as unsigned integer | |
A6ED | A9 20 | LDA #" " | space is the next character | |
This entry point is used by the routine at A71A.
|
||||
A6EF | A4 49 | LDY $49 | get index for line | |
A6F1 | 29 7F | AND #%01111111 | mask out top bit of character | |
This entry point is used by the routine at A71A.
|
||||
A6F3 | 20 47 AB | JSR $AB47 | go print the character | |
A6F6 | C9 22 | CMP #$22 | was it " character | |
A6F8 | D0 06 | BNE $A700 | if not skip the quote handle | |
we are either entering or leaving a pair of quotes
|
||||
A6FA | A5 0F | LDA $0F | get open quote flag | |
A6FC | 49 FF | EOR #$FF | toggle it | |
A6FE | 85 0F | STA $0F | save it back | |
A700 | C8 | INY | increment index | |
A701 | F0 11 | BEQ $A714 | line too long so just bail out and do a warm start | |
A703 | B1 5F | LDA ($5F),Y | get next byte | |
A705 | D0 10 | BNE $A717 | if not [EOL] (go print character) | |
was [EOL]
|
||||
A707 | A8 | TAY | else clear index | |
A708 | B1 5F | LDA ($5F),Y | get next line pointer low byte | |
A70A | AA | TAX | copy to X | |
A70B | C8 | INY | increment index | |
A70C | B1 5F | LDA ($5F),Y | get next line pointer high byte | |
A70E | 86 5F | STX $5F | set pointer to line low byte | |
A710 | 85 60 | STA $60 | set pointer to line high byte | |
A712 | D0 B5 | BNE $A6C9 | go do next line if not [EOT] | |
else ...
|
||||
A714 | 4C 86 E3 | JMP $E386 | do warm start | |
A717 | 6C 06 03 | JMP ($0306) | do uncrunch BASIC tokens |
Prev: A68E | Up: Map | Next: A71A |