Programming with Ophis
<<< Previous | The basics | Next >>>

# Related commands and options

This code includes constants that are both in decimal and in hex. It is also possible to specify constants in octal, binary, or with an ASCII character.

- To specify decimal constants, simply write the number.

- To specify hexadecimal constants, put a $ in front.

- To specify octal constants, put a 0 (zero) in front.

- To specify binary constants, put a % in front.

- To specify ASCII constants, put an apostrophe in front.

Example: 65 = $41 = 0101 = %1000001 = 'A

There are other commands besides `.byte` and `.word` to specify data. In particular, the `.dword` command specifies four-byte values which some applications will find useful. Also, some linking formats (such as the `SID` format) have header data in big-endian (high byte first) format. The `.wordbe` and `.dwordbe` directives provide a way to specify multibyte constants in big-endian formats cleanly.

<<< Previous | Home | Next >>>
Producing Commodore 64 programs | Up | Writing the actual code