Specifications
8-6 Programmer’s Guide Sega
Psy-Q Development System
g_short group word
g_code group
g_bss group bss
section short1,g_short
section short2,g_short
section shortcode,g_short
section code,g_code
section bss,g_bss
firstbss equ *
PUSHS and POPS
Description These directives allow the programmer to open a new, temporary section, then return
to the original section. PUSHS saves the current section, POPS restores it.
Syntax PUSHS
POPS
Examples plotcomp move.w d0,-(sp)
move.w d2,-(sp)
bsr.s pcomp
move.w (sp)+,d2
move.w (sp)+,d0
addq.w #1,d2
...
passdl equ *
pushs
section dolight
dc.l passdl
lea nrg_len(a2),a2
cmp.w #endnrg,a2
blo.s @1
...
pops
This example shows PUSHS and POPS being used to pass system information
between sections, in the form of the location counter.