ROMº Welló Brimhalì - Znodå 5² (602)996-8739 TOº Cameroî W® Cotrilì DATEº 26Jan88 Bankeä ZCPR³ ¦ CP/Í 2.² compatiblå OS É woulä likå tï adä thå followinç thoughtó tï thå proposeä bankeä systeí standardó containeä iî BANKSYS.DOÃ dateä 01jan88® É assumå thå ne÷ OÓ will bå calleä ZSDOÓ anä refeò tï iô aó sucè. I® BACKGROUND É purchaseä á 6418° Ó-10° boarä witè 512ë oæ onboarä raí abouô á yeaò ago® Thå onlù operatinç systeí availablå foò thå boarä aô thå timå waó TurboDOÓ whicè supportó á completelù Bankeä BDOÓ ¦ CCÐ anä á Master/Slaveó multé-useò network® Alì oæ theså featureó havå beeî verù welì thoughô ouô anä havå beeî useä oî Z8° systemó foò severaì years® I'vå beeî workinç oî á Bankeä Zsysteí OÓ foò thå 6418° boarä oveò thå lasô yeaò anä includeä somå oæ thå followinç featureó froí TurboDOÓ whicè É thinë shoulä bå considereä beforå settinç anù standardó foò ZSDOS® (É alsï includeä thå filå XLMZS193.WÓ iî thió librarù whicè ió thå user'ó guidå foò mù bankeä system.) II® MEMORÙ LAYOUT Banë ° ió reserveä foò thå operatinç system® Howeveò thå OÓ resideó iî higè memorù jusô likå á standarä CP/Í 2.² system® Thió allowó programó tï executå iî banë ° aó normaì tï providå theså advantages: 1© Programó thaô directlù interfacå witè thå BIOÓ likå formattinç utilitieó anä systeí configuratioî utilitieó caî bå codeä tï ruî iî banë ° onlù anä perforí theiò functionó withouô thå additionaì overheaä anä complexitù oæ banë switching. 2© Debuggeró likå DSÄ wilì ruî iî banë ° tï greatlù simplifù debugginç thå system® (É havå founä iô extremelù difficulô tï debuç OÓ problemó froí anù banë otheò thaî banë 0). 3© Standarä CP/Í 2.² RSØ anä DÄ programó caî bå loadeä intï thå banë ° uppeò tpá tï intercepô systeí calló froí alì banks. Thå memorù mað oæ mù ZRDOÓ 1.¹ bankeä OÓ lookó somethinç likå this: Higè Memory «----------- Unbankeä Commoî Memorù -----------+ ! ! ! addresó rangå sizå disc. ! ! ------------­ -----­ ---------------­ ! ! ffd° ­ fffæ 4¸ Z³ exô stacë ! ! ff0° ­ ffcæ 20¸ Z³ commanä buffeò ! ! fe8° ­ fefæ 12¸ Z³ tcað ! ! fe0° ­ fe7æ 12¸ Z³ Environmenô desc ! ! fdfæ ± Z³ Wheeì bytå ! Š ! fdf´ ­ fdfå 1± Z³ Externaì patè ! ! fdd0 ­ fdf³ 3¶ Z³ Externaì FCÂ ! ! fd8° ­ fdcæ 8° Z³ messagå buffeò ! ! fd0° ­ fd7æ 12¸ Z³ shelì stacë ! ! fc0° ­ fcfæ 25¶ Z3 Nameä directorù ! ! fa0° ­ fbfæ 51² Z³ FCP ! ! f20° ­ f9fæ 204¸ Z³ RCP ! ! ec0° ­ f1fæ 153¶ Z³ IOÐ ! ! e80° ­ ec0° 102´ banë manageò ! ! e7fä ­ e7fæ ³ Upper BDOS vectoò ! ! e00° ­ e7fæ 204¸ ZCPR³ ! ! ! +----------------------------------------------+ «-­ Banë ° oæ Bankeä Mem. --« «­- Banë î oæ Bankeä Mem. --+ ! ! ! ! ! ae0° ­ dffæ BIOÓ ! ! ! ! a00° þ adff BDOÓ ! ! ! ! 800° þ 9fff DSÁ ! ! ! ! 010° þ 7ffæ Banë ° TPA ! ! 0100 ­ dffæ Banë î TPA ! ! 000° ­ 00fæ Pagå ° ! ! 000° ­ 00fæ Pagå 0 ! ! ! ! ! «­--­­­­­­­­­­­­­­­­­­­­­­­­« +---------------------------+ LO× MEMORY ¨ DSÁ ½ Dynamiã Storagå Areá foò disë tables¬ sectoò bufferó ¦ etc® © ¨ Pagå ° ½ CP/Í pagå ° vectoró ¦ bufferó ) Therå ió nï fixeä limiô oî thå sizå oæ thå BDOÓ oò BIOÓ sï lonç aó theiò  combineä sizå fitó intï banë ° anä leaveó reasonablå  rooí foò thå DSÁ anä TPA® Thå commoî memorù areá ió iî physicaì banë 0® Thió phantomó ouô e00° tï fffæ iî bankó ± througè 7® ZCPR³ ió saveä iî banë ± aô e00° anä DMA'eä bacë tï banë ° durinç warí boots® Thió allowó applicatioî programó tï overlaù ZCPR³ jusô likå thå CP/Í specificationó tï providå á 58ë tpá whicè appearó tï bå jusô abouô aó largå aó possiblå foò á fulì Zsysteí implementation. Thå abovå memorù layouô workó ouô welì foò á noî multitaskinç system® Foò multitaskinç eacè banë musô havå itó owî CCÐ anä probablù shoulä havå it'ó owî seô oæ selecteä ZCPR³ segmentó ¦ buffers® Sincå thå 6418° onlù haó 4ë resolutioî foò thå banked/commoî memorù boundarù É woulä recommenä settinç iô aô f000è anä followinç thió rougè memorù layout: Higè Memory «----------- Unbankeä Commoî Memorù -----------+ ! addresó rangå sizå disc. ! ! ------------­ -----­ ---------------­ ! ! fc00 ­ ffff 102´ banë manageò ! ! f00° ­ fbff 3072 common Z³ buffers ! +----------------------------------------------+ Š «-­ Banë ° oæ Bankeä Mem. --« «­- Banë î oæ Bankeä Mem. --+ ¡ e80³ ­ effæ Bufferó ¡ ¡ e80³ ­ effæ Bufferó ! ¡ e800 ­ e802 BDOÓ vectoò ¡ ¡ e80° ­ e802 BDOÓ vectoò ! ¡ e00° ­ e7ff ZCPR³ ¡ ¡ e00° ­ effæ ZCPR3 ! ! ae0° ­ dffæ BIOÓ ! ! ! ! a00° þ adff BDOÓ ! ! ! ! 800° þ 9fff DSÁ ! ! ! ! 010° þ 7ffæ Banë ° TPA ! ! 0100 ­ dffæ Banë î TPA ! ! 000° ­ 00fæ Pagå ° ! ! 000° ­ 00fæ Pagå 0 ! «­--­­­­­­­­­­­­­­­­­­­­­­­­« +---------------------------+ LO× MEMORY Wå neeä tï determinå whicè oæ thå ZCPR³ bufferó ¦ segmentó tï sharå betweeî taskó iî thå commoî areá anä whicè neeä tï bå kepô exclusivelù foò eacè tasë iî thå bankeä areas. III® NE× FEATURES 1© Datå stampinç ¦ hierarchiaì directory      Thå onlù featureó thaô É feeì Zsysteí lackó oveò MSDOÓ arå á      hierarchiaì directorù systeí anä filå timå ¦ datå stamping®      É thinë botè oæ theså arå á musô iæ ZSDOÓ ió goinç tï      seriouslù compete® Thå presenô ZCPR³ nameä directorù schemå      shoulä bå expandeä tï á truå nameä hierarchiaì directorù      systeí insteaä oæ useò areas® É woulä likå tï seå botè MP/Í      ¦ TurboDOÓ systeí calló useä foò settinç ¦ accessinç thå thå      Reaì Timå Clocë sincå theù arå alreadù considereä á      standard. 2© Sectoò buffering      TurboDOÓ performó disë intensivå operationó iî lesó thaî      halæ thå timå iô takeó Zsysteí oî mù 6418° board® Iô appearó      mainlù duå tï thå uså oæ á sectoò bufferinç schemå thaô      copieó sectoró tï á variablå sizeä memorù buffeò aó theù arå      reaä froí disk® Wheî á disë requesô ió madå thå buffeò ió      checkeä beforå performinç thå operation¬ iæ thå sectoò ió iî      memorù therå ió nï neeä tï accesó thå disk® Oncå thå buffeò      filló thå leasô useä sectoró arå writteî bacë tï disk®      Considerinç thå tremendouó increaså iî performancå É thinë      thió schemå shoulä definitelù bå supporteä bù ZSDOS® 3© Drivå Specificatioî Tables      Mù 6418° bioó utilizeó aî extensioî oæ thå TurboDOÓ drivå      speã tablå feature® Theså tableó greatlù simplifù addinç ne÷      disë driveó tï thå systeí anä supportinç additionaì floppù      formats® Á smalì drivå speã tablå ió madå specifyinç thå      basiã parameteró oæ eacè disë formaô thaô yoõ wanô tï      support® Thå OÓ theî createó thå necessarù CP/Í compatiblå      DPÈ ¦ DPÂ tableó froí thió drivå speã tablå wheî thå drivå      ió firsô accessed® Thió schemå alsï allowó thå systeí tï      automaticallù detecô á floppù disk'ó formaô wheî á disë      changå occuró anä adjusô thå bioó foò it® I'í includinç thå Š     filå MDST24.Z8° iî thió librarù whicè containó thå floppù      DST'ó foò mù systeí sï yoõ caî seå ho÷ easù iô ió tï adä ne÷      formats® É hopå thió caî alsï bå useä iî ZSDOS. IV® Ô or Z-FUNCTIOÎ CALLS TurboDOÓ haó itó owî seô oæ systeí calló thaô directlù accesó routineó iî thå BDOÓ ¦ BIOS® Thå entrù poinô ió aô 50è insteaä oæ 5h® Thió giveó á loô oæ flexibilitù iî defininç ne÷ functions® Manù oæ thå functionó thaô theså Ô-functioî calló perforí neeä tï bå includeä iî thå ne÷ OS® Wå maù wanô tï consideò usinç somå oæ thå turboDOÓ calló sincå theù arå welì defineä anä alreadù somewhaô oæ á standarä oò wå maù possiblù consideò settinç uð á ne÷ Ú­ functioî calì entrù poinô tï supporô somå oæ thå specializeä calló pertaininç tï thå bankeä system® Á fe÷ oæ thå functionó thaô É woulä likå tï seå includeä are: 1© Disë formatting 2© Multiple channeì SIÏ supporô witè modeí controls 3© Thå ne÷ banë memorù functionó mentioneä iî BANKSYS.DOC. V. ADDITIONAL SYSTEÍ CALLS É feeì thå followinç functionó shoulä bå supporteä bù systeí calló sï applicatioî programó caî accesó thå advanceä featureó oæ thå ne÷ hardwarå froí anù bank® Withouô theså calló iô ió impossiblå tï perforí theså functionó witè hardwarå independenô code® 1© DMÁ transfeò function® Thió woulä allo÷ applicatioî      programó tï accesó thå hardwarå DMÁ unit.      Calì with:      c½ ¿ (needó tï bå defined)      då­-¾ DMÁ commanä packeô iî thió format:      dmapktº dâ modå ;higè nibblå ½ modå (needó tï be defined) ;lo÷ nibblå ½ dmá channeì # d÷ source ;1¶ biô sourcå memory/porô address dâ sbank ;¸ biô sourcå bank d÷ dest ;1¶ biô desô memory/porô address dâ dbank ;¸ biô desô bank d÷ count ;1¶ biô bytå count 2© SCSÉ function® Thió giveó applicatioî programó accesó tï thå SCSÉ porô whicè ió usuallù undeò DMÁ controì also. CALÌ WITH: c½ ¿ (needó tï bå defined) de--¾ SCSÉ commanä packeô iî thió format: scpktº db 6 ;commanä bytå count dâ cmdbyt ;scsé commanä byte Š dâ lba2 ;luî ¦ logicaì blocë msb dâ lba1 »logicaì blocë hsb dâ lba° ;logicaì blocë lsb dâ blkcnt ;blocë count dâ cmdctì ;speciaì functioî bits d÷ dmapkt ;addresó oæ dmá xfeò packeô iî samå bank RETURNS: a½ SCSÉ statuó byte 3)  Logicaì tï Physicaì disë drivå reassignment® Thå OÓ shoulä      supporô aô leasô 2´ physicaì drives® (Eacè individuaì harä      disë partitioî ió considereä tï bå á separatå physicaì      drive.© Á systeí calì shoulä bå provideä tï querù ¦ seô thå      physicaì drivå assigneä tï anù oæ thå 1¶ logicaì drives. CALÌ WITH: c½ ¿ (needó tï bå defined) e½ logicaì drivå numbeò (0½ A:) d½ 0ffè tï querù drivå assignmenô oò physicaì drivå £ tï assigî tï logicaì drivå iî reç E. RETURNS: a½ physicaì drivå assigneä tï logicaì drivå iî reç e. VI® BOOTINÇ SYSTEM Thå systeí ió goinç tï bå toï largå tï fiô oî thå systeí trackó oæ thå smalleò floppù disë formató sï É woulä recommenä thå schemå thaô TurboDOÓ haó adopted® Thå systeí ió placeä intï á filå nameä OSLOAD.COÍ whicè loadó intï thå tpá aô 100è theî moveó thå systeí segmentó tï theiò propeò addresseó iî uppeò memorù wheî iô executes® Thió allowó increaseä storagå oî floppieó sincå therå ió nï neeä foò systeí tracks¬ iô makeó iô mucè easieò tï booô froí á harä disë anä iô greatlù simplifieó thå sysgeî process® (Alì yoõ havå tï dï ió copù OSLOAD.COÍ tï thå disë yoõ wanô tï booô from!© Ne÷ hardwarå designó shoulä placå codå intï thå booô ROÍ tï loaä anä executå thå OSLOAD.COÍ filå wheî thå systeí ió reset® Oldeò designó caî uså á multé-steð booô procesó wherå thå olä systeí autï executeó OSLOAD.COÍ aô colä boot® Thió haó workeä verù welì foò mù bankeä 6418° Zsysteí implementation. VII® MULTITASKING Botè TurboDOÓ anä MP/Í havå standardizeä mosô oæ thå systeí calló necessarù foò multitaskinç sucè aó filå locking¬ messagå queues¬ Reaì Timå Clocë accesó etc® É woulä stronglù recommenä usinç theså calló withouô changå where possiblå. VIII® SUMMARY É hopå thió informatioî ió helpful® É kno÷ iô jusô scratcheó thå surfacå buô É wanteä tï geô somethinç tï yoõ righô away® É thinë thå projecô ió á supeò ideá anä hopå iô caî geô starteä ASAP¡ Pleaså leô må kno÷ iæ É caî helð makå iô happen® É wilì bå happù Štï contributå anythinç É can. Trademarks:         Ú-SYSTEM¬ ZCPR3¬ ZRDOS¬ Echeloî Inc»                     TurboDOS¬ Softwarå 2000» HD64180¬ Hitachi»                     CP/M¬ MP/Í, Digitaì Researcè Inc»