1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-19 06:31:31 +00:00
cc65/libsrc/geos-cbm/disk/dio_params.s
uz e6d74e7205 Renamed the old geos target to geos-cbm.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5343 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-28 17:11:21 +00:00

52 lines
824 B
ArmAsm

;
; Maciej 'YTM/Elysium' Witkowiak
; 2.7.2001
;
; this function is used by dio_read and dio_write to fix parameters (secnum)
; this function calls SetDevice so that more than one drive can be used at once
.import popax,pushax,_dio_log_to_phys
.importzp ptr1
.export dio_params,dio_secnum
.include "../inc/geossym.inc"
.include "../inc/jumptab.inc"
.include "../inc/dio.inc"
.bss
dio_secnum: .res 2
.code
.proc dio_params
sta r4L
stx r4H
jsr popax
sta dio_secnum
stx dio_secnum
jsr popax ; get 3rd parameter
pha ; save it
txa
pha
jsr pushax ; put it back
pla ; restore it
sta ptr1+1
pla
sta ptr1
ldy #sst_driveno
lda (ptr1),y
clc
adc #8
jsr SetDevice ; setup device, load driver
lda #<dio_secnum
ldx #>dio_secnum
jsr pushax
lda #<r1L
ldx #>r1H
jmp _dio_log_to_phys
.endproc