s502 assembler
A very simple assembler for the 6502 line of processors written in C
istack.h
Go to the documentation of this file.
1 #ifndef GUARD_ISTACK
2 #define GUARD_ISTACK
3 
16 typedef struct _istack {
18  int val;
20  struct _istack* next;
21 } istack_el;
22 
24 
34 
44 int istack_empty(istack_ptr istack);
45 
56 int istack_push(istack_ptr istack, int val);
57 
58 
65 int istack_pop(istack_ptr istack);
66 
74 int istack_top(istack_ptr istack, int def);
75 
85 void istack_free(istack_ptr istack);
86 
87 #endif
istack_el::val
int val
stored value
Definition: istack.h:18
istack_el
very simple int stack
Definition: istack.h:16
istack_el::istack_push
int istack_push(istack_ptr istack, int val)
push one element to the istack
Definition: istack.c:31
istack_ptr
istack_el * istack_ptr
Definition: istack.h:23
istack_el::istack_free
void istack_free(istack_ptr istack)
free all memory associated with a istack
Definition: istack.c:59
istack_el::next
struct _istack * next
pointer to next element or NULL
Definition: istack.h:20
istack_el::istack_pop
int istack_pop(istack_ptr istack)
pop the top of the istack
Definition: istack.c:44
istack_el::istack_empty
int istack_empty(istack_ptr istack)
check if the istack is empty or not
Definition: istack.c:26
istack_el::istack_top
int istack_top(istack_ptr istack, int def)
get the top element of the istack
Definition: istack.c:53
istack_el::istack_new
istack_ptr istack_new()
create an empty istack
Definition: istack.c:15