Core War is a programming game introduced to the public in the early 1980s [DEWD84], which was
Question:
CodeBlue contains only five assembly language statements and uses three addressing modes (Table B.4). Addresses wrap around, so that for the last location in memory, the relative address + 1 of refers to the first location in memory. For example, ADD #4, 6 adds 4 to the contents of relative location 6 and stores the results in location 6; JUMP @5 transfers execution to the memory address contained in the location five slots past the location of the current JUMP instruction.
a. The program Imp is the single instruction COPY 0, 1.What does it do?
b. The program Dwarf is the following sequence of instructions:
ADD #4, 3
COPY 2, @2
JUMP -2
DATA 0
What does it do?
c. Rewrite Dwarf using symbols, so that it looks more like a typical assembly language program.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Computer organization and architecture designing for performance
ISBN: 978-0136073734
8th edition
Authors: william stallings
Question Posted: