you can push anything now
please work
This commit is contained in:
@@ -54,4 +54,8 @@ je numbers ; if GetAsyncKeyState was false, jump to numbers
|
||||
|
||||
push a1 ; push char
|
||||
call put
|
||||
|
||||
push \n ; push char
|
||||
call put
|
||||
|
||||
jmp numbers
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <Windows.h>
|
||||
|
||||
void api_put() {
|
||||
printf("%c\n", stack[top--]);
|
||||
printf("%c", stack[top--]);
|
||||
}
|
||||
|
||||
void api_getasynckeystate() {
|
||||
|
||||
@@ -184,17 +184,34 @@ void call() {
|
||||
}
|
||||
|
||||
void push() {
|
||||
if (!((is_num(args->arg1) || (is_reg(args->arg1))))) {
|
||||
last_check_args_code = ARG1_WRONG;
|
||||
return;
|
||||
}
|
||||
|
||||
if (top == STACK_SIZE) { //stack overflow
|
||||
last_stack_code = OVERFLOW;
|
||||
return;
|
||||
}
|
||||
|
||||
stack[++top] = get_value(args->arg1);
|
||||
int value = get_value(args->arg1);
|
||||
if (value == 0) {
|
||||
if (args->arg1[0] == '\\') {
|
||||
switch (args->arg1[1]) {
|
||||
case 'n':
|
||||
value = (int)'\n';
|
||||
break;
|
||||
case 't':
|
||||
value = (int)'\t';
|
||||
break;
|
||||
case 'r':
|
||||
value = (int)'\r';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
value = (int)args->arg1[0];
|
||||
}
|
||||
}
|
||||
|
||||
stack[++top] = value;
|
||||
}
|
||||
|
||||
void pop() {
|
||||
|
||||
Reference in New Issue
Block a user