• Aucun résultat trouvé

Software 2000, Inc

N/A
N/A
Protected

Academic year: 2022

Partager "Software 2000, Inc"

Copied!
85
0
0

Texte intégral

(1)

(2) TurboDOS. 1.3 Implementor's. 8086 Guide. Copyright Notice. NOTICES. Copyright 1984 rights reserved.. by. Software 2000, Inc. All part of this publication be reproduced, way transmitted, transcribed, system, stored in a retrieval or translated any language or computer language, in into form mechaany or by any means, electronic, nical, magnetic, optical, chemical, manual or otherwise, without the prior written permission of Software 2000, Inc., 1127 Hetrick Avenue, Arroyo Grande, California 93420, No. U.S.A.. Trademark. Disclaimer. Notice. is. a TurboDOS trademark of Software 2000, Inc., and has been registered in the United States and in most major countries of the CP/M free world. CP/M, CP/X Plus, Concurrent and MP/M are trademarks of Digital Research.. Software 2000, or warranties. Inc., makes no representatior.s with respect to the contents of and specifically this publication, disclaims any implied warranties of merchantability or fitness for any particular purpose. Software 2000, be Inc., shall under no circumstances damages or related liable for consequential has been notified expenses, even of the suchit damages. possibility of if Software 2000, Inc., reserves the right to revise this publication from time to time without obligation to notify any person of such revision.. l. First. Edition:. january. ""l. 1984. I. --I.

(3) 1.3 Implementor's. TurboDOS. ABOUT. THIS. 8086 Guide. ABOUT. THIS. GUIDE. GUIDE. Purpose. We've. designed. this. 89££. Tmp1ementor's. to provide the information you need to know in order to generate various TurboDOS configand urations for 8086-family microcomputers, to write the driver modules for various periThis document describes the pheral devices. modular architecture and internal programming and explains the conventions of TurboDOS, procedures for system generation, serialization, and distribution. It also forprovides specifications harddetailed interface ware-dependent driver modules. Assumptions. this guide, we've assumed that you In writing an OEM, dealer, or sophisticated TurboDOS knowledgable in 8086-faniily microcompuuser,hardware and assembly-language programter We've also assumed you have read both ming. proqra.Tnmer',q the Tjge.r"S GJÚÁ£ and the GUsie, and are therefore familiar with the and internal commands, external features, functions of 8086 TurboDOS. are. Organization. This guide starts with a section that deof TurboDOS. scribes the architecture It explains the function of each internal module system, and how these of the operating modules may be combined to create the various configurations of TurboDOS. next section explains the system generaand describes each procedure in detail, TurboDOS parameter which can be modified during system generation. The. tion. section of this guide explains the including distribution procedure, and support. licensing, serialization,. The third TurboDOS.

(4) TurboDOS. 1.3 Implementor's. 8086 Guide. Organization (Continued). ABOUT. THIS. GUIDE. (Continued). The fourth section is devoted to an in-depth discussion of internal programming conventions, aimed at the programmerTurboDOS. writing drivers or resident processes for The. fifth section presents formal interface specifications for implementing hardwaredependent driver modules.. This guide concludes with a large appendix containing assembler source listings of actual driver modules. The sample drivers a wide cover range of peripheral devices, and provide an excellent starting point for programmers involved in driver development. Related. Documents. In addition to this guide, you might interested in four cther related documents: .. T\lrr)opo8. l3. 9sexLa. .. T1lrhopos. LA. 9QM. .. Tllrbopo,q. ]=. %89 ProqrÁTnmer's. .. T!lrpopos. m MQ. Gaiáe P.roqraInTne.r's. Tlnp1e1nentor's. should read the first two volumes The start into this document. introduces the external features and ties of TurboDOS, and describes each You. command.. You'll gramming that. need. uses. before. facili-. TurboDOS prc)q.rammer's exinternal workings of TurboDOS, and each operating system function in The. plains the describes detail.. be. EQU. you are prothe Z80 guides a TurboDOS system or configuring Z80 microprocessors.. if.

(5) 1.3 Implementor's. TurboDOS. 8086 Guide. ARCHITECTURE. TABLE. Module Hierarchy Process Level. Kernel Level Driver Level. .. GENERATION. Introduction. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. TLINK Comnand . . Patch Points . . Network Operation l·iodel Network . Network Tables Message Forwarding DISTRIBUTION. l-8. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. l-8 l-9 l-lO l-11 l-12 2-l. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. Command . . . Conmand . . . Procedure Distribution. l-2 l-2 l-3 l-4 l-5. .. Distributor Obligations Serialization . . . . . Technical Support . . .. PACKAGE. l-l l-l l-2. .. .. TurboDOS Licensing Legal Protection User Obligations Dealer Obligations. SERIAL. CONTENTS. .. TurboljOS Loader . . . l·1odule Flow Diagram . Modules Process . . . . Kernel Modules . . . . Driver Modules . . . . Standard Packages . . . Package Contents Table Modules Supplementary Memory Required . . . . Otber Languages . . . . SYSTEM. OF. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ,. .. .. .. .. .. .. 2-Z 2-7 2-19 2-19 2-19 2-22. 3-l 3-l. 3-2 3-2 3-3 3-4 3-5 3-6 3-8 3-ID.

(6) 1.3 Implementor's. TurboDOS. CODING. 8086 Guide. CONVENTIONS. TABLE. Undefined External Memory Allocation. Processing List Dispatching. .. References .. .. .. .. .. .. Sign-On. Message Resident Process. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. APPENDICES. Command. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. General. OTOASM. . .. .. User-Defined Function. .. . .. .. .. .. . .. .. .. Table Console Driver Printer Driver Disk Driver . Network Driver Comn Driver . Clock Driver Bootstrap . .. . .. .. .. .. . .. .. .. Notes. . .. .. .. Initialization Memory. . .. .. .. .. . .. .. Interrupt Service . . . . . . Poll Routines . . . . . . . . Mutual Exclusion . . . . . . Sample Driver Using Interrupts Sample Driver Using Polling . Inter-Process Messages . . . Console Routines . . . . . .. INTERFACE. CONTENTS. (Continued). Task. DRIVER. OF. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. North Star Driver. Patch. Points. .. .. .. .. .. .. .. .. 4-l 4-2 4—3. 4-4 4-6 4—7 4—8. 4-9. 4-lO 4—ll 4—12. 4-12 4-13 4-14. 5-l. 5-2 5-2 5-3 5-5 5-6. 5-9. 5-12 5-13. 5-lS A-l B-l.

(7) 1.3 8086 Implementor's Guide. ARCHITECTURE. TurboDOS. ARCHITECTURE. This section introduces you to the internal architecture of the TurboDOS operating sysTurboDoS tem. is highly modular, consisting of more than forty separate functional modules form. distributed in relocatable These modules are "building blocks" that you can combine in various ways to produce a This family oE compatible operating systems. and section describes the modules in detail, them in various describes how to combine configurations. Possible . . . . .. TurboDOS. configurations. include:. single-user without spooling single-user with spooling network server simple network user (no local disks) network complex user (with local disks). variations are possible. Numerous subtle each of these categories. Module. Hierarchy. The the. process. Levw.. how the on page modules as of TurboDoS interact. diagram shows, the architecture of Turboas a three-level hierarchy. can be viewed. l-3 illustrates. diagram. functional DOS. in. highest level of the hierarchy is the TurboDOS can support many process There is concurrent processes at this level. one active process that supportsand the local who is executing comnands programs user There are also processes in the local TPA. to support users running on other computers and making requests of the local computer network. There are processes to over thebackground handle printing (de-spooling) on there is a process Finally, local printers. causes disk buffers to be that periodically written out to disk. Tríe. . 1"1.

(8) TurboljOS. 1.3 Implementor's. Kernel. 8086 Guide. Level. ARCHITECTURE Module. The. ir.terruediate level of the hierarchy is 1mzizl. The kernel supports the 103 C-functions and T-functions, and controls the sharing of computer resources such as processor time, memory, peripheral devices, and disk files. Processes make requests of the kernel through the entrypoint module OSNTRY, which decodes each C-function and T— function by number and invokes the appro— priate kernel module. the. Driver Level. Hierarchy (Continued). K&kilsÜ. The lowest level SiLíjL£K Ámze)l, and. of the hierarchy is the contains all the device— dependent drivers necessary to interface TurboDOS to the particular haráware being used. Drivers must be provided for all peri— pherals, including console, printers, disks, communications inter— channels, and network A face. driver is also required for the real-time clock (or other periodic interrupt source). is designed to interface with almost of peripheral hardware. It operates DMAefficiently with interrupt-driven, type interfaces, but can also work fine using polled and programíed-l/O devices.. TurboDOS any kind most. TurboDOS. Loader. TurboDOS loader OSLOAD.COM is a program an abbreviated containing version of the load kernel and drivers. Its purpose is tofrom a the full TurboljOS operating system disk file (OSSERVER.SYS) into memory at each system cold-start. The. 1"2.

