home *** CD-ROM | disk | FTP | other *** search
/ Boot Disc 8 / boot-disc-1997-04.iso / PDA_Soft / Psion / misc / Xfile / SAMPLE.OPL < prev    next >
Text File  |  1995-03-28  |  1KB  |  52 lines

  1. REM
  2. REM  XFILE V1.3
  3. REM
  4. REM  This is the starter code. It is designed to
  5. REM  use as little memory as possible at the point
  6. REM  of starting another application.
  7. REM
  8. REM  Copyright Raymond Stone 1995. 
  9. REM
  10. REM  This is the 'resident' version of the XFILE starter. It has 
  11. REM  changed from the versions used in pre 1.3 releases.
  12. REM
  13.  
  14. REM <-----> This is the 'group' name
  15. REM         you change this for EACH xfile group you create
  16. APP XTEST
  17.         TYPE $1000
  18.     ICON "B:\PIC\bubble.pic"
  19. REM       <--------------> Select it's icon, change the above line
  20. REM                        to whatever icon file you wish
  21. ENDA
  22.  
  23. PROC startapp:
  24.     GLOBAL pid%,cmdl$(128),ret%,sys$(128),keepres%
  25.     CACHE 20000,30000
  26.     keepres%=1
  27.     while keepres%=1
  28.         handlerX:
  29.         CACHETIDY
  30.         if sys$=""
  31.             STOP
  32.         endif
  33.         ret%=call($0187,addr(sys$)+1,addr(cmdl$),0,0,addr(pid%))
  34.         if ret%<0
  35.             print "Couldn't start application"
  36.             print err$(ret%)
  37.             get
  38.         endif
  39.         call($0688,pid%,0,0,0,0)
  40.     endwh
  41. ENDP
  42.  
  43. proc handlerx:
  44. REM      <----------------------> change this to location of file
  45.     LOADM "LOC::M:\OPO\XFILE.LIB"
  46.     sys$=cmd$(5)
  47.     XFILE:
  48. REM        <---------------------> change this to match above
  49.     UNLOADM "LOC::M:\OPO\XFILE.LIB"
  50. endp
  51.  
  52.