Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
3
Task/Variables/MIPS-Assembly/variables-1.mips
Normal file
3
Task/Variables/MIPS-Assembly/variables-1.mips
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
foo equ 0x100
|
||||
bar equ foo+1
|
||||
;it's heavily implied that "foo" is one byte, otherwise, why would you label this? But you should always comment your variables.
|
||||
1
Task/Variables/MIPS-Assembly/variables-2.mips
Normal file
1
Task/Variables/MIPS-Assembly/variables-2.mips
Normal file
|
|
@ -0,0 +1 @@
|
|||
li $t0,5 ;load the register $t0 with the value 5.
|
||||
6
Task/Variables/MIPS-Assembly/variables-3.mips
Normal file
6
Task/Variables/MIPS-Assembly/variables-3.mips
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
.definelabel USER_RAM,0xA0000000
|
||||
foo equ 0x100 ;represents an offset from USER_RAM. Indexed offsetting can only be done at compile time in MIPS.
|
||||
|
||||
la $t0,USER_RAM
|
||||
nop ;load delay slot ($t0 might not be ready by the time the load occurs)
|
||||
lbu $t1,foo($t0) ;load the unsigned byte from memory address 0xA0000100
|
||||
Loading…
Add table
Add a link
Reference in a new issue