(9) TurboDOS Implementor. ARCHITECTURE. 8086 ' s Guide. 1.3. Module. Hierarchy. (Continued). Hierarc¢. Koclnle. T|?rhorK)q l. pespooj. I. DSPOOL. Ticl [jAr LCLUSR. jÑet. NETTBL. I. l. LCLNSG. I. I l. LCLTBL CMDINT. l. AUTLOD. Process. I. Level. l. S\w.. NETSVC. -". ". -". ". l I. B1lfÍiers. I. FLUSHR. I. I. !. l. I. I. l. l. I. l. I. I. TInA(ier. l. SGLUSR. l. l. I. !. OSLOAD. Í. AUTLOG. l. l. l. l. LDRNSG. !. BIOS SUBMIT. l. l. l. l. I. i. I. I. I. l. I. I. l. I. l. PecMe. l. l. OSNTRY. l. I. Kernel Level =líQjE!L. !. MEMMGR. l. I. I. l. File. Nnnfi1e NONFIL. l l. DSPCHR. I. DSPSGL. l. NSGFMT. l. CCMSUB. I. NETTBL. !. l. l. I. l. !. j. l. I. l. l. I. l. l. l. I. l. I. !. l. i. l. l. l. I. I. I. l. I. !. FFOMGR. l. l. l. DRVLOK. l. I. I. l. I. I. l. l. i. I. I. c.nn1Tn. I. I. COMMGR. I. l. l. l. l. 8iipport.. l. I. l. l. cl Qck. NETREQ. FILMGR FILSUP FILCOK FILLOK. CPFISUP. I. Ñf't. Peq NETMGR. RTCMGR. I. PrirM'r. cc)nRo1e. Rpcc)rd. l. l. LSTMGR. CONÍ¢!GR. BUFMGR. l. l. I. LSTTBL. CONTBL. DSKMGR. l. !. I. I. I. l. SPOOLR. DOMGR. DSKTBL. I. l. I. l. I. I. l. SPLMSG. INPLN. !. !. l. l. (. l. l. {. l l. ch. Driver Level i l. I. !. con.m. l. I. CO6ÍDRV. {. É=QJEJL. I. MEMTBL. |_. ch. Tnitia1. SYSNIT. l. l. I. l. I. I. i. I. !. I. l. I. I. l. l. l. l. l. l. I. i. I. Printer. LSTDRA. LSTDRB. etc.. Di sk. Cc)n¶o1e CONDRA. or. Net]Ñork,. DSKDRA. CKTDRA. DSKDRB. CKTDRB. etc.. CONREM. l-3. etc.. cl. ncP. RTCDRV. or RTCNUL. Tnitiií1.. HDWNIT. I l I l I.

(10) TurboDOS. 1.3 Implementor's. 8086 Guide. ARCHITECTURE Process. Process. Modules. l. Modules. ___l. Funct.icm___. tqoa1!1e. ! I. LCLUSR. Responsible for supporting local user's TPA activities.. LCLMSG. Contains. l I l l i. LCLTBL. Local. CMDINT. Command commands. I ! l l. AUTLOD. ! l l. l. I AUTLOG. l I I l. BIOS. l I l. SUBMIT. I I l. NETSVC. i I. NETTBL. I I I. Routine. !. I. (. l i. processes interpreter, from local user.. l I l. if. l l I. to flush/free. disk bufUse fers at each console input. for single-user configurations instead of FLUSHR. Automatic log-on routine. when full log-on security patch desired. See AUTUSR Supports C-function BIOS Call).. 50. l I l I. is not point.. !. (Direct. I l l I I. Services network requests from other processors on the network. to áefine local network topology, used by NETSVC+NETREQ.. Tables. background. I I. Used. Routine to emulate CP/M processing of $$$.SUB files.. printing.. DSPOOL. Processes. FLUSHR. periodically flushes disk bufUse for network fers. server configuration instead of SGLUSR.. l-4. l l. option table.. Autoload toutine which processes COLDSTRT.AUT and WARMSTRT.AUT. I I. user. error. messages.. present. SGLUSR. i. ]. all. O/S. l. I I l I I l ) I l l ! l l l.

(11) 1.3 Implementor's. TurboDOS. Kernel. Modules. ARCHITECTURE. 8086 Guide. Kernel. l. HQdll1.e OSNTRY. l l I l !. FILMGR. l l I. FILSUP. I. l. Fnmfion. l. I I. Modules. entrypoint module which each C-function and T-function by number and invokes the appropriate kernel module. Kernel decodes. I I. File manager responsible for requests involving local files.. l. File support routines. I. used. by. I l. FILMGR.. i. I I. !. FILCOM. I. Processes. common that are. requests over. file-oriented never. network.. the. l. I. sent. l I. I. FILLOK. File- and record-level interlock routines called by FILMGR.. I. l. FFCMGR. FIFO management by FILLOK.. routines called. i. DRVLOK. Drive interlock. routines.. l. BUFMGR. Buffer manager called by FIL!4GR. Maintains pool of disk buffers used to speed local file access.. I I l l I I l I I. DSKI4GR. I ! l. DSKTBL. I. NONFIL. l I l l l. Table. defining. remote. or. Responsible are not. drives A-P as disk drives.. for functions that. file-oriented.. l. CPMSUP. l I. Disk. local. l I. manager responsible for physical access to local disks, called by BUFMGR.. I. Processes C-functions 7, 8, 24, 28, 29, 31, 37 and 107 which are May be omitted. rarely used.. l-5. l l I I l l i I I i I I.

(12) TurboDOS. 1.3. Implementor's. 8086 Guide. ARCHITECTURE Modules (Continued). Kernel. Kernel. Modules (Continued). I. l'IcÁule. !. l. Fl7nction. -_. I CONMGR. Responsible. I. CONTBL. Links. I. DOMGR. Responsible. I. INPLN. Console input by CMDINT and. l. LSTblGR. Responsible for printer. :. LSTTBL. Table queues. I. I. for. console. to. console. CONFIGR. i I. SPOOLR. l i I I. COMMGR. I l I. NETREQ. l l \. FISGFMT. l. i. NETMGR. l. defining A-P. driver.. for do-files.. I. I. ___ I/O.. as. I. A-P and remote.. i I l I. Responsible for communications channel functions. Responsible for issuing request messages for all functions not processed locally. network. format table. Network message routing routine used by NETSVC and NETREQ.. I ! l I l l I I I l I I I I !. Real-time clock manager responsible for maintaining system date and time.. DSPCHR. Multi-task dispatcher which controls sharing of the local processor among multiple processes.. ! I. l. l. output.. RTCMGR. I. i. l. I. l I. I. used 10.. Print spooler which diverts print output to a spool file wher, spooling is activated. Also handles direct printing to remote printers.. Network message used by NETREQ.. !. I. line editor C-functiorí printers local or. l. l-6. I. I l l I l.

(13) 1.3 Implementor's. TurboDOS. Modules (Continued). Kernel. 8086 Guide. ARCHITECTURE. Kernel Modules (Continued). |^=Lmj__-—_—---ÁEjAn:. ! l. DSPSGL. I i l l I. MEFIÍ4GR. l. I I. i. COMSUB. SYSNIT. I. I. Memory manager responsible for dynamic allocation of memory, and for supporting TPA alloca-. !. RTCNUL. l I. I. CONREM. l !. (53-58).. subroutines configurations.. Common. System executed. used. in. at. all. cold-start.. Null real-time clock driver, where used in configurations there is no periodic interrupt source. Remote console work server to command.. driver for netsupport SERVER. i !. I I l l l I I l I l ! I ! i l. ! { I I. I I. l. I. routine initialization system. ! i. __. used as alternaNull áispatcher tive to DSPCHR when only one (OSLOAD.CHD process is required w/o spooling). and single-user. tion C-functions. I. l. Qtj¢-. PATCH. 128 bytes cluded to. l-7. of zeroes, may be inprovide patch area.. l I I.

(14) TurboDOS. 1.3 Implementor's. Driver. 8086 Guide. Modules. ARCHITECTURE. Driver. l. PlMtí1e. i l. J_.__-__. I. LSTDR_. Printer. output driver(s).. I. DSKDR_. Disk. CKTDR_. Network. COMDRV. Corrununications. RTCDRV. Real-time clock driver.. MEMTBL. Table. l l. I l l l i. HDWNIT. l. Standard. Packages. I I. driver(s).. i. circuit driver(s). channel. l I. l. I/O driver.. l l. l. Console. I !. Fllnction. CONDR_. l I. Modules. I !. driver.. defining the size structure of main memory. I I l. and (RAM).. initialization for hardware-dependent drivers.. Cold-start. all. l. } I l I l. the system simplify most commonly-used. generation process, combinations of TurboDOS nodules are pre-packaged into the following standard configurations:. To. the l. PA.ckaqe. [. l I. STDLOADR. ]. STDSINGL. l. STDSPOOL. l. STIMASTR STDSLAVE STDSLAVX. l l l. Pfscri.pti.on.. l. cold-start loader single-user without spooling single-user with spooling network server simple user w/O local disks complex user with local disks. !. l I l } l i !. contents of each standard package is detailed in the table on the facing page. TurboDOS be Most satisfied requirements can by linking the appropriate standard package together with a few additional kernel modules plus the requisite driver modules. The. l-8.

(15) TurboDOS Implementor. ARCHITECTURE. 8086 ' s Guide. 1.3. Standard. Packages. (Continued). l. HMn1e LCLUSR. l I. LCLÉ'ISG. I. LCLTBL CMDINT AUTLOD. i Í !. SGLUSR. I. AUTL(JG. I. BIOS. I. NETSVC. l. DSPOOL. i. FLUSHR. l. OSLOAD. l. LDRMSG. l. OSNTRY. l I l l. FILMGR FILSUP FILCOM FILLOK. I. FFOMGR. l. DRVLOK. I. BUFMGR. !. DSKMGP. I. DSKTBL NONFIL. I. i. K. l.l.3 .O. l. .5 .2. .l. .O. .3 1.5. l .2 l .l .l.5 .O. 2 2. .3 .9 .3 .8. l .l l .l l .l.6 .O. i. CONMGR. .2 .4. I. CONTBL. .O. l. PGMLOD. !. DOMGR. .9 .3 .2 .3. I. INPLN. I. LSTMGR. I. LSTTBL. l. SPOOLR. l. SPLMSG. l. COMMGR. I. NETREQ. l. MSGFMT. I. NETMGR. l. NETTBL. .O. .l.6 .l.1. l .6.l .6. I. RTCMGR. I. DSPCHR. .l.7. l. DSPSGL. .2. l. MEMMGR. .O. I. COMSUB. l. ,SYÁÑTT. TurboDOS Implementor. l .2 1.3. .I. I. T,OAPR. OSLOAD. l. I. 8LAVX LCLUSR LCLHSG LCLTBL CMDINT AUTLOD. i. SGLUSR. i. AUTLOG. AUTLOG. I. BIOS. BIOS. BIOS. I. NETSVC. OSNTRY. LCLFÍSG. I,CLMSG. LCLMSG. LCLTBL CMDINT. LCLTBL CMDINT. LCLTBL CMDINT. LCLTBL CMDINT. AUTLOD. AUTLOD. AUTLOD. AUTLOD. SGLUSR. SGLUSR. AUTLOG. AUTLOG. AUTLOG. BIOS. EIOS. LCLMSG. -. OSNTRY. FILMGR FILSUP FILCOM. FILMGR FILSUP FILCOÉI. ?4.A,qTR. -. DSPOOL. I)SPC)OL. OSNTRY. FLUSHR. FILMGR FILSUP FILCOM. FILMGR FILSUP FILCOM FILLOK. -. OSNTRY. l. I. -. I. DSPOOL. l. OSNTRY. I l i. FILMGR FILSUP FILCOM. I l I l. DSKTBL NONFIL. l. CONMGR. CONMGR. CONMG. I. CONTBL. CONTBL. CONTBL. CONTBL. PGPÍLOD. PGMLOD. PGMLOD. PGMLOD. PGMLOD. I. DCMGR. DOMGR. DOMGR. DOMGR. DOMGR. I. BUFMGR. DSKMGR. DSKMGR. DSKTBL NONFIL. DSKTBL NONFIL. DSKTBL NONFIL. DSKTBL NONFIL. CONMGR. CONI'IGR. CONMGR. CONTBL. CONTBL. -. l. NONFIL. -. DSKMGR. 8086 ' s Guide. l. I. --. FFOMGR DRVLOK. DSKTBL. !. DSKMGR. BUFMGR. DSKMGR. -. FILCOM. i. i. BUFMGR. COMSUB. -. I. BUFMGR. BUFMGR. DSPSGL. I. SLAVE LCLUSR. SPooh LCLUSR. OSNTRY. LDRMSG. l. LCLUSR. LCLUSR. ,q TNGT4. I. ;. R. l I. IF'PLN. INPLN. INPLN. INPLN. INPLN. !. LSTMGR. LSTMGR. LSTMGR. LSTMGR. LSTMGR. l. LSTTBL. LSTTBL. LSTTBL. LSTTBL. LSTTBL. l. SPOOLR. SPOOLR. SPOOLR. SPOOLR. I. SPLMSG. SPLMSG. SPLMSG. SPLMSG. l. COMMGR. COMMGR. COMMGR. COMMGR. I. RTCMGR. NETHGR. NETREQ. NETREQ. i. MSGFMT. MSGFMT. I. NETMGR. NETMGR. l. NETTBL. NETTBL. NETTBL. I. COMMGR RTCMG. R. DSPCHR. -. DSPSGL. RTCMGR DSPCHR. -. RTCMGR. I. DSPCHR. DS PCHR. l. {. MEMMGR. MEMMGR. -. MEMMGR. -. MEMMGR. -. MEMMGR. COMSUB. COMSUB. COMSUB. COMSUB. COMSUB. l. $ñt8NTT. SY,SÑTT. 8Y¶NTT. ,¶Y8NTT. ,SYSNTT. I. ARCHITECTURE. l-9.

(16) Standard. Standard Packages (Continued). To. packages (Continued). supplement the rrtodüles contained in packages, the following kernel have to be added:. standard ules may. the"e mod-. |-mgn=A---_-_-—-_wher£-Eeqijire¿. l. l. I. NETREQ+. I. MSGFNT. I. :. cessors. NETSVC. In network which must. !. (FIASTE). CPMSUP. l i l. servers request" of other prousers. (SLAVE/SLAVX) from. which systems require In C-functions 7, 8, 24, 28, 29, 31, 37 and 107 to be supported (SINGL/SPOOL/WSTR/SLAVE/SLAVX).. all. I I l I l RTCNUL. i l l. j i. I l l l l ! I l i. CONREM. l. i. l. which. service requests other processors.. I I. In network Íñúst make. that In network servers (MASTR) have no console device attached, SERVER command to allow use of (in of console driver).. lieu In all configurations. no PATCH. RTC. driver. which have (including LOADR).. In all configurations quire an additional. 1"10. which repatch area.. i I l ! I I l l l I.

(17) 1.3 Implementor's. TurboDOS. Memory. Required. 8086 Guide. ARCHITECTURE Memory. Requíred. estimate the memory required by a particuTurboDClS configuration, you need to take into account the combined size of all funcdriver modules, disk buffers, tional modules, and other dynamic storage.. To. lar. Drivers. typically require IK to 4K, and can is especially larger if the hardware Disk buffer space should be as complex. large as possible for optirnum performance, 4K About especially in a network of server. a disk buffer space is reasonable for singlesystem, user although less can be used in a pinch. Other dynamic storage doesn't usually 2K exceed IK in single-user systems, in network servers. be. even. following table gives typical memory requirements for standard TurboDOS configurations:. The. I. T,MPR. 8T.NGT,. SPOOL. 14K. 16K. piRsTR. i. O/S. I. Drivers Buffers. l i I I. IOK. 22K. 2K. 2K. 2K. 3K. 4K. 4K. 4K. 16K. DynaInic_lK Total 17K. ___. l-ll. _IK 21K. _IK 23K. —3K. 44K. I - !. sTiAvE. ,ST,AV.X. Ilk. 19K. I. 2K. I. 4K. I. l. 3K. -. _2K 16K. _2K. l. 27K. l l.

(18) TurboDOS. 1.3 Implementor's. 8086 Guide. ARCHITECTURE Other. Other. Languages. facilitate. Languages. into languages translation TurboDOS has been messages with all modules. textual segregated into separate All such modules message are available in source form To. other than implemented TurboDOS. to. English,. licensees. upon. request.. following modules contain operating system messages:. The !. P©dtíle. !. LCLMSG. I. SPLMSG. l. LDRMSG. j. all. TurboDOS. CQñtÁ.iñs. l i. E'lost operating system messages. Spooler error messages. Loader messages for OSLOAD.CMD.. In addition, available flor. l-12. a. separate. each. TurboDOS. module message command.. I l l l. is.

(19) TurboDOS. 1.3 Implementor's. SYSTEM. 8086 Guide. GENERATION. Introduction. SYSTEM. GENERATION. This section explains the TurboDOS system generation procedure in detail. It describes how to use TLINK to link a desired set of TurboDOS níodules and together, the details system numerous patch points which may be modified during system generation. Step-byand examples are provided. step procedures The. functional. modules. of. TurboDOS. are. dis-. object form (.O tributed in relocatable files). Hardware-dependent driver modules The in the same fashion. are furnished TurboDOS command TLINK specialized is linker used to bind the desired combination of modules together into an executable TurboDOS. TLINK a. version of symbolic patch facility system variety of operating To. also includes. used to modify parameters.. a a. generate. a complete TurboDOS system, you must use TLINK several times. At minimum, a you have to generate server operaFor a networking ting "ystem OSSERVER.SYS. a system you also have to generate user operComplex ating system OSUSER.SYS. networks may require generation of several different user or server configurations. Finally, you may have to use TLINK to generate a cold-. typically. start. or. boot. bootstrap routine for the start-up track.. PROM. At cold-start, theOSLOAD.COM bootstrap routine loads the loader program into the TPA of OSLOAD the server computer and executes loads the server operating systemit. from the The server into memory. file OSSERVER.SYS system operating then down-loads the user operating system from the file OSSLAVE.SYS over the network into each user computer.. 2-l.

(20) 1.3 8086 Implementor's Guide. TurboDOS. TLINK. Command. SYSTEM. GENERATION. TLINK. Comníand. linker. a command The TLIFK specialized used for 8086 TurboDOS system generation, and may also be used as a general-purpose linker rnoc'ules produced by the TurboDG£ for object TASFI. asseMiLer. is. Syntax I. Explanation. inputfn. TLINK. {outputfn}. {-options}. I. a command links specified collecof relocatable object modules together a The "inputfn" single executable file. argument identifies the two input files used a by TLIP'K: configuration file "inputfn.GEN" The and a parameter "inputfn.PAR". "outputfn" argument file specifies the name of the executable output file to be created (normalis type .CMD or .SYS). ly If "outputfn" then oñúitted from the command, "inputfn" is also used as the name of the executable output file, and shoiíLd include an explicit file type (.CMD or .SYS).. The. TLINK. tion into. must contain found, file ismodules (.O files) to be object of the configuration file linkedlisttogether. If TLINK found, then operates in an not is raode. You are prompted by an interactive * to enter a series asterisk of directivec froni the console. The syntax of each directive (or each line of the .GEb' file) is:. If the. the. .GEN. it. l I. objfile {,objfile}.... {;cominent}. L--—---——-——. .O object files are assumed to have type A unle"s a type is given explicitly. null (or the end of the .GEN directive file) terand causes minates the prompting sequence processing to proceed. The. 2-2.

(21) 1.3 Implementor's. TurboDOS. Explanation (Continued). 8086 Guide. GENERATION. SYSTEM. TLINK Command (Continued). obtaining the list of modules from the console, "LINK links all of the or file a m-odules together, two-pass process that displays the name of each module as is encountered. When the linking phase is comTLINK looks for a parameter file plete, and processes pre": ent "inputfn.PAR" the executable (described below). Finally, file (.CMD or .SYS) is written out to disk.. After. it. it if. NOTE: system. Each. module. of the. operating. TurboDOS. serialized with is magnetically The unique serial number. serial number of two components: an "origin consistswhich identifies number" the issuing TurboDOS licensee,. a. and. a. "unit. number". which. uniquely. by identifies each copyWhenof TurboDOS issued TurboDOS used licensee. that for operating system generation, TLINK verifies modules be linked are serialized that all to and. consistently, file accordingly.. Options. serializes. the executable. "-" prefix, the. preceded by a are always may appear or before, between, Several options may be names. nated after a single "-" prefix.. Options and. file l l l l l I l I I I l l I. option-l -8. -B -C -D -H. -L. -M -R -S -U -X. l. ExplanHimn. model 128-byte base. Force No. .__ 8080. after concate-. (single page. l. group). to console, not to printer data group G-Max to 64K No .CMD header (implies -8, -B) Listing only, no output file List link inap List inter-module references List sorted symbol table List unsorted symbol table Diagnose undefined references List. Force. 2-3. I I l I ! l I l l l l.

