Usage

Please check the example page first, in order to grasp the concepts of Disark!

Note: all the addresses can be decimal or hexadecimal (starting with “&”, “#”, “$”, “0x”).

The command-line options are:

<path to input binary file> Mandatory. The path to the binary file to open. It must be a Z80 binary file.

<path to output Z80 source file> Mandatory. The path to the file to generate. It will be a Z80 source, to be opened by your favorite assembler. In order to be compliant with your assembler, check the “source profile” option.

sourceProfile <profile> If present, uses a “source profile”, to generate a Z80 generate compliant with your assembler. “profile” can be: winape, maxam, pasmo, sdcc, vasm, orgams. If no source profile is selected, a Rasm/Sjasmplus source profile is generated. Even if selected, you can still override the source generation with the options below.

symbolFile <path to symbol file> If present, must point to a symbol file. Each line of the symbol file must contain a label, and an address. Labels will be removed their possible “.” and “:”. Addresses can be decimal or hexadecimal (detected by “&”, “#”, “$”, “0x”). By default, the first word is the label, the second the address. You can use the two options just below to change that.

labelPositionInSymbolFile <position> If present, indicates the position of the labels in the symbol files. 1 means “first word”, 2 “second word”, etc.

addressPositionInSymbolFile <position> If present, indicates the position of the addresses in the symbol files. 1 means “first word”, 2 “second word”, etc.

loadAddress <address> If present, indicates the address the original code was compiled. This greatly improve the disassembling accuracy.

genOrg If present, an ORG mnemonic is generated (see the “loadAddress” option about how to set this address).

genLabels If present, labels will be generated whenever needed, which is handy for relocation. However, this should not be needed if you are using a symbol table.

genLabelPrefix <prefix> If present, all the generated labels will start with the given “prefix”. If not present, the labels start with “lab”.

src8bitsValuesInHex If present, all the 8 bits values will be written in hexadecimal.

src16bitsValuesInHex If present, all the 16 bits values will be written in hexadecimal.

hexPrefix <prefix> Defines how the hexadecimal values will be presented (for example “0x” for 0x4000). Default is “#”. You may use quotes, useful for empty strings.

hexPostfix <prefix> Defines how the hexadecimal values ends (for example “h” for 4000h). Default is empty. You may use quotes, useful for empty strings.

adrInComments If present, the current address is generated in the comment of each line.

undocumentedOpcodesToBytes If present, all the undocumented opcodes are encoded as bytes, to maximize compatibility (“out (c),0”, but also all instructions about IXL/IXH/IYL/IYH).