ML }  X c0C)HCCH Mhhݩh `eCDiCD`  RyHW   * 1H0芢@) Y0.Ș`i#(PMRR\ \b Pgi 0  % @ / ՠ`d   0DDԝLH}N@  )?HI Y0`HIJH) * J j * hJJJ )HJ h i     } YS S0 i`ϣ߳ϣ߳H J3xj2h} 1 |9 ӭ45(420 *(0241өX.`  R *i)Lvw  ~*P}E 5 LN(G E  r s k rsrL ( E LO(0d( L iE0O +)$IC  H S8 }q p h   j 8no CDLQ CFl M  LO Ri)Llk2'")*F }$F$F$F$F$ 5 )ШF/Șl]kpqС,LQ/A! Ti)Zlk@ ܬ/i)(")")k }$F$F$F 5$/L /lF@jj(LNkle$$%8(k()` R 8 ELO Ri)^>jf | NrC s } ) vw5g   enfo Glvw LQ@iLm>j FL ~Jjjjii p qEh }jlrs`LQ:$ȱ$@+[_#{ 8  Խut! ai 8   E I   ] C } H h    ˰ 8  N   Lm E  ,  [ `LQ ,/ 8 ~/  Ơ? ѩ}/  [ /Lj0?MoLn FjMqLp NklLOLQnLoMlNLO R"(+}ըHH`Q R!!  % !   / .   FȑF! /GF \H"+0+* }! F tLQnm: J~nTF1F  *n+)5! n (, n)1JJJn(n*o} I ,0  ci a oF? @ , 8,0 ʩ0H Eh   i}  D ]DmmFLQvtu`*&!*@h ] 0 ^0` c 0l$$%}()()%*&J%H,@hH hH@,h $% 8i8$(%)0hhH ]h`() c 0H c 0 h}`hhh&JJ ](ll  LQ0  /qnoHH 9 9 H H  I9  9 } Nd EH  Q8 o n  FnoL HII/ Ih8`h`Lnon`no`u F }E VEhLO/luF l0BF/lɜɛ׽hE N  b VFL FREE SECTORS C} H) *Fh ):FȽ F FC IH' 0 d  i:Fȩ/F.l`CD/08HDIC}IHȰ/F`ȱ$>.+.i ȱ$:刄H !A \ Hȱ$*?ȝ 2. ? [_{ ,0}-:) 0$:>WI  IТ,LQH  0hLd ~ t u`C ?( 0(C.` E } R =! .ti S0N EE D XC )0')AY  )ע ? 0E088FG \o}n  (HhLcL3 iJ i Lqp 0=rspnqopqlk`jZj0  j FL`H}FhȑFȽlFi0 h FFLFpvqwgneofLF pq7  G0i 0 FJJh1FqȱFpȱFk`B!}08`hEE D 8. =D}tui( TʩL`b!)    cȌaȌd b`aab}H8 hdaHcd8 cH hHH  \h hc` =Hh I8ih( t  ( t(!` L\}CJfCJfCJfCDfC` a  HII  INdh  `h  `n)8jHniPoijIjFIjFIjh` a } I 38  8H0 I  ' H LQ8j Y  8j NdY  &I &I &IHeH.p!}Iiq  `!.莿 2Jjj }.m Ȉ!m FG` ɩLQ z "} e Hi04 \ Ȍ  8 i h !`I0 `C Y8.`DOS SYS#} I  ` ~ݩ.C/`ba.m۩mѤC9 `C L] H  ,- '0 l $}, BLVDE`D1:AUTORUN.SYS8hhJ ȱHȱIȱBȱDȱEeeHHLV)  %}1*  ,,p-  0 I &  '0   Lw)l, 0  I&LD1:MEM.SAV&}E:D1:DUP.SYSE:D1:DUP.SYSE:D1:DUP.}J)1CD1:DOS.SYS n  * \*`آ R'S )ɀ@  U))% BError lo(}ading MEM.SAV or memory!  0* b*c*d*e* R Hd*JSDd*J-=e* 0c*ʈд =}MYDOS 4)}.50 -- Copyright 1988,˛Disks 1S- 2S- D: = D1: ~= =1-8.Dir of D1:-D8: *. Dir of D:A. *}Disk Directory K. Save MemoryB. Run Cartridge L. Load MemoryC. Copy File(s) M. Run at AddressD. Delete File(s) N. L+}oad MEM.SAVE. Rename File(s) O. Change Config.F. Lock File(s) P. Set DensityG. Unlock File(s) Q. Make DirectoryH. Wr,}ite DOS Files R. Pick DirectoryI. Initialize Disk S. Set RAMdisk #J. Duplicate Disk V. Set Verify Flag  ?莼-}( 0  =Select Item ( for menu):@  =ɛL)1L,*L,:W@ ,,L=No such item!.}L*, -L*, BNeed new file name! BNo drive or director0}ies allowed in new name!Lock Unlock Delete Lock which file?â-#Unlock which file?ɢ-$((H @ AQ/wDel1}ete what file?Ѣ-!((H @ ANJ =Answer 'Y' or 'N'h `B L?;(( ~=( ~= =? =Y ?Lj.H @ AhR ?2}R)L*,LM/L-Lz-File to rename, new name? @ A(9', ȱ:>0{ ПFull directory name?Z"L.Dire3}ctory to be used as 'D:'? @ A(5)L.(I: ȱޝL*, BInvalid directory!L?( 4}(0Li-File source, destination? '( @C۩2ڭ82ܭC B9'0 @(ߍeލd(DЍ( ? 9'5} A rBȱޙ':>Ȍ(C0J* .B :'ȱ/.* #,ɛȝ:' ߰ A L?,(0L*, '6}ut(:'3?&' .'Ƚ:'?&'  .ى'Q?''(#( ~= =-->' ~=7}Q =YR_o (J(  0?B݌''BK)`''utz0( >(L0L*,L?nDisk to FORMAT:8} YA B(UTލ1 =(Press for Enhanced Dns)Type to Format Drive 1: =AIYZNj[R VL9}?L*,D1:DUP.SYSDrive to write DOS files to? YAH1:*K)2J) Z wB hpJ) 2<2U:}TC٩1ة۩کL;Source, Destination (Sectors)? YA)((9'( SA)((((( @(0% =Inser;}t both disks, type = A( A((/( B(( BDrives not compatible!J(j(9'Hi''<}h(ɛy BInvalid options! @-&& @)׍&&(&&&۩ک&&&&8* <4&&&& <4=}8*8(ܭ(ݥ2C, BNot enough memory! ک&&`(Mh  & =L?&i &>}&&&mm   =  &((&թԥԍ(Ս(((( ( ((C2((?}ՠԍ((,(0"( (( =m(m( & &("L*,  ( AL4,(, =Insert DES@}TINATION disk, press =Nͼ J) b( 0K) ?((ԭ(խ( ( (((L4Drive, new density:A} YA9'ɛ BDrive unchanged.(ު90٨Ȍ(SD  ABL)xԌҭHӭ@ @ ʎӆ@B}ӭ@@ :  $ӹ @hөԥX` Aˠ =RAM disk present? =NL#8 =xlC}on or E type RAMdisk? =Aό  L   M A, A6: ' =No extra memory available!L#8L7 & & D}& =Use default config for 0)ȩ ~= =K? =NL7 =Size(K)? ? @FjFjFjFj: =Page seqE}uence? ? @o* =RAM disk drive no? = 09) `8 -8**H***) 9 Ȋ)h9 @@ʊ F}H'h(#''/'(ɛ ? @(@: 3 ʽ' L7 =Duplicated sequence number!L7 =Wrong numbG}er of entries!L7K큅쀄 =Verify WRITEs? ; =NumberH} of File Buffers? ? @  6 Lw),R( ';L*,Drive number or : =ɛLC99L60Ȍ( =Remove I}drive? =Y =Is drive configurable? =YЂ =High capacity drive? =Yy =Is drive double sided? =Y ; =TracksJ}/side? ? @#0M P( ; =Step rate? =4/ ; ';L*, =Drive size (in sectors)? ? @H(K}h *;L*,RAM disk drive no? 8L*,Verify WRITEs? ;L*, =WNPy`(`(  LABSAVE:filename,start,end(,init(L},run)) @TUH @Cp` 2< @؆8օڊ BInvalid START-END range!۩ @  @M} hԄՠAμȌZ wB04*  0$ڍXۍY֍T׍U,0LBLB #CL?ֆ׌`Load MEM.SAV from whaN}t file? 0#L*,L?Load from what file?) @TU&̩Z wB &0&-&а&𨭼INIZ'O}RV0II BNO CARTRIDGE!Ԇխ  )L?Run from what address? ?ɛ @P} BAddress must be 1-4 hex digits! BHILV n=`hh =HH` =0{a Hɛ n= n=h` nQ}=L*, = = pHH =hh`K: p `(((( i ɀ((L?(`(B'(0!HH''^R}>I^>(`^>DH(` (HI`(o5 ~= =( B( >@A (J wB0x((HHIIDDES}E B ?(CɈK(٢A ~= =( BL>(B^>((ڤ ܝHݝI VL_>L?(" B !B J) T} B(L& R XY( ?&:0H&((& ( .( & ( .(ʩ(U}`ލD&ߍEBIʎH( V0`ԩ ؠ@ȱ@ȱ)@ BError -- 000&`$8f 3AԄձG/ V}$<68i/(Ԧ`H&եԦ&&eԅheԅԊe(iL*@&&&&ԅL*@B ? 3A?*(ɛ:W}./2SX(0ȱ/.ɛ(ލ9'ި0#:Ȱ :ފ :ȱ: : CAD CAޥX}`(eޅީe߅`(` @L\A @TUȪ: BFile name not allowed!: )  i( =0+L Y}TUD BNot a disk file!(0` =Insert SOURCE disk, press =,(pӮ(A(O  1B AB1BZ} ` % 1(L/ b(de BJKO L?O` B((*(([}(`ȱޙ((:>Ȍ(`D:`OS.SYS,DOS.SYShh =L*,  VLJ C C,pLiLF#Խ٩Յ׆ \} LB`((:>Ȍ(`D:`OS.SYS,DOS.SYShh =L*,  VLJ C C,pLiLF#Խ٩Յ׆  MYDOS Version 4 Technical User Guide ^} Revision 4.50 for Atari Home Computers Copyri_}ght (C) 1988 by WORDMARK Systems and the authors: Charles Marslett `} 2705 Pinewood Dr. Garland, TX 75042 CIS: 73317,36a}62 UseNet: CHASM@KILLER.DALLAS.TX.US and b} Robert Puff Suite 222 2117 Buc}ffalo Rd. Rochester, NY 14624 GEnie: BOB.PUFF d} This software may be freely used and distributed provided that this copyright notice is left intact, ane}d provided that: (1) The source code in machine readable form is provided with any binary distribution, of}r made available at no additional cost to the recipients of the binary distribution. (2) A binary versiong} of a derivative work may be sold for a reasonable distribution charge (less than $50), and the source codeh} in machine readable format must be available. (3) A derivative work may not impose and restriction on the free i} distribution of the source code. MYDOS Technical Manual page 1 Version 4.5j}0 IV. THE MENU COMMANDS: The MEM.SAV feature Whenever the DOS menu is entered, MYDOS wilk}l load DUP.SYS from drive 1. If DUP.SYS cannot be found on drive 1, it will look for it on drive 2, 3, etc... untl}il it finds it. Loading DUP.SYS will overwrite a good chunk of lower memory, and will wipe out the datam} in most languages. Here's where MEM.SAV comes into play. When this feature is enabled (by going to the menu and n} pressing "N" and [RETURN], then "B" to exit back), the memory that DUP.SYS would overwrite is saved to the fileo} "MEM.SAV" on drive 1 (may be drive 8 if you use one of the RAMBOOT programs on the disk). It then loads the DUp}P.SYS. When you press "B" to return, or if you use the "N" command of the menu, MYDOS will load back in the MEM.SAV, q} thus restoring the overwritten memory. The result is your program remains intact. V. FILE MANAGERr} FUNCTIONS PROVIDED THROUGH CIO MYDOS supports all CIO calls supported by ATARI DOS 2, with the followis}ng modifications to the OPEN (Function code 3) and the FORMAT (Function code 254) functions. Three additional CIO fut}nctions have been added: MAKE DIRECTORY (Function code 34 & 42), SET DIRECTORY (Function code 41) and LOAD MEMOu}RY (Function code 39 & 40). The OPEN function in ATARI DOS 2 does not use the data provided in the AUv}X2 byte, but in MYDOS when the AUX1 byte is 8 (the file is opened for creation or replacement), the AUX2 byte contains tw}wo flags that control the file format, and whether it will be created locked or not. If AUX2 bix}t 2 is set, the file will be written in MYDOS 4 format, and may contain sectors beyond absolute sector 1023. Suchy} a file may not (easily) be read by DOSes other than MYDOS. This is the only format used with high capacity disksz}. If AUX2 bit 5 is set, the file will be written with the "LOCKED" bit in the directory set initially. This {}is provided for use by multi-tasking functions (such as a print spooler, sequential file pre-reading function or oth|}er enhancements one might want to make to the standard OS or DOS provided functions). The }}FORMAT function in ATARI DOS 2 does not provide for any variations to the standard disk usage: in MYDOS the conten~}ts of the AUX1 and AUX2 bytes are used to specify the number of sectors on the disk being formatted, and whether} the disk needs to be formatted by the controller as well as needing directory initialization. Bit 7 of AUX1 is }set to skip the physical formatting of the entire disk surface when it is not required, and bits 6-0 of AUX1 and al}l of AUX2 are used to specify the number of sectors on the disk being created (if all 15 bits are zero, the disk} is assumed to be the size defined by the drive configuration). This permits formatting a single sided diskette }on double sided drives, for example. Be careful when using MYDOS Technical Manual page 2 }Version 4.50 this feature. To load (and possibly execute) a program file, MYDOS provides } the CIO function 39 call. CIO function 40 will do the same; it was included for compatibility with programs written} for SpartaDOS. From BASIC you can load and execute a program by executing the line: XIO 39, #3, 4, 0, "D:MYPRO}G.OBJ". Any inactive IOCB can be used, and if AUX1=4 both the INIT and the RUN entries will be executed. If AUX1=5, } the RUN entry will be executed; if AUX1=6, the INIT entry will be executed; and if AUX1=7, the file will be load}ed without executing either entry point. Any other values of AUX1 will return an error code and do nothing. } Another XIO call, XIO 34, has been added to create a directory. CIO function 42 performs exactly the } same thing, and has been provided for compatibility with programs written for SpartaDOS. When a directory is } created, the name used must not match any existing file or directory in its parent (for example if the directory to }be created is named "D1:TEST>BUGS", there can be no other directory in the main directory named "TEST" nor a file} named "TEST" there. From BASIC, the XIO 34 call is "XIO 34, #iocb, 8, 0, dirname", where "iocb" is a}ny available unit number, and "dirname" is the name of the new directory (it does not end with a trailing ":" or ">"). } The final function added to those provided by ATARI DOS 2 is XIO 41, to define the default directory. }The default directory is that which will be searched for a file if the file name begins with "D:". In ATARI DOS }2 this default directory is always "D1:" but in MYDOS, the default directory can be any root or subdirectory on any dis}k in the system. The buffer address passed to CIO in the XIO 41 call is the address of a string that contain}s the default directory name, terminated with either an end of line ($9B) or a null byte ($00). The directory will }be accessed before returning to the calling program so that an error in specifying the directory will be reported as e}arly as possible. VI. CIO FUNCTION CODES PROVIDED BY MYDOS 4.50 Function code 3, OPEN } The open function uses the buffer address to point to an ATASCII string terminated with a non-alphanumeric cha}racter or wildcard. This string is the name of the file to be accessed or created. A good terminator for thi}s string is either a null ($00) or an end of line ($9B). The AUX1 byte defines the usage of the file: 4} for input, 6 for directory data reading, 8 for creating/replacing output, 9 for creating/appending output} and 12 for input/update (without extension). The AUX2 byte is used when a file is replaced or created, an}d contains two significant bits: bit 2 set causes the MYDOS format to be used even if the diskette is a 40 track singl}e sided diskette; MYDOS Technical Manual page 3 Version 4.50 and bit 6 set r}esults in the file being LOCKed initially without and additional CIO call. For input, update or directory access AUX2} is ignored, and the length is always ignored. In normal use, AUX2 is set to zero emulating ATARI DOS 2 usage. } MYDOS does not leave partially full sectors when appending to a file. This has two positive effects on pr}ograms which open files in append mode: the open will fail if the file cannot be appended to rather than the } close (in ATARI DOS), and the file size will not change if a file appended to is copied to another disk (in ATARI DO}S it may grow smaller). Function code 5, GET RECORD The get record function reads a li}ne of data into a buffer, the buffer being defined by its starting address and length. The line is defined as the} data bytes in the file up to an end of line character ($9B) or until the buffer is full, whichever occurs first. The }line is also terminated if the end of the file is read. All record I/O is buffered in MYDOS, so record transfer}s are necessarily slower than unbuffered I/O. No other fields of the IOCB are referenced or needed. Not}e that the ATARI ROM OS supports single byte I/O through the accumulator if the buffer length is set to 0. I}n this case, GET RECORD and GET CHARACTERS function exactly the same way. Function code 7, GET CHARACTE}RS The get characters function reads a fixed number of bytes from a file into a buffer, the buffer } being defined by its address and length (two 16-bit numbers in the IOCB). The only cases where the buffer is n}ot always filled is if the end of the file is read, or the file cannot be read withut error. As is the case with ge}t record calls, a single byte may be read into the accumulator by setting the length field to zero. A get ch}aracter CIO call will perform unbuffered I/O if the buffer is longer than 256 bytes (ATARI DOS 2 sets a simi}lar threshold at 128 bytes). For this reason a single long input is considerably faster than several short ones. } Only the buffer address and length in the IOCB are used by the get characters function. Func}tion code 9, PUT RECORD The put record command will write a single line to an output file: the lin}e defined by the starting address of the buffer and either the length of the buffer if no end of line ($9B) bytes} are encountered, or the first end-of-line byte. Only the buffer address and length in the IOCB are used in this }command. MYDOS Technical Manual page 4 Version 4.50 Function code} 11, PUT CHARACTERS The put characters command will write the contents of a buffer defined by its add}ress and length (in the IOCB) to a file opened for output. Unless an error occurs, the entire buffer is always written} to the file unless the write is to an output/update file and the end of the file is reached or the write is to a}n output/append or create file and the disk has filled. Only the buffer address and length fields in the IOCB} are used when the put character function is used. The single byte put character (using the A register as data) is} supported by setting the length bytes to 0. Function code 12, CLOSE A FILE To terminat}e use of a file (and for an output file, to write the incomplete buffer to the disk) the IOCB used to access the f}ile should be closed. This is done by setting the function code in the IOCB to 12 and calling CIO. The close }function does not use any of the data in the IOCB for any purpose whatsoever. Function code 13, READ ST}ATUS The read status command is issued to an unopened IOCB, with the buffer address that of a file} name string. If the file is not present, that error condition is returned, if it is locked, that error co}ndition is returned; otherwise, a normal completion code is returned. Only the function code and the buffer address i}n the IOCB are needed. Function code 32, RENAME A FILE The rename function is passed a} character string (pointed to by the buffer address in the IOCB), the first part of the string being a file name }identifying the file or files to be renamed. Following a single invalid character (one invalid in the file name, tha}t is) a simple file name must also be present: this second file name cannot include any drive or directory nam}es. An example, using a comma as the invalid character, is "D2:TEST>PGMS>A.OUT,ZCPY" which will change the string} needed to access the file "D2:TEST>PGMS>A.OUT" to "D2:TEST>PGMS>ZCPY" -- Note that only the last file na}me (if subdirectories are used) can be changed; to change "PGMS" to "MLPROGS", the buffer must contain "D}2:TEST>PGMS,MLPROGS". Wild card characters should appear only in the part of the file name following }the last ":" or ">", and their effect is best described by an example. The string "D2:TEST:*.*,*.XYZ" will rena}me all the files in the TEST directory, making each extension ".XYZ". If the directory had the files "ATEST.BAS",} "LOG", and "REPORT.XYZ" in it, the result would be a directory with "ATEST.XYZ", "LOG.XYZ" and "REPORT.XYZ" in i}t. MYDOS Technical Manual page 5 Version 4.50 Function code 33, D}ELETE A FILE The delete function removes any files that match the file name string pointed to by t}he buffer address in the IOCB. Files locked will not be deleted, so must be unlocked before being removed, and s}ubdirectories that are not empty (that have a file in them) cannot be deleted. If either case is attempted, the corres}ponding error code is returned. Otherwise, the files are removed and their data areas are returned to the fr}ee space on the disk. Files that have been deleted may be "undeleted" by various utility programs ONLY if the d}ata has not been overwritten. If you write to the disk after you have just deleted a file on that disk, chances are} that you will not be able to recover the file. Function code 34, MAKE DIRECTORY The m}ake directory function will create a new subdirectory on a disk (it is not used to create the first directory, that is t}he "root directory" identified by the drive specification "D1:", for example). It is called through CIO by st}oring the address of the new directory's name in the IOCB buffer address and setting up AUX1 and AUX2 as f}or an open call (see Function code 3), normally AUX1=8 and AUX2=0. This function has no effect on the current default di}rectory; and if it is desired to make the newly created directory the default one, the program must make a set }directory call (Function code 41) following the make directory call (the order is very important, because th}e default directory cannot be set to a nonexistent directory). CIO function code 42 may also be used to acc}ess this function; the parameters are the same. Function code 35, LOCK FILE A file can }be "locked" so that it may not be modified or deleted inadvertently, by calling CIO with the lock function. The buf}fer address is used to point to a file name string that identifies the files on the disk to be locked. The onl}y file modification that can be performed on a locked file is to unlock it. The lock function can be requested f}or a file already locked, and it will return no error (unlike other file modification calls to CIO), but the status of }the file will not have been changed. Function code 36, UNLOCK FILE The unlock functio}n is identical to the lock function except that is re-enables the modification or deletion of an unlocked file. }A file that is not locked can be unlocked with no error returned and no change in the file's status. } MYDOS Technical Manual page 6 Version 4.50 Function code 37, POINT TO POSITION IN F}ILE The point function is passed the 3-byte disk address to be positioned to in the twelfth throug}h fourteenth bytes of the IOCB. On return, the next byte read from that IOCB will be the one that was read or }written next after the corresponding note function was executed. A point call to CIO can only be made if the fi}le can be used for input: that is, if it is opened for input or update processing. The first two bytes} of the disk address are a sector number (in low byte / high byte format) and the third is the byte (offset) w}ithin the sector. If a file is being appended to (opened with AUX1=9), a point function call made }before closing the file may return an unexpected error (this cannot happen with the note function, however). } A problem can occur if the file being pointed to is in the last half of a 16 Megabyte disk: Atari BASICs do not }allow sector number to be greater than 32767. A solution is to use the following BASIC substitute for the POIN}T statement (with attention paid to the fact the the two AUX bytes must match the two used to open the file): OPEN }#K,AUX1,AUX2,"D5:BIGFILE" . . . NOTE #K,SECTOR,BYTE . . . POKE 844+16*K,ASC(CHR$(SECTOR)):POKE 845+16*K,I}NT(SECTOR/256) POKE 846+16*K,BYTE: XIO 37,#K,AUX1,AUX2,"D:" Function code 38, NOTE POSITION IN FILE } The note function returns in the twelfth through fourteenth bytes of the IOCB a 3-byte disk address }that may be used at a later time to reposition the file using the point function. The note function can be} used on files open for input, output, update or appending. The three bytes returned are the low byte of the sect}or address, the high byte of the sector address, and the byte (offset) within the sector, in that order. } Function code 39, LOAD MEMORY The load memory function takes a file formatted in the ATARI DOS }2 executable program format (generated by the "K" command, by the assembler/editor cartridge, by AMAC or MAC65, o}r by any of several compilers for the ATARI computers), and loads its contents into memory as specified in th}e file. No offset control is provided and no part of memory is protected from the loading process. The }initialization and execution addresses (if any) can be individually enabled and disabled, to permit loading and patc}hing a program then writing it back to the disk for normal use. To load a program into memory, the }address of the file name string is stored into the buffer address, and a value of 4, 5, 6 or 7 MYDOS Technical M}anual page 7 Version 4.50 is stored into the AUX1 field. If AUX1 is 4, both the init}ialization routines and the run address are executed after closing the IOCB, but before returning to the calli}ng program. If AUX1 is 5, the initialization routines are disabled, but the program will be run. If AUX1 is } 6, the initialization routines will be run, but the program execute address will be loaded and ignored. If AUX1 is 7, t}he text of the program will be loaded into memory, but no other activity will be performed. CIO function code 40 }performs the exact same function as this (39). Function code 41, SET DEFAULT DIRECTORY }The set directory command will use the contents of the buffer as a file name and open the specified file, determining i }f that file is a valid directory. If so, it will become the new default directory. File names of the form "D:.. }." will be assumed to be in the default directory (which may be on any disk in the system and may be either the r }oot directory of that disk or a subdirectory). Only the buffer address and the function code are significa }nt when setting the default directory. Function code 254, FORMAT A DISKETTE The format } function uses the contents of the buffer pointed to by the buffer address to identify the drive containing the diske }tte to be formatted. If both AUX1 and AUX2 are zero, the disk is formatted according to the capacity data } in the system control table defined using the "O" command. If AUX2 bit 7 is set to 1, the format operation is s }kipped and an empty file system is written to the diskette. (This assumes the disk is preformatted.) The remaining } 15 bits of AUX1 and AUX2 are used as a 15 bit number to specify the number of sectors available on the dis }k (permitting the use of the last few sectors of a disk outside the file system if desired). You may format a dis }k in enhanced density (MYDOS compatible - not DOS 2.5 type format) by setting AUX1 to 1, and AUX2 to 0. } VII. DISK STRUCTURES SUPPORTING MYDOS 4.50 MYDOS uses the first three sectors of a disk to hold some disk } information and the initial boot program if the drive contains DOS.SYS and DUP.SYS. Sector $168 (and sectors } $167, $166, $165, etc., if the disk is formatted as a higher capacity disk not compatible with ATARI DOS 2) i }s used to hold a bit map of available sectors and several flag byte identifying the default format of files on the } disk. Sectors $169 through $170 contain main disk directory data, identifying the files on the disk, their }sizes and their starting sector number. Note that this usage, when the diskette is a 719 sector volume } declared to be DOS 2 compatible, is in fact exactly the same as ATARI MYDOS Technical Manual page 8 } Version 4.50 DOS 2 would make of the disk. The default single sided format differs only in } that sector 720 is not left out of the file system in MYDOS but is used to provide 708 free sectors on an empty disk }ette rather than 707. The only significant change made when the high capacity format is chosen are that en }ough sectors before sector $168 are allocated to assign a bit for each sector that may be allocated for a file or } for use by the system (VTOC sectors). The high capacity disk directory may be read by ATARI DOS 2, but the data in th }e files can only be accessed if it falls in the first 1023 sectors of the disk and then only if the file number } checking code in DOS 2 is disabled. This format allows MYDOS to support accessing disks of up to 65,535 sectors }of 256 bytes each (approximately 16 Mbytes). Compatibility with DOS 2.0 is further reduced if subdirectories } are used: to ATARI DOS, the subdirectories will appear to be simple files with unreadable contents. The subdire }ctory's files will not be accessible and the subdirectory can be damaged if it is written to (even by appendin }g). For this reason disks sold to the general public, exchanged with friends, and so forth, should not contain } subdirectories unless there is reason to require that the disk be used with MYDOS. A further problem with exc }hanging diskettes is that there are many different formats are used by vendors of double sided disk systems for !}the ATARI. For this reason, double sided disks not only require both computers use MYDOS, but also require that they use "} the same disk system (PERCOM, SWP, Astra, Supra or whatever). VIII. MYDOS 4 MEMORY MAP #} The MYDOS 4.50 disk operating system occupies the area from $0700 to $1EE9 at all times, and when the menu is $}active, it also occupies the area from $294A to $4331. In addition, the first 16 bytes of the floating point %} workspace ($D4 - $E3) are used by MYDOS at that time. Unlike ATARI DOS 2, MYDOS utility program (DUP.SYS) also &} calls the floating point ROM entry points. The nonresident part of MYDOS 4.50 starts loading at $294A, reserving the '}area from $1EE9 to $2949 for disk buffers and drivers. Allocating three disk buffers leaves approximately 2500 byt (}es for resident drivers that will not be overwritten by the nonresident portion of DOS (contained in DUP.SYS). )} IX. CUSTOMIZING A SYSTEM DISK RAMdisk Configurations The RAMdisk driver included in MYDOS *} 4.50 is already configured for the Atari 130XE computer and uses its banked 64K bank of memory for the RAMdisk +} providing 499 free (single density, 128 byte) sectors. The "O" command provides an easy way to alter the operati ,}on of the RAMdisk driver for other common banked memory systems. Most memory upgrades for the 800XL and 130XE u -}se the same mapping address (the PORTB pins of the PIA chip in the computer). A 128K RAMdisk can be used in an Ata .}ri 130XE using the last unused pin of that port with no tradeoff (selecting the 64K bank is done with bit 6 of PORTB). /}If MYDOS Technical Manual page 9 Version 4.50 you have such a system, ente 0}r a "2" for the page sequence, or just use the default sequence (answer "Y" to the question "Use default page s 1}equence..."). If, instead of adding one or two rows of 64K memory chips, the enhancement replaces the 2} entire memory of the computer with a single bank of 256K memory chips, then the banked memory is a total of 192K 3}and 4 bits of the port must be used to select the memory bank. Often the bits used are bits 0 and 1 (as in the 130XE) a 4}long with bit 6 (as in the expansion above) and bit 5 (used in the 130XE to control banking screen memory). 5}Programs that bank screen memory (a very odd proposition because of the difficulty of obtaining a useful sharing 6}of the banked memory page bits between the screen memory and the program) will not work with this enhancement. T 7}his is the approach used in the Newell Industries 256K upgrade for the Atari 800XL. If the enhancement 8} is done externally or to an Atari 800 (with its internal expansion slots), a new dedicated register may be used 9}to map the 16K pages. The Axlon RAMPOWER 128 card for the Atari 800 works this way. In such a system, the pages are se :}lected by writing a page number to the mapping address and no sharing of the 8 bit byte is necessary. The addr ;}ess of the mapping register is entered explicitly and page sequence "5" is the proper sequence. Th <}e page sequence table coded into MYDOS is actually one 32 byte sequence table of numbers to be stored in the mapping reg =}ister. MYDOS 4.50 has a feature that allows you to skip all this configuration stuff, if the upgrade is XE co >}mpatible. In the configuration, MYDOS will create a custom page sequence for your memory upgrade, and update ?} its pointers. If you choose to enter our own page sequence, the number of 16K pages determines the number of bytes @} to be used. You may use one of the four built-in page sequences by entering a single sequence number: A} Seq. No. Page Values OR Value 0 E3, E7, EB, EF, C3, C7, CB, CF, B} 83, 87, 8B, 8F, A3, A7, AB, AF 00 1 C3, C7, CB, CF, 83, 87, 8B, 8F, E3, E7, EB, EF C}, A3, A7, AB, AF 00 2 A3, A7, AB, AF, C3, C7, CB, CF, E3, E7, EB, EF, 83, 87, 8B, 8F D} 00 5 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 0A, 0B, 0C, 0D, 0E, 0F FF E} As an example, if you want to use BASIC/XE in extended mode (or use a program that uses the standard XE banks: page F}s E3, E7, EB, and EF), and you have a RAMBO XL upgrade, set your memory size to 128K, and use the page sequence G}of: 1 or C3,C7,CB,CF,83,87,8B,8F,00 This will configure the RAMdisk to use only that H}part of the banked memory not used by BASIC/XE. MYDOS Technical Manual page 10 V I}ersion 4.50 The file RAMBOOT.M65, the MAC/65 assembler source code for which is in the file RAMBOOT.AU J}T, is an AUTORUN.SYS file that simulates the operation of Atari DOS 2.5 and its RAMdisk. It "formats" the RAMdisk K}and copies DUP.SYS to it, as well as setting the RAMdisk unit number and the unit used to access the DUP.SYS and MEM.SA L}V files to 8. By modifying the code in the source file and creating a modified AUTORUN.SYS file, the M}drive used to save MEM.SAV and fetch DUP.SYS can be modified, other files than just DUP.SYS can be copied to the N}RAMdisk when the system is booted, or any other operation could be performed that you find useful. N O}umber of Files Open at Once The number of files that may be simultaneously open is set with the same b P}yte as in ATARI DOS 2: location $0709 (decimal 1801). This byte contains a number from 1 to 16 setting the number of di Q}sk files that may be open at the same time. Normally it is set to 3, the smallest number that supports all R} the functions in the MYDOS menu. Specifically, a copy from one disk file to another requires three open disk S} files. The value in the distributed version of MYDOS 4.50 is three. To permit more or fewer files open, use the "O" T} command followed by a RETURN. To permanently change the maximum number of files, use the "H" command to w U}rite a modified MYDOS system to a disk. Each file that may be open at one time requires the allocation of a 256 V}byte buffer so setting this value to 7 (instead of 3) will cause MYDOS to be 1024 bytes longer than before and the W}programs loaded must begin no lower than $22E9 (instead of $1EE9). In corresponding fashion, by setting X}the value to 1, a BBS program can be loaded in with 512 bytes of additional memory if only one disk file is e Y}ver open at one time (commonly true of bulletin board programs). Controlling the Disk Drives Acces Z}sed by MYDOS Like ATARI DOS 2, MYDOS automatically identifies the disk drives that are present when [}booted up initially and any time it is reinitialized (some programs do this on exiting to the DOS, and it is a \}lways done if the RESET key is pressed). MYDOS 4.50 is distributed with drives 1 and 2 configured, all others are o ]}mitted in order to speed up the booting process. To modify the maximum configuration MYDOS will use, invoke th ^}e "O" command for each drive to be added to (or removed from) the system. Pressing the RESET key will then use t _}his value to redefine the system to configure the drive(s). To permanently change the maximum drive configura `}tion, use the "H" command, writing a new copy of MYDOS back to the system disk. Selecting or Disabling a} Write-with-Verify MYDOS 4.50 is distributed with the write-with-verify disabled. Most drives are ver b}y reliable, and will never give you a problem. If MYDOS Technical Manual page 11 Version 4. c}50 however, something happens (such as dust, a scratch in the oxide coating, or some other problem d} that may have arisen since the diskette was formatted), the error might not be detected. In short, if you e}are working with something that you want to be absolutely positive that is perfectly saved, enable the verify. This f}will cause the drive to read back each sector after it has been written, taking about three times the time normall g}y taken on a write without verify. The byte at location $0779 (1913 decimal) controls all write oper q}B#DOS SYSB6'DUP SYSB{]TECH DOCBABUILD M65B "BUILD OBJB"+SOURCE DOCations to the disk. If the value "poked" into it is $57 (87 decimal), then all writes will be read back to verify r} the action was successful. If the value "poked" into $0779 is $50 (80 decimal) then writes will be assumed succes s}sful, and will be performed in about one third the usual time. Note that this address is not the same as in MYDO t}S 4.0 and 4.1 (where it was $0770 or 1904 decimal). This byte is defined, along with the count of the number of u} buffers to be allocated when the file manager is initialized, whenever the "O" command is invoked with no d v}rive specified (only a RETURN is entered in response to the drive number query). To permanently alter it, rewr w}ite MYDOS back to the disk using the "H" command after changing it. X. DISK DRIVE INTERFACE (via SIO) x} The physical disk drives and diskettes are external to the ATARI home computers and the ones suppo y}rted by MYDOS 4 are normally attached to the "serial interface connector" on the right side or back of the z} computer. High capacity or "hard" disks may also be connected to the parallel port of 800XL and 130XE computer {}s. The software in the operating system (OS ROMs) to access the devices attached to either connector is call |} the "serial I/O driver" or SIO for short. The MYDOS disk operating system uses this lower level driver to pa }}ss all commands and information to and from the physical disk drive. Several commands were defined by ATARI to commu ~}nicate with the 810 disk drive and most vendors of high performance disk systems for the Atari have adopted } a slightly extended version of this set of commands. MYDOS will operate with any disk system that supports the } original 810 set, but the full set of commands is required to support all the functions. An additional fu }nction necessary to perform automatic density selection is that the drive should automatically identify the de }nsity of a diskette inserted in it if the first operation is a read of sector 1 (this is necessary if the drive is }to boot either a double or single density diskette). The minimum set of disk drive functions to support M }YDOS (or ATARI DOS 2 for that matter) are: Device Unit Command Direction Byte Ct. Aux Bytes Function } $31 Drive# $21 From Drive 128/256 0 FORMAT DISK $31 Drive# $50 To Drive 128/256 1 } to 720 WRITE(no vfy) $31 Drive# $52 From Drive 128/256 1 to 720 READ $31 Drive# $53 From Dr }ive 4 0 READ STATUS $31 Drive# $57 To Drive 128/256 1 to 720 WRITE(verify) MYD }OS Technical Manual page 12 Version 4.50 An additional command to format a disk }in enhanced density is: $31 Drive# $22 From Drive 128 0 FORMAT DISK The } byte count is always 128 for a single density drive, and is 128 for the first three sectors (1, 2, and 3) of a doub }le density drive. All other sectors on a double density drive are 256 bytes long. The FORMAT f }unction is always called with a sector number in the range of 4 to 720. It expects 128 bytes from a single density dri }ve and 256 bytes from a double density drive. The first byte returned by the READ STATUS command is ex }pected to indicate the sector size -- if bit 5 is a 1 (bit 7 is the sign bit) then the sectors are large ( }256 bytes), otherwise, they are small (128 bytes). The auxiliary bytes are treated as an address to a se }ctor on the diskette, and range from 1 to 720 (when in DOS 2 compatible mode) or from 1 to 65,535 (when accessing }large capacity disk drives). The additional functions used to configure disk drives dynamicall }y are: Device Unit Command Direction Byte Ct. Aux Bytes Function $31 Drive# $4E From D }rive 12 1 to 720 READ CFG. $31 Drive# $4F To Drive 12 1 to 720 WRITE CFG. } These commands are used to configure the drives identified as configurable when the computer is booted: if there } is a possibility that a drive does not support these functions, it should be defined as not configurable (such }as the Atari 810). These commands are used by the "P" command, permitting reconfiguration of a disk drive on de }mand - to format a diskette, for example. (To format a disk on an Indus drive, issue the "P" command to manually chan }ge the density on the drive, then issue the "I" command). The individual bytes transferred by these comm }ands are defined as follows: byte 0: Tracks per side (40 for a standard disk drive) byte 1: Disk Drive Ste }p Rate (as defined by Western Digital) byte 2: Sectors/Track -- high byte (usually 0) byte 3: Sectors/Track -- }low byte(18 for standard diskettes) byte 4: Side Code (0=single sided, 1=double sided) byte 5: Disk Type Code - }- bit 2: 0=single density, 1=double density bit 1: 0=5 1/4 inch diskette, 1=8 inch diskette dri }ve byte 6: High byte of Bytes/Sector (0 for single density) byte 7: Low byte of Bytes/Sector (128 for single de }nsity) byte 8: Translation control bit 7: 1=40 trk. disk I/O on an 80 trk. drive MYDOS Technica }l Manual page 13 Version 4.50 bit 6: Always 1 (to indicate drive present) } bit 1: 1=Handle sectors 1, 2, and 3 as full size sectors bit 0: 1=Sectors number 0-17 (for exampl }e), not 1-18 bytes 9-11 are not used by MYDOS (see the drive documentation as to how they are to be set } -- usually zeroes) MYDOS 4.50 (unlike version 3 of MYDOS) always issues a read configuration comm }and before writing the configuration to the drive and the contents of bytes 9-11 are written exactly as they were } previously read (so they will be unchanged). An additional change in the usage of this command occurs }when a high capacity drive (hard disk) is configured. The configuration data for such a drive is very complex and }is usually built into the drive controller or written to a "magic" location on the disk. To support partitioning } of very large drives (larger than 16 Megabytes), MYDOS issues a write configuration command with the number of secto }rs per track set to number of sectors on the disk (as defined in the "O" command) and the number of tracks se }t to 1. All high capacity disks are large sector drives (using 256 byte sectors). XI. RAMDISK INTERFACE } The driver built into MYDOS is intended to eliminate the need for a "driver" to use common RAMdisk }s. The required characteristics of the hardware can be most easily described by explaining what is done to acces }s a "sector" of information in the extended RAM. (1) The sector number is divided by 128, and the } remainder is then multiplied by 128 and added to 16384 to get the starting address of the sector i }n memory (it will be between $4000 and $7F00). (2) The quotient is used to index into a page table with } one entry for each 16K that can be mapped into the memory area from $4000 to $7FFF. (3) The value from } the page table is "AND"ed with the contents of the mapping register, and rewritten to the mapping }register. (4) The data is moved to(from) the area addressed above from(to) the sector buffers at the hi }gh end of MYDOS. (5) The mapping register is restored to its non-mapping state by "OR"ing the restore v }alue with the mapping register and rewriting the result to the mapping register. No }te that this design forces the RAMdisk to be single density and no larger than 4 megabytes (256 pages of 16384 byte }s each). Out of that, MYDOS can only accommodate 1 megabyte, because its table is only 64 bytes long. } As you can see, the parameters are the mapping register address ($CFFF for Axlon boards and $D301 for the Atari } 130XE), the value "OR"ed into the register to reset the system back to normal ($FF for MYDOS Technical Manual } page 14 Version 4.50 the Axlon and $00 for the Atari 130XE types), and the actual } map values. These values are determined by first identifying the bits in the mapping register to be left unchang }ed and setting them to "1" in each of the register values. Second, the remaining bits are filled in with all the }legal combinations of mapping bits. The values for the Newell Industries 256K upgrade (which uses the 130XE mapping, mor }e or less) are given here as an example -- future versions of this board and other memory expansion products are } not necessarily going to use the same design. Bits: 7 6 5 4 3 2 1 0 1 x x x x x 1 1 } First, set bits 7, 1 & 0 in all the mapping values 1 0 0 0 0 0 }1 1 These are the 12 (of 32) 1 0 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 0 } 0 0 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 1 1 1 1 1 0 0 1 0 1 } 1 1 1 0 0 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 0 0 1 1 1 } 1 1 1 0 1 0 1 1 1 1 1 0 1 1 1 1 Lastly, since the mapping register at $D301 }can be read as well as written, it can be left exactly as it was before we used it by "OR"ing the initial va }lue with zero (leaving it unchanged). The sequence is then: 83, 87, 8B, 8F, C3, C7, CB, CF, E3, E7, EB, EF, 0. } MYDOS Technical Manual page 15 Version 4.50 XIII. ERR }OR CODES AND THEIR SOURCES 3 Last byte of file read, next read will return EOF (MYDOS) 128 Break Abort }(OS ROMs) 129 IOCB already open (OS ROMs) 130 No such device defined in the system (OS ROMs) 131 Write-o }nly IOCB, cannot read (OS ROMs) 132 Invalid command (OS ROMs) 133 Device or File not open (OS ROMs) 134 }Invalid IOCB reference (OS ROMs) 135 Read-only IOCB, cannot write (OS ROMs) 136 Attempt to read past end of fil }e (MYDOS) 137 Truncated record (OS ROMs) 138 Device Timeout (OS ROMs) 139 Device NAK (serial bus failure }, OS ROMs) 141 Cursor out of range for graphics mode (OS ROMs) 142 Data frame overrun (serial bus failure, OS R }OMs) 143 Data frame checksum error (serial bus failure, OS ROMs) 144 Device I/O error (in peripheral hardware, }OS ROMs) 146 Function not provided by handler (OS ROMs) 147 Insufficient RAM for graphics mode selected (OS ROM }s) 160 Invalid Unit/Drive Number, zero or greater than 7 (both MYDOS and OS ROMs) 161 No sector buff }er available, too many open files (MYDOS) 162 Disk full, cannot allocate space for output file (MYDOS) 163* Writ }e protected or system error - disk is not readable (MYDOS) 164 File number in link does not match the file's directory } location (MYDOS) 165 Invalid file name (MYDOS) 166 Byte not within file, invalid POINT request (MYD }OS) 167 File locked, cannot be altered (MYDOS) 168 Invalid IOCB (MYDOS and OS ROMs) 169 Directory full, }cannot create a 65-th entry in a directory -- entries may be used for "lost" as well as real files (MYD }OS) 170 File not in directory, cannot be opened for input (MYDOS) 171 IOCB not open (MYDOS and OS ROMs) 17 }2* File or directory of same name already exists in parent directory, cannot create (MYDOS) 173 Bad disket }te or drive, cannot format diskette (MYDOS) 174* Directory not in parent directory (MYDOS) 175* Directory not emp }ty, cannot delete (MYDOS) 180* Not a binary file 181* Invalid address range for loading a binary file, ENDSIGNON%%>SIGNON;;LOG ONTO THE SCREEN DMSG }X;Q> PBPTR%>'BPTR;;POINT BPTR AT $C000Q>PSAVC;;SAVC IS NOW $FF$>4CLRCP@BPTR7;;FILL $C }000 TO $CFFF WITH $FF BYTES&30 HCLRC: #BPTRD0N HCLRCXX;bQ>BUFFERl PBPTRv'Q>BUFFER;;POINT BPTR } AT "BUFFER" PBPTR$> Q>0MVLP1P@BPTR7;;FILL 8K BUFFER WITH $00 BYTES3 HMVLP1 #BPTR0 HMVLP1 }X;,X; COPY NEW DOS CODE FROM FILE "MDOS.OBJ"X;$>MSG01%>MSG01 0 DMSG;;ANNOUNCE WE ARE READING "D2:MDOS. }OBJ"%>DOSFIL Q>DOSFIL*& LOADBF;;LOAD CONTENTS OF MDOS.OBJ4X;>4X; COPY NEW DOS AND DUP CODE FROM FILE "MDUP }.OBJ"HX;R$>MSG02\%>MSG02f0 DMSG;;ANNOUNCE WE ARE READING "D2:MDUP.OBJ"p%>DUPFILzQ>DUPFIL& LO }ADBF;;LOAD CONTENTS OF MDUP.OBJX;$X; MOVE BUFFER DOWN TO LOW MEMORYX;$>MSG03%>MSG036 DMSG;;ANNOUNCE } WE ARE RELOCATING DOS AND DUP CODEX;Q> PZPTRQ>+PZPTR;;SET DESTINATION POINTER TO $0700Q>BUFFER } PBPTRQ>BUFFER)PBPTR;;SET SOURCE POINTER TO "BUFFER"$X;.%>8MVLP2Q@BPTR7B.P@ZPTR7;;COPY 256 BYTES }AT A TIME UNTIL WEL)3;;ARE ABOUT TO OVERWRITE BUILD ITSELFV4HMVLP2;;(THIS IS TOO MUCH, I HOPE, BUT IT WORKS)` #BPTRj } #ZPTRt QZPTR~R>START HMVLP2X;X; REINITIALIZE SYSTEMX;$>MSG04%>MSG04/ WFSTR;;AN }NOUNCE STARTUP AND WAIT FOR A KEYX;# DOSINI;;REINITIALIZE NEW MYDOSX;$>Q> PICMD Q>, PIAUX1 } Q>EC( PIBUF2 Q>EC<PIBUFF1 CIOV;;REOPEN THE KEYBOARD/SCREEN "E:" DEVICEPX;Z$>MSG05d%>MS }G05n6 WFSTR;;ANNOUNCE WE ARE READY TO RUN THE NEW MYDOSxX;;!@MENUP:;;THEN GO WHOLE HOG: USE "H" COMMAND TO SAVE IT }X;X;.X; LOAD CONTENTS OF OBJECT FILE INTO BUFFERX;LOADBF'IBUF PIBUFQ> PMINAD'PMINAD;;SET }LOW ADDRESS AT $FFFFQ> PICMDQ> PIAUX1Q>%PMAXAD;;SET HIGH ADDRESS AT $0000" PMAXAD, PIAUX26$> }@* CIOV;;OPEN D2:MDOS.OBJ OR D2:MDUP.OBJJ IGOTFILT$>NOFIL^%>NOFILh/ DMSG;;REPORT IT IF WE CANNOT OPEN TH }E FILEr!@ :|X;GOTFILQ>;;ELSE,!PICMD;;CHANGE COMMAND TO READQ>BUFAD PIBUF$Q>BUFAD;;BUFFER TO LO }CAL ONE PIBUFQ> PILENQ>PILEN;;LENGTH TO 2 BYTES$> CIOV;;AND READ THE HEADER GINVHDR;;IF } ERROR, REPORT IT QBUFAD MBUFAD!R>;;ELSE, VALID HEADER WORD?& IRDNXTB00INVHDR$>NOHDR;;IF NOT, REPORT THA }T ERROR:%>NOHDRD DMSGN!@ :XX;bARDNXTBQ>BUFAD;;ELSE, READ NEXT WORD PAIR (START-END ADDR)l PIBUFvQ>}BUFAD  PIBUFQ> PILEN;;SET LENGTH TO 4 BYTESQ> PILEN$># CIOV;;READ START/END ADDRESSES#}IRDDATA;;IF NO ERROR, LOAD DATA)>;;ELSE IS IT AN EOF?$HABORT;;IF NOT EOF, REPORT ERROR:!MOVER;;IF EOF, WE HAVE LO}ADED IT ALL, RETURN NORMALLYX;RDDATAQBUFAD %BUFAD  )MAXAD8DNOTMAX;;IF THIS BLOCK SETS A NEW MAX ADDR}ESS LOADED  HNEWMAX* RMAXAD4 DNOTMAX>4NEWMAX'MAXAD;;UPDATE THE MAX ADDRESS COUNTERH PMAXADR NOTMAX;\ SBUFAD}f PZCTRpCz SBUFAD PZCTR #ZCTR HLENOK #ZCTRLENOK DEBUG1 %BUFAD QBUFAD>)MINAD;;A}ND IF THIS BLOCK SETS A NEW MIN ADDRESS LOADED DNEWMIN HNOTMIN RMINAD+ENOTMIN;;UPDATE THE MIN ADDRESS COUNTER}NEWMIN)> DNOTMIN 'MINAD PMINAD$ NOTMIN)>. DDONTMV8 ')>;;DO NOT USE THE INDIRECT BUFFERB 1EDONTMV;; IF} THE DATA IS AT <$0700 OR >$BFFFL O>BUFFER V 5` Cj O>BUFFER t ?~ 7 DONTMVPBPTR 'BPTR D}EBUG2 Q> PILEN %PILEN;;READ ONE BYTE AT A TIME GETNB$> CIOV &ISTBYTE;;AND IF NO ERROR, STORE IT ABO }RT$>ABORTED %>ABORTED  DMSG;;REAL I/O ERROR !@ :;;EXIT TO DOS X; STBYTE%BPTR HSTBY0( 7%BPTR;;TE }ST FOR BUFFER POINTER BEING STILL VALID2 )>< HSTBY0F PSAVCP FSTBY3Z STBY0%>d %P@BPTR7;;STORE THE BYTE JUST READ }n STBY3#BPTRx HSTBT1 #BPTR STBT1QZCTR !HSTBT2;;INCREMENT THE POINTER "ZCTR STBT2"ZCTR QZCTR &L }ZCTR;;DECREMENT THE BYTE COUNT 6HGETNB;;IF STILL IN THIS BLOCK, READ THE NEXT BYTE &!RDNXTB;;ELSE, READ THE NEXT BLOC }K X; MOVERQ> ;;DONE WITH LOAD, PICMD $>  CIOV;;CLOSE THE LOAD FILE PSTR A(A=" QMINAD, 9 PHEX;};REPORT THE CURRENT MIN AND MAX BUFFER POINTERS6 QMINAD@ PHEXJ PSTRT A-A=^ QMAXADh PHEXr QMAXAD| PH}EX $>LOADED %>LOADED DMSG ":;;AND RETURN TO MAIN LINE CODE X; X; PROGRAM FILE (NEW FMS) X; DOSFIL }AD:MDOS.OBJA= X; (X; PROGRAM FILE (NEW UTILITY PROGRAM) X; DUPFIL AD:MDUP.OBJA= X; X; CONSOLE KEYBOARD/DISP}LAY X; EC AE:A=& X;0 ,X; DISPLAY A MESSAGE AND WAIT FOR 'START': X;D WFSTR DMSGN Q>X Pb %WFSTRTQ;;REA}D CONSOLE SWITCHESl M>v HWFSTRT;;WAIT FOR START : X; %X; DISPLAY A MESSAGE ON THE SCREEN X; DMSG&ZPTR 'ZPT}R Q> PZCTR MSGLP%ZCTR Q@ZPTR7 FDXIT BYTOUT #ZCTR HMSGLP X; DXIT: X;* CODE A0123456789}ABCDEFA4 X;> 0X; DISPLAY A 4 DIGIT HEX NUMBER ON THE SCREENH X;R PHEX5\ V?f V?p V?z V? > QCODE9 BYTOUT 7 }M> > QCODE9 X; BYTOUT$> &ICMD $> &ILEN &ILEN CIOV:X;$ PSTR7. PZPTR87B} PZPTRLPLOOP#ZPTRV HPOUT` #ZPTRj POUT$>t Q@ZPTR6~ FPEXIT BYTOUT !PLOOPX;PEXITQZPTR}5 QZPTR5:X;+X; REPORT THE HIGH AND LOW BUFFER LIMITSX;DEBUG1 PSTR A(A=  QBUFAD PHEX }QBUFAD( PHEX2 PSTR< A-A=F QBUFADP PHEXZ QBUFADd PHEXn:xX;DEBUG2 PSTR A)A ==}== ==== =:X;.X; ROUTINE TO REINITIALIZE THE LOADED MYDOSX;DOSINIQP  Q} P '!@ :;;==REINITIALIZE ENTIRE DOS/DUPX;*X; IMPORTANT MESSAGES FROM OUR SPONSORS"X;,SIGNON =6* A }ӠɠӠA=@0 A 򠠠A===JX;T"MSG01 ALOADING D:MDOS.OBJA=^"MSG}02 ALOADING D:MDUP.OBJA=hLOADED ====r ====| ==== ==== ==AEDA==}=,MSG03 AMoving DOS/DUP into placeA==4MSG04 APRESS TO INITIALIZE NEW DOSA==0MSG05 APRESS }TO ENTER NEW DOS.A==X;*NOFIL ACannot open Object FileA==0NOHDR AInvalid Header in Object FileA==,AB}ORTED AI/O Error, load abortedA==X;'X; BUFFER FOR PATCHING A RUNNING DOSX; MAXAD MINAD SAVC }BUFAD;;FOR ADDRESSES&BUFFERSTART0X;:(X; EXECUTION FORCED, LOAD RUN ADDRESSDX;NX START;;run address!}bX;D;;FOR ADDRESSES&BUFFERSTART0X;:(X; EXECUTION FORCED, LOAD RUN ADDRESSDX;NX START;;run address HLݠJ 3JLL #K 3J J H6K 3JJ HdK 3JL#}HK #J JB,J DJE V䢢K #JlTULLRZLL[ V K 3Jl RTLUX$}Y V0 L-L ڠK 3Jl TLUXY VrLILLL LLL8LL JLLLL%} LL iHiEh JXY V K 3Jl LLI R V }J(L YJL&} YJ }J-L YJL YJIK 3J`D:MDOS.OBJD:MDUP.OBJE: 3JЭ)` lJ`0123456789ABCDEFHJJJJIJ lJh)I'}J BHI V`hh lJLJHH` }J(L YJL YJ }J-L YJL YJ` }J)`  l Ӡ(}ɠӠ 򠠠LOADING D:MDOS.OBJLOADING D:MDUP.OBJEDM)}oving DOS/DUP into placePRESS TO INITIALIZE NEW DOSPRESS TO ENTER NEW DOS.Cannot open Object FileInvalid *}Header in Object FileI/O Error, load abortedHW DOSPRESS TO ENTER NEW DOS.Cannot open Object FileInvalid 6 MYDOS 4.50 Source Code Documentation ,} Copyright (C) 1988 by WORDMARK Systems and the authors: Charles Marsle-}tt 2705 Pinewood Dr. Garland, TX 75042 .} CIS: 73317,3662 UseNet: CHASM@KILLER.DALLAS.TX.US /} and Robert Puff Suite 222 0} 2117 Buffalo Rd. Rochester, NY 14624 GEnie1}: BOB.PUFF This software may be freely used and distributed provided that this copyright not2}ice is left intact, and provided that: (1) The source code in machine readable form is provided with any 3}binary distribution, or made available at no additional cost to the recipients of the binary distribution. 4} (2) A binary version of a derivative work may be sold for a reasonable distribution charge (less than $50), and th5}e source code in machine readable format must be available. (3) A derivative work may not impose and rest6}riction on the free distribution of the source code. This is the source code 7}to MYDOS version 4.50. It is in MAC/65 tokenized code. Use the LOAD#filename command to load. If you do not have8} the MAC/65 cartridge (or disk versions), there is a program in the May 1988 (issue #60, copyrighted!) of A.N.A.L.O.G. m9}agazine that will allow you to read the files. Here are a few notes on how to create a working copy of M:}YDOS from the source: (1) It is easiest to use an older version of MYDOS to assemble the new DOS. All f;}ilenames used in assembling use the D: default drive number; so go to your DOS menu, and set the default drive (and <} directory) to where your source code resides. The source code and object files will all fit on one double density disk=}. If you only have single density drive(s), then separate the MDOS and MDUP files, but put the object files on the>} same disk prior to BUILDing. Now exit back to MAC/65. (2) LOAD#D:MDOS.M65, and ASM,,#D:MDOS.OBJ. This will?} assemble the main part of the resident code. (3) LOAD#D:MDUP.M65, and ASM,,#D:MDUP.OBJ. This will assemble @}the rest of the resident code, and also the non-resident DUP.SYS part. (4) Now go back to DOS, and binary LoaA}d BUILD.OBJ. This file will read the MDOS.OBJ and MDUP.OBJ files you just created. Press START, and you will be iB}n the new DOS! Now use the [H] command to write out DOS files, and you're set! What the files contain C} The MDOS.M65 and MDUP.M65 files are "header" files, that have some equates, and simply INCLUDE the actual sourD}ce files (source files are MDOS1.M65, MDOS2.M65, MDOS3.M65, MDUP1.M65, and MDUP2.M65. Be warned that there are absoE}lute references that MDUP makes to the MDOS files; if the MDOSx files are modified in any way, these references wilF}l need to be changed as well. They are located in the very beginning of the MDUP.M65 file. The DOS.SYS G}file itself is contained mostly in the MDOSx files; but the code that takes care of MEM.SAV and loading DUP.SYS is in thH}e file MDUP1.M65. Because the dos is split between two files, you must take note of the last byte the assembly of I}MDOS.M65 produced, and place this address in the "ORIGIN = xxxx" statement in the MDUP.M65 segment, or the possibilJ}ity of both files running into each other will exist. I think that is about it. If you find/correct anyK} bugs, or do any major modifications, Mr. Marslett and I would like to see them. Please see the above references onL} how to contact us. Bob Puff 11/28/88 see them. Please see the above references onL