Question

1.) a.) Using the simplified instruction set shown for part b, write code for the following....

1.)

a.) Using the simplified instruction set shown for part b, 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.

b.) In the following table, place ‘X’s in columns to indicate the addressing mode(s) used for each instruction.

Operation Name

Description

Immediate

Direct

Indirect

Register

Register Indirect

Displacement

Stack

MOVE X,K

Move constant K to register X

LOAD X,Y

Move contents at address contained in register Y to register X

STORE A,X

Store contents at register X to address A

CLEAR X

Transfer word of 0s to register X

SET X

Transfer word of 1s to register X

PUSH X

Transfer contents of register X to top of stack*

POP X

Transfer contents of top of stack to register X*                                                                                                

ADD X,Y

Replace contents of X with X + Y (contents)

SUB X,Y

Replace contents of X with X - Y (contents)

MULT X,Y

Replace contents of X with X * Y (contents)

DIVIDE X,Y

Replace contents of X with X / Y (contents)

ABS X

Replace contents of X with |X| (contents)

NEG X

Replace contents of X with -X (contents)

INCR X

Replace contents of X with X + 1 (contents)

DECR X

Replace contents of X with X +-1 (contents)

AND X,Y

Replace contents of X with bitwise AND of X and Y (contents)

OR X,Y

Replace contents of X with bitwise OR of X and Y (contents)

NOT X

Replace contents of X with bitwise negation of X (contents)

XOR X,Y

Replace contents of X with bitwise XOR of X and Y (contents)

LSHIFTR X,K

Replace contents of X with logical shift right of X (contents) by K bits

LSHIFTL X,K

Replace contents of X with logical shift left of X (contents) by K bits

ASHIFTR X,K

Replace contents of X with arithmetic shift right of X (contents) by K bits

ASHIFTL X,K

Replace contents of X with arithmetic shift left of X (contents) by K bits

ROTR X,K

Replace contents of X with rotate right of X (contents) by K bits

ROTL X,K

Replace contents of X with rotate left of X (contents) by K bits

UBRANCH K

Unconditionally branch to instruction on line K (K is a constant)

CZBRANCH K,X

Conditionally branch to instruction on line K (K is a constant) if X=0 (contents)

INPUT X

Fill contents of X with data from I/O processor

OUTPUT X

Send contents of X to I/O processor

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Regis Operat ion Name Description ter Immed Dindir RegisIndirDisplaceSta iate ect ect ter ect ment MOVE Move constant K to re

