Index

Related


Main Directives

SyntaxMeaning
.mainIt’s used to mark a file as the main file (the one that is run first)
.dataIntroduces the data (i.e. global variables) section of the program, this variables are stored in the computer memory (RAM ??)
.textIntroduces 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:

SyntaxMeaningExample
.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