You will typically begin by entering a source program by hand or opening it from a file. Assemble…

You will typically begin by entering a source program by hand or opening it from a file. Assemble is the only option available from the Assembler menu at this point. During assembly, the system displays a program listing and any syntax error messages in the utility pane. Each line of source text is numbered in the listing for easy reference, and an error message appears on the line following the line of code in which the error occurs. Assembly halts at the first error. Error detection is pretty thorough: errors are caught even at the lexical level, such as illegal labels and integer literals that are too large for 16-bit sign magnitude representation.

The assembler can generate the following syntax error messages:

.begin expected.

.end expected.

Illegal opcode:

Halt does not take operand.

Wrong number of fields in instruction.

Label must end with :

Label already used:

Undeclared data label:

Undeclared instruction label:

Data label already used as instruction label:

Data directive already exists for label:

Value must be an integer.

Number is too large.

Not enough memory for instructions.

Not enough memory for data.

The program we just loaded from a file had no syntax errors. Let’s put some syntax errors into it so we can see how the assembler detects them.

  1. Replace the operand x in the first instruction, load x, with the operand a , then reassemble the program. The assembler should discover that you forgot to provide a data declaration for a. The assembler forces you to keep track of all your data and their initial values by declaring them at the bottom of the program. What is the error message? Correct this error before going on.
  2. Replace the operator add with the operator multiply in the second instruction. The assembler should discover an unrecognized opcode. What is the error message? Correct this error before going on.
  3. Replace the number 2 with the number 40000 in the first data declaration. What is the error message? Correct this error before going on.
  4. Delete the space between add and y in the second instruction. What is the error message? There must be at least one blank space or tab between an operator and its operand. Correct this error before going on.
  5. Insert a blank line after the second instruction. What is the error message? Assembly language typically has a fixed format, which requires an instruction to appear on each line of a program. Correct this error before going on.
  6. Insert a blank space, followed by subtract, at the end of the second instruction. What is the error message? The instruction has three lexical items, the assembler expects the first one to be a label ending with a colon (:). Don’t correct this error yet.
  7. Oblige the assembler by inserting a colon (:) after add (be sure that there are no blank spaces between the colon and the d. Note the error detected. Now change y to add . The assembler treats subtract as an undeclared data label, which you could remedy by declaring it at the bottom of the program.
Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
The price is based on these factors:
Academic level
Number of pages
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more
error: Content is protected !!