Problem with intrinsic_outi() and macro arguments

ZX80, ZX 81, ZX Spectrum, TS2068 and other clones
Post Reply
Stefan123
Member
Posts: 85
Joined: Fri Oct 21, 2016 7:57 am

Problem with intrinsic_outi() and macro arguments

Post by Stefan123 »

The following compiles fine with the SCCZ80 compiler:

Code: Select all

#define SPRITE_PATTERN_PORT 0x5B

intrinsic_outi(sprite_pattern, SPRITE_PATTERN_PORT, 256);
However, with the SDCC compiler, the macro SPRITE_PATTERN_PORT is not first expanded to 0x5B when given to the intrinsic_outi() macro, which results in a compilation error.
alvin
Well known member
Posts: 1872
Joined: Mon Jul 16, 2007 7:39 pm

Post by alvin »

Thanks, it should be fixed now.
Post Reply