Question

In: Computer Science

LDAA $3000 LDAB $20A0 MUL STD $4002 What is the machine code for the instructions above

LDAA $3000

LDAB $20A0

MUL

STD $4002

What is the machine code for the instructions above

Solutions

Expert Solution

The operations of the processor is determined by the instructions it exicutes,referred to as machine instructions or computer instructions.The collection of different instructions that the processor can execute is referred to as the processors instruction set.these elements are as follows:

1.operation code.

2.source operand reference.

3.result operand reference.

4.next instruction reference.

The collection of machine instructions in main memory is called a machine language program.Machine code or machine language is a set of instructions executed directily by a computers central processing unit(cpu).

source and result operand can be in one of the three areas:

1.main or virtual memory: As with next instruction references ,the main or virtual memory address must be supplied.

2. processor register: With rare exceptions,a processor contains one or more registers that may be referenced by machine instructions.

3.i/o devices: The instructions must specify the i/o module and device for the operation.in memory mapped i/o is used ,this is just another main or virtual memory address.

LDAA :Add the content memory location.

LDAB : Add the content memory location.

STD : set flag.

This instruction is processor control instructions.

STD $4002 :set directional flag to 4002.

MUL : multiply byte or word(un signed).this method is arithmetic instructions.

For examples are,

mov a,28 ; load A.

mov b,45; load B

mul b ; multiply B

LDAA:

* Extended mode:

-The 16 bit address of the location of to operated on is given in the instruction.

LDAA $3000 ;A <- [$ 3000] LOAD A with the content of location $3000.

LDAB:

ldab<opr> load B B<-[OPR].


Related Solutions

Question: In the following MIPS assembly code, translate all the instructions to their corresponding machine code...
Question: In the following MIPS assembly code, translate all the instructions to their corresponding machine code in hexadecimal format. This code is stored in the memory from address 0x2fff0004. Loop: lw $t0, 4($s0)             addi $t1, $t1, -15             sll $t1, $t1, 2             beq $t1, $s1, Exit             addi $s0, $s0, 4             j Loop Exit: …
Translate the C function code below to the MIPS True Assembler Language code (machine instructions only)....
Translate the C function code below to the MIPS True Assembler Language code (machine instructions only). The function code should follow the conventions for MIPS function calls including passing parameters and returning results. Your function code must be written with the minimum number of machine instructions to be executed and without any use of MIPS pseudo-instructions. Myfunction(unsigned int a, unsigned int b, unsigned int c) { int i=0; while (a > c) { a /= b; i++; } return i;...
Convert the following to machine code and then back to MIPS instructions: 1) a. addi $s0,...
Convert the following to machine code and then back to MIPS instructions: 1) a. addi $s0, $zero, -15 b. slt $t0, $s0, $s1 c. beq $t0, $zero, LEEQ d. j GRT
Convert the following MIPS instructions into machine code. Directly write down the answer without justifying steps...
Convert the following MIPS instructions into machine code. Directly write down the answer without justifying steps will result 0 credit. All steps must be typed in Word. 1. add $s0, $s1, $s2 2. lw $s0, 15($s1) 3. beq $s0, $s1, LABEL   #consider LABEL represents the 16-bit value 0x00FF
Translate these two LEGv8 assembly instructions to 32-bit binary machine code. Give your answer in hexadecimal....
Translate these two LEGv8 assembly instructions to 32-bit binary machine code. Give your answer in hexadecimal. CBZ X19, exit ADD X10, X19, X20 exit:
* Example for instructions x is a Normally distributed random variable….. Mean = 100 Std dev...
* Example for instructions x is a Normally distributed random variable….. Mean = 100 Std dev = 25 a. What is the probability of a value of x that is more than 140? Z = 1.60 =(140-B6)/B7 Table prob = .4452 p(x>140) = .5-.4452 = 0.0548 The probability of a value of x that is more than 140 is 0.0548 *****Complete #3 two ways*********             i. Same as in Example above             ii. using the Excel NORMDIST and NORMINV functions...
The code is bellow. follow this instructions to edit the code : lets assume that instead...
The code is bellow. follow this instructions to edit the code : lets assume that instead of the maximum and minimum values, you want to find the 2nd largest/smallest. For example, in the numbers 1 to 10, this would return 2 and 9 .you will have to change the "max_min" function accordingly. this has a different puepose than "max_min", so you must give it another name. code: #include <stdio.h> #define N 235 void max_min (int a[], int n, int *max,...
This code has to be in java (I code in eclipse). Also these instructions have to...
This code has to be in java (I code in eclipse). Also these instructions have to be followed exactly because if not my output won't match the expected out ( this will be uploaded on zybooks). Write a program that asks the user for their age in days. The program will compute the person's age in years (you can assume that all years have 365 days) and then prints one of the following messages: If the user is 1 year...
C CODE PLZ! All instructions for what to do in code #include <stdio.h> int main(int argc,...
C CODE PLZ! All instructions for what to do in code #include <stdio.h> int main(int argc, char **argv) { int n, k, l, r, t, d, i; char str[65]; /* Make the user enter a non-negative integer */ printf("Please enter a non-negative integer: "); scanf("%d", &n); while (n < 0) { printf("Sorry, your input is incorrect.\n"); printf("Please enter a non-negative integer: "); scanf("%d", &n); } /* Convert the integer to reversed binary: e.g. 6 gets converted to 011 */ if...
1. Convert the machine language instructions into assembly language instructions: 7976C1 06
1. Convert the machine language instructions into assembly language instructions: 7976C1 06
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT