mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-11-19 18:31:43 +00:00
28e119afb1
Static initialization of arrays/structs/unions now essentially "executes" the initializer records to fill in a buffer (and keep track of relocations), then emits pcode to represent that initialized state. This supports overlapping and out-of-order initializer records, as can be produced by designated initialization.
41 lines
958 B
NASM
41 lines
958 B
NASM
mcopy symbol.macros
|
|
****************************************************************
|
|
*
|
|
* ClearTable - set the symbol table to zeros
|
|
*
|
|
* Inputs:
|
|
* table - symbol table address
|
|
*
|
|
****************************************************************
|
|
*
|
|
ClearTable private cc
|
|
tableSize equ 7026 sizeof(symbolTable)
|
|
|
|
subroutine (4:table),0
|
|
|
|
ldy #tableSize-2
|
|
lda #0
|
|
lb1 sta [table],Y
|
|
dey
|
|
dey
|
|
bpl lb1
|
|
|
|
return
|
|
end
|
|
|
|
****************************************************************
|
|
*
|
|
* SaveBF - save a value to a bit-field
|
|
*
|
|
* Inputs:
|
|
* addr - address to copy to
|
|
* bitdisp - displacement past the address
|
|
* bitsize - number of bits
|
|
* val - value to copy
|
|
*
|
|
****************************************************************
|
|
*
|
|
SaveBF private cc
|
|
jml ~SaveBF call ~SaveBF in ORCALib
|
|
end
|