Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .MODEL SMALL
- .STACK 100H
- .DATA
- MSG1 DW "INPUT:$"
- MSG2 DW "OUTPUT:$"
- .CODE
- MAIN PROC
- MOV AX,@DATA
- MOV DS,AX
- MOV BL,'0'
- START:
- XOR CX,CX
- MOV AH,1
- INT 21H
- WHILE_:
- CMP AL,0DH
- JE END_
- CMP AL,'E'
- JE EQUAL
- INC CX
- INT 21H
- JMP WHILE_
- EQUAL:
- INC BL
- JMP START
- END_:
- MOV AH,2
- MOV DL,0DH
- INT 21H
- MOV DL,0AH
- INT 21H
- MOV AH,2
- MOV DL,BL
- INT 21H
- MAIN ENDP
- END MAIN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement