Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
44
Task/Loops-For/MIPS-Assembly/loops-for.mips
Normal file
44
Task/Loops-For/MIPS-Assembly/loops-for.mips
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
.include "\SrcAll\Header.asm"
|
||||
.include "\SrcAll\BasicMacros.asm"
|
||||
.include "\SrcPSX\MemoryMap.asm"
|
||||
.include "\SrcN64\MemoryMap.asm"
|
||||
|
||||
CursorX equ 0x100
|
||||
CursorY equ 0x101
|
||||
|
||||
main:
|
||||
li t3,5+1 ;outer loop counter
|
||||
li t2,1 ;inner loop counter
|
||||
move a2,t2 ;working copy of inner loop counter
|
||||
loop:
|
||||
li a1,'*'
|
||||
jal PrintChar
|
||||
nop ;needed on PlayStation after branches to prevent out-of-order execution.
|
||||
subiu a2,1
|
||||
bnez a2,loop
|
||||
nop
|
||||
;overhead
|
||||
jal NewLine ;this doesn't use t2 so we don't care about out-of-order execution.
|
||||
addiu t2,1 ;increment outer loop counter
|
||||
move a2,t2 ;next time, we'll print one more * than we did last time.
|
||||
bne t2,t3,loop ;are we done yet? If not, loop.
|
||||
nop
|
||||
|
||||
HALT:
|
||||
j HALT ;halt the CPU - we're done
|
||||
nop
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
MyFont:
|
||||
.ifdef buildn64
|
||||
.incbin "\ResN64\ChibiAkumas.fnt"
|
||||
.endif
|
||||
.ifdef buildPSX
|
||||
.incbin "\ResPSX\ChibiAkumas.fnt"
|
||||
.endif
|
||||
|
||||
.include "\SrcALL\graphics.asm"
|
||||
|
||||
.include "..\\SrcAll\monitor.asm"
|
||||
.include "\SrcN64\Footer.asm"
|
||||
Loading…
Add table
Add a link
Reference in a new issue