Loading ...
Sorry, an error occurred while loading the content.

V0.33 of 1802 C compiler with ElfOs function call support ready

Expand Messages
  • ted_rossin
    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
    Message 1 of 1 , Nov 3, 2009
    • 0 Attachment
      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:

      http://www.tedrossin.x10hosting.com/Electronics/RCA/RCA.html

      Here is how puts is implemented using the new compiler pragma.

      #pragma ElfOsFunction
      void puts(char *s)
      {
      #asm
      ld *r9++ ; Fetch high byte off stack
      st r15.1
      ld *r9 ; Fetch low byte off stack
      st r15.0

      sep 4 ; call ElfOs API routine
      .word O_MSG
      #endasm
      }
    Your message has been successfully submitted and would be delivered to recipients shortly.