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...$"
- x dw 2
- y dw 3
- putIn dw ?
- arr dw 10 dup ('AA')
- 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 cx, 10
- mov bx, 0
- L:
- call Kefel
- mov ax, putIn
- mov arr[bx], ax
- inc y
- add bx, 2
- loop L
- 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
- Kefel PROC
- push cx
- mov cx, y
- mov ax, 0
- Lolaa:
- add ax,x
- loop Lolaa
- mov putIn, ax
- pop cx
- ret
- Kefel endp
- end start ; set entry point and stop the assembler.
Advertisement
Add Comment
Please, Sign In to add comment