(22) 1.3 Implementor's. TurboDOS. 8086 Guide. SYSTEM. GENERATION. TLINK Command (Continued). Parameter. File. TLIF'K includes a synibolic patch that may be used during TurboDOS system generation to override various operating system paraand to effect meters necessary software corSymbolic patches must be stored in rections. a which .PAR may be using any text The syntax editor. of each .PAR entry. facility. file. built. is:. file. l. l i I. location. =. value {,va1ue}.... {;cominent}. l I. the "value" arguments are to be stored in consecutive memory locations starting with the address specified by "location".. where. The "location" argument may be the name of a public symbol, an integer constant, or an expression composed of names and integer constants connected by + or - operators. Integer constants must begin with a digit to them from names. distinguish Constants of the form "Oxdddd" are taken to be hexadecimal. Constants of the form "Oddáddd" are taken Constants that start with to be octal. a nonzero digit are taken to be decimal. The "location" expression must be followed by an equal-sign = character. may "value" arguments defined above) or quoted. be expressions (as and ASCII strings, by commas. must be separated A "value" exword pression stored as a 255 or enclosed in value exceeds parentheses; otherwise, stored as an 8is A be must byte. quoted ASCII enclosed by quotes and is stored as a sequence Within a quoted of bytes. string, ASCII control characters may be speby using backslant sequences escape (as described in the section on TASM). The. is. bit. B-bit. cified. 2-4. 16-bit ifit it is string "...",. if its.

(23) 1.3 Implementor's. TurboDOS. SYSTEM. 8086 Guide. GENERATION. TLINK. Command. (Continued). Error. Eessages. l. l I I l l i I I l ! l i. Serial. I. object files specified Can't open object file EOF Unexpected in object file Bad token in object file: <type> Can't create output file Can't write output file Loád address out-of-bounds Duplicate transfer address Duplicate def: <name>. I. Not No. number violation enough memory. I. Undefined Too many. l. Name. j. I. nante:. <narne>. externals in table overflow. 2-5. I. module. l l l I l i l l l i l I.

(24) TurboDOS. 1.3 Implementor's. Patch. Points. 8086 Guide. SYSTEM. GENERATION Patch. Points. following table describes 42 public syrabols ir, TurboDOS which you may wish to modify using the symbolic patch facility of TLINK. (Other patch points may exist in hardwareáependent drivers, but they are beyond the scope of thi," docunient.) The. i. SvmPo1. l l. ABTCHR. J____-p9faWt_va1wm_—_--j =. OX03. ;CTRL-C. tqQaAlml l CONTBL. I i. Abort character. (after. I. attention).. l. I l. l. ATNBEL. =. CX07. CCINTBL. ;CTRL-G warning. Attention-received. l. character.. l. l l. ATNCHR. =. Qxl3. CONTBL. ;CTRL-S. I l i l l l. Attention. character.. if. May. be patched. to. another the default value of character CTRL-S is needed Ey application programs. A (NUL), which zero common choice BREAK key to be used as lows the conscAe an attention key.. is. al-. AUTUSR. =. OXEE. AUTLOG. I { l ! : l l l I. l l l l l I. l l. I !. l. I. i l. i l. l l. l l. l i. l !. l. Automatic log-on user number. Default of QxFF reqvires that user log-on valueLCRON command. via automatic log-on If patch AUTUSR desired at cold-start, to the desired user number (0-31), and set the sign-bit log-on is if a privileged patched Generally desired. to Ox80 in single-user systerts to cause automatic privileged log-on to user zero.. 2-6. i l l I l ! l l I ).

(25) 1.3 Implementor's. TurboDOS. Patch Points (Continued). 8086 Guide. SYSTEM. GENERATION Patch Points (Continued). l. Svm>o1.. l. l l. BFLDLY. =. __-__Refají]t_y,alg§--_--.. l. I. l·1oall1e. !. (300). I. FLUSHR. I I ! l i l !. Buffer flush delay determines how often disk buffers are written to disk, stated in system "ticks". Default value (300 decimal) causes buffers to be flushed about five seconás (assuming 60 every ticks per second). BUFSIZ. =. 3. BUFMGR. i I. (0=128,. 1=256,. Default disk buffer <ize 2=512, 7=16K). Default value 3=IK,..., specifies IK disk buffers. CKTAST. =. I I i. (OX0OOO),(CKTDRA), (OX0IOO),(CKTDRE), (OX0200),(CKTDRC), (OX0300),(CKTDRD). NETTBL. l I ! ! l l ! I I '. !. ! i l l. I l. l. l !. I. I. i !. I I. j. l I. I I. I. l I. ]. Circuit assigrment table defines network NP1BCKT two-word ento,pology. Contains each network one for to which this processer is attached. The word of each entry specifies the address network by which this processor and the is known on a particular adsecond word specifies the entrypoint dress driver responsible of the. circuit. tries, first. circuit,. circuit. (Possibly several cirfor that circuit. cults inay be handled by the saíne driver.). i l I I i I l I ! I i. I I. CLBLEN. =. 157. CMDINT. i l l I. l I. I. line buffer length defines longest permissible command line. The default value permits two BO-char lines. Command. 2-7. I l I I.

(26) 1.3 Implementor's. TurboDOS. Patch points (Continued). 8086 Guide. SYSTEM. GENERATION Patch Points (Continued). LsyIÁb9j_j-_-_-D£faRLkna=-_. l. I. CLPCHR. "}". =. I l. line. Command. l. I. mAyj&-| CMDINT. prompt. l. character.. l l. ) I. CLSCHR. !. Command. "\". =. line. i. CMDINT. l. separator character.. l COLDFN. =. 0,"COLDSTRT","AUT". AUTLOD. !. auto-. l. l. l ) l. cold-start File name and drive for load processing (in FCB format). COMPAT. =. FILCOM. O. I I. flags which define Default cmnpatibility Patch be used for file-sharing. rules to to OXF8 to relax most MP/M restrictions. CONAST. =. 0,(CONDRA). CONTBL. I I l I l I. table defines how console I/O is handled. First byte passed to console driver, and commonly defines the channel number (e.g., serial port) to be used for the console. Following word specifies the entrypoint address of the console driver to he used. assignment. Console. I. l I l l I I ! l. I. l I. l. I. : l. l. l. l l. l !. I l. 1 I. ! I. I l. ! l. I l. CPWJER. =. NONFIL. Ox3l. l l. l l. CP/í4. I. C-function. returned version 12 in L-register. number. BDOS. 2-8. by. I I.

(27) 1.3 Implementor's. TurboDOS. Patch Points (Continued). 8086 Guide. SYSTEM. GENERATION Patch Poínts (Continued). LsjuülQl. l. ___(O). I. I. DEFDID. =. PefAll]t. VaÍl},e. !. Molil11e. I. NETTBL. I. ! ! ! ! I !. Default network destination ID, used for routing all network requests that are not related to a particular disk drive, queue or printer. In a user, DEFDID should be set to the network address of the server. DSKAST. O,(DSKDRA),1,(DSKDRB),. =. I. Disk. I. three-byte. i ! I ! I l I l ". l. l I. letter. local,. an. I 16. local drive, the first byte must not have the sign-bit set. That byte is and is commonpassed to the disk driver, between multiple ly used to differentiate drives connected to a single controller. The following word specifies the entrypoint address of the disk driver to be For. l I. table, array of entries (one for each drive A-P) that defines which drives are and invalid. remote,. assignment. l. I. DSKTBL. OXFF,(0),OXFF,(O),.... l. !. I. I. I I. l I. a. used.. I l j I l i i I l I l I. I l I ! l !. I ! l. remote drive, the first byte must the sign-bit set. The low-order bits of that byte specify the drive letter to be accessed on the remote procesfollowing word specifies the sor. Theaddress network of the remote processor. For have. a. For an invalid drive, the be QxFF, and the following (O).. byte must first word should be. l I ! I I l. I I. I. 2-9.

(28) 1.3 Implementor's. TurboDOS. Patch Points (Continued). 8086 Guide. SYSTEM. GENERATION Patch Points (Continued). ]. ,sYTnbo].. pefmj.E-y^]=----—i_tiuRjmi. l. _. (Continued). l. !. :. DSKAST. I. NOTE: In user configurations STDSLAVE and STDSLAVX, the default values are:. i. Ox80,(0),Ox8l,(0), Ox82,(0),Ox83,(0), ...,CX8E,(O),OX8F,(O). I. ! l l. DSKAST. =. I l l. DSKTBL. l l I i l I l. i. l l. DSPPAT. =. I I. l. I. l l. l. 1,1,1,...,1. LSTTBL. l I. De-spool printer assignruent table, an array of 16 bytes (one for each printer A-P) that defines the each printer i-s assigned. queue to which Values through 16 correspond to queues A-P, and O means that the printer is The default value assigns printers to queue A.. initial. letter. l. line.. all. off-. ! l I l I. l. I ]. ECOCHR. I. Echo-print. =. OxlO. ;CTRL-P. character. CONTBL. (after. attention).. l I. """"""""'"". l !. "'. 1. .. l I I l. I i l. EOPCHR. =. O. LSTTBL. l !. i I. I. be patched End-of-print character. to any non—null character, in which case the presence of that character in the stream output will automatically print signal an end-of-print-job condition. The value zero diszables this feature. Play. lj-. 2-lO. I i. ! l l.

