src/main.c
/************************************************************************/
/*									*/
/*		  	   s t a r t _ l i s p				*/
/*									*/
/*	This is the function that actually starts up the lisp emulator.	*/
/*									*/
/*									*/
/************************************************************************/
s t a r t _ l i s p

This is the function that actually starts up the lisp emulator.
s t a r t _ l i s p This is the function that actually starts up the lisp emulator .
void start_lisp() {
  DLword *freeptr, *next68k;
#ifndef INIT
  {
    INTSTAT *intstate = ((INTSTAT *)Addr68k_from_LADDR(*INTERRUPTSTATE_word));
    intstate->ETHERInterrupt = 0;
    intstate->LogFileIO = 0;
    intstate->IOInterrupt = 0;
    intstate->waitinginterrupt = 0;
    intstate->intcharcode = 0;
  }
#endif 
  TopOfStack = 0;
  Error_Exit = 0;
  MState->pvar = (DLword *)Addr68k_from_LADDR(STK_OFFSET | InterfacePage->currentfxp) + FRAMESIZE;
  freeptr = next68k = Addr68k_from_LADDR(STK_OFFSET | CURRENTFX->nextblock);
  if (GETWORD(next68k) != STK_FSB_WORD) error("Starting Lisp: Next stack block isn't free!");
  while (GETWORD(freeptr) == STK_FSB_WORD) EndSTKP = freeptr = freeptr + GETWORD(freeptr + 1);
  CurrentStackPTR = next68k - 2;
  FastRetCALL;
  int_init();
#ifdef DOS
  _dpmi_lockregion((void *)&dispatch, 32768);
#endif 
  dispatch();
}
void start_lisp ( ) { DLword * freeptr , * next68k ; #ifndef INIT { INTSTAT * intstate = ( ( INTSTAT * ) Addr68k_from_LADDR ( * INTERRUPTSTATE_word ) ) ; intstate -> ETHERInterrupt = 0 ; intstate -> LogFileIO = 0 ; intstate -> IOInterrupt = 0 ; intstate -> waitinginterrupt = 0 ; intstate -> intcharcode = 0 ; } #endif TopOfStack = 0 ; Error_Exit = 0 ; MState -> pvar = ( DLword * ) Addr68k_from_LADDR ( STK_OFFSET | InterfacePage -> currentfxp ) + FRAMESIZE ; freeptr = next68k = Addr68k_from_LADDR ( STK_OFFSET | CURRENTFX -> nextblock ) ; if ( GETWORD ( next68k ) != STK_FSB_WORD ) error ( " " ) ; while ( GETWORD ( freeptr ) == STK_FSB_WORD ) EndSTKP = freeptr = freeptr + GETWORD ( freeptr + 1 ) ; CurrentStackPTR = next68k - 2 ; FastRetCALL ; int_init ( ) ; #ifdef DOS _dpmi_lockregion ( ( void * ) & dispatch , 32768 ) ; #endif dispatch ( ) ; }
s t a r t _ l i s p
s t a r t _ l i s p
/*******************************/ /*  First, turn off any pending interrupts from during VMEMSAVE.	*/ /*  This keeps US from trying to handle OLD interrupts.		*/ /*******************************/ /* INIT */ /* JRB - The interrupt intitialization must be done right before */ /*       entering the bytecode dispatch loop; interrupts get     */ /*       unblocked here 					     */ /* DOS */