;Лабораторная работа №3
SSEG SEGMENT STACK
DB 128 DUP(?)
SSEG ENDS
;
MYDAT SEGMENT
MES1 DB "ENTER SYMBOL - $"
MES2 DB "BINARY - $"
 MYDAT ENDS
;
CSEG SEGMENT
ASSUME CS:CSEG, DS:MYDAT, SS:SSEG
MAIN PROC 
MOV DX,OFFSET MES1
MOV AH,09H
INT 21H
MOV AH,1
INT 21H
PUSH AX
MOV BL,'*'
CMP AL,BL
JE E
MOV DX,OFFSET MES2
MOV AH,09H
INT 21H
MOV CX,8
MOV BL,7
POP AX
MOV DX,AX
M:  PUSH DX
       PUSH CX
       MOV CL,BL
       SHR DL,CL
       ;SHL DL,CL
       POP CX
       MOV BH,00000001B
       AND DL,BH
       MOV BH,00110000B
       OR DL,BH
       MOV AH,02H
       INT 21H
       DEC BL
       POP DX
       LOOP M
E:
;MAIN ENDP
;CSEG ENDS
;END MAIN
MOV AX,4C00H
INT 21H
MAIN ENDP
CSEG ENDS
END MAIN
   
