mirror of
https://github.com/cc65/cc65.git
synced 2025-02-02 00:35:32 +00:00
adapted to new parameters
git-svn-id: svn://svn.cc65.org/cc65/trunk@381 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
5747fcd976
commit
e9e7fd4d31
@ -7,14 +7,17 @@
|
|||||||
; cylinder and head 0 and returns as sector number the
|
; cylinder and head 0 and returns as sector number the
|
||||||
; sector number it got
|
; sector number it got
|
||||||
;
|
;
|
||||||
; _sectnum_t __fastcall__ _dio_chs_to_snum(unsigned int cyl, unsigned int head, unsigned int sector);
|
; _sectnum_t __fastcall__ _dio_chs_to_snum(_dhandle_t handle,
|
||||||
;
|
; unsigned int cyl,
|
||||||
; _driveid_t - 8bit
|
; unsigned int head,
|
||||||
|
; unsigned int sector);
|
||||||
|
; _dhandle_t - 16bit (ptr)
|
||||||
; _sectnum_t - 16bit
|
; _sectnum_t - 16bit
|
||||||
;
|
;
|
||||||
|
|
||||||
.export __dio_chs_to_snum
|
.export __dio_chs_to_snum
|
||||||
.import addsp4
|
.import addsp4,popax
|
||||||
|
.importzp ptr1
|
||||||
.include "atari.inc"
|
.include "atari.inc"
|
||||||
|
|
||||||
.proc __dio_chs_to_snum
|
.proc __dio_chs_to_snum
|
||||||
@ -23,10 +26,26 @@
|
|||||||
txa
|
txa
|
||||||
pha
|
pha
|
||||||
jsr addsp4 ; ignore other parameters
|
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
|
pla
|
||||||
tay
|
tay
|
||||||
pla
|
pla
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
_inv_hand:
|
||||||
|
pla
|
||||||
|
pla
|
||||||
|
ldx #255
|
||||||
|
txa
|
||||||
|
rts
|
||||||
|
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
|
@ -6,17 +6,19 @@
|
|||||||
; on the Atari this function is a dummy, it returns
|
; on the Atari this function is a dummy, it returns
|
||||||
; cylinder and head 0 and as sector the sectnum it got
|
; cylinder and head 0 and as sector the sectnum it got
|
||||||
;
|
;
|
||||||
; void __fastcall__ _dio_snum_to_chs(_sectnum_t sect_num,
|
; void __fastcall__ _dio_snum_to_chs(_dhandle_t handle,
|
||||||
|
; _sectnum_t sect_num,
|
||||||
; unsigned int *cyl,
|
; unsigned int *cyl,
|
||||||
; unsigned int *head,
|
; unsigned int *head,
|
||||||
; unsigned int *sector);
|
; unsigned int *sector);
|
||||||
|
; _dhandle_t - 16bit (ptr)
|
||||||
; _sectnum_t - 16bit
|
; _sectnum_t - 16bit
|
||||||
;
|
;
|
||||||
|
|
||||||
.export __dio_snum_to_chs
|
.export __dio_snum_to_chs
|
||||||
.include "atari.inc"
|
.include "atari.inc"
|
||||||
.importzp ptr1,ptr2
|
.importzp ptr1,ptr2
|
||||||
.import popax
|
.import popax,addsp2
|
||||||
|
|
||||||
.proc __dio_snum_to_chs
|
.proc __dio_snum_to_chs
|
||||||
|
|
||||||
@ -46,6 +48,8 @@
|
|||||||
txa
|
txa
|
||||||
sta (ptr1),y
|
sta (ptr1),y
|
||||||
|
|
||||||
|
jsr addsp2
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.endproc
|
.endproc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user