Add a comment
Know the answer?
Add Answer to:
1.) a.) Using the simplified instruction set shown for part b, write code for the following....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Instruction set architecture R: register X, Y, Op1, Op2: Operand Quantity: constant value EA: Effective memory...

    Instruction set architecture R: register X, Y, Op1, Op2: Operand Quantity: constant value EA: Effective memory address Opcode Operation Name MOV X Y XCH Opl, Op2 ADD X, Y SUB X, Y SAL Op. Quantity SAR Op. Quantity SHR Op Quantity AND X, Y OR X. Y XOR X, Y NOT X LOAD RA LOAD R. (A) STORERA STORE R. (A) Description Move data from Y to X Exchange Opl with Op2 X=X+Y X=Y-X Shift Arithmetic Left on Op for...

  • 2. Serial shift registers Draw missing connections to implement various shift registers 1. Shift right: All...

    2. Serial shift registers Draw missing connections to implement various shift registers 1. Shift right: All bits of the register move right by one position, and a new bit value from a serial input is stored in the most significant bit (leftmost flip-flop below). Serial input -02 az 02 a Do ao Serial indino 2. Shift left: All bits of the register move left by one position, and a new bit value from a serial input is stored in the...

  • Instruction set architecture R: register X, Y, Opl, Op2: Operand Quantity: constant value EA: Effective memory address Opcode Operation Name MOV X, Y XCH Opl, Op2 ADD X, Y SUB X,Y SAL Op, Quantity...

    Instruction set architecture R: register X, Y, Opl, Op2: Operand Quantity: constant value EA: Effective memory address Opcode Operation Name MOV X, Y XCH Opl, Op2 ADD X, Y SUB X,Y SAL Op, Quantity SAR Op, Quantity Shift Arithmetic Right on Op for Quantity SHR Op Quanti AND X, Y OR X, Y XOR X, Y NOT X LOADR, A LOAD R, (A STORE R, A STORE R, (A Description Move data from Y to X Exchange Op1 with Op2...

  • Consider a hypothetical computer with an instruction set of only two n-but instructions. The firs...

    Consider a hypothetical computer with an instruction set of only two n-but instructions. The first bit specifies the opcode, and the remaining bits specify one of the 2-1 n-bit words of main memory. The two instructions are as follows: SUBS X: Subtract the contents of location X from the accumulator, and store the result in location X and the accumulator JUMP X: Place address X in Program Counter A word in memory may contain either an instruction or a binary...

  • Consider a hypothetical computer with an instruction set of only two n-bit instruc- tions.The first bit...

    Consider a hypothetical computer with an instruction set of only two n-bit instruc- tions.The first bit specifies the opcode, and the remaining bits specify one of the 2-1 n-bit words of main memory. The two instructions are as follows: 12.7 SUBS X Subtract the contents of location X from the accumulator, and store the result in location X and the accumulator. Place address X in the program counter JUMPX A word in main memory may contain either an instruction or...

  • Using Structural Modeling in VHDL write the code for: An Arithmetic Logic Unit (ALU) shown in...

    Using Structural Modeling in VHDL write the code for: An Arithmetic Logic Unit (ALU) shown in the figure below. A (16-bit), B (16-bit), Opcode (3-bit), and Mode (1-bit) are the inputs; and ALUOut (16-bit) and Cout (1-bit) are the outputs of the design. A and B hold the values of the operands. Mode and Opcode together indicate the type of the operation performed by ALU. The ALU components ARE: -Arithmetic Unit that consists of one 16-bit adder, 16-bit subtractor, 16-bit...

  • 1) We would like to design a bus system for 32 registers of 16 bits each....

    1) We would like to design a bus system for 32 registers of 16 bits each. How many multiplexers are needed for the design? Select one: 5 16 1 4 32 2) The basic computer can be interrupted while another interrupt is being serviced. Select one: True False 3) If the Opcode bits of an instruction is 111, then the basic computer instruction type is either memory-reference or input-output. Select one: True False 4) The content of AC in the...

  • You are given a homework processor (HPro) capable of addressing 32 8-bit (1 byte) wide registers....

    You are given a homework processor (HPro) capable of addressing 32 8-bit (1 byte) wide registers. However, it has only 29 physical registers. Register RO, R1 and R31 are not physically implemented. Instead, every read from RO, R1 and R31 will return a constant zero (00000000), constant one (00000001) and all ones (11111111), respectively. Every write to RO, R1 and R31 will go to null (dummy write). Assume that all other registers have initially unknown (X) state (This in fact...

  • Implement the following statements using MS430 assembly instructions. You may use more than one, ...

    Implement the following statements using MS430 assembly instructions. You may use more than one, but you should minimize the number of instructions required. You can use both native and emulated instructions. Use hex notation for all numbers 1. (a) Move the word located in register R14 to R15 (b) Increment the word in R6 by 2. (c) Perform a bitwise ANDing of the word located at address 0x0240 with the datum in R15, placing the results in R15. (d) Rotate...

  • computer analysis

    Questions1.  The function L is defined as L(1) = 2,L(2) = 1,L(3) = 3,L(4) = 4 and for n ≥ 4,L(n + 1) = L(n) + L(n − 1) + L(n − 2)L(n − 3)i.e., the (n + 1)-th value is given by the sum of the n-th, n − 1-th and n − 2-th values divided by the n − 3-th value.(a)  Write an assembly program for computing the k-th value L(k), where k is an integer bigger than...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT