The following sample generates errors for each assembly line even though these are valid Rabbit 2000/3000 instructions:
void main()
{
__asm
ex bc', hl ; opcode ED 74
ex de', hl ; opcode E3
ex jk', hl ; opcode ED 7C
ld bc', bc ; opcode ED 49
ld de', bc ; opcode ED 59
ld hl', bc ; opcode ED 69
ld bc', de ; opcode ED 41
ld de', de ; opcode ED 51
ld hl', de ; opcode ED 61
__endasm;
}
The above is compiled with:
user@linux:~/digi/$ sdcc -mr3ka test.c
test.c:4:10: warning: missing terminating ' character
test.c:5:10: warning: missing terminating ' character
test.c:6:10: warning: missing terminating ' character
test.c:8:10: warning: missing terminating ' character
test.c:9:10: warning: missing terminating ' character
test.c:10:10: warning: missing terminating ' character
test.c:12:10: warning: missing terminating ' character
test.c:13:10: warning: missing terminating ' character
test.c:14:10: warning: missing terminating ' character
test.asm:50: Error: <q> missing or improper operators, terminators, or delimiters
test.asm:51: Error: <q> missing or improper operators, terminators, or delimiters
test.asm:52: Error: <q> missing or improper operators, terminators, or delimiters
test.asm:53: Error: <q> missing or improper operators, terminators, or delimiters
test.asm:54: Error: <q> missing or improper operators, terminators, or delimiters
test.asm:55: Error: <q> missing or improper operators, terminators, or delimiters
test.asm:56: Error: <q> missing or improper operators, terminators, or delimiters
test.asm:57: Error: <q> missing or improper operators, terminators, or delimiters
test.asm:58: Error: <q> missing or improper operators, terminators, or delimiters
removing test.rel
sdcc version is 4.2.0 (comes with Ubuntu 23.04).
Here is the link to the instruction reference:
https://ftp1.digi.com/support/documentation/0190098_l.pdf
Following opcodes:
are valid in 4000, 5000 only.
Sorry, I got carried away a bit. You are right, those two instructions are for 4000/5000 only. The rest should be supported on 2000/3000.
This seems to do the trick for me:
Here is new and improved (and now asbestos-free) version of the patch that uses "|" and "<<" operations instead of "+" and "*":
Last edit: D-mo 2023-08-25
Fixed in [r14321] via your patch. I also added a regression tst.
Related
Commit: [r14321]