2021-05-09 21:34:53 +00:00
|
|
|
;
|
2021-06-07 02:28:03 +00:00
|
|
|
; Wayne Parham (wayne@parhamdata.com)
|
2021-05-09 21:34:53 +00:00
|
|
|
;
|
2021-06-12 00:55:13 +00:00
|
|
|
; int __fastcall__ loadt (unsigned char id);
|
|
|
|
; int __fastcall__ dumpt (unsigned char id, void* start_addr, void* end_addr);
|
2021-05-09 21:34:53 +00:00
|
|
|
;
|
|
|
|
|
|
|
|
.include "sym1.inc"
|
|
|
|
|
2021-06-12 00:55:13 +00:00
|
|
|
.import popa, popax, return0, return1
|
2021-05-09 21:34:53 +00:00
|
|
|
|
|
|
|
.export _loadt, _dumpt
|
|
|
|
|
|
|
|
.segment "CODE"
|
|
|
|
|
|
|
|
.proc _loadt: near
|
2021-06-07 02:28:03 +00:00
|
|
|
|
2021-05-09 21:34:53 +00:00
|
|
|
sta P1L ; Tape record ID to P1L
|
|
|
|
ldx #$00
|
|
|
|
stx P1H
|
|
|
|
ldy #$80
|
|
|
|
jsr LOADT ; Read data from tape
|
|
|
|
bcs error
|
2021-06-07 05:35:20 +00:00
|
|
|
jmp return0 ; Return 0 if sucessful
|
|
|
|
error: jmp return1 ; or 1 if not
|
2021-06-07 02:28:03 +00:00
|
|
|
|
2021-05-09 21:34:53 +00:00
|
|
|
.endproc
|
|
|
|
|
|
|
|
.proc _dumpt: near
|
2021-06-07 02:28:03 +00:00
|
|
|
|
2021-05-09 21:34:53 +00:00
|
|
|
sta P3L ; End address
|
|
|
|
stx P3H
|
|
|
|
jsr popax
|
|
|
|
sta P2L ; Start address
|
|
|
|
stx P2H
|
2021-06-12 00:55:13 +00:00
|
|
|
jsr popa
|
2021-05-09 21:34:53 +00:00
|
|
|
sta P1L ; Tape Record ID
|
|
|
|
ldx #$00
|
|
|
|
stx P1H
|
|
|
|
ldy #$80
|
|
|
|
jsr DUMPT ; Write data to tape
|
|
|
|
bcs error
|
2021-06-07 05:35:20 +00:00
|
|
|
jmp return0 ; Return 0 if sucessful
|
|
|
|
error: jmp return1 ; or 1 if not
|
2021-06-07 02:28:03 +00:00
|
|
|
|
2021-05-09 21:34:53 +00:00
|
|
|
.endproc
|