pop moves value into the register at arg1
cool
This commit is contained in:
@@ -198,12 +198,17 @@ void push() {
|
||||
}
|
||||
|
||||
void pop() {
|
||||
if (!is_reg(args->arg1)) {
|
||||
last_check_args_code = ARG1_WRONG;
|
||||
return;
|
||||
}
|
||||
|
||||
if (top == -1) { //stack underflow
|
||||
last_stack_code = UNDERFLOW;
|
||||
return;
|
||||
}
|
||||
|
||||
--top;
|
||||
*get_reg(args->arg1) = stack[top--];
|
||||
}
|
||||
|
||||
void and() {
|
||||
|
||||
Reference in New Issue
Block a user