avr: added clobbered regs to calls.
This commit is contained in:
@@ -26,13 +26,16 @@ FLASH_BEGIN:
|
|||||||
;
|
;
|
||||||
; IN:
|
; IN:
|
||||||
; - Z: Address to work on (byte address as for LPM!)
|
; - Z: Address to work on (byte address as for LPM!)
|
||||||
|
; OUT:
|
||||||
|
; - nothing
|
||||||
|
; REGS: R16 (R0, R1, R15, R16, R20, R24, R25)
|
||||||
|
|
||||||
Flash_StartPage:
|
Flash_StartPage:
|
||||||
push zh
|
push zh
|
||||||
push zl
|
push zl
|
||||||
ldi r16, ((PAGESIZE*2)-1)
|
ldi r16, ((PAGESIZE*2)-1)
|
||||||
and zl, r16
|
and zl, r16
|
||||||
rcall Flash_ReadPageIntoPageBuffer
|
rcall Flash_ReadPageIntoPageBuffer ; (R0, R1, R15, R16, R20, R24, R25, Z)
|
||||||
pop zl
|
pop zl
|
||||||
pop zh
|
pop zh
|
||||||
ret
|
ret
|
||||||
@@ -44,12 +47,15 @@ Flash_StartPage:
|
|||||||
;
|
;
|
||||||
; IN:
|
; IN:
|
||||||
; - Z: Address to work on (byte address as for LPM!)
|
; - Z: Address to work on (byte address as for LPM!)
|
||||||
|
; OUT:
|
||||||
|
; - nothing
|
||||||
|
; REGS: R16 (R15, R20)
|
||||||
|
|
||||||
Flash_FinishPage:
|
Flash_FinishPage:
|
||||||
ldi r16, ((PAGESIZE*2)-1)
|
ldi r16, ((PAGESIZE*2)-1)
|
||||||
and zl, r16
|
and zl, r16
|
||||||
rcall Flash_ErasePage
|
rcall Flash_ErasePage ; (R15, R16, R20)
|
||||||
rcall Flash_WritePage
|
rcall Flash_WritePage ; (R15, R16, R20)
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
@@ -62,7 +68,7 @@ Flash_FinishPage:
|
|||||||
; - Z: Address to read from (byte address as for LPM!)
|
; - Z: Address to read from (byte address as for LPM!)
|
||||||
; OUT:
|
; OUT:
|
||||||
; - nothing
|
; - nothing
|
||||||
; MODIFIED REGISTERS: R0, R1, R15, R16, R20, R24, R25, Z
|
; REGS: R0, R1, R15, R16, R20, R24, R25, Z
|
||||||
|
|
||||||
Flash_ReadPageIntoPageBuffer:
|
Flash_ReadPageIntoPageBuffer:
|
||||||
in r15, SREG
|
in r15, SREG
|
||||||
@@ -117,7 +123,7 @@ Flash_WriteIntoPage:
|
|||||||
; - Z: Address of the page to erase.
|
; - Z: Address of the page to erase.
|
||||||
; OUT:
|
; OUT:
|
||||||
; - nothing
|
; - nothing
|
||||||
; MODIFIED REGISTERS: R0, R1, R15, R16, R18, R19, R20
|
; REGS: R15, R20 (R16)
|
||||||
|
|
||||||
Flash_ErasePage:
|
Flash_ErasePage:
|
||||||
in r15, SREG
|
in r15, SREG
|
||||||
@@ -137,7 +143,7 @@ Flash_ErasePage:
|
|||||||
; - Z: Address of the page to erase.
|
; - Z: Address of the page to erase.
|
||||||
; OUT:
|
; OUT:
|
||||||
; - nothing
|
; - nothing
|
||||||
; MODIFIED REGISTERS: R0, R1, R15, R16, R18, R19, R20
|
; REGS: R15, R20 (R16)
|
||||||
|
|
||||||
Flash_WritePage:
|
Flash_WritePage:
|
||||||
in r15, SREG
|
in r15, SREG
|
||||||
|
|||||||
Reference in New Issue
Block a user