Professional Documents
Culture Documents
ORG 100H
MOV AX , DS
MOV ES , AX
XOR AX,AX
MOV AX,1335D ;;;;;;;;;;;;if number is dec BX Mst also be dec. if number was hex,BX
would also have to be hex....as shown in block before HLT
SWAP:
XOR DX,DX
MOV BX,10D
DIV BX
SHL TEMP,4
OR TEMP,DX
LOOP SWAP
;;;;;;;;;;;;;;;;;; NOW AX = 5331
MOV AX,TEMP
MOV CX,4
MOV TEMP,0
ROT:
XOR DX,DX
MOV BX,10H;;;;;;;;;;;;;;;CANNOT BE DEC
DIV BX
SHL TEMP,4
OR TEMP,DX
LOOP ROT
HLT
TEMP DW 0
T2 DW 0
CODE ENDS
END