programa10.doc

1
Microprocessor 8085 Appendix A ØØ Explanation : Let the 8 bit number be in the A register. We have to mask the upper nibble i.e. we have to separate the upper nibble. In the result only LSB number should be present. e.g. : AL = 67H. 011 0 011 1 Logically AND with 0FH 000 0 111 1 000 0 011 1 = 07H Result = 07 H, 6 is masked. Store the result. ØØ Algorithm : Step I : Load the number in A. Step II : Mask the upper nibble. Step III : Store the result in register B. Step IV: Stop. ØØ Flowchart : Refer flowchart 12. Flowchart 12 ØØ Program : Instruction Comments ANI 0F H ; Logically AND the number MOV B, A ; Store the result. HLT ; Terminate the execution

Upload: manpreet-kaur

Post on 19-Aug-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Microprocessor 8085 Appendix A Explanation :Let the8bitnumberbeinthe A register. Wehavetomasktheuppernibblei.e. wehavetoseparate the upper nibble. In the result only LSB number should be present. e.g. : AL = !". #$$# #$$$Logi%ally A&' with #(" #### $$$$#### #$$$ = #!")esult = #! "*is masked.Store the result. Algorithm :Step I :Load the number in A.Step II: +ask the upper nibble.Step III:Store the result in register B.Step IV : Stop. Flowchart : )e,er ,low%hart $-.Flowchart 12 Program :Instruction CommentsANI0F H ; Logically AND the number MOVB, A ; Store the reult!HL" ; "erminate the e#ecution