SENTRY - enter B function, with stack advance.

Usage:

sentry (symdefs)[,endptr][,(options)]

Examples:

sentry (printf,.prntf),,ARB
sentry (getcha,get.ch),end,INHIB
sentry .write

Where:

symdefs
is a list of entry point names for the GMAP function. They must be valid GMAP symbols. If only one name is given, it need not be enclosed in parentheses.
endptr
should be a pointer to the end of the function. If it is omitted, it will be set to the label "end" which must be defined using the BEND macro.
options
is a list of keywords used to indicate different options in the entry sequence. If more than one option is desired, the list should be enclosed in parentheses. Currently three options are defined:

Description:

This is a standard method of starting a B function. When the GMAP subroutine is entered, the stack will be advanced and the first two arguments will still be in the A and Q registers. Space for arguments should be reserved using the ARGDEF macro. If an arbitrary number of arguments are expected, the ARB option should be used, in which case the entry to the program will receive a pointer to the list of arguments in the A register.

The use of the INHIB option will cause the run-time library to hold any breaks in abeyance until this routine completes execution.

Approximate equivalent code generated:

*      sentry  myfunc
       symdef  myfunc
myfunc tra     *+1
       tsx0    .entry
       zero    .frame,end
       symref  .retrn,.entry
*      sentry  printf,,arb
       symdef  printf
printf tra     *+1
       tsx0    .vntry
       zero    .frame,end
       symref  .retrn,.vntry

See Also:

expl b bmac argdef
for defining arguments.
expl b bmac auto
for defining local storage.
expl b bmac bretrn
for function return.
expl b bmac advnce
advance stack only.
expl b bmac bentry
simplified function entry.

Copyright © 1996, Thinkage Ltd.