add: elements of strings are now 1 byte, new print api

This commit is contained in:
2024-08-24 19:38:45 +02:00
parent 5e230e1e02
commit 37c4a37287
4 changed files with 25 additions and 20 deletions

View File

@@ -40,6 +40,19 @@ void api_put() {
}
}
void api_print() {
char *address = (char *)state->STACK[state->STACK_IDX--];
int f = fstream;
#ifdef _WIN32
if (f == 2) //stderr (could use _fileno(stderr) but it uses the stdlib)
f = 1; //stdout
#else
if (f == fileno(stderr))
f = fileno(stdout);
#endif
dprintf(f, "%s", address);
}
void api_callrawaddr() {
long long address = state->STACK[state->STACK_IDX--];