Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- org 100h
- Start:
- mov si, 0
- mov di, 0
- Fill1:
- movsx bx, [arr1 + si]
- mov [res + si], bl
- inc si
- cmp si, 4
- jne Fill1
- xor si, si
- Fill2:
- movsx bx, [arr2 + si + 1]
- mov [res + si], bl;bl
- inc si
- cmp si, 4
- jne Fill2
- xor ax, ax
- mov si, 0
- mov di, 0
- ReviewRes:
- movsx bx, [res + si]
- mov di, 0
- WatchFurther:
- movsx cx, [res + di]
- cmp si, di
- je Continue
- cmp bx, cx
- je BreakInnerLoop
- cmp di, 8
- je @F
- jmp Continue
- @@:
- inc ax
- jmp BreakInnerLoop
- Continue:
- inc di
- cmp di, 8
- jbe WatchFurther
- BreakInnerLoop:
- inc si
- cmp si, 8
- jbe ReviewRes
- PrintRes:
- ;print ax
- mov bx, ax
- add bx, '0'
- mov ah, $02
- mov dx, bx
- int 21h
- mov ah, $09
- mov dx, pak
- int 21h
- mov ah, $08
- int 21h
- ret
- pak db 13, 10, 'Press any key to exit...$'
- arr1 db 1, 2, 3, 4
- arr2 db 5, 1, 1, 7
- ;res db 1, 2, 3, 4, 5, 1, 1, 1
- res db 8 dup (?)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement