home *** CD-ROM | disk | FTP | other *** search
- ;**********
- ;* CLI()
- ;* Clear Interrupt Mask : i.e., holds interrupts.
- ;**********
- ;***
- ;* CRIT( CLNUM, FP , ARGLIST , , , )
- ;* Crit is used when function FP is critical. You call crit and give as 1st
- ;* argument, a pointer to the critical function to execute, and then, the
- ;* list of arguments to pass to f().
- ;* REMARK : CRIT() assumes that the calling function had BP pointing to the
- ;* base of its local frame.
- ;***
- ;*******
- ;* EXITMP( STATUS )
- ;* This function is invoked to cleanly exit the multi-tasking application.
- ;* It detaches all interrupt routines attached by the multi-tasking
- ;* application, restores the timer interrupt vector to point to original
- ;* service routine, and then invokes EXIT() the close all files and
- ;* return to dos.
- ;*******
- ;**********
- ;* GETF()
- ;* Returns CPU flags registers.
- ;**********
- ;***
- ;* GUC()
- ;* Give Up Control : the task calling guc is immediately preempted by the
- ;* switcher if it is awake.
- ;***
- ;***
- ;* INTMGR is called automatically when an interrupt has a function attached
- ;* to it thru INTATT(). It saves all registers, then call the attached
- ;* function with two arguments :
- ;* 1> a ptr to the intlst
- ;* 2> a ptr to the intstate
- ;* and returns to an IRET or a JUMP to the original interrupt vector.
- ;***
- ;************
- ;* KBDGET()
- ;* Reads from keyboard buffer, and translate extended set characters, like
- ;* SCR's INCHAR().
- ;************
- ;************
- ;* KBDSCAN()
- ;* This routine returns a TRUE/FALSE value answering the question
- ;* 'Is there something in the keyboard buffer???'
- ;************
- ;*********
- ;* OISR( INTLST, REGOFF, REGSEG ) - This function is called within an
- ;* attached ISR to invoke the original ISR
- ;*********
- ;****
- ;* PEEK( SEG, OFFSET, BUF, LEN )
- ;****
- ;****
- ;* POKE( SEG, OFFSET, BUF, LEN )
- ;****
- ;***
- ;* PROUT( X , Y , V , STRING )
- ;* Display 'string' on monochrome screen at position x, y.
- ;* Fully reentrant.
- ;***
- ;***
- ;* PUTF( FLAGS )
- ;* Sets CPU flags register to FLAGS.
- ;***
- ;****
- ;* REPMEM( TO, TMPL, TSIZE, NTMPL )
- ;****
- ;*******
- ;* INITFPC( PTR )
- ;* Initialize the area pointed by PTR with current 87 regs.
- ;*******
- ;*******
- ;* SLICER()
- ;* Slicer() is responsible for the context switching which occurs whenever
- ;* the current process has expired its time slice. (A time slice is defined
- ;* as the number of time quantum units assigned to that process.)
- ;* It saves the current proc's registers (except for the SS and SP) using
- ;* a PUSHA instruction. The SS and SP are then copied in the process's PCB.
- ;* The next ready-to-run process's state is then restored by first
- ;* activating that process' SS and SP and then executing a POPA instruction
- ;* which then restores all other registers.
- ;* A jump to the original timer service routine is done so that nothing is
- ;* disturbed.
- ;*******
- ;*******
- ;* _TS_BOOT()
- ;* 1) Installs the initial PCB at _base, initializes it, and reset _base.
- ;* 2) Copies the 4 byte interupt vector from location 0:_SLINT to CS:JADDR
- ;* prior to installing the slicer.
- ;*******
- ;*******
- ;* SSLEEP()
- ;* Ssleep() puts the slicer to sleep. This routine is invoked by a process
- ;* which does not want to be interrupted by the slicer. The slicer stays
- ;* asleep until SWAKE() is called as many times as SSLEEP() was invoked.
- ;* This level of slicer sleep nesting is kept in _SSLEV.
- ;* The method used to put the slicer to sleep involves modifying the slicer's
- ;* first instruction so that it causes a jump to the original timer service
- ;* routine.
- ;*******
- ;*******
- ;* TS_STKOVF()
- ;* This routine is jump to whenever a stack overflow occurs within a process.
- ;* It prints a message at (0,0), and informs the user of the overflowing
- ;* curproc address.
- ;*******
- ;*******
- ;* SWAKE()
- ;* This function is invoked to wake up the slicer. It decrements the
- ;* sleeping level of the slicer, and if it reaches zero, really
- ;* wakes up the slicer by modifying its first instruction so that
- ;* instead of jumping to original timer interrupt service routine,
- ;* it jumps to the next instruction.
- ;*******
-