Assembler



         

- 5


 
00AC TRANSLATE PROC NEAR
00AC 50 PUSH AX ;
00AD 51 PUSH CX
00AE B1 04 MOV CL, 4 ;
00B0 D2 E8 SHR AL, CL ;
00B2 59 POP CX
00B3 E8 00CB R CALL XLAT_OUTPUT ;
00B6 58 POP AX ;
00B7 E8 00CB R CALL XLAT_OUTPUT ;
00BA C3 RET
00BB TRANSLATE ENDP
 
00BB 30 31 32 33 34 35 36 ASCII_TABLE DB '0123456789ABCDEF'
37 38 39 41 42 43 44
45 46
00CB XLAT_OUTPUT PROC NEAR
00CB 24 0F AND AL, 0FH ;
00CD 53 PUSH BX
00CE 8D 1E 00BB R LEA BX, ASCII_TABLE ;
00D2 D7 XLAT ASCII_TABLE ;
00D3 5B POP BX
00D4 88 07 MOV [BX], AL ;
00D6 43 INC BX ;
00D7 C3 RET
00D8 XLAT_OUTPUT ENDP
00D8 CODE ENDS
END CALCULATE_POWER
. 7.23 () ()