;
	%INCLUDE 'PROLOG.NSM' 
;; --== NASM vers. 10-Jan-10 ==--
	  [SECTION .cseg]
;/** File: C86NC5C .C  testing INCLUDE C5LIBT.C         **/ 
;/** Last: 06-Feb-10 08:32:39 AM                        **/ 
;/** Prev: 01-Feb-10 06:15:12 PM, 01-Feb-10 11:09:00 PM **/ 
;/** Base: 11-Jan-10 05:44:51 AM                        **/ 
;/** Vers: 0.0.1 r6  10-Jan-2010 version.               **/ 
;/** Note: chg'd ot("], ..") to outasm("], ..") to x the**/ 
;/** leading tab to ']' for the output. Added nl() to   **/ 
;/** the frame label at the end of a fn.                **/ 
;/** ref. test code C86SELF.C, testing INCLUDE C5LIBT.C **/ 
;/** chgd emits str lits as DB decimal digits to emit as**/ 
;/** DB 'lits strings', removed 'outbyte(12);' from     **/ 
;/** ask() as it doesn't clear the screen.              **/ 
;/**----------------------------------------------------**/ 
;/** C86NC5C .C  By: s_dubrovich@yahoo.com              **/ 
;/** Last: 11-Jan-10 05:44:51 AM                        **/ 
;/** Prev: 09/11/04 08:18:33 PM, 09/11/04 10:14:42 PM   **/ 
;/** Init: 10-Jan-10 10:04:01 PM                        **/ 
;/** Vers: 0.0.1 r1                                     **/ 
;/** Note: This branch uses lval[3], array of 3         **/ 
;/** Chg eol, Chg include to nasm form #include ""      **/ 
;/** Chg dumpglbs() for TIMES, chg col->colon();        **/ 
;/** 11-Jan-10 05:44:51 AM ..Incr macqsize->2176        **/ 
;/**----------------------------------------------------**/ 
;/** This version for NASM is codeset 3. It uses C5LIBT **/ 
;/** which is a minor varient of C5LIB.C, and this ver- **/ 
;/** sion adds stubs for prolog and epilog code for     **/ 
;/** inclusion, to allow easier versioning for .com,    **/ 
;/** .exe or CP/M-86 .cmd, or others.  These %INCLUDE's **/ 
;/** can be commented out, depending on your intent.    **/ 
;/** NCC.C Vers. c0.1.5 is codeset 1.                   **/ 
;/** NCCR1.C Vers. 0.2.6 is codeset 2.                  **/ 
;/** C86NC5C.C Vers 0.0.1 r1 is codeset 3.              **/ 
;/**----------------------------------------------------**/ 
;/** The main chg in C86N is expansion of lval[] from 2 **/ 
;/** elements to three, and the dumping of auto's at the**/ 
;/** end of each function as comments for the programmer**/ 
;/** and the delineation of code and data as separate.  **/ 
;/** C86N is the version of Cain's Small-c for CP/M-86  **/ 
;/** With code and data separate, now memory models of  **/ 
;/** other than .com can be utilized.                   **/ 
;/** C86NC5C.C is my NASMication of the C86N port with  **/ 
;/** the C5LIB Call 5 I/O Library.  C5LIB is a minimal  **/ 
;/** set of functions.  86Dos implements CP/M-80        **/ 
;/** functionality thru the Call 5 Interface, available **/ 
;/** still in XP's cmd.exe, for example.                **/ 
;/********************************************************/ 
;/*							*/ 
;/*		small-c compiler			*/ 
;/*							*/ 
;/*		  by Ron Cain				*/ 
;/*							*/ 
;/********************************************************/ 
; 
;#define BANNER  "* * *  Small-C  V1.1  * * *" 
; 
;#define VERSION "Based on Version N: July 17, 1980" 
; 
;#define AUTHOR "       By Ron Cain" 
; 
;/*	Define system dependent parameters	*/ 
; 
;/*	Stand-alone definitions			*/ 
;#define NULL 0 
;/** #define eol 13 **/ 
;#define eol 10	/** this is correct **/ 
; 
;/*	UNIX definitions (if not stand-alone)	*/ 
;/* #include 	*/ 
;/* #define eol 10	*/ 
; 
;/*	Define the symbol table parameters	*/ 
;#define	symsiz	14 
;#define	symtbsz	5040 
;#define numglbs 300 
;#define	startglb symtab 
;#define	endglb	startglb+numglbs*symsiz 
;#define	startloc endglb+symsiz 
;#define	endloc	symtab+symtbsz-symsiz 
; 
;/*	Define symbol table entry format	*/ 
;#define	name	0 
;#define	ident	9 
;#define	type	10 
;#define	storage	11 
;#define	offset	12 
; 
;/*	System wide name size (for symbols)	*/ 
;#define	namesize 9 
;#define namemax  8 
; 
;/*	Define possible entries for "ident"	*/ 
;#define	variable 1 
;#define	array	2 
;#define	pointer	3 
;#define	function 4 
; 
;/*	Define possible entries for "type"	*/ 
;#define	cchar	1 
;#define	cint	2 
; 
;/*	Define possible entries for "storage"	*/ 
;#define	statik	1 
;#define	stkloc	2 
; 
;/*	Define the "while" statement queue	*/ 
;#define	wqtabsz	100 
;#define	wqsiz	5 
;#define	wqmax	wq+wqtabsz-wqsiz 
; 
;/*	Define entry offsets in while queue	*/ 
;#define	wqsym	0 
;#define	wqsp	1 
;#define	wqloop	2 
;#define	wqlab	3 
;#define	wqlab2	4 
; 
;/*	Define the literal pool			*/ 
;#define	litabsz	1000 
;#define	litmax	litabsz-1 
; 
;/*	Define the input line			*/ 
;#define	linesize 80 
;#define	linemax	linesize-1 
;#define	mpmax	linemax 
; 
;/*	Define the macro (define) pool		*/ 
;#define	macqsize 2176  /** was 1000 **/ 
;#define	macmax	macqsize-1 
; 
;/*	Define statement types (tokens)		*/ 
;#define	stif	1 
;#define	stwhile	2 
;#define	streturn 3 
;#define	stbreak	4 
;#define	stcont	5 
;#define	stasm	6 
;#define	stexp	7 
; 
;/* Define how to carve up a name too long for the assembler */ 
;#define asmpref	7 
;#define asmsuff	7 
; 
; 
;/*	Now reserve some storage words		*/ 
;char	symtab[symtbsz];	/* symbol table */ 
;char	*glbptr,*locptr;	/* ptrs to next entries */ 
; 
;int	wq[wqtabsz];		/* while queue */ 
;int	*wqptr;			/* ptr to next entry */ 
; 
;char	litq[litabsz];		/* literal pool */ 
;int	litptr;			/* ptr to next entry */ 
; 
;char	macq[macqsize];		/* macro string buffer */ 
;int	macptr;			/* and its index */ 
; 
;char	line[linesize];		/* parsing buffer */ 
;char	mline[linesize];	/* temp macro buffer */ 
;int	lptr,mptr;		/* ptrs into each */ 
; 
;/*	Misc storage	*/ 
;int	nxtlab,		/* next avail label # */ 
;	litlab,		/* label # assigned to literal pool */ 
;	Msp,		/* Maximum relative stk ptr */ 
;	Zsp,		/* compiler relative stk ptr */ 
;	argstk,		/* function arg sp */ 
;	ncmp,		/* # open compound statements */ 
;	errcnt,		/* # errors in compilation */ 
;	errstop,	/* stop on error			gtf 7/17/80 */ 
;	eof,		/* set non-zero on final input eof */ 
;	input,		/* iob # for input file */ 
;	output,		/* iob # for output file (if any) */ 
;	input2,		/* iob # for "include" file */ 
;	glbflag,	/* non-zero if internal globals */ 
;	ctext,		/* non-zero to intermix c-source */ 
;	cmode,		/* non-zero while parsing c-code */ 
;			/* zero when passing assembly code */ 
;	lastst,		/* last executed statement type */ 
;	mainflg,	/* output is to be first asm file	gtf 4/9/80 */ 
;	saveout,	/* holds output ptr when diverted to console	   */ 
;			/*					gtf 7/16/80 */ 
;	fnstart,	/* line# of start of current fn.	gtf 7/2/80 */ 
;	lineno,		/* line# in current file		gtf 7/2/80 */ 
;	infunc,		/* "inside function" flag		gtf 7/2/80 */ 
;	savestart,	/* copy of fnstart "	"		gtf 7/16/80 */ 
;	saveline,	/* copy of lineno  "	"		gtf 7/16/80 */ 
;	saveinfn;	/* copy of infunc  "	"		gtf 7/16/80 */ 
; 
;char   *currfn,		/* ptr to symtab entry for current fn.	gtf 7/17/80 */ 
;       *savecurr;	/* copy of currfn for #include		gtf 7/17/80 */ 
;char	quote[2];	/* literal string for '"' */ 
;char	*cptr;		/* work ptr to any char buffer */ 
;int	*iptr;		/* work ptr to any int buffer */ 
; 
;/*	>>>>> start cc0 <<<<<<		*/ 
; 
;/*						*/ 
;/*	Compiler begins execution here		*/ 
;/*						*/ 
;main() 
czmain:
	PUSH BP
	SUB  SP, AutoC1
	MOV  BP, SP

;	{ 
;	glbptr=startglb;	/* clear global symbols */ 
	MOV  BX, czsymtab
	MOV  Word [czglbptr], BX
;	locptr=startloc;	/* clear local symbols */ 
	MOV  BX, czsymtab
	PUSH BX
	MOV  BX, +300
	PUSH BX
	MOV  BX, +14
	POP  DX
	MOV  AX, BX
	PUSH DX
	MUL  DX
	POP  DX
	MOV  BX, AX
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +14
	POP  DX
	ADD  BX, DX
	MOV  Word [czlocptr], BX
;	wqptr=wq;		/* clear while queue */ 
	MOV  BX, czwq
	MOV  Word [czwqptr], BX
;	macptr=		/* clear the macro pool */ 
;	litptr=		/* clear literal pool */ 
;  	Msp =		/* stack ptr (maximum) */ 
;  	Zsp =		/* stack ptr (relative) */ 
;	errcnt=		/* no errors */ 
;	errstop=	/* keep going after an error		gtf 7/17/80 */ 
;	eof=		/* not eof yet */ 
;	input=		/* no input file */ 
;	input2=		/* or include file */ 
;	output=		/* no open units */ 
;	saveout=	/* no diverted output */ 
;	ncmp=		/* no open compound states */ 
;	lastst=		/* no last statement yet */ 
;	mainflg=	/* not first file to asm 		gtf 4/9/80 */ 
;	fnstart=	/* current "function" started at line 0 gtf 7/2/80 */ 
;	lineno=		/* no lines read from file		gtf 7/2/80 */ 
;	infunc=		/* not in function now			gtf 7/2/80 */ 
;	quote[1]= 
	MOV  BX, czquote
	PUSH BX
	MOV  BX, +1
	POP  DX
	ADD  BX, DX
	PUSH BX
;	0;		/*  ...all set to zero.... */ 
	MOV  BX, +0
	POP  DI
	MOV  Byte [DI], BL
	MOV  Word [czinfunc], BX
	MOV  Word [czlineno], BX
	MOV  Word [czfnstart], BX
	MOV  Word [czmainflg], BX
	MOV  Word [czlastst], BX
	MOV  Word [czncmp], BX
	MOV  Word [czsaveout], BX
	MOV  Word [czoutput], BX
	MOV  Word [czinput2], BX
	MOV  Word [czinput], BX
	MOV  Word [czeof], BX
	MOV  Word [czerrstop], BX
	MOV  Word [czerrcnt], BX
	MOV  Word [czZsp], BX
	MOV  Word [czMsp], BX
	MOV  Word [czlitptr], BX
	MOV  Word [czmacptr], BX
;	quote[0]='"';	/* fake a quote literal */ 
	MOV  BX, czquote
	PUSH BX
	MOV  BX, +0
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +34
	POP  DI
	MOV  Byte [DI], BL
;	currfn=NULL;	/* no function yet			gtf 7/2/80 */ 
	MOV  BX, +0
	MOV  Word [czcurrfn], BX
;	cmode=1;	/* enable preprocessing */ 
	MOV  BX, +1
	MOV  Word [czcmode], BX
; 
;/**--------------------------------------------**/ 
;/*** IO Init code before file use, in C5LIB.C ***/ 
;	initfcb();  
	CALL czinitfcb
;/**--------------------------------------------**/ 
;	/*				*/ 
;	/*	compiler body		*/ 
;	/*				*/ 
;	ask();			/* get user options */ 
	CALL czask
;	openout();		/* get an output file */ 
	CALL czopenout
;	openin();		/* and initial input file */ 
	CALL czopenin
;	header();		/* intro code */ 
	CALL czheader
;	parse(); 		/* process ALL input */ 
	CALL czparse
;	dumpglbs();		/* and all static memory */ 
	CALL czdumpglbs
;	trailer();		/* follow-up code */ 
	CALL cztrailer
;	closeout();		/* close the output (if any) */ 
	CALL czcloseout
;	errorsummary();	/* summarize errors (on console!) */ 
	CALL czerrorsummary
;/**	return;		** then exit to system */ 
;	exit(); /*** sjd 25-JUL-2008 ***/ 
	CALL czexit
;	} 
	POP  BP
	RET

AutoC1	EQU 0
; 
;/*					*/ 
;/*	Abort compilation		*/ 
;/*		gtf 7/17/80		*/ 
;abort() 
czabort:
	PUSH BP
	SUB  SP, AutoC2
	MOV  BP, SP

;{ 
;	if(input2) 
	MOV  BX, [Word czinput2]
	OR   BX, BX
	JNZ  $+5
	JMP  L_3
;		endinclude(); 
	CALL czendinclude
;	if(input) 
L_3:
	MOV  BX, [Word czinput]
	OR   BX, BX
	JNZ  $+5
	JMP  L_4
;		fclose(input); 
	MOV  BX, [Word czinput]
	PUSH BX
	CALL czfclose
	ADD  SP, +2
;	closeout(); 
L_4:
	CALL czcloseout
;	toconsole(); 
	CALL cztoconsole
;	pl("Compilation aborted.");  nl(); 
	MOV  BX, L_2+0
	PUSH BX
	CALL czpl
	ADD  SP, +2
	CALL cznl
;	exit(); 
	CALL czexit
;/* end abort */} 
	POP  BP
	RET

AutoC2	EQU 0

	  [SECTION .dseg]
L_2	DB "Compilation aborted.",0

	  [SECTION .cseg]
; 
;/*					*/ 
;/*	Process all input text		*/ 
;/*					*/ 
; 
;/* At this level, only static declarations,	*/ 
;/*	defines, includes, and function 	*/ 
;/*	definitions are legal...		*/ 
; 
;parse() 
czparse:
	PUSH BP
	SUB  SP, AutoC5
	MOV  BP, SP

;	{ 
;	while (eof==0)		/* do until no more input */ 
L_6:
	MOV  BX, [Word czeof]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_7
;		{ 
;		if(amatch("char",4)){declglb(cchar);ns();} 
	MOV  BX, L_5+0
	PUSH BX
	MOV  BX, +4
	PUSH BX
	CALL czamatch
	ADD  SP, +4
	OR   BX, BX
	JNZ  $+5
	JMP  L_8
	MOV  BX, +1
	PUSH BX
	CALL czdeclglb
	ADD  SP, +2
	CALL czns
;		else if(amatch("int",3)){declglb(cint);ns();} 
	JMP  L_9
L_8:
	MOV  BX, L_5+5
	PUSH BX
	MOV  BX, +3
	PUSH BX
	CALL czamatch
	ADD  SP, +4
	OR   BX, BX
	JNZ  $+5
	JMP  L_10
	MOV  BX, +2
	PUSH BX
	CALL czdeclglb
	ADD  SP, +2
	CALL czns
;		else if(match("#asm"))doasm(); 
	JMP  L_11
L_10:
	MOV  BX, L_5+9
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_12
	CALL czdoasm
;		else if(match("#include"))doinclude(); 
	JMP  L_13
L_12:
	MOV  BX, L_5+14
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_14
	CALL czdoinclude
;		else if(match("#define"))addmac(); 
	JMP  L_15
L_14:
	MOV  BX, L_5+23
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_16
	CALL czaddmac
;		else newfunc(); 
	JMP  L_17
L_16:
	CALL cznewfunc
L_17:
L_15:
L_13:
L_11:
L_9:
;		blanks();	/* force eof if pending */ 
	CALL czblanks
;		} 
	JMP  L_6
L_7:
;	} 
	POP  BP
	RET

AutoC5	EQU 0

	  [SECTION .dseg]
L_5	DB "char",0
	DB "int",0
	DB "#asm",0
	DB "#include",0
	DB "#define",0

	  [SECTION .cseg]
;/*					*/ 
;/*	Dump the literal pool		*/ 
;/*					*/ 
; 
;/** Test as DB "Str",0, .. Null terminated **/ 
;/** litptr represents next free position in table **/ 
;/** Table Entries are null terminated strings **/ 
; 
;dumplits() 
czdumplits:
	PUSH BP
	SUB  SP, AutoC18
	MOV  BP, SP

;{  /** Strings are from litq[0] up to litptr **/ 
;	int j,k; 
; 
;	if (litptr==0) return;	/* if nothing there, exit...*/ 
	MOV  BX, [Word czlitptr]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_19
	ADD  SP, AutoC18
	POP  BP
	RET
;	cdseg();			/* Put back in data segment. */ 
L_19:
	CALL czcdseg
;	printlabel (litlab);	/* print literal label */ 
	MOV  BX, [Word czlitlab]
	PUSH BX
	CALL czprintlabel
	ADD  SP, +2
;	k=0;				/* init an index... */ 
	LEA  BX, [AutoC18-4+BP]
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
; 
;	while (k < litptr)	/** loop thru literal strings buffer **/ 
L_20:
	LEA  BX, [AutoC18-4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, [Word czlitptr]
	POP  DX
	CALL cclt
	OR   BX, BX
	JNZ  $+5
	JMP  L_21
;		{			/** do one line per string **/ 
;		j = 1;            /** instring flag, reset for each DB **/ 
	LEA  BX, [AutoC18-2+BP]
	PUSH BX
	MOV  BX, +1
	POP  DI
	MOV  Word [DI], BX
;		defbyte();		/** B.O.L. pseudo-op to define byte, DB **/ 
	CALL czdefbyte
;		if (litq[k]) outbyte(34); /** start string with quote **/ 
	MOV  BX, czlitq
	PUSH BX
	LEA  BX, [AutoC18-4+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	OR   BX, BX
	JNZ  $+5
	JMP  L_22
	MOV  BX, +34
	PUSH BX
	CALL czoutbyte
	ADD  SP, +2
; 
;		while (j)		/** j is control flag **/ 
L_22:
L_23:
	LEA  BX, [AutoC18-2+BP]
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_24
;			{ 
;			if ((litq[k] & 127) == 0)   
	MOV  BX, czlitq
	PUSH BX
	LEA  BX, [AutoC18-4+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +127
	POP  DX
	AND  BX, DX
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_25
;				{	/** next is null **/ 
;				if (j == 1) 
	LEA  BX, [AutoC18-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_26
;					{	/** leading null is probably an error **/ 
;					outbyte(','); 
	MOV  BX, +44
	PUSH BX
	CALL czoutbyte
	ADD  SP, +2
;					outbyte('0'); 
	MOV  BX, +48
	PUSH BX
	CALL czoutbyte
	ADD  SP, +2
;					nl();		/** one str per DB, next line. **/ 
	CALL cznl
;					j = 0; k++; 
	LEA  BX, [AutoC18-2+BP]
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
	LEA  BX, [AutoC18-4+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
;					break; 
	JMP  L_24
;					}	/** break while, to ck j **/ 
;				} 
L_26:
;			else if ((litq[k] & 127) < ' ') k++;  /** filter lo **/ 
	JMP  L_27
L_25:
	MOV  BX, czlitq
	PUSH BX
	LEA  BX, [AutoC18-4+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +127
	POP  DX
	AND  BX, DX
	PUSH BX
	MOV  BX, +32
	POP  DX
	CALL cclt
	OR   BX, BX
	JNZ  $+5
	JMP  L_28
	LEA  BX, [AutoC18-4+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
;			else if ((litq[k] & 127) > '~') k++;  /** filter hi **/ 
	JMP  L_29
L_28:
	MOV  BX, czlitq
	PUSH BX
	LEA  BX, [AutoC18-4+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +127
	POP  DX
	AND  BX, DX
	PUSH BX
	MOV  BX, +126
	POP  DX
	CALL ccgt
	OR   BX, BX
	JNZ  $+5
	JMP  L_30
	LEA  BX, [AutoC18-4+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
;			else	{	/** xfer chr, lookahead for next is chr **/ 
	JMP  L_31
L_30:
;				outbyte((litq[k++] & 127)); 
	MOV  BX, czlitq
	PUSH BX
	LEA  BX, [AutoC18-4+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +127
	POP  DX
	AND  BX, DX
	PUSH BX
	CALL czoutbyte
	ADD  SP, +2
;				if ((litq[k]& 127) == 0) outbyte(34); /** eo str quote **/ 
	MOV  BX, czlitq
	PUSH BX
	LEA  BX, [AutoC18-4+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +127
	POP  DX
	AND  BX, DX
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_32
	MOV  BX, +34
	PUSH BX
	CALL czoutbyte
	ADD  SP, +2
;				} 
L_32:
L_31:
L_29:
L_27:
;			}	/** EO Line **/ 
	JMP  L_23
L_24:
;		}	/** gone thru Literals **/ 
	JMP  L_20
L_21:
;	ccseg();	/* Put back in code segment. */ 
	CALL czccseg
;}  /** eo dumplits **/ 
	ADD  SP, AutoC18
	POP  BP
	RET

AutoC18	EQU 4
;	czj	VAR	INT	-2
;	czk	VAR	INT	-4
; 
;/*					*/ 
;/*	Dump all static variables	*/ 
;/*					*/ 
; 
;/** modified for NASM 'TIMES amt D{B|W} 0' **/ 
; 
;dumpglbs() 
czdumpglbs:
	PUSH BP
	SUB  SP, AutoC33
	MOV  BP, SP

;	{ 
;	int j; 
; 
;	if(glbflag==0)return;	/* don't if user said no */ 
	MOV  BX, [Word czglbflag]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_34
	ADD  SP, AutoC33
	POP  BP
	RET
; 
;	cdseg();		/* Put back in data segment. */ 
L_34:
	CALL czcdseg
;	cptr=startglb; 
	MOV  BX, czsymtab
	MOV  Word [czcptr], BX
; 
;	while (cptr < glbptr) 
L_35:
	MOV  BX, [Word czcptr]
	PUSH BX
	MOV  BX, [Word czglbptr]
	POP  DX
	CALL ccult
	OR   BX, BX
	JNZ  $+5
	JMP  L_36
;		{ 
;		if(cptr[ident]!=function) 
	MOV  BX, [Word czcptr]
	PUSH BX
	MOV  BX, +9
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +4
	POP  DX
	CALL ccne
	OR   BX, BX
	JNZ  $+5
	JMP  L_37
;			/* do if anything but function */ 
;			{ 
;			outname(cptr); 
	MOV  BX, [Word czcptr]
	PUSH BX
	CALL czoutname
	ADD  SP, +2
;				/* output name as label... */ 
;			colon(); 
	CALL czcolon
;			def_sizein();  /** TIMES Prefix **/ 
	CALL czdef_sizein
; 
;				/* issue amount needed. */ 
;			j=((cptr[offset]&255)+((cptr[offset+1]&255)<<8)); 
	LEA  BX, [AutoC33-2+BP]
	PUSH BX
	MOV  BX, [Word czcptr]
	PUSH BX
	MOV  BX, +12
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +255
	POP  DX
	AND  BX, DX
	PUSH BX
	MOV  BX, [Word czcptr]
	PUSH BX
	MOV  BX, +12
	PUSH BX
	MOV  BX, +1
	POP  DX
	ADD  BX, DX
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +255
	POP  DX
	AND  BX, DX
	PUSH BX
	MOV  BX, +8
	POP  DX
	MOV  CX, BX
	SAL  DX, CL
	MOV  BX, DX
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
; 
;		/**	outdec(j);	**/  /* need that many */ 
;			if (j) outdec(j);  /** prevent TIMES 0 db 0 **/ 
	LEA  BX, [AutoC33-2+BP]
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_38
	LEA  BX, [AutoC33-2+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czoutdec
	ADD  SP, +2
;			else outdec(1); 
	JMP  L_39
L_38:
	MOV  BX, +1
	PUSH BX
	CALL czoutdec
	ADD  SP, +2
L_39:
; 
;				/* issue assembler defn type... */ 
;			if(cptr[ident]==pointer) /* Pointer */ 
	MOV  BX, [Word czcptr]
	PUSH BX
	MOV  BX, +9
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +3
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_40
;				defstorptr(); 
	CALL czdefstorptr
;			else 
	JMP  L_41
L_40:
;				{ 
;				if(cptr[type]==cchar)	/* Character */ 
	MOV  BX, [Word czcptr]
	PUSH BX
	MOV  BX, +10
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +1
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_42
;					defstorchr(); 
	CALL czdefstorchr
;				if(cptr[type]==cint)	/* Integer */ 
L_42:
	MOV  BX, [Word czcptr]
	PUSH BX
	MOV  BX, +10
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +2
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_43
;					defstorint(); 
	CALL czdefstorint
;				} 
L_43:
L_41:
;			nl(); 
	CALL cznl
;			} 
;		cptr=cptr+symsiz; 
L_37:
	MOV  BX, [Word czcptr]
	PUSH BX
	MOV  BX, +14
	POP  DX
	ADD  BX, DX
	MOV  Word [czcptr], BX
;		} 
	JMP  L_35
L_36:
;	ccseg();		/* Put back in code segment. */ 
	CALL czccseg
;	} 
	ADD  SP, AutoC33
	POP  BP
	RET

AutoC33	EQU 2
;	czj	VAR	INT	-2
; 
;/*					*/ 
;/*	Dump all local variables	*/ 
;/*					*/ 
;dumplocs() 
czdumplocs:
	PUSH BP
	SUB  SP, AutoC44
	MOV  BP, SP

;	{ 
;	int j; 
;	if(ctext==0)		/* Do not insert comments. */ 
	MOV  BX, [Word czctext]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_45
;		return; 
	ADD  SP, AutoC44
	POP  BP
	RET
;	cptr=startloc; 
L_45:
	MOV  BX, czsymtab
	PUSH BX
	MOV  BX, +300
	PUSH BX
	MOV  BX, +14
	POP  DX
	MOV  AX, BX
	PUSH DX
	MUL  DX
	POP  DX
	MOV  BX, AX
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +14
	POP  DX
	ADD  BX, DX
	MOV  Word [czcptr], BX
;	while(cptr!=locptr) 
L_46:
	MOV  BX, [Word czcptr]
	PUSH BX
	MOV  BX, [Word czlocptr]
	POP  DX
	CALL ccne
	OR   BX, BX
	JNZ  $+5
	JMP  L_47
;		{comment(); 
	CALL czcomment
;		tab(); 
	CALL cztab
;		outname(cptr); 
	MOV  BX, [Word czcptr]
	PUSH BX
	CALL czoutname
	ADD  SP, +2
;				/* output name as label... */ 
;		tab(); 
	CALL cztab
;				/* issue assembler defn ident... */ 
;		if(cptr[ident]==variable) 
	MOV  BX, [Word czcptr]
	PUSH BX
	MOV  BX, +9
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +1
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_48
;			outstr("VAR"); 
	MOV  BX, L_44+0
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
;		else if(cptr[ident]==array) 
	JMP  L_49
L_48:
	MOV  BX, [Word czcptr]
	PUSH BX
	MOV  BX, +9
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +2
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_50
;			outstr("ARRAY"); 
	MOV  BX, L_44+4
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
;		else if(cptr[ident]==pointer) 
	JMP  L_51
L_50:
	MOV  BX, [Word czcptr]
	PUSH BX
	MOV  BX, +9
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +3
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_52
;			outstr("PTR"); 
	MOV  BX, L_44+10
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
;		else if(cptr[ident]==function) 
	JMP  L_53
L_52:
	MOV  BX, [Word czcptr]
	PUSH BX
	MOV  BX, +9
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +4
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_54
;			outstr("FUNC"); 
	MOV  BX, L_44+14
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
;		tab(); 
L_54:
L_53:
L_51:
L_49:
	CALL cztab
;				/* issue assembler defn type... */ 
;		if(cptr[type]==cchar) /* Char */ 
	MOV  BX, [Word czcptr]
	PUSH BX
	MOV  BX, +10
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +1
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_55
;			outstr("CHAR"); 
	MOV  BX, L_44+19
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
;		else if(cptr[type]==cint) 
	JMP  L_56
L_55:
	MOV  BX, [Word czcptr]
	PUSH BX
	MOV  BX, +10
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +2
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_57
;			outstr("INT"); 
	MOV  BX, L_44+24
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
;		tab(); 
L_57:
L_56:
	CALL cztab
;				/* issue offset. */ 
;		j=((cptr[offset]&255)+ 
	LEA  BX, [AutoC44-2+BP]
	PUSH BX
	MOV  BX, [Word czcptr]
	PUSH BX
	MOV  BX, +12
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +255
	POP  DX
	AND  BX, DX
	PUSH BX
;			((cptr[offset+1]&255)<<8)); 
	MOV  BX, [Word czcptr]
	PUSH BX
	MOV  BX, +12
	PUSH BX
	MOV  BX, +1
	POP  DX
	ADD  BX, DX
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +255
	POP  DX
	AND  BX, DX
	PUSH BX
	MOV  BX, +8
	POP  DX
	MOV  CX, BX
	SAL  DX, CL
	MOV  BX, DX
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
;		outdec(j); 
	LEA  BX, [AutoC44-2+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czoutdec
	ADD  SP, +2
;		nl(); 
	CALL cznl
;		cptr=cptr+symsiz; 
	MOV  BX, [Word czcptr]
	PUSH BX
	MOV  BX, +14
	POP  DX
	ADD  BX, DX
	MOV  Word [czcptr], BX
;		} 
	JMP  L_46
L_47:
;	} 
	ADD  SP, AutoC44
	POP  BP
	RET

AutoC44	EQU 2
;	czj	VAR	INT	-2

	  [SECTION .dseg]
L_44	DB "VAR",0
	DB "ARRAY",0
	DB "PTR",0
	DB "FUNC",0
	DB "CHAR",0
	DB "INT",0

	  [SECTION .cseg]
; 
;/*					*/ 
;/*	Report errors for user		*/ 
;/*					*/ 
;errorsummary() 
czerrorsummary:
	PUSH BP
	SUB  SP, AutoC58
	MOV  BP, SP

;	{ 
;	/* see if anything left hanging... */ 
;	if (ncmp) error("missing closing bracket"); 
	MOV  BX, [Word czncmp]
	OR   BX, BX
	JNZ  $+5
	JMP  L_59
	MOV  BX, L_58+0
	PUSH BX
	CALL czerror
	ADD  SP, +2
;		/* open compound statement ... */ 
;	nl(); 
L_59:
	CALL cznl
;	outstr("There were "); 
	MOV  BX, L_58+24
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
;	outdec(errcnt);	/* total # errors */ 
	MOV  BX, [Word czerrcnt]
	PUSH BX
	CALL czoutdec
	ADD  SP, +2
;	outstr(" errors in compilation."); 
	MOV  BX, L_58+36
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
;	nl(); 
	CALL cznl
;	} 
	POP  BP
	RET

AutoC58	EQU 0

	  [SECTION .dseg]
L_58	DB "missing closing bracket",0
	DB "There were ",0
	DB " errors in compilation.",0

	  [SECTION .cseg]
; 
;/** EO C86N-0.C **/ 
; 
;/*	>>>>> start cc1 <<<<<<		*/ 
; 
;/*					*/ 
;/*	Get options from user		*/ 
;/*					*/ 
;ask() 
czask:
	PUSH BP
	SUB  SP, AutoC60
	MOV  BP, SP

;	{ 
;	int k,num[1]; 
;	kill();		/* clear input line */ 
	CALL czkill
;/**	outbyte(12);	* clear the screen *  **/ 
;	nl();nl();		/* print banner */ 
	CALL cznl
	CALL cznl
;	pl(BANNER); 
	MOV  BX, L_60+0
	PUSH BX
	CALL czpl
	ADD  SP, +2
;	nl(); 
	CALL cznl
;	pl(AUTHOR); 
	MOV  BX, L_60+28
	PUSH BX
	CALL czpl
	ADD  SP, +2
;	nl();nl(); 
	CALL cznl
	CALL cznl
;/**	pl("Distributed by: The Code Works(tm)"); 
;	pl("                Box 550, Goleta, CA 93017"); 
;  -originally. ***/ 
;	pl("* NASM Version, 10-Jan-2010 *"); 
	MOV  BX, L_60+47
	PUSH BX
	CALL czpl
	ADD  SP, +2
;	nl(); 
	CALL cznl
;	pl(VERSION); 
	MOV  BX, L_60+77
	PUSH BX
	CALL czpl
	ADD  SP, +2
;	nl(); 
	CALL cznl
;	nl(); 
	CALL cznl
;	/* see if user wants to interleave the c-text */ 
;	/*	in form of comments (for clarity) */ 
;	pl("Do you want the c-text to appear (y,N) ? "); 
	MOV  BX, L_60+111
	PUSH BX
	CALL czpl
	ADD  SP, +2
;	gets(line);		/* get answer */ 
	MOV  BX, czline
	PUSH BX
	CALL czgets
	ADD  SP, +2
;	ctext=0;		/* assume no */ 
	MOV  BX, +0
	MOV  Word [czctext], BX
;	if((chr()=='Y')|(chr()=='y')) 
	CALL czchr
	PUSH BX
	MOV  BX, +89
	POP  DX
	CALL cceq
	PUSH BX
	CALL czchr
	PUSH BX
	MOV  BX, +121
	POP  DX
	CALL cceq
	POP  DX
	OR   BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_61
;		ctext=1;	/* user said yes */ 
	MOV  BX, +1
	MOV  Word [czctext], BX
;	/* see if the user is compiling everything at once */ 
;	/*	(as is usually the case) - gtf 4/9/80 */ 
;	pl("Are you compiling the whole program at once (Y,n) ? "); 
L_61:
	MOV  BX, L_60+153
	PUSH BX
	CALL czpl
	ADD  SP, +2
;	gets(line); 
	MOV  BX, czline
	PUSH BX
	CALL czgets
	ADD  SP, +2
;	if((chr()!='N')&(chr()!='n')){	/* single file - assume... */ 
	CALL czchr
	PUSH BX
	MOV  BX, +78
	POP  DX
	CALL ccne
	PUSH BX
	CALL czchr
	PUSH BX
	MOV  BX, +110
	POP  DX
	CALL ccne
	POP  DX
	AND  BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_62
;		glbflag=1;	/* define globals */ 
	MOV  BX, +1
	MOV  Word [czglbflag], BX
;		mainflg=1;	/* first file to assembler */ 
	MOV  BX, +1
	MOV  Word [czmainflg], BX
;		nxtlab =0;	/* start numbers at lowest possible */ 
	MOV  BX, +0
	MOV  Word [cznxtlab], BX
;		} 
;	else {		/* one of many - ask everything */ 
	JMP  L_63
L_62:
;	 	/* see if user wants us to allocate static */ 
;	 	/*  variables by name in this module	*/ 
;	 	/*	(pseudo external capability)	*/ 
;	 	pl("Do you want the globals to be defined (y,N) ? "); 
	MOV  BX, L_60+206
	PUSH BX
	CALL czpl
	ADD  SP, +2
;	 	gets(line); 
	MOV  BX, czline
	PUSH BX
	CALL czgets
	ADD  SP, +2
;	 	glbflag=0; 
	MOV  BX, +0
	MOV  Word [czglbflag], BX
;	 	if((chr()=='Y')|(chr()=='y')) 
	CALL czchr
	PUSH BX
	MOV  BX, +89
	POP  DX
	CALL cceq
	PUSH BX
	CALL czchr
	PUSH BX
	MOV  BX, +121
	POP  DX
	CALL cceq
	POP  DX
	OR   BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_64
;	 		glbflag=1;	/* user said yes */ 
	MOV  BX, +1
	MOV  Word [czglbflag], BX
;	 	/* see if we should put out the stuff	*/ 
;	 	/*	needed for the first assembler	*/ 
;	 	/*	file. - gtf 4/9/80		*/ 
;		pl("Is the output file the first one the assembler will see (y,N) ? "); 
L_64:
	MOV  BX, L_60+253
	PUSH BX
	CALL czpl
	ADD  SP, +2
;	 	gets(line); 
	MOV  BX, czline
	PUSH BX
	CALL czgets
	ADD  SP, +2
;	 	mainflg=0; 
	MOV  BX, +0
	MOV  Word [czmainflg], BX
;	 	if((chr()=='Y')|(chr()=='y')) 
	CALL czchr
	PUSH BX
	MOV  BX, +89
	POP  DX
	CALL cceq
	PUSH BX
	CALL czchr
	PUSH BX
	MOV  BX, +121
	POP  DX
	CALL cceq
	POP  DX
	OR   BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_65
;	 		mainflg=1;	/* indeed it is */ 
	MOV  BX, +1
	MOV  Word [czmainflg], BX
;	 	/* get first allowable number for compiler-generated */ 
;	 	/*	labels (in case user will append modules) */ 
;	 	while(1){ 
L_65:
L_66:
	MOV  BX, +1
	OR   BX, BX
	JNZ  $+5
	JMP  L_67
;	 		pl("Starting number for labels (0) ? "); 
	MOV  BX, L_60+318
	PUSH BX
	CALL czpl
	ADD  SP, +2
;	 		gets(line); 
	MOV  BX, czline
	PUSH BX
	CALL czgets
	ADD  SP, +2
;	 		if(chr()==0){num[0]=0;break;} 
	CALL czchr
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_68
	LEA  BX, [AutoC60-4+BP]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
	JMP  L_67
;	 		if(k=number(num))break; 
L_68:
	LEA  BX, [AutoC60-2+BP]
	PUSH BX
	LEA  BX, [AutoC60-4+BP]
	PUSH BX
	CALL cznumber
	ADD  SP, +2
	POP  DI
	MOV  Word [DI], BX
	OR   BX, BX
	JNZ  $+5
	JMP  L_69
	JMP  L_67
;	 		} 
L_69:
	JMP  L_66
L_67:
;	 	nxtlab=num[0]; 
	LEA  BX, [AutoC60-4+BP]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	MOV  Word [cznxtlab], BX
;		} 
L_63:
;	/* see if user wants to be sure to see all errors */ 
;	pl("Should I pause after an error (y,N) ? "); 
	MOV  BX, L_60+352
	PUSH BX
	CALL czpl
	ADD  SP, +2
;	gets(line); 
	MOV  BX, czline
	PUSH BX
	CALL czgets
	ADD  SP, +2
;	errstop=0; 
	MOV  BX, +0
	MOV  Word [czerrstop], BX
;	if((chr()=='Y')|(chr()=='y')) 
	CALL czchr
	PUSH BX
	MOV  BX, +89
	POP  DX
	CALL cceq
	PUSH BX
	CALL czchr
	PUSH BX
	MOV  BX, +121
	POP  DX
	CALL cceq
	POP  DX
	OR   BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_70
;		errstop=1; 
	MOV  BX, +1
	MOV  Word [czerrstop], BX
; 
;	litlab=getlabel();	/* first label=literal pool */  
L_70:
	CALL czgetlabel
	MOV  Word [czlitlab], BX
;	kill();			/* erase line */ 
	CALL czkill
;	} 
	ADD  SP, AutoC60
	POP  BP
	RET

AutoC60	EQU 4
;	czk	VAR	INT	-2
;	cznum	ARRAY	INT	-4

	  [SECTION .dseg]
L_60	DB "* * *  Small-C  V1.1  * * *",0
	DB "       By Ron Cain",0
	DB "* NASM Version, 10-Jan-2010 *",0
	DB "Based on Version N: July 17, 1980",0
	DB "Do you want the c-text to appear (y,N) ? ",0
	DB "Are you compiling the whole program at once (Y,n) ? ",0
	DB "Do you want the globals to be defined (y,N) ? ",0
	DB "Is the output file the first one the assembler will see (y,N) ? ",0
	DB "Starting number for labels (0) ? ",0
	DB "Should I pause after an error (y,N) ? ",0

	  [SECTION .cseg]
; 
;/*					*/ 
;/*	Get output filename		*/ 
;/*					*/ 
;openout() 
czopenout:
	PUSH BP
	SUB  SP, AutoC71
	MOV  BP, SP

;	{ 
;	kill();			/* erase line */ 
	CALL czkill
;	output=0;			/* start with none */ 
	MOV  BX, +0
	MOV  Word [czoutput], BX
;	pl("Output filename? "); /* ask...*/ 
	MOV  BX, L_71+0
	PUSH BX
	CALL czpl
	ADD  SP, +2
;	gets(line);			/* get a filename */ 
	MOV  BX, czline
	PUSH BX
	CALL czgets
	ADD  SP, +2
;	if(chr()==0) return;	/* none given... */ 
	CALL czchr
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_72
	POP  BP
	RET
;	if((output=fopen(line,"w"))==NULL) /* if given, open */ 
L_72:
	MOV  BX, czline
	PUSH BX
	MOV  BX, L_71+18
	PUSH BX
	CALL czfopen
	ADD  SP, +4
	MOV  Word [czoutput], BX
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_73
;		{ 
;		output=0;	/* can't open */ 
	MOV  BX, +0
	MOV  Word [czoutput], BX
;		error("Open failure!"); 
	MOV  BX, L_71+20
	PUSH BX
	CALL czerror
	ADD  SP, +2
;		} 
;	kill();			/* erase line */ 
L_73:
	CALL czkill
;	} 
	POP  BP
	RET

AutoC71	EQU 0

	  [SECTION .dseg]
L_71	DB "Output filename? ",0
	DB "w",0
	DB "Open failure!",0

	  [SECTION .cseg]
; 
;/*					*/ 
;/*	Get (next) input file		*/ 
;/*					*/ 
;openin() 
czopenin:
	PUSH BP
	SUB  SP, AutoC74
	MOV  BP, SP

;{ 
;	input=0;		/* none to start with */ 
	MOV  BX, +0
	MOV  Word [czinput], BX
;	while(input==0){	/* any above 1 allowed */ 
L_75:
	MOV  BX, [Word czinput]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_76
;		kill();		/* clear line */ 
	CALL czkill
;		if(eof)break;	/* if user said none */ 
	MOV  BX, [Word czeof]
	OR   BX, BX
	JNZ  $+5
	JMP  L_77
	JMP  L_76
;		pl("Input filename? "); 
L_77:
	MOV  BX, L_74+0
	PUSH BX
	CALL czpl
	ADD  SP, +2
;		gets(line);	/* get a name */ 
	MOV  BX, czline
	PUSH BX
	CALL czgets
	ADD  SP, +2
;		if(chr()==0) 
	CALL czchr
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_78
;			{eof=1;break;} /* none given... */ 
	MOV  BX, +1
	MOV  Word [czeof], BX
	JMP  L_76
;		if((input=fopen(line,"r"))!=NULL) 
L_78:
	MOV  BX, czline
	PUSH BX
	MOV  BX, L_74+17
	PUSH BX
	CALL czfopen
	ADD  SP, +4
	MOV  Word [czinput], BX
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL ccne
	OR   BX, BX
	JNZ  $+5
	JMP  L_79
;			newfile();			/* gtf 7/16/80 */ 
	CALL cznewfile
;		else {	input=0;	/* can't open it */ 
	JMP  L_80
L_79:
	MOV  BX, +0
	MOV  Word [czinput], BX
;			pl("Open failure"); 
	MOV  BX, L_74+19
	PUSH BX
	CALL czpl
	ADD  SP, +2
;			} 
L_80:
;		} 
	JMP  L_75
L_76:
;	kill();		/* erase line */ 
	CALL czkill
;	} 
	POP  BP
	RET

AutoC74	EQU 0

	  [SECTION .dseg]
L_74	DB "Input filename? ",0
	DB "r",0
	DB "Open failure",0

	  [SECTION .cseg]
; 
;/*					*/ 
;/*	Reset line count, etc.		*/ 
;/*			gtf 7/16/80	*/ 
;newfile() 
cznewfile:
	PUSH BP
	SUB  SP, AutoC81
	MOV  BP, SP

;{ 
;	lineno  = 0;	/* no lines read */ 
	MOV  BX, +0
	MOV  Word [czlineno], BX
;	fnstart = 0;	/* no fn. start yet. */ 
	MOV  BX, +0
	MOV  Word [czfnstart], BX
;	currfn  = NULL;	/* because no fn. yet */ 
	MOV  BX, +0
	MOV  Word [czcurrfn], BX
;	infunc  = 0;	/* therefore not in fn. */ 
	MOV  BX, +0
	MOV  Word [czinfunc], BX
;}  /* end newfile */ 
	POP  BP
	RET

AutoC81	EQU 0
; 
;/*					*/ 
;/*	Open an include file		*/ 
;/*					*/ 
;doinclude() 
czdoinclude:
	PUSH BP
	SUB  SP, AutoC82
	MOV  BP, SP

;{ 
;	blanks();	/* skip over to name */ 
	CALL czblanks
; 
;	toconsole();					/* gtf 7/16/80 */ 
	CALL cztoconsole
;	outstr("#include "); outstr(line+lptr); nl(); 
	MOV  BX, L_82+0
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
	MOV  BX, czline
	PUSH BX
	MOV  BX, [Word czlptr]
	POP  DX
	ADD  BX, DX
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
	CALL cznl
;	tofile(); 
	CALL cztofile
; 
;	if(input2)					/* gtf 7/16/80 */ 
	MOV  BX, [Word czinput2]
	OR   BX, BX
	JNZ  $+5
	JMP  L_83
;		error("Cannot nest include files"); 
	MOV  BX, L_82+10
	PUSH BX
	CALL czerror
	ADD  SP, +2
;	else if((input2=fopen(line+lptr,"r"))==NULL) 
	JMP  L_84
L_83:
	MOV  BX, czline
	PUSH BX
	MOV  BX, [Word czlptr]
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, L_82+36
	PUSH BX
	CALL czfopen
	ADD  SP, +4
	MOV  Word [czinput2], BX
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_85
;		{ 
;		input2=0; 
	MOV  BX, +0
	MOV  Word [czinput2], BX
;		error("Open failure on include file"); 
	MOV  BX, L_82+38
	PUSH BX
	CALL czerror
	ADD  SP, +2
;		} 
;	else { 
	JMP  L_86
L_85:
;		saveline = lineno; 
	MOV  BX, [Word czlineno]
	MOV  Word [czsaveline], BX
;		savecurr = currfn; 
	MOV  BX, [Word czcurrfn]
	MOV  Word [czsavecurr], BX
;		saveinfn = infunc; 
	MOV  BX, [Word czinfunc]
	MOV  Word [czsaveinfn], BX
;		savestart= fnstart; 
	MOV  BX, [Word czfnstart]
	MOV  Word [czsavestart], BX
;		newfile(); 
	CALL cznewfile
;		} 
L_86:
L_84:
;	kill();	/* clear rest of line */ 
	CALL czkill
;			/* so next read will come from */ 
;			/* new file (if open */ 
;} 
	POP  BP
	RET

AutoC82	EQU 0

	  [SECTION .dseg]
L_82	DB "#include ",0
	DB "Cannot nest include files",0
	DB "r",0
	DB "Open failure on include file",0

	  [SECTION .cseg]
; 
;/*					*/ 
;/*	Close an include file		*/ 
;/*			gtf 7/16/80	*/ 
;endinclude() 
czendinclude:
	PUSH BP
	SUB  SP, AutoC87
	MOV  BP, SP

;{ 
;	toconsole(); 
	CALL cztoconsole
;	outstr("#end include"); nl(); 
	MOV  BX, L_87+0
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
	CALL cznl
;	tofile(); 
	CALL cztofile
; 
;	input2  = 0; 
	MOV  BX, +0
	MOV  Word [czinput2], BX
;	lineno  = saveline; 
	MOV  BX, [Word czsaveline]
	MOV  Word [czlineno], BX
;	currfn  = savecurr; 
	MOV  BX, [Word czsavecurr]
	MOV  Word [czcurrfn], BX
;	infunc  = saveinfn; 
	MOV  BX, [Word czsaveinfn]
	MOV  Word [czinfunc], BX
;	fnstart = savestart; 
	MOV  BX, [Word czsavestart]
	MOV  Word [czfnstart], BX
;/* end endinclude */} 
	POP  BP
	RET

AutoC87	EQU 0

	  [SECTION .dseg]
L_87	DB "#end include",0

	  [SECTION .cseg]
; 
;/*					*/ 
;/*	Close the output file		*/ 
;/*					*/ 
;closeout() 
czcloseout:
	PUSH BP
	SUB  SP, AutoC88
	MOV  BP, SP

;{ 
;	tofile();	/* if diverted, return to file */ 
	CALL cztofile
;	if(output)fclose(output); /* if open, close it */ 
	MOV  BX, [Word czoutput]
	OR   BX, BX
	JNZ  $+5
	JMP  L_89
	MOV  BX, [Word czoutput]
	PUSH BX
	CALL czfclose
	ADD  SP, +2
;	output=0;		/* mark as closed */ 
L_89:
	MOV  BX, +0
	MOV  Word [czoutput], BX
;} 
	POP  BP
	RET

AutoC88	EQU 0
; 
;/*					*/ 
;/*	Declare a static variable	*/ 
;/*	  (i.e. define for use)		*/ 
;/*					*/ 
;/* makes an entry in the symbol table so subsequent */ 
;/*  references can call symbol by name	*/ 
;declglb(typ)		/* typ is cchar or cint */ 
czdeclglb:
;	int typ; 
	PUSH BP
	SUB  SP, AutoC90
	MOV  BP, SP

;{	int k,j;char sname[namesize]; 
;	while(1) 
L_91:
	MOV  BX, +1
	OR   BX, BX
	JNZ  $+5
	JMP  L_92
;		{while(1) 
L_93:
	MOV  BX, +1
	OR   BX, BX
	JNZ  $+5
	JMP  L_94
;			{if(endst())return;	/* do line */ 
	CALL czendst
	OR   BX, BX
	JNZ  $+5
	JMP  L_95
	ADD  SP, AutoC90
	POP  BP
	RET
;			k=1;		/* assume 1 element */ 
L_95:
	LEA  BX, [AutoC90-2+BP]
	PUSH BX
	MOV  BX, +1
	POP  DI
	MOV  Word [DI], BX
;			if(match("*"))	/* pointer ? */ 
	MOV  BX, L_90+0
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_96
;				j=pointer;	/* yes */ 
	LEA  BX, [AutoC90-4+BP]
	PUSH BX
	MOV  BX, +3
	POP  DI
	MOV  Word [DI], BX
;				else j=variable; /* no */ 
	JMP  L_97
L_96:
	LEA  BX, [AutoC90-4+BP]
	PUSH BX
	MOV  BX, +1
	POP  DI
	MOV  Word [DI], BX
L_97:
;			 if (symname(sname)==0) /* name ok? */ 
	LEA  BX, [AutoC90-13+BP]
	PUSH BX
	CALL czsymname
	ADD  SP, +2
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_98
;				illname(); /* no... */ 
	CALL czillname
;			if(findglb(sname)) /* already there? */ 
L_98:
	LEA  BX, [AutoC90-13+BP]
	PUSH BX
	CALL czfindglb
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_99
;				multidef(sname); 
	LEA  BX, [AutoC90-13+BP]
	PUSH BX
	CALL czmultidef
	ADD  SP, +2
;			if (match("["))		/* array? */ 
L_99:
	MOV  BX, L_90+2
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_100
;				{k=needsub();	/* get size */ 
	LEA  BX, [AutoC90-2+BP]
	PUSH BX
	CALL czneedsub
	POP  DI
	MOV  Word [DI], BX
;				if(k)j=array;	/* !0=array */ 
	LEA  BX, [AutoC90-2+BP]
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_101
	LEA  BX, [AutoC90-4+BP]
	PUSH BX
	MOV  BX, +2
	POP  DI
	MOV  Word [DI], BX
;				else j=pointer; /* 0=ptr */ 
	JMP  L_102
L_101:
	LEA  BX, [AutoC90-4+BP]
	PUSH BX
	MOV  BX, +3
	POP  DI
	MOV  Word [DI], BX
L_102:
;				} 
;			addglb(sname,j,typ,k); /* add symbol */ 
L_100:
	LEA  BX, [AutoC90-13+BP]
	PUSH BX
	LEA  BX, [AutoC90-4+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC90+4+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC90-2+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czaddglb
	ADD  SP, +8
;			break; 
	JMP  L_94
;			} 
	JMP  L_93
L_94:
;		if (match(",")==0) return; /* more? */ 
	MOV  BX, L_90+4
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_103
	ADD  SP, AutoC90
	POP  BP
	RET
;		} 
L_103:
	JMP  L_91
L_92:
;	} 
	ADD  SP, AutoC90
	POP  BP
	RET

AutoC90	EQU 13
;	cztyp	VAR	INT	+4
;	czk	VAR	INT	-2
;	czj	VAR	INT	-4
;	czsname	ARRAY	CHAR	-13

	  [SECTION .dseg]
L_90	DB "*",0
	DB "[",0
	DB ",",0

	  [SECTION .cseg]
;/*					*/ 
;/*	Declare local variables		*/ 
;/*	(i.e. define for use)		*/ 
;/*					*/ 
;/* works just like "declglb" but modifies machine stack */ 
;/*	and adds symbol table entry with appropriate */ 
;/*	stack offset to find it again			*/ 
;declloc(typ)		/* typ is cchar or cint */ 
czdeclloc:
;	int typ; 
	PUSH BP
	SUB  SP, AutoC104
	MOV  BP, SP

;	{ 
;	int k,j; 
;	char sname[namesize]; 
;	while(1) 
L_105:
	MOV  BX, +1
	OR   BX, BX
	JNZ  $+5
	JMP  L_106
;		{while(1) 
L_107:
	MOV  BX, +1
	OR   BX, BX
	JNZ  $+5
	JMP  L_108
;			{if(endst())return; 
	CALL czendst
	OR   BX, BX
	JNZ  $+5
	JMP  L_109
	ADD  SP, AutoC104
	POP  BP
	RET
;			if(match("*")) 
L_109:
	MOV  BX, L_104+0
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_110
;				j=pointer; 
	LEA  BX, [AutoC104-4+BP]
	PUSH BX
	MOV  BX, +3
	POP  DI
	MOV  Word [DI], BX
;				else j=variable; 
	JMP  L_111
L_110:
	LEA  BX, [AutoC104-4+BP]
	PUSH BX
	MOV  BX, +1
	POP  DI
	MOV  Word [DI], BX
L_111:
;			if (symname(sname)==0) 
	LEA  BX, [AutoC104-13+BP]
	PUSH BX
	CALL czsymname
	ADD  SP, +2
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_112
;				illname(); 
	CALL czillname
;			if(findloc(sname)) 
L_112:
	LEA  BX, [AutoC104-13+BP]
	PUSH BX
	CALL czfindloc
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_113
;				multidef(sname); 
	LEA  BX, [AutoC104-13+BP]
	PUSH BX
	CALL czmultidef
	ADD  SP, +2
;			if (match("[")) 
L_113:
	MOV  BX, L_104+2
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_114
;				{k=needsub(); 
	LEA  BX, [AutoC104-2+BP]
	PUSH BX
	CALL czneedsub
	POP  DI
	MOV  Word [DI], BX
;				if(k) 
	LEA  BX, [AutoC104-2+BP]
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_115
;					{j=array; 
	LEA  BX, [AutoC104-4+BP]
	PUSH BX
	MOV  BX, +2
	POP  DI
	MOV  Word [DI], BX
;					if(typ==cint)k=k+k; 
	LEA  BX, [AutoC104+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_116
	LEA  BX, [AutoC104-2+BP]
	PUSH BX
	LEA  BX, [AutoC104-2+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC104-2+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
;					} 
L_116:
;				else 
	JMP  L_117
L_115:
;					{j=pointer; 
	LEA  BX, [AutoC104-4+BP]
	PUSH BX
	MOV  BX, +3
	POP  DI
	MOV  Word [DI], BX
;					k=2; 
	LEA  BX, [AutoC104-2+BP]
	PUSH BX
	MOV  BX, +2
	POP  DI
	MOV  Word [DI], BX
;					} 
L_117:
;				} 
;			else 
	JMP  L_118
L_114:
;				if((typ==cchar) 
	LEA  BX, [AutoC104+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	POP  DX
	CALL cceq
;					&(j!=pointer)) 
	PUSH BX
	LEA  BX, [AutoC104-4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +3
	POP  DX
	CALL ccne
	POP  DX
	AND  BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_119
;					k=1; 
	LEA  BX, [AutoC104-2+BP]
	PUSH BX
	MOV  BX, +1
	POP  DI
	MOV  Word [DI], BX
;				else k=2; 
	JMP  L_120
L_119:
	LEA  BX, [AutoC104-2+BP]
	PUSH BX
	MOV  BX, +2
	POP  DI
	MOV  Word [DI], BX
L_120:
L_118:
;			/* change machine stack */ 
;			Msp=Msp-k; 
	MOV  BX, [Word czMsp]
	PUSH BX
	LEA  BX, [AutoC104-2+BP]
	MOV  BX, [BX]
	POP  DX
	SUB  DX, BX
	MOV  BX, DX
	MOV  Word [czMsp], BX
;			addloc(sname,j,typ,Msp); 
	LEA  BX, [AutoC104-13+BP]
	PUSH BX
	LEA  BX, [AutoC104-4+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC104+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, [Word czMsp]
	PUSH BX
	CALL czaddloc
	ADD  SP, +8
;			break; 
	JMP  L_108
;			} 
	JMP  L_107
L_108:
;		if (match(",")==0) return; 
	MOV  BX, L_104+4
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_121
	ADD  SP, AutoC104
	POP  BP
	RET
;		} 
L_121:
	JMP  L_105
L_106:
;	} 
	ADD  SP, AutoC104
	POP  BP
	RET

AutoC104	EQU 13
;	cztyp	VAR	INT	+4
;	czk	VAR	INT	-2
;	czj	VAR	INT	-4
;	czsname	ARRAY	CHAR	-13

	  [SECTION .dseg]
L_104	DB "*",0
	DB "[",0
	DB ",",0

	  [SECTION .cseg]
; 
;/** EO C86N-1.C **/ 
; 
;/*	>>>>>> start of cc2 <<<<<<<<	*/ 
; 
;/*					*/ 
;/*	Get required array size		*/ 
;/*					*/ 
;/* invoked when declared variable is followed by "[" */ 
;/*	this routine makes subscript the absolute */ 
;/*	size of the array. */ 
;needsub() 
czneedsub:
	PUSH BP
	SUB  SP, AutoC122
	MOV  BP, SP

;	{ 
;	int num[1]; 
;	if(match("]"))return 0;	/* null size */ 
	MOV  BX, L_122+0
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_123
	MOV  BX, +0
	ADD  SP, AutoC122
	POP  BP
	RET
;	if (number(num)==0)	/* go after a number */ 
L_123:
	LEA  BX, [AutoC122-2+BP]
	PUSH BX
	CALL cznumber
	ADD  SP, +2
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_124
;		{error("must be constant");	/* it isn't */ 
	MOV  BX, L_122+2
	PUSH BX
	CALL czerror
	ADD  SP, +2
;		num[0]=1;		/* so force one */ 
	LEA  BX, [AutoC122-2+BP]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +1
	POP  DI
	MOV  Word [DI], BX
;		} 
;	if (num[0]<0) 
L_124:
	LEA  BX, [AutoC122-2+BP]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cclt
	OR   BX, BX
	JNZ  $+5
	JMP  L_125
;		{error("negative size illegal"); 
	MOV  BX, L_122+19
	PUSH BX
	CALL czerror
	ADD  SP, +2
;		num[0]=(-num[0]); 
	LEA  BX, [AutoC122-2+BP]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC122-2+BP]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	NEG  BX
	POP  DI
	MOV  Word [DI], BX
;		} 
;	needbrack("]");		/* force single dimension */ 
L_125:
	MOV  BX, L_122+41
	PUSH BX
	CALL czneedbrack
	ADD  SP, +2
;	return num[0];		/* and return size */ 
	LEA  BX, [AutoC122-2+BP]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	ADD  SP, AutoC122
	POP  BP
	RET
;	} 

AutoC122	EQU 2
;	cznum	ARRAY	INT	-2

	  [SECTION .dseg]
L_122	DB "]",0
	DB "must be constant",0
	DB "negative size illegal",0
	DB "]",0

	  [SECTION .cseg]
;/*					*/ 
;/*	Begin a function		*/ 
;/*					*/ 
;/* Called from "parse" this routine tries to make a function */ 
;/*	out of what follows.	*/ 
;newfunc() 
cznewfunc:
	PUSH BP
	SUB  SP, AutoC126
	MOV  BP, SP

;	{ 
;	char n[namesize];	/* ptr => currfn,  gtf 7/16/80 */ 
;	int argtop;		/* max arg stack size */ 
;	if (symname(n)==0) 
	LEA  BX, [AutoC126-9+BP]
	PUSH BX
	CALL czsymname
	ADD  SP, +2
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_127
;		{error("illegal function or declaration"); 
	MOV  BX, L_126+0
	PUSH BX
	CALL czerror
	ADD  SP, +2
;		kill();	/* invalidate line */ 
	CALL czkill
;		return; 
	ADD  SP, AutoC126
	POP  BP
	RET
;		} 
;	fnstart=lineno;		/* remember where fn began	gtf 7/2/80 */ 
L_127:
	MOV  BX, [Word czlineno]
	MOV  Word [czfnstart], BX
;	infunc=1;		/* note, in function now.	gtf 7/16/80 */ 
	MOV  BX, +1
	MOV  Word [czinfunc], BX
;	if(currfn=findglb(n))	/* already in symbol table ? */ 
	LEA  BX, [AutoC126-9+BP]
	PUSH BX
	CALL czfindglb
	ADD  SP, +2
	MOV  Word [czcurrfn], BX
	OR   BX, BX
	JNZ  $+5
	JMP  L_128
;		{if(currfn[ident]!=function)multidef(n); 
	MOV  BX, [Word czcurrfn]
	PUSH BX
	MOV  BX, +9
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +4
	POP  DX
	CALL ccne
	OR   BX, BX
	JNZ  $+5
	JMP  L_129
	LEA  BX, [AutoC126-9+BP]
	PUSH BX
	CALL czmultidef
	ADD  SP, +2
;			/* already variable by that name */ 
;		else if(currfn[offset]==function)multidef(n); 
	JMP  L_130
L_129:
	MOV  BX, [Word czcurrfn]
	PUSH BX
	MOV  BX, +12
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +4
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_131
	LEA  BX, [AutoC126-9+BP]
	PUSH BX
	CALL czmultidef
	ADD  SP, +2
;			/* already function by that name */ 
;		else currfn[offset]=function; 
	JMP  L_132
L_131:
	MOV  BX, [Word czcurrfn]
	PUSH BX
	MOV  BX, +12
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +4
	POP  DI
	MOV  Byte [DI], BL
L_132:
L_130:
;			/* otherwise we have what was earlier*/ 
;			/*  assumed to be a function */ 
;		} 
;	/* if not in table, define as a function now */ 
;	else currfn=addglb(n,function,cint,function); 
	JMP  L_133
L_128:
	LEA  BX, [AutoC126-9+BP]
	PUSH BX
	MOV  BX, +4
	PUSH BX
	MOV  BX, +2
	PUSH BX
	MOV  BX, +4
	PUSH BX
	CALL czaddglb
	ADD  SP, +8
	MOV  Word [czcurrfn], BX
L_133:
; 
;	/* Indicate to console what routine that we're in. */ 
;	toconsole();					/* gtf 7/16/80 */ 
	CALL cztoconsole
;	outstr("====== "); outstr(currfn+name); outstr("()"); nl(); 
	MOV  BX, L_126+32
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
	MOV  BX, [Word czcurrfn]
	PUSH BX
	MOV  BX, +0
	POP  DX
	ADD  BX, DX
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
	MOV  BX, L_126+40
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
	CALL cznl
;	tofile(); 
	CALL cztofile
; 
;	/* we had better see open paren for args... */ 
;	if(match("(")==0)error("missing open paren"); 
	MOV  BX, L_126+43
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_134
	MOV  BX, L_126+45
	PUSH BX
	CALL czerror
	ADD  SP, +2
;	outname(n);colon();nl();	/* print function name */ 
L_134:
	LEA  BX, [AutoC126-9+BP]
	PUSH BX
	CALL czoutname
	ADD  SP, +2
	CALL czcolon
	CALL cznl
;	locptr=startloc;	/* "clear" local symbol table*/ 
	MOV  BX, czsymtab
	PUSH BX
	MOV  BX, +300
	PUSH BX
	MOV  BX, +14
	POP  DX
	MOV  AX, BX
	PUSH DX
	MUL  DX
	POP  DX
	MOV  BX, AX
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +14
	POP  DX
	ADD  BX, DX
	MOV  Word [czlocptr], BX
;	argstk=0;		/* init arg count */ 
	MOV  BX, +0
	MOV  Word [czargstk], BX
;	while(match(")")==0)	/* then count args */ 
L_135:
	MOV  BX, L_126+64
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_136
;		/* any legal name bumps arg count */ 
;		{if(symname(n)) 
	LEA  BX, [AutoC126-9+BP]
	PUSH BX
	CALL czsymname
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_137
;			{if(findloc(n)) 
	LEA  BX, [AutoC126-9+BP]
	PUSH BX
	CALL czfindloc
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_138
;				multidef(n); 
	LEA  BX, [AutoC126-9+BP]
	PUSH BX
	CALL czmultidef
	ADD  SP, +2
;			else 
	JMP  L_139
L_138:
;				{addloc(n,0,0,argstk); 
	LEA  BX, [AutoC126-9+BP]
	PUSH BX
	MOV  BX, +0
	PUSH BX
	MOV  BX, +0
	PUSH BX
	MOV  BX, [Word czargstk]
	PUSH BX
	CALL czaddloc
	ADD  SP, +8
;				/* Add local symbol to be later */ 
;				/* processed by getarg(). */ 
;				argstk=argstk+2; 
	MOV  BX, [Word czargstk]
	PUSH BX
	MOV  BX, +2
	POP  DX
	ADD  BX, DX
	MOV  Word [czargstk], BX
;				} 
L_139:
;			} 
;		else{error("illegal argument name");junk();} 
	JMP  L_140
L_137:
	MOV  BX, L_126+66
	PUSH BX
	CALL czerror
	ADD  SP, +2
	CALL czjunk
L_140:
;		blanks(); 
	CALL czblanks
;		/* if not closing paren, should be comma */ 
;		if(streq(line+lptr,")")==0) 
	MOV  BX, czline
	PUSH BX
	MOV  BX, [Word czlptr]
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, L_126+88
	PUSH BX
	CALL czstreq
	ADD  SP, +4
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_141
;			{if(match(",")==0) 
	MOV  BX, L_126+90
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_142
;			error("expected comma"); 
	MOV  BX, L_126+92
	PUSH BX
	CALL czerror
	ADD  SP, +2
;			} 
L_142:
;		if(endst())break; 
L_141:
	CALL czendst
	OR   BX, BX
	JNZ  $+5
	JMP  L_143
	JMP  L_136
;		} 
L_143:
	JMP  L_135
L_136:
; 
;	argtop=argstk;		/* Save max arg stack size. */ 
	LEA  BX, [AutoC126-11+BP]
	PUSH BX
	MOV  BX, [Word czargstk]
	POP  DI
	MOV  Word [DI], BX
;	while(argstk) 
L_144:
	MOV  BX, [Word czargstk]
	OR   BX, BX
	JNZ  $+5
	JMP  L_145
;		/* now let user declare what types of things */ 
;		/*	those arguments were */ 
;		{if(amatch("char",4)) 
	MOV  BX, L_126+107
	PUSH BX
	MOV  BX, +4
	PUSH BX
	CALL czamatch
	ADD  SP, +4
	OR   BX, BX
	JNZ  $+5
	JMP  L_146
;			{getarg(cchar,argtop); 
	MOV  BX, +1
	PUSH BX
	LEA  BX, [AutoC126-11+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czgetarg
	ADD  SP, +4
;			ns(); 
	CALL czns
;			continue; 
	JMP  L_144
;			} 
;		else if(amatch("int",3)) 
	JMP  L_147
L_146:
	MOV  BX, L_126+112
	PUSH BX
	MOV  BX, +3
	PUSH BX
	CALL czamatch
	ADD  SP, +4
	OR   BX, BX
	JNZ  $+5
	JMP  L_148
;			{getarg(cint,argtop); 
	MOV  BX, +2
	PUSH BX
	LEA  BX, [AutoC126-11+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czgetarg
	ADD  SP, +4
;			ns(); 
	CALL czns
;			continue; 
	JMP  L_144
;			} 
;		else{error("wrong number args");break;} 
	JMP  L_149
L_148:
	MOV  BX, L_126+116
	PUSH BX
	CALL czerror
	ADD  SP, +2
	JMP  L_145
L_149:
L_147:
;		} 
	JMP  L_144
L_145:
; 
;	Msp=00;			/* Preset local stack ptr. */ 
	MOV  BX, +0
	MOV  Word [czMsp], BX
;	Zsp=00;			/* preset stack ptr */ 
	MOV  BX, +0
	MOV  Word [czZsp], BX
;	funcbgn();		/* Do function initialization. */ 
	CALL czfuncbgn
; 
;	if(statement()!=streturn) /* do all statements, but if */ 
	CALL czstatement
	PUSH BX
	MOV  BX, +3
	POP  DX
	CALL ccne
	OR   BX, BX
	JNZ  $+5
	JMP  L_150
;				/* last one is a return, skip */ 
;				/* cleaning up the stack */ 
;		{rtnstk(0); 
	MOV  BX, +0
	PUSH BX
	CALL czrtnstk
	ADD  SP, +2
;		zret(); 
	CALL czzret
;		} 
; 
;	/* Handle function termination. */ 
;	funcend();		/* Do function termination. */ 
L_150:
	CALL czfuncend
;	Msp=Zsp=0;		/* reset stack ptr again */ 
	MOV  BX, +0
	MOV  Word [czZsp], BX
	MOV  Word [czMsp], BX
;	dumplocs();		/* Dump the local symbol table. */ 
	CALL czdumplocs
;	locptr=startloc;	/* deallocate all locals */ 
	MOV  BX, czsymtab
	PUSH BX
	MOV  BX, +300
	PUSH BX
	MOV  BX, +14
	POP  DX
	MOV  AX, BX
	PUSH DX
	MUL  DX
	POP  DX
	MOV  BX, AX
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +14
	POP  DX
	ADD  BX, DX
	MOV  Word [czlocptr], BX
;	dumplits();		/* Dump the literal pool for the 
;				   function. */ 
	CALL czdumplits
;	litlab=getlabel();	/* Now re-initialize the pool. */ 
	CALL czgetlabel
	MOV  Word [czlitlab], BX
;	litptr=0; 
	MOV  BX, +0
	MOV  Word [czlitptr], BX
;	infunc=0;		/* not in fn. any more		gtf 7/2/80 */ 
	MOV  BX, +0
	MOV  Word [czinfunc], BX
;	} 
	ADD  SP, AutoC126
	POP  BP
	RET

AutoC126	EQU 11
;	czn	ARRAY	CHAR	-9
;	czargtop	VAR	INT	-11

	  [SECTION .dseg]
L_126	DB "illegal function or declaration",0
	DB "====== ",0
	DB "()",0
	DB "(",0
	DB "missing open paren",0
	DB ")",0
	DB "illegal argument name",0
	DB ")",0
	DB ",",0
	DB "expected comma",0
	DB "char",0
	DB "int",0
	DB "wrong number args",0

	  [SECTION .cseg]
;/*					*/ 
;/*	Declare argument types		*/ 
;/*					*/ 
;/* called from "newfunc" this routine adds an entry in the */ 
;/*	local symbol table for each named argument */ 
;getarg(t,top)		/* t = cchar or cint, top = max arg stack */ 
czgetarg:
;	int t,top; 
	PUSH BP
	SUB  SP, AutoC151
	MOV  BP, SP

; 
;	/* top tells how the max arg stack size was found while 
;	   scanning arguments.  From this, we can calculate the 
;	   the actual stack offset and stuff it back into the 
;	   local symbol table. 
;	*/ 
; 
;	{ 
;	char n[namesize],*argptr; 
;	int j, locaddr; 
;	while(1) 
L_152:
	MOV  BX, +1
	OR   BX, BX
	JNZ  $+5
	JMP  L_153
;		{if(argstk==0)return;	/* no more args */ 
	MOV  BX, [Word czargstk]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_154
	ADD  SP, AutoC151
	POP  BP
	RET
;		if(match("*")) 
L_154:
	MOV  BX, L_151+0
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_155
;			j=pointer; 
	LEA  BX, [AutoC151-13+BP]
	PUSH BX
	MOV  BX, +3
	POP  DI
	MOV  Word [DI], BX
;		else 
	JMP  L_156
L_155:
;			j=variable; 
	LEA  BX, [AutoC151-13+BP]
	PUSH BX
	MOV  BX, +1
	POP  DI
	MOV  Word [DI], BX
L_156:
;		if(symname(n)) 
	LEA  BX, [AutoC151-9+BP]
	PUSH BX
	CALL czsymname
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_157
;			{if(match("["))	/* pointer ? */ 
	MOV  BX, L_151+2
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_158
;			/* it is a pointer, so skip all */ 
;			/* stuff between "[]" */ 
;				{while(inbyte()!=']') 
L_159:
	CALL czinbyte
	PUSH BX
	MOV  BX, +93
	POP  DX
	CALL ccne
	OR   BX, BX
	JNZ  $+5
	JMP  L_160
;					if(endst())break; 
	CALL czendst
	OR   BX, BX
	JNZ  $+5
	JMP  L_161
	JMP  L_160
;				j=pointer; 
L_161:
	JMP  L_159
L_160:
	LEA  BX, [AutoC151-13+BP]
	PUSH BX
	MOV  BX, +3
	POP  DI
	MOV  Word [DI], BX
;				/* add entry as pointer */ 
;				} 
;			if(argptr=findloc(n)) 
L_158:
	LEA  BX, [AutoC151-11+BP]
	PUSH BX
	LEA  BX, [AutoC151-9+BP]
	PUSH BX
	CALL czfindloc
	ADD  SP, +2
	POP  DI
	MOV  Word [DI], BX
	OR   BX, BX
	JNZ  $+5
	JMP  L_162
;				{argptr[ident]=j; 
	LEA  BX, [AutoC151-11+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +9
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC151-13+BP]
	MOV  BX, [BX]
	POP  DI
	MOV  Byte [DI], BL
;				/* save type info for arg just  
;				   found. */ 
;				argptr[type]=t; 
	LEA  BX, [AutoC151-11+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +10
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC151+6+BP]
	MOV  BX, [BX]
	POP  DI
	MOV  Byte [DI], BL
;				locaddr=top-(argptr[offset+1]<<8) 
	LEA  BX, [AutoC151-15+BP]
	PUSH BX
	LEA  BX, [AutoC151+4+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC151-11+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +12
	PUSH BX
	MOV  BX, +1
	POP  DX
	ADD  BX, DX
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +8
	POP  DX
	MOV  CX, BX
	SAL  DX, CL
	MOV  BX, DX
;					-argptr[offset]+2; 
	POP  DX
	SUB  DX, BX
	MOV  BX, DX
	PUSH BX
	LEA  BX, [AutoC151-11+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +12
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DX
	SUB  DX, BX
	MOV  BX, DX
	PUSH BX
	MOV  BX, +2
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
;				/*Calculate offset to arg taking 
;				  into account the return address 
;				  and the saved BP register left 
;				  on the stack. */ 
;				argptr[offset]=locaddr; 
	LEA  BX, [AutoC151-11+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +12
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC151-15+BP]
	MOV  BX, [BX]
	POP  DI
	MOV  Byte [DI], BL
;				argptr[offset+1]=locaddr>>8; 
	LEA  BX, [AutoC151-11+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +12
	PUSH BX
	MOV  BX, +1
	POP  DX
	ADD  BX, DX
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC151-15+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +8
	POP  DX
	MOV  CX, BX
	SAR  DX, CL
	MOV  BX, DX
	POP  DI
	MOV  Byte [DI], BL
;				/*save offset back in local symbol 
;				  table entry. */ 
;				} 
;			else 
	JMP  L_163
L_162:
;				error("expecting argument name"); 
	MOV  BX, L_151+4
	PUSH BX
	CALL czerror
	ADD  SP, +2
L_163:
;			} 
;		else 
	JMP  L_164
L_157:
;			illname(); 
	CALL czillname
L_164:
;		argstk=argstk-2;	/* cnt down */ 
	MOV  BX, [Word czargstk]
	PUSH BX
	MOV  BX, +2
	POP  DX
	SUB  DX, BX
	MOV  BX, DX
	MOV  Word [czargstk], BX
;		if(endst()) 
	CALL czendst
	OR   BX, BX
	JNZ  $+5
	JMP  L_165
;			return; 
	ADD  SP, AutoC151
	POP  BP
	RET
;		if(match(",")==0) 
L_165:
	MOV  BX, L_151+28
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_166
;			error("expected comma"); 
	MOV  BX, L_151+30
	PUSH BX
	CALL czerror
	ADD  SP, +2
;		} 
L_166:
	JMP  L_152
L_153:
;	} 
	ADD  SP, AutoC151
	POP  BP
	RET

AutoC151	EQU 15
;	czt	VAR	INT	+6
;	cztop	VAR	INT	+4
;	czn	ARRAY	CHAR	-9
;	czargptr	PTR	CHAR	-11
;	czj	VAR	INT	-13
;	czlocaddr	VAR	INT	-15

	  [SECTION .dseg]
L_151	DB "*",0
	DB "[",0
	DB "expecting argument name",0
	DB ",",0
	DB "expected comma",0

	  [SECTION .cseg]
;/*					*/ 
;/*	Statement parser		*/ 
;/*					*/ 
;/* called whenever syntax requires	*/ 
;/*	a statement. 			 */ 
;/*  this routine performs that statement */ 
;/*  and returns a number telling which one */ 
;statement() 
czstatement:
	PUSH BP
	SUB  SP, AutoC167
	MOV  BP, SP

;{ 
;	/** if(cpm(11,0) & 1)	** check for ctrl-C gtf 7/17/80 */ 
;	/**	if(getchar()==3)	**/ 
;	/**		abort();	**/ 
; 
;	if ((chr()==0) & (eof)) return; 
	CALL czchr
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	PUSH BX
	MOV  BX, [Word czeof]
	POP  DX
	AND  BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_168
	POP  BP
	RET
;	else if(amatch("char",4)) 
	JMP  L_169
L_168:
	MOV  BX, L_167+0
	PUSH BX
	MOV  BX, +4
	PUSH BX
	CALL czamatch
	ADD  SP, +4
	OR   BX, BX
	JNZ  $+5
	JMP  L_170
;		{declloc(cchar);ns();} 
	MOV  BX, +1
	PUSH BX
	CALL czdeclloc
	ADD  SP, +2
	CALL czns
;	else if(amatch("int",3)) 
	JMP  L_171
L_170:
	MOV  BX, L_167+5
	PUSH BX
	MOV  BX, +3
	PUSH BX
	CALL czamatch
	ADD  SP, +4
	OR   BX, BX
	JNZ  $+5
	JMP  L_172
;		{declloc(cint);ns();} 
	MOV  BX, +2
	PUSH BX
	CALL czdeclloc
	ADD  SP, +2
	CALL czns
;	else if(match("{"))compound(); 
	JMP  L_173
L_172:
	MOV  BX, L_167+9
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_174
	CALL czcompound
;	else if(amatch("if",2)) 
	JMP  L_175
L_174:
	MOV  BX, L_167+11
	PUSH BX
	MOV  BX, +2
	PUSH BX
	CALL czamatch
	ADD  SP, +4
	OR   BX, BX
	JNZ  $+5
	JMP  L_176
;		{doif();lastst=stif;} 
	CALL czdoif
	MOV  BX, +1
	MOV  Word [czlastst], BX
;	else if(amatch("do",2)) 
	JMP  L_177
L_176:
	MOV  BX, L_167+14
	PUSH BX
	MOV  BX, +2
	PUSH BX
	CALL czamatch
	ADD  SP, +4
	OR   BX, BX
	JNZ  $+5
	JMP  L_178
;		{dodo();lastst=stwhile;} 
	CALL czdodo
	MOV  BX, +2
	MOV  Word [czlastst], BX
;	else if(amatch("while",5)) 
	JMP  L_179
L_178:
	MOV  BX, L_167+17
	PUSH BX
	MOV  BX, +5
	PUSH BX
	CALL czamatch
	ADD  SP, +4
	OR   BX, BX
	JNZ  $+5
	JMP  L_180
;		{dowhile();lastst=stwhile;} 
	CALL czdowhile
	MOV  BX, +2
	MOV  Word [czlastst], BX
;	else if(amatch("return",6)) 
	JMP  L_181
L_180:
	MOV  BX, L_167+23
	PUSH BX
	MOV  BX, +6
	PUSH BX
	CALL czamatch
	ADD  SP, +4
	OR   BX, BX
	JNZ  $+5
	JMP  L_182
;		{doreturn();ns();lastst=streturn;} 
	CALL czdoreturn
	CALL czns
	MOV  BX, +3
	MOV  Word [czlastst], BX
;	else if(amatch("break",5)) 
	JMP  L_183
L_182:
	MOV  BX, L_167+30
	PUSH BX
	MOV  BX, +5
	PUSH BX
	CALL czamatch
	ADD  SP, +4
	OR   BX, BX
	JNZ  $+5
	JMP  L_184
;		{dobreak();ns();lastst=stbreak;} 
	CALL czdobreak
	CALL czns
	MOV  BX, +4
	MOV  Word [czlastst], BX
;	else if(amatch("continue",8)) 
	JMP  L_185
L_184:
	MOV  BX, L_167+36
	PUSH BX
	MOV  BX, +8
	PUSH BX
	CALL czamatch
	ADD  SP, +4
	OR   BX, BX
	JNZ  $+5
	JMP  L_186
;		{docont();ns();lastst=stcont;} 
	CALL czdocont
	CALL czns
	MOV  BX, +5
	MOV  Word [czlastst], BX
;	else if(match(";")); 
	JMP  L_187
L_186:
	MOV  BX, L_167+45
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_188
;	else if(match("#asm")) 
	JMP  L_189
L_188:
	MOV  BX, L_167+47
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_190
;		{doasm();lastst=stasm;} 
	CALL czdoasm
	MOV  BX, +6
	MOV  Word [czlastst], BX
;	/* if nothing else, assume it's an expression */ 
;	else{expression();ns();lastst=stexp;} 
	JMP  L_191
L_190:
	CALL czexpression
	CALL czns
	MOV  BX, +7
	MOV  Word [czlastst], BX
L_191:
L_189:
L_187:
L_185:
L_183:
L_181:
L_179:
L_177:
L_175:
L_173:
L_171:
L_169:
;	return lastst; 
	MOV  BX, [Word czlastst]
	POP  BP
	RET
;} 

AutoC167	EQU 0

	  [SECTION .dseg]
L_167	DB "char",0
	DB "int",0
	DB "{",0
	DB "if",0
	DB "do",0
	DB "while",0
	DB "return",0
	DB "break",0
	DB "continue",0
	DB ";",0
	DB "#asm",0

	  [SECTION .cseg]
;/*					*/ 
;/*	Semicolon enforcer		*/ 
;/*					*/ 
;/* called whenever syntax requires a semicolon */ 
;ns()	{if(match(";")==0)error("missing semicolon");} 
czns:
	PUSH BP
	SUB  SP, AutoC192
	MOV  BP, SP

	MOV  BX, L_192+0
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_193
	MOV  BX, L_192+2
	PUSH BX
	CALL czerror
	ADD  SP, +2
L_193:
	POP  BP
	RET

AutoC192	EQU 0

	  [SECTION .dseg]
L_192	DB ";",0
	DB "missing semicolon",0

	  [SECTION .cseg]
;/*					*/ 
;/*	Compound statement		*/ 
;/*					*/ 
;/* allow any number of statements to fall between "{}" */ 
;compound() 
czcompound:
	PUSH BP
	SUB  SP, AutoC194
	MOV  BP, SP

;	{ 
;	++ncmp;		/* new level open */ 
	MOV  BX, [Word czncmp]
	INC  BX
	MOV  Word [czncmp], BX
;	while (match("}")==0) statement(); /* do one */ 
L_195:
	MOV  BX, L_194+0
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_196
	CALL czstatement
	JMP  L_195
L_196:
;	--ncmp;		/* close current level */ 
	MOV  BX, [Word czncmp]
	DEC  BX
	MOV  Word [czncmp], BX
;	} 
	POP  BP
	RET

AutoC194	EQU 0

	  [SECTION .dseg]
L_194	DB "}",0

	  [SECTION .cseg]
;/*					*/ 
;/*		"if" statement		*/ 
;/*					*/ 
;doif() 
czdoif:
	PUSH BP
	SUB  SP, AutoC197
	MOV  BP, SP

;	{ 
;	int flev,fsp,flab1,flab2; 
;	flev=locptr;	/* record current local level */ 
	LEA  BX, [AutoC197-2+BP]
	PUSH BX
	MOV  BX, [Word czlocptr]
	POP  DI
	MOV  Word [DI], BX
;	fsp=Zsp;		/* record current stk ptr */ 
	LEA  BX, [AutoC197-4+BP]
	PUSH BX
	MOV  BX, [Word czZsp]
	POP  DI
	MOV  Word [DI], BX
;	flab1=getlabel(); /* get label for false branch */ 
	LEA  BX, [AutoC197-6+BP]
	PUSH BX
	CALL czgetlabel
	POP  DI
	MOV  Word [DI], BX
;	cctest(flab1);	/* get expression, and branch false */ 
	LEA  BX, [AutoC197-6+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czcctest
	ADD  SP, +2
;	statement();	/* if true, do a statement */ 
	CALL czstatement
;	Zsp=modstk(fsp);	/* then clean up the stack */ 
	LEA  BX, [AutoC197-4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czmodstk
	ADD  SP, +2
	MOV  Word [czZsp], BX
;	locptr=flev;	/* and deallocate any locals */ 
	LEA  BX, [AutoC197-2+BP]
	MOV  BX, [BX]
	MOV  Word [czlocptr], BX
;	if (amatch("else",4)==0)	/* if...else ? */ 
	MOV  BX, L_197+0
	PUSH BX
	MOV  BX, +4
	PUSH BX
	CALL czamatch
	ADD  SP, +4
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_198
;		/* simple "if"...print false label */ 
;		{printlabel(flab1);colon();nl(); 
	LEA  BX, [AutoC197-6+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czprintlabel
	ADD  SP, +2
	CALL czcolon
	CALL cznl
;		return;		/* and exit */ 
	ADD  SP, AutoC197
	POP  BP
	RET
;		} 
;	/* an "if...else" statement. */ 
;	jump(flab2=getlabel());	/* jump around false code */ 
L_198:
	LEA  BX, [AutoC197-8+BP]
	PUSH BX
	CALL czgetlabel
	POP  DI
	MOV  Word [DI], BX
	PUSH BX
	CALL czjump
	ADD  SP, +2
;	printlabel(flab1);colon();nl();	/* print false label */ 
	LEA  BX, [AutoC197-6+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czprintlabel
	ADD  SP, +2
	CALL czcolon
	CALL cznl
;	statement();		/* and do "else" clause */ 
	CALL czstatement
;	Zsp=modstk(fsp);		/* then clean up stk ptr */ 
	LEA  BX, [AutoC197-4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czmodstk
	ADD  SP, +2
	MOV  Word [czZsp], BX
;	locptr=flev;		/* and deallocate locals */ 
	LEA  BX, [AutoC197-2+BP]
	MOV  BX, [BX]
	MOV  Word [czlocptr], BX
;	printlabel(flab2);colon();nl();	/* print true label */ 
	LEA  BX, [AutoC197-8+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czprintlabel
	ADD  SP, +2
	CALL czcolon
	CALL cznl
;	} 
	ADD  SP, AutoC197
	POP  BP
	RET

AutoC197	EQU 8
;	czflev	VAR	INT	-2
;	czfsp	VAR	INT	-4
;	czflab1	VAR	INT	-6
;	czflab2	VAR	INT	-8

	  [SECTION .dseg]
L_197	DB "else",0

	  [SECTION .cseg]
;/*					*/ 
;/*	"do" statement "while" (expr)	*/ 
;/*					*/ 
;dodo() 
czdodo:
	PUSH BP
	SUB  SP, AutoC199
	MOV  BP, SP

;	{ 
;	int wq[wqsiz];		/* allocate local queue */ 
;	wq[wqsym]=locptr;	/* record local level */ 
	LEA  BX, [AutoC199-10+BP]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, [Word czlocptr]
	POP  DI
	MOV  Word [DI], BX
;	wq[wqsp]=Zsp;		/* and stk ptr */ 
	LEA  BX, [AutoC199-10+BP]
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, [Word czZsp]
	POP  DI
	MOV  Word [DI], BX
;	wq[wqloop]=getlabel();	/* and looping label */ 
	LEA  BX, [AutoC199-10+BP]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	CALL czgetlabel
	POP  DI
	MOV  Word [DI], BX
;	wq[wqlab]=getlabel();	/* and exit label */ 
	LEA  BX, [AutoC199-10+BP]
	PUSH BX
	MOV  BX, +3
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	CALL czgetlabel
	POP  DI
	MOV  Word [DI], BX
;	wq[wqlab2]=getlabel();	/* and loop label */ 
	LEA  BX, [AutoC199-10+BP]
	PUSH BX
	MOV  BX, +4
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	CALL czgetlabel
	POP  DI
	MOV  Word [DI], BX
;	addwhile(wq);		/* add entry to queue */ 
	LEA  BX, [AutoC199-10+BP]
	PUSH BX
	CALL czaddwhile
	ADD  SP, +2
;				/* (for "break" statement) */ 
;	printlabel(wq[wqlab2]);colon();nl(); /* loop label */ 
	LEA  BX, [AutoC199-10+BP]
	PUSH BX
	MOV  BX, +4
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	CALL czprintlabel
	ADD  SP, +2
	CALL czcolon
	CALL cznl
;	statement();		/* do a statement */ 
	CALL czstatement
;	if (amatch("while",5)==0) 
	MOV  BX, L_199+0
	PUSH BX
	MOV  BX, +5
	PUSH BX
	CALL czamatch
	ADD  SP, +4
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_200
;		{error("'while' expected."); 
	MOV  BX, L_199+6
	PUSH BX
	CALL czerror
	ADD  SP, +2
;		return;		/* and exit */ 
	ADD  SP, AutoC199
	POP  BP
	RET
;		} 
;	printlabel(wq[wqloop]);colon();nl(); /* cont label */ 
L_200:
	LEA  BX, [AutoC199-10+BP]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	CALL czprintlabel
	ADD  SP, +2
	CALL czcolon
	CALL cznl
;	cctest(wq[wqlab]);	/* get expression and branch false */ 
	LEA  BX, [AutoC199-10+BP]
	PUSH BX
	MOV  BX, +3
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	CALL czcctest
	ADD  SP, +2
;	jump(wq[wqlab2]);	/* continue to loop */ 
	LEA  BX, [AutoC199-10+BP]
	PUSH BX
	MOV  BX, +4
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	CALL czjump
	ADD  SP, +2
;	printlabel(wq[wqlab]);colon();nl(); /* exit label */ 
	LEA  BX, [AutoC199-10+BP]
	PUSH BX
	MOV  BX, +3
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	CALL czprintlabel
	ADD  SP, +2
	CALL czcolon
	CALL cznl
;	ns();			/* look for ending semi-colon. */ 
	CALL czns
;	locptr=wq[wqsym];	/* deallocate locals */ 
	LEA  BX, [AutoC199-10+BP]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	MOV  Word [czlocptr], BX
;	Zsp=modstk(wq[wqsp]);	/* clean up stk ptr */ 
	LEA  BX, [AutoC199-10+BP]
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	CALL czmodstk
	ADD  SP, +2
	MOV  Word [czZsp], BX
;	delwhile();		/* delete queue entry */ 
	CALL czdelwhile
;	} 
	ADD  SP, AutoC199
	POP  BP
	RET

AutoC199	EQU 10
;	czwq	ARRAY	INT	-10

	  [SECTION .dseg]
L_199	DB "while",0
	DB "'while' expected.",0

	  [SECTION .cseg]
;/*					*/ 
;/*	"while" (expr) statement	*/ 
;/*					*/ 
;dowhile() 
czdowhile:
	PUSH BP
	SUB  SP, AutoC201
	MOV  BP, SP

;	{ 
;	int wq[wqsiz];		/* allocate local queue */ 
;	wq[wqsym]=locptr;	/* record local level */ 
	LEA  BX, [AutoC201-10+BP]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, [Word czlocptr]
	POP  DI
	MOV  Word [DI], BX
;	wq[wqsp]=Zsp;		/* and stk ptr */ 
	LEA  BX, [AutoC201-10+BP]
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, [Word czZsp]
	POP  DI
	MOV  Word [DI], BX
;	wq[wqloop]=getlabel();	/* and looping label */ 
	LEA  BX, [AutoC201-10+BP]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	CALL czgetlabel
	POP  DI
	MOV  Word [DI], BX
;	wq[wqlab]=getlabel();	/* and exit label */ 
	LEA  BX, [AutoC201-10+BP]
	PUSH BX
	MOV  BX, +3
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	CALL czgetlabel
	POP  DI
	MOV  Word [DI], BX
;	addwhile(wq);		/* add entry to queue */ 
	LEA  BX, [AutoC201-10+BP]
	PUSH BX
	CALL czaddwhile
	ADD  SP, +2
;				/* (for "break" statement) */ 
;	printlabel(wq[wqloop]);colon();nl(); /* loop label */ 
	LEA  BX, [AutoC201-10+BP]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	CALL czprintlabel
	ADD  SP, +2
	CALL czcolon
	CALL cznl
;	cctest(wq[wqlab]);	/* see if true */ 
	LEA  BX, [AutoC201-10+BP]
	PUSH BX
	MOV  BX, +3
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	CALL czcctest
	ADD  SP, +2
;	statement();		/* if so, do a statement */ 
	CALL czstatement
;	jump(wq[wqloop]);	/* loop to label */ 
	LEA  BX, [AutoC201-10+BP]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	CALL czjump
	ADD  SP, +2
;	printlabel(wq[wqlab]);colon();nl(); /* exit label */ 
	LEA  BX, [AutoC201-10+BP]
	PUSH BX
	MOV  BX, +3
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	CALL czprintlabel
	ADD  SP, +2
	CALL czcolon
	CALL cznl
;	locptr=wq[wqsym];	/* deallocate locals */ 
	LEA  BX, [AutoC201-10+BP]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	MOV  Word [czlocptr], BX
;	Zsp=modstk(wq[wqsp]);	/* clean up stk ptr */ 
	LEA  BX, [AutoC201-10+BP]
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	CALL czmodstk
	ADD  SP, +2
	MOV  Word [czZsp], BX
;	delwhile();		/* delete queue entry */ 
	CALL czdelwhile
;	} 
	ADD  SP, AutoC201
	POP  BP
	RET

AutoC201	EQU 10
;	czwq	ARRAY	INT	-10
;/*					*/ 
;/*	"return" statement		*/ 
;/*					*/ 
;doreturn() 
czdoreturn:
	PUSH BP
	SUB  SP, AutoC202
	MOV  BP, SP

;	{ 
;	/* if not end of statement, get an expression */ 
;	if(endst()==0)expression(); 
	CALL czendst
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_203
	CALL czexpression
;	rtnstk(0);	/* clean up stk */ 
L_203:
	MOV  BX, +0
	PUSH BX
	CALL czrtnstk
	ADD  SP, +2
;	zret();		/* and exit function */ 
	CALL czzret
;	} 
	POP  BP
	RET

AutoC202	EQU 0
;/*					*/ 
;/*	"break" statement		*/ 
;/*					*/ 
;dobreak() 
czdobreak:
	PUSH BP
	SUB  SP, AutoC204
	MOV  BP, SP

;	{ 
;	int *ptr; 
;	/* see if any "whiles" are open */ 
;	if ((ptr=readwhile())==0) return;	/* no */ 
	LEA  BX, [AutoC204-2+BP]
	PUSH BX
	CALL czreadwhile
	POP  DI
	MOV  Word [DI], BX
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_205
	ADD  SP, AutoC204
	POP  BP
	RET
;	modstk((ptr[wqsp]));	/* else clean up stk ptr */ 
L_205:
	LEA  BX, [AutoC204-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	CALL czmodstk
	ADD  SP, +2
;	jump(ptr[wqlab]);	/* jump to exit label */ 
	LEA  BX, [AutoC204-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +3
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	CALL czjump
	ADD  SP, +2
;	} 
	ADD  SP, AutoC204
	POP  BP
	RET

AutoC204	EQU 2
;	czptr	PTR	INT	-2
;/*					*/ 
;/*	"continue" statement		*/ 
;/*					*/ 
;docont() 
czdocont:
	PUSH BP
	SUB  SP, AutoC206
	MOV  BP, SP

;	{ 
;	int *ptr; 
;	/* see if any "whiles" are open */ 
;	if ((ptr=readwhile())==0) return;	/* no */ 
	LEA  BX, [AutoC206-2+BP]
	PUSH BX
	CALL czreadwhile
	POP  DI
	MOV  Word [DI], BX
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_207
	ADD  SP, AutoC206
	POP  BP
	RET
;	modstk((ptr[wqsp]));	/* else clean up stk ptr */ 
L_207:
	LEA  BX, [AutoC206-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	CALL czmodstk
	ADD  SP, +2
;	jump(ptr[wqloop]);	/* jump to loop label */ 
	LEA  BX, [AutoC206-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	CALL czjump
	ADD  SP, +2
;	} 
	ADD  SP, AutoC206
	POP  BP
	RET

AutoC206	EQU 2
;	czptr	PTR	INT	-2
; 
;/*					*/ 
;/*	"asm" pseudo-statement		*/ 
;/*					*/ 
;/* enters mode where assembly language statement are */ 
;/*	passed intact through parser	*/ 
; 
;doasm() 
czdoasm:
	PUSH BP
	SUB  SP, AutoC208
	MOV  BP, SP

;{ 
;	cmode=0;		/* mark mode as "asm" */ 
	MOV  BX, +0
	MOV  Word [czcmode], BX
;	while (1) 
L_209:
	MOV  BX, +1
	OR   BX, BX
	JNZ  $+5
	JMP  L_210
;		{ 
;		inline();	/* get and print lines */ 
	CALL czinline
;		if (match("#endasm")) 
	MOV  BX, L_208+0
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_211
;			{	/* until... */ 
;			comment(); 
	CALL czcomment
;			outstr(line); /** pass back endasm comment **/  
	MOV  BX, czline
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
;			break; 
	JMP  L_210
;			} 
;		if (eof) break; 
L_211:
	MOV  BX, [Word czeof]
	OR   BX, BX
	JNZ  $+5
	JMP  L_212
	JMP  L_210
;		outstr(line); 
L_212:
	MOV  BX, czline
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
;		nl(); 
	CALL cznl
;		} 
	JMP  L_209
L_210:
;/**	kill();		* invalidate line */ 
;	cmode=1;		/* then back to parse level */ 
	MOV  BX, +1
	MOV  Word [czcmode], BX
;} 
	POP  BP
	RET

AutoC208	EQU 0

	  [SECTION .dseg]
L_208	DB "#endasm",0

	  [SECTION .cseg]
; 
;/** EO C86N-2.C **/ 
; 
;/*	>>>>> start of cc3 <<<<<<<<<	*/ 
; 
;/*					*/ 
;/*	Perform a function call		*/ 
;/*					*/ 
;/* called from heir11, this routine will either call */ 
;/*	the named function, or if the supplied ptr is */ 
;/*	zero, will call the contents of HL		*/ 
;callfunction(ptr) 
czcallfunction:
;	char *ptr;	/* symbol table entry (or 0) */ 
	PUSH BP
	SUB  SP, AutoC213
	MOV  BP, SP

;{	int nargs; 
;	nargs=0; 
	LEA  BX, [AutoC213-2+BP]
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
;	blanks();	/* already saw open paren */ 
	CALL czblanks
;	if(ptr==0)zpush();	/* calling HL */ 
	LEA  BX, [AutoC213+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_214
	CALL czzpush
;	while(streq(line+lptr,")")==0) 
L_214:
L_215:
	MOV  BX, czline
	PUSH BX
	MOV  BX, [Word czlptr]
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, L_213+0
	PUSH BX
	CALL czstreq
	ADD  SP, +4
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_216
;		{if(endst())break; 
	CALL czendst
	OR   BX, BX
	JNZ  $+5
	JMP  L_217
	JMP  L_216
;		expression();	/* get an argument */ 
L_217:
	CALL czexpression
;		if(ptr==0)swapstk(); /* don't push addr */ 
	LEA  BX, [AutoC213+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_218
	CALL czswapstk
;		zpush();	/* push argument */ 
L_218:
	CALL czzpush
;		nargs=nargs+2;	/* count args*2 */ 
	LEA  BX, [AutoC213-2+BP]
	PUSH BX
	LEA  BX, [AutoC213-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
;		if (match(",")==0) break; 
	MOV  BX, L_213+2
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_219
	JMP  L_216
;		} 
L_219:
	JMP  L_215
L_216:
;	needbrack(")"); 
	MOV  BX, L_213+4
	PUSH BX
	CALL czneedbrack
	ADD  SP, +2
;	if(ptr)zcall(ptr); 
	LEA  BX, [AutoC213+4+BP]
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_220
	LEA  BX, [AutoC213+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czzcall
	ADD  SP, +2
;	else callstk(); 
	JMP  L_221
L_220:
	CALL czcallstk
L_221:
;	Zsp=modstk(Zsp+nargs);	/* clean up arguments */ 
	MOV  BX, [Word czZsp]
	PUSH BX
	LEA  BX, [AutoC213-2+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	PUSH BX
	CALL czmodstk
	ADD  SP, +2
	MOV  Word [czZsp], BX
;} 
	ADD  SP, AutoC213
	POP  BP
	RET

AutoC213	EQU 2
;	czptr	PTR	CHAR	+4
;	cznargs	VAR	INT	-2

	  [SECTION .dseg]
L_213	DB ")",0
	DB ",",0
	DB ")",0

	  [SECTION .cseg]
;junk() 
czjunk:
	PUSH BP
	SUB  SP, AutoC222
	MOV  BP, SP

;{	if(an(inbyte())) 
	CALL czinbyte
	PUSH BX
	CALL czan
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_223
;		while(an(chr()))gch(); 
L_224:
	CALL czchr
	PUSH BX
	CALL czan
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_225
	CALL czgch
	JMP  L_224
L_225:
;	else while(an(chr())==0) 
	JMP  L_226
L_223:
L_227:
	CALL czchr
	PUSH BX
	CALL czan
	ADD  SP, +2
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_228
;		{if(chr()==0)break; 
	CALL czchr
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_229
	JMP  L_228
;		gch(); 
L_229:
	CALL czgch
;		} 
	JMP  L_227
L_228:
L_226:
;	blanks(); 
	CALL czblanks
;} 
	POP  BP
	RET

AutoC222	EQU 0
;endst() 
czendst:
	PUSH BP
	SUB  SP, AutoC230
	MOV  BP, SP

;{	blanks(); 
	CALL czblanks
;	return ((streq(line+lptr,";")|(chr()==0))); 
	MOV  BX, czline
	PUSH BX
	MOV  BX, [Word czlptr]
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, L_230+0
	PUSH BX
	CALL czstreq
	ADD  SP, +4
	PUSH BX
	CALL czchr
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	POP  DX
	OR   BX, DX
	POP  BP
	RET
;} 

AutoC230	EQU 0

	  [SECTION .dseg]
L_230	DB ";",0

	  [SECTION .cseg]
;illname() 
czillname:
	PUSH BP
	SUB  SP, AutoC231
	MOV  BP, SP

;{	error("illegal symbol name");junk();} 
	MOV  BX, L_231+0
	PUSH BX
	CALL czerror
	ADD  SP, +2
	CALL czjunk
	POP  BP
	RET

AutoC231	EQU 0

	  [SECTION .dseg]
L_231	DB "illegal symbol name",0

	  [SECTION .cseg]
;multidef(sname) 
czmultidef:
;	char *sname; 
	PUSH BP
	SUB  SP, AutoC232
	MOV  BP, SP

;{	error("already defined"); 
	MOV  BX, L_232+0
	PUSH BX
	CALL czerror
	ADD  SP, +2
;	comment(); 
	CALL czcomment
;	outstr(sname);nl(); 
	LEA  BX, [AutoC232+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
	CALL cznl
;} 
	POP  BP
	RET

AutoC232	EQU 0
;	czsname	PTR	CHAR	+4

	  [SECTION .dseg]
L_232	DB "already defined",0

	  [SECTION .cseg]
;needbrack(str) 
czneedbrack:
;	char *str; 
	PUSH BP
	SUB  SP, AutoC233
	MOV  BP, SP

;{	if (match(str)==0) 
	LEA  BX, [AutoC233+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_234
;		{error("missing bracket"); 
	MOV  BX, L_233+0
	PUSH BX
	CALL czerror
	ADD  SP, +2
;		comment();outstr(str);nl(); 
	CALL czcomment
	LEA  BX, [AutoC233+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
	CALL cznl
;		} 
;} 
L_234:
	POP  BP
	RET

AutoC233	EQU 0
;	czstr	PTR	CHAR	+4

	  [SECTION .dseg]
L_233	DB "missing bracket",0

	  [SECTION .cseg]
;needlval() 
czneedlval:
	PUSH BP
	SUB  SP, AutoC235
	MOV  BP, SP

;{	error("must be lvalue"); 
	MOV  BX, L_235+0
	PUSH BX
	CALL czerror
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC235	EQU 0

	  [SECTION .dseg]
L_235	DB "must be lvalue",0

	  [SECTION .cseg]
;findglb(sname) 
czfindglb:
;	char *sname; 
	PUSH BP
	SUB  SP, AutoC236
	MOV  BP, SP

;{	char *ptr; 
;	ptr=startglb; 
	LEA  BX, [AutoC236-2+BP]
	PUSH BX
	MOV  BX, czsymtab
	POP  DI
	MOV  Word [DI], BX
;	while(ptr!=glbptr) 
L_237:
	LEA  BX, [AutoC236-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, [Word czglbptr]
	POP  DX
	CALL ccne
	OR   BX, BX
	JNZ  $+5
	JMP  L_238
;		{if(astreq(sname,ptr,namemax))return ptr; 
	LEA  BX, [AutoC236+4+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC236-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +8
	PUSH BX
	CALL czastreq
	ADD  SP, +6
	OR   BX, BX
	JNZ  $+5
	JMP  L_239
	LEA  BX, [AutoC236-2+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC236
	POP  BP
	RET
;		ptr=ptr+symsiz; 
L_239:
	LEA  BX, [AutoC236-2+BP]
	PUSH BX
	LEA  BX, [AutoC236-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +14
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
;		} 
	JMP  L_237
L_238:
;	return 0; 
	MOV  BX, +0
	ADD  SP, AutoC236
	POP  BP
	RET
;} 

AutoC236	EQU 2
;	czsname	PTR	CHAR	+4
;	czptr	PTR	CHAR	-2
;findloc(sname) 
czfindloc:
;	char *sname; 
	PUSH BP
	SUB  SP, AutoC240
	MOV  BP, SP

;{	char *ptr; 
;	ptr=startloc; 
	LEA  BX, [AutoC240-2+BP]
	PUSH BX
	MOV  BX, czsymtab
	PUSH BX
	MOV  BX, +300
	PUSH BX
	MOV  BX, +14
	POP  DX
	MOV  AX, BX
	PUSH DX
	MUL  DX
	POP  DX
	MOV  BX, AX
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +14
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
;	while(ptr!=locptr) 
L_241:
	LEA  BX, [AutoC240-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, [Word czlocptr]
	POP  DX
	CALL ccne
	OR   BX, BX
	JNZ  $+5
	JMP  L_242
;		{if(astreq(sname,ptr,namemax))return ptr; 
	LEA  BX, [AutoC240+4+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC240-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +8
	PUSH BX
	CALL czastreq
	ADD  SP, +6
	OR   BX, BX
	JNZ  $+5
	JMP  L_243
	LEA  BX, [AutoC240-2+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC240
	POP  BP
	RET
;		ptr=ptr+symsiz; 
L_243:
	LEA  BX, [AutoC240-2+BP]
	PUSH BX
	LEA  BX, [AutoC240-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +14
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
;		} 
	JMP  L_241
L_242:
;	return 0; 
	MOV  BX, +0
	ADD  SP, AutoC240
	POP  BP
	RET
;} 

AutoC240	EQU 2
;	czsname	PTR	CHAR	+4
;	czptr	PTR	CHAR	-2
;addglb(sname,id,typ,value) 
czaddglb:
;	char *sname,id,typ; 
;	int value; 
	PUSH BP
	SUB  SP, AutoC244
	MOV  BP, SP

;{	char *ptr; 
;	if(cptr=findglb(sname))return cptr; 
	LEA  BX, [AutoC244+10+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czfindglb
	ADD  SP, +2
	MOV  Word [czcptr], BX
	OR   BX, BX
	JNZ  $+5
	JMP  L_245
	MOV  BX, [Word czcptr]
	ADD  SP, AutoC244
	POP  BP
	RET
;	if(glbptr>=endglb) 
L_245:
	MOV  BX, [Word czglbptr]
	PUSH BX
	MOV  BX, czsymtab
	PUSH BX
	MOV  BX, +300
	PUSH BX
	MOV  BX, +14
	POP  DX
	MOV  AX, BX
	PUSH DX
	MUL  DX
	POP  DX
	MOV  BX, AX
	POP  DX
	ADD  BX, DX
	POP  DX
	CALL ccuge
	OR   BX, BX
	JNZ  $+5
	JMP  L_246
;		{error("global symbol table overflow"); 
	MOV  BX, L_244+0
	PUSH BX
	CALL czerror
	ADD  SP, +2
;		return 0; 
	MOV  BX, +0
	ADD  SP, AutoC244
	POP  BP
	RET
;		} 
;	cptr=ptr=glbptr; 
L_246:
	LEA  BX, [AutoC244-2+BP]
	PUSH BX
	MOV  BX, [Word czglbptr]
	POP  DI
	MOV  Word [DI], BX
	MOV  Word [czcptr], BX
;	while(an(*ptr++ = *sname++));	/* copy name */ 
L_247:
	LEA  BX, [AutoC244-2+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	PUSH BX
	LEA  BX, [AutoC244+10+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
	PUSH BX
	CALL czan
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_248
	JMP  L_247
L_248:
;	cptr[ident]=id; 
	MOV  BX, [Word czcptr]
	PUSH BX
	MOV  BX, +9
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC244+8+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
;	cptr[type]=typ; 
	MOV  BX, [Word czcptr]
	PUSH BX
	MOV  BX, +10
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC244+6+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
;	cptr[storage]=statik; 
	MOV  BX, [Word czcptr]
	PUSH BX
	MOV  BX, +11
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +1
	POP  DI
	MOV  Byte [DI], BL
;	cptr[offset]=value; 
	MOV  BX, [Word czcptr]
	PUSH BX
	MOV  BX, +12
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC244+4+BP]
	MOV  BX, [BX]
	POP  DI
	MOV  Byte [DI], BL
;	cptr[offset+1]=value>>8; 
	MOV  BX, [Word czcptr]
	PUSH BX
	MOV  BX, +12
	PUSH BX
	MOV  BX, +1
	POP  DX
	ADD  BX, DX
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC244+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +8
	POP  DX
	MOV  CX, BX
	SAR  DX, CL
	MOV  BX, DX
	POP  DI
	MOV  Byte [DI], BL
;	glbptr=glbptr+symsiz; 
	MOV  BX, [Word czglbptr]
	PUSH BX
	MOV  BX, +14
	POP  DX
	ADD  BX, DX
	MOV  Word [czglbptr], BX
;	return cptr; 
	MOV  BX, [Word czcptr]
	ADD  SP, AutoC244
	POP  BP
	RET
;} 

AutoC244	EQU 2
;	czsname	PTR	CHAR	+10
;	czid	VAR	CHAR	+8
;	cztyp	VAR	CHAR	+6
;	czvalue	VAR	INT	+4
;	czptr	PTR	CHAR	-2

	  [SECTION .dseg]
L_244	DB "global symbol table overflow",0

	  [SECTION .cseg]
;addloc(sname,id,typ,value) 
czaddloc:
;	char *sname,id,typ; 
;	int value; 
	PUSH BP
	SUB  SP, AutoC249
	MOV  BP, SP

;{	char *ptr; 
;	if(cptr=findloc(sname))return cptr; 
	LEA  BX, [AutoC249+10+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czfindloc
	ADD  SP, +2
	MOV  Word [czcptr], BX
	OR   BX, BX
	JNZ  $+5
	JMP  L_250
	MOV  BX, [Word czcptr]
	ADD  SP, AutoC249
	POP  BP
	RET
;	if(locptr>=endloc) 
L_250:
	MOV  BX, [Word czlocptr]
	PUSH BX
	MOV  BX, czsymtab
	PUSH BX
	MOV  BX, +5040
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +14
	POP  DX
	SUB  DX, BX
	MOV  BX, DX
	POP  DX
	CALL ccuge
	OR   BX, BX
	JNZ  $+5
	JMP  L_251
;		{error("local symbol table overflow"); 
	MOV  BX, L_249+0
	PUSH BX
	CALL czerror
	ADD  SP, +2
;		return 0; 
	MOV  BX, +0
	ADD  SP, AutoC249
	POP  BP
	RET
;		} 
;	cptr=ptr=locptr; 
L_251:
	LEA  BX, [AutoC249-2+BP]
	PUSH BX
	MOV  BX, [Word czlocptr]
	POP  DI
	MOV  Word [DI], BX
	MOV  Word [czcptr], BX
;	while(an(*ptr++ = *sname++));	/* copy name */ 
L_252:
	LEA  BX, [AutoC249-2+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	PUSH BX
	LEA  BX, [AutoC249+10+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
	PUSH BX
	CALL czan
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_253
	JMP  L_252
L_253:
;	cptr[ident]=id; 
	MOV  BX, [Word czcptr]
	PUSH BX
	MOV  BX, +9
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC249+8+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
;	cptr[type]=typ; 
	MOV  BX, [Word czcptr]
	PUSH BX
	MOV  BX, +10
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC249+6+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
;	cptr[storage]=stkloc; 
	MOV  BX, [Word czcptr]
	PUSH BX
	MOV  BX, +11
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +2
	POP  DI
	MOV  Byte [DI], BL
;	cptr[offset]=value; 
	MOV  BX, [Word czcptr]
	PUSH BX
	MOV  BX, +12
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC249+4+BP]
	MOV  BX, [BX]
	POP  DI
	MOV  Byte [DI], BL
;	cptr[offset+1]=value>>8; 
	MOV  BX, [Word czcptr]
	PUSH BX
	MOV  BX, +12
	PUSH BX
	MOV  BX, +1
	POP  DX
	ADD  BX, DX
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC249+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +8
	POP  DX
	MOV  CX, BX
	SAR  DX, CL
	MOV  BX, DX
	POP  DI
	MOV  Byte [DI], BL
;	locptr=locptr+symsiz; 
	MOV  BX, [Word czlocptr]
	PUSH BX
	MOV  BX, +14
	POP  DX
	ADD  BX, DX
	MOV  Word [czlocptr], BX
;	return cptr; 
	MOV  BX, [Word czcptr]
	ADD  SP, AutoC249
	POP  BP
	RET
;} 

AutoC249	EQU 2
;	czsname	PTR	CHAR	+10
;	czid	VAR	CHAR	+8
;	cztyp	VAR	CHAR	+6
;	czvalue	VAR	INT	+4
;	czptr	PTR	CHAR	-2

	  [SECTION .dseg]
L_249	DB "local symbol table overflow",0

	  [SECTION .cseg]
;/* Test if next input string is legal symbol name */ 
;symname(sname) 
czsymname:
;	char *sname; 
	PUSH BP
	SUB  SP, AutoC254
	MOV  BP, SP

;{	int k;char c; 
;	blanks(); 
	CALL czblanks
;	if(alpha(chr())==0)return 0; 
	CALL czchr
	PUSH BX
	CALL czalpha
	ADD  SP, +2
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_255
	MOV  BX, +0
	ADD  SP, AutoC254
	POP  BP
	RET
;	k=0; 
L_255:
	LEA  BX, [AutoC254-2+BP]
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
;	while(an(chr()))sname[k++]=gch(); 
L_256:
	CALL czchr
	PUSH BX
	CALL czan
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_257
	LEA  BX, [AutoC254+4+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC254-2+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	POP  DX
	ADD  BX, DX
	PUSH BX
	CALL czgch
	POP  DI
	MOV  Byte [DI], BL
	JMP  L_256
L_257:
;	sname[k]=0; 
	LEA  BX, [AutoC254+4+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC254-2+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Byte [DI], BL
;	return 1; 
	MOV  BX, +1
	ADD  SP, AutoC254
	POP  BP
	RET
;	} 

AutoC254	EQU 3
;	czsname	PTR	CHAR	+4
;	czk	VAR	INT	-2
;	czc	VAR	CHAR	-3
;/* Return next avail internal label number */ 
;getlabel() 
czgetlabel:
	PUSH BP
	SUB  SP, AutoC258
	MOV  BP, SP

;{	return(++nxtlab); 
	MOV  BX, [Word cznxtlab]
	INC  BX
	MOV  Word [cznxtlab], BX
	POP  BP
	RET
;} 

AutoC258	EQU 0
; 
;/* Print specified number as label */ 
;printlabel(label) int label; 
czprintlabel:
	PUSH BP
	SUB  SP, AutoC259
	MOV  BP, SP

;{	/**	outasm("cc"); **/ 
;	outasm("L_"); 
	MOV  BX, L_259+0
	PUSH BX
	CALL czoutasm
	ADD  SP, +2
;	outudec(label); 
	LEA  BX, [AutoC259+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czoutudec
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC259	EQU 0
;	czlabel	VAR	INT	+4

	  [SECTION .dseg]
L_259	DB "L_",0

	  [SECTION .cseg]
; 
;/* Print specified number as label for stack*/ 
;ostklbl() 
czostklbl:
	PUSH BP
	SUB  SP, AutoC260
	MOV  BP, SP

;{	/**	outasm("cs");  **/ 
;	outasm("AutoC"); 
	MOV  BX, L_260+0
	PUSH BX
	CALL czoutasm
	ADD  SP, +2
;	outudec(litlab); 
	MOV  BX, [Word czlitlab]
	PUSH BX
	CALL czoutudec
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC260	EQU 0

	  [SECTION .dseg]
L_260	DB "AutoC",0

	  [SECTION .cseg]
;/* Test if given character is alpha */ 
;alpha(c) 
czalpha:
;	char c; 
	PUSH BP
	SUB  SP, AutoC261
	MOV  BP, SP

;{	c=c&127; 
	LEA  BX, [AutoC261+4+BP]
	PUSH BX
	LEA  BX, [AutoC261+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +127
	POP  DX
	AND  BX, DX
	POP  DI
	MOV  Byte [DI], BL
;	return(((c>='a')&(c<='z'))| 
	LEA  BX, [AutoC261+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +97
	POP  DX
	CALL ccge
	PUSH BX
	LEA  BX, [AutoC261+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +122
	POP  DX
	CALL ccle
	POP  DX
	AND  BX, DX
	PUSH BX
;		((c>='A')&(c<='Z'))| 
	LEA  BX, [AutoC261+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +65
	POP  DX
	CALL ccge
	PUSH BX
	LEA  BX, [AutoC261+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +90
	POP  DX
	CALL ccle
	POP  DX
	AND  BX, DX
	POP  DX
	OR   BX, DX
	PUSH BX
;		(c=='_')); 
	LEA  BX, [AutoC261+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +95
	POP  DX
	CALL cceq
	POP  DX
	OR   BX, DX
	POP  BP
	RET
;} 

AutoC261	EQU 0
;	czc	VAR	CHAR	+4
;/* Test if given character is numeric */ 
;numeric(c) 
cznumeric:
;	char c; 
	PUSH BP
	SUB  SP, AutoC262
	MOV  BP, SP

;{	c=c&127; 
	LEA  BX, [AutoC262+4+BP]
	PUSH BX
	LEA  BX, [AutoC262+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +127
	POP  DX
	AND  BX, DX
	POP  DI
	MOV  Byte [DI], BL
;	return((c>='0')&(c<='9')); 
	LEA  BX, [AutoC262+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +48
	POP  DX
	CALL ccge
	PUSH BX
	LEA  BX, [AutoC262+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +57
	POP  DX
	CALL ccle
	POP  DX
	AND  BX, DX
	POP  BP
	RET
;} 

AutoC262	EQU 0
;	czc	VAR	CHAR	+4
;/* Test if given character is alphanumeric */ 
;an(c) 
czan:
;	char c; 
	PUSH BP
	SUB  SP, AutoC263
	MOV  BP, SP

;{	return((alpha(c))|(numeric(c))); 
	LEA  BX, [AutoC263+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	CALL czalpha
	ADD  SP, +2
	PUSH BX
	LEA  BX, [AutoC263+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	CALL cznumeric
	ADD  SP, +2
	POP  DX
	OR   BX, DX
	POP  BP
	RET
;} 

AutoC263	EQU 0
;	czc	VAR	CHAR	+4
;/* Print a carriage return and a string only to console */ 
;pl(str) 
czpl:
;	char *str; 
	PUSH BP
	SUB  SP, AutoC264
	MOV  BP, SP

;{	int k; 
;	k=0; 
	LEA  BX, [AutoC264-2+BP]
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
;	putchar(eol); 
	MOV  BX, +10
	PUSH BX
	CALL czputchar
	ADD  SP, +2
;	while(str[k])putchar(str[k++]); 
L_265:
	LEA  BX, [AutoC264+4+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC264-2+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	OR   BX, BX
	JNZ  $+5
	JMP  L_266
	LEA  BX, [AutoC264+4+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC264-2+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	CALL czputchar
	ADD  SP, +2
	JMP  L_265
L_266:
;} 
	ADD  SP, AutoC264
	POP  BP
	RET

AutoC264	EQU 2
;	czstr	PTR	CHAR	+4
;	czk	VAR	INT	-2
;addwhile(ptr) 
czaddwhile:
;	int ptr[]; 
	PUSH BP
	SUB  SP, AutoC267
	MOV  BP, SP

; { 
;	int k; 
;	if (wqptr==wqmax) 
	MOV  BX, [Word czwqptr]
	PUSH BX
	MOV  BX, czwq
	PUSH BX
	MOV  BX, +100
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +5
	SAL  BX, 1
	POP  DX
	SUB  DX, BX
	MOV  BX, DX
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_268
;		{error("too many active whiles");return;} 
	MOV  BX, L_267+0
	PUSH BX
	CALL czerror
	ADD  SP, +2
	ADD  SP, AutoC267
	POP  BP
	RET
;	k=0; 
L_268:
	LEA  BX, [AutoC267-2+BP]
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
;	while (k < wqsiz) 
L_269:
	LEA  BX, [AutoC267-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +5
	POP  DX
	CALL cclt
	OR   BX, BX
	JNZ  $+5
	JMP  L_270
;		{*wqptr++ = ptr[k++];} 
	MOV  BX, [Word czwqptr]
	INC  BX
	INC  BX
	MOV  Word [czwqptr], BX
	DEC  BX
	DEC  BX
	PUSH BX
	LEA  BX, [AutoC267+4+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC267-2+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
	JMP  L_269
L_270:
;} 
	ADD  SP, AutoC267
	POP  BP
	RET

AutoC267	EQU 2
;	czptr	PTR	INT	+4
;	czk	VAR	INT	-2

	  [SECTION .dseg]
L_267	DB "too many active whiles",0

	  [SECTION .cseg]
;delwhile() 
czdelwhile:
	PUSH BP
	SUB  SP, AutoC271
	MOV  BP, SP

;	{if(readwhile()) wqptr=wqptr-wqsiz; 
	CALL czreadwhile
	OR   BX, BX
	JNZ  $+5
	JMP  L_272
	MOV  BX, [Word czwqptr]
	PUSH BX
	MOV  BX, +5
	SAL  BX, 1
	POP  DX
	SUB  DX, BX
	MOV  BX, DX
	MOV  Word [czwqptr], BX
;	} 
L_272:
	POP  BP
	RET

AutoC271	EQU 0
;readwhile() 
czreadwhile:
	PUSH BP
	SUB  SP, AutoC273
	MOV  BP, SP

; { 
;	if (wqptr==wq){error("no active whiles");return 0;} 
	MOV  BX, [Word czwqptr]
	PUSH BX
	MOV  BX, czwq
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_274
	MOV  BX, L_273+0
	PUSH BX
	CALL czerror
	ADD  SP, +2
	MOV  BX, +0
	POP  BP
	RET
;	else return (wqptr-wqsiz); 
	JMP  L_275
L_274:
	MOV  BX, [Word czwqptr]
	PUSH BX
	MOV  BX, +5
	SAL  BX, 1
	POP  DX
	SUB  DX, BX
	MOV  BX, DX
	POP  BP
	RET
L_275:
; } 
	POP  BP
	RET

AutoC273	EQU 0

	  [SECTION .dseg]
L_273	DB "no active whiles",0

	  [SECTION .cseg]
;chr() 
czchr:
	PUSH BP
	SUB  SP, AutoC276
	MOV  BP, SP

;{	return(line[lptr]&127); 
	MOV  BX, czline
	PUSH BX
	MOV  BX, [Word czlptr]
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +127
	POP  DX
	AND  BX, DX
	POP  BP
	RET
;} 

AutoC276	EQU 0
;nch() 
cznch:
	PUSH BP
	SUB  SP, AutoC277
	MOV  BP, SP

;{	if(chr()==0)return 0; 
	CALL czchr
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_278
	MOV  BX, +0
	POP  BP
	RET
;		else return(line[lptr+1]&127); 
	JMP  L_279
L_278:
	MOV  BX, czline
	PUSH BX
	MOV  BX, [Word czlptr]
	PUSH BX
	MOV  BX, +1
	POP  DX
	ADD  BX, DX
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +127
	POP  DX
	AND  BX, DX
	POP  BP
	RET
L_279:
;} 
	POP  BP
	RET

AutoC277	EQU 0
;gch() 
czgch:
	PUSH BP
	SUB  SP, AutoC280
	MOV  BP, SP

;{	if(chr()==0)return 0; 
	CALL czchr
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_281
	MOV  BX, +0
	POP  BP
	RET
;		else return(line[lptr++]&127); 
	JMP  L_282
L_281:
	MOV  BX, czline
	PUSH BX
	MOV  BX, [Word czlptr]
	INC  BX
	MOV  Word [czlptr], BX
	DEC  BX
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +127
	POP  DX
	AND  BX, DX
	POP  BP
	RET
L_282:
;} 
	POP  BP
	RET

AutoC280	EQU 0
;kill() 
czkill:
	PUSH BP
	SUB  SP, AutoC283
	MOV  BP, SP

;{	lptr=0; 
	MOV  BX, +0
	MOV  Word [czlptr], BX
;	line[lptr]=0; 
	MOV  BX, czline
	PUSH BX
	MOV  BX, [Word czlptr]
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Byte [DI], BL
;} 
	POP  BP
	RET

AutoC283	EQU 0
;inbyte() 
czinbyte:
	PUSH BP
	SUB  SP, AutoC284
	MOV  BP, SP

;{ 
;	while(chr()==0) 
L_285:
	CALL czchr
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_286
;		{if (eof) return 0; 
	MOV  BX, [Word czeof]
	OR   BX, BX
	JNZ  $+5
	JMP  L_287
	MOV  BX, +0
	POP  BP
	RET
;		inline(); 
L_287:
	CALL czinline
;		preprocess(); 
	CALL czpreprocess
;		} 
	JMP  L_285
L_286:
;	return gch(); 
	CALL czgch
	POP  BP
	RET
;} 

AutoC284	EQU 0
;inchar() 
czinchar:
	PUSH BP
	SUB  SP, AutoC288
	MOV  BP, SP

;{ 
;	if(chr()==0)inline(); 
	CALL czchr
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_289
	CALL czinline
;	if(eof)return 0; 
L_289:
	MOV  BX, [Word czeof]
	OR   BX, BX
	JNZ  $+5
	JMP  L_290
	MOV  BX, +0
	POP  BP
	RET
;	return(gch()); 
L_290:
	CALL czgch
	POP  BP
	RET
;} 

AutoC288	EQU 0
; 
;inline() 
czinline:
	PUSH BP
	SUB  SP, AutoC291
	MOV  BP, SP

;{ 
;	int k,unit; 
; 
;	while(1) 
L_292:
	MOV  BX, +1
	OR   BX, BX
	JNZ  $+5
	JMP  L_293
;		{ 
;		if (input==0)openin(); 
	MOV  BX, [Word czinput]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_294
	CALL czopenin
;		if(eof)return; 
L_294:
	MOV  BX, [Word czeof]
	OR   BX, BX
	JNZ  $+5
	JMP  L_295
	ADD  SP, AutoC291
	POP  BP
	RET
;		if((unit=input2)==0)unit=input; 
L_295:
	LEA  BX, [AutoC291-4+BP]
	PUSH BX
	MOV  BX, [Word czinput2]
	POP  DI
	MOV  Word [DI], BX
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_296
	LEA  BX, [AutoC291-4+BP]
	PUSH BX
	MOV  BX, [Word czinput]
	POP  DI
	MOV  Word [DI], BX
;		kill(); 
L_296:
	CALL czkill
;		while((k=getc(unit))>0) 
L_297:
	LEA  BX, [AutoC291-2+BP]
	PUSH BX
	LEA  BX, [AutoC291-4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czgetc
	ADD  SP, +2
	POP  DI
	MOV  Word [DI], BX
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL ccgt
	OR   BX, BX
	JNZ  $+5
	JMP  L_298
;			{ 
;			if((k==eol)|(lptr>=linemax))break; 
	LEA  BX, [AutoC291-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +10
	POP  DX
	CALL cceq
	PUSH BX
	MOV  BX, [Word czlptr]
	PUSH BX
	MOV  BX, +80
	PUSH BX
	MOV  BX, +1
	POP  DX
	SUB  DX, BX
	MOV  BX, DX
	POP  DX
	CALL ccge
	POP  DX
	OR   BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_299
	JMP  L_298
;			line[lptr++]=k; 
L_299:
	MOV  BX, czline
	PUSH BX
	MOV  BX, [Word czlptr]
	INC  BX
	MOV  Word [czlptr], BX
	DEC  BX
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC291-2+BP]
	MOV  BX, [BX]
	POP  DI
	MOV  Byte [DI], BL
;			} 
	JMP  L_297
L_298:
;		line[lptr]=0;	/* append null */ 
	MOV  BX, czline
	PUSH BX
	MOV  BX, [Word czlptr]
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Byte [DI], BL
;		lineno++;	/* read one more line		gtf 7/2/80 */ 
	MOV  BX, [Word czlineno]
	INC  BX
	MOV  Word [czlineno], BX
	DEC  BX
;		if(k<=0) 
	LEA  BX, [AutoC291-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL ccle
	OR   BX, BX
	JNZ  $+5
	JMP  L_300
;			{ 
;			fclose(unit); 
	LEA  BX, [AutoC291-4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czfclose
	ADD  SP, +2
;			if(input2)endinclude();		/* gtf 7/16/80 */ 
	MOV  BX, [Word czinput2]
	OR   BX, BX
	JNZ  $+5
	JMP  L_301
	CALL czendinclude
;				else input=0; 
	JMP  L_302
L_301:
	MOV  BX, +0
	MOV  Word [czinput], BX
L_302:
;			} 
;		if(lptr) 
L_300:
	MOV  BX, [Word czlptr]
	OR   BX, BX
	JNZ  $+5
	JMP  L_303
;			{ 
;			if((ctext)&(cmode)) 
	MOV  BX, [Word czctext]
	PUSH BX
	MOV  BX, [Word czcmode]
	POP  DX
	AND  BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_304
;				{ 
;				comment(); 
	CALL czcomment
;				outstr(line); 
	MOV  BX, czline
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
;				nl(); 
	CALL cznl
;				} 
;			lptr=0; 
L_304:
	MOV  BX, +0
	MOV  Word [czlptr], BX
;			return; 
	ADD  SP, AutoC291
	POP  BP
	RET
;			} 
;		} 
L_303:
	JMP  L_292
L_293:
;} 
	ADD  SP, AutoC291
	POP  BP
	RET

AutoC291	EQU 4
;	czk	VAR	INT	-2
;	czunit	VAR	INT	-4
; 
;/** EO C86N-3.C **/ 
; 
;/*	>>>>>> start of cc4 <<<<<<<	*/ 
; 
;keepch(c) 
czkeepch:
;	char c; 
	PUSH BP
	SUB  SP, AutoC305
	MOV  BP, SP

;{ 
;	mline[mptr] = c; 
	MOV  BX, czmline
	PUSH BX
	MOV  BX, [Word czmptr]
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC305+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
;	if (mptr < mpmax) mptr++; 
	MOV  BX, [Word czmptr]
	PUSH BX
	MOV  BX, +80
	PUSH BX
	MOV  BX, +1
	POP  DX
	SUB  DX, BX
	MOV  BX, DX
	POP  DX
	CALL cclt
	OR   BX, BX
	JNZ  $+5
	JMP  L_306
	MOV  BX, [Word czmptr]
	INC  BX
	MOV  Word [czmptr], BX
	DEC  BX
;	return c; 
L_306:
	LEA  BX, [AutoC305+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  BP
	RET
;} 

AutoC305	EQU 0
;	czc	VAR	CHAR	+4
; 
;preprocess() 
czpreprocess:
	PUSH BP
	SUB  SP, AutoC307
	MOV  BP, SP

;{ 
;	int k; 
;	char c,sname[namesize]; 
; 
;	if(cmode==0)return; 
	MOV  BX, [Word czcmode]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_308
	ADD  SP, AutoC307
	POP  BP
	RET
;	mptr=lptr=0; 
L_308:
	MOV  BX, +0
	MOV  Word [czlptr], BX
	MOV  Word [czmptr], BX
;	while(chr()) 
L_309:
	CALL czchr
	OR   BX, BX
	JNZ  $+5
	JMP  L_310
;		{ 
;		if((chr()==' ')|(chr()==9)) 
	CALL czchr
	PUSH BX
	MOV  BX, +32
	POP  DX
	CALL cceq
	PUSH BX
	CALL czchr
	PUSH BX
	MOV  BX, +9
	POP  DX
	CALL cceq
	POP  DX
	OR   BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_311
;			{ 
;			keepch(' '); 
	MOV  BX, +32
	PUSH BX
	CALL czkeepch
	ADD  SP, +2
;			while((chr()==' ')| 
L_312:
	CALL czchr
	PUSH BX
	MOV  BX, +32
	POP  DX
	CALL cceq
	PUSH BX
;				(chr()==9)) 
	CALL czchr
	PUSH BX
	MOV  BX, +9
	POP  DX
	CALL cceq
	POP  DX
	OR   BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_313
;				gch(); 
	CALL czgch
	JMP  L_312
L_313:
;			} 
;		else if(chr()=='"') 
	JMP  L_314
L_311:
	CALL czchr
	PUSH BX
	MOV  BX, +34
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_315
;			{ 
;			keepch(chr()); 
	CALL czchr
	PUSH BX
	CALL czkeepch
	ADD  SP, +2
;			gch(); 
	CALL czgch
;			while(chr()!='"') 
L_316:
	CALL czchr
	PUSH BX
	MOV  BX, +34
	POP  DX
	CALL ccne
	OR   BX, BX
	JNZ  $+5
	JMP  L_317
;				{ 
;				if(chr()==0) 
	CALL czchr
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_318
;					{ 
;					error("missing quote"); 
	MOV  BX, L_307+0
	PUSH BX
	CALL czerror
	ADD  SP, +2
;					break; 
	JMP  L_317
;					} 
;				keepch(gch()); 
L_318:
	CALL czgch
	PUSH BX
	CALL czkeepch
	ADD  SP, +2
;				} 
	JMP  L_316
L_317:
;			gch(); 
	CALL czgch
;			keepch('"'); 
	MOV  BX, +34
	PUSH BX
	CALL czkeepch
	ADD  SP, +2
;			} 
;		else if(chr()==39) 
	JMP  L_319
L_315:
	CALL czchr
	PUSH BX
	MOV  BX, +39
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_320
;			{ 
;			keepch(39); 
	MOV  BX, +39
	PUSH BX
	CALL czkeepch
	ADD  SP, +2
;			gch(); 
	CALL czgch
;			while(chr()!=39) 
L_321:
	CALL czchr
	PUSH BX
	MOV  BX, +39
	POP  DX
	CALL ccne
	OR   BX, BX
	JNZ  $+5
	JMP  L_322
;				{ 
;				if(chr()==0) 
	CALL czchr
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_323
;					{ 
;					error("missing apostrophe"); 
	MOV  BX, L_307+14
	PUSH BX
	CALL czerror
	ADD  SP, +2
;					break; 
	JMP  L_322
;					} 
;				keepch(gch()); 
L_323:
	CALL czgch
	PUSH BX
	CALL czkeepch
	ADD  SP, +2
;				} 
	JMP  L_321
L_322:
;			gch(); 
	CALL czgch
;			keepch(39); 
	MOV  BX, +39
	PUSH BX
	CALL czkeepch
	ADD  SP, +2
;			} 
;		else if((chr()=='/')&(nch()=='*')) 
	JMP  L_324
L_320:
	CALL czchr
	PUSH BX
	MOV  BX, +47
	POP  DX
	CALL cceq
	PUSH BX
	CALL cznch
	PUSH BX
	MOV  BX, +42
	POP  DX
	CALL cceq
	POP  DX
	AND  BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_325
;			{ 
;			inchar();inchar(); 
	CALL czinchar
	CALL czinchar
;			while(((chr()=='*')&(nch()=='/'))==0) 
L_326:
	CALL czchr
	PUSH BX
	MOV  BX, +42
	POP  DX
	CALL cceq
	PUSH BX
	CALL cznch
	PUSH BX
	MOV  BX, +47
	POP  DX
	CALL cceq
	POP  DX
	AND  BX, DX
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_327
;				{ 
;				if(chr()==0)inline(); 
	CALL czchr
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_328
	CALL czinline
;				else inchar(); 
	JMP  L_329
L_328:
	CALL czinchar
L_329:
;				if(eof)break; 
	MOV  BX, [Word czeof]
	OR   BX, BX
	JNZ  $+5
	JMP  L_330
	JMP  L_327
;				} 
L_330:
	JMP  L_326
L_327:
;			inchar();inchar(); 
	CALL czinchar
	CALL czinchar
;			} 
;		else if (an(chr())) 
	JMP  L_331
L_325:
	CALL czchr
	PUSH BX
	CALL czan
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_332
;			{ 
;			k=0; 
	LEA  BX, [AutoC307-2+BP]
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
;			while (an(chr())) 
L_333:
	CALL czchr
	PUSH BX
	CALL czan
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_334
;				{ 
;				if (k < namemax) sname[k++] = chr(); 
	LEA  BX, [AutoC307-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +8
	POP  DX
	CALL cclt
	OR   BX, BX
	JNZ  $+5
	JMP  L_335
	LEA  BX, [AutoC307-12+BP]
	PUSH BX
	LEA  BX, [AutoC307-2+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	POP  DX
	ADD  BX, DX
	PUSH BX
	CALL czchr
	POP  DI
	MOV  Byte [DI], BL
;				gch(); 
L_335:
	CALL czgch
;				} 
	JMP  L_333
L_334:
;			sname[k] = 0; 
	LEA  BX, [AutoC307-12+BP]
	PUSH BX
	LEA  BX, [AutoC307-2+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Byte [DI], BL
;			if (k = findmac(sname)) 
	LEA  BX, [AutoC307-2+BP]
	PUSH BX
	LEA  BX, [AutoC307-12+BP]
	PUSH BX
	CALL czfindmac
	ADD  SP, +2
	POP  DI
	MOV  Word [DI], BX
	OR   BX, BX
	JNZ  $+5
	JMP  L_336
;				while(c=macq[k++]) keepch(c); 
L_337:
	LEA  BX, [AutoC307-3+BP]
	PUSH BX
	MOV  BX, czmacq
	PUSH BX
	LEA  BX, [AutoC307-2+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
	OR   BX, BX
	JNZ  $+5
	JMP  L_338
	LEA  BX, [AutoC307-3+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	CALL czkeepch
	ADD  SP, +2
	JMP  L_337
L_338:
;			else	{ 
	JMP  L_339
L_336:
;				k=0; 
	LEA  BX, [AutoC307-2+BP]
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
;				while(c=sname[k++]) keepch(c); 
L_340:
	LEA  BX, [AutoC307-3+BP]
	PUSH BX
	LEA  BX, [AutoC307-12+BP]
	PUSH BX
	LEA  BX, [AutoC307-2+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
	OR   BX, BX
	JNZ  $+5
	JMP  L_341
	LEA  BX, [AutoC307-3+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	CALL czkeepch
	ADD  SP, +2
	JMP  L_340
L_341:
;				} 
L_339:
;			} 
;		else keepch(gch()); 
	JMP  L_342
L_332:
	CALL czgch
	PUSH BX
	CALL czkeepch
	ADD  SP, +2
L_342:
L_331:
L_324:
L_319:
L_314:
;		} 
	JMP  L_309
L_310:
;	keepch(0); 
	MOV  BX, +0
	PUSH BX
	CALL czkeepch
	ADD  SP, +2
;	if(mptr>=mpmax) error("line too long"); 
	MOV  BX, [Word czmptr]
	PUSH BX
	MOV  BX, +80
	PUSH BX
	MOV  BX, +1
	POP  DX
	SUB  DX, BX
	MOV  BX, DX
	POP  DX
	CALL ccge
	OR   BX, BX
	JNZ  $+5
	JMP  L_343
	MOV  BX, L_307+33
	PUSH BX
	CALL czerror
	ADD  SP, +2
;	lptr=mptr=0; 
L_343:
	MOV  BX, +0
	MOV  Word [czmptr], BX
	MOV  Word [czlptr], BX
;	while(line[lptr++]=mline[mptr++]); 
L_344:
	MOV  BX, czline
	PUSH BX
	MOV  BX, [Word czlptr]
	INC  BX
	MOV  Word [czlptr], BX
	DEC  BX
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, czmline
	PUSH BX
	MOV  BX, [Word czmptr]
	INC  BX
	MOV  Word [czmptr], BX
	DEC  BX
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
	OR   BX, BX
	JNZ  $+5
	JMP  L_345
	JMP  L_344
L_345:
;	lptr=0; 
	MOV  BX, +0
	MOV  Word [czlptr], BX
;	} 
	ADD  SP, AutoC307
	POP  BP
	RET

AutoC307	EQU 12
;	czk	VAR	INT	-2
;	czc	VAR	CHAR	-3
;	czsname	ARRAY	CHAR	-12

	  [SECTION .dseg]
L_307	DB "missing quote",0
	DB "missing apostrophe",0
	DB "line too long",0

	  [SECTION .cseg]
; 
;addmac() 
czaddmac:
	PUSH BP
	SUB  SP, AutoC346
	MOV  BP, SP

;{ 
;	char sname[namesize]; 
;	int k; 
; 
;	if(symname(sname)==0) 
	LEA  BX, [AutoC346-9+BP]
	PUSH BX
	CALL czsymname
	ADD  SP, +2
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_347
;		{ 
;		illname(); 
	CALL czillname
;		kill(); 
	CALL czkill
;		return; 
	ADD  SP, AutoC346
	POP  BP
	RET
;		} 
;	k=0; 
L_347:
	LEA  BX, [AutoC346-11+BP]
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
;	while(putmac(sname[k++])); 
L_348:
	LEA  BX, [AutoC346-9+BP]
	PUSH BX
	LEA  BX, [AutoC346-11+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	CALL czputmac
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_349
	JMP  L_348
L_349:
;	while(chr()==' ' | chr()==9) gch(); 
L_350:
	CALL czchr
	PUSH BX
	MOV  BX, +32
	POP  DX
	CALL cceq
	PUSH BX
	CALL czchr
	PUSH BX
	MOV  BX, +9
	POP  DX
	CALL cceq
	POP  DX
	OR   BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_351
	CALL czgch
	JMP  L_350
L_351:
;	while(putmac(gch())); 
L_352:
	CALL czgch
	PUSH BX
	CALL czputmac
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_353
	JMP  L_352
L_353:
;	if(macptr>=macmax) error("macro table full"); 
	MOV  BX, [Word czmacptr]
	PUSH BX
	MOV  BX, +2176
	PUSH BX
	MOV  BX, +1
	POP  DX
	SUB  DX, BX
	MOV  BX, DX
	POP  DX
	CALL ccge
	OR   BX, BX
	JNZ  $+5
	JMP  L_354
	MOV  BX, L_346+0
	PUSH BX
	CALL czerror
	ADD  SP, +2
;	} 
L_354:
	ADD  SP, AutoC346
	POP  BP
	RET

AutoC346	EQU 11
;	czsname	ARRAY	CHAR	-9
;	czk	VAR	INT	-11

	  [SECTION .dseg]
L_346	DB "macro table full",0

	  [SECTION .cseg]
; 
;putmac(c) char c; 
czputmac:
	PUSH BP
	SUB  SP, AutoC355
	MOV  BP, SP

;{ 
;	macq[macptr]=c; 
	MOV  BX, czmacq
	PUSH BX
	MOV  BX, [Word czmacptr]
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC355+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
;	if (macptr < macmax) macptr++; 
	MOV  BX, [Word czmacptr]
	PUSH BX
	MOV  BX, +2176
	PUSH BX
	MOV  BX, +1
	POP  DX
	SUB  DX, BX
	MOV  BX, DX
	POP  DX
	CALL cclt
	OR   BX, BX
	JNZ  $+5
	JMP  L_356
	MOV  BX, [Word czmacptr]
	INC  BX
	MOV  Word [czmacptr], BX
	DEC  BX
;	return c; 
L_356:
	LEA  BX, [AutoC355+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  BP
	RET
;} 

AutoC355	EQU 0
;	czc	VAR	CHAR	+4
; 
;findmac(sname) char *sname; 
czfindmac:
	PUSH BP
	SUB  SP, AutoC357
	MOV  BP, SP

;{ 
;	int k; 
; 
;	k=0; 
	LEA  BX, [AutoC357-2+BP]
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
;	while (k < macptr) 
L_358:
	LEA  BX, [AutoC357-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, [Word czmacptr]
	POP  DX
	CALL cclt
	OR   BX, BX
	JNZ  $+5
	JMP  L_359
;		{ 
;		if(astreq(sname,macq+k,namemax)) 
	LEA  BX, [AutoC357+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, czmacq
	PUSH BX
	LEA  BX, [AutoC357-2+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +8
	PUSH BX
	CALL czastreq
	ADD  SP, +6
	OR   BX, BX
	JNZ  $+5
	JMP  L_360
;			{ 
;			while(macq[k++]); 
L_361:
	MOV  BX, czmacq
	PUSH BX
	LEA  BX, [AutoC357-2+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	OR   BX, BX
	JNZ  $+5
	JMP  L_362
	JMP  L_361
L_362:
;			return k; 
	LEA  BX, [AutoC357-2+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC357
	POP  BP
	RET
;			} 
;		while(macq[k++]); 
L_360:
L_363:
	MOV  BX, czmacq
	PUSH BX
	LEA  BX, [AutoC357-2+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	OR   BX, BX
	JNZ  $+5
	JMP  L_364
	JMP  L_363
L_364:
;		while(macq[k++]); 
L_365:
	MOV  BX, czmacq
	PUSH BX
	LEA  BX, [AutoC357-2+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	OR   BX, BX
	JNZ  $+5
	JMP  L_366
	JMP  L_365
L_366:
;		} 
	JMP  L_358
L_359:
;	return 0; 
	MOV  BX, +0
	ADD  SP, AutoC357
	POP  BP
	RET
;} 

AutoC357	EQU 2
;	czsname	PTR	CHAR	+4
;	czk	VAR	INT	-2
; 
;/* direct output to console		gtf 7/16/80 */ 
;toconsole() 
cztoconsole:
	PUSH BP
	SUB  SP, AutoC367
	MOV  BP, SP

;{ 
;	saveout = output; 
	MOV  BX, [Word czoutput]
	MOV  Word [czsaveout], BX
;	output = 0; 
	MOV  BX, +0
	MOV  Word [czoutput], BX
;}  /* end toconsole */ 
	POP  BP
	RET

AutoC367	EQU 0
; 
;/* direct output back to file		gtf 7/16/80 */ 
;tofile() 
cztofile:
	PUSH BP
	SUB  SP, AutoC368
	MOV  BP, SP

;{ 
;	if(saveout) output = saveout; 
	MOV  BX, [Word czsaveout]
	OR   BX, BX
	JNZ  $+5
	JMP  L_369
	MOV  BX, [Word czsaveout]
	MOV  Word [czoutput], BX
;	saveout = 0; 
L_369:
	MOV  BX, +0
	MOV  Word [czsaveout], BX
;}  /* end tofile */ 
	POP  BP
	RET

AutoC368	EQU 0
; 
;outbyte(c) char c; 
czoutbyte:
	PUSH BP
	SUB  SP, AutoC370
	MOV  BP, SP

;{ 
;	if(c==0) return 0; 
	LEA  BX, [AutoC370+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_371
	MOV  BX, +0
	POP  BP
	RET
;	if(output) 
L_371:
	MOV  BX, [Word czoutput]
	OR   BX, BX
	JNZ  $+5
	JMP  L_372
;		{ 
;		if((putc(c,output))<=0) 
	LEA  BX, [AutoC370+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, [Word czoutput]
	PUSH BX
	CALL czputc
	ADD  SP, +4
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL ccle
	OR   BX, BX
	JNZ  $+5
	JMP  L_373
;			{ 
;			closeout(); 
	CALL czcloseout
;			error("Output file error"); 
	MOV  BX, L_370+0
	PUSH BX
	CALL czerror
	ADD  SP, +2
;			abort();		/* gtf 7/17/80 */ 
	CALL czabort
;			} 
;		} 
L_373:
;	else putchar(c); 
	JMP  L_374
L_372:
	LEA  BX, [AutoC370+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	CALL czputchar
	ADD  SP, +2
L_374:
;	return c; 
	LEA  BX, [AutoC370+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  BP
	RET
;} 

AutoC370	EQU 0
;	czc	VAR	CHAR	+4

	  [SECTION .dseg]
L_370	DB "Output file error",0

	  [SECTION .cseg]
; 
;outstr(ptr) char ptr[]; 
czoutstr:
	PUSH BP
	SUB  SP, AutoC375
	MOV  BP, SP

; { 
;	int k; 
;	k=0; 
	LEA  BX, [AutoC375-2+BP]
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
;	while(outbyte(ptr[k++])); 
L_376:
	LEA  BX, [AutoC375+4+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC375-2+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	CALL czoutbyte
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_377
	JMP  L_376
L_377:
; } 
	ADD  SP, AutoC375
	POP  BP
	RET

AutoC375	EQU 2
;	czptr	PTR	CHAR	+4
;	czk	VAR	INT	-2
; 
;/* write text destined for the assembler to read */ 
;/* (i.e. stuff not in comments)			*/ 
;/*  gtf  6/26/80 */ 
;outasm(ptr) 
czoutasm:
;char *ptr; 
	PUSH BP
	SUB  SP, AutoC378
	MOV  BP, SP

;{ 
;/**	while(outbyte(raise(*ptr++))); **/ 
;	while(outbyte(*ptr++));  /** don't UC quoted str **/ 
L_379:
	LEA  BX, [AutoC378+4+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	CALL czoutbyte
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_380
	JMP  L_379
L_380:
;}  /* end outasm */ 
	POP  BP
	RET

AutoC378	EQU 0
;	czptr	PTR	CHAR	+4
; 
;nl() 
cznl:
	PUSH BP
	SUB  SP, AutoC381
	MOV  BP, SP

;	{outbyte(eol);} 
	MOV  BX, +10
	PUSH BX
	CALL czoutbyte
	ADD  SP, +2
	POP  BP
	RET

AutoC381	EQU 0
;tab() 
cztab:
	PUSH BP
	SUB  SP, AutoC382
	MOV  BP, SP

;	{outbyte(9);} 
	MOV  BX, +9
	PUSH BX
	CALL czoutbyte
	ADD  SP, +2
	POP  BP
	RET

AutoC382	EQU 0
;colon() 
czcolon:
	PUSH BP
	SUB  SP, AutoC383
	MOV  BP, SP

;	{outbyte(58);} 
	MOV  BX, +58
	PUSH BX
	CALL czoutbyte
	ADD  SP, +2
	POP  BP
	RET

AutoC383	EQU 0
;bell()				/* gtf 7/16/80 */ 
czbell:
	PUSH BP
	SUB  SP, AutoC384
	MOV  BP, SP

;	{outbyte(7);} 
	MOV  BX, +7
	PUSH BX
	CALL czoutbyte
	ADD  SP, +2
	POP  BP
	RET

AutoC384	EQU 0
; 
;error(ptr) 
czerror:
;char ptr[]; 
	PUSH BP
	SUB  SP, AutoC385
	MOV  BP, SP

;{	int k; 
;	char junk[81]; 
; 
;	toconsole(); 
	CALL cztoconsole
;	bell(); 
	CALL czbell
;	outstr("Line "); outdec(lineno); outstr(", "); 
	MOV  BX, L_385+0
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
	MOV  BX, [Word czlineno]
	PUSH BX
	CALL czoutdec
	ADD  SP, +2
	MOV  BX, L_385+6
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
;	if(infunc==0) 
	MOV  BX, [Word czinfunc]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_386
;		outbyte('('); 
	MOV  BX, +40
	PUSH BX
	CALL czoutbyte
	ADD  SP, +2
;	if(currfn==NULL) 
L_386:
	MOV  BX, [Word czcurrfn]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_387
;		outstr("start of file"); 
	MOV  BX, L_385+9
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
;	else	outstr(currfn+name); 
	JMP  L_388
L_387:
	MOV  BX, [Word czcurrfn]
	PUSH BX
	MOV  BX, +0
	POP  DX
	ADD  BX, DX
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
L_388:
;	if(infunc==0) 
	MOV  BX, [Word czinfunc]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_389
;		outbyte(')'); 
	MOV  BX, +41
	PUSH BX
	CALL czoutbyte
	ADD  SP, +2
;	outdec(lineno-fnstart); 
L_389:
	MOV  BX, [Word czlineno]
	PUSH BX
	MOV  BX, [Word czfnstart]
	POP  DX
	SUB  DX, BX
	MOV  BX, DX
	PUSH BX
	CALL czoutdec
	ADD  SP, +2
;	outstr(": ");  outstr(ptr);  nl(); 
	MOV  BX, L_385+23
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
	LEA  BX, [AutoC385+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
	CALL cznl
; 
;	outstr(line); nl(); 
	MOV  BX, czline
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
	CALL cznl
; 
;	k=0;	/* skip to error position */ 
	LEA  BX, [AutoC385-2+BP]
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
;	while (k < lptr){ 
L_390:
	LEA  BX, [AutoC385-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, [Word czlptr]
	POP  DX
	CALL cclt
	OR   BX, BX
	JNZ  $+5
	JMP  L_391
;		if(line[k++]==9) 
	MOV  BX, czline
	PUSH BX
	LEA  BX, [AutoC385-2+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +9
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_392
;			tab(); 
	CALL cztab
;		else	outbyte(' '); 
	JMP  L_393
L_392:
	MOV  BX, +32
	PUSH BX
	CALL czoutbyte
	ADD  SP, +2
L_393:
;		} 
	JMP  L_390
L_391:
;	outbyte('^');  nl(); 
	MOV  BX, +94
	PUSH BX
	CALL czoutbyte
	ADD  SP, +2
	CALL cznl
;	++errcnt; 
	MOV  BX, [Word czerrcnt]
	INC  BX
	MOV  Word [czerrcnt], BX
; 
;	if(errstop){ 
	MOV  BX, [Word czerrstop]
	OR   BX, BX
	JNZ  $+5
	JMP  L_394
;		pl("Continue (Y,n,g) ? "); 
	MOV  BX, L_385+26
	PUSH BX
	CALL czpl
	ADD  SP, +2
;		gets(junk);		 
	LEA  BX, [AutoC385-83+BP]
	PUSH BX
	CALL czgets
	ADD  SP, +2
;		k=junk[0]; 
	LEA  BX, [AutoC385-2+BP]
	PUSH BX
	LEA  BX, [AutoC385-83+BP]
	PUSH BX
	MOV  BX, +0
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Word [DI], BX
;		if((k=='N') | (k=='n')) 
	LEA  BX, [AutoC385-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +78
	POP  DX
	CALL cceq
	PUSH BX
	LEA  BX, [AutoC385-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +110
	POP  DX
	CALL cceq
	POP  DX
	OR   BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_395
;			abort(); 
	CALL czabort
;		if((k=='G') | (k=='g')) 
L_395:
	LEA  BX, [AutoC385-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +71
	POP  DX
	CALL cceq
	PUSH BX
	LEA  BX, [AutoC385-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +103
	POP  DX
	CALL cceq
	POP  DX
	OR   BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_396
;			errstop=0; 
	MOV  BX, +0
	MOV  Word [czerrstop], BX
;		} 
L_396:
;	tofile(); 
L_394:
	CALL cztofile
;/* end error */} 
	ADD  SP, AutoC385
	POP  BP
	RET

AutoC385	EQU 83
;	czptr	PTR	CHAR	+4
;	czk	VAR	INT	-2
;	czjunk	ARRAY	CHAR	-83

	  [SECTION .dseg]
L_385	DB "Line ",0
	DB ", ",0
	DB "start of file",0
	DB ": ",0
	DB "Continue (Y,n,g) ? ",0

	  [SECTION .cseg]
; 
;ol(ptr) 
czol:
;	char ptr[]; 
	PUSH BP
	SUB  SP, AutoC397
	MOV  BP, SP

;{ 
;	ot(ptr); 
	LEA  BX, [AutoC397+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czot
	ADD  SP, +2
;	nl(); 
	CALL cznl
;} 
	POP  BP
	RET

AutoC397	EQU 0
;	czptr	PTR	CHAR	+4
;ot(ptr) 
czot:
;	char ptr[]; 
	PUSH BP
	SUB  SP, AutoC398
	MOV  BP, SP

;{ 
;	tab(); 
	CALL cztab
;	outasm(ptr); 
	LEA  BX, [AutoC398+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czoutasm
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC398	EQU 0
;	czptr	PTR	CHAR	+4
;streq(str1,str2) 
czstreq:
;	char str1[],str2[]; 
	PUSH BP
	SUB  SP, AutoC399
	MOV  BP, SP

; { 
;	int k; 
;	k=0; 
	LEA  BX, [AutoC399-2+BP]
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
;	while (str2[k]) 
L_400:
	LEA  BX, [AutoC399+4+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC399-2+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	OR   BX, BX
	JNZ  $+5
	JMP  L_401
;		{if ((str1[k])!=(str2[k])) return 0; 
	LEA  BX, [AutoC399+6+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC399-2+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	LEA  BX, [AutoC399+4+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC399-2+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DX
	CALL ccne
	OR   BX, BX
	JNZ  $+5
	JMP  L_402
	MOV  BX, +0
	ADD  SP, AutoC399
	POP  BP
	RET
;		k++; 
L_402:
	LEA  BX, [AutoC399-2+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
;		} 
	JMP  L_400
L_401:
;	return k; 
	LEA  BX, [AutoC399-2+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC399
	POP  BP
	RET
; } 

AutoC399	EQU 2
;	czstr1	PTR	CHAR	+6
;	czstr2	PTR	CHAR	+4
;	czk	VAR	INT	-2
;astreq(str1,str2,len) 
czastreq:
;	char str1[],str2[];int len; 
	PUSH BP
	SUB  SP, AutoC403
	MOV  BP, SP

; { 
;	int k; 
;	k=0; 
	LEA  BX, [AutoC403-2+BP]
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
;	while (k < len) 
L_404:
	LEA  BX, [AutoC403-2+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC403+4+BP]
	MOV  BX, [BX]
	POP  DX
	CALL cclt
	OR   BX, BX
	JNZ  $+5
	JMP  L_405
;		{if ((str1[k])!=(str2[k]))break; 
	LEA  BX, [AutoC403+8+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC403-2+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	LEA  BX, [AutoC403+6+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC403-2+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DX
	CALL ccne
	OR   BX, BX
	JNZ  $+5
	JMP  L_406
	JMP  L_405
;		if(str1[k]==0)break; 
L_406:
	LEA  BX, [AutoC403+8+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC403-2+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_407
	JMP  L_405
;		if(str2[k]==0)break; 
L_407:
	LEA  BX, [AutoC403+6+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC403-2+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_408
	JMP  L_405
;		k++; 
L_408:
	LEA  BX, [AutoC403-2+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
;		} 
	JMP  L_404
L_405:
;	if (an(str1[k]))return 0; 
	LEA  BX, [AutoC403+8+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC403-2+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	CALL czan
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_409
	MOV  BX, +0
	ADD  SP, AutoC403
	POP  BP
	RET
;	if (an(str2[k]))return 0; 
L_409:
	LEA  BX, [AutoC403+6+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC403-2+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	CALL czan
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_410
	MOV  BX, +0
	ADD  SP, AutoC403
	POP  BP
	RET
;	return k; 
L_410:
	LEA  BX, [AutoC403-2+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC403
	POP  BP
	RET
; } 

AutoC403	EQU 2
;	czstr1	PTR	CHAR	+8
;	czstr2	PTR	CHAR	+6
;	czlen	VAR	INT	+4
;	czk	VAR	INT	-2
;match(lit) 
czmatch:
;	char *lit; 
	PUSH BP
	SUB  SP, AutoC411
	MOV  BP, SP

;{ 
;	int k; 
;	blanks(); 
	CALL czblanks
;	if (k=streq(line+lptr,lit)) 
	LEA  BX, [AutoC411-2+BP]
	PUSH BX
	MOV  BX, czline
	PUSH BX
	MOV  BX, [Word czlptr]
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC411+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czstreq
	ADD  SP, +4
	POP  DI
	MOV  Word [DI], BX
	OR   BX, BX
	JNZ  $+5
	JMP  L_412
;		{lptr=lptr+k; 
	MOV  BX, [Word czlptr]
	PUSH BX
	LEA  BX, [AutoC411-2+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	MOV  Word [czlptr], BX
;		return 1; 
	MOV  BX, +1
	ADD  SP, AutoC411
	POP  BP
	RET
;		} 
; 	return 0; 
L_412:
	MOV  BX, +0
	ADD  SP, AutoC411
	POP  BP
	RET
;} 

AutoC411	EQU 2
;	czlit	PTR	CHAR	+4
;	czk	VAR	INT	-2
;amatch(lit,len) 
czamatch:
;	char *lit;int len; 
	PUSH BP
	SUB  SP, AutoC413
	MOV  BP, SP

; { 
;	int k; 
;	blanks(); 
	CALL czblanks
;	if (k=astreq(line+lptr,lit,len)) 
	LEA  BX, [AutoC413-2+BP]
	PUSH BX
	MOV  BX, czline
	PUSH BX
	MOV  BX, [Word czlptr]
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC413+6+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC413+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czastreq
	ADD  SP, +6
	POP  DI
	MOV  Word [DI], BX
	OR   BX, BX
	JNZ  $+5
	JMP  L_414
;		{lptr=lptr+k; 
	MOV  BX, [Word czlptr]
	PUSH BX
	LEA  BX, [AutoC413-2+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	MOV  Word [czlptr], BX
;		while(an(chr())) inbyte(); 
L_415:
	CALL czchr
	PUSH BX
	CALL czan
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_416
	CALL czinbyte
	JMP  L_415
L_416:
;		return 1; 
	MOV  BX, +1
	ADD  SP, AutoC413
	POP  BP
	RET
;		} 
;	return 0; 
L_414:
	MOV  BX, +0
	ADD  SP, AutoC413
	POP  BP
	RET
; } 

AutoC413	EQU 2
;	czlit	PTR	CHAR	+6
;	czlen	VAR	INT	+4
;	czk	VAR	INT	-2
;blanks() 
czblanks:
	PUSH BP
	SUB  SP, AutoC417
	MOV  BP, SP

;	{while(1) 
L_418:
	MOV  BX, +1
	OR   BX, BX
	JNZ  $+5
	JMP  L_419
;		{while(chr()==0) 
L_420:
	CALL czchr
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_421
;			{inline(); 
	CALL czinline
;			preprocess(); 
	CALL czpreprocess
;			if(eof)break; 
	MOV  BX, [Word czeof]
	OR   BX, BX
	JNZ  $+5
	JMP  L_422
	JMP  L_421
;			} 
L_422:
	JMP  L_420
L_421:
;		if(chr()==' ')gch(); 
	CALL czchr
	PUSH BX
	MOV  BX, +32
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_423
	CALL czgch
;		else if(chr()==9)gch(); 
	JMP  L_424
L_423:
	CALL czchr
	PUSH BX
	MOV  BX, +9
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_425
	CALL czgch
;		else return; 
	JMP  L_426
L_425:
	POP  BP
	RET
L_426:
L_424:
;		} 
	JMP  L_418
L_419:
;	} 
	POP  BP
	RET

AutoC417	EQU 0
; 
; 
;/* Output a signed number to the ASM file. */ 
;outdec(number) 
czoutdec:
;	int number; 
	PUSH BP
	SUB  SP, AutoC427
	MOV  BP, SP

; { 
;	int k,zs; 
;	char c; 
;	zs = 0; 
	LEA  BX, [AutoC427-4+BP]
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
;	k=10000; 
	LEA  BX, [AutoC427-2+BP]
	PUSH BX
	MOV  BX, +10000
	POP  DI
	MOV  Word [DI], BX
;	if (number < 0) 
	LEA  BX, [AutoC427+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cclt
	OR   BX, BX
	JNZ  $+5
	JMP  L_428
;		{number=(-number); 
	LEA  BX, [AutoC427+4+BP]
	PUSH BX
	LEA  BX, [AutoC427+4+BP]
	MOV  BX, [BX]
	NEG  BX
	POP  DI
	MOV  Word [DI], BX
;		outbyte('-'); 
	MOV  BX, +45
	PUSH BX
	CALL czoutbyte
	ADD  SP, +2
;		} 
;	else 
	JMP  L_429
L_428:
;		outbyte('+'); 
	MOV  BX, +43
	PUSH BX
	CALL czoutbyte
	ADD  SP, +2
L_429:
;	while (k>=1) 
L_430:
	LEA  BX, [AutoC427-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	POP  DX
	CALL ccge
	OR   BX, BX
	JNZ  $+5
	JMP  L_431
;		{ 
;		c=number/k + '0'; 
	LEA  BX, [AutoC427-5+BP]
	PUSH BX
	LEA  BX, [AutoC427+4+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC427-2+BP]
	MOV  BX, [BX]
	POP  DX
	MOV  AX, DX
	CWD
	DIV  BX
	MOV  BX, AX
	PUSH BX
	MOV  BX, +48
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Byte [DI], BL
;		if ((c!='0')|(k==1)|(zs)) 
	LEA  BX, [AutoC427-5+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +48
	POP  DX
	CALL ccne
	PUSH BX
	LEA  BX, [AutoC427-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	POP  DX
	CALL cceq
	POP  DX
	OR   BX, DX
	PUSH BX
	LEA  BX, [AutoC427-4+BP]
	MOV  BX, [BX]
	POP  DX
	OR   BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_432
;			{zs=1;outbyte(c);} 
	LEA  BX, [AutoC427-4+BP]
	PUSH BX
	MOV  BX, +1
	POP  DI
	MOV  Word [DI], BX
	LEA  BX, [AutoC427-5+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	CALL czoutbyte
	ADD  SP, +2
;		number=number%k; 
L_432:
	LEA  BX, [AutoC427+4+BP]
	PUSH BX
	LEA  BX, [AutoC427+4+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC427-2+BP]
	MOV  BX, [BX]
	POP  DX
	MOV  AX, DX
	CWD
	DIV  BX
	MOV  BX, AX
	XCHG BX, DX
	POP  DI
	MOV  Word [DI], BX
;		k=k/10; 
	LEA  BX, [AutoC427-2+BP]
	PUSH BX
	LEA  BX, [AutoC427-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +10
	POP  DX
	MOV  AX, DX
	CWD
	DIV  BX
	MOV  BX, AX
	POP  DI
	MOV  Word [DI], BX
;		} 
	JMP  L_430
L_431:
; } 
	ADD  SP, AutoC427
	POP  BP
	RET

AutoC427	EQU 5
;	cznumber	VAR	INT	+4
;	czk	VAR	INT	-2
;	czzs	VAR	INT	-4
;	czc	VAR	CHAR	-5
; 
; 
;/* Output an unsigned number to ASM file. */ 
;outudec(number) 
czoutudec:
;	int number; 
	PUSH BP
	SUB  SP, AutoC433
	MOV  BP, SP

; { 
;	int k,zs; 
;	char c; 
;	zs = 0; 
	LEA  BX, [AutoC433-4+BP]
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
;	k=10000; 
	LEA  BX, [AutoC433-2+BP]
	PUSH BX
	MOV  BX, +10000
	POP  DI
	MOV  Word [DI], BX
;	if (number < 0) 
	LEA  BX, [AutoC433+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cclt
	OR   BX, BX
	JNZ  $+5
	JMP  L_434
;		number=(-number); 
	LEA  BX, [AutoC433+4+BP]
	PUSH BX
	LEA  BX, [AutoC433+4+BP]
	MOV  BX, [BX]
	NEG  BX
	POP  DI
	MOV  Word [DI], BX
;	while (k>=1) 
L_434:
L_435:
	LEA  BX, [AutoC433-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	POP  DX
	CALL ccge
	OR   BX, BX
	JNZ  $+5
	JMP  L_436
;		{ 
;		c=number/k + '0'; 
	LEA  BX, [AutoC433-5+BP]
	PUSH BX
	LEA  BX, [AutoC433+4+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC433-2+BP]
	MOV  BX, [BX]
	POP  DX
	MOV  AX, DX
	CWD
	DIV  BX
	MOV  BX, AX
	PUSH BX
	MOV  BX, +48
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Byte [DI], BL
;		if ((c!='0')|(k==1)|(zs)) 
	LEA  BX, [AutoC433-5+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +48
	POP  DX
	CALL ccne
	PUSH BX
	LEA  BX, [AutoC433-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	POP  DX
	CALL cceq
	POP  DX
	OR   BX, DX
	PUSH BX
	LEA  BX, [AutoC433-4+BP]
	MOV  BX, [BX]
	POP  DX
	OR   BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_437
;			{zs=1;outbyte(c);} 
	LEA  BX, [AutoC433-4+BP]
	PUSH BX
	MOV  BX, +1
	POP  DI
	MOV  Word [DI], BX
	LEA  BX, [AutoC433-5+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	CALL czoutbyte
	ADD  SP, +2
;		number=number%k; 
L_437:
	LEA  BX, [AutoC433+4+BP]
	PUSH BX
	LEA  BX, [AutoC433+4+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC433-2+BP]
	MOV  BX, [BX]
	POP  DX
	MOV  AX, DX
	CWD
	DIV  BX
	MOV  BX, AX
	XCHG BX, DX
	POP  DI
	MOV  Word [DI], BX
;		k=k/10; 
	LEA  BX, [AutoC433-2+BP]
	PUSH BX
	LEA  BX, [AutoC433-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +10
	POP  DX
	MOV  AX, DX
	CWD
	DIV  BX
	MOV  BX, AX
	POP  DI
	MOV  Word [DI], BX
;		} 
	JMP  L_435
L_436:
; } 
	ADD  SP, AutoC433
	POP  BP
	RET

AutoC433	EQU 5
;	cznumber	VAR	INT	+4
;	czk	VAR	INT	-2
;	czzs	VAR	INT	-4
;	czc	VAR	CHAR	-5
; 
; 
;/* return the length of a string */ 
;/* gtf 4/8/80 */ 
;strlen(s) 
czstrlen:
;char *s; 
	PUSH BP
	SUB  SP, AutoC438
	MOV  BP, SP

;{	char *t; 
; 
;	t = s; 
	LEA  BX, [AutoC438-2+BP]
	PUSH BX
	LEA  BX, [AutoC438+4+BP]
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;	while(*s) s++; 
L_439:
	LEA  BX, [AutoC438+4+BP]
	MOV  BX, [BX]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	OR   BX, BX
	JNZ  $+5
	JMP  L_440
	LEA  BX, [AutoC438+4+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	JMP  L_439
L_440:
;	return(s-t); 
	LEA  BX, [AutoC438+4+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC438-2+BP]
	MOV  BX, [BX]
	POP  DX
	SUB  DX, BX
	MOV  BX, DX
	ADD  SP, AutoC438
	POP  BP
	RET
;/* end strlen */} 

AutoC438	EQU 2
;	czs	PTR	CHAR	+4
;	czt	PTR	CHAR	-2
; 
;/* convert lower case to upper */ 
;/* gtf 6/26/80 */ 
;raise(c) 
czraise:
;char c; 
	PUSH BP
	SUB  SP, AutoC441
	MOV  BP, SP

;{ 
;	if((c >= 'a') & (c <= 'z')) 
	LEA  BX, [AutoC441+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +97
	POP  DX
	CALL ccge
	PUSH BX
	LEA  BX, [AutoC441+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +122
	POP  DX
	CALL ccle
	POP  DX
	AND  BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_442
;		c = c - 'a' + 'A'; 
	LEA  BX, [AutoC441+4+BP]
	PUSH BX
	LEA  BX, [AutoC441+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +97
	POP  DX
	SUB  DX, BX
	MOV  BX, DX
	PUSH BX
	MOV  BX, +65
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Byte [DI], BL
;	return(c); 
L_442:
	LEA  BX, [AutoC441+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  BP
	RET
;/* end raise */} 

AutoC441	EQU 0
;	czc	VAR	CHAR	+4
; 
;/** EO C86N-4.C **/ 
; 
;/*	>>>>>>> start of cc5 <<<<<<<	*/ 
; 
;	/* 
;	** lval[0] = Symbol table address, else 0 for constant 
;	** lval[1] = type indirect object to fetch, else 0 for 
;        	     static object 
;	** lval[2] = type pointer or array, else 0 
;	*/ 
; 
;expression() 
czexpression:
	PUSH BP
	SUB  SP, AutoC443
	MOV  BP, SP

;{ 
;	int lval[3]; 
;	if(heir1(lval))rvalue(lval); 
	LEA  BX, [AutoC443-6+BP]
	PUSH BX
	CALL czheir1
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_444
	LEA  BX, [AutoC443-6+BP]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;} 
L_444:
	ADD  SP, AutoC443
	POP  BP
	RET

AutoC443	EQU 6
;	czlval	ARRAY	INT	-6
;heir1(lval) 
czheir1:
;	int lval[]; 
	PUSH BP
	SUB  SP, AutoC445
	MOV  BP, SP

;{ 
;	int k,lval2[3]; 
;	k=heir2(lval); 
	LEA  BX, [AutoC445-2+BP]
	PUSH BX
	LEA  BX, [AutoC445+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czheir2
	ADD  SP, +2
	POP  DI
	MOV  Word [DI], BX
;	if (match("=")) 
	MOV  BX, L_445+0
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_446
;		{if(k==0){needlval();return 0;} 
	LEA  BX, [AutoC445-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_447
	CALL czneedlval
	MOV  BX, +0
	ADD  SP, AutoC445
	POP  BP
	RET
;		if (lval[1])zpush(); 
L_447:
	LEA  BX, [AutoC445+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_448
	CALL czzpush
;		if(heir1(lval2))rvalue(lval2); 
L_448:
	LEA  BX, [AutoC445-8+BP]
	PUSH BX
	CALL czheir1
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_449
	LEA  BX, [AutoC445-8+BP]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;		store(lval); 
L_449:
	LEA  BX, [AutoC445+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czstore
	ADD  SP, +2
;		return 0; 
	MOV  BX, +0
	ADD  SP, AutoC445
	POP  BP
	RET
;		} 
;	else return k; 
	JMP  L_450
L_446:
	LEA  BX, [AutoC445-2+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC445
	POP  BP
	RET
L_450:
;} 
	ADD  SP, AutoC445
	POP  BP
	RET

AutoC445	EQU 8
;	czlval	PTR	INT	+4
;	czk	VAR	INT	-2
;	czlval2	ARRAY	INT	-8

	  [SECTION .dseg]
L_445	DB "=",0

	  [SECTION .cseg]
;heir2(lval) 
czheir2:
;	int lval[]; 
	PUSH BP
	SUB  SP, AutoC451
	MOV  BP, SP

;{	int k,lval2[3]; 
;	k=heir3(lval); 
	LEA  BX, [AutoC451-2+BP]
	PUSH BX
	LEA  BX, [AutoC451+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czheir3
	ADD  SP, +2
	POP  DI
	MOV  Word [DI], BX
;	blanks(); 
	CALL czblanks
;	if(chr()!='|')return k; 
	CALL czchr
	PUSH BX
	MOV  BX, +124
	POP  DX
	CALL ccne
	OR   BX, BX
	JNZ  $+5
	JMP  L_452
	LEA  BX, [AutoC451-2+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC451
	POP  BP
	RET
;	if(k)rvalue(lval); 
L_452:
	LEA  BX, [AutoC451-2+BP]
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_453
	LEA  BX, [AutoC451+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;	while(1) 
L_453:
L_454:
	MOV  BX, +1
	OR   BX, BX
	JNZ  $+5
	JMP  L_455
;		{if (match("|")) 
	MOV  BX, L_451+0
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_456
;			{zpush(); 
	CALL czzpush
;			if(heir3(lval2)) rvalue(lval2); 
	LEA  BX, [AutoC451-8+BP]
	PUSH BX
	CALL czheir3
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_457
	LEA  BX, [AutoC451-8+BP]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;			zpop(); 
L_457:
	CALL czzpop
;			zor(); 
	CALL czzor
;			} 
;		else return 0; 
	JMP  L_458
L_456:
	MOV  BX, +0
	ADD  SP, AutoC451
	POP  BP
	RET
L_458:
;		} 
	JMP  L_454
L_455:
;} 
	ADD  SP, AutoC451
	POP  BP
	RET

AutoC451	EQU 8
;	czlval	PTR	INT	+4
;	czk	VAR	INT	-2
;	czlval2	ARRAY	INT	-8

	  [SECTION .dseg]
L_451	DB "|",0

	  [SECTION .cseg]
;heir3(lval) 
czheir3:
;	int lval[]; 
	PUSH BP
	SUB  SP, AutoC459
	MOV  BP, SP

;{	int k,lval2[3]; 
;	k=heir4(lval); 
	LEA  BX, [AutoC459-2+BP]
	PUSH BX
	LEA  BX, [AutoC459+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czheir4
	ADD  SP, +2
	POP  DI
	MOV  Word [DI], BX
;	blanks(); 
	CALL czblanks
;	if(chr()!='^')return k; 
	CALL czchr
	PUSH BX
	MOV  BX, +94
	POP  DX
	CALL ccne
	OR   BX, BX
	JNZ  $+5
	JMP  L_460
	LEA  BX, [AutoC459-2+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC459
	POP  BP
	RET
;	if(k)rvalue(lval); 
L_460:
	LEA  BX, [AutoC459-2+BP]
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_461
	LEA  BX, [AutoC459+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;	while(1) 
L_461:
L_462:
	MOV  BX, +1
	OR   BX, BX
	JNZ  $+5
	JMP  L_463
;		{if (match("^")) 
	MOV  BX, L_459+0
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_464
;			{zpush(); 
	CALL czzpush
;			if(heir4(lval2))rvalue(lval2); 
	LEA  BX, [AutoC459-8+BP]
	PUSH BX
	CALL czheir4
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_465
	LEA  BX, [AutoC459-8+BP]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;			zpop(); 
L_465:
	CALL czzpop
;			zxor(); 
	CALL czzxor
;			} 
;		else return 0; 
	JMP  L_466
L_464:
	MOV  BX, +0
	ADD  SP, AutoC459
	POP  BP
	RET
L_466:
;		} 
	JMP  L_462
L_463:
;} 
	ADD  SP, AutoC459
	POP  BP
	RET

AutoC459	EQU 8
;	czlval	PTR	INT	+4
;	czk	VAR	INT	-2
;	czlval2	ARRAY	INT	-8

	  [SECTION .dseg]
L_459	DB "^",0

	  [SECTION .cseg]
;heir4(lval) 
czheir4:
;	int lval[]; 
	PUSH BP
	SUB  SP, AutoC467
	MOV  BP, SP

;{	int k,lval2[3]; 
;	k=heir5(lval); 
	LEA  BX, [AutoC467-2+BP]
	PUSH BX
	LEA  BX, [AutoC467+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czheir5
	ADD  SP, +2
	POP  DI
	MOV  Word [DI], BX
;	blanks(); 
	CALL czblanks
;	if(chr()!='&')return k; 
	CALL czchr
	PUSH BX
	MOV  BX, +38
	POP  DX
	CALL ccne
	OR   BX, BX
	JNZ  $+5
	JMP  L_468
	LEA  BX, [AutoC467-2+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC467
	POP  BP
	RET
;	if(k)rvalue(lval); 
L_468:
	LEA  BX, [AutoC467-2+BP]
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_469
	LEA  BX, [AutoC467+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;	while(1) 
L_469:
L_470:
	MOV  BX, +1
	OR   BX, BX
	JNZ  $+5
	JMP  L_471
;		{if (match("&")) 
	MOV  BX, L_467+0
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_472
;			{zpush(); 
	CALL czzpush
;			if(heir5(lval2))rvalue(lval2); 
	LEA  BX, [AutoC467-8+BP]
	PUSH BX
	CALL czheir5
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_473
	LEA  BX, [AutoC467-8+BP]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;			zpop(); 
L_473:
	CALL czzpop
;			zand(); 
	CALL czzand
;			} 
;		else return 0; 
	JMP  L_474
L_472:
	MOV  BX, +0
	ADD  SP, AutoC467
	POP  BP
	RET
L_474:
;		} 
	JMP  L_470
L_471:
;} 
	ADD  SP, AutoC467
	POP  BP
	RET

AutoC467	EQU 8
;	czlval	PTR	INT	+4
;	czk	VAR	INT	-2
;	czlval2	ARRAY	INT	-8

	  [SECTION .dseg]
L_467	DB "&",0

	  [SECTION .cseg]
;heir5(lval) 
czheir5:
;	int lval[]; 
	PUSH BP
	SUB  SP, AutoC475
	MOV  BP, SP

;{ 
;	int k,lval2[3]; 
;	k=heir6(lval); 
	LEA  BX, [AutoC475-2+BP]
	PUSH BX
	LEA  BX, [AutoC475+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czheir6
	ADD  SP, +2
	POP  DI
	MOV  Word [DI], BX
;	blanks(); 
	CALL czblanks
;	if((streq(line+lptr,"==")==0)& 
	MOV  BX, czline
	PUSH BX
	MOV  BX, [Word czlptr]
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, L_475+0
	PUSH BX
	CALL czstreq
	ADD  SP, +4
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	PUSH BX
;		(streq(line+lptr,"!=")==0))return k; 
	MOV  BX, czline
	PUSH BX
	MOV  BX, [Word czlptr]
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, L_475+3
	PUSH BX
	CALL czstreq
	ADD  SP, +4
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	POP  DX
	AND  BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_476
	LEA  BX, [AutoC475-2+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC475
	POP  BP
	RET
;	if(k)rvalue(lval); 
L_476:
	LEA  BX, [AutoC475-2+BP]
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_477
	LEA  BX, [AutoC475+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;	while(1) 
L_477:
L_478:
	MOV  BX, +1
	OR   BX, BX
	JNZ  $+5
	JMP  L_479
;		{if (match("==")) 
	MOV  BX, L_475+6
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_480
;			{zpush(); 
	CALL czzpush
;			if(heir6(lval2))rvalue(lval2); 
	LEA  BX, [AutoC475-8+BP]
	PUSH BX
	CALL czheir6
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_481
	LEA  BX, [AutoC475-8+BP]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;			zpop(); 
L_481:
	CALL czzpop
;			zeq(); 
	CALL czzeq
;			} 
;		else if (match("!=")) 
	JMP  L_482
L_480:
	MOV  BX, L_475+9
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_483
;			{zpush(); 
	CALL czzpush
;			if(heir6(lval2))rvalue(lval2); 
	LEA  BX, [AutoC475-8+BP]
	PUSH BX
	CALL czheir6
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_484
	LEA  BX, [AutoC475-8+BP]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;			zpop(); 
L_484:
	CALL czzpop
;			zne(); 
	CALL czzne
;			} 
;		else return 0; 
	JMP  L_485
L_483:
	MOV  BX, +0
	ADD  SP, AutoC475
	POP  BP
	RET
L_485:
L_482:
;		} 
	JMP  L_478
L_479:
;} 
	ADD  SP, AutoC475
	POP  BP
	RET

AutoC475	EQU 8
;	czlval	PTR	INT	+4
;	czk	VAR	INT	-2
;	czlval2	ARRAY	INT	-8

	  [SECTION .dseg]
L_475	DB "==",0
	DB "!=",0
	DB "==",0
	DB "!=",0

	  [SECTION .cseg]
;heir6(lval) 
czheir6:
;	int lval[]; 
	PUSH BP
	SUB  SP, AutoC486
	MOV  BP, SP

;{ 
;	int k,lval2[3]; 
;	k=heir7(lval); 
	LEA  BX, [AutoC486-2+BP]
	PUSH BX
	LEA  BX, [AutoC486+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czheir7
	ADD  SP, +2
	POP  DI
	MOV  Word [DI], BX
;	blanks(); 
	CALL czblanks
;	if((streq(line+lptr,"<")==0)& 
	MOV  BX, czline
	PUSH BX
	MOV  BX, [Word czlptr]
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, L_486+0
	PUSH BX
	CALL czstreq
	ADD  SP, +4
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	PUSH BX
;		(streq(line+lptr,">")==0)& 
	MOV  BX, czline
	PUSH BX
	MOV  BX, [Word czlptr]
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, L_486+2
	PUSH BX
	CALL czstreq
	ADD  SP, +4
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	POP  DX
	AND  BX, DX
	PUSH BX
;		(streq(line+lptr,"<=")==0)& 
	MOV  BX, czline
	PUSH BX
	MOV  BX, [Word czlptr]
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, L_486+4
	PUSH BX
	CALL czstreq
	ADD  SP, +4
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	POP  DX
	AND  BX, DX
	PUSH BX
;		(streq(line+lptr,">=")==0))return k; 
	MOV  BX, czline
	PUSH BX
	MOV  BX, [Word czlptr]
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, L_486+7
	PUSH BX
	CALL czstreq
	ADD  SP, +4
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	POP  DX
	AND  BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_487
	LEA  BX, [AutoC486-2+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC486
	POP  BP
	RET
;		if(streq(line+lptr,">>"))return k; 
L_487:
	MOV  BX, czline
	PUSH BX
	MOV  BX, [Word czlptr]
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, L_486+10
	PUSH BX
	CALL czstreq
	ADD  SP, +4
	OR   BX, BX
	JNZ  $+5
	JMP  L_488
	LEA  BX, [AutoC486-2+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC486
	POP  BP
	RET
;		if(streq(line+lptr,"<<"))return k; 
L_488:
	MOV  BX, czline
	PUSH BX
	MOV  BX, [Word czlptr]
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, L_486+13
	PUSH BX
	CALL czstreq
	ADD  SP, +4
	OR   BX, BX
	JNZ  $+5
	JMP  L_489
	LEA  BX, [AutoC486-2+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC486
	POP  BP
	RET
;	if(k)rvalue(lval); 
L_489:
	LEA  BX, [AutoC486-2+BP]
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_490
	LEA  BX, [AutoC486+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;	while(1) 
L_490:
L_491:
	MOV  BX, +1
	OR   BX, BX
	JNZ  $+5
	JMP  L_492
;		{if (match("<=")) 
	MOV  BX, L_486+16
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_493
;			{zpush(); 
	CALL czzpush
;			if(heir7(lval2))rvalue(lval2); 
	LEA  BX, [AutoC486-8+BP]
	PUSH BX
	CALL czheir7
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_494
	LEA  BX, [AutoC486-8+BP]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;			zpop(); 
L_494:
	CALL czzpop
;			if(lval[2] | lval2[2]) 
	LEA  BX, [AutoC486+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC486-8+BP]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	POP  DX
	OR   BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_495
;				{ule(); 
	CALL czule
;				continue; 
	JMP  L_491
;				} 
;			zle(); 
L_495:
	CALL czzle
;			} 
;		else if (match(">=")) 
	JMP  L_496
L_493:
	MOV  BX, L_486+19
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_497
;			{zpush(); 
	CALL czzpush
;			if(heir7(lval2))rvalue(lval2); 
	LEA  BX, [AutoC486-8+BP]
	PUSH BX
	CALL czheir7
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_498
	LEA  BX, [AutoC486-8+BP]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;			zpop(); 
L_498:
	CALL czzpop
;			if(lval[2] | lval2[2]) 
	LEA  BX, [AutoC486+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC486-8+BP]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	POP  DX
	OR   BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_499
;				{uge(); 
	CALL czuge
;				continue; 
	JMP  L_491
;				} 
;			zge(); 
L_499:
	CALL czzge
;			} 
;		else if((streq(line+lptr,"<"))& 
	JMP  L_500
L_497:
	MOV  BX, czline
	PUSH BX
	MOV  BX, [Word czlptr]
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, L_486+22
	PUSH BX
	CALL czstreq
	ADD  SP, +4
	PUSH BX
;			(streq(line+lptr,"<<")==0)) 
	MOV  BX, czline
	PUSH BX
	MOV  BX, [Word czlptr]
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, L_486+24
	PUSH BX
	CALL czstreq
	ADD  SP, +4
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	POP  DX
	AND  BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_501
;			{inbyte(); 
	CALL czinbyte
;			zpush(); 
	CALL czzpush
;			if(heir7(lval2))rvalue(lval2); 
	LEA  BX, [AutoC486-8+BP]
	PUSH BX
	CALL czheir7
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_502
	LEA  BX, [AutoC486-8+BP]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;			zpop(); 
L_502:
	CALL czzpop
;			if(lval[2] | lval2[2]) 
	LEA  BX, [AutoC486+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC486-8+BP]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	POP  DX
	OR   BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_503
;				{ult(); 
	CALL czult
;				continue; 
	JMP  L_491
;				} 
;			zlt(); 
L_503:
	CALL czzlt
;			} 
;		else if((streq(line+lptr,">"))& 
	JMP  L_504
L_501:
	MOV  BX, czline
	PUSH BX
	MOV  BX, [Word czlptr]
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, L_486+27
	PUSH BX
	CALL czstreq
	ADD  SP, +4
	PUSH BX
;			(streq(line+lptr,">>")==0)) 
	MOV  BX, czline
	PUSH BX
	MOV  BX, [Word czlptr]
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, L_486+29
	PUSH BX
	CALL czstreq
	ADD  SP, +4
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	POP  DX
	AND  BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_505
;			{inbyte(); 
	CALL czinbyte
;			zpush(); 
	CALL czzpush
;			if(heir7(lval2))rvalue(lval2); 
	LEA  BX, [AutoC486-8+BP]
	PUSH BX
	CALL czheir7
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_506
	LEA  BX, [AutoC486-8+BP]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;			zpop(); 
L_506:
	CALL czzpop
;			if(lval[2] | lval2[2]) 
	LEA  BX, [AutoC486+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC486-8+BP]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	POP  DX
	OR   BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_507
;				{ugt(); 
	CALL czugt
;				continue; 
	JMP  L_491
;				} 
;			zgt(); 
L_507:
	CALL czzgt
;			} 
;		else return 0; 
	JMP  L_508
L_505:
	MOV  BX, +0
	ADD  SP, AutoC486
	POP  BP
	RET
L_508:
L_504:
L_500:
L_496:
;		} 
	JMP  L_491
L_492:
;} 
	ADD  SP, AutoC486
	POP  BP
	RET

AutoC486	EQU 8
;	czlval	PTR	INT	+4
;	czk	VAR	INT	-2
;	czlval2	ARRAY	INT	-8

	  [SECTION .dseg]
L_486	DB "<",0
	DB ">",0
	DB "<=",0
	DB ">=",0
	DB ">>",0
	DB "<<",0
	DB "<=",0
	DB ">=",0
	DB "<",0
	DB "<<",0
	DB ">",0
	DB ">>",0

	  [SECTION .cseg]
; 
;/** EO C86N-5.C **/ 
; 
;/*	>>>>>> start of cc6 <<<<<<	*/ 
; 
;heir7(lval) 
czheir7:
;	int lval[]; 
	PUSH BP
	SUB  SP, AutoC509
	MOV  BP, SP

;{ 
;	int k,lval2[3]; 
;	k=heir8(lval); 
	LEA  BX, [AutoC509-2+BP]
	PUSH BX
	LEA  BX, [AutoC509+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czheir8
	ADD  SP, +2
	POP  DI
	MOV  Word [DI], BX
;	blanks(); 
	CALL czblanks
;	if((streq(line+lptr,">>")==0)& 
	MOV  BX, czline
	PUSH BX
	MOV  BX, [Word czlptr]
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, L_509+0
	PUSH BX
	CALL czstreq
	ADD  SP, +4
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	PUSH BX
;		(streq(line+lptr,"<<")==0))return k; 
	MOV  BX, czline
	PUSH BX
	MOV  BX, [Word czlptr]
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, L_509+3
	PUSH BX
	CALL czstreq
	ADD  SP, +4
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	POP  DX
	AND  BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_510
	LEA  BX, [AutoC509-2+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC509
	POP  BP
	RET
;	if(k)rvalue(lval); 
L_510:
	LEA  BX, [AutoC509-2+BP]
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_511
	LEA  BX, [AutoC509+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;	while(1) 
L_511:
L_512:
	MOV  BX, +1
	OR   BX, BX
	JNZ  $+5
	JMP  L_513
;		{if (match(">>")) 
	MOV  BX, L_509+6
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_514
;			{zpush(); 
	CALL czzpush
;			if(heir8(lval2))rvalue(lval2); 
	LEA  BX, [AutoC509-8+BP]
	PUSH BX
	CALL czheir8
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_515
	LEA  BX, [AutoC509-8+BP]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;			zpop(); 
L_515:
	CALL czzpop
;			asr(); 
	CALL czasr
;			} 
;		else if (match("<<")) 
	JMP  L_516
L_514:
	MOV  BX, L_509+9
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_517
;			{zpush(); 
	CALL czzpush
;			if(heir8(lval2))rvalue(lval2); 
	LEA  BX, [AutoC509-8+BP]
	PUSH BX
	CALL czheir8
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_518
	LEA  BX, [AutoC509-8+BP]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;			zpop(); 
L_518:
	CALL czzpop
;			asl(); 
	CALL czasl
;			} 
;		else return 0; 
	JMP  L_519
L_517:
	MOV  BX, +0
	ADD  SP, AutoC509
	POP  BP
	RET
L_519:
L_516:
;		} 
	JMP  L_512
L_513:
;} 
	ADD  SP, AutoC509
	POP  BP
	RET

AutoC509	EQU 8
;	czlval	PTR	INT	+4
;	czk	VAR	INT	-2
;	czlval2	ARRAY	INT	-8

	  [SECTION .dseg]
L_509	DB ">>",0
	DB "<<",0
	DB ">>",0
	DB "<<",0

	  [SECTION .cseg]
;heir8(lval) 
czheir8:
;	int lval[]; 
	PUSH BP
	SUB  SP, AutoC520
	MOV  BP, SP

;{ 
;	int k,lval2[3]; 
;	k=heir9(lval); 
	LEA  BX, [AutoC520-2+BP]
	PUSH BX
	LEA  BX, [AutoC520+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czheir9
	ADD  SP, +2
	POP  DI
	MOV  Word [DI], BX
;	blanks(); 
	CALL czblanks
;	if((chr()!='+')&(chr()!='-'))return k; 
	CALL czchr
	PUSH BX
	MOV  BX, +43
	POP  DX
	CALL ccne
	PUSH BX
	CALL czchr
	PUSH BX
	MOV  BX, +45
	POP  DX
	CALL ccne
	POP  DX
	AND  BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_521
	LEA  BX, [AutoC520-2+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC520
	POP  BP
	RET
;	if(k)rvalue(lval); 
L_521:
	LEA  BX, [AutoC520-2+BP]
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_522
	LEA  BX, [AutoC520+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;	while(1) 
L_522:
L_523:
	MOV  BX, +1
	OR   BX, BX
	JNZ  $+5
	JMP  L_524
;		{if (match("+")) 
	MOV  BX, L_520+0
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_525
;			{zpush(); 
	CALL czzpush
;			if(heir9(lval2))rvalue(lval2); 
	LEA  BX, [AutoC520-8+BP]
	PUSH BX
	CALL czheir9
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_526
	LEA  BX, [AutoC520-8+BP]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;			if(dbltest(lval,lval2)) 
L_526:
	LEA  BX, [AutoC520+4+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC520-8+BP]
	PUSH BX
	CALL czdbltest
	ADD  SP, +4
	OR   BX, BX
	JNZ  $+5
	JMP  L_527
;				doublereg(); 
	CALL czdoublereg
;			zpop(); 
L_527:
	CALL czzpop
;			if(dbltest(lval2,lval)) 
	LEA  BX, [AutoC520-8+BP]
	PUSH BX
	LEA  BX, [AutoC520+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czdbltest
	ADD  SP, +4
	OR   BX, BX
	JNZ  $+5
	JMP  L_528
;				{swap(); 
	CALL czswap
;				doublereg(); 
	CALL czdoublereg
;				swap(); 
	CALL czswap
;				} 
;			zadd(); 
L_528:
	CALL czzadd
;			result(lval,lval2); 
	LEA  BX, [AutoC520+4+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC520-8+BP]
	PUSH BX
	CALL czresult
	ADD  SP, +4
;			} 
;		else if (match("-")) 
	JMP  L_529
L_525:
	MOV  BX, L_520+2
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_530
;			{zpush(); 
	CALL czzpush
;			if(heir9(lval2))rvalue(lval2); 
	LEA  BX, [AutoC520-8+BP]
	PUSH BX
	CALL czheir9
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_531
	LEA  BX, [AutoC520-8+BP]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;			if(dbltest(lval,lval2)) 
L_531:
	LEA  BX, [AutoC520+4+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC520-8+BP]
	PUSH BX
	CALL czdbltest
	ADD  SP, +4
	OR   BX, BX
	JNZ  $+5
	JMP  L_532
;				doublereg(); 
	CALL czdoublereg
;			zpop(); 
L_532:
	CALL czzpop
;			if(dbltest(lval2,lval)) 
	LEA  BX, [AutoC520-8+BP]
	PUSH BX
	LEA  BX, [AutoC520+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czdbltest
	ADD  SP, +4
	OR   BX, BX
	JNZ  $+5
	JMP  L_533
;				{swap(); 
	CALL czswap
;				doublereg(); 
	CALL czdoublereg
;				swap(); 
	CALL czswap
;				} 
;			zsub(); 
L_533:
	CALL czzsub
;			if((lval[2]==cint)& 
	LEA  BX, [AutoC520+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	POP  DX
	CALL cceq
	PUSH BX
;			   (lval2[2]==cint)) 
	LEA  BX, [AutoC520-8+BP]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	POP  DX
	CALL cceq
	POP  DX
	AND  BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_534
;				{swap(); 
	CALL czswap
;				immed();ol("1"); 
	CALL czimmed
	MOV  BX, L_520+4
	PUSH BX
	CALL czol
	ADD  SP, +2
;				asr();  /** div by 2 **/ 
	CALL czasr
;				} 
;			result(lval,lval2); 
L_534:
	LEA  BX, [AutoC520+4+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC520-8+BP]
	PUSH BX
	CALL czresult
	ADD  SP, +4
;			} 
;		else return 0; 
	JMP  L_535
L_530:
	MOV  BX, +0
	ADD  SP, AutoC520
	POP  BP
	RET
L_535:
L_529:
;		} 
	JMP  L_523
L_524:
;} 
	ADD  SP, AutoC520
	POP  BP
	RET

AutoC520	EQU 8
;	czlval	PTR	INT	+4
;	czk	VAR	INT	-2
;	czlval2	ARRAY	INT	-8

	  [SECTION .dseg]
L_520	DB "+",0
	DB "-",0
	DB "1",0

	  [SECTION .cseg]
;heir9(lval) 
czheir9:
;	int lval[]; 
	PUSH BP
	SUB  SP, AutoC536
	MOV  BP, SP

;{ 
;	int k,lval2[3]; 
;	k=heir10(lval); 
	LEA  BX, [AutoC536-2+BP]
	PUSH BX
	LEA  BX, [AutoC536+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czheir10
	ADD  SP, +2
	POP  DI
	MOV  Word [DI], BX
;	blanks(); 
	CALL czblanks
;	if((chr()!='*')&(chr()!='/')& 
	CALL czchr
	PUSH BX
	MOV  BX, +42
	POP  DX
	CALL ccne
	PUSH BX
	CALL czchr
	PUSH BX
	MOV  BX, +47
	POP  DX
	CALL ccne
	POP  DX
	AND  BX, DX
	PUSH BX
;		(chr()!='%'))return k; 
	CALL czchr
	PUSH BX
	MOV  BX, +37
	POP  DX
	CALL ccne
	POP  DX
	AND  BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_537
	LEA  BX, [AutoC536-2+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC536
	POP  BP
	RET
;	if(k)rvalue(lval); 
L_537:
	LEA  BX, [AutoC536-2+BP]
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_538
	LEA  BX, [AutoC536+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;	while(1) 
L_538:
L_539:
	MOV  BX, +1
	OR   BX, BX
	JNZ  $+5
	JMP  L_540
;		{if (match("*")) 
	MOV  BX, L_536+0
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_541
;			{zpush(); 
	CALL czzpush
;			if(heir9(lval2))rvalue(lval2); 
	LEA  BX, [AutoC536-8+BP]
	PUSH BX
	CALL czheir9
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_542
	LEA  BX, [AutoC536-8+BP]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;			zpop(); 
L_542:
	CALL czzpop
;			mult(); 
	CALL czmult
;			} 
;		else if (match("/")) 
	JMP  L_543
L_541:
	MOV  BX, L_536+2
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_544
;			{zpush(); 
	CALL czzpush
;			if(heir10(lval2))rvalue(lval2); 
	LEA  BX, [AutoC536-8+BP]
	PUSH BX
	CALL czheir10
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_545
	LEA  BX, [AutoC536-8+BP]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;			zpop(); 
L_545:
	CALL czzpop
;			ccdiv(); 
	CALL czccdiv
;			} 
;		else if (match("%")) 
	JMP  L_546
L_544:
	MOV  BX, L_536+4
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_547
;			{zpush(); 
	CALL czzpush
;			if(heir10(lval2))rvalue(lval2); 
	LEA  BX, [AutoC536-8+BP]
	PUSH BX
	CALL czheir10
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_548
	LEA  BX, [AutoC536-8+BP]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;			zpop(); 
L_548:
	CALL czzpop
;			zmod(); 
	CALL czzmod
;			} 
;		else return 0; 
	JMP  L_549
L_547:
	MOV  BX, +0
	ADD  SP, AutoC536
	POP  BP
	RET
L_549:
L_546:
L_543:
;		} 
	JMP  L_539
L_540:
;} 
	ADD  SP, AutoC536
	POP  BP
	RET

AutoC536	EQU 8
;	czlval	PTR	INT	+4
;	czk	VAR	INT	-2
;	czlval2	ARRAY	INT	-8

	  [SECTION .dseg]
L_536	DB "*",0
	DB "/",0
	DB "%",0

	  [SECTION .cseg]
;heir10(lval) 
czheir10:
;	int lval[]; 
	PUSH BP
	SUB  SP, AutoC550
	MOV  BP, SP

;{ 
;	int k; 
;	char *ptr; 
;	if(match("++")) 
	MOV  BX, L_550+0
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_551
;		{if((k=heir10(lval))==0) 
	LEA  BX, [AutoC550-2+BP]
	PUSH BX
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czheir10
	ADD  SP, +2
	POP  DI
	MOV  Word [DI], BX
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_552
;			{needlval(); 
	CALL czneedlval
;			return 0; 
	MOV  BX, +0
	ADD  SP, AutoC550
	POP  BP
	RET
;			} 
;		if(lval[1])zpush(); 
L_552:
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_553
	CALL czzpush
;		rvalue(lval); 
L_553:
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;		ccinc(); 
	CALL czccinc
;		if(lval[2]==cint) 
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_554
;			ccinc(); 
	CALL czccinc
;		store(lval); 
L_554:
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czstore
	ADD  SP, +2
;		return 0; 
	MOV  BX, +0
	ADD  SP, AutoC550
	POP  BP
	RET
;		} 
;	else if(match("--")) 
	JMP  L_555
L_551:
	MOV  BX, L_550+3
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_556
;		{if((k=heir10(lval))==0) 
	LEA  BX, [AutoC550-2+BP]
	PUSH BX
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czheir10
	ADD  SP, +2
	POP  DI
	MOV  Word [DI], BX
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_557
;			{needlval(); 
	CALL czneedlval
;			return 0; 
	MOV  BX, +0
	ADD  SP, AutoC550
	POP  BP
	RET
;			} 
;		if(lval[1])zpush(); 
L_557:
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_558
	CALL czzpush
;		rvalue(lval); 
L_558:
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;		ccdec(); 
	CALL czccdec
;		if(lval[2]==cint) 
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_559
;			ccdec(); 
	CALL czccdec
;		store(lval); 
L_559:
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czstore
	ADD  SP, +2
;		return 0; 
	MOV  BX, +0
	ADD  SP, AutoC550
	POP  BP
	RET
;		} 
;	else if (match("-")) 
	JMP  L_560
L_556:
	MOV  BX, L_550+6
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_561
;		{k=heir10(lval); 
	LEA  BX, [AutoC550-2+BP]
	PUSH BX
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czheir10
	ADD  SP, +2
	POP  DI
	MOV  Word [DI], BX
;		if (k) rvalue(lval); 
	LEA  BX, [AutoC550-2+BP]
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_562
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;		ccneg();              /** two's complement **/ 
L_562:
	CALL czccneg
;		return 0; 
	MOV  BX, +0
	ADD  SP, AutoC550
	POP  BP
	RET
;		} 
;	else if(match("*")) 
	JMP  L_563
L_561:
	MOV  BX, L_550+8
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_564
;		{k=heir10(lval); 
	LEA  BX, [AutoC550-2+BP]
	PUSH BX
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czheir10
	ADD  SP, +2
	POP  DI
	MOV  Word [DI], BX
;		if(k)rvalue(lval); 
	LEA  BX, [AutoC550-2+BP]
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_565
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;		if(ptr=lval[0]) 
L_565:
	LEA  BX, [AutoC550-4+BP]
	PUSH BX
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
	OR   BX, BX
	JNZ  $+5
	JMP  L_566
;			lval[1]=ptr[type]; 
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC550-4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +10
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Word [DI], BX
;		else 
	JMP  L_567
L_566:
;			lval[1]=cint; 
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +2
	POP  DI
	MOV  Word [DI], BX
L_567:
;		lval[2]=0; /*flag as not ptr or array*/ 
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
;		return 1; 
	MOV  BX, +1
	ADD  SP, AutoC550
	POP  BP
	RET
;		} 
;	else if(match("&")) 
	JMP  L_568
L_564:
	MOV  BX, L_550+10
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_569
;		{k=heir10(lval); 
	LEA  BX, [AutoC550-2+BP]
	PUSH BX
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czheir10
	ADD  SP, +2
	POP  DI
	MOV  Word [DI], BX
;		if(k==0) 
	LEA  BX, [AutoC550-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_570
;			{error("illegal address"); 
	MOV  BX, L_550+12
	PUSH BX
	CALL czerror
	ADD  SP, +2
;			return 0; 
	MOV  BX, +0
	ADD  SP, AutoC550
	POP  BP
	RET
;			} 
;		ptr=lval[0]; 
L_570:
	LEA  BX, [AutoC550-4+BP]
	PUSH BX
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;		lval[2]=ptr[type]; 
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC550-4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +10
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Word [DI], BX
;		if(lval[1]) return 0; 
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_571
	MOV  BX, +0
	ADD  SP, AutoC550
	POP  BP
	RET
;		/* global & non-array */ 
;		immedo(); 
L_571:
	CALL czimmedo
;		outstr(ptr); 
	LEA  BX, [AutoC550-4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
;		nl(); 
	CALL cznl
;		lval[1]=ptr[type]; 
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC550-4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +10
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Word [DI], BX
;		return 0; 
	MOV  BX, +0
	ADD  SP, AutoC550
	POP  BP
	RET
;		} 
;	else  
	JMP  L_572
L_569:
;		{k=heir11(lval); 
	LEA  BX, [AutoC550-2+BP]
	PUSH BX
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czheir11
	ADD  SP, +2
	POP  DI
	MOV  Word [DI], BX
;		if(match("++")) 
	MOV  BX, L_550+28
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_573
;			{if(k==0) 
	LEA  BX, [AutoC550-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_574
;				{needlval(); 
	CALL czneedlval
;				return 0; 
	MOV  BX, +0
	ADD  SP, AutoC550
	POP  BP
	RET
;				} 
;			if(lval[1])zpush(); 
L_574:
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_575
	CALL czzpush
;			rvalue(lval); 
L_575:
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;			ccinc(); 
	CALL czccinc
;			if(lval[2]==cint) 
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_576
;				ccinc(); 
	CALL czccinc
;			store(lval); 
L_576:
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czstore
	ADD  SP, +2
;			ccdec(); 
	CALL czccdec
;			if(lval[2]==cint) 
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_577
;				ccdec(); 
	CALL czccdec
;			return 0; 
L_577:
	MOV  BX, +0
	ADD  SP, AutoC550
	POP  BP
	RET
;			} 
;		else if(match("--")) 
	JMP  L_578
L_573:
	MOV  BX, L_550+31
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_579
;			{if(k==0) 
	LEA  BX, [AutoC550-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_580
;				{needlval(); 
	CALL czneedlval
;				return 0; 
	MOV  BX, +0
	ADD  SP, AutoC550
	POP  BP
	RET
;				} 
;			if(lval[1])zpush(); 
L_580:
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_581
	CALL czzpush
;			rvalue(lval); 
L_581:
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;			ccdec(); 
	CALL czccdec
;			if(lval[2]==cint) 
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_582
;				ccdec(); 
	CALL czccdec
;			store(lval); 
L_582:
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czstore
	ADD  SP, +2
;			ccinc(); 
	CALL czccinc
;			if(lval[2]==cint) 
	LEA  BX, [AutoC550+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_583
;				ccinc(); 
	CALL czccinc
;			return 0; 
L_583:
	MOV  BX, +0
	ADD  SP, AutoC550
	POP  BP
	RET
;			} 
;		else return k; 
	JMP  L_584
L_579:
	LEA  BX, [AutoC550-2+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC550
	POP  BP
	RET
L_584:
L_578:
;		} 
L_572:
L_568:
L_563:
L_560:
L_555:
;	} 
	ADD  SP, AutoC550
	POP  BP
	RET

AutoC550	EQU 4
;	czlval	PTR	INT	+4
;	czk	VAR	INT	-2
;	czptr	PTR	CHAR	-4

	  [SECTION .dseg]
L_550	DB "++",0
	DB "--",0
	DB "-",0
	DB "*",0
	DB "&",0
	DB "illegal address",0
	DB "++",0
	DB "--",0

	  [SECTION .cseg]
; 
;/** EO C86N-6.C **/ 
; 
;/*	>>>>>> start of cc7 <<<<<<	*/ 
; 
;heir11(lval) 
czheir11:
;	int *lval; 
	PUSH BP
	SUB  SP, AutoC585
	MOV  BP, SP

;{	int k;char *ptr; 
;	k=primary(lval); 
	LEA  BX, [AutoC585-2+BP]
	PUSH BX
	LEA  BX, [AutoC585+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czprimary
	ADD  SP, +2
	POP  DI
	MOV  Word [DI], BX
;	ptr=lval[0]; 
	LEA  BX, [AutoC585-4+BP]
	PUSH BX
	LEA  BX, [AutoC585+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;	blanks(); 
	CALL czblanks
;	if((chr()=='[')|(chr()=='(')) 
	CALL czchr
	PUSH BX
	MOV  BX, +91
	POP  DX
	CALL cceq
	PUSH BX
	CALL czchr
	PUSH BX
	MOV  BX, +40
	POP  DX
	CALL cceq
	POP  DX
	OR   BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_586
;	while(1) 
L_587:
	MOV  BX, +1
	OR   BX, BX
	JNZ  $+5
	JMP  L_588
;		{if(match("[")) 
	MOV  BX, L_585+0
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_589
;			{if(ptr==0) 
	LEA  BX, [AutoC585-4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_590
;				{error("can't subscript"); 
	MOV  BX, L_585+2
	PUSH BX
	CALL czerror
	ADD  SP, +2
;				junk(); 
	CALL czjunk
;				needbrack("]"); 
	MOV  BX, L_585+18
	PUSH BX
	CALL czneedbrack
	ADD  SP, +2
;				return 0; 
	MOV  BX, +0
	ADD  SP, AutoC585
	POP  BP
	RET
;				} 
;			else if(ptr[ident]==pointer)rvalue(lval); 
	JMP  L_591
L_590:
	LEA  BX, [AutoC585-4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +9
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +3
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_592
	LEA  BX, [AutoC585+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;			else if(ptr[ident]!=array) 
	JMP  L_593
L_592:
	LEA  BX, [AutoC585-4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +9
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +2
	POP  DX
	CALL ccne
	OR   BX, BX
	JNZ  $+5
	JMP  L_594
;				{error("can't subscript"); 
	MOV  BX, L_585+20
	PUSH BX
	CALL czerror
	ADD  SP, +2
;				k=0; 
	LEA  BX, [AutoC585-2+BP]
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
;				} 
;			zpush(); 
L_594:
L_593:
L_591:
	CALL czzpush
;			expression(); 
	CALL czexpression
;			needbrack("]"); 
	MOV  BX, L_585+36
	PUSH BX
	CALL czneedbrack
	ADD  SP, +2
;			if(ptr[type]==cint)doublereg(); 
	LEA  BX, [AutoC585-4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +10
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +2
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_595
	CALL czdoublereg
;			zpop(); 
L_595:
	CALL czzpop
;			zadd(); 
	CALL czzadd
;			lval[0]=lval[2]=0; 
	LEA  BX, [AutoC585+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC585+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
	POP  DI
	MOV  Word [DI], BX
;			lval[1]=ptr[type]; 
	LEA  BX, [AutoC585+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC585-4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +10
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Word [DI], BX
;			k=1; 
	LEA  BX, [AutoC585-2+BP]
	PUSH BX
	MOV  BX, +1
	POP  DI
	MOV  Word [DI], BX
;			} 
;		else if(match("(")) 
	JMP  L_596
L_589:
	MOV  BX, L_585+38
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_597
;			{if(ptr==0) 
	LEA  BX, [AutoC585-4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_598
;				{callfunction(0); 
	MOV  BX, +0
	PUSH BX
	CALL czcallfunction
	ADD  SP, +2
;				} 
;			else if(ptr[ident]!=function) 
	JMP  L_599
L_598:
	LEA  BX, [AutoC585-4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +9
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +4
	POP  DX
	CALL ccne
	OR   BX, BX
	JNZ  $+5
	JMP  L_600
;				{rvalue(lval); 
	LEA  BX, [AutoC585+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czrvalue
	ADD  SP, +2
;				callfunction(0); 
	MOV  BX, +0
	PUSH BX
	CALL czcallfunction
	ADD  SP, +2
;				} 
;			else callfunction(ptr); 
	JMP  L_601
L_600:
	LEA  BX, [AutoC585-4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czcallfunction
	ADD  SP, +2
L_601:
L_599:
;			k=lval[0]=0; 
	LEA  BX, [AutoC585-2+BP]
	PUSH BX
	LEA  BX, [AutoC585+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
	POP  DI
	MOV  Word [DI], BX
;			} 
;		else return k; 
	JMP  L_602
L_597:
	LEA  BX, [AutoC585-2+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC585
	POP  BP
	RET
L_602:
L_596:
;		} 
	JMP  L_587
L_588:
;	if(ptr==0)return k; 
L_586:
	LEA  BX, [AutoC585-4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_603
	LEA  BX, [AutoC585-2+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC585
	POP  BP
	RET
;	if(ptr[ident]==function) 
L_603:
	LEA  BX, [AutoC585-4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +9
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +4
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_604
;		{immedo(); 
	CALL czimmedo
;		outname(ptr); 
	LEA  BX, [AutoC585-4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czoutname
	ADD  SP, +2
;		nl(); 
	CALL cznl
;		return 0; 
	MOV  BX, +0
	ADD  SP, AutoC585
	POP  BP
	RET
;		} 
;	return k; 
L_604:
	LEA  BX, [AutoC585-2+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC585
	POP  BP
	RET
;} 

AutoC585	EQU 4
;	czlval	PTR	INT	+4
;	czk	VAR	INT	-2
;	czptr	PTR	CHAR	-4

	  [SECTION .dseg]
L_585	DB "[",0
	DB "can't subscript",0
	DB "]",0
	DB "can't subscript",0
	DB "]",0
	DB "(",0

	  [SECTION .cseg]
;primary(lval) 
czprimary:
;	int *lval; 
	PUSH BP
	SUB  SP, AutoC605
	MOV  BP, SP

;{	char *ptr,sname[namesize];int num[1]; 
;	int k; 
;	lval[2]=0;	/* Clear ptr/array type. */ 
	LEA  BX, [AutoC605+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
;	if(match("(")) 
	MOV  BX, L_605+0
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_606
;		{k=heir1(lval); 
	LEA  BX, [AutoC605-15+BP]
	PUSH BX
	LEA  BX, [AutoC605+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czheir1
	ADD  SP, +2
	POP  DI
	MOV  Word [DI], BX
;		needbrack(")"); 
	MOV  BX, L_605+2
	PUSH BX
	CALL czneedbrack
	ADD  SP, +2
;		return k; 
	LEA  BX, [AutoC605-15+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC605
	POP  BP
	RET
;		} 
;	if(symname(sname)) 
L_606:
	LEA  BX, [AutoC605-11+BP]
	PUSH BX
	CALL czsymname
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_607
;		{if(ptr=findloc(sname)) 
	LEA  BX, [AutoC605-2+BP]
	PUSH BX
	LEA  BX, [AutoC605-11+BP]
	PUSH BX
	CALL czfindloc
	ADD  SP, +2
	POP  DI
	MOV  Word [DI], BX
	OR   BX, BX
	JNZ  $+5
	JMP  L_608
;			{getloc(ptr); 
	LEA  BX, [AutoC605-2+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czgetloc
	ADD  SP, +2
;			lval[0]=ptr; 
	LEA  BX, [AutoC605+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC605-2+BP]
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;			lval[1]=ptr[type]; 
	LEA  BX, [AutoC605+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC605-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +10
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Word [DI], BX
;			if(ptr[ident]==pointer) 
	LEA  BX, [AutoC605-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +9
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +3
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_609
;				{lval[1]=cint; 
	LEA  BX, [AutoC605+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +2
	POP  DI
	MOV  Word [DI], BX
;				lval[2]=ptr[type]; 
	LEA  BX, [AutoC605+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC605-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +10
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Word [DI], BX
;				} 
;			if(ptr[ident]==array) 
L_609:
	LEA  BX, [AutoC605-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +9
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +2
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_610
;				{lval[2]=ptr[type]; 
	LEA  BX, [AutoC605+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC605-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +10
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Word [DI], BX
;				return 0; 
	MOV  BX, +0
	ADD  SP, AutoC605
	POP  BP
	RET
;				} 
;			else return 1; 
	JMP  L_611
L_610:
	MOV  BX, +1
	ADD  SP, AutoC605
	POP  BP
	RET
L_611:
;			} 
;		if(ptr=findglb(sname)) 
L_608:
	LEA  BX, [AutoC605-2+BP]
	PUSH BX
	LEA  BX, [AutoC605-11+BP]
	PUSH BX
	CALL czfindglb
	ADD  SP, +2
	POP  DI
	MOV  Word [DI], BX
	OR   BX, BX
	JNZ  $+5
	JMP  L_612
;			if(ptr[ident]!=function) 
	LEA  BX, [AutoC605-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +9
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +4
	POP  DX
	CALL ccne
	OR   BX, BX
	JNZ  $+5
	JMP  L_613
;			{lval[0]=ptr; 
	LEA  BX, [AutoC605+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC605-2+BP]
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;			lval[1]=0; 
	LEA  BX, [AutoC605+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
;			if(ptr[ident]!=array) 
	LEA  BX, [AutoC605-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +9
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +2
	POP  DX
	CALL ccne
	OR   BX, BX
	JNZ  $+5
	JMP  L_614
;				{if(ptr[ident]==pointer) 
	LEA  BX, [AutoC605-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +9
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +3
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_615
;					lval[2]=ptr[type]; 
	LEA  BX, [AutoC605+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC605-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +10
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Word [DI], BX
;				return 1; 
L_615:
	MOV  BX, +1
	ADD  SP, AutoC605
	POP  BP
	RET
;				} 
;			immedo();outname(ptr);nl(); 
L_614:
	CALL czimmedo
	LEA  BX, [AutoC605-2+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czoutname
	ADD  SP, +2
	CALL cznl
;			lval[1]=lval[2]=ptr[type]; 
	LEA  BX, [AutoC605+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC605+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC605-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +10
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Word [DI], BX
	POP  DI
	MOV  Word [DI], BX
;			return 0; 
	MOV  BX, +0
	ADD  SP, AutoC605
	POP  BP
	RET
;			} 
;		ptr=addglb(sname,function,cint,0); 
L_613:
L_612:
	LEA  BX, [AutoC605-2+BP]
	PUSH BX
	LEA  BX, [AutoC605-11+BP]
	PUSH BX
	MOV  BX, +4
	PUSH BX
	MOV  BX, +2
	PUSH BX
	MOV  BX, +0
	PUSH BX
	CALL czaddglb
	ADD  SP, +8
	POP  DI
	MOV  Word [DI], BX
;		lval[0]=ptr; 
	LEA  BX, [AutoC605+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC605-2+BP]
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;		lval[1]=0; 
	LEA  BX, [AutoC605+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
;		return 0; 
	MOV  BX, +0
	ADD  SP, AutoC605
	POP  BP
	RET
;		} 
;	if(constant(num)) 
L_607:
	LEA  BX, [AutoC605-13+BP]
	PUSH BX
	CALL czconstant
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_616
;		return(lval[0]=lval[1]=0); 
	LEA  BX, [AutoC605+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC605+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
	POP  DI
	MOV  Word [DI], BX
	ADD  SP, AutoC605
	POP  BP
	RET
;	else 
	JMP  L_617
L_616:
;		{error("invalid expression"); 
	MOV  BX, L_605+4
	PUSH BX
	CALL czerror
	ADD  SP, +2
;		immed();outdec(0);nl(); 
	CALL czimmed
	MOV  BX, +0
	PUSH BX
	CALL czoutdec
	ADD  SP, +2
	CALL cznl
;		junk(); 
	CALL czjunk
;		return 0; 
	MOV  BX, +0
	ADD  SP, AutoC605
	POP  BP
	RET
;		} 
L_617:
;	} 
	ADD  SP, AutoC605
	POP  BP
	RET

AutoC605	EQU 15
;	czlval	PTR	INT	+4
;	czptr	PTR	CHAR	-2
;	czsname	ARRAY	CHAR	-11
;	cznum	ARRAY	INT	-13
;	czk	VAR	INT	-15

	  [SECTION .dseg]
L_605	DB "(",0
	DB ")",0
	DB "invalid expression",0

	  [SECTION .cseg]
; 
; 
;store(lval) 
czstore:
;	int *lval; 
	PUSH BP
	SUB  SP, AutoC618
	MOV  BP, SP

;{	if (lval[1]==0) 
	LEA  BX, [AutoC618+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_619
;		putmem(lval[0]); 
	LEA  BX, [AutoC618+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	CALL czputmem
	ADD  SP, +2
;	else 
	JMP  L_620
L_619:
;		putstk(lval[1]); 
	LEA  BX, [AutoC618+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	CALL czputstk
	ADD  SP, +2
L_620:
;} 
	POP  BP
	RET

AutoC618	EQU 0
;	czlval	PTR	INT	+4
; 
; 
;rvalue(lval) 
czrvalue:
;	int *lval; 
	PUSH BP
	SUB  SP, AutoC621
	MOV  BP, SP

;{	if((lval[0] != 0) & (lval[1] == 0)) 
	LEA  BX, [AutoC621+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL ccne
	PUSH BX
	LEA  BX, [AutoC621+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	POP  DX
	AND  BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_622
;		getmem(lval[0]); 
	LEA  BX, [AutoC621+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	CALL czgetmem
	ADD  SP, +2
;	else 
	JMP  L_623
L_622:
;		indirect(lval[1]); 
	LEA  BX, [AutoC621+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	CALL czindirect
	ADD  SP, +2
L_623:
;} 
	POP  BP
	RET

AutoC621	EQU 0
;	czlval	PTR	INT	+4
; 
; 
;cctest(label) 
czcctest:
;	int label; 
	PUSH BP
	SUB  SP, AutoC624
	MOV  BP, SP

;{ 
;	needbrack("("); 
	MOV  BX, L_624+0
	PUSH BX
	CALL czneedbrack
	ADD  SP, +2
;	expression(); 
	CALL czexpression
;	needbrack(")"); 
	MOV  BX, L_624+2
	PUSH BX
	CALL czneedbrack
	ADD  SP, +2
;	testjump(label); 
	LEA  BX, [AutoC624+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL cztestjump
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC624	EQU 0
;	czlabel	VAR	INT	+4

	  [SECTION .dseg]
L_624	DB "(",0
	DB ")",0

	  [SECTION .cseg]
; 
; 
;constant(val) 
czconstant:
;	int val[]; 
	PUSH BP
	SUB  SP, AutoC625
	MOV  BP, SP

;{	if (number(val)) 
	LEA  BX, [AutoC625+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL cznumber
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_626
;		immed(); 
	CALL czimmed
;	else if (pstr(val)) 
	JMP  L_627
L_626:
	LEA  BX, [AutoC625+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czpstr
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_628
;		immed(); 
	CALL czimmed
;	else if (qstr(val)) 
	JMP  L_629
L_628:
	LEA  BX, [AutoC625+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czqstr
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_630
;		{immedo();printlabel(litlab);} 
	CALL czimmedo
	MOV  BX, [Word czlitlab]
	PUSH BX
	CALL czprintlabel
	ADD  SP, +2
;	else return 0;	 
	JMP  L_631
L_630:
	MOV  BX, +0
	POP  BP
	RET
L_631:
L_629:
L_627:
;	outdec(val[0]); 
	LEA  BX, [AutoC625+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	CALL czoutdec
	ADD  SP, +2
;	nl(); 
	CALL cznl
;	return 1; 
	MOV  BX, +1
	POP  BP
	RET
;} 

AutoC625	EQU 0
;	czval	PTR	INT	+4
;number(val) 
cznumber:
;	int val[]; 
	PUSH BP
	SUB  SP, AutoC632
	MOV  BP, SP

;{	int k,minus;char c; 
;	k=minus=1; 
	LEA  BX, [AutoC632-2+BP]
	PUSH BX
	LEA  BX, [AutoC632-4+BP]
	PUSH BX
	MOV  BX, +1
	POP  DI
	MOV  Word [DI], BX
	POP  DI
	MOV  Word [DI], BX
;	while(k) 
L_633:
	LEA  BX, [AutoC632-2+BP]
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_634
;		{k=0; 
	LEA  BX, [AutoC632-2+BP]
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
;		if (match("+")) k=1; 
	MOV  BX, L_632+0
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_635
	LEA  BX, [AutoC632-2+BP]
	PUSH BX
	MOV  BX, +1
	POP  DI
	MOV  Word [DI], BX
;		if (match("-")) {minus=(-minus);k=1;} 
L_635:
	MOV  BX, L_632+2
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_636
	LEA  BX, [AutoC632-4+BP]
	PUSH BX
	LEA  BX, [AutoC632-4+BP]
	MOV  BX, [BX]
	NEG  BX
	POP  DI
	MOV  Word [DI], BX
	LEA  BX, [AutoC632-2+BP]
	PUSH BX
	MOV  BX, +1
	POP  DI
	MOV  Word [DI], BX
;		} 
L_636:
	JMP  L_633
L_634:
;	if(numeric(chr())==0)return 0; 
	CALL czchr
	PUSH BX
	CALL cznumeric
	ADD  SP, +2
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_637
	MOV  BX, +0
	ADD  SP, AutoC632
	POP  BP
	RET
;	while (numeric(chr())) 
L_637:
L_638:
	CALL czchr
	PUSH BX
	CALL cznumeric
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_639
;		{c=inbyte(); 
	LEA  BX, [AutoC632-5+BP]
	PUSH BX
	CALL czinbyte
	POP  DI
	MOV  Byte [DI], BL
;		k=k*10+(c-'0'); 
	LEA  BX, [AutoC632-2+BP]
	PUSH BX
	LEA  BX, [AutoC632-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +10
	POP  DX
	MOV  AX, BX
	PUSH DX
	MUL  DX
	POP  DX
	MOV  BX, AX
	PUSH BX
	LEA  BX, [AutoC632-5+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +48
	POP  DX
	SUB  DX, BX
	MOV  BX, DX
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
;		} 
	JMP  L_638
L_639:
;	if (minus < 0) k=(-k); 
	LEA  BX, [AutoC632-4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cclt
	OR   BX, BX
	JNZ  $+5
	JMP  L_640
	LEA  BX, [AutoC632-2+BP]
	PUSH BX
	LEA  BX, [AutoC632-2+BP]
	MOV  BX, [BX]
	NEG  BX
	POP  DI
	MOV  Word [DI], BX
;	val[0]=k; 
L_640:
	LEA  BX, [AutoC632+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC632-2+BP]
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;	return 1; 
	MOV  BX, +1
	ADD  SP, AutoC632
	POP  BP
	RET
;} 

AutoC632	EQU 5
;	czval	PTR	INT	+4
;	czk	VAR	INT	-2
;	czminus	VAR	INT	-4
;	czc	VAR	CHAR	-5

	  [SECTION .dseg]
L_632	DB "+",0
	DB "-",0

	  [SECTION .cseg]
; 
; 
;pstr(val) 
czpstr:
;	int val[]; 
	PUSH BP
	SUB  SP, AutoC641
	MOV  BP, SP

;{	int k;char c; 
;	k=0; 
	LEA  BX, [AutoC641-2+BP]
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
;	if (match("'")==0) return 0; 
	MOV  BX, L_641+0
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_642
	MOV  BX, +0
	ADD  SP, AutoC641
	POP  BP
	RET
;	while((c=gch())!=39) 
L_642:
L_643:
	LEA  BX, [AutoC641-3+BP]
	PUSH BX
	CALL czgch
	POP  DI
	MOV  Byte [DI], BL
	PUSH BX
	MOV  BX, +39
	POP  DX
	CALL ccne
	OR   BX, BX
	JNZ  $+5
	JMP  L_644
;		k=(k&255)*256 + (c&127); 
	LEA  BX, [AutoC641-2+BP]
	PUSH BX
	LEA  BX, [AutoC641-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +255
	POP  DX
	AND  BX, DX
	PUSH BX
	MOV  BX, +256
	POP  DX
	MOV  AX, BX
	PUSH DX
	MUL  DX
	POP  DX
	MOV  BX, AX
	PUSH BX
	LEA  BX, [AutoC641-3+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +127
	POP  DX
	AND  BX, DX
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
	JMP  L_643
L_644:
;	val[0]=k; 
	LEA  BX, [AutoC641+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC641-2+BP]
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;	return 1; 
	MOV  BX, +1
	ADD  SP, AutoC641
	POP  BP
	RET
;} 

AutoC641	EQU 3
;	czval	PTR	INT	+4
;	czk	VAR	INT	-2
;	czc	VAR	CHAR	-3

	  [SECTION .dseg]
L_641	DB "'",0

	  [SECTION .cseg]
; 
; 
;qstr(val) int val[]; 
czqstr:
	PUSH BP
	SUB  SP, AutoC645
	MOV  BP, SP

;{  /** quoted string entered into Literal Str Table **/ 
;	char c; 
; 
;	if (match(quote) == 0) return 0; 
	MOV  BX, czquote
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_646
	MOV  BX, +0
	ADD  SP, AutoC645
	POP  BP
	RET
;	val[0] = litptr; 
L_646:
	LEA  BX, [AutoC645+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, [Word czlitptr]
	POP  DI
	MOV  Word [DI], BX
;	while (chr() != '"') 
L_647:
	CALL czchr
	PUSH BX
	MOV  BX, +34
	POP  DX
	CALL ccne
	OR   BX, BX
	JNZ  $+5
	JMP  L_648
;		{ 
;		if (chr() == 0) break; 
	CALL czchr
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_649
	JMP  L_648
;		if (litptr >= litmax) 
L_649:
	MOV  BX, [Word czlitptr]
	PUSH BX
	MOV  BX, +1000
	PUSH BX
	MOV  BX, +1
	POP  DX
	SUB  DX, BX
	MOV  BX, DX
	POP  DX
	CALL ccge
	OR   BX, BX
	JNZ  $+5
	JMP  L_650
;			{  /** cleanup literal error **/ 
;			error("string space exhausted"); 
	MOV  BX, L_645+0
	PUSH BX
	CALL czerror
	ADD  SP, +2
;			while (match(quote) == 0) 
L_651:
	MOV  BX, czquote
	PUSH BX
	CALL czmatch
	ADD  SP, +2
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_652
;				if (gch() == 0) break; 
	CALL czgch
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_653
	JMP  L_652
;			return 1; 
L_653:
	JMP  L_651
L_652:
	MOV  BX, +1
	ADD  SP, AutoC645
	POP  BP
	RET
;			} 
;		litq[litptr++] = gch(); /** cpy to tbl **/ 
L_650:
	MOV  BX, czlitq
	PUSH BX
	MOV  BX, [Word czlitptr]
	INC  BX
	MOV  Word [czlitptr], BX
	DEC  BX
	POP  DX
	ADD  BX, DX
	PUSH BX
	CALL czgch
	POP  DI
	MOV  Byte [DI], BL
;		} 
	JMP  L_647
L_648:
;	gch(); 
	CALL czgch
;	litq[litptr++] = 0; /** null terminate str **/ 
	MOV  BX, czlitq
	PUSH BX
	MOV  BX, [Word czlitptr]
	INC  BX
	MOV  Word [czlitptr], BX
	DEC  BX
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Byte [DI], BL
;	return 1; 
	MOV  BX, +1
	ADD  SP, AutoC645
	POP  BP
	RET
;}  /** quoted str entered into Literals Table **/ 

AutoC645	EQU 1
;	czval	PTR	INT	+4
;	czc	VAR	CHAR	-1

	  [SECTION .dseg]
L_645	DB "string space exhausted",0

	  [SECTION .cseg]
; 
; 
;	/* 
;	** true if val1 -> int pointer or int array and 
;	** val2 not ptr or array 
;	*/ 
;dbltest(val1,val2) 
czdbltest:
;int val1[], val2[]; 
	PUSH BP
	SUB  SP, AutoC654
	MOV  BP, SP

;{ 
;	if(val1[2]!=cint) return 0; 
	LEA  BX, [AutoC654+6+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	POP  DX
	CALL ccne
	OR   BX, BX
	JNZ  $+5
	JMP  L_655
	MOV  BX, +0
	POP  BP
	RET
;	if(val2[2]) return 0; 
L_655:
	LEA  BX, [AutoC654+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_656
	MOV  BX, +0
	POP  BP
	RET
;	return 1; 
L_656:
	MOV  BX, +1
	POP  BP
	RET
;} 

AutoC654	EQU 0
;	czval1	PTR	INT	+6
;	czval2	PTR	INT	+4
; 
; 
;	/* 
;	** determine type of binary operation 
;	*/ 
;result(lval,lval2) 
czresult:
;int lval[], lval2[]; 
	PUSH BP
	SUB  SP, AutoC657
	MOV  BP, SP

;{ 
;	if(lval[2] & lval2[2])	/*both are type ptr or array.*/ 
	LEA  BX, [AutoC657+6+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC657+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	POP  DX
	AND  BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_658
;		{lval[2]=0; 
	LEA  BX, [AutoC657+6+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
;		} 
;	else if(lval2[2])	/*lval2 is type ptr or array. */ 
	JMP  L_659
L_658:
	LEA  BX, [AutoC657+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_660
;		{lval[0]=lval2[0]; 
	LEA  BX, [AutoC657+6+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC657+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;		lval[1]=lval2[1]; 
	LEA  BX, [AutoC657+6+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC657+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;		lval[2]=lval2[2]; 
	LEA  BX, [AutoC657+6+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC657+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;		} 
;} 
L_660:
L_659:
	POP  BP
	RET

AutoC657	EQU 0
;	czlval	PTR	INT	+6
;	czlval2	PTR	INT	+4
; 
;/** EO C86N-7.C **/ 
; 
;/*	>>>>>> start of cc8 <<<<<<<	*/ 
; 
;/* Begin a comment line for the assembler */ 
; 
;comment() 
czcomment:
	PUSH BP
	SUB  SP, AutoC661
	MOV  BP, SP

;{ 
;	outbyte(';'); 
	MOV  BX, +59
	PUSH BX
	CALL czoutbyte
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC661	EQU 0
; 
;/* Put out assembler info before any code is generated */ 
; 
;header() 
czheader:
	PUSH BP
	SUB  SP, AutoC662
	MOV  BP, SP

;{ 
;	comment();nl(); 
	CALL czcomment
	CALL cznl
;	if(mainflg){		/* do stuff needed for first */ 
	MOV  BX, [Word czmainflg]
	OR   BX, BX
	JNZ  $+5
	JMP  L_663
;		ol("%INCLUDE 'PROLOG.NSM' "); /** NASM form **/  
	MOV  BX, L_662+0
	PUSH BX
	CALL czol
	ADD  SP, +2
;		outstr(";; --== NASM vers. 10-Jan-10 ==--"); nl(); 
	MOV  BX, L_662+23
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
	CALL cznl
;		ol("  [SECTION .cseg]"); 
	MOV  BX, L_662+57
	PUSH BX
	CALL czol
	ADD  SP, +2
;		} 
;} 
L_663:
	POP  BP
	RET

AutoC662	EQU 0

	  [SECTION .dseg]
L_662	DB "%INCLUDE 'PROLOG.NSM' ",0
	DB ";; --== NASM vers. 10-Jan-10 ==--",0
	DB "  [SECTION .cseg]",0

	  [SECTION .cseg]
; 
;/* Print any assembler stuff needed after all code */ 
; 
;trailer() 
cztrailer:
	PUSH BP
	SUB  SP, AutoC664
	MOV  BP, SP

;{		/* 6 May 80 rj errorsummary() now goes to console */ 
;	nl(); 
	CALL cznl
;	ol("%INCLUDE 'EPILOG.NSM' "); /** NASM form **/               
	MOV  BX, L_664+0
	PUSH BX
	CALL czol
	ADD  SP, +2
;	comment(); 
	CALL czcomment
;	outstr(" --- End of Compilation ---"); 
	MOV  BX, L_664+23
	PUSH BX
	CALL czoutstr
	ADD  SP, +2
;	nl(); 
	CALL cznl
;} 
	POP  BP
	RET

AutoC664	EQU 0

	  [SECTION .dseg]
L_664	DB "%INCLUDE 'EPILOG.NSM' ",0
	DB " --- End of Compilation ---",0

	  [SECTION .cseg]
; 
;/* Continue code segment stuff. */ 
; 
;ccseg() 
czccseg:
	PUSH BP
	SUB  SP, AutoC665
	MOV  BP, SP

;{ 
;	nl(); 
	CALL cznl
;	ol("  [SECTION .cseg]"); /* Start Code Segment from last point. */            
	MOV  BX, L_665+0
	PUSH BX
	CALL czol
	ADD  SP, +2
;  
;} 
	POP  BP
	RET

AutoC665	EQU 0

	  [SECTION .dseg]
L_665	DB "  [SECTION .cseg]",0

	  [SECTION .cseg]
; 
;/* Continue data segment stuff. */ 
; 
;cdseg() 
czcdseg:
	PUSH BP
	SUB  SP, AutoC666
	MOV  BP, SP

;{ 
;	nl(); 
	CALL cznl
;	ol("  [SECTION .dseg]"); /* Start Data Segment from last point. */            
	MOV  BX, L_666+0
	PUSH BX
	CALL czol
	ADD  SP, +2
;  
;} 
	POP  BP
	RET

AutoC666	EQU 0

	  [SECTION .dseg]
L_666	DB "  [SECTION .dseg]",0

	  [SECTION .cseg]
; 
;/* Function initialization. */ 
;funcbgn() 
czfuncbgn:
	PUSH BP
	SUB  SP, AutoC667
	MOV  BP, SP

;{ 
;	ol("PUSH BP");	/*Save old frame ptr.*/ 
	MOV  BX, L_667+0
	PUSH BX
	CALL czol
	ADD  SP, +2
;	ot("SUB  SP, ");	/*Adjust stack beyond new frame.*/ 
	MOV  BX, L_667+8
	PUSH BX
	CALL czot
	ADD  SP, +2
;	ostklbl(); 
	CALL czostklbl
;	nl(); 
	CALL cznl
;	ol("MOV  BP, SP");	/*Get new frame ptr.*/ 
	MOV  BX, L_667+18
	PUSH BX
	CALL czol
	ADD  SP, +2
;	nl(); 
	CALL cznl
;} 
	POP  BP
	RET

AutoC667	EQU 0

	  [SECTION .dseg]
L_667	DB "PUSH BP",0
	DB "SUB  SP, ",0
	DB "MOV  BP, SP",0

	  [SECTION .cseg]
; 
;/* Function termination. */ 
;funcend() 
czfuncend:
	PUSH BP
	SUB  SP, AutoC668
	MOV  BP, SP

;{ 
;	nl(); 
	CALL cznl
;	ostklbl();		/*Generate frame size.*/ 
	CALL czostklbl
;	ot("EQU "); 
	MOV  BX, L_668+0
	PUSH BX
	CALL czot
	ADD  SP, +2
;	outudec(Msp); 
	MOV  BX, [Word czMsp]
	PUSH BX
	CALL czoutudec
	ADD  SP, +2
;	nl(); 
	CALL cznl
;} 
	POP  BP
	RET

AutoC668	EQU 0

	  [SECTION .dseg]
L_668	DB "EQU ",0

	  [SECTION .cseg]
; 
;/* Print out a name such that it won't annoy the assembler */ 
;/*	(by matching anything reserved, like opcodes.) */ 
;/*	gtf 4/7/80 */ 
;outname(sname) 
czoutname:
;char *sname; 
	PUSH BP
	SUB  SP, AutoC669
	MOV  BP, SP

;{	int len, i,j; 
; 
;	outasm("cz"); 
	MOV  BX, L_669+0
	PUSH BX
	CALL czoutasm
	ADD  SP, +2
;	len = strlen(sname); 
	LEA  BX, [AutoC669-2+BP]
	PUSH BX
	LEA  BX, [AutoC669+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czstrlen
	ADD  SP, +2
	POP  DI
	MOV  Word [DI], BX
;	if(len>(asmpref+asmsuff)){ 
	LEA  BX, [AutoC669-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +7
	PUSH BX
	MOV  BX, +7
	POP  DX
	ADD  BX, DX
	POP  DX
	CALL ccgt
	OR   BX, BX
	JNZ  $+5
	JMP  L_670
;		i = asmpref; 
	LEA  BX, [AutoC669-4+BP]
	PUSH BX
	MOV  BX, +7
	POP  DI
	MOV  Word [DI], BX
;		len = len-asmpref-asmsuff; 
	LEA  BX, [AutoC669-2+BP]
	PUSH BX
	LEA  BX, [AutoC669-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +7
	POP  DX
	SUB  DX, BX
	MOV  BX, DX
	PUSH BX
	MOV  BX, +7
	POP  DX
	SUB  DX, BX
	MOV  BX, DX
	POP  DI
	MOV  Word [DI], BX
;		while(i-- > 0) 
L_671:
	LEA  BX, [AutoC669-4+BP]
	PUSH BX
	MOV  BX, [BX]
	DEC  BX
	POP  DI
	MOV  Word [DI], BX
	INC  BX
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL ccgt
	OR   BX, BX
	JNZ  $+5
	JMP  L_672
;			outbyte(raise(*sname++)); 
	LEA  BX, [AutoC669+4+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	CALL czraise
	ADD  SP, +2
	PUSH BX
	CALL czoutbyte
	ADD  SP, +2
	JMP  L_671
L_672:
;		while(len-- > 0) 
L_673:
	LEA  BX, [AutoC669-2+BP]
	PUSH BX
	MOV  BX, [BX]
	DEC  BX
	POP  DI
	MOV  Word [DI], BX
	INC  BX
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL ccgt
	OR   BX, BX
	JNZ  $+5
	JMP  L_674
;			sname++; 
	LEA  BX, [AutoC669+4+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	JMP  L_673
L_674:
;		while(*sname) 
L_675:
	LEA  BX, [AutoC669+4+BP]
	MOV  BX, [BX]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	OR   BX, BX
	JNZ  $+5
	JMP  L_676
;			outbyte(raise(*sname++)); 
	LEA  BX, [AutoC669+4+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	CALL czraise
	ADD  SP, +2
	PUSH BX
	CALL czoutbyte
	ADD  SP, +2
	JMP  L_675
L_676:
;		} 
;	else	outasm(sname); 
	JMP  L_677
L_670:
	LEA  BX, [AutoC669+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czoutasm
	ADD  SP, +2
L_677:
;} /* end outname */ 
	ADD  SP, AutoC669
	POP  BP
	RET

AutoC669	EQU 6
;	czsname	PTR	CHAR	+4
;	czlen	VAR	INT	-2
;	czi	VAR	INT	-4
;	czj	VAR	INT	-6

	  [SECTION .dseg]
L_669	DB "cz",0

	  [SECTION .cseg]
; 
;/* Fetch a static memory cell into the primary register */ 
;getmem(sym) char *sym; 
czgetmem:
	PUSH BP
	SUB  SP, AutoC678
	MOV  BP, SP

;{ 
;	if ((sym[ident]!=pointer)&(sym[type]==cchar)) 
	LEA  BX, [AutoC678+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +9
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +3
	POP  DX
	CALL ccne
	PUSH BX
	LEA  BX, [AutoC678+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +10
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +1
	POP  DX
	CALL cceq
	POP  DX
	AND  BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_679
;		{ 
;		ot("MOV  AL, [Byte "); 
	MOV  BX, L_678+0
	PUSH BX
	CALL czot
	ADD  SP, +2
;		outname(sym+name); 
	LEA  BX, [AutoC678+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	ADD  BX, DX
	PUSH BX
	CALL czoutname
	ADD  SP, +2
;		ot("]"); 
	MOV  BX, L_678+16
	PUSH BX
	CALL czot
	ADD  SP, +2
;		nl(); 
	CALL cznl
;		ol("CBW"); 
	MOV  BX, L_678+18
	PUSH BX
	CALL czol
	ADD  SP, +2
;		ol("MOV  BX, AX"); 
	MOV  BX, L_678+22
	PUSH BX
	CALL czol
	ADD  SP, +2
;		nl(); 
	CALL cznl
;		} 
;	else 
	JMP  L_680
L_679:
;		{ 
;		ot("MOV  BX, [Word "); 
	MOV  BX, L_678+34
	PUSH BX
	CALL czot
	ADD  SP, +2
;		outname(sym+name); 
	LEA  BX, [AutoC678+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	ADD  BX, DX
	PUSH BX
	CALL czoutname
	ADD  SP, +2
;	/**	ot("]"); **/ 
;		outasm("]"); 
	MOV  BX, L_678+50
	PUSH BX
	CALL czoutasm
	ADD  SP, +2
;		nl(); 
	CALL cznl
;		} 
L_680:
;} 
	POP  BP
	RET

AutoC678	EQU 0
;	czsym	PTR	CHAR	+4

	  [SECTION .dseg]
L_678	DB "MOV  AL, [Byte ",0
	DB "]",0
	DB "CBW",0
	DB "MOV  BX, AX",0
	DB "MOV  BX, [Word ",0
	DB "]",0

	  [SECTION .cseg]
; 
;/* Fetch the address of the specified symbol */ 
;/*	into the primary register */ 
;getloc(sym) char *sym; 
czgetloc:
	PUSH BP
	SUB  SP, AutoC681
	MOV  BP, SP

;{ 
;	ot("LEA  BX, ["); 
	MOV  BX, L_681+0
	PUSH BX
	CALL czot
	ADD  SP, +2
;	ostklbl(); 
	CALL czostklbl
;	outdec((sym[offset]&255)+((sym[offset+1]&255)<<8)); 
	LEA  BX, [AutoC681+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +12
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +255
	POP  DX
	AND  BX, DX
	PUSH BX
	LEA  BX, [AutoC681+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +12
	PUSH BX
	MOV  BX, +1
	POP  DX
	ADD  BX, DX
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +255
	POP  DX
	AND  BX, DX
	PUSH BX
	MOV  BX, +8
	POP  DX
	MOV  CX, BX
	SAL  DX, CL
	MOV  BX, DX
	POP  DX
	ADD  BX, DX
	PUSH BX
	CALL czoutdec
	ADD  SP, +2
;	outasm("+BP]"); 
	MOV  BX, L_681+11
	PUSH BX
	CALL czoutasm
	ADD  SP, +2
;	nl(); 
	CALL cznl
;} 
	POP  BP
	RET

AutoC681	EQU 0
;	czsym	PTR	CHAR	+4

	  [SECTION .dseg]
L_681	DB "LEA  BX, [",0
	DB "+BP]",0

	  [SECTION .cseg]
; 
;/* Store the primary register into the specified */ 
;/* static memory cell. */ 
;putmem(sym) char *sym; 
czputmem:
	PUSH BP
	SUB  SP, AutoC682
	MOV  BP, SP

;{ 
;	if ((sym[ident]!=pointer)&(sym[type]==cchar)) 
	LEA  BX, [AutoC682+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +9
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +3
	POP  DX
	CALL ccne
	PUSH BX
	LEA  BX, [AutoC682+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +10
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +1
	POP  DX
	CALL cceq
	POP  DX
	AND  BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_683
;		{ 
;		ot("MOV  Byte ["); 
	MOV  BX, L_682+0
	PUSH BX
	CALL czot
	ADD  SP, +2
;		outname(sym+name); 
	LEA  BX, [AutoC682+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	ADD  BX, DX
	PUSH BX
	CALL czoutname
	ADD  SP, +2
;	/**	ot("], BL");  **/ 
;		outasm("], BL"); 
	MOV  BX, L_682+12
	PUSH BX
	CALL czoutasm
	ADD  SP, +2
;		nl(); 
	CALL cznl
;		} 
;	else 
	JMP  L_684
L_683:
;		{ 
;		ot("MOV  Word ["); 
	MOV  BX, L_682+18
	PUSH BX
	CALL czot
	ADD  SP, +2
;		outname(sym+name); 
	LEA  BX, [AutoC682+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	ADD  BX, DX
	PUSH BX
	CALL czoutname
	ADD  SP, +2
;	/**	ot("], BX");  **/ 
;		outasm("], BX"); 
	MOV  BX, L_682+30
	PUSH BX
	CALL czoutasm
	ADD  SP, +2
;		nl(); 
	CALL cznl
;		} 
L_684:
;} 
	POP  BP
	RET

AutoC682	EQU 0
;	czsym	PTR	CHAR	+4

	  [SECTION .dseg]
L_682	DB "MOV  Byte [",0
	DB "], BL",0
	DB "MOV  Word [",0
	DB "], BX",0

	  [SECTION .cseg]
; 
;/* Store the specified object type in the primary register */ 
;/* at the address on the top of the stack. */ 
;putstk(typeobj) char typeobj; 
czputstk:
	PUSH BP
	SUB  SP, AutoC685
	MOV  BP, SP

;{ 
;	ol("POP  DI"); 
	MOV  BX, L_685+0
	PUSH BX
	CALL czol
	ADD  SP, +2
;	Zsp=Zsp+2; 
	MOV  BX, [Word czZsp]
	PUSH BX
	MOV  BX, +2
	POP  DX
	ADD  BX, DX
	MOV  Word [czZsp], BX
;	if (typeobj==cchar) 
	LEA  BX, [AutoC685+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +1
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_686
;	   ol("MOV  Byte [DI], BL"); 
	MOV  BX, L_685+8
	PUSH BX
	CALL czol
	ADD  SP, +2
;	else 
	JMP  L_687
L_686:
;	   ol("MOV  Word [DI], BX"); 
	MOV  BX, L_685+27
	PUSH BX
	CALL czol
	ADD  SP, +2
L_687:
;} 
	POP  BP
	RET

AutoC685	EQU 0
;	cztypeobj	VAR	CHAR	+4

	  [SECTION .dseg]
L_685	DB "POP  DI",0
	DB "MOV  Byte [DI], BL",0
	DB "MOV  Word [DI], BX",0

	  [SECTION .cseg]
; 
;/* Fetch the specified object type indirect through the */ 
;/*	primary register into the primary register */ 
;indirect(typeobj) char typeobj; 
czindirect:
	PUSH BP
	SUB  SP, AutoC688
	MOV  BP, SP

;{ 
;	if (typeobj==cchar) 
	LEA  BX, [AutoC688+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +1
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_689
;		{ 
;		ol("MOV  AL, [BX]"); 
	MOV  BX, L_688+0
	PUSH BX
	CALL czol
	ADD  SP, +2
;		ol("CBW"); 
	MOV  BX, L_688+14
	PUSH BX
	CALL czol
	ADD  SP, +2
;		ol("MOV  BX, AX"); 
	MOV  BX, L_688+18
	PUSH BX
	CALL czol
	ADD  SP, +2
;		} 
;	else  ol("MOV  BX, [BX]"); 
	JMP  L_690
L_689:
	MOV  BX, L_688+30
	PUSH BX
	CALL czol
	ADD  SP, +2
L_690:
;} 
	POP  BP
	RET

AutoC688	EQU 0
;	cztypeobj	VAR	CHAR	+4

	  [SECTION .dseg]
L_688	DB "MOV  AL, [BX]",0
	DB "CBW",0
	DB "MOV  BX, AX",0
	DB "MOV  BX, [BX]",0

	  [SECTION .cseg]
; 
;/* Swap the primary and secondary registers */ 
;swap() 
czswap:
	PUSH BP
	SUB  SP, AutoC691
	MOV  BP, SP

;{ 
;	ol("XCHG BX, DX"); 
	MOV  BX, L_691+0
	PUSH BX
	CALL czol
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC691	EQU 0

	  [SECTION .dseg]
L_691	DB "XCHG BX, DX",0

	  [SECTION .cseg]
; 
;/* Print partial instruction to get an immediate value */ 
;/*	into the primary register */ 
;immed() 
czimmed:
	PUSH BP
	SUB  SP, AutoC692
	MOV  BP, SP

;{ 
;	ot("MOV  BX, "); 
	MOV  BX, L_692+0
	PUSH BX
	CALL czot
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC692	EQU 0

	  [SECTION .dseg]
L_692	DB "MOV  BX, ",0

	  [SECTION .cseg]
; 
;/* Print partial instruction to get an immediate value */ 
;/*	into the primary register */ 
;immedo() 
czimmedo:
	PUSH BP
	SUB  SP, AutoC693
	MOV  BP, SP

;{ 
;	ot("MOV  BX, "); 
	MOV  BX, L_693+0
	PUSH BX
	CALL czot
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC693	EQU 0

	  [SECTION .dseg]
L_693	DB "MOV  BX, ",0

	  [SECTION .cseg]
; 
;/* Push the primary register onto the stack */ 
;zpush() 
czzpush:
	PUSH BP
	SUB  SP, AutoC694
	MOV  BP, SP

;{ 
;	ol("PUSH BX"); 
	MOV  BX, L_694+0
	PUSH BX
	CALL czol
	ADD  SP, +2
;	Zsp=Zsp-2; 
	MOV  BX, [Word czZsp]
	PUSH BX
	MOV  BX, +2
	POP  DX
	SUB  DX, BX
	MOV  BX, DX
	MOV  Word [czZsp], BX
;} 
	POP  BP
	RET

AutoC694	EQU 0

	  [SECTION .dseg]
L_694	DB "PUSH BX",0

	  [SECTION .cseg]
; 
;/* Pop the top of the stack into the secondary register */ 
;zpop() 
czzpop:
	PUSH BP
	SUB  SP, AutoC695
	MOV  BP, SP

;{ 
;	ol("POP  DX"); 
	MOV  BX, L_695+0
	PUSH BX
	CALL czol
	ADD  SP, +2
;	Zsp=Zsp+2; 
	MOV  BX, [Word czZsp]
	PUSH BX
	MOV  BX, +2
	POP  DX
	ADD  BX, DX
	MOV  Word [czZsp], BX
;} 
	POP  BP
	RET

AutoC695	EQU 0

	  [SECTION .dseg]
L_695	DB "POP  DX",0

	  [SECTION .cseg]
; 
;/* Swap the primary register and the top of the stack */ 
;swapstk() 
czswapstk:
	PUSH BP
	SUB  SP, AutoC696
	MOV  BP, SP

;{ 
;	ol("MOV  DI, SP"); 
	MOV  BX, L_696+0
	PUSH BX
	CALL czol
	ADD  SP, +2
;	ol("XCHG BX, [DI]"); 
	MOV  BX, L_696+12
	PUSH BX
	CALL czol
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC696	EQU 0

	  [SECTION .dseg]
L_696	DB "MOV  DI, SP",0
	DB "XCHG BX, [DI]",0

	  [SECTION .cseg]
; 
;/** EO C86N-8.C **/ 
; 
;/*	>>>>>> start of cc9 <<<<<<<	*/ 
; 
;/* Call the specified subroutine name */ 
;zcall(sname) char *sname; 
czzcall:
	PUSH BP
	SUB  SP, AutoC697
	MOV  BP, SP

;{ 
;	ot("CALL "); 
	MOV  BX, L_697+0
	PUSH BX
	CALL czot
	ADD  SP, +2
;	outname(sname); 
	LEA  BX, [AutoC697+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czoutname
	ADD  SP, +2
;	nl(); 
	CALL cznl
;} 
	POP  BP
	RET

AutoC697	EQU 0
;	czsname	PTR	CHAR	+4

	  [SECTION .dseg]
L_697	DB "CALL ",0

	  [SECTION .cseg]
; 
;/* Call a run-time library routine */ 
;callrts(sname) char *sname; 
czcallrts:
	PUSH BP
	SUB  SP, AutoC698
	MOV  BP, SP

;{ 
;	ot("CALL "); 
	MOV  BX, L_698+0
	PUSH BX
	CALL czot
	ADD  SP, +2
;	outasm(sname); 
	LEA  BX, [AutoC698+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czoutasm
	ADD  SP, +2
;	nl(); 
	CALL cznl
;}  /*end callrts*/ 
	POP  BP
	RET

AutoC698	EQU 0
;	czsname	PTR	CHAR	+4

	  [SECTION .dseg]
L_698	DB "CALL ",0

	  [SECTION .cseg]
; 
;/* Return from subroutine */ 
;zret() 
czzret:
	PUSH BP
	SUB  SP, AutoC699
	MOV  BP, SP

;{ 
;	ol("RET"); 
	MOV  BX, L_699+0
	PUSH BX
	CALL czol
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC699	EQU 0

	  [SECTION .dseg]
L_699	DB "RET",0

	  [SECTION .cseg]
; 
;/* Perform subroutine call to value on top of stack */ 
;callstk() 
czcallstk:
	PUSH BP
	SUB  SP, AutoC700
	MOV  BP, SP

;{ 
;	immed(); 
	CALL czimmed
;	outasm("( $+3+2+2+2)"); 
	MOV  BX, L_700+0
	PUSH BX
	CALL czoutasm
	ADD  SP, +2
;	nl(); 
	CALL cznl
;	ol("MOV  DI, SP"); 
	MOV  BX, L_700+13
	PUSH BX
	CALL czol
	ADD  SP, +2
;	ol("XCHG BX, [DI]"); 
	MOV  BX, L_700+25
	PUSH BX
	CALL czol
	ADD  SP, +2
;	ol("JMP  BX"); 
	MOV  BX, L_700+39
	PUSH BX
	CALL czol
	ADD  SP, +2
;	Zsp=Zsp-2; 
	MOV  BX, [Word czZsp]
	PUSH BX
	MOV  BX, +2
	POP  DX
	SUB  DX, BX
	MOV  BX, DX
	MOV  Word [czZsp], BX
;	} 
	POP  BP
	RET

AutoC700	EQU 0

	  [SECTION .dseg]
L_700	DB "( $+3+2+2+2)",0
	DB "MOV  DI, SP",0
	DB "XCHG BX, [DI]",0
	DB "JMP  BX",0

	  [SECTION .cseg]
; 
;/* Jump to specified internal label number */ 
;jump(label) int label; 
czjump:
	PUSH BP
	SUB  SP, AutoC701
	MOV  BP, SP

;{ 
;	ot("JMP  "); 
	MOV  BX, L_701+0
	PUSH BX
	CALL czot
	ADD  SP, +2
;	printlabel(label); 
	LEA  BX, [AutoC701+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czprintlabel
	ADD  SP, +2
;	nl(); 
	CALL cznl
;} 
	POP  BP
	RET

AutoC701	EQU 0
;	czlabel	VAR	INT	+4

	  [SECTION .dseg]
L_701	DB "JMP  ",0

	  [SECTION .cseg]
; 
;/* Test the primary register and jump if false to label */ 
;testjump(label) int label; 
cztestjump:
	PUSH BP
	SUB  SP, AutoC702
	MOV  BP, SP

;{ 
;	ol("OR   BX, BX"); 
	MOV  BX, L_702+0
	PUSH BX
	CALL czol
	ADD  SP, +2
;	ol("JNZ  $+5"); 
	MOV  BX, L_702+12
	PUSH BX
	CALL czol
	ADD  SP, +2
;	ot("JMP  "); 
	MOV  BX, L_702+21
	PUSH BX
	CALL czot
	ADD  SP, +2
;	printlabel(label); 
	LEA  BX, [AutoC702+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czprintlabel
	ADD  SP, +2
;	nl(); 
	CALL cznl
;	} 
	POP  BP
	RET

AutoC702	EQU 0
;	czlabel	VAR	INT	+4

	  [SECTION .dseg]
L_702	DB "OR   BX, BX",0
	DB "JNZ  $+5",0
	DB "JMP  ",0

	  [SECTION .cseg]
; 
;/** Added, Modified for NASM, caller dumpglbs() **/ 
;def_sizein() 
czdef_sizein:
	PUSH BP
	SUB  SP, AutoC703
	MOV  BP, SP

;{ 
;	ot("TIMES "); /**ot("DS ");**/ 
	MOV  BX, L_703+0
	PUSH BX
	CALL czot
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC703	EQU 0

	  [SECTION .dseg]
L_703	DB "TIMES ",0

	  [SECTION .cseg]
; 
;/*Print pseudo-op to define storage (Character). */ 
;/** caller dumpglbs() **/ 
;defstorchr() 
czdefstorchr:
	PUSH BP
	SUB  SP, AutoC704
	MOV  BP, SP

;{ 
;	ot("DB 0"); /** RB **/ 
	MOV  BX, L_704+0
	PUSH BX
	CALL czot
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC704	EQU 0

	  [SECTION .dseg]
L_704	DB "DB 0",0

	  [SECTION .cseg]
; 
;/*Print pseudo-op to define storage (Integer). */ 
;/** caller dumpglbs() **/ 
;defstorint() 
czdefstorint:
	PUSH BP
	SUB  SP, AutoC705
	MOV  BP, SP

;{ 
;	ot("DW 0"); /** RW **/ 
	MOV  BX, L_705+0
	PUSH BX
	CALL czot
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC705	EQU 0

	  [SECTION .dseg]
L_705	DB "DW 0",0

	  [SECTION .cseg]
; 
;/*Print pseudo-op to define storage (Pointer). */ 
;/** caller dumpglbs() **/ 
;defstorptr() 
czdefstorptr:
	PUSH BP
	SUB  SP, AutoC706
	MOV  BP, SP

;{ 
;	ot("DW 0"); /** RW **/ 
	MOV  BX, L_706+0
	PUSH BX
	CALL czot
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC706	EQU 0

	  [SECTION .dseg]
L_706	DB "DW 0",0

	  [SECTION .cseg]
; 
;/* Print pseudo-op to define a byte */ 
;defbyte() 
czdefbyte:
	PUSH BP
	SUB  SP, AutoC707
	MOV  BP, SP

;{ 
;	ot("DB "); 
	MOV  BX, L_707+0
	PUSH BX
	CALL czot
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC707	EQU 0

	  [SECTION .dseg]
L_707	DB "DB ",0

	  [SECTION .cseg]
; 
;/* Print pseudo-op to define a word */ 
;defword() 
czdefword:
	PUSH BP
	SUB  SP, AutoC708
	MOV  BP, SP

;{ 
;	ot("DW "); 
	MOV  BX, L_708+0
	PUSH BX
	CALL czot
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC708	EQU 0

	  [SECTION .dseg]
L_708	DB "DW ",0

	  [SECTION .cseg]
; 
;/* Modify the stack pointer to the new value indicated */ 
;modstk(newsp) int newsp; 
czmodstk:
	PUSH BP
	SUB  SP, AutoC709
	MOV  BP, SP

;{ 
;	int k; 
;	k=newsp-Zsp; 
	LEA  BX, [AutoC709-2+BP]
	PUSH BX
	LEA  BX, [AutoC709+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, [Word czZsp]
	POP  DX
	SUB  DX, BX
	MOV  BX, DX
	POP  DI
	MOV  Word [DI], BX
;	if(k==0)return newsp; 
	LEA  BX, [AutoC709-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_710
	LEA  BX, [AutoC709+4+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC709
	POP  BP
	RET
;	ot("ADD  SP, "); 
L_710:
	MOV  BX, L_709+0
	PUSH BX
	CALL czot
	ADD  SP, +2
;	outdec(k); 
	LEA  BX, [AutoC709-2+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czoutdec
	ADD  SP, +2
;	nl(); 
	CALL cznl
;	return newsp; 
	LEA  BX, [AutoC709+4+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC709
	POP  BP
	RET
;} 

AutoC709	EQU 2
;	cznewsp	VAR	INT	+4
;	czk	VAR	INT	-2

	  [SECTION .dseg]
L_709	DB "ADD  SP, ",0

	  [SECTION .cseg]
; 
;/* Modify the stack pointer to the new value indicated */ 
;rtnstk(newsp) 
czrtnstk:
;	int newsp; 
	PUSH BP
	SUB  SP, AutoC711
	MOV  BP, SP

; { 
;	if(Msp!=0) 
	MOV  BX, [Word czMsp]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL ccne
	OR   BX, BX
	JNZ  $+5
	JMP  L_712
;		{ 
;		ot("ADD  SP, ");	/*Remove frame from stack.*/ 
	MOV  BX, L_711+0
	PUSH BX
	CALL czot
	ADD  SP, +2
;		ostklbl(); 
	CALL czostklbl
;		nl(); 
	CALL cznl
;		} 
;	ol("POP  BP"); 
L_712:
	MOV  BX, L_711+10
	PUSH BX
	CALL czol
	ADD  SP, +2
;	return newsp; 
	LEA  BX, [AutoC711+4+BP]
	MOV  BX, [BX]
	POP  BP
	RET
;} 

AutoC711	EQU 0
;	cznewsp	VAR	INT	+4

	  [SECTION .dseg]
L_711	DB "ADD  SP, ",0
	DB "POP  BP",0

	  [SECTION .cseg]
; 
;/* Double the primary register */ 
;doublereg() 
czdoublereg:
	PUSH BP
	SUB  SP, AutoC713
	MOV  BP, SP

;{ 
;	ol("SAL  BX, 1"); 
	MOV  BX, L_713+0
	PUSH BX
	CALL czol
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC713	EQU 0

	  [SECTION .dseg]
L_713	DB "SAL  BX, 1",0

	  [SECTION .cseg]
; 
;/* Add the primary and secondary registers */ 
;/*	(results in primary) */ 
;zadd() 
czzadd:
	PUSH BP
	SUB  SP, AutoC714
	MOV  BP, SP

;{ 
;	ol("ADD  BX, DX"); 
	MOV  BX, L_714+0
	PUSH BX
	CALL czol
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC714	EQU 0

	  [SECTION .dseg]
L_714	DB "ADD  BX, DX",0

	  [SECTION .cseg]
; 
;/* Subtract the primary register from the secondary */ 
;/*	(results in primary) */ 
;zsub() 
czzsub:
	PUSH BP
	SUB  SP, AutoC715
	MOV  BP, SP

;{ 
;	ol("SUB  DX, BX"); 
	MOV  BX, L_715+0
	PUSH BX
	CALL czol
	ADD  SP, +2
;	ol("MOV  BX, DX"); 
	MOV  BX, L_715+12
	PUSH BX
	CALL czol
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC715	EQU 0

	  [SECTION .dseg]
L_715	DB "SUB  DX, BX",0
	DB "MOV  BX, DX",0

	  [SECTION .cseg]
; 
;/* Multiply the primary and secondary registers */ 
;/*	(results in primary) */ 
;mult() 
czmult:
	PUSH BP
	SUB  SP, AutoC716
	MOV  BP, SP

;{ 
;	ol("MOV  AX, BX"); 
	MOV  BX, L_716+0
	PUSH BX
	CALL czol
	ADD  SP, +2
;	ol("PUSH DX"); 
	MOV  BX, L_716+12
	PUSH BX
	CALL czol
	ADD  SP, +2
;	ol("MUL  DX"); 
	MOV  BX, L_716+20
	PUSH BX
	CALL czol
	ADD  SP, +2
;	ol("POP  DX"); 
	MOV  BX, L_716+28
	PUSH BX
	CALL czol
	ADD  SP, +2
;	ol("MOV  BX, AX"); 
	MOV  BX, L_716+36
	PUSH BX
	CALL czol
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC716	EQU 0

	  [SECTION .dseg]
L_716	DB "MOV  AX, BX",0
	DB "PUSH DX",0
	DB "MUL  DX",0
	DB "POP  DX",0
	DB "MOV  BX, AX",0

	  [SECTION .cseg]
; 
;/* Divide the secondary register by the primary */ 
;/*	(quotient in primary, remainder in secondary) */ 
;ccdiv() 
czccdiv:
	PUSH BP
	SUB  SP, AutoC717
	MOV  BP, SP

;{ 
;	ol("MOV  AX, DX"); 
	MOV  BX, L_717+0
	PUSH BX
	CALL czol
	ADD  SP, +2
;	ol("CWD"); 
	MOV  BX, L_717+12
	PUSH BX
	CALL czol
	ADD  SP, +2
;	ol("DIV  BX"); 
	MOV  BX, L_717+16
	PUSH BX
	CALL czol
	ADD  SP, +2
;	ol("MOV  BX, AX"); 
	MOV  BX, L_717+24
	PUSH BX
	CALL czol
	ADD  SP, +2
;	} 
	POP  BP
	RET

AutoC717	EQU 0

	  [SECTION .dseg]
L_717	DB "MOV  AX, DX",0
	DB "CWD",0
	DB "DIV  BX",0
	DB "MOV  BX, AX",0

	  [SECTION .cseg]
; 
;/* Compute remainder (mod) of secondary register divided */ 
;/*	by the primary */ 
;/*	(remainder in primary, quotient in secondary) */ 
;zmod() 
czzmod:
	PUSH BP
	SUB  SP, AutoC718
	MOV  BP, SP

;{ 
;	ccdiv(); 
	CALL czccdiv
;	swap(); 
	CALL czswap
;} 
	POP  BP
	RET

AutoC718	EQU 0
; 
;/* Inclusive 'or' the primary and the secondary registers */ 
;/*	(results in primary) */ 
;zor() 
czzor:
	PUSH BP
	SUB  SP, AutoC719
	MOV  BP, SP

;{ 
;	ol("OR   BX, DX"); 
	MOV  BX, L_719+0
	PUSH BX
	CALL czol
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC719	EQU 0

	  [SECTION .dseg]
L_719	DB "OR   BX, DX",0

	  [SECTION .cseg]
; 
;/* Exclusive 'or' the primary and seconday registers */ 
;/*	(results in primary) */ 
;zxor() 
czzxor:
	PUSH BP
	SUB  SP, AutoC720
	MOV  BP, SP

;{ 
;	ol("XOR  BX, DX"); 
	MOV  BX, L_720+0
	PUSH BX
	CALL czol
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC720	EQU 0

	  [SECTION .dseg]
L_720	DB "XOR  BX, DX",0

	  [SECTION .cseg]
; 
;/* 'And' the primary and secondary registers */ 
;/*	(results in primary) */ 
;zand() 
czzand:
	PUSH BP
	SUB  SP, AutoC721
	MOV  BP, SP

;{ 
;	ol("AND  BX, DX"); 
	MOV  BX, L_721+0
	PUSH BX
	CALL czol
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC721	EQU 0

	  [SECTION .dseg]
L_721	DB "AND  BX, DX",0

	  [SECTION .cseg]
; 
;/* Arithmetic shift right the secondary register number of */ 
;/* 	times in primary (results in primary) */ 
;asr() 
czasr:
	PUSH BP
	SUB  SP, AutoC722
	MOV  BP, SP

;{ 
;	ol("MOV  CX, BX"); 
	MOV  BX, L_722+0
	PUSH BX
	CALL czol
	ADD  SP, +2
;	ol("SAR  DX, CL"); 
	MOV  BX, L_722+12
	PUSH BX
	CALL czol
	ADD  SP, +2
;	ol("MOV  BX, DX"); 
	MOV  BX, L_722+24
	PUSH BX
	CALL czol
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC722	EQU 0

	  [SECTION .dseg]
L_722	DB "MOV  CX, BX",0
	DB "SAR  DX, CL",0
	DB "MOV  BX, DX",0

	  [SECTION .cseg]
; 
;/* Arithmetic left shift the secondary register number of */ 
;/*	times in primary (results in primary) */ 
;asl() 
czasl:
	PUSH BP
	SUB  SP, AutoC723
	MOV  BP, SP

;{ 
;	ol("MOV  CX, BX"); 
	MOV  BX, L_723+0
	PUSH BX
	CALL czol
	ADD  SP, +2
;	ol("SAL  DX, CL"); 
	MOV  BX, L_723+12
	PUSH BX
	CALL czol
	ADD  SP, +2
;	ol("MOV  BX, DX"); 
	MOV  BX, L_723+24
	PUSH BX
	CALL czol
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC723	EQU 0

	  [SECTION .dseg]
L_723	DB "MOV  CX, BX",0
	DB "SAL  DX, CL",0
	DB "MOV  BX, DX",0

	  [SECTION .cseg]
; 
;/* Form two's complement of primary register */ 
;ccneg() 
czccneg:
	PUSH BP
	SUB  SP, AutoC724
	MOV  BP, SP

;{ 
;	ol("NEG  BX"); 
	MOV  BX, L_724+0
	PUSH BX
	CALL czol
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC724	EQU 0

	  [SECTION .dseg]
L_724	DB "NEG  BX",0

	  [SECTION .cseg]
; 
;/* Form one's complement of primary register */ 
;com() 
czcom:
	PUSH BP
	SUB  SP, AutoC725
	MOV  BP, SP

;{ 
;	ol("NOT  BX"); 
	MOV  BX, L_725+0
	PUSH BX
	CALL czol
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC725	EQU 0

	  [SECTION .dseg]
L_725	DB "NOT  BX",0

	  [SECTION .cseg]
; 
;/* Increment the primary register by one */ 
;ccinc() 
czccinc:
	PUSH BP
	SUB  SP, AutoC726
	MOV  BP, SP

;{ 
;	ol("INC  BX"); 
	MOV  BX, L_726+0
	PUSH BX
	CALL czol
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC726	EQU 0

	  [SECTION .dseg]
L_726	DB "INC  BX",0

	  [SECTION .cseg]
; 
;/* Decrement the primary register by one */ 
;ccdec() 
czccdec:
	PUSH BP
	SUB  SP, AutoC727
	MOV  BP, SP

;{ 
;	ol("DEC  BX"); 
	MOV  BX, L_727+0
	PUSH BX
	CALL czol
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC727	EQU 0

	  [SECTION .dseg]
L_727	DB "DEC  BX",0

	  [SECTION .cseg]
; 
;/* Following are the conditional operators */ 
;/* They compare the secondary register against the primary */ 
;/* and put a literal 1 in the primary if the condition is */ 
;/* true, otherwise they clear the primary register */ 
; 
;/* Test for equal */ 
;zeq() 
czzeq:
	PUSH BP
	SUB  SP, AutoC728
	MOV  BP, SP

;{ 
;	callrts("cceq"); 
	MOV  BX, L_728+0
	PUSH BX
	CALL czcallrts
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC728	EQU 0

	  [SECTION .dseg]
L_728	DB "cceq",0

	  [SECTION .cseg]
; 
;/* Test for not equal */ 
;zne() 
czzne:
	PUSH BP
	SUB  SP, AutoC729
	MOV  BP, SP

;{ 
;	callrts("ccne"); 
	MOV  BX, L_729+0
	PUSH BX
	CALL czcallrts
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC729	EQU 0

	  [SECTION .dseg]
L_729	DB "ccne",0

	  [SECTION .cseg]
; 
;/* Test for less than (signed) */ 
;zlt() 
czzlt:
	PUSH BP
	SUB  SP, AutoC730
	MOV  BP, SP

;{ 
;	callrts("cclt"); 
	MOV  BX, L_730+0
	PUSH BX
	CALL czcallrts
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC730	EQU 0

	  [SECTION .dseg]
L_730	DB "cclt",0

	  [SECTION .cseg]
; 
;/* Test for less than or equal to (signed) */ 
;zle() 
czzle:
	PUSH BP
	SUB  SP, AutoC731
	MOV  BP, SP

;{ 
;	callrts("ccle"); 
	MOV  BX, L_731+0
	PUSH BX
	CALL czcallrts
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC731	EQU 0

	  [SECTION .dseg]
L_731	DB "ccle",0

	  [SECTION .cseg]
; 
;/* Test for greater than (signed) */ 
;zgt() 
czzgt:
	PUSH BP
	SUB  SP, AutoC732
	MOV  BP, SP

;{ 
;	callrts("ccgt"); 
	MOV  BX, L_732+0
	PUSH BX
	CALL czcallrts
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC732	EQU 0

	  [SECTION .dseg]
L_732	DB "ccgt",0

	  [SECTION .cseg]
; 
;/* Test for greater than or equal to (signed) */ 
;zge() 
czzge:
	PUSH BP
	SUB  SP, AutoC733
	MOV  BP, SP

;{ 
;	callrts("ccge"); 
	MOV  BX, L_733+0
	PUSH BX
	CALL czcallrts
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC733	EQU 0

	  [SECTION .dseg]
L_733	DB "ccge",0

	  [SECTION .cseg]
; 
;/* Test for less than (unsigned) */ 
;ult() 
czult:
	PUSH BP
	SUB  SP, AutoC734
	MOV  BP, SP

;{ 
;	callrts("ccult"); 
	MOV  BX, L_734+0
	PUSH BX
	CALL czcallrts
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC734	EQU 0

	  [SECTION .dseg]
L_734	DB "ccult",0

	  [SECTION .cseg]
; 
;/* Test for less than or equal to (unsigned) */ 
;ule() 
czule:
	PUSH BP
	SUB  SP, AutoC735
	MOV  BP, SP

;{ 
;	callrts("ccule"); 
	MOV  BX, L_735+0
	PUSH BX
	CALL czcallrts
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC735	EQU 0

	  [SECTION .dseg]
L_735	DB "ccule",0

	  [SECTION .cseg]
; 
;/* Test for greater than (unsigned) */ 
;ugt() 
czugt:
	PUSH BP
	SUB  SP, AutoC736
	MOV  BP, SP

;{ 
;	callrts("ccugt"); 
	MOV  BX, L_736+0
	PUSH BX
	CALL czcallrts
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC736	EQU 0

	  [SECTION .dseg]
L_736	DB "ccugt",0

	  [SECTION .cseg]
; 
;/* Test for greater than or equal to (unsigned) */ 
;uge() 
czuge:
	PUSH BP
	SUB  SP, AutoC737
	MOV  BP, SP

;{ 
;	callrts("ccuge"); 
	MOV  BX, L_737+0
	PUSH BX
	CALL czcallrts
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC737	EQU 0

	  [SECTION .dseg]
L_737	DB "ccuge",0

	  [SECTION .cseg]
; 
;/** EO C86N-9.C **/ 
; 
;/** Need #include IOLIB.C **/ 
; 
;#include C5LIBT.C 
;/*********************************************************/ 
;/** c5libt.c Chgd Ret Val in BX instead of in AX        **/ 
;/** 23-Jan-10 09:38:02 PM                               **/ 
;/** 24-Jan-10 09:10:41 AM -chg setting of f_unit addr to**/ 
;/**  inline asm to sidestep name mangling edits         **/ 
;/** Vers: 0.2.3 r2                                      **/ 
;/*********************************************************/ 
;/** Module: C5LIB.C  By: s_dubrovich@yahoo.com		**/ 
;/** Last: 1:46 PM 8/15/2008				**/ 
;/** Vers: 0.2.3						**/ 
;/**  modified puts();					**/ 
;/*********************************************************/ 
;/** Module: C5LIB.C  By: s_dubrovich@yahoo.com		**/ 
;/** Last:  10:29 PM 8/14/2008				**/ 
;/** Vers: 0.2.2						**/ 
;/**  Chg to C5LIB.C for further development.  Added in	**/ 
;/**  mainmain() for initialization of user source.	**/ 
;/**  file Was IOC5.C					**/ 
;/**  Added PAUSE_YES Conditional exit			**/ 
;/**  Added puts();					**/ 
;/*********************************************************/ 
;/** IOC5.C -- stripped main for small-c include		**/ 
;/** Call 5 IO Interface Library				**/ 
;/*********************************************************/ 
;/** Last: 30-Jul-08 05:08:51 PM.			**/ 
;/** Prev: 08:15:42 AM 17-Jul-08				**/ 
;/** Vers: 0.1.7	modified re_ubuff()			**/ 
;/** chg index update for ol(ptr)			**/ 
;/*********************************************************/ 
;/** Last: 07:32:44 AM 15-Jul-08				**/ 
;/** Vers: 0.1.5 -filter 0Dh -> 20h for eol problem    ****/ 
;/**  chgd getc() to filter & 127, or, ret EOF         ****/ 
;/*********************************************************/ 
;/** Last: 05:23:25 AM 07/13/2008 01:31:05 PM 07/12/2008	**/ 
;/** Init: 11:18 PM 7/5/2008				**/ 
;/*********************************************************/ 
;/** CALL5_IO.C test file & IO Functions for small-c	**/ 
;/** Last: 11:44 AM 7/5/2008 :: 11:28 AM 7/4/2008	**/ 
;/** Init: 7:24 AM 5/31/2008				**/ 
;/** Vers: 0.1.0  By: s_dubrovich@yahoo.com		**/ 
;/** Goal: minimal IO to Call_5 interface to run small-c **/ 
;/** Note: Only Character, not binary Files.		**/ 
;/** -Cloned From SINKIO01.C as IO LIB base Fn's		**/ 
;/** -includes some testing code as main()		**/ 
;/*********************************************************/ 
;/** NOTE: for cmd.exe edit NASM src for vstart=0100h,   **/ 
;/** and comment out ';;' the two SECTION .dseg align=16 **/ 
;/** directives so that the pcdos 'small' model is used. **/ 
;/*********************************************************/ 
;/** Req'd IO Functions for Small-c			**/ 
;/**getc(){;} gets(){;} putc(){;}  			**/ 
;/**putchar(){;} fopen(){;} fclose(){;}			**/ 
; 
;/* 
;** STDIO.H -- Standard Small-C Definitions --  
;*/ 
;#define stdin    0 
;#define stdout   1 
;#define stderr   2 
;#define ERR   (-2) 
;#define EOF   (-1) 
;#define YES      1 
;#define NO       0 
;/** #define NULL     0 **/ 
;#define BAD	(-1) 
;#define CR      13 
;#define LF      10 
;#define BELL     7 
;#define SPACE  ' ' 
;#define NEWLINE LF 
; 
;#define EOL 10   /** LF **/ 
;#define NL  10 
;#define TAB  9 
;#define EOL2    13 /*;end-of-line character          */ 
;                   /*  (=carriage return,CR)         */ 
;#define CTRLZ	26 /** 1Ah, Ctrl-Z, cpm textfile EOF */ 
;/**-----------------------------------------------------**/ 
;#define MAX_IOD   6 /** Max Streams, incl stdin,out,err **/ 
;#define FILE  char /** Cain's C doesn't know struc FILE **/ 
;#define VERBOSE   1 /** debugging, report runtime state **/ 
;/**-----------------------------------------------------**/ 
;/** #define PCDOS 1 * IBM PC DOS, Same as CP/M-80   */ 
;/** #if PCDOS		*****************************/ 
;#define EXIT	   0	/* Exit to BDOS		    */ 
;#define CONIN	   1	/* direct echoing con input */ 
;#define CONOUT	   2	/* Direct console output    */ 
;#define LSTOUT	   5	/* Direct list device output*/ 
;#define CONIO	   6	/* Direct console I/O	    */ 
;#define C_WRITESTR 9	/* Console string output    */ 
;#define CONBUF	   10	/* Read console buffer	    */ 
;#define C_STAT	   11	/* Get console status	    */ 
;#define OPEN	   15	/* OPEN a disk file	    */ 
;#define CLOSE	   16	/* Close a disk file	    */ 
;#define SEARCHF	   17	/* Search for first	    */ 
;#define SEARCHN	   18	/* Search for next	    */ 
;#define DELETE	   19	/* Delete a disk file	    */ 
;#define SEQREAD    20	/* seq read		    */ 
;#define SEQWRITE   21	/* seq write		    */ 
;#define CREATE	   22	/* Create a disk file	    */ 
;#define F_RENAME   23	/* Rename a disk file	    */ 
;#define SETDMA	   26	/* Set DMA address	    */ 
;#define B_READ	   33	/* Read Random record	    */ 
;#define B_WRITE	   34	/* Write Random record	    */ 
;#define FILSIZ	   35	/* Compute File Size	    */ 
;/** #endif		*****************************/ 
; 
;/***	File State  bit definitions                       ***/ 
;#define STATE_FR 0	/* Available State, FREE CCB        */ 
;#define STATE_FO 1	/* else File Opened                 */ 
;#define STATE_DT 2	/* at least 1 rec put to file, ndx0 */ 
;#define STATE_PW 4	/* Pending Write, Flush before close*/ 
;#define STATE_EF 8	/* EOF state on last read	    */ 
;#define STATE_ER BAD	/* Error State                      */ 
; 
;/***	File Mode, Character String                         */ 
;#define MODE_RD	'R'	/* Read mode parameter for open     */ 
;#define MODE_WR	'W'	/* Write mode                       */ 
;#define MODE_NU	'N'	/* Null Mode for reuse              */  
; 
;/*	CP/M FCB definition - similar to PC Dos	*/ 
;#define EOFCHR	26	/* End of file character-^Z, 0x1a   */ 
;				/****************************/ 
;#define SECSIZ		128	/* size of CP/M sectorrecord*/ 
;#define _MAXSXFR	1	/* max # sectors xferrable  */ 
;#define _MAXSHFT	12	/* shift right BDOS rtn val */ 
;				/*   to obtain nsecs on err */ 
;				/****************************/ 
;#define BYTE	char 
;#define INT	int 
;#define WORD	int 
; 
;/******************************************************************** 
; *	Channel Control Block (CCB), _iod, I/O Descriptor. 
; *									     
; * One CCB is allocated (statically) for each of the possible open   
; * files under C (including STDIN, STDOUT, STDERR).  Permanent data     
; * regarding the channel is kept here.				     
; *	-= note: initially. use 6 CCB's, adequate for small-c =- 
; ********************************************************************/ 
;  /** Define File Descriptor Indexes - _IOD **/ 
;#define DRV	0 
;#define FNAME	1 
;#define FTYP	9 
;#define FBLK	12 /* current 16k Block */ 
;#define LRS	14 /* Logical Record Size, 0080h */ 
;#define FSZ	16 /* FileSize in bytes */ 
;#define FDATE	20 /* Date */ 
;#define FTCHG	22 /* Time of Last Change */ 
;#define FDCHG	24 /* Date of Last Change */ 
;#define FCLUS	26 /* First Cluster Number for FAT Entry */ 
;#define FSIZE	28 /* File Size 28..31 */ 
;#define FCREC	32 /* Current Record in current 16k Block */ 
;#define FR0	33 /* lo byte of Random Rec Number */ 
;#define FR1	34 /* mid byte of Random Rec Number */ 
;#define FR2	35 /* hi byte of Random Rec Number */ 
;#define FR3	36 /* Overflo byte under certain circumstances */ 
;  /** -= File Operational Elements of Struct =- **/ 
;#define IOTYP   37 /* TYPES: 'S'torage(file), 'M'emory(file) **/ 
;#define FMODE	38 /* File Mode Indication Bytes [3] ex.'wb+' **/ 
;#define FSTATE	41 /* Current Operational State Byte **/ 
;#define FBUFNDX 42 /* Buffer index DW to next free position, 0..127 **/ 
;#define FBUFFER	44 /* File Transfer Buffer **/  
;#define LENFDD	172 /* Next Position after FCB Structure, */ 
;		/** Length of File Descriptor Area **/ 
;#define LEN_Y	171 /** LENFDD - 1, for addressing f_units **/ 
;/**-------------------------------------------------------------*/ 
;/*** -= DECLARATIONS =- ***/ 
;/**-------------------------------------------------------------*/ 
; 
;/** FCB STUCTURES ARRAY AREA ***** CCB's	**/ 
;/** First three are STDIN, STDOUT, STDERR	**/ 
; 
;	int  *_iod[MAX_IOD]; /** holds addrs of f_units at runtime **/ 
; 
;  /** File Descriptor Area **/ 
;	char f_unit0;	/** Location is DRV in struct **/ 
;	char fdd_01[LEN_Y];  /** one less than LENFDD **/ 
; 
;	char f_unit1; 
;	char fdd_02[LEN_Y]; 
; 
;	char f_unit2; 
;	char fdd_03[LEN_Y]; 
; 
;	char f_unit3; 
;	char fdd_04[LEN_Y]; 
; 
;	char f_unit4; 
;	char fdd_05[LEN_Y]; 
; 
;	char f_unit5; 
;	char fdd_06[LEN_Y]; 
; 
; 
;	char fdta[128]; /** default fp buff **/ 
;  /** TBUFF Area for CONIO *********************/ 
;	char tbuff[257]; 
;	char ubuff[257]; 
;	char cp[]; 
; 
;/*       1         2         3         4         5   */ 
;/*****************************************************/ 
;/* Module: OSFN.C				     */ 
;/* Last:  12:10 PM 4/12/2008                         */ 
;/* Init:  9:28 PM 12/28/2007                         */ 
;/* By:  s_dubrovich@yahoo.com                        */ 
;/* Goal: test module for small-c & nasm              */ 
;/* testb.c -  to demo "SMALLC-NASM"                  */ 
;/* -f bin -l testb.lst -o testb.com testb.nsm        */ 
;/* #asm                                              */ 
;/* ;-;	org 0100h ;; for .com locate main()	     */ 
;/* ;-; Doesn't work, for pcDos, edit SECTION .text   */ 
;/* ;-;  to vstart=0100h                              */ 
;/* #endasm                                           */ 
; 
;/***-----------------------------------------------***/ 
;/***                   M A I N                     ***/ 
;/***-----------------------------------------------***/ 
;/*** Main Block, testing File I/O Functions.  Also, **/ 
;/** provides startup initialization for FCB's for   **/ 
;/** User codes' main() -this depends on including   **/ 
;/**  #include C5LIB.C ** first in users's source    **/ 
;/**  in order for mainmain() to execute first. If   **/ 
;/**  included elsewhere in user's source then this  **/ 
;/**  mainmain() doesn't execute, but the lib fn's   **/ 
;/**  are still available and the user must explicit- */ 
;/*   ly call initfcb() first before file operations. */ 
; 
;mainmain() 
czmainmain:
	PUSH BP
	SUB  SP, AutoC738
	MOV  BP, SP

;{ 
;	initfcb(); /** in this file **/ 
	CALL czinitfcb
;	main();    /** call users main **/ 
	CALL czmain
;	exit();	/** user's main returns, handle exit */ 
	CALL czexit
;} 
	POP  BP
	RET

AutoC738	EQU 0
;/** eo main **/ 
; 
;/***-----------------------------------------------***/ 
;/***             S U B R O U T I N E S             ***/ 
;/***-----------------------------------------------***/ 
; 
;/*** codify EOL sequence...			   ***/ 
;NLfn() 
czNLfn:
	PUSH BP
	SUB  SP, AutoC739
	MOV  BP, SP

;{ 
;	putchar(CR); putchar(LF); 
	MOV  BX, +13
	PUSH BX
	CALL czputchar
	ADD  SP, +2
	MOV  BX, +10
	PUSH BX
	CALL czputchar
	ADD  SP, +2
;} 
	POP  BP
	RET

AutoC739	EQU 0
; 
;/* Test if given character is alpha - internal FN !? */ 
;/****---- alpha(c) 
;	char c; 
;{	c=c&127; 
;	return(((c>='a')&(c<='z'))| 
;		((c>='A')&(c<='Z'))| 
;		(c=='_')); 
;} ----****/ 
; 
; 
;/***-----------------------------------------------***/ 
;/** Test for Printable Character, EOF		---***/ 
;/**  ret bool := 1 if not a printable char, else 0 ***/ 
;/**  ret`0 .if. e|{' '..'~'} .else. 1		   ***/ 
; 
;isnprint(c) char c; 
czisnprint:
	PUSH BP
	SUB  SP, AutoC740
	MOV  BP, SP

;{ 
;	if ((c>=' ')&(c<='~')) return 0; 
	LEA  BX, [AutoC740+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +32
	POP  DX
	CALL ccge
	PUSH BX
	LEA  BX, [AutoC740+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +126
	POP  DX
	CALL ccle
	POP  DX
	AND  BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_741
	MOV  BX, +0
	POP  BP
	RET
;	else return 1; 
	JMP  L_742
L_741:
	MOV  BX, +1
	POP  BP
	RET
L_742:
;} 
	POP  BP
	RET

AutoC740	EQU 0
;	czc	VAR	CHAR	+4
; 
;/***-----------------------------------------------***/ 
;toupper(c) char c; 
cztoupper:
	PUSH BP
	SUB  SP, AutoC743
	MOV  BP, SP

;{ 
;	if (c) /** not null **/ 
	LEA  BX, [AutoC743+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	OR   BX, BX
	JNZ  $+5
	JMP  L_744
;		{ 
;		if ((c>='a')&(c<='z')) return (c-32); 
	LEA  BX, [AutoC743+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +97
	POP  DX
	CALL ccge
	PUSH BX
	LEA  BX, [AutoC743+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +122
	POP  DX
	CALL ccle
	POP  DX
	AND  BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_745
	LEA  BX, [AutoC743+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +32
	POP  DX
	SUB  DX, BX
	MOV  BX, DX
	POP  BP
	RET
;		else return (c); 
	JMP  L_746
L_745:
	LEA  BX, [AutoC743+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  BP
	RET
L_746:
;		} 
;	return (c); 
L_744:
	LEA  BX, [AutoC743+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  BP
	RET
;} 

AutoC743	EQU 0
;	czc	VAR	CHAR	+4
; 
;/***-----------------------------------------------***/ 
;/*** put a char array of len length to conout.	---***/ 
;putchara(str,len) char str[]; int len; 
czputchara:
	PUSH BP
	SUB  SP, AutoC747
	MOV  BP, SP

;{ 
;	int cnt, ix; 
;	cnt = len; 
	LEA  BX, [AutoC747-2+BP]
	PUSH BX
	LEA  BX, [AutoC747+4+BP]
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;	ix  = 0; 
	LEA  BX, [AutoC747-4+BP]
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
;	while (len) 
L_748:
	LEA  BX, [AutoC747+4+BP]
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_749
;		{ 
;		putchar(str[ix++]); 
	LEA  BX, [AutoC747+6+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC747-4+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	CALL czputchar
	ADD  SP, +2
;		len--; 
	LEA  BX, [AutoC747+4+BP]
	PUSH BX
	MOV  BX, [BX]
	DEC  BX
	POP  DI
	MOV  Word [DI], BX
	INC  BX
;		} 
	JMP  L_748
L_749:
;} 
	ADD  SP, AutoC747
	POP  BP
	RET

AutoC747	EQU 4
;	czstr	PTR	CHAR	+6
;	czlen	VAR	INT	+4
;	czcnt	VAR	INT	-2
;	czix	VAR	INT	-4
; 
;/***-----------------------------------------------***/ 
;/*** to Upper Case conversion of string 'str$'     ***/ 
; 
;uc_str(pstr) char *pstr; 
czuc_str:
	PUSH BP
	SUB  SP, AutoC750
	MOV  BP, SP

;{ /** takes a ptr to a '$' terminated string **/ 
;	char chr, *ip; 
; 
;	while (*pstr != '$') 
L_751:
	LEA  BX, [AutoC750+4+BP]
	MOV  BX, [BX]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +36
	POP  DX
	CALL ccne
	OR   BX, BX
	JNZ  $+5
	JMP  L_752
;		{ 
;		chr=toupper(*pstr++); 
	LEA  BX, [AutoC750-1+BP]
	PUSH BX
	LEA  BX, [AutoC750+4+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	CALL cztoupper
	ADD  SP, +2
	POP  DI
	MOV  Byte [DI], BL
;		putchar(chr); 
	LEA  BX, [AutoC750-1+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	CALL czputchar
	ADD  SP, +2
;		*ip++ = chr; /** ip++; **/ 
	LEA  BX, [AutoC750-3+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	PUSH BX
	LEA  BX, [AutoC750-1+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
;		} /** str conversion **/ 
	JMP  L_751
L_752:
;} 
	ADD  SP, AutoC750
	POP  BP
	RET

AutoC750	EQU 3
;	czpstr	PTR	CHAR	+4
;	czchr	VAR	CHAR	-1
;	czip	PTR	CHAR	-3
; 
;/***-----------------------------------------------***/ 
;/*** to Upper Case conversion of string 'str\0'    ***/ 
; 
;uc_nstr(pstr) char *pstr; 
czuc_nstr:
	PUSH BP
	SUB  SP, AutoC753
	MOV  BP, SP

;{ /** takes a ptr to a null terminated string **/ 
;	char chr, *ip; 
; 
;	while (*pstr) 
L_754:
	LEA  BX, [AutoC753+4+BP]
	MOV  BX, [BX]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	OR   BX, BX
	JNZ  $+5
	JMP  L_755
;		{ 
;		chr=toupper(*pstr++); 
	LEA  BX, [AutoC753-1+BP]
	PUSH BX
	LEA  BX, [AutoC753+4+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	CALL cztoupper
	ADD  SP, +2
	POP  DI
	MOV  Byte [DI], BL
;		putchar(chr); 
	LEA  BX, [AutoC753-1+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	CALL czputchar
	ADD  SP, +2
;		*ip++ = chr; /** ip++; **/ 
	LEA  BX, [AutoC753-3+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	PUSH BX
	LEA  BX, [AutoC753-1+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
;		} /** str conversion **/ 
	JMP  L_754
L_755:
;} 
	ADD  SP, AutoC753
	POP  BP
	RET

AutoC753	EQU 3
;	czpstr	PTR	CHAR	+4
;	czchr	VAR	CHAR	-1
;	czip	PTR	CHAR	-3
; 
;/***-----------------------------------------------***/ 
;/*** NOTE- limited function, copy filespec 11 chars***/ 
; 
;copystr(str1, str2) char str1[], str2[];  
czcopystr:
	PUSH BP
	SUB  SP, AutoC756
	MOV  BP, SP

;{ 
;	int i,cnt; 
;	cnt = 11; 
	LEA  BX, [AutoC756-4+BP]
	PUSH BX
	MOV  BX, +11
	POP  DI
	MOV  Word [DI], BX
;	i   = 0; 
	LEA  BX, [AutoC756-2+BP]
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
;	while (cnt) 
L_757:
	LEA  BX, [AutoC756-4+BP]
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_758
;		{ 
;		str2[i] = str1[i]; 
	LEA  BX, [AutoC756+4+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC756-2+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC756+6+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC756-2+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
;		cnt--; 
	LEA  BX, [AutoC756-4+BP]
	PUSH BX
	MOV  BX, [BX]
	DEC  BX
	POP  DI
	MOV  Word [DI], BX
	INC  BX
;		i++; 
	LEA  BX, [AutoC756-2+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
;		} 
	JMP  L_757
L_758:
;} 
	ADD  SP, AutoC756
	POP  BP
	RET

AutoC756	EQU 4
;	czstr1	PTR	CHAR	+6
;	czstr2	PTR	CHAR	+4
;	czi	VAR	INT	-2
;	czcnt	VAR	INT	-4
; 
;/***-----------------------------------------------***/ 
;copymem(blk1, blk2, ccnt) char blk1[], blk2[]; int ccnt;  
czcopymem:
	PUSH BP
	SUB  SP, AutoC759
	MOV  BP, SP

;{ 
;	int i; 
;	i   = 0; 
	LEA  BX, [AutoC759-2+BP]
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
;	while (ccnt) 
L_760:
	LEA  BX, [AutoC759+4+BP]
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_761
;		{ 
;		blk2[i] = blk1[i]; 
	LEA  BX, [AutoC759+6+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC759-2+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC759+8+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC759-2+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
;		ccnt--; 
	LEA  BX, [AutoC759+4+BP]
	PUSH BX
	MOV  BX, [BX]
	DEC  BX
	POP  DI
	MOV  Word [DI], BX
	INC  BX
;		i++; 
	LEA  BX, [AutoC759-2+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
;		} 
	JMP  L_760
L_761:
;} 
	ADD  SP, AutoC759
	POP  BP
	RET

AutoC759	EQU 2
;	czblk1	PTR	CHAR	+8
;	czblk2	PTR	CHAR	+6
;	czccnt	VAR	INT	+4
;	czi	VAR	INT	-2
; 
;/***-----------------------------------------------***/ 
;/*** Div DW as DD`DX:AX -> AX`quot,DX`rem.  Word   ***/ 
;/** value is passed on the stack.                  ***/ 
;/** Use Division by Subtraction to avoid ovfl      ***/ 
;/*** Status: works ok, wordsz => 0..max`65535      ***/ 
; 
; 
;outdeci(number) int number; 
czoutdeci:
	PUSH BP
	SUB  SP, AutoC762
	MOV  BP, SP

;{ 
;#asm 
;;outdeci(number)int number;{int k,zs;char c;zs = 0; 
;; k=10000;/**	if (number<0){number=(-number); 
;; outbyte('-');}***/while (k>=1){c=number/k + '0'; 
;; if ((c!='0')|(k==1)|(zs)){zs=1;putchar(c);} 
;; number=number%k;k=k/10;} } 
	mov  dx,0 
	pop  di		;; 0[ret]2[val] 
	pop  ax 
	push ax		;; caller cleans the stack 
	push di		;; restore return address. 
	pusha		;; save entry state... 
	mov  cx,0 
	mov  bx,10000 
	call Lnnd 
	mov  cx,0 
	mov  bx,1000 
	call Lnnd 
	mov  cx,0 
	mov  bx,100 
	call Lnnd 
	mov  cx,0 
	mov  bx,10 
	call Lnnd 
	mov  cx,0 
	mov  bx,1 
	call Lnnd 
  ;; Cleanup Stack, and return.. 
	popa 
	jmp  Cont 
Lnnd: 
	cmp  ax,bx 
	jb   .Lnxt1	;; less than 10k, else count. 
	sub  ax,bx 
	inc  cx 
	jmp  Lnnd 
.Lnxt1: 
	add  cx,30h ;; make ascii number 
	pusha 
	push cx 
	call czputchar  ;; for compiler identifier 
	pop  cx 
	popa 
	RET 
Cont: 
;#endasm ;} 
	POP  BP
	RET

AutoC762	EQU 0
;	cznumber	VAR	INT	+4
; 
;/***-----------------------------------------------***/ 
;/** ----------= S I M P L E   I / O =-------------- **/ 
;/***-----------------------------------------------***/ 
;/** define putchar() putc(c,stdout)                 **/ 
;/** -= Simple I/O =- **/ 
;putchar(c) 
czputchar:
; char c; 
	PUSH BP
	SUB  SP, AutoC763
	MOV  BP, SP

;{ 
;	OSfn_(CONOUT,c); 
	MOV  BX, +2
	PUSH BX
	LEA  BX, [AutoC763+4+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	CALL czOSfn_
	ADD  SP, +4
;/**	if(c==CR)		**/ 
;/**	OSfn_(CONOUT,LF);	**/ 
;/**	return(c & 255);	**/ 
;} 
	POP  BP
	RET

AutoC763	EQU 0
;	czc	VAR	CHAR	+4
; 
;/***-----------------------------------------------***/ 
;/** get buffered input from stdin, CONBUF #10       **/ 
;/** 1st byte of tbuff on call holds max_len,1..255  **/ 
;/** 2nd byte is set to string length inc terminator **/ 
;/** byte CR`0Dh.  Buffer must be preset before call **/ 
;/** Users returned string begins at third byte.     **/ 
; 
;/** Call 5 interface for internal use. **/ 
;c5gets(ubuff) char *ubuff;   
czc5gets:
	PUSH BP
	SUB  SP, AutoC764
	MOV  BP, SP

;{  /** use temp buffer with copy to userbuffer **/ 
;	char *ip,*pb,chr; 
; 
;	tbuff[0]=255;  /** use default max **/ 
	MOV  BX, cztbuff
	PUSH BX
	MOV  BX, +0
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +255
	POP  DI
	MOV  Byte [DI], BL
;	ip = &tbuff[1]; 
	LEA  BX, [AutoC764-2+BP]
	PUSH BX
	MOV  BX, cztbuff
	PUSH BX
	MOV  BX, +1
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
;	pb = &tbuff[2]; 
	LEA  BX, [AutoC764-4+BP]
	PUSH BX
	MOV  BX, cztbuff
	PUSH BX
	MOV  BX, +2
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
;	OSfn_(CONBUF,&tbuff[0]); /** Fn 10, DS:DX **/ 
	MOV  BX, +10
	PUSH BX
	MOV  BX, cztbuff
	PUSH BX
	MOV  BX, +0
	POP  DX
	ADD  BX, DX
	PUSH BX
	CALL czOSfn_
	ADD  SP, +4
;  /** copy string part to users buffer **/ 
;	while (*pb != 13) 
L_765:
	LEA  BX, [AutoC764-4+BP]
	MOV  BX, [BX]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +13
	POP  DX
	CALL ccne
	OR   BX, BX
	JNZ  $+5
	JMP  L_766
;		{ 
;		chr = *pb++; 
	LEA  BX, [AutoC764-5+BP]
	PUSH BX
	LEA  BX, [AutoC764-4+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
;		*ubuff++ = chr; 
	LEA  BX, [AutoC764+4+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	PUSH BX
	LEA  BX, [AutoC764-5+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
;		} 
	JMP  L_765
L_766:
;  /* chgs termination from CR to '$' */ 
;	*ubuff = '$'; 
	LEA  BX, [AutoC764+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +36
	POP  DI
	MOV  Byte [DI], BL
;	return (*ip); 
	LEA  BX, [AutoC764-2+BP]
	MOV  BX, [BX]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	ADD  SP, AutoC764
	POP  BP
	RET
;} 

AutoC764	EQU 5
;	czubuff	PTR	CHAR	+4
;	czip	PTR	CHAR	-2
;	czpb	PTR	CHAR	-4
;	czchr	VAR	CHAR	-5
; 
;/***-----------------------------------------------***/ 
;/**** Note: gets() for C functionality, append null ****/ 
;/**** Rets- caller's buffer ptr, or NULL if eof or err */ 
; 
;gets(ubuff) char *ubuff;  /** CONIN Fn **/ 
czgets:
	PUSH BP
	SUB  SP, AutoC767
	MOV  BP, SP

;{  /** use temp buffer with copy to userbuffer **/ 
;	char *ip,*pb, *tmpp, chr; 
; 
;	tmpp = ubuff;  /** local copy **/ 
	LEA  BX, [AutoC767-6+BP]
	PUSH BX
	LEA  BX, [AutoC767+4+BP]
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;	tbuff[0]=255;  /** use default max inbuffsz **/ 
	MOV  BX, cztbuff
	PUSH BX
	MOV  BX, +0
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +255
	POP  DI
	MOV  Byte [DI], BL
;	ip = &tbuff[1]; /** fn10 sets to strlen entered **/ 
	LEA  BX, [AutoC767-2+BP]
	PUSH BX
	MOV  BX, cztbuff
	PUSH BX
	MOV  BX, +1
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
;	pb = &tbuff[2]; /** entered str start **/ 
	LEA  BX, [AutoC767-4+BP]
	PUSH BX
	MOV  BX, cztbuff
	PUSH BX
	MOV  BX, +2
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
;	OSfn_(CONBUF,&tbuff[0]); /** Fn 10, DS:DX struct **/ 
	MOV  BX, +10
	PUSH BX
	MOV  BX, cztbuff
	PUSH BX
	MOV  BX, +0
	POP  DX
	ADD  BX, DX
	PUSH BX
	CALL czOSfn_
	ADD  SP, +4
; 
;	if (0 == *ip) return (NULL); /** empty line **/ 
	MOV  BX, +0
	PUSH BX
	LEA  BX, [AutoC767-2+BP]
	MOV  BX, [BX]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_768
	MOV  BX, +0
	ADD  SP, AutoC767
	POP  BP
	RET
;  /** copy string part to users buffer **/ 
;	while (*pb != 13) /** input CR terminated **/ 
L_768:
L_769:
	LEA  BX, [AutoC767-4+BP]
	MOV  BX, [BX]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +13
	POP  DX
	CALL ccne
	OR   BX, BX
	JNZ  $+5
	JMP  L_770
;		{ 
;		chr = *pb++; 
	LEA  BX, [AutoC767-7+BP]
	PUSH BX
	LEA  BX, [AutoC767-4+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
;		*tmpp++ = chr; 
	LEA  BX, [AutoC767-6+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	PUSH BX
	LEA  BX, [AutoC767-7+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
;		} 
	JMP  L_769
L_770:
;  /* chgs termination from CR to C's '0' */ 
;	*tmpp = 0; 
	LEA  BX, [AutoC767-6+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Byte [DI], BL
;	return (ubuff); 
	LEA  BX, [AutoC767+4+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC767
	POP  BP
	RET
;} 

AutoC767	EQU 7
;	czubuff	PTR	CHAR	+4
;	czip	PTR	CHAR	-2
;	czpb	PTR	CHAR	-4
;	cztmpp	PTR	CHAR	-6
;	czchr	VAR	CHAR	-7
; 
;/***-----------------------------------------------***/ 
;getch() 
czgetch:
	PUSH BP
	SUB  SP, AutoC771
	MOV  BP, SP

;{ /* rets AH.01,AL.CharIn, echos to console   ***/ 
;	OSfn_(CONIN,0);  
	MOV  BX, +1
	PUSH BX
	MOV  BX, +0
	PUSH BX
	CALL czOSfn_
	ADD  SP, +4
;} 
	POP  BP
	RET

AutoC771	EQU 0
; 
;/***-----------------------------------------------***/ 
;putstr(prntstr) /** must be '$' terminated, conout  **/ 
czputstr:
; int *prntstr; 
	PUSH BP
	SUB  SP, AutoC772
	MOV  BP, SP

;{ 
;	OSfn_(C_WRITESTR,prntstr); /* Fn 9, DS:DX */ 
	MOV  BX, +9
	PUSH BX
	LEA  BX, [AutoC772+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czOSfn_
	ADD  SP, +4
;} 
	POP  BP
	RET

AutoC772	EQU 0
;	czprntstr	PTR	INT	+4
; 
;/***-----------------------------------------------***/ 
;/*** 8:35 PM 8/14/2008				---***/ 
;/*** int puts(char *string) ; rets 0`success .else.***/ 
;/***  non-zero.  C strings are null terminated.	   ***/ 
;puts(str) char str[]; 
czputs:
	PUSH BP
	SUB  SP, AutoC773
	MOV  BP, SP

;{ 
;	char pstr[],*ptb,*ip,*op,*mx,chr; 
;	int  ndx; 
; 
;	mx = &tbuff[0];  /** holds byte len of tbuff **/ 
	LEA  BX, [AutoC773-10+BP]
	PUSH BX
	MOV  BX, cztbuff
	PUSH BX
	MOV  BX, +0
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
;	ip = &tbuff[1];  /** returns len entered **/ 
	LEA  BX, [AutoC773-6+BP]
	PUSH BX
	MOV  BX, cztbuff
	PUSH BX
	MOV  BX, +1
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
;	ptb = &tbuff[2]; /** buffer data area **/ 
	LEA  BX, [AutoC773-4+BP]
	PUSH BX
	MOV  BX, cztbuff
	PUSH BX
	MOV  BX, +2
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
;	op = ptb;	/** save start **/ 
	LEA  BX, [AutoC773-8+BP]
	PUSH BX
	LEA  BX, [AutoC773-4+BP]
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;	pstr = str; 
	LEA  BX, [AutoC773-2+BP]
	PUSH BX
	LEA  BX, [AutoC773+4+BP]
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;	ndx = 0; 
	LEA  BX, [AutoC773-13+BP]
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
; 
;	*mx = 127; /** set max length for string 0..126 **/ 
	LEA  BX, [AutoC773-10+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +127
	POP  DI
	MOV  Byte [DI], BL
;	*ip = 0; 
	LEA  BX, [AutoC773-6+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Byte [DI], BL
;		 
; 
;	while (1) 
L_774:
	MOV  BX, +1
	OR   BX, BX
	JNZ  $+5
	JMP  L_775
;		{ 
;		if (ndx == 127) 
	LEA  BX, [AutoC773-13+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +127
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_776
;			{ /** internal max str len **/ 
;			NLfn(); 
	CALL czNLfn
;			putstr("-= String maxed error =-$"); 
	MOV  BX, L_773+0
	PUSH BX
	CALL czputstr
	ADD  SP, +2
;			return (BAD); 
	MOV  BX, +1
	NEG  BX
	ADD  SP, AutoC773
	POP  BP
	RET
;			} 
;		if (pstr[ndx] == 0) 
L_776:
	LEA  BX, [AutoC773-2+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC773-13+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_777
;			{	/** found null **/ 
;			*ptb = '$';   /** chg termination **/ 
	LEA  BX, [AutoC773-4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +36
	POP  DI
	MOV  Byte [DI], BL
;			*ip = ndx;    /** length of str in tbuff **/ 
	LEA  BX, [AutoC773-6+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC773-13+BP]
	MOV  BX, [BX]
	POP  DI
	MOV  Byte [DI], BL
;			putstr(op); 
	LEA  BX, [AutoC773-8+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czputstr
	ADD  SP, +2
;			return (ndx); /** pass back numb of chrs **/ 
	LEA  BX, [AutoC773-13+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC773
	POP  BP
	RET
;			} 
;		else	{  /** not EO string yet, copy chr **/ 
	JMP  L_778
L_777:
;			chr = pstr[ndx]; 
	LEA  BX, [AutoC773-11+BP]
	PUSH BX
	LEA  BX, [AutoC773-2+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC773-13+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
;			*ptb++ = chr; 
	LEA  BX, [AutoC773-4+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	PUSH BX
	LEA  BX, [AutoC773-11+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
;			} 
L_778:
;		ndx++; 
	LEA  BX, [AutoC773-13+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
;		} 
	JMP  L_774
L_775:
;} 
	ADD  SP, AutoC773
	POP  BP
	RET

AutoC773	EQU 13
;	czstr	PTR	CHAR	+4
;	czpstr	PTR	CHAR	-2
;	czptb	PTR	CHAR	-4
;	czip	PTR	CHAR	-6
;	czop	PTR	CHAR	-8
;	czmx	PTR	CHAR	-10
;	czchr	VAR	CHAR	-11
;	czndx	VAR	INT	-13

	  [SECTION .dseg]
L_773	DB "-= String maxed error =-$",0

	  [SECTION .cseg]
; 
;/***-----------------------------------------------***/ 
;/*** dump2cons(fp_); write DTA to console, primitive.*/ 
;dump2cons(fp_) int fp_; 
czdump2cons:
	PUSH BP
	SUB  SP, AutoC779
	MOV  BP, SP

;{	/** change index to _iod address **/ 
;	int *fptr, i, index; 
;	char fbuf[], byteval, *pccb; 
; 
;	pccb = _iod[fp_]; /** log address of CCB fcb **/ 
	LEA  BX, [AutoC779-11+BP]
	PUSH BX
	MOV  BX, cz_iod
	PUSH BX
	LEA  BX, [AutoC779+4+BP]
	MOV  BX, [BX]
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;	fbuf = &pccb[FBUFFER]; 
	LEA  BX, [AutoC779-8+BP]
	PUSH BX
	LEA  BX, [AutoC779-11+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +44
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
;	i = 128; 
	LEA  BX, [AutoC779-4+BP]
	PUSH BX
	MOV  BX, +128
	POP  DI
	MOV  Word [DI], BX
;	index = 0; 
	LEA  BX, [AutoC779-6+BP]
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
;	while (i) 
L_780:
	LEA  BX, [AutoC779-4+BP]
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_781
;		{ 
;		byteval = fbuf[index++]; 
	LEA  BX, [AutoC779-9+BP]
	PUSH BX
	LEA  BX, [AutoC779-8+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC779-6+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
;		if (byteval == EOFCHR) break; 
	LEA  BX, [AutoC779-9+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +26
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_782
	JMP  L_781
;		if (isnprint (byteval))  
L_782:
	LEA  BX, [AutoC779-9+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	CALL czisnprint
	ADD  SP, +2
	OR   BX, BX
	JNZ  $+5
	JMP  L_783
;			{ /** non printable substitution **/ 
;			putchar('^'); 
	MOV  BX, +94
	PUSH BX
	CALL czputchar
	ADD  SP, +2
;			continue; 
	JMP  L_780
;			} 
;		putchar(byteval); 
L_783:
	LEA  BX, [AutoC779-9+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	CALL czputchar
	ADD  SP, +2
;		i--; 
	LEA  BX, [AutoC779-4+BP]
	PUSH BX
	MOV  BX, [BX]
	DEC  BX
	POP  DI
	MOV  Word [DI], BX
	INC  BX
;		} 
	JMP  L_780
L_781:
;	return (index);	 
	LEA  BX, [AutoC779-6+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC779
	POP  BP
	RET
;} 

AutoC779	EQU 11
;	czfp_	VAR	INT	+4
;	czfptr	PTR	INT	-2
;	czi	VAR	INT	-4
;	czindex	VAR	INT	-6
;	czfbuf	PTR	CHAR	-8
;	czbyteval	VAR	CHAR	-9
;	czpccb	PTR	CHAR	-11
; 
;/***-----------------------------------------------***/ 
;/** ----------= F I L E   I / O =------------------ **/ 
;/***-----------------------------------------------***/ 
;/*** OS_ := direct OS calls which map to 'C' Fns.  ***/ 
;/***-----------------------------------------------***/ 
;/*** Program Terminate is Fn# 0, but use exit();   ***/ 
;/***-----------------------------------------------***/ 
;/** These minimal file io primitives req'd for sm-c **/ 
;/** int putc(int chr,FILE *fp); ret`chr`ok .else. EOF*/ 
;/** int getc(FILE *fp); ret`nxtchr`ok .else. EOF    **/ 
;/** fopen(name,mode) fclose(fp)			    **/ 
;/***-----------------------------------------------***/ 
;/** File Open 15 | On entry DS:DX := unopened FCB,  **/ 
;/** Ret: int fp_, index of iob structure assigned.  **/ 
;/** search thru CCB's, i.e. File Descriptors, for   **/ 
;/** free descriptor to use. Copy filename and mode  **/ 
;/** to descriptor fields.  OS Call 5 returns NULL if**/ 
;/** either open or create is successful, but fopen()**/ 
;/** returns fp#, or NULL if error opening the file. **/ 
; 
;/** Static **/ 
;int fop_result; 
; 
;fopen(filespec, mode) char *filespec, *mode;  
czfopen:
	PUSH BP
	SUB  SP, AutoC784
	MOV  BP, SP

;{ 
;	int result, fpi; 
;	char *ufdesc, *indx, *p_ccb, sval; 
;  /** available slot, first free _iod index is our **/ 
;  /** fp#, return this after further processing    **/ 
;	while (1)  
L_785:
	MOV  BX, +1
	OR   BX, BX
	JNZ  $+5
	JMP  L_786
;		{ 
;		fpi = 3; 
	LEA  BX, [AutoC784-4+BP]
	PUSH BX
	MOV  BX, +3
	POP  DI
	MOV  Word [DI], BX
;		p_ccb = _iod[fpi]; /** infile **/ 
	LEA  BX, [AutoC784-10+BP]
	PUSH BX
	MOV  BX, cz_iod
	PUSH BX
	LEA  BX, [AutoC784-4+BP]
	MOV  BX, [BX]
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;		sval = p_ccb[FSTATE]; 
	LEA  BX, [AutoC784-11+BP]
	PUSH BX
	LEA  BX, [AutoC784-10+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +41
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
;		if ( sval == STATE_FR) {break;} 
	LEA  BX, [AutoC784-11+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_787
	JMP  L_786
; 
;		fpi = 4; 
L_787:
	LEA  BX, [AutoC784-4+BP]
	PUSH BX
	MOV  BX, +4
	POP  DI
	MOV  Word [DI], BX
;		p_ccb = _iod[fpi]; /** outfile **/ 
	LEA  BX, [AutoC784-10+BP]
	PUSH BX
	MOV  BX, cz_iod
	PUSH BX
	LEA  BX, [AutoC784-4+BP]
	MOV  BX, [BX]
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;		sval = p_ccb[FSTATE]; 
	LEA  BX, [AutoC784-11+BP]
	PUSH BX
	LEA  BX, [AutoC784-10+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +41
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
;		if ( sval == STATE_FR) {break;} 
	LEA  BX, [AutoC784-11+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_788
	JMP  L_786
; 
;		fpi = 5; 
L_788:
	LEA  BX, [AutoC784-4+BP]
	PUSH BX
	MOV  BX, +5
	POP  DI
	MOV  Word [DI], BX
;		p_ccb = _iod[fpi]; /** temp **/ 
	LEA  BX, [AutoC784-10+BP]
	PUSH BX
	MOV  BX, cz_iod
	PUSH BX
	LEA  BX, [AutoC784-4+BP]
	MOV  BX, [BX]
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;		sval = p_ccb[FSTATE]; 
	LEA  BX, [AutoC784-11+BP]
	PUSH BX
	LEA  BX, [AutoC784-10+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +41
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
;		if ( sval == STATE_FR) {break;} 
	LEA  BX, [AutoC784-11+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_789
	JMP  L_786
;	/** else none of the 3 CCB's are available **/ 
;		sval = STATE_ER; 
L_789:
	LEA  BX, [AutoC784-11+BP]
	PUSH BX
	MOV  BX, +1
	NEG  BX
	POP  DI
	MOV  Byte [DI], BL
;		putstr("No Available IOD$"); 
	MOV  BX, L_784+0
	PUSH BX
	CALL czputstr
	ADD  SP, +2
;		NLfn(); 
	CALL czNLfn
;		break; 
	JMP  L_786
;		} 
	JMP  L_785
L_786:
;  /** catch error, return null  **/ 
;	if ( sval == STATE_ER ) 
	LEA  BX, [AutoC784-11+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +1
	NEG  BX
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_790
;		{ 
;		putstr("fopen STATE_ER error.$"); 
	MOV  BX, L_784+18
	PUSH BX
	CALL czputstr
	ADD  SP, +2
;		NLfn(); 
	CALL czNLfn
;		return (NULL); 
	MOV  BX, +0
	ADD  SP, AutoC784
	POP  BP
	RET
;		} 
;  /** else presumed free descriptor **/ 
;  /** fpi holds index in _iod, which has addr of desc **/ 
;  /** p_ccb holds that addr. Copy it as ufdesc        **/ 
;	ufdesc = p_ccb; 
L_790:
	LEA  BX, [AutoC784-6+BP]
	PUSH BX
	LEA  BX, [AutoC784-10+BP]
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;  /** Set FMODE to mode **/ 
;	p_ccb[FMODE] = *mode; 
	LEA  BX, [AutoC784-10+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +38
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC784+4+BP]
	MOV  BX, [BX]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
;	p_ccb[DRV] = 0; /** current default drive **/ 
	LEA  BX, [AutoC784-10+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Byte [DI], BL
;				/** chg behavior in future version **/ 
; 
;  /** Copy Filefilespec as upper case to FNAME, FTYP **/ 
;	clearfcb(ufdesc); /** overwrite with spaces to clear **/ 
	LEA  BX, [AutoC784-6+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czclearfcb
	ADD  SP, +2
;	p_ccb = &p_ccb[FNAME]; 
	LEA  BX, [AutoC784-10+BP]
	PUSH BX
	LEA  BX, [AutoC784-10+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
;	indx = filespec; 
	LEA  BX, [AutoC784-8+BP]
	PUSH BX
	LEA  BX, [AutoC784+6+BP]
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;	while (1) 
L_791:
	MOV  BX, +1
	OR   BX, BX
	JNZ  $+5
	JMP  L_792
;		{ /** null terminated strings **/ 
;		if (*indx == 0) break; 
	LEA  BX, [AutoC784-8+BP]
	MOV  BX, [BX]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_793
	JMP  L_792
;		if (*indx == '.') 
L_793:
	LEA  BX, [AutoC784-8+BP]
	MOV  BX, [BX]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +46
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_794
;			{ 
;			p_ccb = &ufdesc[FTYP]; 
	LEA  BX, [AutoC784-10+BP]
	PUSH BX
	LEA  BX, [AutoC784-6+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +9
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
;			indx++; 
	LEA  BX, [AutoC784-8+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
;			} 
;		if (*indx)  
L_794:
	LEA  BX, [AutoC784-8+BP]
	MOV  BX, [BX]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	OR   BX, BX
	JNZ  $+5
	JMP  L_795
;			{ 
;			*p_ccb = toupper(*indx); 
	LEA  BX, [AutoC784-10+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC784-8+BP]
	MOV  BX, [BX]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	CALL cztoupper
	ADD  SP, +2
	POP  DI
	MOV  Byte [DI], BL
;			p_ccb++; indx++; 
	LEA  BX, [AutoC784-10+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
	LEA  BX, [AutoC784-8+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
;			} 
;		else break; 
	JMP  L_796
L_795:
	JMP  L_792
L_796:
;		} 
	JMP  L_791
L_792:
; 
;  /** call OS_fo, pass user file descriptor ptr -------------**/ 
;	fop_result = OS_fo(ufdesc); 
	LEA  BX, [AutoC784-6+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czOS_fo
	ADD  SP, +2
	MOV  Word [czfop_result], BX
; 
;  /** process low level fopen result **/ 
;	if (fop_result == NULL) 
	MOV  BX, [Word czfop_result]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_797
;		{ /** successful open from lower level **/ 
;		  /** conout state information **/ 
;		if (VERBOSE) 
	MOV  BX, +1
	OR   BX, BX
	JNZ  $+5
	JMP  L_798
;			{ 
;			putstr("CCB File Buffer assigned.$"); 
	MOV  BX, L_784+41
	PUSH BX
	CALL czputstr
	ADD  SP, +2
;			NLfn(); 
	CALL czNLfn
;			putstr ("fopen fop_result reports not null.$"); 
	MOV  BX, L_784+68
	PUSH BX
	CALL czputstr
	ADD  SP, +2
;			NLfn();outdeci(fpi);NLfn(); 
	CALL czNLfn
	LEA  BX, [AutoC784-4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czoutdeci
	ADD  SP, +2
	CALL czNLfn
;			} 
;		return fpi; 
L_798:
	LEA  BX, [AutoC784-4+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC784
	POP  BP
	RET
; 		} 
;	else 	{ /** unsuccessful open **/ 
	JMP  L_799
L_797:
;		if (VERBOSE) 
	MOV  BX, +1
	OR   BX, BX
	JNZ  $+5
	JMP  L_800
;			{ 
;			putstr ("fopen fop_result reports null.$"); 
	MOV  BX, L_784+104
	PUSH BX
	CALL czputstr
	ADD  SP, +2
;			NLfn(); 
	CALL czNLfn
;			} 
;		return (NULL); 
L_800:
	MOV  BX, +0
	ADD  SP, AutoC784
	POP  BP
	RET
;		} 
L_799:
;} 
	ADD  SP, AutoC784
	POP  BP
	RET

AutoC784	EQU 11
;	czfilespec	PTR	CHAR	+6
;	czmode	PTR	CHAR	+4
;	czresult	VAR	INT	-2
;	czfpi	VAR	INT	-4
;	czufdesc	PTR	CHAR	-6
;	czindx	PTR	CHAR	-8
;	czp_ccb	PTR	CHAR	-10
;	czsval	VAR	CHAR	-11

	  [SECTION .dseg]
L_784	DB "No Available IOD$",0
	DB "fopen STATE_ER error.$",0
	DB "CCB File Buffer assigned.$",0
	DB "fopen fop_result reports not null.$",0
	DB "fopen fop_result reports null.$",0

	  [SECTION .cseg]
; 
;/***-----------------------------------------------***/ 
;/** File Open 15 | On entry DS:DX := unopened FCB,  **/ 
;/** the dir is searched searched for the named file **/ 
;/** and returns AL := FFh if not found, .else. AL:= **/ 
;/** 0, and the entry FCB is filled in, DRV:=current **/ 
;/** drv, Current Block :=0.  OS Call 5 returns NULL **/ 
;/** if either open or create is successful.         **/ 
; 
;OS_fo (ufdesc) char ufdesc[]; 
czOS_fo:
	PUSH BP
	SUB  SP, AutoC801
	MOV  BP, SP

;{ /** User File Descriptor*/ 
;	char cresult, *cbuff; 
;	int iresult, i; 
;	cresult = ufdesc[FMODE]; 
	LEA  BX, [AutoC801-1+BP]
	PUSH BX
	LEA  BX, [AutoC801+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +38
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
; 
;  /** if fmode := read, f must exist for std C **/ 
;	if ((cresult == 'r') | (cresult == 'R')) 
	LEA  BX, [AutoC801-1+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +114
	POP  DX
	CALL cceq
	PUSH BX
	LEA  BX, [AutoC801-1+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +82
	POP  DX
	CALL cceq
	POP  DX
	OR   BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_802
;		{ 
;		cresult = OSfn_(OPEN, ufdesc); 
	LEA  BX, [AutoC801-1+BP]
	PUSH BX
	MOV  BX, +15
	PUSH BX
	LEA  BX, [AutoC801+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czOSfn_
	ADD  SP, +4
	POP  DI
	MOV  Byte [DI], BL
; 
;	  /** OS Open op searches for f, returns FFh if not found **/ 
;		if (cresult == BAD) 
	LEA  BX, [AutoC801-1+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +1
	NEG  BX
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_803
;			{ 
;			putstr("File Not Found for reading, Error..$"); 
	MOV  BX, L_801+0
	PUSH BX
	CALL czputstr
	ADD  SP, +2
;			NLfn(); 
	CALL czNLfn
;			return (BAD); 
	MOV  BX, +1
	NEG  BX
	ADD  SP, AutoC801
	POP  BP
	RET
;			} 
;		else	{	/** Open Successful **/ 
	JMP  L_804
L_803:
;			putstr("File Found and Opened for Reading.$"); 
	MOV  BX, L_801+37
	PUSH BX
	CALL czputstr
	ADD  SP, +2
;			NLfn(); 
	CALL czNLfn
;			ufdesc[FSTATE] = STATE_FO; 
	LEA  BX, [AutoC801+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +41
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +1
	POP  DI
	MOV  Byte [DI], BL
;		/** assign DTA _and_ seed it from file **/ 
;			cbuff = &ufdesc[FBUFFER]; 
	LEA  BX, [AutoC801-3+BP]
	PUSH BX
	LEA  BX, [AutoC801+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +44
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
;			setdta(cbuff); 
	LEA  BX, [AutoC801-3+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czsetdta
	ADD  SP, +2
;			iresult = OS_sr(ufdesc); 
	LEA  BX, [AutoC801-5+BP]
	PUSH BX
	LEA  BX, [AutoC801+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czOS_sr
	ADD  SP, +2
	POP  DI
	MOV  Word [DI], BX
;			if (iresult)	/** 0`ok, 1`EOF **/ 
	LEA  BX, [AutoC801-5+BP]
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_805
;				{  /** true if EOF, else null returned **/ 
;				ufdesc[FSTATE] = STATE_EF; 
	LEA  BX, [AutoC801+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +41
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +8
	POP  DI
	MOV  Byte [DI], BL
;				ufdesc[FBUFNDX] = 0; 
	LEA  BX, [AutoC801+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +42
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Byte [DI], BL
;				} 
;			else  { 
	JMP  L_806
L_805:
;				ufdesc[FBUFNDX] = 0; 
	LEA  BX, [AutoC801+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +42
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Byte [DI], BL
;				ufdesc[FSTATE] = STATE_DT; 
	LEA  BX, [AutoC801+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +41
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +2
	POP  DI
	MOV  Byte [DI], BL
;				} 
L_806:
;			return (cresult); 
	LEA  BX, [AutoC801-1+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	ADD  SP, AutoC801
	POP  BP
	RET
;			} 
L_804:
;		} 
;	  /** if fmode := write, f created or f overwritten for std C **/ 
; 
;	else if ((cresult == 'w') | (cresult == 'W')) 
	JMP  L_807
L_802:
	LEA  BX, [AutoC801-1+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +119
	POP  DX
	CALL cceq
	PUSH BX
	LEA  BX, [AutoC801-1+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +87
	POP  DX
	CALL cceq
	POP  DX
	OR   BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_808
;		{ /** fcb ptr to unopened fcb, FFh ret if no file, else ret 0 **/ 
;		cresult = OSfn_(OPEN, ufdesc); 
	LEA  BX, [AutoC801-1+BP]
	PUSH BX
	MOV  BX, +15
	PUSH BX
	LEA  BX, [AutoC801+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czOSfn_
	ADD  SP, +4
	POP  DI
	MOV  Byte [DI], BL
;	 
;		if (cresult == BAD) 
	LEA  BX, [AutoC801-1+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +1
	NEG  BX
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_809
;			{  /** fille not found in current directory **/ 
;			putstr("File Not Found for writing, Creating..$"); 
	MOV  BX, L_801+73
	PUSH BX
	CALL czputstr
	ADD  SP, +2
;			NLfn(); 
	CALL czNLfn
;			cresult = creatf(ufdesc); 
	LEA  BX, [AutoC801-1+BP]
	PUSH BX
	LEA  BX, [AutoC801+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czcreatf
	ADD  SP, +2
	POP  DI
	MOV  Byte [DI], BL
;			if (cresult == BAD) return BAD; 
	LEA  BX, [AutoC801-1+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +1
	NEG  BX
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_810
	MOV  BX, +1
	NEG  BX
	ADD  SP, AutoC801
	POP  BP
	RET
;			else	{  /** Successful File Create for Writing **/ 
	JMP  L_811
L_810:
;				putstr(" -File Created for Writing- $"); 
	MOV  BX, L_801+113
	PUSH BX
	CALL czputstr
	ADD  SP, +2
;				NLfn(); 
	CALL czNLfn
;				ufdesc[FSTATE] = STATE_FO; 
	LEA  BX, [AutoC801+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +41
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +1
	POP  DI
	MOV  Byte [DI], BL
;				  /** assign DTA _and_ seed it with ^Z **/ 
;				cbuff = &ufdesc[FBUFFER]; 
	LEA  BX, [AutoC801-3+BP]
	PUSH BX
	LEA  BX, [AutoC801+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +44
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
;				setdta(cbuff); 
	LEA  BX, [AutoC801-3+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czsetdta
	ADD  SP, +2
;				i=127; 
	LEA  BX, [AutoC801-7+BP]
	PUSH BX
	MOV  BX, +127
	POP  DI
	MOV  Word [DI], BX
;				while (i) cbuff[i--] = CTRLZ; 
L_812:
	LEA  BX, [AutoC801-7+BP]
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_813
	LEA  BX, [AutoC801-3+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC801-7+BP]
	PUSH BX
	MOV  BX, [BX]
	DEC  BX
	POP  DI
	MOV  Word [DI], BX
	INC  BX
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +26
	POP  DI
	MOV  Byte [DI], BL
	JMP  L_812
L_813:
;				cbuff[i] = CTRLZ; /** position index 0 **/ 
	LEA  BX, [AutoC801-3+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC801-7+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +26
	POP  DI
	MOV  Byte [DI], BL
;				return (NULL); 
	MOV  BX, +0
	ADD  SP, AutoC801
	POP  BP
	RET
;				} 
L_811:
;			} 
;		else	{  /** File Found and Successfully Opened for Writing. **/ 
	JMP  L_814
L_809:
;		  /** Note that file position is at the beginning of the file. **/ 
;		  /** seed buffer with ctl-z, eof marker **/ 
;			i=127; 
	LEA  BX, [AutoC801-7+BP]
	PUSH BX
	MOV  BX, +127
	POP  DI
	MOV  Word [DI], BX
;			cbuff = &ufdesc[FBUFFER]; 
	LEA  BX, [AutoC801-3+BP]
	PUSH BX
	LEA  BX, [AutoC801+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +44
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
;			while (i) cbuff[i--] = CTRLZ; 
L_815:
	LEA  BX, [AutoC801-7+BP]
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_816
	LEA  BX, [AutoC801-3+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC801-7+BP]
	PUSH BX
	MOV  BX, [BX]
	DEC  BX
	POP  DI
	MOV  Word [DI], BX
	INC  BX
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +26
	POP  DI
	MOV  Byte [DI], BL
	JMP  L_815
L_816:
;			cbuff[i] = CTRLZ; /** position index 0 **/ 
	LEA  BX, [AutoC801-3+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC801-7+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +26
	POP  DI
	MOV  Byte [DI], BL
;			ufdesc[FSTATE] = STATE_FO; 
	LEA  BX, [AutoC801+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +41
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +1
	POP  DI
	MOV  Byte [DI], BL
;			return (cresult); 
	LEA  BX, [AutoC801-1+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	ADD  SP, AutoC801
	POP  BP
	RET
;			} 
L_814:
;		} 
;  /** else some major error **/ 
;	putstr(" -Major FMODE error- $"); 
L_808:
L_807:
	MOV  BX, L_801+143
	PUSH BX
	CALL czputstr
	ADD  SP, +2
;	return BAD; 
	MOV  BX, +1
	NEG  BX
	ADD  SP, AutoC801
	POP  BP
	RET
;} 

AutoC801	EQU 7
;	czufdesc	PTR	CHAR	+4
;	czcresult	VAR	CHAR	-1
;	czcbuff	PTR	CHAR	-3
;	cziresult	VAR	INT	-5
;	czi	VAR	INT	-7

	  [SECTION .dseg]
L_801	DB "File Not Found for reading, Error..$",0
	DB "File Found and Opened for Reading.$",0
	DB "File Not Found for writing, Creating..$",0
	DB " -File Created for Writing- $",0
	DB " -Major FMODE error- $",0

	  [SECTION .cseg]
; 
;/***-----------------------------------------------***/ 
;/** File Close 16 | Req'd to update dir info. DS:DX **/ 
;/*** fclose() ret NULL if successful, else nz err  ***/ 
;/*** Call 5 ret FFh, BAD, means err, NULL is ok    ***/ 
; 
;fclose(fp_) int fp_;  
czfclose:
	PUSH BP
	SUB  SP, AutoC817
	MOV  BP, SP

;{ 
;	int *fptr, result; 
;  /** don't close standard files **/ 
;	if ((fp_==stdin)|(fp_==stdout)|(fp_==stderr)) return NULL; 
	LEA  BX, [AutoC817+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	PUSH BX
	LEA  BX, [AutoC817+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	POP  DX
	CALL cceq
	POP  DX
	OR   BX, DX
	PUSH BX
	LEA  BX, [AutoC817+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +2
	POP  DX
	CALL cceq
	POP  DX
	OR   BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_818
	MOV  BX, +0
	ADD  SP, AutoC817
	POP  BP
	RET
;  /** convert fp_ index to CCB ptr, then call lower level **/ 
;	fptr = _iod[fp_]; 
L_818:
	LEA  BX, [AutoC817-2+BP]
	PUSH BX
	MOV  BX, cz_iod
	PUSH BX
	LEA  BX, [AutoC817+4+BP]
	MOV  BX, [BX]
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;	result = OS_fc(fptr); 
	LEA  BX, [AutoC817-4+BP]
	PUSH BX
	LEA  BX, [AutoC817-2+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czOS_fc
	ADD  SP, +2
	POP  DI
	MOV  Word [DI], BX
;	if (VERBOSE) 
	MOV  BX, +1
	OR   BX, BX
	JNZ  $+5
	JMP  L_819
;		{ 
;		if (result == NULL) 
	LEA  BX, [AutoC817-4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_820
;			{ 
;			putstr ("fclose result reports null, success.$"); 
	MOV  BX, L_817+0
	PUSH BX
	CALL czputstr
	ADD  SP, +2
;			NLfn(); 
	CALL czNLfn
;			} 
;		else	{ 
	JMP  L_821
L_820:
;			putstr ("fclose result reports not null, fail.$"); 
	MOV  BX, L_817+38
	PUSH BX
	CALL czputstr
	ADD  SP, +2
;			NLfn();outdeci(fp_);NLfn(); 
	CALL czNLfn
	LEA  BX, [AutoC817+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czoutdeci
	ADD  SP, +2
	CALL czNLfn
;			} 
L_821:
;		} 
;	return result; 
L_819:
	LEA  BX, [AutoC817-4+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC817
	POP  BP
	RET
;} 

AutoC817	EQU 4
;	czfp_	VAR	INT	+4
;	czfptr	PTR	INT	-2
;	czresult	VAR	INT	-4

	  [SECTION .dseg]
L_817	DB "fclose result reports null, success.$",0
	DB "fclose result reports not null, fail.$",0

	  [SECTION .cseg]
; 
;/***-----------------------------------------------***/ 
;/** File Close 16 | Req'd to update dir info. DS:DX **/ 
;/** := Close FCB, AL:=0 means ok, AL:=FFh means     **/ 
;/** error. (BAD).                                   **/ 
;/** at exit FCB must appear as unopened, clear FMODE */ 
;/**  FSTATE **/ 
; 
;OS_fc(ufdesc) char ufdesc[]; /** User File Descriptor*/ 
czOS_fc:
	PUSH BP
	SUB  SP, AutoC822
	MOV  BP, SP

;{ 
;	int result,cnt,idx; 
;	char stflg; 
; 
;  /** note default open read is STATE_FO **/ 
;  /** A Read changes FCB Block Values to current block **/ 
;  /** check for pending write before closing **/ 
;	stflg = ufdesc[FSTATE]; 
	LEA  BX, [AutoC822-7+BP]
	PUSH BX
	LEA  BX, [AutoC822+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +41
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
; 
;	if (stflg == STATE_PW) flushf(ufdesc); 
	LEA  BX, [AutoC822-7+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +4
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_823
	LEA  BX, [AutoC822+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czflushf
	ADD  SP, +2
;  /** ok, close. **/ 
;  /** successful close returns AL:=0, else FFh err  **/ 
;	result = OSfn_(CLOSE, ufdesc); 
L_823:
	LEA  BX, [AutoC822-2+BP]
	PUSH BX
	MOV  BX, +16
	PUSH BX
	LEA  BX, [AutoC822+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czOSfn_
	ADD  SP, +4
	POP  DI
	MOV  Word [DI], BX
;	if (result == NULL) 
	LEA  BX, [AutoC822-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_824
;		{ 
;		putstr ("OS_fc result reports null, success.$"); 
	MOV  BX, L_822+0
	PUSH BX
	CALL czputstr
	ADD  SP, +2
;		NLfn(); 
	CALL czNLfn
;		} 
;	else	{ 
	JMP  L_825
L_824:
;		putstr ("OS_fc result reports non-null, error.$"); 
	MOV  BX, L_822+37
	PUSH BX
	CALL czputstr
	ADD  SP, +2
;		NLfn(); 
	CALL czNLfn
;		} 
L_825:
;  /** Clear CCB, Free FMODE, FSTATE, fn **/ 
; 
;	ufdesc[FMODE] = 0; 
	LEA  BX, [AutoC822+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +38
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Byte [DI], BL
;	ufdesc[FSTATE] = ufdesc[DRV] = 0; 
	LEA  BX, [AutoC822+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +41
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC822+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Byte [DI], BL
	POP  DI
	MOV  Byte [DI], BL
;/***	cnt = 171; idx = 0; while (cnt--) { ufdesc[idx++] = 0; } **/ 
;  /** Return reported result, note we clear CCB to **/ 
;  /** new, even on error. **/ 
;	if (result == BAD) return BAD; 
	LEA  BX, [AutoC822-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	NEG  BX
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_826
	MOV  BX, +1
	NEG  BX
	ADD  SP, AutoC822
	POP  BP
	RET
;	else return NULL; 
	JMP  L_827
L_826:
	MOV  BX, +0
	ADD  SP, AutoC822
	POP  BP
	RET
L_827:
;} 
	ADD  SP, AutoC822
	POP  BP
	RET

AutoC822	EQU 7
;	czufdesc	PTR	CHAR	+4
;	czresult	VAR	INT	-2
;	czcnt	VAR	INT	-4
;	czidx	VAR	INT	-6
;	czstflg	VAR	CHAR	-7

	  [SECTION .dseg]
L_822	DB "OS_fc result reports null, success.$",0
	DB "OS_fc result reports non-null, error.$",0

	  [SECTION .cseg]
; 
;/***--- Write Record according to current blk/rec  ***/ 
;/***--- settings in fcb                            ***/ 
;wr_rec() 
czwr_rec:
	PUSH BP
	SUB  SP, AutoC828
	MOV  BP, SP

;{ 
;} 
	POP  BP
	RET

AutoC828	EQU 0
; 
;/***-----------------------------------------------***/ 
;/** int getc(FILE *fp); ret`nxtchr`ok .else. EOF    **/ 
;/**  init is fp_ index into _iob                    **/ 
; 
;getc(unit) int unit; 
czgetc:
	PUSH BP
	SUB  SP, AutoC829
	MOV  BP, SP

;{ 
;	int ichr; 
;  /** fetch ascii character from file and return it **/ 
;	ichr = rd_ubuff(unit); 
	LEA  BX, [AutoC829-2+BP]
	PUSH BX
	LEA  BX, [AutoC829+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czrd_ubuff
	ADD  SP, +2
	POP  DI
	MOV  Word [DI], BX
;	if (ichr == EOF) return (EOF); 
	LEA  BX, [AutoC829-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	NEG  BX
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_830
	MOV  BX, +1
	NEG  BX
	ADD  SP, AutoC829
	POP  BP
	RET
;	return (ichr & 127); 
L_830:
	LEA  BX, [AutoC829-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +127
	POP  DX
	AND  BX, DX
	ADD  SP, AutoC829
	POP  BP
	RET
;} 

AutoC829	EQU 2
;	czunit	VAR	INT	+4
;	czichr	VAR	INT	-2
;/***-----------------------------------------------***/ 
;/** int puts(char *string); ret`0`ok .else. `NZ`err **/ 
;/**  takes a pointer value to target string, decom- **/ 
;/**  pose targets' characters and pass each one to  **/ 
;/**  putc() until NULL in string. CONOUT.           **/ 
; 
;/***-----------------------------------------------***/ 
;/** int fputs(char *string, FILE *fp);             ***/ 
;/**  ret`0`ok .else. `NZ`err                        **/ 
;/**  takes a pointer value to target string, decom- **/ 
;/**  pose targets' characters and pass each one to  **/ 
;/**  putc() until NULL in string.  Does not append  **/ 
;/**  the new-line character to the end of the string**/ 
;/** Target string is C string, null terminated.     **/ 
; 
;fputs(str,fp_) char str[]; int fp_; 
czfputs:
	PUSH BP
	SUB  SP, AutoC831
	MOV  BP, SP

;{ 
;	char chr; int i; 
; 
;	i=0; chr = str[0]; 
	LEA  BX, [AutoC831-3+BP]
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Word [DI], BX
	LEA  BX, [AutoC831-1+BP]
	PUSH BX
	LEA  BX, [AutoC831+6+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
;	if (chr == 0) return BAD; 
	LEA  BX, [AutoC831-1+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_832
	MOV  BX, +1
	NEG  BX
	ADD  SP, AutoC831
	POP  BP
	RET
;	while (chr) 
L_832:
L_833:
	LEA  BX, [AutoC831-1+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	OR   BX, BX
	JNZ  $+5
	JMP  L_834
;		{ 
;		putc(chr,fp_); 
	LEA  BX, [AutoC831-1+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	LEA  BX, [AutoC831+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czputc
	ADD  SP, +4
;		chr = str[++i]; /** read chr from ds:str **/ 
	LEA  BX, [AutoC831-1+BP]
	PUSH BX
	LEA  BX, [AutoC831+6+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC831-3+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
;		} 
	JMP  L_833
L_834:
;} 
	ADD  SP, AutoC831
	POP  BP
	RET

AutoC831	EQU 3
;	czstr	PTR	CHAR	+6
;	czfp_	VAR	INT	+4
;	czchr	VAR	CHAR	-1
;	czi	VAR	INT	-3
; 
;/***-----------------------------------------------***/ 
;/** int putc(int chr,FILE *fp); ret`chr`ok .else. EOF*/ 
;/** note: only retun EOF on File Error, ret null or **/ 
;/** chr only.  (echo back chr means success)		*/ 
;/** _get ptr to CCB; //DTA is CCB[FBUFFER]; putc to **/ 
;/**  //[FBUFFER]+[FBUFNDX];                         **/ 
;/** _get FBUFNDX,				    **/ 
;/** .if. == 0, set FSTATE == STATE_PW		    **/ 
;/** .if. == 128, flush buffer to file, set FBUFNDX==0*/ 
;/**      set FSTATE == STATE_DT;		    **/ 
;/** .else. place chr to FBUFNDX and incr FBUFNDX    **/ 
;/** NOTE: small-c will close outfile if putc rets<=0**/ 
; 
;putc(chr,fp_) char chr; int fp_; 
czputc:
	PUSH BP
	SUB  SP, AutoC835
	MOV  BP, SP

;{ 
;	int *fptr, i, index; 
;	char fbuf[], byteret, *pccb; 
;  /** First off, test for printable character passed **/ 
;  /**  isnprint returns 1 if not printable           **/ 
;  /**	if (isnprint(chr)) return (BAD);	**/ 
; 
;  /** convert fp_ index to CCB ptr **/ 
;	pccb = _iod[fp_]; /** log address of CCB fcb **/ 
	LEA  BX, [AutoC835-11+BP]
	PUSH BX
	MOV  BX, cz_iod
	PUSH BX
	LEA  BX, [AutoC835+4+BP]
	MOV  BX, [BX]
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;	fbuf = &pccb[FBUFFER]; /** get buffer location **/ 
	LEA  BX, [AutoC835-8+BP]
	PUSH BX
	LEA  BX, [AutoC835-11+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +44
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
;	setdta(fbuf); /** indicate current DTA for write **/ 
	LEA  BX, [AutoC835-8+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czsetdta
	ADD  SP, +2
;	index = pccb[FBUFNDX]; 
	LEA  BX, [AutoC835-6+BP]
	PUSH BX
	LEA  BX, [AutoC835-11+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +42
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Word [DI], BX
; 
;  /** put char to buffer **/ 
;	fbuf = &pccb[FBUFFER]; /** get buffer location **/ 
	LEA  BX, [AutoC835-8+BP]
	PUSH BX
	LEA  BX, [AutoC835-11+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +44
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
;	fbuf = fbuf + index; /** base + index **/ 
	LEA  BX, [AutoC835-8+BP]
	PUSH BX
	LEA  BX, [AutoC835-8+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC835-6+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
;	*fbuf = chr; /** chr placed into current buffer **/ 
	LEA  BX, [AutoC835-8+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC835+6+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Byte [DI], BL
; 
;	if (index == 0) pccb[FSTATE] = STATE_PW; 
	LEA  BX, [AutoC835-6+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_836
	LEA  BX, [AutoC835-11+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +41
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +4
	POP  DI
	MOV  Byte [DI], BL
; 
;  /** ck if index is maxed, if so wr buffer and reset index **/ 
;	if (index == 127) /** maxed, signed byte compare **/ 
L_836:
	LEA  BX, [AutoC835-6+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +127
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_837
;		{ /** flushf full buffer **/ 
;		byteret = flushf(pccb); 
	LEA  BX, [AutoC835-9+BP]
	PUSH BX
	LEA  BX, [AutoC835-11+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czflushf
	ADD  SP, +2
	POP  DI
	MOV  Byte [DI], BL
;		if (byteret)  /** 0`ok .else. err **/ 
	LEA  BX, [AutoC835-9+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	OR   BX, BX
	JNZ  $+5
	JMP  L_838
;			{ /** error state **/ 
;			pccb[FSTATE] = STATE_ER; 
	LEA  BX, [AutoC835-11+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +41
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +1
	NEG  BX
	POP  DI
	MOV  Byte [DI], BL
;			return BAD; 
	MOV  BX, +1
	NEG  BX
	ADD  SP, AutoC835
	POP  BP
	RET
;			} 
;		else	{ /** flushed ok, purge buff upd index **/ 
	JMP  L_839
L_838:
;			fbuf = &pccb[FBUFFER]; /** reset to begin **/ 
	LEA  BX, [AutoC835-8+BP]
	PUSH BX
	LEA  BX, [AutoC835-11+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +44
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
;		 /** fill buffer with CTRLZ, EOF **/ 
;			i=127; 
	LEA  BX, [AutoC835-4+BP]
	PUSH BX
	MOV  BX, +127
	POP  DI
	MOV  Word [DI], BX
;			while (i) fbuf[i--] = CTRLZ; 
L_840:
	LEA  BX, [AutoC835-4+BP]
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_841
	LEA  BX, [AutoC835-8+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC835-4+BP]
	PUSH BX
	MOV  BX, [BX]
	DEC  BX
	POP  DI
	MOV  Word [DI], BX
	INC  BX
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +26
	POP  DI
	MOV  Byte [DI], BL
	JMP  L_840
L_841:
;			fbuf[i] = CTRLZ; /** position index 0 **/ 
	LEA  BX, [AutoC835-8+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC835-4+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +26
	POP  DI
	MOV  Byte [DI], BL
;			pccb[FSTATE] = STATE_DT; /** Closeable State **/ 
	LEA  BX, [AutoC835-11+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +41
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +2
	POP  DI
	MOV  Byte [DI], BL
;			pccb[FBUFNDX] = 0; /** reset for next chr **/ 
	LEA  BX, [AutoC835-11+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +42
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Byte [DI], BL
;			return (chr); 
	LEA  BX, [AutoC835+6+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	ADD  SP, AutoC835
	POP  BP
	RET
;			} 
L_839:
;		} /** sector written, chr or err has been returned **/ 
; 
;  /** update index return chr placed -echo- **/  
;  /**	pccb[FBUFNDX]++; ??questionable	**/ 
;	index++; 
L_837:
	LEA  BX, [AutoC835-6+BP]
	PUSH BX
	MOV  BX, [BX]
	INC  BX
	POP  DI
	MOV  Word [DI], BX
	DEC  BX
;	pccb[FBUFNDX] = index; 
	LEA  BX, [AutoC835-11+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +42
	POP  DX
	ADD  BX, DX
	PUSH BX
	LEA  BX, [AutoC835-6+BP]
	MOV  BX, [BX]
	POP  DI
	MOV  Byte [DI], BL
;	return (chr); 
	LEA  BX, [AutoC835+6+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	ADD  SP, AutoC835
	POP  BP
	RET
;} 

AutoC835	EQU 11
;	czchr	VAR	CHAR	+6
;	czfp_	VAR	INT	+4
;	czfptr	PTR	INT	-2
;	czi	VAR	INT	-4
;	czindex	VAR	INT	-6
;	czfbuf	PTR	CHAR	-8
;	czbyteret	VAR	CHAR	-9
;	czpccb	PTR	CHAR	-11
; 
;/***-----------------------------------------------***/ 
;/*** set to spaces the fcb filename,typ		---***/ 
; 
;clearfcb(fcb) char fcb[]; 
czclearfcb:
	PUSH BP
	SUB  SP, AutoC842
	MOV  BP, SP

;{ 
;	int i; 
;	i=11; 
	LEA  BX, [AutoC842-2+BP]
	PUSH BX
	MOV  BX, +11
	POP  DI
	MOV  Word [DI], BX
;	while (i) fcb[i--] = ' '; 
L_843:
	LEA  BX, [AutoC842-2+BP]
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_844
	LEA  BX, [AutoC842+4+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC842-2+BP]
	PUSH BX
	MOV  BX, [BX]
	DEC  BX
	POP  DI
	MOV  Word [DI], BX
	INC  BX
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +32
	POP  DI
	MOV  Byte [DI], BL
	JMP  L_843
L_844:
;} 
	ADD  SP, AutoC842
	POP  BP
	RET

AutoC842	EQU 2
;	czfcb	PTR	CHAR	+4
;	czi	VAR	INT	-2
; 
;/***-----------------------------------------------***/ 
; 
;/***-----------------------------------------------***/ 
;/** Directory First Search 17**/ 
; 
;/***-----------------------------------------------***/ 
;/** Directory Subsequent Search 18 **/ 
; 
;/***-----------------------------------------------***/ 
;/** File Delete 19 **/ 
; 
;/***-----------------------------------------------***/ 
;/** File Sequential Read 20 | On Entry, DS:DX:=FCB **/ 
;/** The 128 byte record indicated by Current Block **/ 
;/** of 16k, and Current Record Fields, is loaded to**/ 
;/** the Disk Transfer Area, DTA, then the record   **/ 
;/** addressed by those fields is incremented. IF EOF*/ 
;/** THEN AL:=1, ELSE AL:=0.                        **/  
; 
;OS_sr(ufcb) char ufcb[]; 
czOS_sr:
	PUSH BP
	SUB  SP, AutoC845
	MOV  BP, SP

;{ 
;	int byte_result; 
; 
;	byte_result = OSfn_(SEQREAD,ufcb); 
	LEA  BX, [AutoC845-2+BP]
	PUSH BX
	MOV  BX, +20
	PUSH BX
	LEA  BX, [AutoC845+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czOSfn_
	ADD  SP, +4
	POP  DI
	MOV  Word [DI], BX
;	if (byte_result) return (EOF); 
	LEA  BX, [AutoC845-2+BP]
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_846
	MOV  BX, +1
	NEG  BX
	ADD  SP, AutoC845
	POP  BP
	RET
;	else return (0); 
	JMP  L_847
L_846:
	MOV  BX, +0
	ADD  SP, AutoC845
	POP  BP
	RET
L_847:
;} 
	ADD  SP, AutoC845
	POP  BP
	RET

AutoC845	EQU 2
;	czufcb	PTR	CHAR	+4
;	czbyte_result	VAR	INT	-2
; 
;/***-----------------------------------------------***/ 
;/** rd_ubuff(int fp) read unit buffer, if last chr  **/ 
;/**  re index and fetch next file record.           **/ 
;/** Called by getc(fp_), so ret chr or EOF          **/ 
;/** Note: short sector files are null padded, catch **/ 
;/** partial buffer data.                            **/ 
;/** 30-Jul-08 05:08:51 PM. OS_sr returns 0 if ok,   **/ 
;/** .else. 1 if EOF. Fixed buffer clipping.         **/ 
; 
;rd_ubuff(fp_) int fp_; 
czrd_ubuff:
	PUSH BP
	SUB  SP, AutoC848
	MOV  BP, SP

;{	/** change fp_ index into _iod address **/ 
;	/** check _iod is read kind, else error **/ 
;	/** chr_ptr points to next_to_read **/ 
;	/** if chr_ptr == 0, ck STATE_EF for eof **/ 
;	/**  if EOF state return EOF **/ 
;	/** if chr_ptr == 127 retrieve chr, do seq **/ 
;	/** read to fill buffer, reindex chr_ptr =0 **/ 
;	/** if read_sq gives EOF, set state STATE_EF, **/ 
;	/** but return last chr to caller. **/ 
; 
;	int chr, index, result; 
;	char *p_ccb, *cdta, *cp; 
; 
;  /** Convert fp_ into addr of UFCB **/ 
;	p_ccb = _iod[fp_]; 
	LEA  BX, [AutoC848-8+BP]
	PUSH BX
	MOV  BX, cz_iod
	PUSH BX
	LEA  BX, [AutoC848+4+BP]
	MOV  BX, [BX]
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
; 
;  /** Also need to manage DTA for UFCB **/ 
;	cdta = &p_ccb[FBUFFER]; 
	LEA  BX, [AutoC848-10+BP]
	PUSH BX
	LEA  BX, [AutoC848-8+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +44
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
;	cp = cdta; 
	LEA  BX, [AutoC848-12+BP]
	PUSH BX
	LEA  BX, [AutoC848-10+BP]
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;	setdta(cdta); 
	LEA  BX, [AutoC848-10+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czsetdta
	ADD  SP, +2
; 
;  /** check _iod is read kind, else error **/ 
;	if (p_ccb[FMODE] != 'r') 
	LEA  BX, [AutoC848-8+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +38
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +114
	POP  DX
	CALL ccne
	OR   BX, BX
	JNZ  $+5
	JMP  L_849
;		{ /** mode error **/ 
;		putstr("File Mode Error, not opened for Reading$"); 
	MOV  BX, L_848+0
	PUSH BX
	CALL czputstr
	ADD  SP, +2
;		NLfn(); return (EOF); 
	CALL czNLfn
	MOV  BX, +1
	NEG  BX
	ADD  SP, AutoC848
	POP  BP
	RET
;		} 
;	if ((p_ccb[FSTATE] == STATE_EF) & (p_ccb[FBUFNDX] == 127)) 
L_849:
	LEA  BX, [AutoC848-8+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +41
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +8
	POP  DX
	CALL cceq
	PUSH BX
	LEA  BX, [AutoC848-8+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +42
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +127
	POP  DX
	CALL cceq
	POP  DX
	AND  BX, DX
	OR   BX, BX
	JNZ  $+5
	JMP  L_850
;		{  /** last low level read returned eof **/ 
;		putstr("-= End of File Reached =- $"); 
	MOV  BX, L_848+41
	PUSH BX
	CALL czputstr
	ADD  SP, +2
;		NLfn(); return (EOF); 
	CALL czNLfn
	MOV  BX, +1
	NEG  BX
	ADD  SP, AutoC848
	POP  BP
	RET
;		} 
;  /** fetch ascii character from file buffer and hold it **/   
;	index = p_ccb[FBUFNDX]; 
L_850:
	LEA  BX, [AutoC848-4+BP]
	PUSH BX
	LEA  BX, [AutoC848-8+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +42
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Word [DI], BX
;	cp = cp + index;  /** base + index to chr in buffer **/ 
	LEA  BX, [AutoC848-12+BP]
	PUSH BX
	LEA  BX, [AutoC848-12+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC848-4+BP]
	MOV  BX, [BX]
	POP  DX
	ADD  BX, DX
	POP  DI
	MOV  Word [DI], BX
;	chr = *cp;		/** FBUFNDX points to next, got chr **/ 
	LEA  BX, [AutoC848-2+BP]
	PUSH BX
	LEA  BX, [AutoC848-12+BP]
	MOV  BX, [BX]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	POP  DI
	MOV  Word [DI], BX
;  /** change null to sp ' ' char, these are text files only. **/ 
;	if (chr == NULL) chr = ' '; 
	LEA  BX, [AutoC848-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +0
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_851
	LEA  BX, [AutoC848-2+BP]
	PUSH BX
	MOV  BX, +32
	POP  DI
	MOV  Word [DI], BX
;  /** !! Convert eol 0Dh,0Ah to 20h,0Ah for small-c parser. !! **/ 
;	if (chr == 13) chr = ' '; 
L_851:
	LEA  BX, [AutoC848-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +13
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_852
	LEA  BX, [AutoC848-2+BP]
	PUSH BX
	MOV  BX, +32
	POP  DI
	MOV  Word [DI], BX
; 
;  /** Warning: an unprimed buffer could hold nulls, handle this **/ 
;  /** by priming buffer on fopen(fp_,'r') for reading.          **/ 
;  /** Still, should check here for ^Z, eof, marker and ret EOF. **/ 
;  /** But NO, file can be exact byte length without terminators.**/ 
; 
;  /** ck if index is maxed, if so rd buffer and reset index **/ 
;	if (index == 127)      /** maxed, signed byte compare **/ 
L_852:
	LEA  BX, [AutoC848-4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +127
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_853
;		{  /** eo buffer read, fetch next from seq read **/ 
;		result = OS_sr(p_ccb); 
	LEA  BX, [AutoC848-6+BP]
	PUSH BX
	LEA  BX, [AutoC848-8+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czOS_sr
	ADD  SP, +2
	POP  DI
	MOV  Word [DI], BX
;		if (result) 
	LEA  BX, [AutoC848-6+BP]
	MOV  BX, [BX]
	OR   BX, BX
	JNZ  $+5
	JMP  L_854
;			{  /** true if EOF, else null returned **/ 
;			p_ccb[FSTATE] = STATE_EF; 
	LEA  BX, [AutoC848-8+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +41
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +8
	POP  DI
	MOV  Byte [DI], BL
;			p_ccb[FBUFNDX] = 0; 
	LEA  BX, [AutoC848-8+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +42
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Byte [DI], BL
;			return (chr); 
	LEA  BX, [AutoC848-2+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC848
	POP  BP
	RET
;			} 
;		else  { 
	JMP  L_855
L_854:
;			p_ccb[FBUFNDX] = 0; 
	LEA  BX, [AutoC848-8+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +42
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +0
	POP  DI
	MOV  Byte [DI], BL
;			p_ccb[FSTATE] = STATE_DT; 
	LEA  BX, [AutoC848-8+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +41
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +2
	POP  DI
	MOV  Byte [DI], BL
;			return (chr); /** added to fix clipping **/ 
	LEA  BX, [AutoC848-2+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC848
	POP  BP
	RET
;			} 
L_855:
;		} 
;	p_ccb[FBUFNDX]++; /** update for next chr fetch from buffer **/ 
L_853:
	LEA  BX, [AutoC848-8+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +42
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	INC  BX
	POP  DI
	MOV  Byte [DI], BL
	DEC  BX
;	return (chr); 
	LEA  BX, [AutoC848-2+BP]
	MOV  BX, [BX]
	ADD  SP, AutoC848
	POP  BP
	RET
;} 

AutoC848	EQU 12
;	czfp_	VAR	INT	+4
;	czchr	VAR	INT	-2
;	czindex	VAR	INT	-4
;	czresult	VAR	INT	-6
;	czp_ccb	PTR	CHAR	-8
;	czcdta	PTR	CHAR	-10
;	czcp	PTR	CHAR	-12

	  [SECTION .dseg]
L_848	DB "File Mode Error, not opened for Reading$",0
	DB "-= End of File Reached =- $",0

	  [SECTION .cseg]
; 
;/***-----------------------------------------------***/ 
;/** File Sequential Write 21 | On Entry, DS:DX:=FCB **/ 
;/** The 128 byte record indicated by Current Block  **/ 
;/** of 16k, and Current Record Fields, is written   **/ 
;/** from the Disk Transfer Area, DTA, to the file   **/ 
;/** then the record address is incremented. IF the  **/ 
;/** disk is too full, AL:=1, ELSE AL:=0.            **/ 
;/**	=	=	=	=	=	=   **/ 
;/*** write buffer, 80h long, to file sequentially. ***/ 
;/***  file fp_ must select open file. DTA must be  ***/ 
;/***  current to proper fp_.                       ***/ 
;/***  calls OSfn_ 21d Sequential Write, which rets ***/ 
;/*** al`0`ok .else. al`1`'disk full error'         ***/ 
;/***  flushf() rets`0`ok .else. `BAD`error         ***/ 
;/***-----------------------------------------------***/ 
; 
;flushf(pccb) char *pccb; 
czflushf:
	PUSH BP
	SUB  SP, AutoC856
	MOV  BP, SP

;{ 
;	char byte_result; 
;	if (pccb[FSTATE] == STATE_PW) 
	LEA  BX, [AutoC856+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +41
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, +4
	POP  DX
	CALL cceq
	OR   BX, BX
	JNZ  $+5
	JMP  L_857
;		{ 
;		byte_result = OSfn_(SEQWRITE,pccb); 
	LEA  BX, [AutoC856-1+BP]
	PUSH BX
	MOV  BX, +21
	PUSH BX
	LEA  BX, [AutoC856+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czOSfn_
	ADD  SP, +4
	POP  DI
	MOV  Byte [DI], BL
;		if (byte_result) /** indicates err **/ 
	LEA  BX, [AutoC856-1+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	OR   BX, BX
	JNZ  $+5
	JMP  L_858
;			{ 
;			pccb[FSTATE] = STATE_ER; 
	LEA  BX, [AutoC856+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +41
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +1
	NEG  BX
	POP  DI
	MOV  Byte [DI], BL
;			return (BAD); 
	MOV  BX, +1
	NEG  BX
	ADD  SP, AutoC856
	POP  BP
	RET
;			} 
;		pccb[FSTATE] = STATE_FO; /** mark as file open **/ 
L_858:
	LEA  BX, [AutoC856+4+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +41
	POP  DX
	ADD  BX, DX
	PUSH BX
	MOV  BX, +1
	POP  DI
	MOV  Byte [DI], BL
;		return byte_result; 
	LEA  BX, [AutoC856-1+BP]
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	ADD  SP, AutoC856
	POP  BP
	RET
;		} 
;	else return (BAD); /** no pending write state **/ 
	JMP  L_859
L_857:
	MOV  BX, +1
	NEG  BX
	ADD  SP, AutoC856
	POP  BP
	RET
L_859:
;} 
	ADD  SP, AutoC856
	POP  BP
	RET

AutoC856	EQU 1
;	czpccb	PTR	CHAR	+4
;	czbyte_result	VAR	CHAR	-1
; 
;/***-----------------------------------------------***/ 
;/** File Create 22 Rets: FFh if no dir space else   **/ 
;/**  null == successful create                      **/ 
; 
;creatf(ufcb) char *ufcb; 
czcreatf:
	PUSH BP
	SUB  SP, AutoC860
	MOV  BP, SP

;{ 
;	OSfn_(CREATE, ufcb); 
	MOV  BX, +22
	PUSH BX
	LEA  BX, [AutoC860+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czOSfn_
	ADD  SP, +4
;} 
	POP  BP
	RET

AutoC860	EQU 0
;	czufcb	PTR	CHAR	+4
; 
;/***-----------------------------------------------***/ 
;/** ReName File 23 **/ 
;OS_rn() 
czOS_rn:
	PUSH BP
	SUB  SP, AutoC861
	MOV  BP, SP

;{ 
;} 
	POP  BP
	RET

AutoC861	EQU 0
;/***-----------------------------------------------***/ 
;/** non-existent fn# 24 **/ 
;/***-----------------------------------------------***/ 
;/** Current Default Drive 25, 0`A,1`B,etc. **/ 
; 
;/***-----------------------------------------------***/ 
;/** Set Disk Transfer Addr 26 **/ 
;setdta(dta) int *dta; 
czsetdta:
	PUSH BP
	SUB  SP, AutoC862
	MOV  BP, SP

;{  /**  !MUST! Set DTA address prior to File I/O **/ 
;	OSfn_(26,dta); /** Fn Set DTA -> DS:DX **/ 
	MOV  BX, +26
	PUSH BX
	LEA  BX, [AutoC862+4+BP]
	MOV  BX, [BX]
	PUSH BX
	CALL czOSfn_
	ADD  SP, +4
;} 
	POP  BP
	RET

AutoC862	EQU 0
;	czdta	PTR	INT	+4
;/***-----------------------------------------------***/ 
;/** Allocation Table Addr 27 ret: DS:BX, DX := # of..*/ 
;/**  alloc units, AL := # rec per Alloc Unit.       **/ 
;/***-----------------------------------------------***/ 
;/** non-existent fn# 28, 29, 30 **/ 
;/***-----------------------------------------------***/ 
;/** Get Disk Parameter Address 31 ret: DS:BX table  **/ 
;/**  of params for current default disk **/ 
;/***-----------------------------------------------***/ 
;/** non-existent fn# 32 **/ 
;/***-----------------------------------------------***/ 
;/** File Random Read 33 **/ 
;/***-----------------------------------------------***/ 
;/** File Random Write 34 **/ 
;/***-----------------------------------------------***/ 
;/** File Size 35 **/ 
;/***-----------------------------------------------***/ 
;/** File Set Random Record Field 36 **/ 
;/***-----------------------------------------------***/ 
;/** Interrupt Set Vector 37 **/ 
;/***-----------------------------------------------***/ 
;/** Alloc, Create New Program Segment 38 **/ 
;/***-----------------------------------------------***/ 
;/** File Random Block Read 39 **/ 
;/***-----------------------------------------------***/ 
;/** Random Block Write **/ 
; 
;/***-----------------------------------------------***/ 
;/** initialize the fcb structure fields at main    ***/ 
; 
;initfcb() 
czinitfcb:
	PUSH BP
	SUB  SP, AutoC863
	MOV  BP, SP

;{	char *cptr, *p_stdin, *p_stdout, *p_stderr; 
;	char *p_infile, *p_outfile, *p_tempfile; 
;	int  cnt; 
; 
;	p_stdin    = "STDIN   IOB"; /** null term.. **/ 
	LEA  BX, [AutoC863-4+BP]
	PUSH BX
	MOV  BX, L_863+0
	POP  DI
	MOV  Word [DI], BX
;	p_stdout   = "STDOUT  IOB"; /**  in dseg    **/ 
	LEA  BX, [AutoC863-6+BP]
	PUSH BX
	MOV  BX, L_863+12
	POP  DI
	MOV  Word [DI], BX
;	p_stderr   = "STDERR  IOB"; 
	LEA  BX, [AutoC863-8+BP]
	PUSH BX
	MOV  BX, L_863+24
	POP  DI
	MOV  Word [DI], BX
;	p_infile   = "INFILE  TXT"; 
	LEA  BX, [AutoC863-10+BP]
	PUSH BX
	MOV  BX, L_863+36
	POP  DI
	MOV  Word [DI], BX
;	p_outfile  = "OUTFILE TXT"; 
	LEA  BX, [AutoC863-12+BP]
	PUSH BX
	MOV  BX, L_863+48
	POP  DI
	MOV  Word [DI], BX
;	p_tempfile = "TEMP    TXT"; 
	LEA  BX, [AutoC863-14+BP]
	PUSH BX
	MOV  BX, L_863+60
	POP  DI
	MOV  Word [DI], BX
;	; 
;	setdta(fdta); /** default catch basin **/ 
	MOV  BX, czfdta
	PUSH BX
	CALL czsetdta
	ADD  SP, +2
; 
;  /** setup _iod[] with addr of f_units **/ 
;  /**	_iod[0] = &f_unit0; 
;	_iod[1] = &f_unit1; 
;	_iod[2] = &f_unit2; 
;	_iod[3] = &f_unit3; 
;	_iod[4] = &f_unit4; 
;	_iod[5] = &f_unit5;  **/ 
;  /*** chged to inline asm  ***/ 
;#asm 
  	MOV  BX, cz_iod 
	PUSH BX 
	MOV  BX, czf_unit0 
	POP  DI 
	MOV  Word [DI], BX 
  	MOV  BX, cz_iod + 2 
	PUSH BX 
	MOV  BX, czf_unit1 
	POP  DI 
	MOV  Word [DI], BX 
  	MOV  BX, cz_iod + 4 
	PUSH BX 
	MOV  BX, czf_unit2 
	POP  DI 
	MOV  Word [DI], BX 
  	MOV  BX, cz_iod + 6 
	PUSH BX 
	MOV  BX, czf_unit3 
	POP  DI 
	MOV  Word [DI], BX 
  	MOV  BX, cz_iod + 8 
	PUSH BX 
	MOV  BX, czf_unit4 
	POP  DI 
	MOV  Word [DI], BX 
  	MOV  BX, cz_iod + 10 
	PUSH BX 
	MOV  BX, czf_unit5 
	POP  DI 
	MOV  Word [DI], BX 
;#endasm ; 
;  /** copy char const to each f_unit **/ 
;  /***  Also, **/ 
;  /** mark stdin as R, stdout, stderr as W in fmode **/ 
;  /** mark infile, outfile, temp as 'N'ull for now. **/ 
;  /**  open these 3 default files in main if desired**/ 
; 
;	cptr = _iod[0]; 
	LEA  BX, [AutoC863-2+BP]
	PUSH BX
	MOV  BX, cz_iod
	PUSH BX
	MOV  BX, +0
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;	*cptr[FMODE] = "r"; 
	LEA  BX, [AutoC863-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +38
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, L_863+72
	POP  DI
	MOV  Word [DI], BX
;	copystr(p_stdin, cptr+1); 
	LEA  BX, [AutoC863-4+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC863-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	POP  DX
	ADD  BX, DX
	PUSH BX
	CALL czcopystr
	ADD  SP, +4
; 
;	cptr = _iod[1]; 
	LEA  BX, [AutoC863-2+BP]
	PUSH BX
	MOV  BX, cz_iod
	PUSH BX
	MOV  BX, +1
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;	*cptr[FMODE] = "w"; 
	LEA  BX, [AutoC863-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +38
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, L_863+74
	POP  DI
	MOV  Word [DI], BX
;	copystr(p_stdout, cptr+1); 
	LEA  BX, [AutoC863-6+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC863-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	POP  DX
	ADD  BX, DX
	PUSH BX
	CALL czcopystr
	ADD  SP, +4
; 
;	cptr = _iod[2]; 
	LEA  BX, [AutoC863-2+BP]
	PUSH BX
	MOV  BX, cz_iod
	PUSH BX
	MOV  BX, +2
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;	*cptr[FMODE] = "w"; 
	LEA  BX, [AutoC863-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +38
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, L_863+76
	POP  DI
	MOV  Word [DI], BX
;	copystr(p_stderr, cptr+1); 
	LEA  BX, [AutoC863-8+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC863-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	POP  DX
	ADD  BX, DX
	PUSH BX
	CALL czcopystr
	ADD  SP, +4
; 
;	cptr = _iod[3]; 
	LEA  BX, [AutoC863-2+BP]
	PUSH BX
	MOV  BX, cz_iod
	PUSH BX
	MOV  BX, +3
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;	*cptr[FMODE] = "n"; 
	LEA  BX, [AutoC863-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +38
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, L_863+78
	POP  DI
	MOV  Word [DI], BX
;	copystr(p_infile, cptr+1); 
	LEA  BX, [AutoC863-10+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC863-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	POP  DX
	ADD  BX, DX
	PUSH BX
	CALL czcopystr
	ADD  SP, +4
; 
;	cptr = _iod[4]; 
	LEA  BX, [AutoC863-2+BP]
	PUSH BX
	MOV  BX, cz_iod
	PUSH BX
	MOV  BX, +4
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;	*cptr[FMODE] = "n"; 
	LEA  BX, [AutoC863-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +38
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, L_863+80
	POP  DI
	MOV  Word [DI], BX
;	copystr(p_outfile, cptr+1); 
	LEA  BX, [AutoC863-12+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC863-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	POP  DX
	ADD  BX, DX
	PUSH BX
	CALL czcopystr
	ADD  SP, +4
; 
;	cptr = _iod[5]; 
	LEA  BX, [AutoC863-2+BP]
	PUSH BX
	MOV  BX, cz_iod
	PUSH BX
	MOV  BX, +5
	SAL  BX, 1
	POP  DX
	ADD  BX, DX
	MOV  BX, [BX]
	POP  DI
	MOV  Word [DI], BX
;	*cptr[FMODE] = "n"; 
	LEA  BX, [AutoC863-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +38
	POP  DX
	ADD  BX, DX
	MOV  AL, [BX]
	CBW
	MOV  BX, AX
	PUSH BX
	MOV  BX, L_863+82
	POP  DI
	MOV  Word [DI], BX
;	copystr(p_tempfile, cptr+1); 
	LEA  BX, [AutoC863-14+BP]
	MOV  BX, [BX]
	PUSH BX
	LEA  BX, [AutoC863-2+BP]
	MOV  BX, [BX]
	PUSH BX
	MOV  BX, +1
	POP  DX
	ADD  BX, DX
	PUSH BX
	CALL czcopystr
	ADD  SP, +4
; 
;  /*** otherwise, fields are init to null by nasm ***/ 
;} 
	ADD  SP, AutoC863
	POP  BP
	RET

AutoC863	EQU 16
;	czcptr	PTR	CHAR	-2
;	czp_stdin	PTR	CHAR	-4
;	czp_stdout	PTR	CHAR	-6
;	czp_stderr	PTR	CHAR	-8
;	czp_infile	PTR	CHAR	-10
;	czp_outfile	PTR	CHAR	-12
;	czp_tempfile	PTR	CHAR	-14
;	czcnt	VAR	INT	-16

	  [SECTION .dseg]
L_863	DB "STDIN   IOB",0
	DB "STDOUT  IOB",0
	DB "STDERR  IOB",0
	DB "INFILE  TXT",0
	DB "OUTFILE TXT",0
	DB "TEMP    TXT",0
	DB "r",0
	DB "w",0
	DB "w",0
	DB "n",0
	DB "n",0
	DB "n",0

	  [SECTION .cseg]
; 
; 
;/*****************************************************/ 
;/** Test OSfn_ Call 0005h Interface **/ 
;/*****************************************************/ 
;/* CP/M system call codes                            */ 
;/*     -also-                                        */ 
;/* pcDos .COM Call 5 Interface.                      */ 
; 
; #asm 
BDOS	EQU	5	;; call 5 INTERFACE as CALL BDOS. 
CTRLZ	EQU	26	;end-of-file mark for text files 
TBUFF	EQU	80H	;address of default I/O address 
;;/** OSfn_(Fn#,Value) -> tos 0[ret]2[Value]4[Fn#] **/ 
czOSfn_:  ;; small-c, top of stack[ret][Val][Fn] 
	pop  bx   ;; 
        pop  dx   ;; 
        pop  cx   ;; 
	push cx   ;; [Fn#] 
	push dx   ;; [Value] 
        push bx   ;; [ret]  
        call BDOS ;; values passed in registers. 
;; Test AL`CBW returned value... !Warning! must match with 
;; Primary, Secondary, Register method. If Prim`AX then 
;; CBW val into AX and RET.  If Prim`BX, then CBW, MOV BX,AX  
;; then RET. 
	cbw 
	MOV  BX,AX ;; for Prim`BC, Secd`DX. 
	RET       ;; Caller cleans the stack. 
czexit:  ;; pause for keypress before return. 
	mov  ah,0 
	int  16h  ;; RomBios wait for keypress. 
;;exit:		  ;; don't wait. 
	int  19h  ;; reboot-> enviornment gets control. 
	ret       ;; (actually, never executed) 
; #endasm ;/***-----------------------------------------------***/ 
;/***----------------MISC FNS-----------------------***/ 
;clrscreen() 
czclrscreen:
	PUSH BP
	SUB  SP, AutoC864
	MOV  BP, SP

;{ 
;	; 
;} 
	POP  BP
	RET

AutoC864	EQU 0
; 
;/*****************************************************/ 
;/*       1         2         3         4         5   */ 
;/***-----------------------------------------------***/ 
;/** EO C5LIBT.C **/ 
; 
; 
;        
; 
;/** EOF **/ 
;                                                

	  [SECTION .dseg]
czsymtab:	TIMES +5040	DB 0
czglbptr:	TIMES +1	DW 0
czlocptr:	TIMES +1	DW 0
czwq:	TIMES +100	DW 0
czwqptr:	TIMES +1	DW 0
czlitq:	TIMES +1000	DB 0
czlitptr:	TIMES +1	DW 0
czmacq:	TIMES +2176	DB 0
czmacptr:	TIMES +1	DW 0
czline:	TIMES +80	DB 0
czmline:	TIMES +80	DB 0
czlptr:	TIMES +1	DW 0
czmptr:	TIMES +1	DW 0
cznxtlab:	TIMES +1	DW 0
czlitlab:	TIMES +1	DW 0
czMsp:	TIMES +1	DW 0
czZsp:	TIMES +1	DW 0
czargstk:	TIMES +1	DW 0
czncmp:	TIMES +1	DW 0
czerrcnt:	TIMES +1	DW 0
czerrstop:	TIMES +1	DW 0
czeof:	TIMES +1	DW 0
czinput:	TIMES +1	DW 0
czoutput:	TIMES +1	DW 0
czinput2:	TIMES +1	DW 0
czglbflag:	TIMES +1	DW 0
czctext:	TIMES +1	DW 0
czcmode:	TIMES +1	DW 0
czlastst:	TIMES +1	DW 0
czmainflg:	TIMES +1	DW 0
czsaveout:	TIMES +1	DW 0
czfnstart:	TIMES +1	DW 0
czlineno:	TIMES +1	DW 0
czinfunc:	TIMES +1	DW 0
czsavestart:	TIMES +1	DW 0
czsaveline:	TIMES +1	DW 0
czsaveinfn:	TIMES +1	DW 0
czcurrfn:	TIMES +1	DW 0
czsavecurr:	TIMES +1	DW 0
czquote:	TIMES +2	DB 0
czcptr:	TIMES +1	DW 0
cziptr:	TIMES +1	DW 0
cz_iod:	TIMES +6	DW 0
czf_unit0:	TIMES +1	DB 0
czfdd_01:	TIMES +171	DB 0
czf_unit1:	TIMES +1	DB 0
czfdd_02:	TIMES +171	DB 0
czf_unit2:	TIMES +1	DB 0
czfdd_03:	TIMES +171	DB 0
czf_unit3:	TIMES +1	DB 0
czfdd_04:	TIMES +171	DB 0
czf_unit4:	TIMES +1	DB 0
czfdd_05:	TIMES +171	DB 0
czf_unit5:	TIMES +1	DB 0
czfdd_06:	TIMES +171	DB 0
czfdta:	TIMES +128	DB 0
cztbuff:	TIMES +257	DB 0
czubuff:	TIMES +257	DB 0
czcp:	TIMES +1	DW 0
czfop_result:	TIMES +1	DW 0

	  [SECTION .cseg]

	%INCLUDE 'EPILOG.NSM' 
; --- End of Compilation ---

8:19 PM 2/6/2010