Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- org 100h
- Start:
- mov si, 0
- mov di, 0
- xor ax, ax
- xor si, si
- 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, 5, 2, 1
- arr2 db 8, 2, 7, 1
- res db 1, 2, 3, 4, 5, 1, 1, 1
- ;res db 8 dup (?)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement