Pack the 2 unpacked bcd numbers

; GIVEN
; 2000H = 02H
; 2001H = 04H
; 2002H = 42H


LDA 2001H ; LOAD MSB IN ACCUMULATOR 04H
RLC  ;
RLC  ;
RLC  ;
RLC  ; A = 40H
ANI F0H   ; MAKE LSB ZERO
MOV B, A  ; TEMPORARY STORAGE
LDA 2000H ; LOAD LEAST SIGINIFICANT BIT
ADD B     ; ADD 40 AND 02
STA 2002H ; STORE RESULT 
HLT  ;

2 thoughts on “Pack the 2 unpacked bcd numbers

  1. Someone essentially lend a hand to make critically articles I’d state. That will be the initial time I frequented your web site page and so far? I amazed with the research you created to create this actual post extraordinary. Fantastic activity! 735097

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s