]> cloudbase.mooo.com Git - avrcpm.git/blobdiff - avr/dsk_cpm.asm
* Z80/8080 registers BC, DE, HL moved from RAM to AVR CPU registers. 'temp4' removed.
[avrcpm.git] / avr / dsk_cpm.asm
index 0999b7928989e1b61cd2af1810d6b3b837ad293d..0e7b27470f1ae997113dd7380a41048786c103b4 100644 (file)
@@ -60,38 +60,39 @@ cpm_hostparam:
 
        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
        
@@ -106,23 +107,22 @@ cpm_hp1:
 
        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