Implementing While loop on DLX Program
While loop Java Code
1: int i=0;
2: while (x>2)
3: {
4: i=i+1;
5: }
While loop in DLX program
1: while sgti r6,r1,2 ;while(x>2)
2: bf r6,ew ;if while not true ew
3: addi r1,r1,1 ;i++
4: j while ;Jump to while
5: ew Jr31 ;End of program
Tags:Implementing While loop on DLX Program,While loop on DLX Program,While command on DLX
0 comments:
Post a Comment