implemented SAVE command
This commit is contained in:
1 parent
8a16ce3934
commit
b008d9f4a9
3 files changed
+35
-14
No files matched your search
@@ -28,7 +28,7 @@ cmd_load:
|
|||||||
jsr fetch_filename
|
jsr fetch_filename
|
||||||
bcs cmd_load_no_filename
|
bcs cmd_load_no_filename
|
||||||
|
|
||||||
// Try to fetch secondary address
|
// Try to fetch device and secondary address
|
||||||
|
|
||||||
jsr fetch_device_secondary
|
jsr fetch_device_secondary
|
||||||
jmp cmd_load_got_params
|
jmp cmd_load_got_params
|
||||||
@@ -53,15 +53,7 @@ cmd_load_got_params: // input for tape wedge
|
|||||||
lda VERCKB // LOAD or VERIFY
|
lda VERCKB // LOAD or VERIFY
|
||||||
|
|
||||||
jsr JLOAD
|
jsr JLOAD
|
||||||
|
jsr cmd_load_save_handle_result
|
||||||
// Handle result
|
|
||||||
|
|
||||||
php
|
|
||||||
pha
|
|
||||||
jsr print_return
|
|
||||||
pla
|
|
||||||
plp
|
|
||||||
bcs_16 do_kernal_error
|
|
||||||
|
|
||||||
cmd_load_no_error:
|
cmd_load_no_error:
|
||||||
|
|
||||||
@@ -97,9 +89,24 @@ cmd_load_no_error:
|
|||||||
inx
|
inx
|
||||||
beq cmd_load_end // branch if direct mode
|
beq cmd_load_end // branch if direct mode
|
||||||
|
|
||||||
// XXX
|
|
||||||
jmp basic_execute_from_current_line
|
jmp basic_execute_from_current_line
|
||||||
|
|
||||||
cmd_load_end:
|
cmd_load_end:
|
||||||
|
|
||||||
jmp basic_main_loop
|
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
|
||||||
@@ -8,7 +8,7 @@ cmd_save:
|
|||||||
// Set default device and secondary address; channel is not important now
|
// Set default device and secondary address; channel is not important now
|
||||||
|
|
||||||
jsr select_device
|
jsr select_device
|
||||||
ldy #$00 // secondary address
|
ldy #$00
|
||||||
jsr JSETFLS
|
jsr JSETFLS
|
||||||
|
|
||||||
// Fetch the file name
|
// Fetch the file name
|
||||||
@@ -16,10 +16,24 @@ cmd_save:
|
|||||||
jsr fetch_filename
|
jsr fetch_filename
|
||||||
bcs_16 do_MISSING_FILENAME_error
|
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
|
jmp basic_main_loop
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
// #LAYOUT# * * #IGNORE
|
// #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,
|
// 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
|
// although illegal for IEC we also consider a drive, as they exists
|
||||||
|
|||||||
Reference in new issue
Block a user