Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Using the simplified instruction set shown for problem #2, write code for the following. Suppose memory locations 1400 to 1449 contain 16-bit words. Each

1. Using the simplified instruction set shown for problem #2, write code for the following. Suppose memory locations 1400 to 1449 contain 16-bit words. Each word represents 2 ASCII characters. Write code to read in and write out these 100 characters. Left-side character from location 1400 should be first, right-side character from location 1400 should be second, and remaining characters follow in numeric order. Assume you have access to 4 registers: R1, R2, R3, R4. Each register holds one word (16 bits). Number the lines of your operations starting with 1.image text in transcribed

Operation Name MOVEX,K LOADX,Y STORE A,X CLEAR X SET X PUSH X POP X ADD X,Y SUB X,Y MULT X,Y DIVIDE X,Y ABS X NEG X INCR X DECR X AND X,Y OR X,Y NOT X XOR X,Y LSHIFTR X,K LSHIFTLX,K ASHIFTR XK ASHIFTL ?, ? ROTR X, K ROTL ?, ? UBRANCH K Move constant K to registerX Move contents at address contained in register Y to register X Store contents at register X to addressA Transfer word of Os to register X Transfer word of 1s to register X Transfer contents of register X to top of stack* Transfer contents of top of stack to registerX* Replace contents of X withY (contents) Replace contents of X with X-Y(contents) Replace contents of X withY (contents) Replace contents of X with X/Y (contents) Replace contents of X with X (contents) Replace contents of X with -X (contents) Replace contents of X with 1 (contents) Replace contents of X with X1 (contents) Replace contents of X with bitwise AND ofXand Y(contents) Replace contents of X with bitwise OR of X and Y (contents) Replace contents of X with bitwise negation of X (contents) Replace contents of X with bitwise XOR of X and Y(contents) Replace contents of X with logical shift right of x (contents by K bits Replace contents of X with logical shift left of x (contents) by K bits Replace contents of X with arithmetic shift right of x (contents) by K bits Replace contents of X with arithmetic shift left of x (contents) by K bits Replace contents of X with rotate right of x (contents]) by K bits Replace contents of X with rotate left of x (contents) by K bits Unconditionally branch to instruction on line K (K is a constant) Conditionally branch to instruction on line K(K is a constant if x0 Fill contents of X with data from VO processor Send contents of x to VO processor INPUT> OUTPUTX Operation Name MOVEX,K LOADX,Y STORE A,X CLEAR X SET X PUSH X POP X ADD X,Y SUB X,Y MULT X,Y DIVIDE X,Y ABS X NEG X INCR X DECR X AND X,Y OR X,Y NOT X XOR X,Y LSHIFTR X,K LSHIFTLX,K ASHIFTR XK ASHIFTL ?, ? ROTR X, K ROTL ?, ? UBRANCH K Move constant K to registerX Move contents at address contained in register Y to register X Store contents at register X to addressA Transfer word of Os to register X Transfer word of 1s to register X Transfer contents of register X to top of stack* Transfer contents of top of stack to registerX* Replace contents of X withY (contents) Replace contents of X with X-Y(contents) Replace contents of X withY (contents) Replace contents of X with X/Y (contents) Replace contents of X with X (contents) Replace contents of X with -X (contents) Replace contents of X with 1 (contents) Replace contents of X with X1 (contents) Replace contents of X with bitwise AND ofXand Y(contents) Replace contents of X with bitwise OR of X and Y (contents) Replace contents of X with bitwise negation of X (contents) Replace contents of X with bitwise XOR of X and Y(contents) Replace contents of X with logical shift right of x (contents by K bits Replace contents of X with logical shift left of x (contents) by K bits Replace contents of X with arithmetic shift right of x (contents) by K bits Replace contents of X with arithmetic shift left of x (contents) by K bits Replace contents of X with rotate right of x (contents]) by K bits Replace contents of X with rotate left of x (contents) by K bits Unconditionally branch to instruction on line K (K is a constant) Conditionally branch to instruction on line K(K is a constant if x0 Fill contents of X with data from VO processor Send contents of x to VO processor INPUT> OUTPUTX

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

Oracle Database 11g SQL

Authors: Jason Price

1st Edition

0071498508, 978-0071498500

More Books

Students also viewed these Databases questions

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago