else if (letter >= 'A' && letter <= 'F') n = letter - ('A' - 10);
	else
	{
		markerr('E');
		evalerr = TRUE;
		return 0;
	}
	if (n < base) return n;
	markerr('D');
	evalerr = TRUE;
	return 0;
}

/*
Function to get a character from the present source line.  The function
returns the attribute of the character fetched.  value is a pointer to
the location where the character itself will be saved, and skipflg
determines whether or not white space is skipped.
*/

getchr(value,skipflg)
char *value, skipflg;
{
	char c;
	while (TRUE) if ((c = getattr(*value = *linptr++)) != TRASH &&
			(c != BLANK || skipflg != SKIP)) return c;
}

/*
Function to get a new line of source text from the disk.  Returns 0
if EOF encountered, 1 otherwise.
*/

getlin()
{
	char count, c;
	linptr = linbuf;
	count = 0;
	backflg = FALSE;
	while ((c = getc(source)) != ERROR && (c &= 0x7f) != CPMEOF)
	{
		if (c == '\n')
		{
			*linptr = '\0';
			*--linptr = c;
			linptr = linbuf;
			return 1;
		}
		i))
							{
								markerr('P');
								label[0] = '\0';
							}
							else
							{
								if (sympoint -> symvalu != pc || (sympoint -> symname[1] & 0x80))
								{
									markerr('M');
								}
								sympoint -> symname[0] &= 0x7f;
							}
						}
					}
				}
				hexflg = PUTCODE;
				if (opattr & PSOP) _psop(opcode,label);
				else _normop(opcode,opattr);
				return;
	}
}

/*
Internal function to process pseudo opcodes.
*/

_psop(opcode,label)
char opcode, *label;
{
	char *bptr, c, d;
	unsigned t;
	struct symbtbl *sptr;
	sptr = sympoint;
	bptr = binbuf;
	switch (opcode)
	{
		case 0:		t = eval(START);		/* ORG.	*/
				if (evalerr || !directok)
				{
					markerr('P');
					return;
				}
				address = pc = t;
				hexflg = FLUSH;
				if (label[0] == '\0') goto chkargs;
				backitem(t,VALUE);
				backchr;

		case 1:		if (label[0] == '\0')		/* EQU.	*/
				{
					markerr('L');
					return;
				}
				if (!(sptr -> symname[1] & 0x80) && errcode == 'M')
				{
					errcode = ' ';
					errcount--;
				}
				t = eval(START);
				if (evalerr || !directok)
				{
					markerr('P');
					return;
				}
				address = sptr -> symvalu;
				sptr -> symvalu = t;
				if (!directok) markerr('P');
				if (address != t) markerr('M');
				goto chkargs;

		case 2:						/* FCB.	*/
				while ((c = getitem(&t,SMALST)) != END_LIN)
				{
					if (c == COMMA)
					{
						*bptr++ = 0;
						nbytes++;
						continue;
					}
					backitem(t,c);
					t = eval(START);
					if (t > 0xff && t < 0xff80)
					{
						markerr('V');
						t = 0;
					}
					*bptr++ = t;
					nbytes++;
				}
				return;

		case 3:						/* FDB.	*/
				while ((c = getitem(&t,SMALST)) != END_LIN)
				{
					if (c == COMMA)
					{
						*bptr++ = 0;
						*bptr++ = 0;
						nbytes += 2;
						continue;
					}
					backitem(t,c);
					t = eval(START);
					*bptr++ = t >> 8;
					*bptr++ = t;
					nbytes += 2;
				}
				return;

		case 4:						/* FCC.	*/
				while ((c = getchr(&d,SKIP)) != END_LIN)
				{
					if (c == COMMA) continue;
					if (c != QUOTE)
					{
						markerr('"');
						return;
					}
					while ((c = *linptr++) != d)
					{
						if (c == '\n')
						{
							markerr('"');
							return;
						}
						*bptr++ = c;
						nbytes++;
					}
				}
				return;

		case 5:		t = eval(START);		/* RMB.	*/
				if (evalerr || !directok)
				{
					markerr('P');
					return;
				}
				pc += t;
				hexflg = FLUSH;
				goto chkargs;

		case 6:		if (pass == 1) pass--;		/* END.	*/
				else
				{
					pass++;
					if (ifsp != 0) markerr('I');
				}
				hexflg = NOMORE;
				goto chkargs;

		case 7:					/*  ELSE.	*/
		case 8:		hexflg = NOCODE;	/*  ENDI.	*/
				if (ifsp == 0)
				{
					markerr('I');
					return;
				}
				if (opcode == 8) ifsp--;
				else ifstack[ifsp] = ~ifstack[ifsp];
				goto chkargs;

		case 9:		t = eval(START);		/* IF.	*/
				if (evalerr || !directok)
				{
					markerr('P');
					t = 0xffff;
				}
				if (ifsp == 16) wipeout("\nIf stack overflow.\n");
				ifstack[++ifsp] = address = t;
				goto chkargs;

		case 10:	if (label[0] == '\0')		/* SET.	*/
				{
					markerr('L');
					return;
				}
				if ((sptr -> symname[1] & 0x80) && errcode == 'M')
				{
					errcode = ' ';
					errcount--;
				}
				t = eval(START);
				if (evalerr) return;
				address = sptr -> symvalu = t;
				if (!directok) markerr('P');

		chkargs:	if (getitem(&c,SMALST) != END_LIN) markerr('T');
				return;

		case 255:				/*  NO OPCODE.	*/
				if (nbytes == 0) hexflg = NOCODE;
				return;
	}
}

/*
Internal function to process normal (non-pseudo) opcodes.
*/

_normop(opcode,attr)
char opcode,attr;
{
	unsigned value, operand;
	char numcntl, c;
	nbytes = 1;
	numcntl = operand = 0;
	while (TRUE)
	{
		switch (c = getitem(&value,SMALST))
		{
			case REGISTR:	switch (value)
					{
						case 'B':	if (opcode < 0x40) opcode++;
								else if (opcode < 0x80) opcode |= 0x10;
				