| C64 ROM | Routines |
| Prev: F5DD | Up: Map | Next: F68F |
|
|
||||
| F5ED | A5 BA | LDA $BA | get the device number | |
| F5EF | D0 03 | BNE $F5F4 | if not keyboard go ?? | |
|
else ..
|
||||
| F5F1 | 4C 13 F7 | JMP $F713 | else do 'illegal device number' and return | |
| F5F4 | C9 03 | CMP #$03 | compare device number with screen | |
| F5F6 | F0 F9 | BEQ $F5F1 | if screen do illegal device number and return | |
| F5F8 | 90 5F | BCC $F659 | branch if < screen | |
|
is greater than screen so is serial bus
|
||||
| F5FA | A9 61 | LDA #$61 | set secondary address to $01 | |
|
when a secondary address is to be sent to a device on the serial bus the address must first be ORed with $60
|
||||
| F5FC | 85 B9 | STA $B9 | save the secondary address | |
| F5FE | A4 B7 | LDY $B7 | get the file name length | |
| F600 | D0 03 | BNE $F605 | if filename not null continue | |
| F602 | 4C 10 F7 | JMP $F710 | else do 'missing file name' error and return | |
| F605 | 20 D5 F3 | JSR $F3D5 | send secondary address and filename | |
| F608 | 20 8F F6 | JSR $F68F | print saving <file name> | |
| F60B | A5 BA | LDA $BA | get the device number | |
| F60D | 20 0C ED | JSR $ED0C | command devices on the serial bus to LISTEN | |
| F610 | A5 B9 | LDA $B9 | get the secondary address | |
| F612 | 20 B9 ED | JSR $EDB9 | send secondary address after LISTEN | |
| F615 | A0 00 | LDY #$00 | clear index | |
| F617 | 20 8E FB | JSR $FB8E | copy I/O start address to buffer address | |
| F61A | A5 AC | LDA $AC | get buffer address low byte | |
| F61C | 20 DD ED | JSR $EDDD | output byte to serial bus | |
| F61F | A5 AD | LDA $AD | get buffer address high byte | |
| F621 | 20 DD ED | JSR $EDDD | output byte to serial bus | |
| F624 | 20 D1 FC | JSR $FCD1 | check read/write pointer, return Cb = 1 if pointer >= end | |
| F627 | B0 16 | BCS $F63F | go do UNLISTEN if at end | |
| F629 | B1 AC | LDA ($AC),Y | get byte from buffer | |
| F62B | 20 DD ED | JSR $EDDD | output byte to serial bus | |
| F62E | 20 E1 FF | JSR $FFE1 | scan stop key | |
| F631 | D0 07 | BNE $F63A | if stop not pressed go increment pointer and loop for next | |
|
This entry point is used by the routine at F4A5.
else .. close the serial bus device and flag stop
|
||||
| F633 | 20 42 F6 | JSR $F642 | close serial bus device | |
| F636 | A9 00 | LDA #$00 | ||
| F638 | 38 | SEC | flag stop | |
| F639 | 60 | RTS | ||
| F63A | 20 DB FC | JSR $FCDB | increment read/write pointer | |
| F63D | D0 E5 | BNE $F624 | loop, branch always | |
| F63F | 20 FE ED | JSR $EDFE | command serial bus to UNLISTEN | |
| F642 | 24 B9 | BIT $B9 | test the secondary address | |
| F644 | 30 11 | BMI $F657 | if already closed just exit | |
| F646 | A5 BA | LDA $BA | get the device number | |
| F648 | 20 0C ED | JSR $ED0C | command devices on the serial bus to LISTEN | |
| F64B | A5 B9 | LDA $B9 | get the secondary address | |
| F64D | 29 EF | AND #%11101111 | mask the channel number | |
| F64F | 09 E0 | ORA #%11100000 | OR with the CLOSE command | |
| F651 | 20 B9 ED | JSR $EDB9 | send secondary address after LISTEN | |
|
This entry point is used by the routine at F3D5.
|
||||
| F654 | 20 FE ED | JSR $EDFE | command serial bus to UNLISTEN | |
| F657 | 18 | CLC | flag ok | |
| F658 | 60 | RTS | ||
| F659 | 4A | LSR A | ||
| F65A | B0 03 | BCS $F65F | if not RS232 device ?? | |
| F65C | 4C 13 F7 | JMP $F713 | else do 'illegal device number' and return | |
| F65F | 20 D0 F7 | JSR $F7D0 | get tape buffer start pointer in XY | |
| F662 | 90 8D | BCC $F5F1 | if < $0200 do illegal device number and return | |
| F664 | 20 38 F8 | JSR $F838 | wait for PLAY/RECORD | |
| F667 | B0 25 | BCS $F68E | exit if STOP was pressed | |
| F669 | 20 8F F6 | JSR $F68F | print saving <file name> | |
| F66C | A2 03 | LDX #$03 | set header for a non relocatable program file | |
| F66E | A5 B9 | LDA $B9 | get the secondary address | |
| F670 | 29 01 | AND #%00000001 | mask non relocatable bit | |
| F672 | D0 02 | BNE $F676 | if non relocatable program go ?? | |
| F674 | A2 01 | LDX #$01 | else set header for a relocatable program file | |
| F676 | 8A | TXA | copy header type to A | |
| F677 | 20 6A F7 | JSR $F76A | write tape header | |
| F67A | B0 12 | BCS $F68E | exit if error | |
| F67C | 20 67 F8 | JSR $F867 | do tape write, 20 cycle count | |
| F67F | B0 0D | BCS $F68E | exit if error | |
| F681 | A5 B9 | LDA $B9 | get the secondary address | |
| F683 | 29 02 | AND #%00000010 | mask end of tape flag | |
| F685 | F0 06 | BEQ $F68D | if not end of tape go ?? | |
| F687 | A9 05 | LDA #$05 | else set logical end of the tape | |
| F689 | 20 6A F7 | JSR $F76A | write tape header | |
| F68C | .BYTE $24 | makes next line BIT $18 so Cb is not changed | ||
| F68D | 18 | CLC | flag ok | |
|
This entry point is used by the routine at F68F.
|
||||
| F68E | 60 | RTS | ||
| Prev: F5DD | Up: Map | Next: F68F |