(29) 1.3 Implementor's. TurboDOS. patch Points (Continued). SYSTEM. 8086 Guide. GENERATION. Points (Continued). Patch. l. 1sYmpo1-. j_____M=l.t_ygjw----_--Ll49guim|. FWDTBL. =. I I l. (0XFFFF),(OXFFFF), (OxFFFF),(0xFFFF),OxFF. NETTBL. l l l. I I i l l l l l I I l. forwarding table, an array of two-byte entries that define any explicit message forwarding route" to be used by this processor. The first byte of each entry specifies a "foreign" circuit number N, and the second byte a "domestic" messages destineá circuit numberN C. Any be routed via circuit for circuit will C. termiThis table is variable-length, by Oxff, and defaults to empty. nated Network. LDCOLD. =. AUTLOD. OXFF. ) l. Patch. flag. Cold-start autoload to zero if you want to áisable the coldstart autoloaá feature (COLDSTRT.AUT). enable. LDWARM. =. AUTLOD. OXFF. l ! i. Patch Warm-start autoload enable flag. to zero if you want to disable the warm— start autoload feature (WARI'¶STRT.AUT). LOADFN. =. rnat). ). (FCB. l. l l. I I l l. : ! l I I l. (in FCB for— Drive field to an expli-. I. l. Default. l l. i l. O,"LOAD. 0,"OSMASTER","SYS". i !. !. l. ! l. l. I. ) l. I. I. l l. l. j. l I. I. [. ! I. l. cit. file. loaded. O). name and drive by OSLOAD.COM. may be patched. byte drive value to. 2-ll. inhibit. scanning.. I l l I.

(30) TurboDOS. 1.3 Implementor's. 8086 Guide. SYSTEM. GENERATION. patch Points (Continued). Patch Points (Continued). l. I. SYWPo]. DMajílmyA]R£-—----l. ( I. LOGUSR. 31. =. l'íoQí1e FILCOM. l l. number. for logged-off. l. state.. l. l. l NNBCKT. l. =. l l i. l l. User. l l. I l. NETTBL. l. circuits to. Number. of processor. network is connected.. |_________-__. I. which. this. i I I. l. I. i. NMBEBS. l. Number. =. O. NETMGR. I l. l ! l I l l l l l. of message buffers pre-allocated t·lessage buffers are alloat cold-start. cated dynamically as needed, but this may cause fragmentation which prevents you from changing the size of the disk buffer pool with the BUFFERS command. If this is important, patching NMBMBS to a suitable positive value will eliminate the problem (twice the number of network nodes is a good starting value to try).. L___-. I l l I l l i l ! I. l l. I I. NMBRPS. =. O. NETMGR. l. I l l I I I i l I I l. of reµly packets pre-allocated at Reply cold-start. packets are allocated dynamically as needed, but this may cause fragmentation which prevents you from changing the size of the disk buffer pool with the BUFFERS cormand. If this is important, patching NMBRPS to a suitable positive value will eliminate the problem (the number of network nodes is a good starting value to try). Number. 2-12. l l ) l l l I I l I.

(31) 1.3 Implementor's. TurboDOS. Patch Points (Continued). GENERATION. SYSTEM. 8086 Guide. points (Continued). Patch. l. Pefnult. ,%inho1. l I. NMBSVC. =. Walñe. ___j_-W9Uml. 2. l. to be nodes. l. I. I I l l. of network server processes (The number of network activated. is a good starting value to try.). Number. l BUFMGR. l. of disk buffers allocated For Must be at least 2. performance, optimum allocate as many buffers as possible (consistent with TPA and other memory requirements).. l. NEIBUFS. =. 4. l. i I I ! ! l I. number. Default at cold-start.. OSPUJEN. =. (128). l I 1 I l ] l l I l ! l I l l I. ;2K. bytes. MEMMGR. I l ! ! l l. Length (in paragraphs) of the memory area to be allocateá immediately above the TurboDOS operating system resident for disk buffers and other dynamic working default value (128 parastorage. The graphs or 2K bytes) is appropriate for a For simple user with no disk buffers. OSMLEN patch other configurations, to a the disk value large enough to accomodate buffer pool plus at least 2K bytes of Divide the miscellaneous dynamic space. byte-length of the space required by 16 to give the value of CISMLEN in. total. paragraphs.. I l I I l l l l I l l l l ! ! !. i l. I. l. l l. I l. I l. l. NETSVC. PRTCBR. =. OXOC. ;CTRL-L. CONTBL. !. l. ). l. l. l l I. End-print character (after attention). This is a console attention-response, to be confused with EOPCHR.. 2_13. not. l I I.

(32) 1.3 Implementor's. TurboDOS. 8086 Guide. SYSTEM. GENERATION Patch Points (Continued). Patch Points (Continued). l i !. sYNboIA_____=glt--yalu£----.-_L.l'tmY1£_! PRTF1OD. l. =. I I l !. LCLTBL. ]. Patch. i. default. rüode for local user. The of specifies spooling. value l to O for direct, or 2 for console.. I. I PTRAST. 0,(LSTDRA),OXFF,(O),. =. l. l I l i ! l ] : I ! { ) i i ) ) i l I l l. LSTTBL. !. 0xFF,(O),OxFF,(O),.... I l. l l. Initial print. I l. l. Printer assignnaent table, an array of 16 three-byte entries (one for each printer that defines which printers letter A-P) reniote, and invalid. are local, local printer, the first byte must sign-bit set. That byte is disk printerr, and is comthe channel nuraber Ñ.Ckv serial port) to be used for the printer. The following word specifies the entrypoint address of the printer driver. For. a. have the passed to the monly defines. not. remote printer, the sign-bit set.. first byte must The low-order bits of that byte specify the printer be accessed on the remote Froletter to The the following word specifie,ch cessor. address network of the remote proce"ser. For have. a. For an invalid priríter, must be OxFF, and the should be (C).. the. the first byte following word. l I I l l l l I l l l l I i ! l : I i ; ! l l. !. NCtí'E:. In. ). user ar.d STDSLAVX,. I. PTRAST. l l I. =. configurations STDSLAVE the cIefault values are:. Ox80,(0),Ox8l,(0), OX82,(0),OX83,(0), ...,OX8E,(O),OX8F,(O). 2-14. j l ! l i I l.

(33) 1.3 Implementor's. TurboDOS. Patch Points (Continued). SYSTEM. 8086 Guide. GENERATION. patch Poínts (Continued). l. SvmPol.. i. I I. QUEAST. _-_-_p4aalt_-yjáíue. O,(Q),0XFF,(O), OXFF,(0),OXFF,(O),.... =. I I. three-byte. I I l l l l I ! ! l I I l. letter local, For be. local set to zero.. queue,. a. all. three bytes. rriust. a. reñíote queue, the sign-bit. For an invalid queue, the be OXFF, and the following (O).. first word. l I I ! I. the first byte must The low-order "et. bits of that byte specify the queue let— ter to be accessed on the remote proces— following word specifies the sor. Theaddress network of the remote processor. For have. ! l. table, an array of 16 entries (one for each queue A-P) that clefiries which queues are and invalid. remote,. Queue. I. LSTTBL. ascignment. I l l. ______LkiMüjml l. byte rüust should be. I I l i l i i !. l l. NOTE: In user configurations STDSLAVE and STDSLAVX, the default values are:. I. QUEAST. I. =. I l. l I l I. OX80,(0),OX81,(0), OX82,(0),OX83,(0), ...,OX8E,(O),OX8F,(O). I. l I. LCLTBL. I. assignment. or printer If a QUEPTR (spooling), specifies l O PRTFIOD = assignment. (direct) queue If QUEPTR assignment. specifies a printer In both cases, values l through 16 correspond to letters A-P, and zero means do not queue cr prir.t off-line.. l. QUEPTR. =. I I l j ! ! I I I. Initial PRTI4OD. l queue. =. 2-15. ! I I I I l.

(34) TutboDOS. 1.3 Implementor's. Patch Points (Continued). 8086 Guide. SYSTEM. GENERATION Patch. Points (Continued). i. "b"eTauíí7bíue"""". l. ,SYTiÍbo1-. I. P%dule. I l. [. Oxll. RESCHR. =. Resume. character. ; I. CONTBL. ;CTRL-Q. (after. I I. SCANDN. =. O. OSLOAD. l. Scan. I. OxFF. Patch cZirection flag for OSLOAD. to to .qcan P-tO-A (instead of A-to-P).. SLVFN. =. "CSSLAVE. ","SYS". NETSVC. !. I i. ! l. l. [. l. i. l l. I. l. I i. attention).. l I. l. and type be down-loaded Name. L_______ l. of file (in format) to into user processors. FCB. I ! I. I. SPLDRV. l. spool drive. Default value OFF indicates spool to system disk (disk from which TurboDOS was loaded at cold-start). Patch to O through F to specify a partícular drive A-P.. =. I. OXFF. LCLTBL. I I. I l l l. Initial. i i } l I. l I. SRHDRV. l. Search. =. CÍ4DINT. O. l I. l I I l l l. files.. Patch to drive for command through 16 to search drive A-P value coriunand is not found on current patch (default) drive. to Oxff to search system disk (disk frorri which TurboDOS was loaded Default value O at cold-start).. if. l. diqables. this. 2-16. feature altogether.. I I I l l l I.

(35) 1.3 8086 Implementor' s Guide. SYSTEM. TurboDOS. Patch Points (Continued). GENERATION Patch Poínts (Continued). ! I I. svmm SUBFN. i. Submit. l. CP/PI. UíLue____j_. Mochil. "SUB". SUBMIT. __ 0,"$$$. ",. file name lle. emulator.. =. ( l. F-e£acíjLt. submit-f. e. l I I l. searched. for. by. optional. ! l. I l I I i. WAPNFN. =. O. ,. "WARMSTRT". ,. "AUT". AUTLOD. File name and drive for warm-start autoload processing (in FCB format) .. 2-17. l I I I l.

(36) TurboDOS. 1.3 Implementor's. Network. 8086 Guide. Operation. SYSTEM. Network. a TurboDOS accomodates w1Ae variety work topologies, ranginc from the 'Yxver/user networks point-to-point complex most star, ring, and. Model. Operation. of net— siníplest to the. hierarchical. structures.. Network. GENERATION. TurboDOS network is defined to consist of up to 255 with up to 255 nsz9m (ptocemsors) Each node has on each a unique 16-bit netwQrk Address consisting of number an B-bit plus an B-bit node number (on that A. cjrc!}its,. circuit.. circuit circuit).. to several processor may be connected A connecteCl proces'"or desired. if has multiple network to multiple circuits each such a addresses, one for circuit. processor even niay be set up to perform raes— sage forwaráing from one circuit to another, network nodeE permitting dialogue between that do not share a commori circuit between them (more on this later).. Any. circuits,. Network. Tables. actual network topology is defined by a The series of tables in each processor. tables are set up during system generation, and define the network as "seen" from the viewpoint of each processor. The tables are: The. l. SYWPoI. !. -.D=grjptj9p-. l I l l l i. NKBCKT. -—--—_!. byte value that Clefines the r.umber of network circuits to which is connecthis processor ted. A. 2-18. I I I i l I.

