Sanny Builder supports writing a raw content in an output file. All values within this construct are written in an output file without any checks.
<any hexadecimal numbers>
hex04 00 02 0800 04 01end
This sequence of bytes is the compiled version of the opcode
0004: $2 = 1, so the game will correctly read it and set the value of the variable
You must specify each byte you're going to write with two digits. All spaces are ignored. The compiler treats any two digits with a space between them as a single byte value. A single digit (
0..F) is prefixed with
0. So, for example, a sequence of three letters
A B C will be compiled as the number
:get_offsethex04 00 02 $PLAYER_CHAR 01 @get_offsetend
This is the exact copy of the opcode
0004: $PLAYER_CHAR = @get_offset
A string literal enclosed in double quotes is compiled as a sequence of characters.
hex"This is a string"end
The following escape sequences are supported within a string literal:
Numeric escape sequence
It produces the following sequence of bytes:
00 08 09 0A 0D DD.
Currently multiple spaces in a string literal are converted into a single one. Thus a line
"This is a string" is converted into
"This is a string". Use the backward slash character
\ to add multiple spaces in a string literal:
"This \ \ \ is \ a \ \ \ \ string".
Also you can use the aDMA data type to write a numeric constant in an output file. The number after the
& sign can be both positive or negative, decimal or hexadecimal.
This example produces the following sequence of bytes:
E8 03 00 CB 5C FF.