Use structs

git-svn-id: svn://svn.cc65.org/cc65/trunk@2707 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2003-12-03 10:15:33 +00:00
parent 92a001d3af
commit c15fd58d3b
15 changed files with 64 additions and 60 deletions

View File

@@ -7,10 +7,11 @@
; Assembler include file that makes the constants and structures in _file.h
; available for asm code.
; Struct _FILE offsets and size
_FILE_f_fd = $00
_FILE_f_flags = $01
_FILE_size = $02
; Struct _FILE
.struct _FILE
f_fd .byte
f_flags .byte
.endstruct
; Flags field
_FCLOSED = $00

View File

@@ -7,15 +7,18 @@
; Assembler include file that makes the constants and structures in _heap.h
; available for asm code.
HEAP_ADMIN_SPACE = 2
HEAP_MIN_BLOCKSIZE = 6 ; Minimum size of an allocated block
; 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
next .word
prev .word
.endstruct
; Struct freeblock offsets and size. 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.
freeblock_size = 0
freeblock_next = 2
freeblock_prev = 4
HEAP_ADMIN_SPACE = 2
HEAP_MIN_BLOCKSIZE = .sizeof (freeblock) ; Minimum size of an allocated block
; Variables
.global __heaporg