User Activity

  • Posted a comment on discussion Help on Small Device C Compiler (SDCC)

    So I found out that the argument is passed through the A register, at least the first one, if 8 bits. Variables can be access by adding an underscore to their name. Only if it's a global variable. char var = 0b000001000; void fon(char arg) { arg; /* just to skip the message: "warning 85: in function fon unreferenced function argument : 'arg'" */ __asm ; register A already contains "arg" ; "var" is copied into it. ld A, _var __endasm; }

  • Posted a comment on discussion Help on Small Device C Compiler (SDCC)

    It's not via registers like in GNU C. Looking at the examples in the SDDC manual you just have to add a underscore to the argument. "arg" => "_arg". But it doesn't work. Perhaps something to add in the compilation line ?

  • Modified a comment on discussion Help on Small Device C Compiler (SDCC)

    Hi How can I read a C argument in ASM ? And vice versa. void fon(char arg) { __asm ld a, #_arg ; ?? __endasm; } I get this error: ?ASlink-Warning-Undefined Global '_arg' ... Version: sdcc -v SDCC : stm8 TD- 4.3.0 #14184 (Linux) published under GNU General Public License (GPL)

  • Modified a comment on discussion Help on Small Device C Compiler (SDCC)

    Hi How can I read a C argument in ASM ? And vice versa. void fon(char a) { __asm ldw x, _a __endasm; } I get this error: ?ASlink-Warning-Undefined Global '_a' ... Version: sdcc -v SDCC : stm8 TD- 4.3.0 #14184 (Linux) published under GNU General Public License (GPL)

  • Posted a comment on discussion Help on Small Device C Compiler (SDCC)

    Hi How can I read a C argument in ASM ? And vice versa. void fon(char a) { __asm ldw x, _a __endasm; } I get this error: ?ASlink-Warning-Undefined Global '_a' ...

View All

Personal Data

Username:
imperialbrune
Joined:
2023-09-27 00:20:13.459000

Projects

  • No projects to display.

Personal Tools