Another question: how can I display a string in Ans on the screen? I think it should be something with _RclAns, and _CreateTempString, but I've no idea. Or in pseudo-code:
gc_PrintStringXY(Ans, 10, 10)
Ans is a part of the TIOS, not a part of C itself. You can't read Ans unless you write your own inline assembly for it. I was going to make an addition to the file io library to let you directly interact with TI variables with version 2.0. Also, PT_, would you mind redownloading the libraries and using those ones instead? I added the custom font routine.
EDIT: For the custom font, this editor is really good: (Has a ton of preinstalled fonts, and allows you to export as a C header file)
Hello again! I added some debugging stuff to CEmu and the toolchain today, so that way C programs can take advantage of some commands.
As always, the latest release is available here: https://github.com/CE-Programming/toolchain/releases
Here are the commands:
- Opens the CEmu debugger, prints "Program Aborted." to the console, and then exits your C program
- Opens the CEmu debugger, prints "Program Entered Debugger." to the console. Pretty much the same as abort(), just no program exit.
- Print to the CEmu console without opening the debugger, use the defined dbgout to write to the console. For example, to see the value of int data:
int dbg_printf(char *buf, const char *format, ...);
dbg_printf(dbgout, "data=%d\n", data);
In order to use these, you need #include <debug.h> at the start of your program. Good luck!