| Example: |
.ORG 0x0F00
StackUsageExample:
CALL ADumpStack ; Display before we do anything
CALL AStackAlloc50 ; The buffer pointer is returned in R31:R30
CALL ADumpStack
MOVW R24, R30 ; R25:R24 receives the buffer address
LDI R22, '0' ; R22 is the value to write to the range
LDI R21, 0 ; R21:R20 specifies the number of bytes to
LDI R20, 50 ; be set to the value in R22
CALL Ameminit ; Initialize the block of memory
CALL ADumpStack
CALL AStackFree50 ; Release the temporary stack-based buffer
CALL ADumpStack ; Display the last time before returning
RET |