ber, **lineptr;
{
	if ((**lineptr = (number >> 4) + '0') > '9') **lineptr += 7;
	if ((*++*lineptr = (number & 0xf) + '0') > '9') **lineptr += 7;
	++(*lineptr);
}

/*
Function to put a decimal number into an output line.
*/

putdec(number,lineptr)
unsigned number;
char **lineptr;
{
	if (number == 0) return;
	putdec(number/10,lineptr);
	*(*lineptr)++ = number % 10 + '0';
}
hxlnptr);
		fputs(hxlnbuf,hex);
	}
	hxbytes = 0;
	hxlnptr = hxlnbuf;
	*hxlnptr++ = ':';
	hxlnptr += 2;
	puthex4(loadaddr,&hxlnptr);
	puthex2(0,&hxlnptr);
	chksum = (loadaddr >> 8) + (loadaddr & 0xff);
}

/*
Function to put a 4-digit hex number into an output line.
*/

puthex4(number,lineptr)
unsigned number;
char **lineptr;
{
	puthex2(number>>8,lineptr);
	puthex2(number,lineptr);
}

/*
Function to put a 2-digit hex number into an output line.
*/

puthex2(number,lineptr)
char num/*
	1802 Cross-Assembler  v. 2.3

	May, 1980

	June, 1980 -- Rev. 2.1 consisting of fixing P errors that come
		from EQUing things to the pre-defined symbols, and adding
		the LOAD pseudo-op.

	July, 1980 -- Rev. 2.2 consisting of fixing the M errors that
		come from forward references in WORD and BYTE pseudo-ops.

	October, 1980 -- Rev. 2.3 consisting of modifying the assembly
		language routines and I/O routines to match and take
		advantage of BDS C V1.4.

	Copyright (c) 1980 William C. Colley, III.

File:	a18.h

Global macro substitutions and external variable declarations.
*/

/*  For the benefit of the library's I/O drivers:			*/

#include <bdscio.h>

/*  Set input line length:  */

#define	LINLEN	120

/*  Define disk buffer parameters:  */

#define	BUFSIZ	8	/*  Buffer size in sectors.			*/

/*  Define symbol table parameters:  */

#define	SYMLEN	8	/*  Length of labels (must be an even number).	*/
#define	SYMBOLS	500	/*  Number of symbols in symbol table.		*/
#define	PADDING	"       "	/*  SYMLEN - 1 blanks.			*/

/*  Number of if statements that can be nested:  */

#define	IFDEPTH	16

/*  BDOS functions called directly:  */

#define	LISTOUT	5	/*  Put character to list device.		*/
#define	LOGDISK	14	/*  Log in disk drive.				*/
#define	GETDISK	25	/*  Get currently logged in disk.		*/

/*  Define flag values:  */

#define	SKIP	TRUE	/*  Used with skip flag in getchr.		*/
#define	NOSKIP	FALSE
#define	BIGST	TRUE	/*  Used to tell kind of string in getitem.	*/
#define	SMALST	FALSE
#define	NOCODE	0	/*  Used to tell the hex generator what to do.	*/
#define	PUTCODE	1
#define	FLUSH	2
#define	NOMORE	3

/*  File descriptors:  */

#define	NOFILE	-1	/*  No file specified.				*/
#define	CONO	1	/*  Console output.				*/
#define	LST	2	/*  List device.				*/
#define	LODISK	4	/*  Lowest numbered disk.			*/

/*  Items can have the following attributes:  */

#define	ALPHA	0	/*  Alphabetic character.			*/
#define	NUMERIC	1	/*  Numeric digit (0-9).			*/
#defi