Der Präprozessor ist ein Teil des Compilers/Assemblers, der den Sourcecode für den Übersetzungsvorgang vorverarbeitet. Es existieren zwei Präprozessoren. Einmal für den Luna- und einmal für den Assembler-Quelltext.
Command | Description | Example/Values |
---|---|---|
.filetype type | output filetype (object file format) | .filetype elf64 |
.equ name = value | create a constant | .equ var = 123.45 |
.set name = value | create/assign a constant | .set var = 123.45 |
.def name = expression | Alias | .def temp = RAX |
.import name/label | import a label | .import _myLabel |
.section segment | select memory segment | .section text/bss/data |
.org | Sets the descriptor of the current active segment to a specific value | .org 0x1000 |
.error | Display a error message. Break compile/assemble. | .error „message“ |
.warning | Display a warning message. | .warning „message“ |
.message, .print | Display a info message without line number and origin. | .message „message“ |
.db | (byte) 1 byte each value and strings, data block. | .db „hello“,0x3b |
.dw | (word) 2 bytes each value, data block. | .dw 0x3bda,0x1f01 |
.dd | (double word) 4 bytes each value, data block. | .dd 0xff01ddca |
.dq | (quad word) 8 bytes each value, data block. | .dq 0xff01ddcacd48dd50 |
.bin | (file) data block from file byte-wise. | .bin „filepath“ |
.odb | (byte) 1 byte each value and strings, object data block | .odb „hello“,0x3b |
.odw | (word) 2 bytes each value, object data block. | .odw 0x3bda,0xcf01 |
.odt | (triple) 3 bytes each value, object data block. | .odt 0xf0d1a4 |
.odl | (long) 4 bytes each value, object data block. | .odd 0xff01ddca |
.obin | (file) data block from file byte-wise. 1) | .obin „filepath“ |
.dobjend | endmark for object data block with .odb, .odw, … | .dobjend label |