hamzamac@live.com http://issuu.com/hamzamac
College Of Informatics and Virtual Education
NAME: Makame, Makame H PROGRAM: B Sc. Computer and Information Security COURSE NAME: Computer Architecture and Organization COURSE CODE: CN 200 PART: Machine Architecture that is Really Intuitive and Easy (MARIE)
Problem Descriptions: This program is designed to help on the understanding of the 8th MARIE fundamental instruction: SKIPCOND, which means “skip the next instruction on condition”.
The next instruction will be skipped if and only if the condition is satisfied, True => skip the instruction next to SKIPCOND and execute the one after the ‘next’ instruction, False => execute instruction next to SKIPCOND as usual, do not skip it, The SKIPCOND 200 -> skip the next instruction if the value in The accumulator AC is negative, The SKIPCOND 400 -> skip the next instruction if the value in The accumulator AC is zero, The SKIPCOND 800 -> skip the next instruction if the value in The accumulator AC is positive,
On the Test result table
1 means the condition has been satisfied, x means the condition has not been satisfied.
Load and run the below given code substituting the skipcond values with 400 and 800. Carefully observe the output.
Thursday, March 01, 2012
hamzamac@live.com http://issuu.com/hamzamac
PROGRAM MAP ----------------Symbol | Location -------+--------start | 000 x | 006
Assembly listing for: skip test.mas Assembled: Thu Mar 01 17:21:35 EAT 2012 000 001 002 003 004 005 006
1006 5000 8200 9000 6000 7000 0000
| | | | | | |
start
x
LOAD x INPUT SKIPCOND 200 JUMP start OUTPUT HALT DEC 00
Assembly successful.
SYMBOL TABLE -------------------------------------------------Symbol | Defined | References --------+---------+------------------------------start | 000 | 003 x | 006 | 000 --------------------------------------------------
TEST RESULTS TABLE -------------------------------------------------Values | 200 | 400 | 800 --------+---------+---------+--------------------+ ve | x | x | 1 0 | x | 1 | x - ve | 1 | x | x --------------------------------------------------
Thursday, March 01, 2012