Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; You may customize this and other start-up templates;
- ; The location of this template is c:\emu8086\inc\0_com_template.txt
- org 100h
- #make_boot#
- org 7c00h
- ;opening the file
- mov ah,2 ; move
- xor dx,dx ;sets to 1bit
- mov cl,1
- mov al,1
- mov bx, offset num1_buff
- int 13h
- mov ah,2
- mov dx,1
- mov cl,1
- mov al,1
- mov bx, offset num2_buff
- int 13h
- ;commenting @
- ;beggining the order
- lea si, num1_buff
- mov cx, SIZE
- for1:
- mov dx, [si]
- mov ah, 02h
- int 21h
- inc si
- loop for1: ;od prviot fail se iznesuva vo text
- ;pocnuva vo nov red
- MOV dl, 10
- MOV ah, 02h
- INT 21h
- MOV dl, 13
- MOV ah, 02h
- INT 21h
- lea si, num2_buff
- mov cx, SIZE
- for2:
- mov dx, [si]
- mov ah, 02h
- int 21h
- inc si
- loop for2:
- ;nov red
- MOV dl, 10
- MOV ah, 02h
- INT 21h
- MOV dl, 13
- MOV ah, 02h
- INT 21h
- ;;;;;;;;;;;;;;;;;;;;;
- ans db 512 dup (?)
- CARRY db 0
- SIZE dw 100
- xor cx,cx
- xor bx,bx
- mov cx,SIZE
- xor si,si
- cycle:
- mov ax,word[num1_buff + si]
- adc ax,word[num2_buff + si]
- mov word[ans + si],ax
- inc si
- mov bx,word[num1_buff + si]
- adc bx,word[num2_buff + si]
- mov word[ans + si],bx
- loop cycle
- ;cikl kojsto gi prisoedinuva
- lea si, ans
- mov cx, SIZE
- for:
- mov dx, [si]
- mov ah, 02h ; vivod
- int 21h; da se smene!
- inc si
- loop for:
- mov ah,3
- mov dx,2
- mov cl,1
- mov al,1
- mov bx, offset ans
- int 13h
- ;otvet v 3 file
- ;masivi
- num1_buff db 512 dup (?)
- num2_buff db 512 dup (?)
- INT 19h
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement