ORCA-C/Symbol.asm
Stephen Heumann 28e119afb1 Rework static initialization to support new-style initializer records.
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.
2022-12-02 21:55:57 -06:00

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