dio implementation by Oliver Schmidt
git-svn-id: svn://svn.cc65.org/cc65/trunk@3432 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
35
libsrc/apple2/diocommon.s
Normal file
35
libsrc/apple2/diocommon.s
Normal file
@@ -0,0 +1,35 @@
|
||||
;
|
||||
; Oliver Schmidt, 24.03.2005
|
||||
;
|
||||
|
||||
.export dioprolog, diocommon, dioepilog
|
||||
.import popax
|
||||
|
||||
.include "errno.inc"
|
||||
.include "mli.inc"
|
||||
|
||||
dioprolog:
|
||||
; Set buffer
|
||||
sta mliparam + MLI::RW_BLOCK::DATA_BUFFER
|
||||
stx mliparam + MLI::RW_BLOCK::DATA_BUFFER+1
|
||||
|
||||
; Get and set sect_num
|
||||
jsr popax
|
||||
sta mliparam + MLI::RW_BLOCK::BLOCK_NUM
|
||||
stx mliparam + MLI::RW_BLOCK::BLOCK_NUM+1
|
||||
|
||||
; Get and set handle
|
||||
jsr popax
|
||||
sta mliparam + MLI::RW_BLOCK::UNIT_NUM
|
||||
rts
|
||||
|
||||
diocommon:
|
||||
; Call read_block or write_block
|
||||
ldx #RW_BLOCK_COUNT
|
||||
jsr callmli
|
||||
|
||||
dioepilog:
|
||||
; Return success or error
|
||||
sta __oserror
|
||||
ldx #$00
|
||||
rts
|
||||
Reference in New Issue
Block a user