Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; multi-segment executable file template.
- data segment
- ; add your data here!
- helloWorld db "Hello World$"
- pkey db "Press any key to continue...$"
- hello db "Hello$"
- enterSymbol db "Enter cymbol: $"
- xPos db 5 ,75, 75, 5
- yPos db 2, 2, 22, 22
- ends
- stack segment
- dw 128 dup(0)
- ends
- code segment
- start:
- ; set segment registers:
- mov ax, data
- mov ds, ax
- mov es, ax
- ;----------------Hello World
- mov dh, 12
- mov dl, 34
- mov ah, 02h
- int 10h
- lea dx, helloWorld
- mov ah, 9
- int 21h
- ;----------------4 1 2 4 (for 1 to 4)
- mov bx,0
- mov cx,4
- mov ah,02h
- ckl4124:
- mov dl, xPos[bx]
- mov dh, yPos[bx]
- int 10h
- inc bl
- mov dl, bl
- add dl, 48
- int 21h
- loop ckl4124
- ;----------------Press any key text
- mov dh, 22
- mov dl, 26
- mov ah, 02h
- int 10h
- lea dx, pkey
- mov ah, 09h
- int 21h
- ;----------------Wait for any key....
- mov ah, 1
- int 21h
- ;----------------Screan clear
- mov al, 02h
- mov ah, 00h
- int 10h
- ;----------------Hello vertical
- mov si, 0
- mov cx, 5
- mov ah, 02h
- ckl:
- mov dh, 15
- sub dh, cl
- mov dl, 40
- int 10h
- mov dl, hello[si]
- int 21h
- int 10h
- inc si
- loop ckl
- ;----------------Wait for any key....
- mov ah, 1
- int 21h
- ;----------------Screan clear
- mov al, 02h
- mov ah, 00h
- int 10h
- ;---------------Enter Symbol
- lea dx, enterSymbol
- mov ah, 09h
- int 21h
- mov ah, 1
- int 21h
- mov dh, 12
- mov dl, 40
- mov ah, 02h
- int 10h
- mov ah, 9
- mov cx, 1
- mov bl, 02h
- int 10h
- ;----------------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