Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

10) (15 pts) Using the MarieSim emulator - Write a working assembly code that executes the logical programming construct: Turing machines and Finite State Machines

image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 3 Lnai 9286

Authors: Albert Bifet ,Michael May ,Bianca Zadrozny ,Ricard Gavalda ,Dino Pedreschi ,Francesco Bonchi ,Jaime Cardoso ,Myra Spiliopoulou

1st Edition

3319234609, 978-3319234601

More Books

Students also viewed these Databases questions