[comp.lang.modula2] "Code" keyword Zuerich Single Pass Compiler

agnew@trwrc.UUCP (Robert A. Agnew) (02/21/89)

Is there anyone out there who knows the semantic usage of the "code"
procedure in the Zuerich NS32000 single pass compiler? This syntax is 
defined in the scant source code documentation as

PROCEDURE procname '(' parameterlist ')' CODE n ';'

The ostensible use of this clumsy construction is to generate a SVC
(superisor call) to the OS with a SVC number of n. The keyword CODE 
does not apperar in any of the source for the compiler. The compiler does not
allow the use of inline assembler code. Wirth offers this construction as
compensation for the ommision of inline code. It is not clear to me why these
"code" procedures should have unique names as they all apparently just generate
a "SVC n" instruction. It is even less clear as to why the arguments are not
typed more explicitly in the documentation. The compiler balks at all but a
few definitions for the parameter list. It appears that it would be better to
implement a SVC procedure in assembler and eliminate the superfluous keyword.
Any ideas? 

	Thanks -- Bob Agnew		agnew@trwrc.rc.trw.com