Index
Related
Main Directives
Syntax | Meaning |
---|---|
.main | It’s used to mark a file as the main file (the one that is run first) |
.data | Introduces the data (i.e. global variables) section of the program, this variables are stored in the computer memory (RAM ??) |
.text | Introduces the text (i.e. code) section of the program. |
.data directives
Directives which can only be used in a .data
section of the program file:
Syntax | Meaning | Example |
---|---|---|
.asciiz <characters> | characters will be stored in memory as a zero byte terminated string constant. | .asciiz “Hello world” |
.space <number> | number of bytes is reserved in memory. | .space 400 |
.word <number> | The 32-bit number number is stored in memory. | .word 1234 |
Example