source: Deliverables/D4.1/GCC/ASMTest.c

Last change on this file was 185, checked in by mulligan, 9 years ago

Found a way to inline SDCC ASM directly into C to test hard to reach
opcodes that the SDCC compiler hardly ever spits out.

File size: 162 bytes
Line 
1int q = 5;
2
3int asm()
4{
5  __asm
6    mov r1, #5
7    mov a, r1
8    mov r0, _q
9    add a, r0
10    mov _q, a
11  __endasm;
12  return q;
13}
14
15int main()
16{
17  return asm();
18}
Note: See TracBrowser for help on using the repository browser.