I am very new to assembly programming, and I am having some issues with an assignment. I am trying to store a hex value (94h) in AL and store the most significant nibble (MSN) in DH and least significant nibble (LSN) in DL. I know I can use shift left and shift right (by 4) to isolate the MSN and LSN, but I dont know how to store the result in DL and DH.
As an example: If AL contains the number 94h 1)I want to store 39h (ASCII code of the character ‘9’) in DH 2)I want to store 34h (ASCII code of the character ‘4’) in DL 3)I need to display the characters ‘9’, ‘4’, ‘h’, ‘linefeed’, and ‘carriage return’.
MOV AL, 94h ; AL <-- 94h / 1001 0100
MOV CL, 4
SHR AL, 4 ; AL = 0000 1001 = 9
; How do i store this into DH
At this point, I'm stumped..
mov dh, al