s502 assembler
A very simple assembler for the 6502 line of processors written in C
|
Go to the documentation of this file. 1 #include "debugmalloc.h"
18 ERROR(
"Memory allocation error in istack_new()!\n");
27 return (!istack->
next);
34 ERROR(
"Memory allocation error in istack_push()!\n");
55 return istack->
next->val;
int istack_push(istack_ptr istack, int val)
push one element to the istack
void istack_free(istack_ptr istack)
free all memory associated with a istack
struct _istack * next
pointer to next element or NULL
int istack_pop(istack_ptr istack)
pop the top of the istack
logging and fancy-printing
int istack_empty(istack_ptr istack)
check if the istack is empty or not
int istack_top(istack_ptr istack, int def)
get the top element of the istack
istack_ptr istack_new()
create an empty istack
iStack class for storing non-negative integers
#define ERROR(...)
Fancy-print an error (cause of faliure). Works like printf.