V0.33 of 1802 C compiler with ElfOs function call support ready
- I added switch statement, break and continue keyword support as well as the exit function. I also added support for ElfOs function calls without a ton of context save and restore code overhead (the compiler and ElfOs have differnet register usage) per call. Just one set of code for all ElfOs function calls is used.
The examples include a couple tiny terminal programs that demonstate ElfOs calls for O_TYPE (putchar), O_MSG (puts), O_READKEY (getchar) and O_INPUT (gets). I also added parsing of the command line to produce the normal void main(int argc, char *argv) command line interface. elfos_out.c shows how this works. elfos.h has the souce for the C bindings to the ElfOs function calls.
Here is the link:
Here is how puts is implemented using the new compiler pragma.
void puts(char *s)
ld *r9++ ; Fetch high byte off stack
ld *r9 ; Fetch low byte off stack
sep 4 ; call ElfOs API routine