nesasm/source/expr.c
/* ----
 * check_keyword()
 * ----
 * verify if the current symbol is a reserved function
 */
check_keyword()

verify if the current symbol is a reserved function
check_keyword () verify if the current symbol is a reserved function
int
check_keyword(void)
{
	int op = 0;
	if (!strcasecmp(symbol, keyword[0]))
		op = OP_DEFINED;
	else if (!strcasecmp(symbol, keyword[1]))
		op = OP_HIGH;
	else if (!strcasecmp(symbol, keyword[2]))
		op = OP_LOW;
	else if (!strcasecmp(symbol, keyword[3]))
		op = OP_PAGE;
	else if (!strcasecmp(symbol, keyword[4]))
		op = OP_BANK;
	else if (!strcasecmp(symbol, keyword[7]))
		op = OP_SIZEOF;
	else {
		if (machine->type == MACHINE_PCE) {
			if (!strcasecmp(symbol, keyword[5]))
				op = OP_VRAM;
			else if (!strcasecmp(symbol, keyword[6]))
				op = OP_PAL;
		}
	}
	switch (op) {
	case OP_DEFINED:
	case OP_HIGH:
	case OP_LOW:
	case OP_PAGE:
	case OP_BANK:
	case OP_VRAM:
	case OP_PAL:
	case OP_SIZEOF:
		expr_lablptr = NULL;
		expr_lablcnt = 0;
		break;
	}
	return (op);
}
int check_keyword ( void ) { int op = 0 ; if ( ! strcasecmp ( symbol , keyword [ 0 ] ) ) op = OP_DEFINED ; else if ( ! strcasecmp ( symbol , keyword [ 1 ] ) ) op = OP_HIGH ; else if ( ! strcasecmp ( symbol , keyword [ 2 ] ) ) op = OP_LOW ; else if ( ! strcasecmp ( symbol , keyword [ 3 ] ) ) op = OP_PAGE ; else if ( ! strcasecmp ( symbol , keyword [ 4 ] ) ) op = OP_BANK ; else if ( ! strcasecmp ( symbol , keyword [ 7 ] ) ) op = OP_SIZEOF ; else { if ( machine -> type == MACHINE_PCE ) { if ( ! strcasecmp ( symbol , keyword [ 5 ] ) ) op = OP_VRAM ; else if ( ! strcasecmp ( symbol , keyword [ 6 ] ) ) op = OP_PAL ; } } switch ( op ) { case OP_DEFINED : case OP_HIGH : case OP_LOW : case OP_PAGE : case OP_BANK : case OP_VRAM : case OP_PAL : case OP_SIZEOF : expr_lablptr = NULL ; expr_lablcnt = 0 ; break ; } return ( op ) ; }
check_keyword()
 
 verify if the current symbol is a reserved function
check_keyword () verify if the current symbol is a reserved function
/* check if its an assembler function */ /* PCE specific functions */ /* extra setup for functions that send back symbol infos */ /* ok */