This is LocationCounters.txt in view mode; [Download] [Up]
DSP ASSEMBLY LOCATION COUNTERS
The memory allocation macros described above use the following
corresponding location-counter assembly variables (listed along with
their actual initialization by DSPMACSRC/alloc.asm). (The capitalized
address-boundary macros appear in DSPMACSRC/addresses.asm.)
pi_lc set PLI_USR ; p internal memory is allocated UP from bottom
pe_lc set PLE_USR ; p external memory is allocated UP from bottom
xi_lc set XLI_USR ; x internal memory is allocated UP from bottom
xe_lc set XLE_USR ; x external memory is allocated UP from bottom
yi_lc set YLI_USR ; y internal memory is allocated UP from bottom
ye_lc set YLE_USR ; y external memory is allocated UP from bottom
li_lc set XHI_USR ; l internal memory is allocated DOWN from top
if ONE_MEM==0 ; l external memory does not exist if ONE_MEM==1
le_lc set XHE_USR ; l external memory is allocated DOWN from top
else
le_lc set 'BAD_' ; l external memory is allocated DOWN if it exists
endif
Note that when external memory is shared (ONE_MEM==1), new_xeb and
new_yeb allocate against the same memory. In other words, pe_lc,
xe_lc, and ye_lc are all names for a single location counter. In this
mode, long allocations (xy memory) are disallowed.
Each allocation LC is saved in the global assembly variables above so
that the user is free to use the LC's provided by the dsp assembler
(pl:, p:, ph:, xl:, etc.) for other purposes. The "low" and "high"
LC's (e.g. xl:, yh:) are used internally by the allocation macros, but
this is hidden from the user by saving and restoring the LC value.
The user can reset the allocation pointers using the SET directive as
shown above in the case of initialization.
"Overlays" are not supported; that is, the Runtime and Load LC are the
same.
(!!! Problems with current allocation macros:
- Can't deallocate
- Constrained tables (for modulo addressing) are wasteful
Fully general allocation macros will be simple once the yacc version
of dspwrap exists.)
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.