C64 ROM | Routines |
Prev: B526 | Up: Map | Next: B67A |
Used by the routine at AD9E.
add strings, the first string is in the descriptor, the second string is in line
|
||||
B63D | A5 65 | LDA $65 | get descriptor pointer high byte | |
B63F | 48 | PHA | put on stack | |
B640 | A5 64 | LDA $64 | get descriptor pointer low byte | |
B642 | 48 | PHA | put on stack | |
B643 | 20 83 AE | JSR $AE83 | get value from line | |
B646 | 20 8F AD | JSR $AD8F | check if source is string, else do type mismatch | |
B649 | 68 | PLA | get descriptor pointer low byte back | |
B64A | 85 6F | STA $6F | set pointer low byte | |
B64C | 68 | PLA | get descriptor pointer high byte back | |
B64D | 85 70 | STA $70 | set pointer high byte | |
B64F | A0 00 | LDY #$00 | clear index | |
B651 | B1 6F | LDA ($6F),Y | get length of first string from descriptor | |
B653 | 18 | CLC | clear carry for add | |
B654 | 71 64 | ADC ($64),Y | add length of second string | |
B656 | 90 05 | BCC $B65D | branch if no overflow | |
B658 | A2 17 | LDX #$17 | else error $17, string too long error | |
B65A | 4C 37 A4 | JMP $A437 | do error #X then warm start | |
B65D | 20 75 B4 | JSR $B475 | copy descriptor pointer and make string space A bytes long | |
B660 | 20 7A B6 | JSR $B67A | copy string from descriptor to utility pointer | |
B663 | A5 50 | LDA $50 | get descriptor pointer low byte | |
B665 | A4 51 | LDY $51 | get descriptor pointer high byte | |
B667 | 20 AA B6 | JSR $B6AA | pop (YA) descriptor off stack or from top of string space | |
returns with A = length, X = pointer low byte, Y = pointer high byte
|
||||
B66A | 20 8C B6 | JSR $B68C | store string from pointer to utility pointer | |
B66D | A5 6F | LDA $6F | get descriptor pointer low byte | |
B66F | A4 70 | LDY $70 | get descriptor pointer high byte | |
B671 | 20 AA B6 | JSR $B6AA | pop (YA) descriptor off stack or from top of string space | |
returns with A = length, X = pointer low byte, Y = pointer high byte
|
||||
B674 | 20 CA B4 | JSR $B4CA | check space on descriptor stack then put string address and length on descriptor stack and update stack pointers | |
B677 | 4C B8 AD | JMP $ADB8 | continue evaluation |
Prev: B526 | Up: Map | Next: B67A |