@L}5 _$% l0$)$$Hȱ$ UhL" `e$$%`$%`  R@P!( L(1   Y I`  d  Ld M * @  $ % CC$$)%1 Udߥ$9%: !0 S$% DD˙`  }J)Lr d M * @  $ % CC$$)%1 Udߥ$9%: !0 S$%} DD˙`  }J)Lr J  ((  p L ()   J}L= ( L 0q A    IB JC;? D W } LL  ` W )LA!  ߰")-݆ p" } $G@LL 08`Q")<2Q0 -G$Ș݆ UL# ; p8(()(0ʥ)NQ` }$GȘ݆LU )L ݆ L GȘ ݆LL )W>Z   HH)H }p h  hyhy D L> L JJ    ! LA*` BF }7'8  M HN H` 8 Z  \LdJJ!"! GFE@F (!L }EE !E^ ^ E E7EȩEdE/EȩE  D } .L }  ;F d  ;?F7F? ( .   Z D LL d } . D  L    p  E` , d)  D L) 0BM݊L݉} ML  N݆ L NLML [ TEqEHȱEqEh 0Gȹ G} HLL GɛL  LFREE SECTORS G) *Gȩ GȽG GȌ*jj >G} C8jJ3j2CD( C202C ԠBX` N 1? l LlD:RAMDISK}.COMLu L1 L ;LHL  T`  `8  ɐ     `TU  } L ? .  t`GBJ ~DEHI B V0dV!}QDEHI VF9 ,0 ,0 s0hhL  L` H hDHEh"}DEL8HI4 0 HI,0 0  9 .G VLO#},0 L4*IJ`llD1:AUTORUN.SYSNEED MEM.SAV TO LOAD THIS FILE.D8:MEM.SAV J y08 B|DEHI$} V0 0`B;DEL`?<0LV`@ʆ v s? F0Ξ05: [ BDEHI%} VY8 B V  @  /DE `E:D8:DUP.SYSERROR-SAVING USER MEMORY ON DISKTYPE Y TO &}STILL RUN DOS B;DE J  (` 9 V⪍ ઍ  -'}LLu ÝDEHILV 9 .l 9 .l  `` s$B BH(}I|DE V BLV nB,DE JLV B V BLVDEIʩ BꭝLu } 3E:}DISK OPERATING SYSTEM II VERSION COPYRIGHT 1984 ATARI CORP.A. DISK DIRECTORY I. FORMAT DISKB. RUN CARTRIDG*}E J. DUPLICATE DISKC. COPY FILE K. BINARY SAVED. DELETE FILE(S) L. BINARY LOADE. RENAME FILE M. RUN AT ADDRES+}SF. LOCK FILE N. CREATE MEM.SAVG. UNLOCK FILE O. DUPLICATE FILEH. WRITE DOS FILES P. FORMAT SINGLEL !N',}#"&))9(&*)/h)''-&؆莟R'S  vL/ˢ L }Insert DOS 2.0s, type Y Λx -}DEfHI 1莏#q! @ y0ɛ8A0,' ȅ 1 1ild! 1L!NO SUCH ITEMSELECT.} ITEM OR FOR MENU! 0 .z:*{}.|{ 1 0 0JB 18L%|DL/}%DIRECTORY--SEARCH SPEC,LIST FILE?[# 0 0 &|D3" 1L!NOT A DISK FILEN !B 1L!E# 1 !BD0}ED:}:1BJ|DE 1DEBHI 1 h0ߢ 0.1}  0?詛 1 y0YЛ 1 ;#L" ;#L! BL1TYPE "Y" TO DELETE...DELETE FILE SPEC2}COPY--FROM, TO?OPTION NOT ALLOWED228 FREE SECTORS COPYING---D1:DISKFIX.COMl# 0|D .L/%#3}##JB|DE 1BHID#E 1#0: B 1L!#͑### B 1#c$0SY4}S1}:## # # .#Ƚ# # 𩛙## 1,#PD#ELJ- <.BJD#E 5}1 1HH 0hh|DL%1}:̳# L% #D#EL% 1 0 . .0O% 1L!WILD CARDS NOT A6}LLOWED IN DESTINATION 0 <.|K}N 2 FORMAT. t* 5) 1L!`) 0NΞ 0 L1) 1 L!BAD LOAD FILELOAD FROM WHAT FILE?) 0 ?}0#B 1L!WHAT FILE TO LOCK?) 0 0$B 1L!WHAT FILE TO UNLOCK?DUP DISK-SOURCE,DEST DRIVES?TYPE "Y" IF OK TO US@}E PROGRAM AREACAUTION: A "Y" INVALIDATES MEM.SAV.FE! +L1   `*  70 2 2A} 0.* 1 y0 0)INSERT BOTH DISKS, TYPE RETURN^, 1 y038逍 N, 1L! ,B}C, t*  Lx+, 0 ^, 1 y0 , ,0,0 ,L+ ,I0 ,Vǭ0C}Ξ, 0 }, 1 y0C,ШC, 0K'!" H H 'h h Lx+!EF 5L1L!D,I,HhD}` NOT ENOUGH ROOMINSERT SOURCE DISK,TYPE RETURNINSERT DESTINATION DISK,TYPE RETURNE}`  `8 rL1`-* 1P* 1 y0Y`hhL!NAME OF FILE TO MOVE?- 0 0|DL% <.F},^ 1 70 0 .@L# .BJ 1  DEHIB V L1 ,} 1 70,L.  G}JB|,#P#DE 1 HI BDEHHII 1 B 1 ,^ 1 70,0La- B V,#PH},^ 1 70 0L#L!-* 1P* 1 y0Yj383}mm ݭI}}`8}``|* ? ɛ,`|:-)| / 1L!`DESTINATION CANT BE DOJ}S.SYS0 0H{ 24Δ 28/L!/) 2 Π 2 0 ξK}hAΞB,0 J 1 BDEHI,HÝDE 1HIHIDELSAVE-GIVE L}FILE,START,END(,INIT,RUN)O S0 1`BDEPHI V` S0H 1 L!M}0 0 1L~0`PLEASE TYPE 1 LETTER,0`hhL! 70 1L0L<1 ,;ɛ7,"ɛ:ݦ1ݥN}A"D|ݤD|ȩ:|ȩ|ɛ,,(/+.ީ1 1,ɛ`轤{NAMEO} TOO LONG B VL!` L1I H1EΝDL1|mDiE` V0`8d/8 i:222 1 LP}!ERROR- 128ɛ+,' 20*.. өr2 1``2TOO MANY DIGITSINVALID HEXAQ}DECIMAL PARAMETER800 0 8 00`,0'D800 H,ɛh`2L1NEED D1 THRU D8uR} ECIMAL PARAMETER800 0 8 00`,0'D800 H,ɛh`2L1NEED D1 THRU D8ue? %ͳBB! % P* v% w%u % D %LH&T}U}$%-fffffff>`<|0`̌8l8pv00```00 0f< xX}|||||||~|l8l8lfff< 0`@`0 Y}000006c|™|™|~x|™|as22sa>2222r|晒xLLLLZ}NB|晁晉|™||™v|~Þ~fdddd||晙d8晙™晙dd|2x`x`~[}<~~< Xpx ~ <~~<|~~||~~||>````~~8<\}8<||~~~|0000~l8|ll8l~ 8`]}8pp80$1$3$4$ s?s?1$4$ॄ``e^}x$w$e{$z$褄 x${$`(mlDeXYio?p?r?{?)^kD)kDȄ_}{?Čein?kD@L$i(L$y?z?`f?o?u?g?p?v?8i?g?Ƌ拑`}` /` /` @jD %LH&} /r?f?h?j?l??@ClD(kDDig?18m?8k?8i?a}?Km?i?k?m?` -f?g? $ &= Y%q?L' &= Y%q?`'XRUT`H)h)` i@LE&8 `jDb}CIjDIjD $ /(ЭjD +LH&)کLQ&ЭCq?H &hɛL&,C0ɜc}f) `{\\X^T_PHC^r? |,h ,&) C $8u?v?iu?iv? 'LH&S'S'LH&ʊ &Hd}GHx'Hw'H`#\^~ }|_   ((("))))*1+{,[+,-0-Q-2.85\41|67f)7L+ 7O*;m=S,K,/fhdgsaLJ:K\^OPUIw}_|VCBXZ$#&%"![ ]NM?REYTWQ()'@}FHDGSA {   ` } 1pzDx}>EHIJB V0\gDgDdCeCgDgD 10?+K / 103iD 10) /iDiD. /LV1  1ƌL-1p y}B VpC`H /h / 10 /L1pHIBLV 5 Y/ 5R} / 1 3CCCgDgD 3 o%2a)_2z}L2ʊ *2H)2H`RLUF1234 F2S2p222322T3n3n3n3n33v3 3CLa2 3CgD CCCL1 3C8La2{} 3CigDުLa2z>C) 87 C 콺C.ʎCC`pBCHIDCELV 2! 2L3 3L1 2#L|}2 2$L2 3O? Y%@ .x?+ 2C,CȽ?Cx?CC 3 L2 3L2 3Z? Y% , 3 2L2{>L1pC}}J 2 20% % ~50} / - &LH&T /L/? 1 32> Y%? / /l> Y% o% 3L2 I` 3? Y%~}{>L/CL 4Cf?g?L&4C8v?勪,C0ɛ^LR4 ,&LR4^LR4 87` &> Y% 40@ 4pf?}Dg?E8u?f?Hv?g?I B V0 3 10 L5H 3h!H} /2> Y%h / 4 -q?` &:> Y%L4C BLVpCC}H@ .hx? &hhL- 4CD?Ex?HICJBLV8f?g?ą &T> Y% 4L4 }% ~5L4L5CDE8h?冝Hi?凝IB V`CHmf?u?Img?v?u?eu?v?ev? 4u?v?` 4}L4} /J> Y%L4@ԭ))`????8* &?.??.??.??.? ??L"6? ?8???}???LT6?`8?j???k?? ? &> Y%q?`m?m?8u?倅v?偅ei? &> Y%q?` M$?}mu?u??mv?v?j?k? $L'ȱȊ`)?! ;I@L(H)h)` @@LO7i `KB:P}?HH8????1pHI B? V( 4LH&hh?` &>LY%L8 &> Y% 5 4L8 5 7?}???CR7? ??]7C@f?g?????L9^)@???t??t?ȱt?8e}i? M9? u98.?t?s?@ < 9?? 88u?v?<:? ?? 8?E /l> Y% o% 1} -} / &LH&L88??0 9?s?B u9 < 9 9 9???8???? &Š> Y% o% 7?s?}A u9 Y% .?L &??x?L &?}?S? ,&ъ 拥v?6?eiu?Ōv?卐8??? '` &> Y%q?`Э# &> Y%} .@?@x?L &8??e??ee8u?傅v?僅 $8u??u?v?v?@)?? ,@ ,&}@m@iL's?0 87 b7?  b7_ b7L<`?)? 87c8?s?J8? b7?LError #}BREAK Key AbortNo ErrorsLoad (Device:Filename)> Press D1:*.*Memory FullNo text in bufferPrint (Device:Filename)>}Printing...Insert next sheet, press Find:Not foundChange to: -elete ock nlock ename ormat }-oad Drive [ ]: Rename to:Format diskfoundChange to: -elete ock nlock ename ormat 8 ! } }^SSMVXWK }LMZLZMIZ[V` B V }`B JKL!S:DE VXͥYΩ˩ ̠I8Y` $fffffff>`<| }fl0fF68of;p88pf< 80 0 ~~`0 0```nf>ff~fff~~f<flxxlf`````~cwkccfv~~nf R &L0''L&ԅ' } 9 4L0'' 9 4 &L0'i K%) U'4$ %' + Z' eXeY$$m$ }Ly& +L0'Ńł `$  <Ņ 壟ń xQ5n16k5ꅒ4 + {1 x4` + 9 {1 3 ;RHHTU &@ 6 ( |))?<'N % }%~)ɛH [ج$ %UU('U < &Lb3UULl3 < &$ ]Ll3$hh %% 3L,3 9`4 }L{1Ł ŀL34 0 /T'U &Ly&Łŀ4 +< x4L2բ4 +< 0 + 0] &Ly& } %% K%kl` (zilbp`a) uaew ly my qpkd?(l/k) oexkfa miiwd uaewd z` wegnldywaa,rbx ozndl?(l/k) geha dz }` m`d henxituaew zwignuaew zxinyuaew z`ixwiy`xd hixtzl xefgl ick ESC ywdoexkfa uaew oi`!reviaa dle }rtd + 95 +< ;R ( |) 3L2 <BJKL5D1:D5E V 9L5 6 + 0U [E 6BJ }KL6D:*.*D5E V 9BDEHI V0! BDEHI VL6LV6 BUD6EHI } VU BD6E HI V qBL2RETURN ywd + 5 ,3L2 6 < H!BJKDE V 90L2 }$` B V`Ł ŀW5 +<6 +< qBL25 ,3L2 < H &H 9 := 'U$ɛ9K   } 7U +U'UŃł 7 6L2 7U0 7L7 Lo7U' 7U 7 'ULo7% BD }EHI V 9` 6L7'5 ,3L2 HŀŁ 94 +< x4 0 :=LV8 := =ŃłHH +< qB`߰߅ߓߒ  ߗ߅ߐ }ߟߗߎ RETURN ywd ?(l/k) jnqnd lk z` qitcdl- xtqn cenra lgd- xtqn cenra dlkzqtcnl.j }qnl.(dnecke tiih,wqic) xg` hlt uexrl.?zqtcn efi`l1027 ix`h`. zxg`.?miwzrd dnkDž } <Ł 勒ŀL2ɛ +ee 6 9> +<> +<Ţ> +< %%123 HL? `GL? GL? }H &H 9 9j> +< x4* 9> +< FՅ 9> +< FՅťƥͥ C G毩… "C }JȅD 9:܅Cɛ$ 9 pCŃłLC 4L`@ IEL1@ /EMU pH8墪88ų %DL@ "CȅD } 9 4L#AL2 D8厅叅A8Ų90 @}  IEL@L@hh LA IEL1@ LAL@8墅 }}  IE䲐L6A oELYA E >G[ FV BHIiiDiEI V 9 D DƳ >G }  C泥hh` IE "C `C PE8`ɴ# IE `C PEH h` `C IELB8` } A` A` A` A` A` A` A` A` A` %%ɛ` AՅ` IE "Ck l ` }` PE`LIEeeLIEeeLIEPBϩ` ` }  IEŃłLC`ɛ IEŃłLC`0:8`` IE0L IEŃłhh ^H %D }  D 6R eDL2` BŅƅͅ΅L @)B1B9BABQBIBBYBBBDqBaBB DiBE` %Dhh AC }IE "CL@8夅ś DL,D8囅80 DLAD vDLAD >G 96 +< qB 9`LDHH @hh }` >G! BƝDDEHI V 9` AhEEEE@GBLDHHLD0 @ +LD` LA }0 DLE IE88奪`ţ DL/E DL/E`L%D`ƎƏ` ԅ ś`LIE EJi8囅e  }`ei hh` A IE  IE` EƲ` pH }H%F` E8 } F 䴰  䴐ŘLfFŗe坅8坅> 즖 Lt }Fƛ 浩 LFƷ0 浩 Ŵ` `] + C3 + ذ ٥`e80 Űeũ``ԥ }H h08Ų`)ʈ IE`ūŪŭ Ŭ`8` B 9> +<> +< ? +< %% }21 9? +< FՅ NH` G 6B JKLGE:ƝDGE VXURĩ `(L }B ,3 G`D C P`H 6hJBDEHIK V`P:` `LLA8e` F } EĴ` C` RŃł8` R`%8'墅8喅ɛ0 Ń  }`NI 9 4LH &I RLH R EIƊƋ`Ƣ'` [IhIIطI  &I R` &I'  &ILkI } I` RŃ ł `'  &ILI &I R`hh R`ɛ#LdJ RŃł R }J +&8'弅ie©e8嬅孅8(e +&8(弅8Ņ08庅`Iie` R LI } H0 + 9 L +< R 955 +< & (8`8倅偅`U ĥ R +&8(弅 &;e } Hŏ$ŎůŮ + 9L +Qͫ$Ə` w  FF                    }                          }        ABOUT THE DISK FORMAT by nir dareyA diskette is composed of a} thinmagnetic disk covered by thin plasticusually black. The cover has an openarea on both sides exposing themagnetic dis }k surface to the drivefor reading or writing.As the diskette spins in the drive,the read/write head is actuallyover the o }pening, reading/writing thedisk surface like a cassette recorderwould.The diskette is divided into tracks.A track is a r }ing about the centerof the diskette.The drive head can be positionedover any one of the tracks, and datacan be readed fro }m the surface.A disk can be formated in differentformats. Single Density format isdividing the disk into 40 tracks of18  }sectors each with 128 bytes persector, total of 720 sectors on thedisk, that give us 90 kilobytes onthe disk.Dual Density} or as most known as1050 Density, the disk is dividedto 40 tracks of 26 sectors with 128byte each, that give us 130 kb. on}a disk.Double Density format is dividing thedisk to 40 tracks of 18 sectors eachwith 256 bytes per sector for a totalof }720 sector, which give us 180 kb.now we will talk about how data istransferred from the diskette intothe computer.A sect}or data is a magnetic fieldsthat being converted into electricpulses which are fed to the floppydisk controller.The flopp}y disk controller is theinterface between the read and writehead and the drive microprocessor.the floppy disk controller p}erformsall sector searches and uses totransfer data between themicroprocessor and the physical disk.The disk drives proc}essor receivesa full sector of data every 1/18 ofa disk spin.This is about 0.0115 seconds.The format is controlled by th}eATARI ROM C.sector sequence per track is:(the track is circular)18, 1, 3, 5, 7, 9, 11, 13, 15,17, 2, 4, 6, 8, 10, 12, 1}4, 16However, the serial transfer betweenthe computer and disk drive isslower, about 0.09 seconds.Since the diskette is }turning at288 RPM, you will find out that twosectors can be readed in one diskspin. This is the concept whencreating fast} format.About the Disk Operating Systemformat.DOS 2.0 format the disk at SingleDensity total of 720 sectors.DOS 2.5 can} format the disk in DualDensity total of 1040 sectors.both formats uses sectors whichcontains 128 bytes of data.in DOS 2.}0 there are 707 sectorsfree for files, and in DOS 2.5 thereare 1011 free sectors.you probably ask what happened to themis}sing sectors ?, well the DOS usesmost of those sectors as informationabout the disk and the files thatare on the disk.Th}e disk sector map for DOS 2.0:sectors : contents :----------------------------1-3 boot information4-369 }free for files360 VTOC361-368 directory information369-719 free for files720 not usedThe disk sector map fo}r DOS 2.5 isthe same as DOS 2.0 with theadditions of the following:sectors : contents :------------------------}-----721-1023 free for files1024 extended VTOC1025-1040 not usedwell that's all what i can say aboutthe format of } the diskette. free for files1024 extended VTOC1025-1040 not usedwell that's all what i can say aboutthe format of  FF                    "}                          #}        THE BASICS OF A SECTOR by nir dareyA disk can be formatted in d$}ifferentformats. Single Density,Dual density(enhanced density) and Double-Density.A sector is one of 18 sectors in atrac%}k at Single Density, and one of26 sectors in Enhanced Density.Becuse the track is a ring ofmagnetic disk,(means that the t&}rackis circular) there is no way todistinguish between the beginning ofa track from the middle.Therefore a sector needs t'}o be ableto identify itself to the drivecontroller.A sector has two parts to it: theheader and the data.the purpose of t(}he sector header isto identify itself to the drivecontroller. The headers are writtenonly when the diskette is beingforma)}ted, when reading or writingthe drive is automatically reading the headers to know what sector it is.The sector data is the*} content thatbeing reading or writing to thesector. ԛ śthe floppy +}disk controller requestseach byte in a turn and places itdirectly into the surface of thediskette. The bytes sequence iss,}hown in the figure.as you see in the sector there areseveral spaces to protect thedifferent contents.SPACE 1: this space -}should be atleast 1 byte long.SPACE 2: this space must be 17 byteslong.SPACE 3: this space should be overnine bytes long.}, this is to protectthe next sector header from beingover written.When a sector is being readed thefloppy disk controller/} is searchingfor the sector header. When thesector header is founded it comparesthe sector number and the tracknumber to 0}those given by thecomputer. If the comparison fails,the search continues. If all iscorrect, the floppy disk controllerbeg1}ins searching for the data AM.if the data AM is found within 28bytes, the sector is been readed andtransferred to the comp2}uter. now theCRC status is checked for validity.If the sector is never found theprocessor will reposition the drivehead i3}n hope that the head had beenon the wrong track.The write process is identically tothe read command except that when thes4}ector is founded, a write occurs.There are different kinds of sectorsthat being used in protecting thedisk from being cop5}ied.BAD or MISSING SECTOR: this erroris occurred when junk data is writteninto the sector header.CRC ERROR SECTOR: this6} error isoccurred when the CRC status at theend of a sector is checked, whenthese bytes do not match with thedata that be7}ing read from the sectora CRC error will occur.DOUBLE SECTOR: this is occurred whentwo or more sectors have the sameid n8}umber, if you will read thesector you will get different sets ofdata.SHORT SECTOR: short sector is asector with less the9}n 128 bytes.FUZZY OR PHANTOM SECTOR: when readingthis sector you will get a CRC errorand random data set.DELETED DATA M:}ARK SECTOR: thissector is a good sector but the datatype flag had been changed toreflect a bad data mark.it is almost im;}possible to controland change the sector header with anunmodified disk drive.Well that's all what i can say aboutthe sec<}tor, please forgive me if imissed something.er with anunmodified disk drive.Well that's all what i can say aboutthe sec.  FF                    >}                          ?}        MAPPING THE DOS DISK by: nir darey.This time we will examine ho@}w the DOSuses sectors to store and keep trackof programs or data files.lets look at a DOS disk.The first three sectors cA}ontains theboot information. Sectors 4 - 359 arefree for files. Sector 360 is theVTOC. Sectors 361 - 368 are thedirectoryB} information. Sectors 369 -719 are free for files. Sectors 720is not used. Sectors 712 - 1023 arefree for files in enhanceC}d densityonly. Sector 1024 is the extendedVTOC for enhanced density only.Sectors 1025 - 1040 are not used.There are threD}e different kinds ofsectors that stores information aboutthe whole disk.First the BOOT SECTORS. first we mustunderstand wE}hat is a boot sector.well, a boot sector is the firstsector on a disk. the boot sectoris actually the header of the wholeF}disk. The most important at the bootsector are it's first six bytes.Byte zero is the boot flag, it isusually unused.Byte G}1 contains the number of sectorsto be read as part of the bootprocess. the number can be upto 256.Bytes 2-3 contains the sH}tart addressto load the boot data.Bytes 4-5 are the initializationaddress.As for the boot sectors in the DOSdisk, the boI}ot flag is always zero,the number of boot sector are three,the address to load the boot sectorsis 1792 and the initializatJ}ionaddress is 5440.Bytes 6-7 are the address that thecomputer will jump to continue load.Byte eight is unused. Byte nine K}is thenumber of sectors buffer ( =3).Byte ten is the drive enable bits, bits 0-7 equal to drives 1-8. byteten is usualy 1L}31 in decimal, in binary it's equal to 10000011. As youcan see drives 1,2 and 8 are is use.Byte eleven is unused.Bytes 12M} and 13 are the start addressfor the buffers, equal to 6604.The 14 byte indicates if there is DOSon the disk or not. If thN}e byte isequal to zero means that there is noDos on the disk, if the byte is 1then DOS.SYS is on the disk.Bytes 15 - 16 iO}s the first sector ofDOS.SYS file usualy it's 4.The 17 byte is the offset to sectorlink data, the byte is equal to 125.ByP}tes 18 - 19 indicates the start ofmain DOS.SYS file, it's equal to 1995The 20 byte is the first byte of theboot data.thosQ}e values can be changed with thewright tool.secondly the Volume Table Of Contentsor as known the VTOC. the VTOC datais lR}ocated in sector 360, and in thissector you can find how many sectorsare free, what sector is used orunused and moreThe fS}irst 10 bytes contains generalinformation about the disk.Byte zero is used to indicate the DOStype normally it's equal to T}2 for DOS2.0/2.5.Bytes one and two contains the totalor sectors on the disk. for DOS 2.0it's 707 and for DOS 2.5 it's 101U}0.Bytes three and four contains thenumber or currently free sectors.Bytes 10 to 99 contains the valuesrepresenting the fiV}rst 719 sector ofthe disk. Let me explain how it'sdone: divide bytes 10 to 99 intobits. Byte 10, bit 7 is sector 0.Byte 1W}0, bit 6 is sector 1.and so on...Byte 10, bit 0 is sector 7.Byte 11, bit 7 is sector 8.and so on...byte 99, bit 0 is secX}tor 719.now check if the bit is equal to onethen the sector is free. If the bitis equal to zero then the sector isin use.Y}The rest of the bytes, bytes 100 to127 are unused.DOS 2.5 have an extended VTOC thatlocated is sector 1024.Bytes 0 to 12Z}1 represent sectors:48-1023 the same way as before.Byte 0, bit 7 is sector 48.and so on...Byte 121, bit 0 is sector 1023.[}Bytes 122 - 123 contain the numberor free sectors on enhanced areaonly.And last the directory sectors.there are eight se\}ctors that arereserved for a diskette directory.each sector able to contain up toeight files. means the maximum numberof ]}files that can be placed on singlediskette is 64.There are 16 bytes available for eachfile entery.The first byte is the f^}lag byte. theflag byte contains the informationabout the condition of the file.divide the flag byte into bits andcheck: I_}f bit 0 = 1 then the file isopen for output. If bit 1 = 1 thefile was created by DOS 2.0/2.5.Bits 2,3,4 are not used. If b`}it 5 = 1then the file is locked.If bit 6 = 1 then the file is normal.And if bit 7 = 1 then the file hasbeen deleted.The a}second and third bytes containsthe total sectors of the file.Byte 3-4 contains the starting sectornumber of the file.Byteb}s 5-12 contains the file name,And bytes 13-15 contains the filename extension.And last let's look at the filessectors. ic}n one sector there are 128bytes. Each file sector contains125 bytes of file data followed bythree bytes of dos informationd}.Bytes 0 to 124 contains the fileitself, which can be data,text,basicprogram or anything else.Byte 125 contains the totale} numberof bytes that are actually used,which is normally 125.The next two bytes (126-127) containstwo pieces of informatif}on.The first six bits of byte 126 holdsthe file number, the number can befrom 0 to 63. for example, the firstfile in the g}directory would have thevalue of zero here and the secondfile would give the value of one.The final two bits of byte 126 aq}B%DOS SYSB*)DUP SYSBCSSPEEDSCROBJBoTAMLILANEXEBFORMAT ARTB!SECTOR ARTB.=DOSMAP ARTB tBASIC1 ARTB@FORMATV2ARTBVBLANK ARTBDLIS ARTVBI ARTndthe whole byte 127 when put togetherto give a 10 bit number which pointthe next sector of the file. Thisvalue will be sr}et to zero of thissector is the end of the file.that's all, if you have any questionplease contact me and i will be happys}to reply.of thissector is the end of the file.that's all, if you have any questionplease contact me and i will be happy THE BASIC TUTOTIAL Hello to you all atari fans out there that are still supporting these marvelous computer. Tu}his is going to be our new Basic Tutorial written by Saferman Ofer from Israel. Many Atari users have some basic knoledge ov}f Basic, but since I'm going to write a toturial, it is intended for everybody so the more experienced programers will have tw}o indure the basic stuff, at least at the beginning. Since many Atari users are already familiar with the superb Turbo Basix}c, which I think it's the best Basic for the Atari ever written, will be glad because, although I'm going to write the demo py}rograms and explanations using standard Atari Basic, I'll devote in every article a segment fot Turbo Basic according to the z}covered commands in that article. Now lets stop with the nonsense and get to work. So as I said, first the basics, and w{}hat is more basic than the PRINT command. The PRINT command does exactly as the meaning of the word - it prints to the screen|}.For example:PRINT "SAMPLE" - will print the word SAMPLE after presing RETURN. Note the use of quotation marks which is}} very inportant since if we will write only SAMPLE, the computer will try to print the value of the variable SAMPLE, but abou~}t variables, later on. Now lets try some math:PRINT 10+5 - after pressing RETURN the computer will give the result which i}s 15. Well that, I must say, was definately basic stuff and we want to advance a little. First every basic program must c}onsist of lines.The examples above were using direct mode, which is a way of entering only a few commands, but to write a Bas}ic programm we need line numbers.So if we want, just for example to type a lot of things we will a program:10 PRINT "THIS I}S A SAMPLE"20 PRINT "PROGRAM" Now after we are a little bit smarter lets start making things short.The abbreviation of th}e "PRINT" command is "?" - Yes just a question mark. We have reached the point in our education that we can discuss VARIAB}LES.There are 2 types of variables NUMMERIC variables and STRING variables. For example:VAR=10OFER$="THIS IS A MESSAGE"} Variables have some restrictions.A string variable has to be DIMensioned first to let the computer now how much space you} need for it. The command that performs this task is DIM or COM. For example:DIM A$(10) This will tell the computer t}hat you will use a string variable called A$ and it will be 10 signs long, meaning in those 10 spaces you can use any ascci s}ign on the keyboard. You can use the same name for a nummeric variable and a string variable but that could get you mixed u}p so it is best to avoid it. The next thing i would like to discuss will be arrays or two-dimensional strings. An array mus}t be dimensioned just like a string but it can apply only for numeric arrays because the Atari doesn't have string arrays. } For example:DIM ARRAY(100,100) This will tell the computer to reserve 10000(100*100) spaces for the newly dimensioned a}rray. It is very useful for tables because ARRAY(0,0-100) will hold the first column of a table ARRAY(1,0-100) the second, et}c. Maybe the readers till this point will ask why don't I give more example and just stick to the basic ? Well, a few reaso}ns:First all of this is quite easy to understand and could be even fun to experiment, second I thought it best if first I'll }stick to the basics and after a partial knowlwdge of the fundamentals I'll give some tricks and longer programs to study and }experiment with. There are also some overlaping issues, for example when I'll talk about graphics it will include some of the} basic stuff that we will go over at first so for this time those are the most basic things and next time I'll start writing }according to ordonate topics which will make understanding easier. So this was the intro. I hope you enjoied it and see you} next time. onate topics which will make understanding easier. So this was the intro. I hope you enjoied it and see you ABOUT THE DISK FORMAT by nir dareyA diskette is composed of a thinmagnetic disk covered by thin p!}lasticusually black. The cover has an openarea on both sides exposing themagnetic disk surface to the drivefor reading or!} writing.As the diskette spins in the drive,the read/write head is actuallyover the opening, reading/writing thedisk surf!}ace like a cassette recorderwould.The diskette is divided into tracks.A track is a ring about the centerof the diskette.!}The drive head can be positionedover any one of the tracks, and datacan be readed from the surface.A disk can be formate!}d in differentformats. Single Density format isdividing the disk into 40 tracks of18 sectors each with 128 bytes persecto!}r, total of 720 sectors on thedisk, that give us 90 kilobytes onthe disk.Dual Density or as most known as1050 Density, th!}e disk is dividedto 40 tracks of 26 sectors with 128byte each, that give us 130 kb. ona disk.Double Density format is div!}iding thedisk to 40 tracks of 18 sectors eachwith 256 bytes per sector for a totalof 720 sector, which give us 180 kb.no!}w we will talk about how data istransferred from the diskette intothe computer.A sector data is a magnetic fieldsthat bei!}ng converted into electricpulses which are fed to the floppydisk controller.The floppy disk controller is theinterface be!}tween the read and writehead and the drive microprocessor.the floppy disk controller performsall sector searches and uses !}totransfer data between themicroprocessor and the physical disk.The disk drives processor receivesa full sector of data !}every 1/18 ofa disk spin.This is about 0.0555 seconds.About the Disk Operating Systemformat.DOS 2.0 format the disk at !}SingleDensity total of 720 sectors.DOS 2.5 can format the disk in DualDensity total of 1040 sectors.both formats uses sec!}tors whichcontains 128 bytes of data.in DOS 2.0 there are 707 sectorsfree for files, and in DOS 2.5 thereare 1011 free se!}ctors.you probably ask what happened to themissing sectors ?, well the DOS usesmost of those sectors as informationabout !}the disk and the files thatare on the disk.The disk sector map for DOS 2.0:sectors : contents :----------------!}------------1-3 boot information4-369 free for files360 VTOC361-368 directory information369-719 free for!} files720 not usedThe disk sector map for DOS 2.5 isthe same as DOS 2.0 with theadditions of the following:sector!}s : contents :-----------------------------721-1023 free for files1024 extended VTOC1025-1040 not usedNo!}w time we will examine how the DOSuses sectors to store and keep trackof programs or data files.lets look at a DOS disk.!}The first three sectors contains theboot information. Sectors 4 - 359 arefree for files. Sector 360 is theVTOC. Sectors 36!}1 - 368 are thedirectory information. Sectors 369 -719 are free for files. Sectors 720is not used. Sectors 712 - 1023 are!}free for files in enhanced densityonly. Sector 1024 is the extendedVTOC for enhanced density only.Sectors 1025 - 1040 are !}not used.There are three different kinds ofsectors that stores information aboutthe whole disk.First the BOOT SECTORS. f!}irst we mustunderstand what is a boot sector.well, a boot sector is the firstsector on a disk. the boot sectoris actually!} the header of the wholedisk. The most important at the bootsector are it's first six bytes.Byte zero is the boot flag, it!} isusually unused.Byte 1 contains the number of sectorsto be read as part of the bootprocess. the number can be upto 256.!}Bytes 2-3 contains the start addressto load the boot data.Bytes 4-5 are the initializationaddress.As for the boot sector!}s in the DOSdisk, the boot flag is always zero,the number of boot sector are three,the address to load the boot sectorsis!} 1792 and the initializationaddress is 5440.Bytes 6-7 are the address that thecomputer will jump to continue load.Byte ei!}ght is unused. Byte nine is thenumber of sectors buffer ( =3).Byte ten is the drive enable bits, bits 0-7 equal to drives !}1-8. byteten is usualy 131 in decimal, in binary it's equal to 10000011. As youcan see drives 1,2 and 8 are is use.Byte e!}leven is unused.Bytes 12 and 13 are the start addressfor the buffers, equal to 6604.The 14 byte indicates if there is DOS!}on the disk or not. If the byte isequal to zero means that there is noDos on the disk, if the byte is 1then DOS.SYS is on !}the disk.Bytes 15 - 16 is the first sector ofDOS.SYS file usualy it's 4.The 17 byte is the offset to sectorlink data, the!} byte is equal to 125.Bytes 18 - 19 indicates the start ofmain DOS.SYS file, it's equal to 1995The 20 byte is the first by!}te of theboot data.those values can be changed with thewright tool.secondly the Volume Table Of Contentsor as known the!} VTOC. the VTOC datais located in sector 360, and in thissector you can find how many sectorsare free, what sector is used!} orunused and moreThe first 10 bytes contains generalinformation about the disk.Byte zero is used to indicate the DOStyp!}e normally it's equal to 2 for DOS2.0/2.5.Bytes one and two contains the totalor sectors on the disk. for DOS 2.0it's 707!} and for DOS 2.5 it's 1010.Bytes three and four contains thenumber or currently free sectors.Bytes 10 to 99 contains the v!}aluesrepresenting the first 719 sector ofthe disk. Let me explain how it'sdone: divide bytes 10 to 99 intobits. Byte 10, !}bit 7 is sector 0.Byte 10, bit 6 is sector 1.and so on...Byte 10, bit 0 is sector 7.Byte 11, bit 7 is sector 8.and so on!}...byte 99, bit 0 is sector 719.now check if the bit is equal to onethen the sector is free. If the bitis equal to zero t!}hen the sector isin use.The rest of the bytes, bytes 100 to127 are unused.DOS 2.5 have an extended VTOC thatlocated is s!}ector 1024.Bytes 0 to 121 represent sectors:48-1023 the same way as before.Byte 0, bit 7 is sector 48.and so on...Byte 1!}21, bit 0 is sector 1023.Bytes 122 - 123 contain the numberor free sectors on enhanced areaonly.And last the directory se!}ctors.there are eight sectors that arereserved for a diskette directory.each sector able to contain up toeight files. mea!}ns the maximum numberof files that can be placed on singlediskette is 64.There are 16 bytes available for eachfile entery!}.The first byte is the flag byte. theflag byte contains the informationabout the condition of the file.divide the flag by!}te into bits andcheck: If bit 0 = 1 then the file isopen for output. If bit 1 = 1 thefile was created by DOS 2.0/2.5.Bits!} 2,3,4 are not used. If bit 5 = 1then the file is locked.If bit 6 = 1 then the file is normal.And if bit 7 = 1 then the fi!}le hasbeen deleted.The second and third bytes containsthe total sectors of the file.Byte 3-4 contains the starting sector!}number of the file.Bytes 5-12 contains the file name,And bytes 13-15 contains the filename extension.And last let's loo!}k at the filessectors. in one sector there are 128bytes. Each file sector contains125 bytes of file data followed bythree!} bytes of dos information.Bytes 0 to 124 contains the fileitself, which can be data,text,basicprogram or anything else.By!}te 125 contains the total numberof bytes that are actually used,which is normally 125.The next two bytes (126-127) contain!}stwo pieces of information.The first six bits of byte 126 holdsthe file number, the number can befrom 0 to 63. for exampl!}e, the firstfile in the directory would have thevalue of zero here and the secondfile would give the value of one.The fin!}al two bits of byte 126 andthe whole byte 127 when put togetherto give a 10 bit number which pointthe next sector of the f!}ile. Thisvalue will be set to zero of thissector is the end of the file.that's all, if you have any questionplease conta!}ct me and i will be happyto reply.of thissector is the end of the file.that's all, if you have any questionplease conta $  FF                    %}                          %}        Vertical Blank Interrupt -------------------------- by NIR DAR%}EYLet me start explaining what Vertical Blank is.you probably know that the time it takes the television to draw a full p%}icture on a screen is 1/50 of a second(in the U.S.A it's 1/60 of a second).The TV keeps drawing the picture again and again%} even if it's doesn't changes.The routine that draws the picture on a screen is allready written in the ATARI O.S.since the%} computer is running at 1.79 Mhz, there is spare time from when the computer finished drawing the picture till it's start aga%}in. this spare time we can use to insert ower own routine.any graphic changes been made during VBLANK will shown smoothly, b%}ut most important thing is that you can run a VBI routine at the same time your main program runs!.(for example play music, d%}o smooth scroll etc...)There is also a Horizontal Blank which occurs after the TV has finished drawing one line and goes to %}the next line.There are two stages of VBLANK, the first is called "IMMEDIATE" which allways executed, and the second called %}"DEFERRED".There are two ways to set a VBI to your own routine.The first way is to set the VBLANK registers to the start ad%}dress of you own routine.546,547 ; Immidiate VBLANK registers548,549 ; Deferred VBLANK registersThe second way is to load%} the Y register (LDY) with the low byte address of your routine, and the X register (LDX) with the high byte, then load Accum%}ulator (LDA) with 6 for Immidiate VBI, or 7 for Defferd VBI and do JSR 58460.I recomand the second way to set your VBI routi%}ne becuse if you change the VBI registers and a VBI occurs the computer will crash!!!.Another thing you should allways remeb%}er is allways tell the computer at the end of you VBI routine, to go back and do the O.S. VBI routine:JMP 58463 for Imidiate%} VBI.JMP 58466 for Defferd VBI.Now let's take a look at a small example the following source is written in MAC65:10 %} *=153620 PLA30 LDY #VBLANK50 LDA #07 ;defferd VBI70 JSR 5846080 RT%}S90 VBLANK LDA 20100 STA 53274220 JMP 5846Here is the samll routine for the BASIC users:10 ADDR=153620 READ %}DAT:IF DAT=-1 THEN 5030 POKE ADDR,DAT:ADDR=ADDR+140 GOTO 2050 X=USR(1536):END60 DATA 104,160,11,162,6,169,7,32,9270 DATA%} 228,96,165,20,141,26,208,76,9880 DATA 228,-1Some technical notes:Immidiate VBI updates the,Internal Realtime Clock r%}egister (RTCLOCK 18-20),Attract Mode register (ATRACT 77),DRKMKS 78,Changing Color register (COLRSH 79),System Timer One %}registers (CDTMV1 536,537),Then the Time Critical register (CRITIC 66) is checked, if it's sets the O.S. returns from the in%}terrupt.If it's not set then the O.S. goes to stage two of the VBI.Defferd VBI updates the:Horizontal Position of the Lig%}ht Pen register (PENH 54284),Vertical Position of the Light Pen register (PENV 54285),Display List address registers (DLIST& } Display List Interrupts -------------------------- by NIR DAREYBefore you go on reading about DL)}I's, you must know all about the DISPLAY LIST of the ATARI 8-bit computer.There is a good article about this subject in the )}"NEW ATARI USER" mag. ISSUE #51 from Ian Finlayson.Now let's start explaining what DLI is.The television draws the screen )}image in 20 miliseconds, at this speed the computer has plenty of time to change parameters while the display is being drawn,)}the computer responds to the request interrupt that you put in the Display List, changes parameters and returns to it's norm)}al buisness.Of curse you shouldn't do to many things becuse it's effect the time the screen is drawn.Enough theory let's t)}alk buisness,The registers for the Display List Interrupt is 512,513you should insert in them the address of your routine.)}Allways remember to enable the DLI, by setting the NMEIN register (54286) to 192. otherwize your routine wouldn't be executed)}!.Now tell the ANTIC chip at what line it should execute your DLI routine, by setting bit 7 at the desired line on the DISPL)}AY LIST.There are few thing you must allways remember when writing a DLI routine:1) Make sure you restore the Accumulator )}and the X and Y registers in the stack if you use them. and at the end of the routine restore them back.2) End your routine )}with RTI (Return From Interrupt) instruction.3) When using graphics registers (colors,scroll,charecter sets etc...) store th)}e value allso in the WSYNC (Wait For Horizontal Sync) register,so the next command won't be executed untill ANTIC finished dr)}awing the current scan line. by doing this you prevent any flickering on the screen.4)Make sure you change the hardware regi)}sters, not the shadow registers.Now let's look at a small DLI routine, the following sourcecode was written in MAC65.10 )} *=153620 PLA30 LDA 560 ;those 4 lines40 STA 203 ;finds the address50 LDA 561 ;of the60 )} STA 204 ;DISPLAY LIST70 LDA #DLI100 STA 513110 LDA #192120 )} STA 54286 ;enable DLI130 LDY #15 ;lines 130-170140 CLC ;sets bit-7 150 LDA (203),Y *} ;at line 15 of160 ADC #128 ;the 170 STA (203),Y ;DISPLAY LIST.180 RTS190 DLI PHA200 LDA #4*}0210 STA 53272 ;COLPF1220 STA 54282 ;WSYNC230 PLA240 RTIThe next program is for the basic user*}.10 ADDR=153620 READ DAT:IF DAT=-1 THEN 5030 POKE ADDR,DAT:ADDR=ADDR+140 GOTO 2050 X=USR(1536):END70 DATA 104,173,48,2*},133,203,173,49,280 DATA 133,204,169,36,141,0,2,169,690 DATA 141,1,2,169,192,141,14,212,160100 DATA 15,24,177,203,205,128,*}145,203110 DATA 105,128,145,203,96,72,169,40120 DATA 141,24,208,141,10,212,104,64If you want to use more than one DLI in*} the same program, (let's say 2 DLI'S) you must set in the first DLI, the second DLI address in the DLI registers (512,513) j*}ust before you restore the processor registers. and at the second DLI routine you must point back to the first.Make sure whe*}n using more than one DLI, you enable them (remember storing 192 at 54286) during VBI, otherwize they wont executed in the ri*}ght order.Don't forget to set more than one DLI request at the DISPLAY LIST.for more information about multiply DLI's read * }Eisbaer Corp. artical at "MEGA MAGAZINE 4", and more technical information you can find at "DE-RE ATARI" book.Next time i w* }ill write about the SOFTWARE TIMERS and how to use them.nical information you can find at "DE-RE ATARI" book.Next time i w(9L,DLISTH 54274,54275),Priority register (PRIOR 53275),Color of Players and Missile registers (COLPM0-3 53266-53269)Playfi& }eld Color registers (COLPF0-3 53270-53273),Color of the Background (COLBK 53274),Charecter Set address register (CHBASE 54& }281),CHACTL register (54273),TRIG0-3 registers (53264-53269),POT0-7 registers (53760-53767),PORT A register (54016),SE 54$xaddress of your routine, and the X register (LDX) with the high byte, then load Accumulator (LDA) with 6 for Immidiate VBI, o.}r 7 for Defferd VBI and do JSR 58460.I recomand the second way to set your VBI routine becuse if you change the VBI register.}s and a VBI occurs the computer will crash!!!.Other thing you should allways remeber is always tell the computer at the end .}of you VBI routine, to go back and do the O.S. VBI routine:JMP 58463 for Imidiate VBI.JMP 58466 for Defferd VBI.Now let's.} take a look at a smal example the following source is written in MAC65:10 *=153620 PLA30 LDY #VBLANK50 LDA #07 ;defferd VBI70 JSR 5846080 RTS90 VBLANK LDA 20100 STA 53274220 .} JMP 5846Here is the smae routine for the BASIC users:10 ADDR=153620 READ DAT:IF DAT=-1 THEN END30 POKE ADDR,DAT:ADDR=.}ADDR+140 GOTO 2050 DATA 104,160,11,162,6,169,7,32,9260 DATA 228,96,165,20,141,26,208,76,9870 DATA 228,-1Some thecnica.}l notes:Immidiate VBI updates the,Internal Realtime Clock register (RTCLOCK 18-20),Attract Mode register (ATRACT 77),DRK.}MKS 78,Changing Color register (COLRSH 79),System Timer One registers (CDTMV1 536,537),Then the Time Critical register (CR.}ITIC 66) is checked, if it's sets the O.S. returns from the interrupt.If it's not set then the O.S. goes to stage two of the.} VBI.Defferd VBI updates the:Horizontal Position of the Light Pen register (PENH 54284),Vertical Position of the Light Pe.}n register (PENV 54285),Display List address registers (DLISTL,DLISTH 54274,54275),Priority register (PRIOR 53275),Color o.}f Players and Missile registers (COLPM0-3 53266-53269)Playfield Color registers (COLPF0-3 53270-53273),Color of the Backg.}round (COLBK 53274),Charecter Set address register (CHBASE 54281),CHACTL register (54273),TRIG0-3 registers (53264-53269),.}POT0-7 registers (53760-53767),PORT A register (54016),PORT B register (54017),System Timers 2-5 registers (CDTMV2-5 538-.}545),KEYDEL register (753),SRTIMR register (555),Well thats all i know about VBI i hope this information will be use to s.}omeone next time i will write about the Display List Interrupt. all i know about VBI i hope this information will be use to s,?POT0-7 registers (53760-53767),PORT A register (54016),PORT B register (54017),System Timers 2-5 registers (CDTMV2-5 538-&!}545),KEYDEL register (753),SRTIMR register (555),Well thats all i know about VBI i hope this information will be use to s&"}omeone next time i will write about the Display List Interrupt. all i know about VBI i hope this information will be use to s$?t before you restore the processor registers. and at the second DLI routine you must point back to the first.Make sure when *$}using more than one DLI, you enable them (remember storing 192 at 54286) during VBI, otherwize they wont executed in the righ*%}t order.Don't forget to set more than one DLI requst at the DISPLAY LIST.for more information about multiply DLI's read Eis*&}baer Corp. artical at "MEGA MAGAZINE 4", and more technical information you can find at "DE-RE ATARI" book.Next time i will*'} write about the SOFTWARE TIMERS and how to use them.nical information you can find at "DE-RE ATARI" book.Next time i will(6/