1
0
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:
cuz 2005-03-31 07:24:01 +00:00
parent 73d32060ca
commit e3df1fea4a
5 changed files with 44 additions and 6 deletions

View File

@ -53,6 +53,8 @@ OBJS= _scrsize.o \
diocommon.o \ diocommon.o \
dioopen.o \ dioopen.o \
dioread.o \ dioread.o \
diosectcount.o \
diosectsize.o \
diowrite.o \ diowrite.o \
dosdetect.o \ dosdetect.o \
get_ostype.o \ get_ostype.o \

View File

@ -6,7 +6,7 @@
; drive_id = (slot * 2) + (drive - 1) ; drive_id = (slot * 2) + (drive - 1)
.export _dio_open .export _dio_open
.import decaxy, return0 .import return0
.include "zeropage.inc" .include "zeropage.inc"
.include "errno.inc" .include "errno.inc"
@ -21,15 +21,19 @@ _dio_open:
asl asl
asl asl
asl asl
tay ; Save handle
; Set handle
sta mliparam + MLI::ON_LINE::UNIT_NUM sta mliparam + MLI::ON_LINE::UNIT_NUM
; Alloc 16-byte buffer just below stack ; Alloc 16-byte buffer just below stack
ldy #16
lda sp lda sp
ldx sp+1 sec
jsr decaxy sbc #16
sta mliparam + MLI::ON_LINE::DATA_BUFFER 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 ; Get device state
lda #ON_LINE_CALL lda #ON_LINE_CALL
@ -43,7 +47,7 @@ _dio_open:
bcc oserr bcc oserr
; Return success ; Return success
: lda mliparam + MLI::ON_LINE::UNIT_NUM : tya ; Restore handle
ldx #$00 ldx #$00
stx __oserror stx __oserror
rts rts

View 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

View 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

View File

@ -49,12 +49,20 @@ OBJS= _scrsize.o \
crt0.o \ crt0.o \
ctype.o \ ctype.o \
cvline.o \ cvline.o \
dioclose.o \
diocommon.o \
dioopen.o \
dioread.o \
diosectcount.o \
diosectsize.o \
diowrite.o \
dosdetect.o \ dosdetect.o \
get_ostype.o \ get_ostype.o \
getenv.o \ getenv.o \
joy_stddrv.o \ joy_stddrv.o \
kbhit.o \ kbhit.o \
mainargs.o \ mainargs.o \
mli.o \
oserrlist.o \ oserrlist.o \
randomize.o \ randomize.o \
rcout.o \ rcout.o \