implemented MERGE command

This commit is contained in:
FeralChild64 committed 2020-06-22 15:33:48 +02:00
1 parent 6639ac5609
commit c3335393c2
6 files changed
+105 -32

No files matched your search

+43 -1
View File
@@ -5,4 +5,46 @@
cmd_merge:
jmp do_NOT_IMPLEMENTED_error // XXX implement the command
lda #$00 // mark operation as LOAD
sta VERCKB
// Set default device and secondary address; channel is not important now
jsr select_device
ldy #$00 // secondary address 0 - it has to be loaded precisely where we want
jsr JSETFLS
// Fetch the file name
jsr fetch_filename
bcc !+
// No filename supplied - this should only be allowed for tape (device number below 8)
lda FA
and #%11111000
bne_16 do_MISSING_FILENAME_error
lda #$00
sta FNLEN
!:
// Fetch device number
jsr fetch_device_secondary_uint8
bcs !+
sta FA
!:
// Perform loading - just for a different address
sec
lda VARTAB+0
sbc #$02
sta VARTAB+0
tax
bcs !+
dec VARTAB+1
!:
ldy VARTAB+1
jmp cmd_load_loadmerge // XXX check variable handling (VARTAB) after failure to load