You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
840 B
Markdown
24 lines
840 B
Markdown
# Assembly
|
|
|
|
Assembly tokenization should be workiung completely. It knows what instructions the CPU implementation supports and parses based on them.
|
|
|
|
## Pseudo-ops
|
|
The following pseudo-ops are implemented as of yet:
|
|
* `.space <len>` reverse <len> bytes of zero
|
|
* `.ascii 'text'` put text into memory
|
|
* `.asciiz 'text'` put text into memory (null terminated)
|
|
* `.sextion .<name>` same as `.<name>` see sections:
|
|
|
|
## Sections:
|
|
Currently only these three sections are supported:
|
|
* `data` read-write data (non-executable)
|
|
* `rodata` read-only data (non-executable)
|
|
* `.text` executable data (read-only)
|
|
|
|
## Allocating stack
|
|
another pseudo-op is recognized: `.stack <len>`. This marks the executable as requesting at least `<len>` bytes of stack.
|
|
If the loader repsects this wish, the sp is initialized pointing to the end of the stack.
|
|
|
|
|
|
|