DATA SEGMENT
INFO DB 12H,00H,92H,01H,0H,0H,45H,0A5H,0FEH,0DAH
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:
MOV AX,DATA
MOV DS,AX
MOV CX,0AH
LEA BX,INFO
DEC BX
MOV AH,02H
SIGN:
INC BX
TEST BYTE PTR [BX],0FFH
JZ ZERO_NUM
TEST BYTE PTR [BX],80H
JZ PLUS_NUM
JMP NEG_NUM
NEXT:
MOV DL,0dH
INT 21H
MOV DL,0aH
INT 21H
LOOP SIGN
MOV AH,4CH
INT 21H
ZERO_NUM:
MOV DL,30H
INT 21H
JMP NEXT
PLUS_NUM:
MOV DL,31H
INT 21H
JMP NEXT
NEG_NUM:
MOV DL,'-'
INT 21H
MOV DL,31H
INT 21H
JMP NEXT
CODE ENDS
END START