home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / MFKASM.ZIP / SHUTDOWN.ASM < prev    next >
Assembly Source File  |  1992-08-04  |  2KB  |  71 lines

  1. ;---------------------------------------------------------------------------;
  2. ; M.F.Kaplon  Begun:Mon  07-06-1992    Revised: Mon  07-06-1992
  3. ; Title : shutdown.asm
  4. ;
  5. ; ShutDown System
  6. ;
  7. ; Used 286 routines for simpler KB handling
  8. ;
  9. ; For System Function Calls
  10. ;
  11. ; 1 - Use the Pascal Calling Convention which means
  12. ; 2 - Using .MODEL SMALL
  13. ; 3 - Need a stack certainly greater than the default 1K of .STACK 2K OK this program
  14. ;
  15. ; Assembling and Linking : used a CMD file and Environment Variables
  16. ;
  17. ; cmd file to assemble and link is named mlc-l286
  18. ; and should be called as   :  mlc-l286 filename
  19. ; The cmd file assumes that "filename" is in d:\os2_asm
  20. ; Content of mlc-link286
  21. ;  ml /c d:\os2_asm\%1.asm
  22. ;  link286 /PM:VIO /ALIGN:16 /E %1.obj ;
  23. ;  del *.obj
  24. ;
  25. ; My source files are in D:\os2_asm and I make my calls from the C:
  26. ; root directory so that the EXE files and the OBJ file are in C:\
  27. ; and the EXE file has same name as source file.
  28. ; If you are assembling and linking more than one then you have to
  29. ; make appropriate changes. The above does not make a map or list file
  30. ;
  31. ; I get two warning messages
  32. ;
  33. ; LINK : warning L4036: no automatic data segment
  34. ;
  35. ; This message has to do with no DGROUP being defined
  36. ; It can be suppressed with DATA NONE in a "DEF" file
  37. ;---------------------------------------------------------------------------;
  38.  
  39.  
  40. .286
  41. .MODEL           SMALL,SYSCALL ,OS_OS2
  42.  
  43.  INCLUDE         d:\os2_asm\286_dos.mac       ;macros using DOS calls
  44.  INCLUDE         d:\os2_asm\equates.inc
  45.  INCLUDELIB      c:\toolkt20\os2lib\os2286.lib
  46.  
  47.  
  48. .STACK    8192   ;8K stack
  49.  
  50. .DATA
  51. $DefineNumBufs
  52. $DefineKbdBufs
  53. $DefineVioBufs
  54. $DefineDosBufs
  55.  
  56. .CODE
  57.  
  58. startup:                         ;need to do this way with os/2
  59.  
  60. $PopMsg -1,-1,"<Esc> aborts Shutdown - <Enter> to Continue System ShutDown",Red,White
  61.  
  62. .IF Key == K_ENTER
  63.     $Printf s,"When All Disc Activity has Ceased _ Reboot or Turn System Off"
  64.     $DosShutdown
  65. .ENDIF
  66.  
  67. exit0: $DosExit                  ;exit routine
  68.  
  69. END   startup                           ;required
  70.  
  71.