Question: Here is my code: program Crazy 8 s; #include ( stdlib . hhf ) static num 1 : int 3 2 ; num
Here is my code:
program Crazys;
#includestdlibhhf
static
num: int;
num: int;
num: int;
countWins: int :;
procedure CheckForEightn: int : boolean;
begin CheckForEight;
while n do
n : n ;
endwhile;
return n ;
end CheckForEight;
begin Crazys;
stdout.putWelcome to Crazy s Game!", nl;
stdout.putGimme a number: ;
stdin.getnum;
stdout.putGimme a number: ;
stdin.getnum;
stdout.putGimme a number: ;
stdin.getnum;
moveax num;
callCheckForEight;
movzxnum al;
moveax num;
callCheckForEight;
movzxnum al;
moveax num;
callCheckForEight;
movzxnum al;
ornum num;
ornum num;
cmpnum;
jewin;
stdout.putSorry Charlie! You lose the game!", nl;
jmpendgame;
win:
inccountWins;
stdout.putOne of them ends in eight!", nl;
endgame:
cmpcountWins;
jlCrazys;
stdout.putYou Win The Game!", nl;
end Crazys;
Here is the feedback from the instructor: The Goal Of Class Is To Learn Assembly Instructions, Not Write HighLevel Language Statements Like while Loops Like You Are Doing In Your Crazy Code.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
