If TMP0X16 what should you do to get TMP0X2C Present your an

If TMP=0X16, what should you do to get TMP=0X2C? Present your answer in max of two ASM codes/instructions. Note copy the literal/data directly to TMP not allowed

Solution

Note: You didnot mentioned which assembly language is to be used. I have done using PIC asm instructions.

; By considering TMP = 0x16

MOVF TMP,W ; Copying data from TMP to WREG. So W = 0x16

ADDWF TMP,F ; Add TMP to WREG and store the result in TMP. (TMP = 0x16 + 0x16 = 0x2C)

If TMP=0X16, what should you do to get TMP=0X2C? Present your answer in max of two ASM codes/instructions. Note copy the literal/data directly to TMP not allowe

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site