Question: 6. Using Tables 15-4 and 15-5, convert the following assembly language to machine code. LOADA 100016 LOADB 100116 JGT AGREATER EXCAB AGREATER: STORA 100216 01

 6. Using Tables 15-4 and 15-5, convert the following assembly language

to machine code. LOADA 100016 LOADB 100116 JGT AGREATER EXCAB AGREATER: STORA

100216 01 M 04 OS Machine code Assembly language STORA 02 LOADA

6. Using Tables 15-4 and 15-5, convert the following assembly language to machine code. LOADA 100016 LOADB 100116 JGT AGREATER EXCAB AGREATER: STORA 100216 01 M 04 OS Machine code Assembly language STORA 02 LOADA 03 CNSTA STORB LOADB CNSTB EXCAB ADDAB NEGA OA NEGB OB CMPAB OC CMPAC OD CMPBC OE JEQU JGT 10 JLT JMP 08 09 Instruction Move data from A to memory Move data from memory to A Load A with a constant Move data from B to memory Move data from memory to B Load B with a constant Exchange values in A and B Add A and B and put result in A Take the 2's complement of A Take the 2's complement of B Compare A to B Compare A to a constant Compare B to a constant Jump if equal Jump if first value is greater Jump if second value is greater Jump always OF Table 15-5 Operand Requirements for Imaginary Processor Instruction Operands required Move data from A to memory (STORA) 16-bit memory address Move data from memory to A (LOADA) 16-bit memory address Load A with a constant (CNSTA) 8-bit constant Move data from B to memory (STORB) 16-bit memory address Move data from memory to B (LOADB) 16-bit memory address Load B with a constant (CNSTB) 8-bit constant Exchange values in A & B (EXCAB) None Add A and B and put result in A (ADDAB) None Take the 2's complement of A (NEGA) None Take the 2's complement of B (NEGB) None Compare A to B (CMPAB) None Compare A to a constant (CMPAC) 8-bit constant Compare B to a constant (CMPBC) 8-bit constant Jump if equal (JEQU) 16-bit destination address Jump if Ist val. Is greater than 2nd val. (JGT) | 16-bit destination address Jump if Ist val. Is less than 2nd val. (JLT) | 16-bit destination address Jump always (JMP) 16-bit destination address

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!