Grammar - GeoInter/Leguan GitHub Wiki
Note: This is a specification of the support assembly language used in the simulator. This may differ from the official LEGv8 assembly language.
Data Segment:
- Starts without ".data" otherwise will throw an error
- Multiple labels/pointers can be declared
- Within a label multiple values can be declared, however the type has to be specified for each value
- byte, halfword, word and dword expect numbers as decimals or hex-decimals
- ASCII Strings have to start and end with a double qoute (")
Example:
myData: .word 0x7788 .word 0xAF9911 .byte 128 // too big for a (signed) byte -> overflow -> will be displayed as -128 .ascii "Hello World" myDataa: .word 0x10 moreDt: .halfword 0x9978 .dword 939
Register
- Allowed names include normal labels as X0 - X31, but also specific labels as SP, FP, LR, XZR