(37) Ketwork Tables (Continued). GENERATION. SYSTEM. 1.3 8086 Implementor' s Guide. TurboDOS. Netvork Operation (Continued). l. SV»oi.. l i. CKTAST. l ! I i ! l l I. DSKAST. i i. I I. |_. __The. -_ _- _. I)£Esrjptj&jlL. i. -. -. — ----. --. -. —. circuit assiccnmer-t table containing NMBCKT entries defining the network address by which this processor is known on each circuit, and specifying the network circUt driver respon".ible for each handling each circuit. table that drive letters all and remote, A-P which are local, invalid. This table specifies a network address for each renote drive, and a disk driver for each local drive. The. assigmíient. disk specifies. for. ' !. PTRAST. ! l. l !. QUEAST. l l. I l i I. table printer all A-P which are local, reletters and invalid. raote, This table specifies a network address for and a prineach rew.ote prir.ter, ter árit"er for each local prim— te r . The queue. network queue .. l. !. printer that specifies. The. specifies a-p which invalid.. l. I. assignment. DEFDID. for. assignment. for. all. table that queue. letters. local, remote, and This table specifies a acldres," for each reroote are. áefault network destination used for routing all network requests that are not related to a specific disk drive, printer,. The ID,. queue.. or. 2_1. 9. I i l ! ! l l l i I l I I I. I l ! I i I I I l I I i I I I i l I I I.

(38) 1.3 Implementor's. TurboDOS. 8086 Guide. SYSTEM. Network. GENERATION. Operation. (Continued). Network Tables (Continued). l. SYwPol. ]. Deszcrjjp-tí9rL____. i I. FWDTBL. I !. l I. The raessage. ___-l l. forwarding table that specifies any additional connected circuits (not directly to this processor) which may be accessed via explicit iuessage forwarding, and how messages destined for such circuits are to be routed.. l i I l l ! I. These. tables are pre-defined with default values to make set-up of simple server/user complex For networks very easy. multithe set-up is somewhat more circuit networks, (as might be complicated expected). Refer to the preceding PáÉCjí points subsection for details of the organization and defaults for these network tables.. 2-20.

(39) TurboDOS. 1.3 Implementor's. Message. 8086 Guide. Forwarding. SYSTEM. Network. The two and. GENERATION. Operation (Continued). architecture of TurboDOS suFpQrts kinds of message forwarding: "implicit" "explicit". To understand a the distincnetwork with tion, consider the case of three processors (PI, P2, and P3) connected by two circuits (Cl and C2) as follows: network. l i. i. pi. 1_|. l. I. j------cl------j. p2. 1_|. l. |------c2-----|. i i. p3. 1_|. program running in PI makes an access to drive D. Suppose the disk as"ignment tables in the three processors are set up in the followincj fashion:. A. defines its drive reference to P2'S drive B.. D. as. a. defines its drive reference to P3's drive. B. as. a. P3'S DSKAST defines its drive A as local device attached directly to P3.. a. .. Pl's remote. DSKAST. .. P2's. DSKAST. remote .. A.. In this case, pl's access to its drive D P3'S actually winds up implicitly accessing drive A. This is implimit forwarding.. Alternatively, as its drive A, and D. drive. suppose a remote. Pl's. DSKAST defines reference to P3'S FWDTBL provides that. that Pl's destined for circuit C2 may be a PI sends routed via P3Cl. In this case, P2 on circuit Cl. receives the request to request, recognizes that it should be forwarand retransmits ded, the request to P3 via P3'S drive A C2. Thus, PI accesses circuit with the assistance of P2, but this time PI is not aware of P2'S role in the transaction. This is eYp1icit forwarding. messages. 2-21.

(40) 1.3 Implementor's. TurboDOS. 8086 Guide. DISTRIBUTION. DISTRIBUTION. This section explains the TurboDOS distribuin detail. tion procedure It covers TurboDOS licensing requirements, and the obligations dealers, and endof licensed distributors, how to riiake uµ and descri-bes users. TurboDOS distribution serialize It disics. Although this section is of concern primarily to licensed TurboDOS distributors, we've included here so that dealers and endusers can gain a better perspective on the overall distribution process.. it. TurboDOS. Licensing. is a proprietary software µrociuct of Software 2000, Inc. As such, it is protected by law against unauthorized use and reproducAuthorization to use and/or reproduce tion. TurboDQS is granted only by written license TL}rboDOS. agreement.. Legal. Prgtection. TurboDOS. progranís. and. righted, which means make copies without zation from Software. documentation. are. copy-. is against the law to express written authori2000 to do so.. it. owned by "TurboDOS" word is a trademark Software 2000 and registered in Class g (computer software) and Class 16 (documentation) with the trademark offices of the Uniteá countries of States and níOat ofTPÁSthe developed means is against the the free world. it law to make use of the TurboDOS trademark from without express written authorization Software 2000. The. companies 2000 has licensed certain Such distributors TurboDOS. to diú'tribute are authorized to use the TurboDOS trademark, and sub-license and to reproduce, distribute, and docuraentation TurboDOS programs to dealers and end-users. Software. 3-l.

(41) 1.3 8086 Implementor's Guide. TurboDOS. User. Obligations. DISTRIBUTION TurboDOS. Licensing (Continued). TurboDOS. may be used only after the user has paid the required license fee, signed a copy license agreement, of the TurboDOS end-user and returned the signed agreement to the issuing TurboDoS distributor. Then, TurboDOS ínay be used only in strict conformance with the terms of the license. end-user license allows TurboDOS to be "ystem computer on one specific identi— The fled by níake, model, and serial number. end-user license may not be transferred from system one computer to another, and expressly forbids copying programs and documentation except as required for backup purposes only. Each used. separate license fee must be paid and a separate license signed for each computer system on which TurboDOS is used. Network slave computers that cannot operate stand— alone (because, for example, they have no local disk) do not have to be licensed sepaHowever, the network server. rately fronücomputers networked that are also capable of stand-alone operation under TurboDOS must (whether each be licensed separately or not used stand-alone). they are actually A. Dealer. ObligatioRs. A. dealer. ment. and. must. return. sign. the. a TurboDOS dealer agreesigned agreement to the Then, the dealer. issuing distributor. is pre-serialized copies permitted to purchase documentation and from TurboDOS programs of the distributor, and to resell them to end— Dealers may not make copies of users. TurboDOS programs or documentation for any purpose whatever.. Before delivering each copy of TurboDOS, the signs dealer must see to it that the end-user and license agreement the TurboDOS end-user returns to the issuing distributor.. it. 3"2.

(42) 1.3 Implementor's. TurboDQS. Distributor Obligations. 8086 Guide. DISTRIBUTION TurboDQS. Licensing (Continued). Each licensed TurboDOS distributor is proviáed a master copy of TurboDOS relocatable A and command programs modules on diskette. allowed to reproduce and copies of TurboDOS to dealers and distribute. is. distributor. in connection with authorized hardware or sold by the distriThe distributor is required to butor). serialize each copy of TurboDOS with a unique and to sequential magnetic serial number, number each register with promptly serial 2000. Software (Serialization is described in more detail below.) end-users, but only certain specifically (usually manufactured. Each also provided with a master copy of TurboDOS documentation, either hardcopy or in ASCII on in camera-ready The responsible disk. and furnishing reproducing the documentation issues. with each copy of TurboDOS. distributor. is. files. distributor is. for. it. it. dealer to distributor dealer agreement sign and return before issuing copies ot TurboDOS to the A distributor dealer for resale. must require each end-user to sign and return a TurboDOS before end-user license agreement issuing a copy of TurboDOS directly to the end-user. must require a TurboDOS. A. 3_3. each.

(43) TurboDOS. 1.3. Implementor's. Serialization. 8086 Guide. DISTRIBUTION TurboDOS. Licensing (Continued). is magneticaíly serial— Such unique serial nuraber. helps ensure that reproduction and is done in of TurboDGS distribution the required licensing accordance with strict and registration procedures, and facilitates tracing of unlicensed copies of the "oftware. Each. copy of ized with a serialization. TurboDO". Each. relocatable ted to a dealer. serial .. .. number. of TurboDOS distribu— has a magnetic end-user or composed of two parts: module. ori.qin nl?mher that and issuing distributor,. an. identifies the. sequential íuük ngAíheK that uniquely each copy of TurboDOS issued identifies by that distributor. a. system generation, the TLINK conunand verifies that all modules making up a Turbo— DOS configuration are serialized consistent— and magnetically serializes the resulting ly, executable version of TurboDOS accordingly. During. r.odules on the waster disk relocatable furnished to each licensed TurboDOR distribu— tor are partially serialized with an origin Each distributor number only. is provided a (SERIAL.CMD) program that must serialization be used to add a unique sequential unit nun.— ber to each copy of TurboDOS issued by the coriímand The TLINK not will have distributor. modules accept that Con— partially-serialized not been serialized with a unit number. the SERIAL comníand will not re— versely, serialize modules that have already been fully serialized. The. 3-4.

(44) ,. 1.3 Implementor's. TurboDOS. Technícaí. 8086 Guide. Support. DISTRIBUTION TurboDOS. arid telex techrÁcal "hot-lines" These are assistance te: its distributors. unlisteC numbers providing direct access to the authors of the TurboDOS operating systerrt, and are furnished only to license¿ TurboDOS t'le encourage distributors distributors. to take advantage of this service whenever technical questions or problems arise ir. using or configuring TurboDOS.. Software. 2000. Íjicensing (Continued). maintains to provide. telephone TurboDCi,". of each licensed It is the responsibility distributor to provide technical support to and end-user customers. Software its dealers :CSúíñQt 2000 dealers or end-users assist directly. Where exceptional circumstances seem to require direct contact between Software 2000 technical personnel and a dealer er end-user, this must be handled strictly by between prior arrangement Software 2000 and the distributor.. 3"5.

