SPASM Directive: .addinstr

Jun 15, 2014 at 3:01 AM
Edited Jun 15, 2014 at 3:02 AM
Hey BuckeyeDude,
i was wondering if it'd be possible to allow instructions that are larger than 4 bytes with the .addinstr directive. Now it seems like the limit is 4 (which makes sense, since there aren't any instructions larger than 4 bytes), but sometimes it's much neater to use the .addinstr directive than to add a macro and when you're working with registers you can't really use macros. For example:
#define kld(to, from) rst rkcall \ ld to, from
..won't work but:
.addinstr kld hl,* 21CF 4 nop 1
.addinstr kld de,* 11CF 4 nop 1
.addinstr kld bc,* 01CF 4 nop 1
..will. The problem is that "kld ix,*" would be 5 bytes instead of 4.

I know it's not a huge issue, but i was just hoping it was a small simple change. Thanks :)
Jul 13, 2014 at 3:02 AM
No change should be required SPASM supports up to 8 byte instructions:

.addinstr kld ix,* 21DDCF 5 nop 1

Works just fine for me