implemented SAVE command

This commit is contained in:
FeralChild64 committed 2020-06-06 17:10:37 +02:00
1 parent 8a16ce3934
commit b008d9f4a9
3 files changed
+35 -14

No files matched your search

+18 -11
View File
@@ -28,7 +28,7 @@ cmd_load:
jsr fetch_filename
bcs cmd_load_no_filename
// Try to fetch secondary address
// Try to fetch device and secondary address
jsr fetch_device_secondary
jmp cmd_load_got_params
@@ -53,15 +53,7 @@ cmd_load_got_params: // input for tape wedge
lda VERCKB // LOAD or VERIFY
jsr JLOAD
// Handle result
php
pha
jsr print_return
pla
plp
bcs_16 do_kernal_error
jsr cmd_load_save_handle_result
cmd_load_no_error:
@@ -97,9 +89,24 @@ cmd_load_no_error:
inx
beq cmd_load_end // branch if direct mode
// XXX
jmp basic_execute_from_current_line
cmd_load_end:
jmp basic_main_loop
//
// Handle result from Kernal - common for LOAD/VERIFY/SAVE
//
cmd_load_save_handle_result:
php
pha
jsr print_return
pla
plp
bcs_16 do_kernal_error
rts
+16 -2
View File
@@ -8,7 +8,7 @@ cmd_save:
// Set default device and secondary address; channel is not important now
jsr select_device
ldy #$00 // secondary address
ldy #$00
jsr JSETFLS
// Fetch the file name
@@ -16,10 +16,24 @@ cmd_save:
jsr fetch_filename
bcs_16 do_MISSING_FILENAME_error
// Try to fetch device
jsr fetch_device_secondary
// Setup the start and end addresses
lda #TXTTAB
// XXX - finish the implementation
// Setup the end address
ldx VARTAB+0
ldy VARTAB+1
// Perform saving
jsr JSAVE
jsr cmd_load_save_handle_result
// The end
jmp basic_main_loop
+1 -1
View File
@@ -3,7 +3,7 @@
// #LAYOUT# * * #IGNORE
select_device:
select_device: // XXX check usage, probably more can be put into this common section
// Take last device number, make sure it is a drive - 8 or above. Above 30,
// although illegal for IEC we also consider a drive, as they exists