pop r14
pop r15
ret
-.endif
+.endif
; Init heap
printnewline
printstring "Heap init: Start: "
rjmp hp_dbg1
-.endif
+.endif
heap_release:
.if HEAP_DEBUG
printnewline
printstring "Heap release: Start: "
hp_dbg1:
-.endif
+.endif
sts hp_top,temp
sts hp_top+1,temp2
.if HEAP_DEBUG
rcall printhexw
rcall hp_print_free
-.endif
+.endif
ret
; Get memory block from heap.
clr r15
rcall print_ultoa
pop temp
- pop temp2
-.endif
+ pop temp2
+.endif
lds r14,hp_top
lds r15,hp_top+1
add temp,r14
adc temp2,r15
brcs hp_full
-
+
; zero flag clear here
sts hp_top,temp
; vim:set ts=8 noet nowrap
-