On 31 Oct 2006 at 14:58, Warren Wolfe wrote:
In a macro assembly language module, with
"PUSH" and "POP" that
worked on a data stack, and "CALL" and "RETURN" which worked on a
program stack. Didn't say it was earth-shaking... just handy as all
get-out.
Ah, okay, now I get it. 6000 COMPASS did have a very powerful macro
capability. It was usually the case when building any of the
standard product set, that most of the build time was spent crunching
through macro (or micro) sequences.
I worked on a project to translate COBOL dialects. I took the
approach of designing a lexical processor and its instruction set,
then implemented the whole thing as COMPASS macros, first intrepreted
(to debug) by a small routine, then implemented as machine-language
instruction sequences.
So, one could have instructions such as:
IQTF T_COMMA,NEXT,SYNTAX_ERR
which was "query if the current input token is a comma ; if true,
call the get-next-token routine, otherwise, jump to the syntax-error
routine.
Cheers,
Chuck