home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 10: Diskmags / nf_archive_10.iso / MAGS / ST_USER / 1990 / USERJA90.MSA / LISTINGS_FFORMAT.BAS < prev    next >
BASIC Source File  |  1989-10-26  |  2KB  |  59 lines

  1. REM FastDisc Formatter By R.Waddilove
  2. REM Speeds up loading/saving by 50%
  3. REM Makes your discs go twice as fast
  4. REM HiSoft Basic
  5. REM $OPTION Y+
  6.  
  7. LIBRARY "gemaes"
  8. LIBRARY "XBIOS"
  9.  
  10. REM ------------ Open window ------------------
  11. button% = FNform_alert%(1,"[2][   Format the disc   |Single or Double sided?][Single|Double| Quit ]")
  12. IF button% = 3 THEN SYSTEM
  13. drive% = FNform_alert%(1,"[2][ Drive A or B ][ A | B ]")-1
  14. dummy% = FNform_alert%(1,"[3][ Insert the disc | to be formatted ][ Format ]")
  15.  
  16. res% = FNgetrez%
  17. IF res% THEN x%=184:y%=40 ELSE x%=24:y%=32
  18. IF res%=2 THEN h%=120 ELSE h%=64
  19. w% = 272
  20.  
  21. graf_growbox x%,y%,1,1,x%,y%,w%,h%
  22. WINDOW OPEN 7," FastDisc Formatter ",x%,y%,w%,h%,1
  23. WINDOW OUTPUT 7
  24.  
  25. REM ------------- Format disc -------------------
  26. buffer$ = STRING$(10000,0)
  27. sides% = button%-1
  28. buffer& = SADD(buffer$)+1 AND &HFFFFFFFE
  29. FOR track% = 0 TO 79
  30.     dummy$ = INKEY$
  31.     FOR side% = 0 TO sides%
  32.         dummy% = FNflopfmt%(buffer&,0,drive%,9,track%,side%,11)
  33.         GOTOXY 0,1:PRINT "   Formatting side";side%;"track";track%
  34.     NEXT
  35. NEXT
  36.  
  37. REM ---------------- Zero buffer ----------------
  38. FOR i&=0 TO 10000-4 STEP 4
  39.     POKEL buffer&+i&,0
  40. NEXT
  41.  
  42. REM ---------- Write buffer to track 0 ----------
  43. dummy% = FNflopwr%(buffer&,drive%,1,0,0,9)
  44. IF sides%=1 THEN dummy% = FNflopwr%(buffer&,drive%,1,0,1,9) ELSE dummy% = FNflopwr%(buffer&,drive%,1,1,0,9)
  45.  
  46. REM ------------ Create boot sector -------------
  47. IF sides%=1 THEN disctype%=1 ELSE disctype% = 2
  48. protobt buffer&,&H1000000,disctype%,0
  49.  
  50. REM ------------ Write boot sector --------------
  51. dummy% = FNflopwr%(buffer&,drive%,1,0,0,1)
  52.  
  53. GOTOXY 0,3:PRINT " Disc formatted ..... Click mouse"
  54. WHILE ( MOUSE(2)=0 ) : WEND
  55.  
  56. WINDOW CLOSE 7
  57. graf_shrinkbox x%,y%,1,1,x%,y%,w%,h%
  58. SYSTEM
  59.