+1 678 648 4277 

Simulating Marie machine in assembly homework help

The homework deals with generating a sequence of numbers based on the input given by the user on the Marie machine simulator. The program uses a combination of conditional branches, memory access instructions, and arithmetic instructions to generate the sequence. In the following code, our assembly homework helpers show you how to créate a Marie machine simulator in assembly language.

Marie Machine Simulation using Conditional Branches

Marie Machine Simulator

Input / Read number from keyboard Store Num / Save read number in num variable Loop1, Output / Print current value of AC Subt One / Decrement AC by 1 Skipcond 400 / Skip next instruction if AC = 0 Jump Loop1 / Repeat loop when AC > 0 Load One / Start AC in 1 Store Index / Save AC as current index Loop2, Load Index / Load current index Output / Print current index value Add One / Increment AC by 1 Store Index / Update current index with value in AC Subt Num / Compare index with read Num Skipcond 800 / Skip next instruction if AC > 0 Jump Loop2 / Repeat loop when AC < Num Halt / End program Num, Dec 0 Index, Dec 0 One, Dec 1