1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-07 19:29:18 +00:00
cc65/libsrc/atari/dio_cts.s
cpg e9e7fd4d31 adapted to new parameters
git-svn-id: svn://svn.cc65.org/cc65/trunk@381 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-10-18 23:47:42 +00:00

52 lines
909 B
ArmAsm

;
; Christian Groessler, October 2000
;
; this file provides the _dio_chs_to_snum function
;
; on the Atari this function is a dummy, it ignores
; cylinder and head 0 and returns as sector number the
; sector number it got
;
; _sectnum_t __fastcall__ _dio_chs_to_snum(_dhandle_t handle,
; unsigned int cyl,
; unsigned int head,
; unsigned int sector);
; _dhandle_t - 16bit (ptr)
; _sectnum_t - 16bit
;
.export __dio_chs_to_snum
.import addsp4,popax
.importzp ptr1
.include "atari.inc"
.proc __dio_chs_to_snum
pha ; save sector value
txa
pha
jsr addsp4 ; ignore other parameters
jsr popax
sta ptr1
stx ptr1+1
ldy #sst_flag
lda (ptr1),y
and #128
beq _inv_hand ; handle not open or invalid
pla
tay
pla
rts
_inv_hand:
pla
pla
ldx #255
txa
rts
.endproc