Assembler






XLAT
. XLAT
AL , ,
BX. .4.4 ,
. BX
.
AL,
0 255. , ,
XLAT AL. XLAT
.
 
XLAT
.
.
ASCII 0 9
.
, .
,
. . 4.5
.
 
.4.5 ,
, . 5,
5 (),
6, . ,
6 (b),
5.
 
. 4.6 ,
.
=,
AL.
- ,
, .
 
40H
AL. "0" ASCII
, . ,
"0" 0 AL, "1" 1,
.. LDS
DS:BX. -
Microsoft (R) Macro Assembler Version 5.00 1/1/80 04:00:38
. 4.6 Page 1-1
 
 
PAGE ,132
TITLE . 4.6
0000 CODE SEGMENT
ASSUME CS:CODE, DS:CODE
 
; 040H
; , .
;
; , , TABLE_POINTER
; .
; ,
; .
 
0000 TRANSLATE PROC NEAR ; TRANSLATE
 
0000 E4 40 IN AL,040H ;
0002 2C 30 SUB AL,"0" ; "0",
; ..
0004 C5 1E 000A R LDS BX,TABLE_POINTER ; (DS,BX)
0008 D7 XLAT XMIT_TABLE ;
0009 C3 RET
 
000A 000E ---- R TABLE_POINTER DD XMIT_TABLE
000E 35 37 39 31 33 36 38 XMIT_TABLE DB '5791368024'
30 32 34
0018 37 33 38 34 39 30 35 RECV_TABLE DB '7384905162'
31 36 32
 
0022 TRANSLATE ENDP
0022 CODE ENDS
END
 
. 4.6
 
TABLE_POINTER -
. ,
, XMIT_TABLE,
.4.5(), - , RECV_TABLE, -
.4.5().

TABLE_POINTER. ,
RECV_TABLE TABLE_POINTER.
, ,
.
 
XLAT ,
DS:BX. AL
0 9. XLAT
AL.
RET .
XLAT

. IBM PC, ASCII,
IBM EBCDIC (Extended
Binary=Coded=Decimal Interchange Code -
= ).
,
, XLAT
.
 
, XLAT
.
,
.
,
.