FictionTools/z88dk/src/z80asm/directives.c
/* define one constant in the current context */
define one constant in the current context
define one constant in the current context
void asm_DEFVARS_define_const(const char *name, int elem_size, int count)
{
	int var_size = elem_size * count;
	int next_pc = *DEFVARS_PC + var_size;
	xassert(name != NULL);
	if (var_size > 0xFFFF)
		error_int_range(var_size);
	else if (next_pc > 0xFFFF)
		error_int_range(next_pc);
	else
	{
		define_symbol(name, *DEFVARS_PC, TYPE_CONSTANT);
		*DEFVARS_PC = next_pc;
	}
}
void asm_DEFVARS_define_const ( const char * name , int elem_size , int count ) { int var_size = elem_size * count ; int next_pc = * DEFVARS_PC + var_size ; xassert ( name != NULL ) ; if ( var_size > 0xFFFF ) error_int_range ( var_size ) ; else if ( next_pc > 0xFFFF ) error_int_range ( next_pc ) ; else { define_symbol ( name , * DEFVARS_PC , TYPE_CONSTANT ) ; * DEFVARS_PC = next_pc ; } }
define one constant in the current context
define one constant in the current context