home *** CD-ROM | disk | FTP | other *** search
- ;a simple program with a procedure
- .MODEL SMALL
- .CODE
- MAIN PROC
- Start: ;a good place to start.
- ASSUME CS:@CODE, DS:@CODE ;don't worry about this for now
-
- Call Display_Hi ;Call the procedure Display_Hi
- MOV AX,4C00h ;terminate program and return to DOS using
- INT 21h ;interrupt 21h function 4CH
-
- Display_Hi PROC ;Defines start of procedure
- mov dx,OFFSET HI ;display a message onto the screen
- mov ah,9 ;saying that there is a joystick
- int 21h ;interrupt 21h
- RET ;THIS HAS TO BE HERE
- Display_Hi ENDP ;Defines end of procedure
- Main ENDP
- .DATA
- HI DB "Hello There!$" ;define a message
- END MAIN