Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 4923

SDCC Compiler Z80 - Strange use of registers

$
0
0
Hi all,

I am using the SDCC for my ZBM project and have begun writing a library so the C program can interface with system calls (RST). I am having some trouble with this and the manual is not very helpful at all. When I generate the output assembly and go through it the first variation of C code produces a sensible output. The second variation does not.

Here is the first C program:
Code (Text):
  1.  
  2.     printChar('a');
  3.     userinput = getline();
  4.     printString(userinput);
  5.  
And this is the...

SDCC Compiler Z80 - Strange use of registers

Viewing all articles
Browse latest Browse all 4923

Trending Articles