<<>> PRODOS DOCUMENTATION <<>> <<>> XDOS - Apple Insider <<>> ____________________________ An Apple II History DOC FILE From Apple Insider - ProDOS before it was named - ProDOS ____________________________ THIS INFORMATION COMES FROM THE 'XDOS EXTERNAL REFERENCE MANUAL', A TECHNICAL MANUAL THAT COMES FROM WITHIN APPLE. IT IS SOMEWHAT OUTDATED, SINCE IT IS TITLED 'XDOS', BUT ALL OF THE INFORMATION PRESENTED HERE APPLIES TO PRODOS. THE KERNEL: ----------- THE XDOS KERNEL CONSISTS OF THREE COMPONENTS; THE MACHINE LANGUAGE INTERFACE (MLI), THE BLOCK FILE MANAGER (BFM), AND DEVICE DRIVERS. HERE ARE SOME OF THE CAPABILITIES OF THE XDOS KERNEL: * SUB DIRECTORIES, SELF-EXTENDING AS NEEDED. * NON-DIRECTORY FILE STRUCTURE IS B-REE INDEX. * UP TO 32 MEGABYTES PER VOLUME. * UP TO 16 MEGABYTES PER FILE. * UP TO 32 FILE IDENTIFICATION CODES. * UP TO 8 FILES MAY BE OPENED AT ONCE. * DEFINED, SOS-LIKE MACHINE LANGUAGE INTERFACE. * DEFINED INTERRUPT PROTOCOL. * DIRECT READ/WRITE ACCESS TO DISKS BY BLOCK NUMBER. * FILE STRUCTURES COMPATIBLE WITH APPLE III'S SOS. * FAST TRANSFER RATES, READS APPROX. 8K PER SECOND FROM DISK II. * SUPPORTS ALL APPLE DISK DEVICES. THE XDOS COMMAND INTERPRETER: ---------------------------- THE XDOS CI PROVIDES THE COMMUNICATION PATH TO THE KERNEL FOR THE BASIC PROGRAMMER. SOME OF THE FEATURES OF THE CI ARE: * SYNTAX COMPATIBILITY WITH DOS 3.3. * "HELLO" FILE MAY BE BASIC OR MACHINE LANGUAGE PROGRAM, OR AN EXEC FILE. * BASIC VARIABLES MAY BE STORED AND RESTORED TO/FROM FILES. * MEMORY FOR BUFFERS IS "NEGOTIATED" WITH BASIC, THUS ALLOWING MORE COMPLETE USE OF MEMORY FOR FILES AND PROGRAMS. * ASCII I/O MAY BE CHANNELED FROM/TO MACHINE LANGUAGE "DRIVERS". * ALLOWS READ/WRITE ACCESS TO NON-TEXT FILES FROM BASIC. THE XDOS UTILITIES: ------------------ THE UI COMPLEMENTS THE REST OF THE XDOS SYSTEM. IT PROVIDES THE BASIC TOOLS FOR PREPARING AND ORGANIZING DISKS. THE FUNCTIONS THAT THE UI PROVIDES ARE: * VOLUME FORMATTING, ALL DEVICES. * VOLUME COPYING BETWEEN TWO LIKE DEVICES. * VOLUME COMPARISON, TO VERIFY THAT THEY ARE THE SAME. * VOLUME INTEGRITY CHECK. * FILE STRUCTURE CONVERSION FROM DOS 3.3 TO/FROM XDOS. * FILE COPYING BETWEEN DISKS OR DIRECTORIES. * FILE COMPARISON, TO VERIFY THAT TWO FILES ARE THE SAME. * CREATING, DELETING, AND RENAMING OF FILES. * WILDCARD FILENAME PROCESSING WHERE APPROPRIATE. * "HELP" FACILITIES. DUCK: ---- THIS IS A UTILITY FILE ON THE PRODOS MASTER DISK, USED FOR CONVERTING TO/FROM DOS 3.3 AND PRODOS. ITS FUNCTONING IS OBVIOUS, AND EVEN INCLUDES INSTRUCTIONS. EXECUTE WITH THE "-DUCK" COMMAND. FILE TYPES: TYPE NAME: ABRV: COMMENTS: --------------- -- ---------- DIRECTORY DR WRITE ONLY BY XDOS XDOS KERNEL $$ XDOS SYTEM FILE XDOS INTERP. CI AN XDOS INTERPRTER TEXT FILE TX ASCII STRINGS W/CR BINARY BN MACHINE CODE/DATA RELOC CODE RC 6502, RELOCATABLE INTEGER PROGRAM IB TOKEN CODES INTEGER VARS IV PACKED VAR. TABLE APPLESOFT PROG. AS TOKEN CODES APPLESOFT VARS AV PACKED VAR. TABLE USER DEFINED UN N IS 0 THRU 9; IE U0,U1,..U8,U9 PATHNAMES: ---------- A PATHNAME IS REPRESENTED BY A COLLECTION OF FILE NAMES SEPARATED BY THE SLASH CHARACTER. THUS A PATHNAME LOOKS SOMETHING LIKE THIS: /FN/FN/FN/FN THE FIRST NAME IN THIS EXAMPLE WOULD BE THE "VOLUME" DIRECTORY, THE MIDDLE TWO NAMES WOULD BE SUB-DIRECTORIES, AND THE LAST NAME WOULD BE THE NAME OF THE PROGRAM TO ACT UPON. SEE "APPLE /// OWNER'S GUIDE", PAGES 43 THRU 50 FOR A PRACTICAL ILLUSTRATION OF THE USE OF PATHNAMES. XDOS INTERPRETER COMMANDS: ------------------------- MAY BE FOLLOWED BY (S#,V#,D#) WHEN NECESSARY (SLOT#, DRIVE#, VOLUME#) SAVE FN STORES THE BASIC PROGRAM CURRENTLY IN MEMORY TO A FILE. IF THE PROGRAM IS SIGNIFICANTLY SHORTER THAN THE FILE IT IS REPLACING, DISK SPACE UNUSED BY THE PROGRAM IS DEALLOCATED. LOAD FN LOADS A BASIC PROGRAM INTO MEMORY. RUN FN (,@LINENUM) RUNS THE BASIC PROGRAM STARTING AT LINE NUMBER LINENUM IF THIS PARAMETER IS SPECIFIED. OTHERWISE, IT RUNS THE PROGRAM FROM THE FIRST LINE. CHAIN FN (,@LINENUM) CHAIN IS LIKE RUN, EXCEPT THAT ALL VARIABLES AE PRESERVED FOR USE BY THE PROGRAM BEING CHAINED TO. STORE FN STORE PACKS ALL CURRENTLY DEFINED VARIABLES AND WRITES THEM TO FILE (FN). THE FILE TYPE IS 'AV'. IN ORDER TO PACK APPLESOFT VARIABLES, GARBAGE COLLECTION OF THE STRING SPACE MUST BE DONE, WHICH MAY TAKE TIME. RESTORE FN RESTORE LOADS THE FILE (FN) THAT HAS BEEN STORED, CLEARS CURRENT VARIABLES, AND UNPACKS THE VARIABLES CONTAINED IN THE FILE. BSAVE FN,AN,LN/EN (,BN) (,TTYPE) STORES BINARY DATA OF LENGTH (LN OR EN-AN+1) BEGINNING AT THE ADDRESS (AN) INTO FILE (FN) STARTING AT FILE POSITION (BN). IF THE BYTE PARAMETER IS OMITTED, THE FILE POSITION DEFAULTS TO ZERO (B0). (EN) IS ENDING ADDRESS, WHICH MAY BE USED INSTEAD OF LN. BLOAD FN (,AN) (,BN) (,LN/EN) (,TTYPE) LOADS BINARY DATA OF LENGTH (LN OR EN-AN+1) BEGINNING AT FILE POSITION (BN) FROM FILE (FN) INTO MEMORY STARTING AT THE SPECIFIED ADDRESS (AN). IF NO ADDRESS PARAMETER IS PRESENT, THE FILE IS LOADED INTO MEMORY STARTING AT THE ADDRESS SPECIFIED WHEN IT WAS BSAVED. BRUN FN (,AN) (,BN) (,LN/EN) A BLOAD WITH A JSR PERFORMED TO THE BEGINNING ADDRESS OF THE FILE. OPEN FN (,LN) (,TTYPE) FILE (FN) IS OPENED FOR ACCESS, A FILE BUFFER IS ALLOCATED, AND THE LOGICAL POSITION IS SET TO ZERO. THE LENGTH (LN) PARAMETER SPECIFIES RECORD SIZE. THE FILE TYPE PARAMETER MAY BE USED TO OPEN NON-TEXT FILES FOR READ/WRITE ACCESS. NO FILE IS CREATED WHEN THE TYPE IS SPECIFIED; IT MUST ALREADY EXIST. READ FN (,RN) (,FN) (,BN) POSITIONS FILE (FN) TO SPECIFIED RECORD, FIELD, AND BYTE. SUBSEQUENT GET AND INPUT STATEMENTS ARE SATISFIED BY TEXT DATA FROM THE FILE. THE READ COMMAND IS TERMINATED BY THE NEXT COMMAND ISSUED TO XDOS. READING NON-TEXT FILES MAY PRODUCE UNEXPECTED RESULTS DUE TO STRING HANDLING BY BASIC. WRITE FN (,RN) (,FN) (,BN) POSITIONS FILE (FN) TO SPECIFIED RECORD, FIELD AND BYTE. SUBSEQUENT PRINT STATEMENT OUTPUT GOES TO THE FILE. NON-TEXT FILES MAY BE GENERATED WITHOUT HAZARD TO BASIC. POSITION FN,FN FROM THE CURRENT FILE POSITION, (FN) FIELDS ARE READ AND DISCARDED TO ARRIVE AT THE NEW POSITION. FOR COMPATIBLITY WITH DOS 3.3, THE "RN" PARAMETER MAY BE USED INSTEAD OF "FN". THEY ARE FUNCTIONALLY EQUIVALENT. APPEND FN (,TTYPE) (,LN) THIS COMMAND IS LIKE THREE IN ONE. APPEND FIRST OPENS THE FILE, POSITIONS TO THE END OF THE FILE, AND SETS WRITE (OUTPUT) MODE. FLUSH (FN) ALL DATA, INDEX, AND ALLOCATION BUFFERS ARE COPIED IF NECESSARY) TO THE DISK. FLUSH IS INTENDED TO BE USED FOR THE PURPOSE OF DATA/DISK INTEGRITY. FLUSH DOES EVERYTHING CLOSE DOES, EXCEPT RELEASE BUFFERS AND FILE CONTROL BLOCK(S) TO THE SYSTEM. THE FILE IS STILL OPEN AND ACTIVE AFTER IT IS FLUSHED. IF NO FILE NAME IS SPECIFIED, ALL FILES ARE FLUSHED. CLOSE (FN) ALL INFORMATION IS WRITTEN TO DISK IF NECESSARY, BUFFERS AND FILE CONTROL BLOCKS ARE DE-ALLOCATED. CREATE FN,TTYPE THE CREATE COMMAND IS PRIMARILY INTENDED TO BE USED TO CREATE SUB-DIRECTORY FILES. BASIC, TEXT AND BINARY FILES ARE ALL AUTOMATICALLY CREATED WHEN SAVE, OPEN AND BSAVE COMMANDS ARE ISSUED. HOWEVER, FILES OF OTHER TYPES MAY BE CREATED AT THE USER'S DISCRETION. THE NEWLY CREATED FILE WILL ALWAYS OCCUPY ONE BLOCK ON THE DESIGNATED VOLUME. IF THE FILE IS A SUBDIRECTORY,THE EOF WILL BE SET TO 512. THE EOF FOR OTHER TYPES WILL ALWAYS BE SET TO ZERO. LOCK FN UNLOCK FN DELETE FN RENAME FN,FN SAME FUNCTION AS DOS 3.3 CATALOG (FN) (/PATHNAME) CAT (FN) (/PATHNAME) CAT PERFORMS A 40 COLUMN CATALOG, WHILE CATALOG DISPLAYS AN 80-COLUMN VERSION CONTAINING MORE INFORMATION. IF NO FILE NAME (FN) IS SPECIFIED, THE ROOT DIRECTORY OF THE SPECIFIED SLOT AND DRIVE IS OUTPUT. IF NO PARAMETERS ARE SPECIFIED, THE CURRENT PREFIX DIRECTORY IS DISPLAYED. PREFIX (PN) THE PREFIX PATHNAME SPECIFIES A DIRECTORY. IF NO PARMETERS ARE SPECIFIED, THE CURRENT PREFIX IS OUTPUT. ONCE A PREFIX IS SET, ANY FILE WITHIN THE SPECIFIED DIRECTORY MAY BE ACCESSED BY ITS NAME ALONE. FOR EXAMPLE, "PREFIX /ADISK/SUBDIR1PROGS" ALLOWS ANY FILE IN THE SUB-SUB-DIRECTORY "PROGS" TO BE ACCESSED IN THE SAME MANNER AS FILES THAT RESIDE IN HE 'ROOT' DIRECTORY. IN THIS EXAMPLE THE COMPLETE PATHNAME WAS SPECIFIED. IF NO PATHNAME WAS SPECIFIED, BUT SLOT AND DRIVE NUMBERS WERE PROVIDED, THE PATHNAME WOULD BE SET TO THE ROOT DIRECTORY NAME OF THE DISKETTE IN THE SPECIFIED DRIVE. A NULL PREFIX MAY BE SPECIFIED USING THE COMMAND "PREFIX /", WHERE "/" REPRESENTS THE NULL PATHNAME. SETTING A NULL PREFIX WILL CAUSE THE SYSTEM TO RELY ON SPECIFIED OR IMPLIED SLOT AND DRIVE VALUES FOR SUSEQUENT COMMANDS. IN OTHER WORDS, COMMANDS ISSUED THAT DO NOT SPECIFY THE VOLUME NAME WILL ASSUME THE VOLUME IN THE DRIVE LAST ACCESSED. THIS BEHAVIOR IS THE SAME AS DOS 3.3. PR#, IN#, EXEC FN (,FN) SAME FUNCTION AS DOS 3.3 - FN THIS COMMAND MAY BE USED IN PLACE OF RUN, BRUN, AND EXEC. THE TYPE OF FILE (FN) DETERMINES HOW THE FILE IS EXECUTED. ONLY TYPES "IB", "AS", "BN", "TX", AND "CI" MAY BE ACCESSED BY THE "-" COMMAND. IN THE CASE OF "CI" FILES, THE USER MAY SWITCH INTERPRETERS WITH THIS COMMAND. THIS MEANS THAT THE UTILITY INTERPRETER MAY BE BROUGHT UP WITHOUT REBOOTING. DOS 3.3 COMMANDS NOT SUPPORTED BY XDOS: INIT, MON, NOMON, INT, FP, MAXFILES, VERIFY (INIT & VERIFY SUPPORTED BY XDOS UTILITIES) XDOS COMMANDS NOT AVAILABLE TO DOS 3.3: FLUSH, STORE, RESTORE, CREATE, CAT, PREFIX, "-" ENHANCED XDOS COMMANDS: RUN, CHAIN, BSAVE, BLOAD, BRUN, OPEN, READ, WRITE, POSITION, APPEND, CLOSE, CATALOG, PR#, IN#. -------------------------------------------------------------------- THAT'S ALL FOLKS...