Jump to content
  • entries
    9
  • comments
    5
  • views
    24,606

The Creative Atari Part 2


Allan

800 views

1440 PRINT "2. 'A' TO CHECK ALL FILES;"

1450 PRINT "3. 'D' TO SEE DIRECTORY LIST AGAIN"

1460 PRINT "NOTE: ERRORS SHOW UP ON DIR LISTING "

1470 PRINT "AFTER THEY OCCUR IN SEARCH."

1480 INPUT N$

1490 IF N$="A" THEN FILE=128:GOTO 1690

1500 IF N$"D" THEN GRAPHICS 0:GOTO 1070

1510 ON ERROR 1540

1520 FILE=VAL(N$)

1530 GOTO 1560

1540 PRINT "ERROR. RE-ENTER."

1550 RESUME 1420

1560 REM --- PROCESS. CHECK.

1570 IFFILE>FNUM OR FILE<0 OR FILE<>INT(FILE) THEN PRINT "ERROR.":GOTO 1420

1580 REM SINGLE ENTRY HANDLER

1590 PRINT "TRACING=='SELECT' TO ABORT."

1600 SS=INFO(FILE,2) ! STARTING SECT

1610 SC=INFO(FILE,1) ! SECTOR COUNT

1620 RSECTOR=SS

1630 REM GO TRACE IT ...ARROR=RETURN

1640 GOSUB 1850

1650 IF ARROR=1 THEN PRINT "***BAD FILE***"

1660 IF ARROR=1 THEN DEAD(FILE)=1 ELSE DEAD(FILE)=-1

1670 GOSUB 2110 ! MARK FILE NAME

1680 GOTO 1350

1690 REM ALL ENTRIES HANDLER

1700 FOR FILE=1 TO FNUM

1710 CLS

1720 PRINT "TRACING FILE #";FILE

1730 IF LP=1 THEN PRINT #3,"TRACING FILE #";FILE

1740 PRINT "PRESS 'SELECT' TO ABORT."

1750 SS=INFO(FILE,2) ! STARTING SECT

1760 SC=INFO(FILE,1) ! SECTOR COUNT

1770 RSECTOR=SS

1780 GOSUB 1850

1790 IF ARROR=1 THEN PRINT "***BAD FILE***" **"

1800 IF ARROR=1 THEN DEAD(FILE)=1 ELSE DEAD(FILE)=-1

1810 GOSUB 2110

1820 NEXT FILE

1830 PRINT "COMPLETED."

1840 GOTO 1350

1850 REM TRACING SUBROUTINE

1860 ARROR=0

1870 PRINT

1880 PRINT "---SEC CNT=";SC;" READING SEC ";RSECTOR

1890 POKE &D01F,0 ' CLEAR BUTTONS

1900 GOSUB 70 'READ

1910 REM CHECK BUTTONS

1920 IF PEEK(&D01F)<>7 THEN RETURN

1930 IF DSTATS=1 THEN 1960

1940 PRINT "***ERROR. DSTATS=;DSTATS;" ON SECTOR ";RSECTOR

1950 GOTO 1900 !RETRY

1960 IF SC=0 THEN RETURN

1970 SC=SC-1 ! DECR S COUNT

1980 REM GET FORWARD POINTER + FNUM

1990 FWD=(PEEK(BUFF+125) AND 3)*256

2000 FWD=FWD+PEEK(BUFF+126)

2010 FN=INT((PEEK(BUFF+125) AND &FC)/4) ! WENCE, SWIFTED 2 BITS RIGHT

2020 FN=FN+1 ! (DISK STARTS AT 0)

2030 PRINT "---DATA: FILE NUM=";FN;" FWD SEC =";FWD

2040 IF FN<>FILE THEN PRINT "FILE NUMBER ERROR.":ARROR=1

2050 IF FWD>720 OR FWD<0 THEN PRINT "FORWARD PTR OUT OF RANGE,ABORT.:ARROR=1:RETURN

2060 IF FWD=0 THEN 2090

2070 RSECTOR=FWD

2080 GOTO 1870

2090 PRINT "COMPLETED."

2100 RETURN

2110 REM MARK A FILE AS BAD IN NAME.

2120 REM SET HIGH BIT SO IT SHOWS

2130 REM UP IN INVERSE VIDEO..

2140 IF ARROR=0 THEN RETURN

2150 Z$=NIME$(FILE)

2160 NIME$(FILE)=""

2170 FOR Z=1 TO LEN(Z$)

2180 NIME$(FILE)=NIME$(FILE)+CHR$((ASC(MID$(Z$,Z,1)) OR &80)) !SET HIGH BIT

2190 NEXT Z

2200 RETURN

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...