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...$"
- A DB 11 DUP (?)
- ends
- stack segment
- dw 128 dup(0)
- ends
- code segment
- start:
- ; set segment registers:
- mov ax, data
- mov ds, ax
- mov es, ax
- // הקוד
- ; add your code here
- mov di, 0
- mov al, 0
- mov bl, 0
- K:
- cmp di, 10
- je finish
- mov al, A[di]
- add di, 1
- add al, A[di]
- cmp bl, al
- jbe K
- mov bl, al
- jmp K
- finish:
- mov al, bl
- // סוף הקוד
- 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