CHKIN and CKOUT refactoring
This commit is contained in:
1 parent
e00bda3548
commit
7eca8ea05b
12 files changed
+223
-164
No files matched your search
@@ -0,0 +1,30 @@
|
||||
|
||||
//
|
||||
// IEC part of the CHKIN routine
|
||||
//
|
||||
|
||||
|
||||
#if CONFIG_IEC
|
||||
|
||||
|
||||
chkin_iec:
|
||||
|
||||
// Fail if the file is open for writing (secondary address 1)
|
||||
|
||||
lda LAT, Y
|
||||
cmp #$01
|
||||
beq_far chkin_file_not_input
|
||||
|
||||
// Send TALK + TKSA first
|
||||
lda FAT,Y
|
||||
|
||||
jsr TALK
|
||||
bcs_far chkinout_device_not_present
|
||||
|
||||
lda LAT, Y
|
||||
jsr TKSA
|
||||
bcs_far chkinout_device_not_present
|
||||
|
||||
jmp chkin_set_device
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
@@ -0,0 +1,30 @@
|
||||
|
||||
//
|
||||
// IEC part of the CKOUT routine
|
||||
//
|
||||
|
||||
|
||||
#if CONFIG_IEC
|
||||
|
||||
|
||||
ckout_iec:
|
||||
|
||||
// Fail if the file is open for reading (secondary address 0)
|
||||
|
||||
lda LAT, Y
|
||||
beq_far ckout_file_not_output
|
||||
|
||||
// Send LISTEN + SECOND first
|
||||
lda FAT,Y
|
||||
|
||||
jsr LISTEN
|
||||
bcs_far chkinout_device_not_present
|
||||
|
||||
lda LAT, Y
|
||||
jsr SECOND
|
||||
bcs_far chkinout_device_not_present
|
||||
|
||||
jmp ckout_set_device
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
Reference in new issue
Block a user