Note: Done accordingly. Please comment for any problem. Please Uprate. Thanks.
Everything will be same just we have to change checking condition and convert from less than to greater than.
Assembly |
Equivalent c |
in first |
scanf(“%d”,&first) |
in second |
scanf(“%d”,&first) |
load first |
x=first; |
compare second |
If second>x{//outsecond printf(“%d”,second) }else{//outfirst printf(“%d”,first) } |
jumpgt outsecond |
|
out first |
|
jump done |
|
outsecond: out second |
|
done: halt |
return; |
first: .data 0 |
|
second: .data 0 |
|
.end |
Get Answers For Free
Most questions answered within 1 hours.