Advertisement
Guest User

Untitled

a guest
Dec 11th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. %include "io.inc"
  2. section .text
  3.  
  4. global CMAIN
  5. CMAIN:
  6. mov ebp, esp; for correct debugging
  7. mov ebx,m
  8. call tabul
  9. ret
  10. tabul: xor ecx,ecx
  11. xor edx,edx
  12. mov dl,20h
  13. tryagain: cmp cx,len
  14. je uidi
  15. cmp [m+ecx],dl
  16. je zamena
  17. cmp [m+ecx+1],dl
  18. je zamena
  19. cmp [m+ecx+2],dl
  20. je zamena
  21. mov ah,[m+ecx]
  22. PRINT_DEC 1,ah
  23. mov [neu+ecx],ah
  24. inc ecx
  25. jmp tryagain
  26. zamena: mov al,9h
  27. mov [neu],al
  28. add ecx,3
  29. jmp tryagain
  30. uidi: ret
  31. section .Data
  32. m db 4, 0,3 ,9
  33. neu db 0
  34. len equ $-m
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement