Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

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

View file

@ -0,0 +1 @@
li $t0,5 ;load the register $t0 with the value 5.

View 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