Disark is a Z80 disassembler by Julien Névo a.k.a. Targhan/Arkos. But it is more than that: it can be used to convert sources from an assembler to another. Read on…
A few disassemblers exist. Disark is meant to replace most of them, but was mainly created to fill a need none of these disassemblers fulfilled:
Disark can create “universal” Z80 source from a binary, allowing you to convert any of your Z80 source into a source that can be understood by a target assembler.
Yes, that’s the selling point. If you provide a symbol file, you can recreate a simple source for any assembler. Example: this is the original source file, with a lot of macros and complicated stuff:
org #1000
MyConstant = 1
REPEAT 5,counter ;Ooh, many assemblers don't understand that!
MyLabel{counter} ;Wow, generated labels on the fly!
ld hl,MyLabel{counter} ;... and a reference to them!
REND
IFDEF MyConstant
counter = 0 ;Ouch, variable declaration.
while counter < 3 ;Arg, a lot of assemblers don't know this.
add hl,bc
counter = counter + 1
wend
ENDIF
ret
And lo and behold, this is the source regenerated by Disark from the assembled source + symbol file:
org #1000
MYLABEL1 ld hl,MYLABEL1 ;No more complicated macros!!
MYLABEL2 ld hl,MYLABEL2
MYLABEL3 ld hl,MYLABEL3
MYLABEL4 ld hl,MYLABEL4
MYLABEL5 ld hl,MYLABEL5
add hl,bc
add hl,bc
add hl,bc
ret
Isn’t that magic? And now, you can use this source in any assembler (an output profile can be set to fit any assembler!).
Disark is a side-project to the music software Arkos Tracker, used to compose music and sound effects for retro computers such as Amstrad CPC, Atari ST, ZX Spectrum, MSX, Vectrex and Sharp MZ-700.
Disark’s power relies on label semantics: labels inside the Z80 source can indicate Disark various things:
You only add labels in your code once, and people can convert your code at will into a flat source their assembler will understand.
Yes it is! Check out the repo!
Please don’t hesitate to contact me: disark at julien-nevo dot com. Feedback is greatly wanted!