Question

Assume that WREG = F0H. Perform the following operations. Indicate the result and the register where...

Assume that WREG = F0H. Perform the following operations. Indicate the result and the register where it is stored. Note: The operations are independent of each other.

i) ANDLW   0x73

ii) XORLW 0xDD

iii) IORLW 0x60  

Write a program to subtract 8D9BH from AB57H and save the result in RAM memory locations starting at 40H. Show a Flowchart for your solution. Simulate your program in PIC18 IDE simulator and attach the printout of your simulation.

Homework Answers

Answer #1

(i) ANDLW 0x73

The instruction performs logical AND of contents of WREG and 0x73. Result stored in WREG.

Before execution WREG = 0xF0

After execution WREG = 0x070

(ii) XORLW 0xDD

he instruction performs logical XOR of contents of WREG and 0xDD Result stored in WREG.

Before execution WREG = 0xF0

After execution WREG = 0x2D

(iii) IORLW 0x60

he instruction performs logical OR of contents of WREG and 0x60. Result stored in WREG.

Before execution WREG = 0xF0

After execution WREG = 0xF0

Know the answer?
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
Similar Questions