ALP to convert a given sixteen bit binary number to its gray equivalent
DATA SEGMENT
BINARY DW 1234H
GRAY DW 01H DUP(?)
DATA ENDS
CODE SEGMENT
START: MOV AX, DATA
MOV DS, AX
MOV AX, BINARY
MOV BX, AX
SHR AX, 01H
XOR AX, BX
XOR AX, BX
LEA DI, GRAY
MOV [DI], AX
MOV AH, 4CH
INT 21H
CODE ENDS
END START
No comments:
Post a Comment