home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / s / s001 / 1.ddi / TS / ASM / DOC < prev    next >
Encoding:
Text File  |  1991-03-11  |  4.0 KB  |  117 lines

  1. ;**********
  2. ;* CLI()
  3. ;* Clear Interrupt Mask : i.e., holds interrupts.
  4. ;**********
  5. ;***
  6. ;* CRIT( CLNUM, FP , ARGLIST , , , )
  7. ;* Crit is used when function FP is critical. You call crit and give as 1st 
  8. ;* argument, a pointer to the critical function to execute, and then, the
  9. ;* list of arguments to pass to f().
  10. ;* REMARK : CRIT() assumes that the calling function had BP pointing to the
  11. ;* base of its local frame.
  12. ;***
  13. ;*******
  14. ;* EXITMP( STATUS )
  15. ;* This function is invoked to cleanly exit the multi-tasking application.
  16. ;* It detaches all interrupt routines attached by the multi-tasking
  17. ;* application,  restores the timer interrupt vector to point to original
  18. ;* service routine, and then invokes EXIT() the close all files and
  19. ;* return to dos.
  20. ;*******
  21. ;**********
  22. ;* GETF()
  23. ;* Returns CPU flags registers.
  24. ;**********
  25. ;***
  26. ;* GUC()
  27. ;* Give Up Control : the task calling guc is immediately preempted by the
  28. ;* switcher if it is awake.
  29. ;***
  30. ;***
  31. ;* INTMGR is called automatically when an interrupt has a function attached
  32. ;* to it thru INTATT(). It saves all registers, then call the attached
  33. ;* function with two arguments : 
  34. ;*    1> a ptr to the intlst
  35. ;*    2> a ptr to the intstate
  36. ;* and returns to an IRET or a JUMP to the original interrupt vector.
  37. ;***
  38. ;************
  39. ;* KBDGET()
  40. ;* Reads from keyboard buffer, and translate extended set characters, like
  41. ;* SCR's INCHAR().
  42. ;************
  43. ;************
  44. ;* KBDSCAN()
  45. ;* This routine returns a TRUE/FALSE value answering the question
  46. ;* 'Is there something in the keyboard buffer???'
  47. ;************
  48. ;*********
  49. ;* OISR( INTLST, REGOFF, REGSEG ) - This function is called within an 
  50. ;* attached ISR to invoke the original ISR
  51. ;*********
  52. ;****
  53. ;* PEEK( SEG, OFFSET, BUF, LEN )
  54. ;****
  55. ;****
  56. ;* POKE( SEG, OFFSET, BUF, LEN )
  57. ;****
  58. ;***
  59. ;* PROUT( X , Y , V , STRING )
  60. ;* Display 'string' on monochrome screen at position x, y.
  61. ;* Fully reentrant.
  62. ;***
  63. ;***
  64. ;* PUTF( FLAGS )
  65. ;* Sets CPU flags register to FLAGS.
  66. ;***
  67. ;****
  68. ;* REPMEM( TO, TMPL, TSIZE, NTMPL )
  69. ;****
  70. ;*******
  71. ;* INITFPC( PTR )
  72. ;* Initialize the area pointed by PTR with current 87 regs.
  73. ;*******
  74. ;*******
  75. ;* SLICER()
  76. ;* Slicer() is responsible for the context switching which occurs whenever
  77. ;* the current process has expired its time slice. (A time slice is defined
  78. ;* as the number of time quantum units assigned to that process.)
  79. ;* It saves the current proc's registers (except for the SS and SP) using
  80. ;* a PUSHA instruction. The SS and SP are then copied in the process's PCB.
  81. ;* The next ready-to-run process's state is then restored by first
  82. ;* activating that process' SS and SP and then executing a POPA instruction
  83. ;* which then restores all other registers.
  84. ;* A jump to the original timer service routine is done so that nothing is
  85. ;* disturbed.
  86. ;*******
  87. ;*******
  88. ;* _TS_BOOT() 
  89. ;* 1) Installs the initial PCB at _base, initializes it, and reset _base.
  90. ;* 2) Copies the 4 byte interupt vector from location 0:_SLINT to CS:JADDR
  91. ;*    prior to installing the slicer.
  92. ;*******
  93. ;*******
  94. ;* SSLEEP()
  95. ;* Ssleep() puts the slicer to sleep. This routine is invoked by a process
  96. ;* which does not want to be interrupted by the slicer. The slicer stays
  97. ;* asleep until SWAKE() is called as many times as SSLEEP() was invoked.
  98. ;* This level of slicer sleep nesting is kept in _SSLEV.
  99. ;* The method used to put the slicer to sleep involves modifying the slicer's
  100. ;* first instruction so that it causes a jump to the original timer service
  101. ;* routine. 
  102. ;*******
  103. ;*******
  104. ;* TS_STKOVF()
  105. ;* This routine is jump to whenever a stack overflow occurs within a process.
  106. ;* It prints a message at (0,0), and informs the user of the overflowing
  107. ;* curproc address.
  108. ;*******
  109. ;*******
  110. ;* SWAKE()
  111. ;* This function is invoked to wake up the slicer. It decrements the
  112. ;* sleeping level of the slicer, and if it reaches zero, really
  113. ;* wakes up the slicer by modifying its first instruction so that
  114. ;* instead of jumping to original timer interrupt service routine,
  115. ;* it jumps to the next instruction.
  116. ;*******
  117.