Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .MODEL SMALL
- .STACK 100H
- .DATA
- MSG1 DB "Enter a character : $"
- NEWL DB 0AH,0DH,"$"
- .CODE
- MAIN PROC
- MOV AX,@DATA
- MOV DS,AX
- LEA DX,MSG1
- MOV AH,9
- INT 21H
- MOV AH,1
- INT 21H
- MOV BH,AL
- MOV CX,8
- XOR BL,BL
- LEA DX,NEWL
- MOV AH,9
- INT 21H
- TOP:
- SHL BH,1
- JNC SKIP
- INC BL
- MOV DL,31h
- MOV AH,2
- INT 21H
- JMP SKIP2
- SKIP:
- MOV DL,30h
- MOV AH,2
- INT 21H
- SKIP2:
- LOOP TOP
- LEA DX,NEWL
- MOV AH,9
- INT 21H
- MOV DL,BL
- ADD DL,48
- MOV AH,2
- INT 21H
- MAIN ENDP
- END MAIN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement