home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / PROG / MISC / FPC355_2.ZIP / FPCSRC.ZIP / DEFAULT.SEQ < prev    next >
Encoding:
Text File  |  1989-07-03  |  1.1 KB  |  31 lines

  1. \ DEFAULT       Open file specified from command line.  by Tom Zimmer
  2.  
  3. \ Link this file into the FILELIST chain.
  4.  
  5. FILES DEFINITIONS
  6.  
  7. VARIABLE DEFAULT.SEQ
  8.  
  9. FORTH DEFINITIONS
  10.  
  11. 128 CONSTANT DOS-LINE
  12. CREATE CFGHNDL STRING,-T KERNEL.CFG" B/HCB ALLOT
  13.  
  14. : DOS>TIB       ( --- )
  15.                 dos-line count dup #tib ! tib swap cmove >in off ;
  16.  
  17. : HDEFAULT      ( -- )
  18.                 %off> ?loaded,          \ disable LOADED, this time ONLY
  19.                 cfghndl $fload drop     \ we don't care if it exists
  20.                 seqhandle clr-hcb dos-line c@ 0<>
  21.                 if      dos>tib                       \ move dosline to tib
  22.                         bl word 1+ c@ ASCII - <>      \ is - in place of file
  23.                         if      here    $file         \ can we open it?
  24.                                 if      >in off       \ if not just passon
  25.                                 then    loadline off
  26.                         then            \ if first word is - then skip HOPEN
  27.                 then    ;               \ skip whole thing if dosline is null
  28.  
  29. ' HDEFAULT IS DEFAULT
  30.  
  31.