What are the two parts of an Instruction in the Pep/9?
|
Assignment |
Selection |
||
|
Source Code |
-- Allows a choice, uses a If-Then or If-Then-Else statement.
--Higher-level code that must be converted to Machine Code to execute.
--Places a value into a variable.
Answer 1) The two parts of an instruction are Opcode and Operand
Answer 2) Assignment = Places a value into a variable
Selection = Allows a choice, uses a If-Then or If-Then-Else statement
Source Code = Higher-level code that must be converted to Machine Code to execute.
Answer 3) 1. The Assembly mnemonic to add a value to the A Register is ADD.
2. The Assembly mnemonic to load a word to the accumulator is LDA .
3. Effective Address is the name given to a memory location which can be used as an operand.
4. In Pseudocode words that indicate Input and Output are :-
Input: READ, GET.
Output: PRINT , SHOW
5. Boolean Expressions
6. Natural Language
Answer the following questions (1/2 pt ea): What are the two parts of an Instruction in...
IF statement is translated into assembly language with a o CMP instruction followed by Conditional jumps. If op1 or op2 is a memory operand o IF Statemert (a variable): o one of them must be moved Problem 3: Implement the following pseudocode in assembly language. to a register before executing CMP. All values are unsigned: стр ьї, ci ja next mov al,5 mov dl,6 al-50 dl-23 next: Add to the above code the mov instructions and assign values to bl,...
Questions 6-10: Prior to execution of the instruction MOV CX,[1234H) - following are the information given on the state of the processor CS = 0100H; DS=0200H; IP = 0000H; CX = 8B3AH Machine code for the above instruction=8B0E3412H; Answer the following questions 6-10 given below related to this instruction - 6. What is the content of the destination-operand prior to the instructions execution? a. 1234H b. 43211 c. 8B3AH d. 3A8BH e. Unknown 7. What is the content of the...
Solve the following problems clearly - assembly - computer
organization and architecture- william stallings
1)
2)
Let the address stored in the program counter be designated by the symbol X1. The instruction stored in X1 has an address part (operand reference) X2. The operand needed to execute the instruction is stored in the memory word with address X3. An index register contains the value X4. What is the relationship between these various quantities if the addressing mode of the instruction...
Determine the output of the following machine-language program
by running it in Pep/8. The left column in each part is the memory
address of the first byte on the line.
Determine the output of the following machine-language program by running it in Pep/8. The left column in each part is the memory address f the first byte on the line: Address Instruction Description C10000C 18 F1000B 51000B 0003 0004 0007 000A 000B 000C FEDC A. Submit the code with comments...
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...
Problem 2 (40 points) a) Suppose we want to replace the STA instruction in our basic computer with the following XCH instruction Write the register transfer statements needed to execute XCH. Remember to write controls as well. (EA is the effective address) Symbol Opcode Symbolic description description XCH 011 AC MEA), M[EA] + AC Exchange AC and Memory b) In the following memory example, suppose we are currently executing the instruction at address 20. What is the address of the...
Please answer the following Assembly x86 Questions with either TRUE or FALSE. 1. The PUSHAD instruction pushes all the 32-bit general-purpose registers on the stack. 2. The SS register points to the last value pushed on the stack. 3. The POP instruction copies a value from the stack to an operand, then it increments the stack pointer 4. When a macro is invoked, both CALL and RET instructions are needed. 5. When the instruction CALL runs, ESP always changes value....
Please answer the list questions above with explanation. Thank
you
LOAD-STORE PROGRAM EXAMPLE Write an Assembly program to add two 8-bit numbers. C A+B lds r16, A lds rl7, B : 1. Load variables add E16, :172 Do something 2. Do something sts C, r16 : 3. Store answer Identify the operation, source operand, destination operand in the first Data Transfer insiruction. Identify the source/destination operand in the Arithmetic and Logic (ALU) instruction. .What addressing mode is used by the...
Answer the following questions I want to double check my work
Q1: (8086 processor) Translate the following code segment written in high level languages into assembly code. Assume Ax contains signed number. If AX >=2 then CX=CX+1 ; Else AX-CX; End Q2: Show how this statement M JK-1 could be translated into assembly code using 8086 instruction set a) b) MIPS instruction set Assume M. J and K are memory variables In s086 assume 16-bit, we can use MOv instruction...
1.Write the "destination" register in the instruction 671A in a string of 4 bits. 2.The instruction 9158 uses two registers as operands, and a third register as a destination for the result. Which registers are used for the operands? 9 and 1 1 and 5 5 and 8 9 and 8 3. Translate the following instruction into English: 54F2 Add the bit patterns in registers F and 2 together as if they were presented in two's complement and leave the...