Advertisement
lobaev

Untitled

Dec 9th, 2019
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1.  
  2. ; You may customize this and other start-up templates;
  3. ; The location of this template is c:\emu8086\inc\0_com_template.txt
  4.  
  5. org 100h
  6.  
  7.  
  8. #make_boot#
  9.  
  10. org 7c00h
  11.  
  12.  
  13. ;opening the file
  14.  
  15. mov ah,2 ; move
  16. xor dx,dx ;sets to 1bit
  17. mov cl,1
  18. mov al,1
  19. mov bx, offset num1_buff
  20. int 13h
  21.  
  22. mov ah,2
  23. mov dx,1
  24. mov cl,1
  25. mov al,1
  26. mov bx, offset num2_buff
  27. int 13h
  28.  
  29.  
  30. ;commenting @
  31. ;beggining the order
  32.  
  33. lea si, num1_buff
  34. mov cx, SIZE
  35. for1:
  36. mov dx, [si]
  37. mov ah, 02h
  38. int 21h
  39. inc si
  40. loop for1: ;od prviot fail se iznesuva vo text
  41.  
  42. ;pocnuva vo nov red
  43. MOV dl, 10
  44. MOV ah, 02h
  45. INT 21h
  46. MOV dl, 13
  47. MOV ah, 02h
  48. INT 21h
  49.  
  50. lea si, num2_buff
  51. mov cx, SIZE
  52. for2:
  53. mov dx, [si]
  54. mov ah, 02h
  55. int 21h
  56. inc si
  57. loop for2:
  58.  
  59.  
  60. ;nov red
  61. MOV dl, 10
  62. MOV ah, 02h
  63. INT 21h
  64. MOV dl, 13
  65. MOV ah, 02h
  66. INT 21h
  67. ;;;;;;;;;;;;;;;;;;;;;
  68. ans db 512 dup (?)
  69. CARRY db 0
  70. SIZE dw 100
  71.  
  72.  
  73. xor cx,cx
  74. xor bx,bx
  75. mov cx,SIZE
  76. xor si,si
  77. cycle:
  78. mov ax,word[num1_buff + si]
  79. adc ax,word[num2_buff + si]
  80. mov word[ans + si],ax
  81. inc si
  82. mov bx,word[num1_buff + si]
  83. adc bx,word[num2_buff + si]
  84. mov word[ans + si],bx
  85. loop cycle
  86. ;cikl kojsto gi prisoedinuva
  87.  
  88.  
  89.  
  90.  
  91. lea si, ans
  92. mov cx, SIZE
  93. for:
  94. mov dx, [si]
  95. mov ah, 02h ; vivod
  96. int 21h; da se smene!
  97. inc si
  98. loop for:
  99.  
  100. mov ah,3
  101. mov dx,2
  102. mov cl,1
  103. mov al,1
  104. mov bx, offset ans
  105. int 13h
  106. ;otvet v 3 file
  107.  
  108. ;masivi
  109. num1_buff db 512 dup (?)
  110. num2_buff db 512 dup (?)
  111.  
  112. INT 19h
  113.  
  114. ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement