In Assembly language (LC 2200 MIPS), Coding Confusion -
if increment $a0 0 10 using loop. then, increment memory address 0 0 10 using loop...
would code like
loop: addi $a0,1
this how implement loops in mips assembly:
.globl main main: # start of loop loop: bgt $a0,10,exit # checks if $a0 greater 10 loop ending status addi $a0,$a0,1 # adds 1 $a0 loop variable j loop # jumps go on loop exit: li $v0,10 # sets value of $v0 10 terminate programme syscall # terminate
kindly check link if want larn more loops in mips assembly
assembly mips pipeline processor
No comments:
Post a Comment