TIMER.ASM 599 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. .model small
  2. .code
  3. ORG 100h
  4. start:
  5. mov ax, 351ch
  6. int 21h
  7. mov ofs_1c, bx
  8. mov seg_1c, es
  9. mov ax, 251ch
  10. mov dx, offset int_1c
  11. int 21h
  12. mov ah, 31h
  13. mov dx, 50h
  14. int 21h
  15. int_1c:
  16. inc cnt
  17. cmp cnt, 39
  18. je wrt
  19. jmp dword ptr ofs_1c
  20. wrt: push ax
  21. push bx
  22. push es
  23. mov cnt, 1
  24. mov ax, 0b800h
  25. mov es, ax
  26. mov bx, from
  27. inc from
  28. mov bx, [bx]
  29. mov es:[0], bx
  30. pop es
  31. pop bx
  32. pop ax
  33. jmp dword ptr ofs_1c
  34. cnt db 0
  35. ofs_1c dw 0
  36. seg_1c dw 0
  37. from dw 0
  38. end start