lds temp,hostlba ; get sector to access
lds temp2,hostlba+1
-; lds temp3,hostlba+2
.if HOSTRW_DEBUG
printstring "lba: "
- clr temp4
+ push r15
+ push r14
+ clr r14
+ clr r15
lcall print_ultoa
+ pop r14
+ pop r15
.endif
ldd xl,z+5 ; get disksize
ldd xh,z+6
-; ldd yl,z+7
cp temp,xl ; check given sector against disksize
cpc temp2,xh
-; cpc temp3,yl
brcs cpm_hp1
.if HOSTRW_DEBUG
printstring ", max: "
- push temp4
- push temp3
+ push r15
+ push r14
push temp2
push temp
movw temp,x
-; mov temp3,yl
- clr temp3
- clr temp4
+ clr r14
+ clr r15
lcall print_ultoa
pop temp
pop temp2
- pop temp3
- pop temp4
+ pop r14
+ pop r15
printstring " "
.endif
add xl,temp ; add offset to startsector
adc xh,temp2
-; adc yl,temp3
adc yl,_0
adc yh,_0
.if HOSTRW_DEBUG
printstring ", abs:"
- push temp4
- push temp3
+ push r15
+ push r14
push temp2
push temp
movw temp,x
- movw temp3,y
+ movw r14,y
lcall print_ultoa
pop temp
pop temp2
- pop temp3
- pop temp4
+ pop r14
+ pop r15
printstring " "
.endif