Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;===START=======================================
- [bits 16]
- segment code
- start:
- ;===============================================
- ; sets up DS to point to the
- ; data segment, and initialises
- ; SS and SP to point to the top
- ; of the provided stack.
- ;===============================================
- mov ax,data
- mov ds,ax
- mov ax,stack
- mov ss,ax
- mov sp,stacktop
- ;===============================================
- ; print the string
- ;===============================================
- ;mov dx,hello
- ;mov ah,09h
- ;int 21h
- mov ax,seg hello
- mov es,ax
- mov ax,0e01h
- mov bx,0007h
- mov cx,lmsg
- mov dx,0000h
- mov bp,hello
- int 10h
- ;===============================================
- ; terminates the program
- ;===============================================
- mov ax,4c00h
- int 21h
- segment data
- hello db 'hello, world'
- lmsg equ $-hello
- segment stack stack
- resb 64
- stacktop:
- ;===END=========================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement