Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

After the following program is executed, what is the content of R 4 in hex? ORG 0 0 H MOV R 1 , # 1

After the following program is executed, what is the content of R4 in hex?
ORG 00H
MOV R1, #124
MOV R2, #36H
MOV R3, #44H
20
TOTAL:
MOV A, R1
MOV B, R2
ICALL SUM
MOV B, R3
LCALL SUM
MOV R4, A
SUM:
ADD A, B
RET
R4-
END
8051 conditional Jump instructions
Unconditional jump Instructions
JNZ
12
Jump if A 0
Jump If A
LMP (long jump):
LIMP TARGET
SETB C
SIMP (short jump): Call Instructions
SIMP TARGET
CLR C
JAC
Jump if bit
1 and clear bit
CPLC
Jump if bit 0
LCALL (long call):
Jump if bit 1
ACALL (absolute call):
ACALL TARGET
JB
INC
JC
Jump if CY-1 if byte #data
SETB bit CLR bit
CINE reg, data Jump CINE A, byte
Jump if A byte
CPL bit (bit NOT bit)
DINZ
Decrement and Jump If A & D
18 bit, target (Juma if bit)
Jump if CY0
Single bit instructions
Set the bit (bit 1)
(CYb) MOV B,C
MOV Ch (b-CY)
JNC target
JC target ANI Cbit
Clear the bit (bit 0)
Complement the bit
ANL C,/bit AND CY with inverted bit and
save it on CY ORL C,bit
Jump to target if bit-1
INB bit target
Jump to target if bit O
(jump if na bit)
Several instructions by which the carry flag can be manipulated directly
LCALL TARGET
Make CY-1
Clear carry bit (CY =01
Complement carry bit status to bit location
Copy carry
Copy bit location status to carry
Jump to target if CY-O
Jump to target if CY=1
AND CY with bit and save it on CY
OR CY with bit and save it on CY
ORLC/bit OR CY with Inverted bit and
save it on CY
JBC bit, target Jump to target if bit 1,
clear bit (jump if bit, then clear)
The list of some instructions:
A=A+ source
ADD A, source
ADDC (add with carry)
Add two 16-bit data operands, For Example: ADDC A, #immediate,
DA A
SUBB A, source
MUL AB
DIV AB ANL destination, source
ORL destination, source
decimal adjust for addition
AA-source-CY
AxB, 16 bit result in B, A.
divide A by B, A/B
dest dest AND source
dest dest OR source dest XOR source
XRL destination, source dest CPLA
CINE destination, source,
relative address. crotate right A
RRA
RLA RRC A
complements the register A
compare and jump if not equal
rotate left A
RLC A
SWAP A
rotate right through carry
protate left through carry It swaps the lower nibble and the higher nibble

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

Database Fundamentals Study Guide

Authors: Dr. Sergio Pisano

1st Edition

B09K1WW84J, 979-8985115307

More Books

Students also viewed these Databases questions