Advertisement
Guest User

promal

a guest
Apr 5th, 2020
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.84 KB | None | 0 0
  1. program cp
  2.  
  3. include library
  4. include prosys
  5.  
  6. data word diskutils="1:diskutils.c"
  7. data word cpmain="1:cp_main.c"
  8.  
  9. word f
  10.  
  11. ;======================================
  12.  
  13. begin
  14.  
  15. ;load diskutils module, don't execute:
  16. f=open(diskutils)
  17. if f=0 and ioerror=4 ;file not found
  18.  m[diskutils]='0'
  19.  f=open(diskutils)
  20.  if f=0 and ioerror=4 ;file not found
  21.    abort"#cCan't find #s, aborting!",diskutils+2
  22. load diskutils,ldnogo
  23. if lderr <> 0
  24.   output"#c#s:",diskutils
  25.   abort "#cload error #i, aborting!",lderr
  26.  
  27. ;load main module, unloading this one,
  28. ;and pass control to it:
  29. f=open(cpmain)
  30. if f=0 and ioerror=4 ;file not found
  31.   m[cpmain]='0'
  32.   f=open(cpmain)
  33.   if f=0 and ioerror=4 ;file no found
  34.     abort"#cCan't find #s, aborting!",cpmain+2
  35. load cpmain
  36. if lderr <> 0
  37.  output"#c#s:",cpmain
  38.  abort "#cload error #i, aborting!",lderr
  39.  
  40. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement