How to access undocumented z80-instructions in SDCC (sdasz80)?

Door Bengalack

Champion (397)

afbeelding van Bengalack

16-08-2020, 10:59

I've tried to find an easy way to enable the undocumented instructions. Is there a way? An option like "-enable_undocumented" would be preferable. I need it as I develop the "foundation" in C and then mix this highly with assembly code.

I figured out a workaround though, making my own macros, but it's a bit more work and not as "clean" Smile

.macro ld____d_iyh
	.db 0xFD, 0x54	; 10 MSX cycles

.macro ld____e_iyl
	.db 0xFD, 0x5D	; 10 MSX cycles

.macro ld____iyh_d
	.db 0xFD, 0x62	; 10 MSX cycles

Aangemeld of registreer om reacties te plaatsen

Van Giangiacomo Zaffini 2

Master (252)

afbeelding van Giangiacomo Zaffini 2

16-08-2020, 15:15

If only SDCC assembler could synch/catch-up its upstream ASxxxx cross assemblers, ASxxxx's asz80 assembler has some undocumented Z80 instructions. See BP.4.11 Z80 Undocumented Instructions paragraph of ASxxxx Cross Assembler Documentation.

Van Bengalack

Champion (397)

afbeelding van Bengalack

16-08-2020, 20:11

Nice. I got hopeful now, but as you say, that version is not included in SDCC. From the new documentation (2019), it seems like one can just add ".z80u" as a directive in the code. Nice. But not nice that SDDC includes a version from 2012 Sad


sdas Assembler V02.00 + NoICE + SDCC mods  (Zilog Z80 / Hitachi HD64180 / ZX-Next / eZ80)

Copyright (C) 2012  Alan R. Baldwin