Advertisement
Guest User

Untitled

a guest
Dec 8th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. #fasm#
  2. ;#make_boot#
  3.  
  4.  
  5. org 7c00h
  6.  
  7. mov ah, 2
  8. xor dx, dx
  9. mov cl, 1
  10. mov al ,1
  11. mov bx, buf1
  12. int 13h
  13.  
  14. mov ah, 2
  15. mov dl, 1
  16. mov cl, 1
  17. mov al ,1
  18. mov bx, buf2
  19. int 13h
  20.  
  21. xor dx, dx
  22. mov cx, 256
  23. ;mov ax,word[buf1]
  24. ;add ax,word[buf2]
  25. ;mov word[buf3],ax
  26. cycle:
  27.  
  28. mov ax, word[buf1 + si]
  29. adc ax, word[buf2 + si]
  30. mov word[buf3 + si], ax
  31. mov dx,word[buf3 + si]
  32. inc si
  33. inc si
  34. mov bx, word[buf1 + si]
  35. adc bx, word[buf2 + si]
  36. mov word[buf3 + si], bx
  37. mov dx,word[buf3 + si]
  38. inc si
  39. inc si
  40. loop cycle
  41.  
  42. mov ah, 3
  43. mov dl, 2
  44. mov cl, 1
  45. mov al ,1
  46. mov bx, buf3
  47. int 13h
  48.  
  49.  
  50.  
  51.  
  52. mov ax,4c00h
  53. int 21h
  54. buf1 db 512 dup(0)
  55. buf2 db 512 dup(0)
  56. buf3 db 512 dup(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement