mirror of
https://github.com/cc65/cc65.git
synced 2024-12-24 11:31:31 +00:00
Update from Oliver Schmidt
git-svn-id: svn://svn.cc65.org/cc65/trunk@3439 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
73d32060ca
commit
e3df1fea4a
@ -53,6 +53,8 @@ OBJS= _scrsize.o \
|
||||
diocommon.o \
|
||||
dioopen.o \
|
||||
dioread.o \
|
||||
diosectcount.o \
|
||||
diosectsize.o \
|
||||
diowrite.o \
|
||||
dosdetect.o \
|
||||
get_ostype.o \
|
||||
|
@ -6,7 +6,7 @@
|
||||
; drive_id = (slot * 2) + (drive - 1)
|
||||
|
||||
.export _dio_open
|
||||
.import decaxy, return0
|
||||
.import return0
|
||||
|
||||
.include "zeropage.inc"
|
||||
.include "errno.inc"
|
||||
@ -21,15 +21,19 @@ _dio_open:
|
||||
asl
|
||||
asl
|
||||
asl
|
||||
tay ; Save handle
|
||||
|
||||
; Set handle
|
||||
sta mliparam + MLI::ON_LINE::UNIT_NUM
|
||||
|
||||
; Alloc 16-byte buffer just below stack
|
||||
ldy #16
|
||||
lda sp
|
||||
ldx sp+1
|
||||
jsr decaxy
|
||||
sec
|
||||
sbc #16
|
||||
sta mliparam + MLI::ON_LINE::DATA_BUFFER
|
||||
stx mliparam + MLI::ON_LINE::DATA_BUFFER+1
|
||||
lda sp+1
|
||||
sbc #$00
|
||||
sta mliparam + MLI::ON_LINE::DATA_BUFFER+1
|
||||
|
||||
; Get device state
|
||||
lda #ON_LINE_CALL
|
||||
@ -43,7 +47,7 @@ _dio_open:
|
||||
bcc oserr
|
||||
|
||||
; Return success
|
||||
: lda mliparam + MLI::ON_LINE::UNIT_NUM
|
||||
: tya ; Restore handle
|
||||
ldx #$00
|
||||
stx __oserror
|
||||
rts
|
||||
|
12
libsrc/apple2/diosectcount.s
Normal file
12
libsrc/apple2/diosectcount.s
Normal file
@ -0,0 +1,12 @@
|
||||
;
|
||||
; Oliver Schmidt, 31.03.2005
|
||||
;
|
||||
; sectnum_t __fastcall__ dio_query_sectcount(dhandle_t handle);
|
||||
;
|
||||
|
||||
.export _dio_query_sectcount
|
||||
|
||||
_dio_query_sectcount:
|
||||
lda #<280
|
||||
ldx #>280
|
||||
rts
|
12
libsrc/apple2/diosectsize.s
Normal file
12
libsrc/apple2/diosectsize.s
Normal file
@ -0,0 +1,12 @@
|
||||
;
|
||||
; Oliver Schmidt, 31.03.2005
|
||||
;
|
||||
; sectsize_t __fastcall__ dio_query_sectsize(dhandle_t handle);
|
||||
;
|
||||
|
||||
.export _dio_query_sectsize
|
||||
|
||||
_dio_query_sectsize:
|
||||
lda #<512
|
||||
ldx #>512
|
||||
rts
|
@ -49,12 +49,20 @@ OBJS= _scrsize.o \
|
||||
crt0.o \
|
||||
ctype.o \
|
||||
cvline.o \
|
||||
dioclose.o \
|
||||
diocommon.o \
|
||||
dioopen.o \
|
||||
dioread.o \
|
||||
diosectcount.o \
|
||||
diosectsize.o \
|
||||
diowrite.o \
|
||||
dosdetect.o \
|
||||
get_ostype.o \
|
||||
getenv.o \
|
||||
joy_stddrv.o \
|
||||
kbhit.o \
|
||||
mainargs.o \
|
||||
mli.o \
|
||||
oserrlist.o \
|
||||
randomize.o \
|
||||
rcout.o \
|
||||
|
Loading…
Reference in New Issue
Block a user