Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; multi-segment executable file template.
- data segment
- ; add your data here!
- pkey db "press any key...$"
- arr1 DB 36dup (?)
- arr2 DB 36dup (?)
- ends
- stack segment
- dw 128 dup(0)
- ends
- code segment
- start:
- ; set segment registers:
- mov ax, data
- mov ds, ax
- mov es, ax
- mov si,0
- mov bx,0
- mov cx,35
- first:
- mov ax,arr1[bx]
- jmp before_check:
- a1:
- mov arr2[si],ax
- inc si
- inc bx
- loop first
- jmp finish
- before_check:
- mov di,0
- check:
- mov dx,arr2[di]
- cmp ax,dx
- jz a2
- inc di
- cmp di,36
- jz a1
- jmp check
- a2:
- inc bx
- jmp first
- finish: nop
- lea dx, pkey
- mov ah, 9
- int 21h ; output string at ds:dx
- ; wait for any key....
- mov ah, 1
- int 21h
- mov ax, 4c00h ; exit to operating system.
- int 21h
- ends
- end start ; set entry point and stop the assembler.
Advertisement
Add Comment
Please, Sign In to add comment