Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .MODEL SMALL ; IN THIS COURSE ALL MODEL ARE SMALL
- .STACK 100H ; WE ALWAYS USE STACK 100H
- .DATA ; DATA SEGMENT
- MSG DB "HELLO WORLD$" ; DB - Define Byte. 8 bits, DW - Define Word. Generally 2 bytes on a typical x86 32-bit system
- ; $ SIGN IS USE TO END THE STING. IT HELP TO FIND THE STRING ENDING
- .CODE
- MAIN PROC ; MAIN CODE START HERE
- ;PROGRAMME SEGMENT PREFIX
- MOV AX,@DATA
- MOV DS,AX ; INITILATION OF DS
- LEA DX,MSG ; FOR STRING PRINT WE USE LEA FUNCTION TO LOAD THE STRING ; [FULL MEANING LEA : LOAD EFFICIENT ADRESS]
- MOV AH,9 ; FOR STRING PRINT WE USE AH,9 WHICH PRINT MY LOADED STRINT WHICH WAS MSG
- INT 21H ; IT WILL INTRUPT THE WORK.
- MOV AX,4CH ; TERMINATED THE CODE AND EXIT
- INT 21H
- MAIN ENDP
- END MAIN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement