home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / oper_sys / fp / ifp_unix.lzh / ifp / interp / dos.s < prev    next >
Encoding:
Text File  |  1989-05-23  |  2.2 KB  |  69 lines

  1. ;
  2. ;/****** dos.s**********************************************************/
  3. ;/**                                                                  **/
  4. ;/**                    University of Illinois                        **/
  5. ;/**                                                                  **/
  6. ;/**                Department of Computer Science                    **/
  7. ;/**                                                                  **/
  8. ;/**   Tool: IFP                         Version: 0.5                 **/
  9. ;/**                                                                  **/
  10. ;/**   Author:  Arch D. Robison          Date:   May 1, 1985          **/
  11. ;/**                                                                  **/
  12. ;/**   Revised by: Arch D. Robison       Date: Sept 28, 1985          **/
  13. ;/**                                                                  **/
  14. ;/**   Principal Investigators: Prof. R. H. Campbell                  **/
  15. ;/**                            Prof. W. J. Kubitz                    **/
  16. ;/**                                                                  **/
  17. ;/**                                                                  **/
  18. ;/**------------------------------------------------------------------**/
  19. ;/**   (C) Copyright 1987  University of Illinois Board of Trustees   **/
  20. ;/**                       All Rights Reserved.                       **/
  21. ;/**********************************************************************/
  22.  
  23. ;/***** Assembly Language Routines for MS-DOS Implementation of IFP *****/
  24.  
  25. TITLE   dos
  26.  
  27. PUBLIC  _StackCheck, _SetCBrk
  28. EXTRN    __chkstk:FAR
  29.  
  30. DOS_TEXT    SEGMENT  BYTE PUBLIC 'CODE'
  31.  
  32.  
  33.     ASSUME  CS: DOS_TEXT
  34. ;
  35. ; SetCBrk
  36. ;
  37. ; Set control-C trapping for any DOS call.
  38. ;
  39. _SetCBrk     PROC FAR
  40.         mov ax,3301H
  41.         mov dl,01H
  42.         int 21H
  43.     ret    
  44. _SetCBrk     ENDP
  45.  
  46. ;
  47. ; StackCheck
  48. ;
  49. ; Check if there is enough room on the stack and check for break signal
  50. ;
  51. _StackCheck  PROC FAR
  52.     push    bp
  53.     mov    bp,sp
  54.     mov    ax,64H
  55.     call    FAR PTR __chkstk
  56.         push es
  57.         mov ah,2FH
  58.         int 21H        ; Dummy GET_DTA to look for control-C
  59.         pop es
  60.     mov    sp,bp
  61.     pop    bp
  62.     ret    
  63. _StackCheck  ENDP
  64.  
  65. DOS_TEXT    ENDS
  66. END
  67.  
  68. ;/************************** end of dos.s **************************/
  69.