home *** CD-ROM | disk | FTP | other *** search
/ Game Developers Magazine 6 / GDM006.ZIP / ASMINTRO / TESTPROC.ASM < prev    next >
Assembly Source File  |  1995-01-17  |  893b  |  22 lines

  1. ;a simple program with a procedure
  2. .MODEL  SMALL
  3. .CODE
  4. MAIN    PROC
  5. Start:                          ;a good place to start.
  6.         ASSUME  CS:@CODE, DS:@CODE ;don't worry about this for now        
  7.         
  8.         Call Display_Hi         ;Call the procedure Display_Hi
  9.         MOV AX,4C00h            ;terminate program and return to DOS using
  10.         INT 21h                 ;interrupt 21h function 4CH
  11.  
  12. Display_Hi PROC                 ;Defines start of procedure
  13.         mov dx,OFFSET HI        ;display a message onto the screen
  14.         mov ah,9                ;saying that there is a joystick
  15.         int 21h                 ;interrupt 21h
  16.         RET                     ;THIS HAS TO BE HERE
  17. Display_Hi ENDP                 ;Defines end of procedure
  18. Main    ENDP
  19. .DATA                            
  20. HI      DB "Hello There!$"      ;define a message
  21.         END MAIN
  22.