home *** CD-ROM | disk | FTP | other *** search
/ Commodore 64 Scene Diskmags Assortment / Vision_02_19xx_Vision_Side_C.d64 / ldfile.bx (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  761b  |  37 lines

  1. 0 rem mozart tue14dec93 ml file load
  2. 1 rem basic opens and closes files
  3. 2 rem and checks for i/o errors
  4. 3 :
  5. 6 il%=10:a$="":a=0:lo=0
  6. 7 dv=peek(186):ze$=chr$(0):fi$=""
  7. 8 en=0:em$="":et=0:es=0
  8. 9 :
  9. 10 close15:open15,dv,15:close15
  10. 11 if st=0 then20
  11. 12 print"[150][196]evice not present"
  12. 13 goto90
  13. 19 :
  14. 20 open15,dv,15:rem command channel
  15. 29 :
  16. 30 input"[159][198]ilename to load[158]";fi$
  17. 31 if len(fi$)<1 then30
  18. 32 fi$=fi$+",p"
  19. 39 :
  20. 40 open il%,dv,0,fi$:rem input channel
  21. 41 gosub1000:rem check drive channel
  22. 42 if en>19 and en<>73 then90
  23. 43 :
  24. 44 print"[159][204]oading file ... [158]";fi$;"[159]"
  25. 49 :
  26. 50 sys2762:rem execute loader ml
  27. 59 :
  28. 90 print"[159]":close il%:close 15
  29. 91 clr:end:rem exit
  30. 99 :
  31. 1000 rem drive channel i/o check
  32. 1010 input#15,en,em$,et,es
  33. 1020 if en<20 or en=73 then return
  34. 1030 print"[150]";en;em$;et;es
  35. 1040 return
  36. 1099 :
  37.