Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

My class is CSC 215 How do you write: X = 1; while X < 10 do cout < < X; X = X +

My class is CSC 215

How do you write:

X = 1; while X < 10 do cout << X; X = X + 1; endwhile;

In Marie Machine language? I tried and my attempt says I have four errors. What did I do wrong? See My code below:

Load One Store X Loop, Load X Subt Ten SkipCond 000 Jump Endloop Load X Add One Store X Jump Loop Endloop, Halt x, Dec 0 One, Dec 1 Ten, Dec 10

Error Message:

 Assembly listing for: Exercise3IDR.mas Assembled: Sun Feb 09 14:36:08 EST 2020 000 100C | LOAD One 001 2??? | STORE X **** Operand undefined. 002 1??? | Loop LOAD X **** Operand undefined. 003 400D | SUBT Ten 004 8000 | SKIPCOND 000 005 900A | JUMP Endloop 006 1??? | LOAD X **** Operand undefined. 007 300C | ADD One 008 2??? | STORE X **** Operand undefined. 009 9002 | JUMP Loop 00A 7000 | Endloop HALT 00B 0000 | x DEC 0 00C 0001 | One DEC 1 00D 000A | Ten DEC 10 4 errors found. Assembly unsuccessful. SYMBOL TABLE --------------------------------------------------- Symbol | Defined | References ---------+---------+------------------------------- Endloop | 00A | 005 Loop | 002 | 009 One | 00C | 000, 007 Ten | 00D | 003 x | 00B | ---------------------------------------------------

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

SQL Database Programming

Authors: Chris Fehily

1st Edition

1937842312, 978-1937842314

More Books

Students also viewed these Databases questions

Question

What advice would you provide to Jennifer?

Answered: 1 week ago

Question

What are the issues of concern for each of the affected parties?

Answered: 1 week ago