* This subroutine clears an area of memory.
* Push the address onto the stack, then the
* length (2 bytes), then call this routine.
clearMem equ *
pshs x,d
ldx 8,s address
ldd 6,s length
beq clearMem_Done
clearMem_Loop equ *
clr ,x+
subd #1
bne clearMem_Loop
clearMem_Done equ *
puls x,d,pc
end
|