Question: 10) (15 pts) Using the MarieSim emulator - Write a working assembly code that executes the logical programming construct: Turing machines and Finite State Machines
10) (15 pts) Using the MarieSim emulator - Write a working assembly code that executes the logical programming construct: Turing machines and Finite State Machines will continue until told to halt Please t your code upon completion of the assigned task Include comments to your code IF (A-B) THEN C- A+E ELSE C- A-B Answer: Write a working assembly code that uses stack parameter passing linkage to call a subroutine labeled "sub_1" to subtract two numbers and return the results to the main routine. t (r- s) Your main routine must: load your two parameters (r,s) from memory and push them onto your stack. b. a. call sub 1 c. pop the result from your stack and store it into memory label 't:'. Your sub-routine must: a. pop your two parameters from your stack b. subtract the parameters as shown in the problems formula c. push the result onto the stack d. return to your 'main' routine Please initialize t 0' to start your code. t (r-s) Use care not to let your memory stack step on your code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
