Question: contains an unsigned value which is supposed to be between 0 and 15. souldprint the value in AL as a hex digit ASCll character. Assume
contains an unsigned value which is supposed to be between 0 and 15. souldprint the value in AL as a hex digit ASCll character. Assume one byte reserved at Hexchar to hold the character. Cmp al, jIs it in 8-9 range? NoteTos9 It is 0-9 ; set upper half of register to 3h ('0"=30h) NoteTo9: cmp al, Is it in A-F range? NotAToF It is A-F Set upper half of register to 4h ; Add 1 to register ("A 41h) ; Save character in HexChar PrintDig: mov Specify syswrite call Specify file descriptor 1: syswrite mov eax,4 mov ebx,1 mov ecx, Hexchar Specify byte to write mov edx, 1 ; specify size = 1 ; Make kernel call to write digit It's not printable, value > eFh NotAToF
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