(45) 1.3 Implementor's. TurboDOS. SERIAL. 8086 Guide. Comaand. Syntax. DISTRIBUTION SERIAL. TurboDOS distribuSERIAL command enables relocatable tors to magnetically serialize modules of TurboDOS for dic.tribution. The. l. l j. SERIAL SERIAL. i !. Explanation. Command. srcefile destfile ;Unnn {options}. ;Unnn. {options}. l l. comnand SERIAL the works exactly coííimand, and accepts exactly the same and options. SERIAL has However, arguments. like. Thé. COPY. function of magnetically the additional serializing relocatable modules as they are copied. SERIAL serializes files of type .REL and type .O (8086 (Z80 modules) modules). Other files are copied without any change. number Íñüst be specified The on the "nnn" command where as ;Unnn, represents decimal a unit number in the range 0-65535. be assigned numbers must sequentially, Unit Unit number O is reserved starting with by convention for in-house use by the distri—. unit line. l.. butor.. fully-serialized modules that with the distributor's origin TLINK the specified unit number. not accept TurboDQS modules unless they been fully serialized in this fashion.. SERIAL. produces. are encoded number and does have Options. Exp1a.RAti.on. LQpkion-j—-. i. l. I. SERIAL. I. ;Unnn. I I I ! l l. accepts. all. COPY. Relocatable. options,. (type .REL or .O) are magnetically serialized with unit number nnn, which must be a decimal integer in the range O to 65535. This "option" is mandatory for serial.. 3-6. modules. plus:. i l l l l I I I I.

(46) 1.3 Implementor's. TurboDOS. 8086 Guide. DIsTRIBUr1oN SERIAL Command (Continued). l. l. Example. l ! l I l. 0A}8ERT.AIb OA:AUTLOD OA: AUTLCG. *,0. .O .O. B:. l. : U?89N. copieá copied. to to. OB:AUTLOD CB:AUTLCG. .O .O. i. to. OB:SYSNIT. .O. I. *D. OA: SYSNIT DA}. .O. copieG. I. l. Error. Fiessages. i I l ! I i I ! I. SERIAL sages,. incorporates plus:. all. COPY. Unit number not specified Origin number violation File is already serialized EOF Unexpected in .C) or .REL. 3-7. error. mes-. I I. I I. file. I.

(47) TurboDOS Implementor. 1.3 8086 's Guide. DISTRIBUTION Conmand. PACKAGE. PACKAGE. Command. The. PACKAGE. collection a single Syntax. you letsobject .C file.. concatenated. combine modules. any. ir.tcj. l. l. !. Explanation. command. of relocatable. PACKAGE. srcef. lle {destf lle}. PACKAGE ír.ay be used to construct custom packages make additions of TurboDOS modules, or changes to the supplied STDXxxxx packages,. pre-package so forth.. collections of driver modules,. and. The "srcefile" argument specifies the name of arí input "srcefile.PkG" that the rüodules The "destfile" to be packaged. argu— went specifies the name of the concatenated .O to be created. argument orriitted, then the is also used as the name of the output .C). file. lists. file. If the. "srcefile"If. "destfile" is file.. the. .PKG contain file is found,object it must modules of relocatable (.O list It" the .PKG linked together. files) to be found, then the file i" not You operates in an interactive niode. corrlR!anei. PACKAGE. are asterisk * tci enter a series The syntax of directives from the console. of each directive is: prompted. by. an. [ !. objectfn { ,obj ectfn} l__________ A. . . .. {. ;comment. }. l l. __._._--__. terminates null directive and causes. the prompting processing to proceed.. sequence. After. obtair: ing the of riíodules froin the concatenates or console, PACKAGE of modules together (áisplaying the name of each module and writes as is encountered). list. file the. the result. it. to the output. 3-8. all. file..

(48) 1.3 Implementor's. TurbooOS. 8086 Guide. DISTRIBUTION PACKAGE. Command. (Continued). Example ! I l l ! l !. OÁWMRAGÉ STPT,OAPR * ; STDLOADR.PKG etandard loader package * OSLOAD,LDRMSG,OSNTRY,FILMGR,FILSUP * FILCObÍ,BUFMGR,DSKMGR,DSKTBL,NONFIL * CONI'1GR,CONTBL, DSPSGL, COMSUB LDRMSG OSLOAD OSNTRY FILMGR FILSUP etc .. l l l I !. QA}. I. Error. Messages. ! ! l I ! I j l. File name missing f rora command Invalid input file name EOF Unexpected in input file Disk is full Can't ríiake output file Can't open input file No input files. 3-9. l l l ! i I I.

(49) TurboDOS. 1.3 Implementor's. Distribution Procedure. 8086 Guide. DISTRIBUTION. Distrib.. Procedure. is the procedure to be followed by distributots when creating each copy of TurboOOS to be issued to a dealer or end-user:. Here. ]... Assign. a. unique. sequential unit. number. for. this register it immediately by filling out serial number card (or agreed-to substiregistration 2000, and of. copy. TurboDOS,. and a. mailing to Software. tute) 2.. Format. a. .. trademark. .. version. .. origin. .. 3.. with the disk, and label information clearly legible:. it. new. following. TurboDOSTM number and. numbers. (oo/uuuu). statutory copyright notice: Copyright 198x by Software All rights reserved.. 2000,. Inc.. SERIAL command to copy and serialize the appropriate files from your distribution master disk to the new disk. Use the tables page to on the following guide you in determining what files to put on the new disk. Use the. IMPORTANT. NOTE:. loader. Be absolutely certain does jjQt contain any or SERIAL.CMD!. disk, use the new command to generate an executable and operating system. Follow the described in generation procedure. Using the TLINK. system the previous. 5.. (1.3x). unit. that the new disk unserialized modules 4.. Inc.. serialized. section.. In addition to the serialized disk, you should issue copies of TurboDOS documentation and a start-up PROM (if applicable).. 3-lO.

(50) 1.3 Implementor's. TurboDOS. Distribution Procedure (Continued). 8086 Guide. DISTRIBUTION. Distrib.. Procedure. (Continued). following table may be used for guidance in preparing TurboDOS disks for distribution. In addition to the files shown, you need to driver modules and include hardware-dependent utility programs as appropriate.. The. l !. single-user. Y//O. I I i l. -. l l l. single-user. i. multi-user. !. ,------. STDLOADR.O STDSINGL.C. I. :. I. CPMSUP. I. RTCNUL. l. PATCH. l. SUBMIT. I. OSBOOT. I. STDLOADR.O STDSINGL.C) STDSPOOL.O. -. -. .O .O .O .O .O. RTCNUL PATCH. SUBKIT OSBOOT. -. -. I l l I. AUTOLOAD.CMD. l. BACKUP. l. -. -. BOOT. l. BUFFERS. !. COPY. I i. BACKUP. .CMD. BOOT. .CMD. BUFFERS. .CMD. COPY. DATE. .CMD. DELETE DIR. .CMD. I. DO. I. I I. STDSLAVE.O STDSLAVX.O. I. CPMSUP. I. NETREQ. .O .O .O .O .O .O. MSGFMT. .O. l. NETSVC. .O .O. l. RTCNUL PATCH. SUBMIT OSBOOT. I I. I { I I l. I I l. AUTOLOAD.CMD BACKUP. .CMD. I. BATCH. .CMD. I. .CMD. BOOT. .CMD. I. .CMD. BUFFERS. .CMD. l. .CMD. -. I I. STDMASTR.O. CONREM. AUTOLOAD.CMD .CMD. I. .O .O .O .O .O. CPMSUP. STDLOADR.O STDSINGL.O STDSPOOL.O. CHANGE. .CMD. I. .CMD. COPY. .CMD. I. DATE. .CMD. DATE. .CMD. l. DELETE DIR. .CMD. DELETE DIR. .CMD. I. .CMD. l. .CMD. DO. .CMD. DO. .CMD. l. DRIVE. .CMD. DRIVE. .CMD. DRIVE. .CMD. l. l. DUMP. .CMD. DUMP. .CMD. DUMP. .CPID. l. l. ERASEDIR.CMD. l. l l. FIXDIR. -. .CMD. -. .CMD. -. .CMD. ERASEDIR.CMD FIXDIR. -. .CMD. ERASEDIR.CMD .CMD FIFO .CMD FIXDIR. I l l l. 3-ll.

(51) 1.3 8086 Implementor' s Guide. TurboDOS. Distribution Procedure (Continued). DISTRIBUTION. Distrib.. l i. single-user. l :. FIXMAP. i. FORMAT. I. LABEL. l l I I. OTOASPI. ). PRINT. i. .CHD CHI). . .CMD. -. .CMD .. CHI). READPC. -. RENAME. -. !. RET. -. !. SHOW. . .CMIJ .CMD. l l i I. !. LW/SL-&ÉQ9jW —L. !. .CMIJ. .. sincle-user wjtlj-spQol?r-jFIXMAP. CHI) . .CI4D. FORI4AT. LABEL. OTOASN. .. -. nq. l. FIXMAP. .CÍ4D. l. FORMAT. .CMD. ). LABEL. .CÍ-ID. I. LQGOFF. .CMD. I. aetw or. .CEll). OTOASF1. PRINT PRINTER. AHOW. CHD. . .CMD. i I. i. RECEIVE. CMD . .CMD. I. SEND. .CÉ4D. I. SET. .CMD. I. SHOW. .CMD. l. RENAME. -. l. . CMD . .CMD. .CXD. .CMD. SET. l. CMD. READPC. .CMD. CMD. CMD. QUEUE. QUEUE. -. .. ]. l. READPC RENAME. i. CÉÍD . .CMD. CFID . .CMD. CMD. k. SERVER CEll). l. multi-user. LGGON. .. PRINT' PRINTER. CÍ4D. l. procedure (Continued). I I. CFÍD. TASI9. .CMD. I. TBUG. .CMD. :. TLINK. .CHD .CHI). TLINK. .. .CMD. TPC. .CMD. TPC. TYPE. .CMD. TYPE. .CUD. TYPE. I. USER. .CMD. USER. .CMD. l. VERIFY. .CHE. VERIFY. l. TASFÍ. I. TBUG. l. TLINK. . .CPID. I. TPC. l. CMD. i. 3-12. TASE! TBUG. .. .. CPID. USER. vERIFy. CMD CMD. l I. . .CMD. !. .CMD. I. .. CEil). l.

(52) 1.3 Implementor's. 8086 Guide. CODING CONVENTIONS. CODING CONVENTIONS. This sectiorí is devoted to in-depth discüs: sion of TurboDOS internal coding conventions, aimed at the systems proqramner writing hardware-dependent drivers or resident processes. and driver examples 1istinCs in All coding this document níake use cf the TurboDOS 8086TASM. family assembler. Undefined References. allow various TurboDO," modules to be included or omitted at will, TLINK automatically resolves all undefined external references to the default names "UndCode" (for code references) and "UndData" (for data The common subroutine module referer,ces). CCMSUB contains the following:. TurboDOS. External. To. I. I. I !. LDC. UndData:. I. :. WORD. Data# 0,0. ;data segment ;undefined data. l ) l. I l I. l. LOC. UndCode:. l. :. XOR. I. RET. Code# AL,AL. ;code. segment ;undefineá code ;zero AL & flags. ;return. l I I i. is always safeor to load or call an external name, whether is present not bad form it is to at TLINK time. store into It an undefined external r: ame, however! Thus,. it. 44.

(53) TurboDOS. 1.3 Implementor's. Memory. 8086 Guide. Allocation. CODING CONVENTIONS Memory. Allocation. Í4EMPIGR module nanageníent r.emory and dynamic allocation deallocation provides of memory space required for disk and message and record locks, queues, buffers, and so TurboDOS nesting, such dynamic a memory region of for reserves above irnrr'.ediately the located workspace, The length of this area TurboDOS resident. by the patch(in paragraphs) is determined OSÍ4LEN. l·iemory segments are able parameter A. common. do-file. print. file. forth.. top of the allocated downward from the segments reserved region.. Deallocated. are. concatenated with any neighbors and threadeci A algorithm on a free-meIrlory used reduce memory fragmentation. is to. list.. best-fit. and deallocation Allocation coded in this manner:. requests. are l. l !. ;code. l. l ! l I I. ;code. memory segment to allocate bx,=36 ;BX=segment íaov size AIAOC# CALL ;allocate segment TEST AL,AL ;alloc successful? ERROR ;nz -> not enuf meín JNZ PUSH BX ;else, BX=&seClment a. **. deallocate to POP BX CALL. DEALOC#. a memory segment ;BX=&segInent ;deallocate segment. l l I l I I l I l. ALLOC# prefixes each allocated segment with a word containina the segment length, so that DEALOC# can how much memory to be ALLOC# does not zero the newlydeallocated. allocated segment.. tell. 4-2. is.

(54) TurboDOS Implementor. 1.3 8086 's Guide. List processing. CODING CONVENTIONS. List Processing. GyRaIaic structures as itsbidirectional with linkages. lists This technicue pertiits a node to be added or deleted anywhere in a iiÁt without searching. head and each The list node have a twow"orc"t list linkage (forward and backward pointers) . TurboDOS threaded. I!",air!taiRs. List nianipulaticn. coded. is. in this. ntanner: !. I l l l. LDC. ;list head LSTHED:. WORD. I. Data. #. ;data. initialized LSTHEF. i. LSTHED. I. (linkage. WORD. ;forward pointer ;backward pointer. l I l. node (linkage C LSTNOD: WORD. ;list. I. !. RES. 128. I. I i. ;code. l l l l. list. ;link. I. l. ;backward. LDC. !. !. l. initialized). Code# segment ;prog"rara add node to end of to HOV ;BX=&head BX, &LSTHED MOV ;DX=&ñocje DX, &LSTNC)D LNKEND# end CALL to. O. ;code. ;code. l I. WORD. i. nct.. I. ;forward pointer pointer ;contents of node. i. I. l. segment empty). list. list. i. btOV. l. CALL. I. 4-3. node to beoinning of BX,&LSTHED ;BX=Oíead DX,&LSTNOD ;DX=&node LNKBEG#. ;link to. l l I l I i l I. list. list. l. l. unlink node from to bíOV BX,&LSTNOD ;BX=&ríode UNLINK# CALL ;unlink node add to MOV. I. ) l l. beg.. l !.

(55) 1.3 8086 Implementor's Guide. TurboDOS. Task. Dispatching. CODING CONVENTIONS Task. Dispatching. TurboDOS incorporates a Elexibje, níechanistn for dispatching the 8086-fawily CPU among various competing processes.take In coding extrerne you must drivers for TurboDOS, t-c: care use the dispatcher correctly in order to attain r.aximuni system µerforiuance.. efficient. The cíispatcher allcws one process to f/ait for ol" some event (for example, data-available seek-complete) wbile allowing other processes For each such event, to use the processor. called you iaust define a three-word structure a "seKlaFhore". serííaµhore consists of a count-word follcrweci head. The count-word by a twc-worcl üséc': by the dispatcher to keep track of the head status of the event, while the a threaded anchors waiting of processes for the event to occur. A. is. iiÉt. iiÉt. list. Two primitive operations operate on a serna— phore: waiting for the event to occur (WAIT#), and signalling that the event has They are coded in this occurred (SIGNAL#). following manner: l. l I i. ;this. semaphore WORD. O. l. WORD. l. WORD. EVENT+2 EVENT+2. EVENT:. I ] l. ;wait for the MOV. :. CALL. l l I l. ;signal. 4-4. f-ptr. event to occur BX,&EVENT ;BX=&semaphore WAIT# ;wait for event. that event has MOV BX,&EVENT SIGNAL# CALL. l. some event ;semaphore count ;semaphore ;semaphore b-ptr. represents. occurred. ;Bx=&seInpahore ;signal event. I l I l I I I l l I l l.

(56) TurboDOS. 1.3 Implementor's. 8086 Guide. CODING coNvENTroNs Task. Task Dispatching (Continued). Dispatching (Continued). a Whenever process waits on a semaphore, WAIT# decrements the semaphore's count-word. a Thus, negative count -N there are N processes waiting for the event Whenever an event to occur. SIGNAL# increments the semaphore count-word and awakens the process that has been waiting. signifies that is "ignalled,. longest.. is signalled but no process is If an event waiting for it, then SIGNAL# increments the a Thus, count-word to a positive value. N have positive count that there signifies been N occurrences of the event for which no process was waiting. In this case, the next N to WAIT# on that semaphore callsimmediately will without waiting. return Sometimes is necessary for a process to wait for a specific time interval (for example, a motor-start delay or carriage-return delay) rather than for a specific event. TurboDOS provides a delay facility (DELAY#) that permits other processes to use the CPU while one process is waiting for such a timed delay. Delay intervals are specified as some A number of "ticks". tick is an1/50implementation-defined interval, or 1/60 usually Delays of a second. are coded thus:. it. I I I. ;delay for one-tenth of MOV. :. CALL. I. BX,=6 DELAY#. a second ;BX=delay in ;delay process. l. ticks. I I I. of delays is usually plus-or-minus A delay of zero ticks may be specified to relinquish the processor to on a "courtesy" basis. other processes. Accuracy one. tick.. All. driver. WAIT#. or. delays should be accomplished via ILe=L by spinning in a loop.. DELAY#,. 4-5.

(57) TurboDOS. 1.3 Implementor's. Interrupt. 8086 Guide. Service. CODING CONVENTIONS. Interrupt. Service. Dispatching is especially efficient when used with interrupt-driven devices. Usually, the interrupt service routine just calls SIGNAL# event. to signal the interrupt-associated Most service routines should exit interrupt However, via the usual IRET instruction. some periodic interrupt (usually a 50 or 60 should have an inter— hertz clock interrupt) rupt service routine that exits by jumping to ISRXIT# the dispatcher entrypoint to provide To avoid periodic time-slicing of processes. overhead, don't use excessive dispatcher ISRXIT#. more. about. as. relative. 60 times. second.. per. support routine any OS— or referencing service routine interrupt the subroutine GETSDS# to set up. calling. Before (such must. than. any SIGNAL#) data, an. TurboDOS. interrupt. service. callDS.. register. simple coded. A. like this:. might. routine. I. i I. be. DEVISR:. push. AX. PUSH. BX. PUSH. CX. PUSH. DX. l. PUSH. DS. I. CALL. GETSDS#. I. MOV. l. CALL. l. MOV. l. MOV. l. OUT POP. ;. ". · T. ". ". DS. POP. DX. " ". l. POP. CX. l. POP. BX. I. POP. AX. l. IRET. ;restore. : ;. l. t. ;get. :·. l. ". system DS ;BX=&semaphore BX,&EVENT SIGNAL# ;signal event DX,&EOIR ;DX=&end-of-int AX,=INTN ;AX=interrupt# DX,AX ;reset interrupt. I. 4-6. registers. ;save " ; " · T. " " " ". ;return. registers. from. i l l i l [ l. " " " ". I. int.. I. l l l. l.

Références

Documents relatifs

An optional enclosure shall provide mounting for the sealed mechanical assembly, drive control board, inter- face board and power supply. Also included is the AC

The following hardware and software is needed to initialize a Corvus Winchester disk system for use with a Corvus Concept Workstation using

Read-only test Write/read test Return on-line Spindle control utility Head-select and seek utility (refer to Service Manual for parameters). Maintenance controls and

The external SDI cable that connects the drive cabinet to the disk controller must be mounted on the bottom of the I/O bulkhead assembly.. If two disk controllers are used

Error Description: The master processor issued a HEAD LOAD command to the servo processor, and the servo processor responded with an error condition and no specific error

To move the read/write heads across the recording disk, de current is applied to the bobbin- wound armature (Figure 1-4) of the linear motor. The resulting magnetic field reacts

In a daisychain configuration, the data cables of WREN lI Disk Drives with either ESDI or CDC506 Interface are connected in a radial configuration and the drives

In a dalsychain configuration, the drives are connected in a daisychaln on the control cable, the data cables are connected in a radial configuration, The total length of