c478882b7f
FossilOrigin-Name: b05ebe6fe6f6c78682289eda20878891671974598be6027e25a1a10a6420edfe
14 lines
344 B
C
14 lines
344 B
C
#include "retroforth.h"
|
|
|
|
CELL stack_pop(NgaState *vm) {
|
|
vm->cpu[vm->active].sp--;
|
|
return vm->cpu[vm->active].data[vm->cpu[vm->active].sp + 1];
|
|
}
|
|
void stack_push(NgaState *vm, CELL value) {
|
|
vm->cpu[vm->active].sp++;
|
|
vm->cpu[vm->active].data[vm->cpu[vm->active].sp] = value;
|
|
}
|
|
|
|
void fortytwo(NgaState *retro) {
|
|
stack_push(retro, 42);
|
|
}
|