2003-02-01 12:22:09 +00:00
|
|
|
;
|
|
|
|
; _heap.inc
|
|
|
|
;
|
2005-02-14 09:39:46 +00:00
|
|
|
; (c) Copyright 2003, Ullrich von Bassewitz (uz@cc65.org)
|
2003-02-01 12:22:09 +00:00
|
|
|
;
|
|
|
|
|
|
|
|
; Assembler include file that makes the constants and structures in _heap.h
|
|
|
|
; available for asm code.
|
|
|
|
|
2003-12-03 10:15:33 +00:00
|
|
|
; Struct freeblock
|
|
|
|
; NOTE: For performance reasons, the asm code often uses increment/decrement
|
|
|
|
; operators to access other offsets, so just changing offsets here will
|
|
|
|
; probably not work.
|
|
|
|
.struct freeblock
|
|
|
|
size .word
|
2004-12-19 23:09:38 +00:00
|
|
|
next .addr
|
|
|
|
prev .addr
|
|
|
|
.endstruct
|
|
|
|
|
|
|
|
; Struct usedblock
|
|
|
|
; See notes above
|
|
|
|
.struct usedblock
|
|
|
|
size .word
|
|
|
|
start .addr
|
2003-12-03 10:15:33 +00:00
|
|
|
.endstruct
|
2003-02-01 12:22:09 +00:00
|
|
|
|
2003-12-03 10:15:33 +00:00
|
|
|
HEAP_MIN_BLOCKSIZE = .sizeof (freeblock) ; Minimum size of an allocated block
|
2005-02-14 09:39:46 +00:00
|
|
|
HEAP_ADMIN_SPACE = .sizeof (usedblock) ; Additional space for used bock
|
2003-02-01 12:22:09 +00:00
|
|
|
|
|
|
|
; Variables
|
2022-08-29 17:55:48 +00:00
|
|
|
.global ___heaporg
|
|
|
|
.global ___heapptr
|
|
|
|
.global ___heapend
|
|
|
|
.global ___heapfirst
|
|
|
|
.global ___heaplast
|