1

I am trying to understand the principle of pseudocode to MIPS. It surely is very simple but I just can't understand how do I represent the "OR" in the following:

IF  (b<1) OR (b>3) THEN
b:=b-1;
ELSE 
b:= a+1;
END;
Ahmad
  • 906
  • 11
  • 27
Yoana
  • 75
  • 2
  • 12
  • 1
    Hint: Get rid of the OR, and implement it with only two IF statements and GOTOs. – Jonathon Reinhart May 25 '14 at 05:35
  • 1
    What? No. That is a high-level language construct that does not exist in assembly. Show what you've tried. – Jonathon Reinhart May 25 '14 at 06:07
  • See http://stackoverflow.com/q/15375267/583570 – markgz May 27 '14 at 00:26
  • 1
    What Jonathan Reinhart is trying to say is, a (naive) compiler for a high level language (such as your pseudocode) would first break the IF statement apart into two IFs with simpler conditions. You must do the same, manually. – jpaugh Jun 04 '14 at 17:22

0 Answers0