Advertisement
shawonrog

KOTOGULA 'E' ACHE CODE IN ASM LIPU VERSION

Nov 27th, 2018
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. .MODEL SMALL
  2. .STACK 100H
  3. .DATA
  4. MSG1 DW "INPUT:$"
  5. MSG2 DW "OUTPUT:$"
  6. .CODE
  7. MAIN PROC
  8. MOV AX,@DATA
  9. MOV DS,AX
  10.  
  11.  
  12. MOV BL,'0'
  13. START:
  14.  
  15. XOR CX,CX
  16. MOV AH,1
  17. INT 21H
  18.  
  19.  
  20. WHILE_:
  21. CMP AL,0DH
  22. JE END_
  23. CMP AL,'E'
  24. JE EQUAL
  25. INC CX
  26. INT 21H
  27. JMP WHILE_
  28.  
  29. EQUAL:
  30. INC BL
  31. JMP START
  32.  
  33. END_:
  34. MOV AH,2
  35. MOV DL,0DH
  36. INT 21H
  37. MOV DL,0AH
  38. INT 21H
  39.  
  40. MOV AH,2
  41. MOV DL,BL
  42. INT 21H
  43.  
  44. MAIN ENDP
  45. END MAIN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement