MEX-TDOS Implementation of Mex 1.12 for Tdos using T-41 modem driver Documentation written 04/26/85 RDL Include i thi librar ar th basi file necessar t ge Me 1.1 runnin o multi-use Tdo syste wher mode connecte t th maste processo mus b accessibl b th slaves Thi i actuall fairl typica situation bu on whic i difficul (o impossible t d wit standar Tdos Th approac provide her overcome th built-i problem an ha bee workin reliabl fo severa month o th syste wor wit a 30 an 120 baud se n reaso wh i shouldn' wor a highe bau rates provide flopp drive o somethin doen' disabl interrupt lon enoug to cause incoming characters to be missed. Th mai proble wit standar Tdo i tha it mode drive i on characte a time whic shoul wor o a lon a th drive i executin i th sam processo a Mex BU whe th drive i i th maste an Me i i slave tha on characte a tim ha t b transferre ove th net No mos Tdo system com wit reasonabl fas nets bu a 120 bau w nee 12 byte pe second an tha mean 24 ne packet pe secon (jus t cal th drive onc require sendin on packe i eac direction whic i reall askin alot Especiall i ther ar severa slave al biddin fo attention Th botto lin i tha mos an rea worl syste wil b net-limite t som bau rat tha i wel under 1200. Th answe i t allo mor tha on characte t b transferre i eac ne transaction Tdo ha n provisio fo thi i th standar com driver bu i ca b don wit th use functio (T-41) Thi syste cal transfer 12 byte o memor a wel a th CP register bac an fort betwee th slav an th maste ever tim i i invoked S i th maste mode drive grab al incomin character (eithe b interrup o polling an buffer them whe th slav call fo inpu characters th maste ca sen bac al character receive sinc th previou call I woul als b possibl t transfe mor tha on characte a tim fo output bu haven' don tha her bot becaus i looke lik i coul ge prett complicate an there' nothin critica abou outgoing I outpu i slo yo ma ge impatient bu yo won' los anything An o th syste develope thi on mos o th tim i reall isn' al tha slow. mad a effor t cod thes routine s the woul b fairl general-purpose bu it' necessar t poin ou tha mos o what' i thi librar i specifi cod fo specifi compute (JCS-81 S-100-typ compute fro JC-Systems) I i m hop tha thi wil provid yo wit th star yo nee fo you system D NO EVE attemp t us thi stuf as-is. You WILL NOT be happy about the results. MODEM DRIVER SOFTWARE INTERFACE ----- ------ -------- --------- A mentione earlier we'r usin th T-4 (use defined cal instea o th built-i com calls I'v define ful se o mode function whic ar handle throug thi call includin lockin th mode agains attempte simultaneou accesse b mor tha on slave Al function us th CP registers th onl functio whic require th memor transfe i receivin o inpu characters (Tdo alway doe th me xf whethe yo want it or not so we just ignore it most of the time.) Registe i se b th callin progra t indicat th functio desired Registe i purposel unuse b th driver I man system th T-4 cal ma nee t b use fo severa purposes s wa lef ope t possibl b use b "T-4 dispatcher whic woul branc t th necessary routine. Registe i se b th drive t indicat resul statu an i som case retur requeste data Registe wil ALWAY b se non-zer i th operatio wa successful an zer i not Thi provide a immediat indicatio t th callin progra i th drive wa no include i th operatin syste sysge sinc Tdo zero whe non-existan modul i called. A present function number throug an 1 an 1 ar defined Function throug wer lef ope fo futur addition suc a multi- character output transfer. Each defined function is described following: - SIG O AN SE MODE LOCK Thi functio wil gran loc a lon a i ha no alread bee granted There' nothin magi abou th loc -- th drive doesn' eve chec t se wh ha th loc whe othe function ar calle -- it' jus wa fo slav progra t se i someon els i alread usin th modem I th Me overlay thi functio i calle durin inits an i i return busy th overla exits otherwis i continues Whe Me quit, th overla call functio t releas th lock I yo don' tel you user ho simpl thi is they'l thin there' a elaborat watchdo schem glarin a the t ensur the don' crac throug t th mode whil someon els i usin it Whe thi functio i called th caller' use numbe i passe i E Th functio allow loc t b grante eve i it' alread i force i it' requeste b th sam use number Thi allow use t ge bac t th mode i hi processo crashe i mid-session (Um yes tha wa bor ou o necessity. Registe i returne 0FF i th loc i bein grante fo th firs time it' se t th use numbe i th loc i bein re- granted an it' se t zer i th loc i denied Th on restrictio i tha loc canno b grante t someon i use 0 Th Me overla check fo tha an complain i yo try Th cod fo thi functio should be machine-independent. - SIG OF AN RELEAS MODE LOCK Th loc i cleared It' a simple as that. The code for this function should be machine-independent. - TRANSFE INPU BUFFE T SLAVE Al 12 byte o th inpu buffe ar sen t th callin slave Th firs byt i coun o ho man character ar i th buffer Not tha th cod withi thi functio doe no directl rea fro th modem Al i doe i xfe th buffe whic wa filled by the modem poller. Therefore it should be machine-independent. - TRANSFE CHARACTE T OUTPUT Th characte passe i registe i transmitte t th modem A presentl written th drive buffer on characte i necessary whic ma spee thing u shade Th XOCHA section is very machine specific. Check it closely for your machine. 1 - SE BAU RATE Registe passe th bau rat (usin th Me definition) I it' legal i i se an i se t 0FFH I it' no legal i zeroed Th NEWB an BTAB section ar ver machin specific. Check them closely for your machine. 1 - RETUR CURREN BAU RATE Registe i se t th curren bau rat (usin th Me definition) Th cod fo thi functio shoul b machine-independent. MODEM POLLING ----- ------- Th pollin sectio o th drive handle al inpu an an outpu tha require waiting Th entir routin shoul b considere ver machin specific Chec i closel fo you machine Th routin i intende t b linke t pol lis durin col start an sta linke fro the on Don' worr -- i i does' hav an busines t atten to it'l exi i hurr so' no t bo thing down I th cod provide it' no linke t Tdos' standar pol lis becaus wa concerne abou case wher pollin doesn' occu frequentl enough I you'r adventursome tr leavin i a i i (mor abou m ow pol routin unde th RT DRIVE sectio o thi writeup) However ther i know proble wit th cod provide havin t d wit th fac tha callin SIGNA enable interrupts I seem t wor o o m system an don' fee lik gettin int word analysi o th situation s let' jus sa tr i i you'r brave I yo wan t sta safe chang th Ini sectio t cal LNKPO instea o LNKLCP the stic D a th beginnin o th pol sectio (a labe INPOL) hav i min t twiddl wit Tdos' DSPCH modul someda an fi i wher pollin occur ever tim RTCIS i calle eve i dispatchin i currentl disabled Mayb eve provid high-spee RTCIS entr whic provide extr pollin o critica routines Bu anywa . Th entir pollin sectio coul conceivabl b handle som othe way particularl i you syste provide fo mode interrupts Th mai thin i t ensur som wa o othe tha yo don' mis an inpu characters. DRIVER INITS ------ ----- Th Init sectio o th drive mus initializ th mode an lin th poller Mode inits a labe COMNIT ar ver machin specific Chec this section closely for your machine. RTC DRIVER --- ------ Include i th librar i skeleto RT drive whic doe thre thing tha ar non-standard I set th cloc t interrup fiv time a ofte a Tdo think i should i doe pollin o routine o it ow pol list an i provide tic coun i memor pag fo th us o Me timing functions. Th fas cloc interrup i use strictl t provid frequen pollin an high-resolutio tic count I doe no affec Tdo i an way Al Tdos interfaces, including RTCISR are called as exptected. Th pollin tha i done a mentione earlier ma o ma no b wha yo need A th least us i cautiously I work exactl th sam a LNKPOL jus cal LNKLC instead I yo don' wan t us it th cod fo i ca b removed O i yo leav th cod i bu neve cal LNKLCP a confiden you'l b ok I othe words i shouldn' b proble fo yo a lon a yo don' tr t us it Th onl drawbac i th sligh processin overhea ever tim i check th empt pol list bu tha wil probabl b negligible. Th low-memor tic coun i 16-bi valu a addres 0008-0009 I i simpl incremente ever ms It purpos i t allo program t accuratel mar th passag o tim whil doin thing whic caus unpredictabl delay -- lik ne transactions Th sampl RT drive include cod t incremen thi locatio i bot memor bank i cas you'r runnin banke system I you'r no usin banke memory th routin shoul stil work bu agai there' tha processin overhead Remov th ban stuf i yo don' nee it I yo AR usin banke memory hav yo checke you ban drive code Yo ma b abl t spee you whol syste u i yo tak ou th mute tha Softwar 200 include in their sample driver . . . THE MEX OVERLAY --- --- ------- S finally w ge t th goo stuff Wha al thi ha t d wit Mex Th fil MXO-JC03.AQ i th actua Me 1.1 overla runnin o thi system I shoul b fairl machine-independent bu hav loo ove i becaus there' goo bi abou i that' differen fro run-of-the-mil overlays Include i th fil i th MEXPAT1 code becaus fe o th MEXPAT settings are important for proper operation. thin wit goo understandin o th T-4 driver th mode interfac i th overla shoul b fairl self-explanatory Not tha receivin incomin character cause th curren DM memor t b changed an Me ha proble wit that S th overla use it ow DM memory the set th DM addres bac t wha i wa t star with Ho doe i kno wha i wa t star with I intercept al BDO calls an wheneve DM i set i save th address. Th SET comman i implemente t set/quer bau rate an t allo disablin o consol output us tha featur i m rea file t cu dow o th clutte o th scree whil I' runnin throug al th initia commands. Ther ar thre patche t Me include i th overlay Tw o the ar use t replac Mex' input-wai call wit cod tha use th tic coun a addres 8 Th othe on strip th parit o character bein rea ou o a - fil i ter mode I you'r shippin Wordsta documen file, tha make th line-en delay wor properl wit sof returns (Ou secretarie her jus lov t - Wordsta documen files.) Th mos significan thin abou th MEXPA sectio i tha mode inpu queuein i DISABLED I yo tur queuein on yo won' BELIEV ho slo i goes Besides th drive take car o th buffering Th onl proble wit thi i tha Me reliabl lose on inpu characte ever tim i send a XOF to flus it captur buffer. GETTING IT ON THE AIR ------- -- -- --- --- Obviously makin thi thin wor i goin t requir GENnin ne versio o you operatin system bot fo th maste an fo th slave S MAK SUR yo ar backe u t th poin o havin flopp o somethin tha wil boo th ol syste t giv yo recover rout i somethin foul up I doe g withou saying hope tha al you file ar already backed up anyway. Edi an assembl T41COM an RTCDRV t sui you needs Ad T41CO t th lis i OSMASTER.GE an ad RTCDR t bot OSMASTER.GE an OSSLAVEx.GE i it' no alread there Th .PA file shoul no hav t b changed Ge th ne file an smok tes them Finally creat MEX.COM with the supplied overlay. Onc th ne opsy appear t b aliv an you ne Me i built connec th mode t th maste processor Fir u slav terminal an d privilege logon Execut th ne Me an se wha happens Tr somethin gentl a firs lik goin t termina mod an tryin t sen som character bac an forth I you'v go Haye compatible tr typin AT I al i working th character wil b echoe a yo type an th mode wil respon wit OK I tha muc works you'r probably on the air. UNLOCKM ------- Occasionally i Me terminate abnormall (fro a Attn-Abor sequence fo example) th drive loc wil no b released Th progra UNLOCK ca b execute anytim t unconditionall releas th lock Thi progra o cours woul normall resid i som driv an use are wher most users would not have access to it. LIMITATIONS ----------- A i usual suppose ther ar stil thing tha coul b adde t this Mayb someda wil ad them O mayb someda yo will S far they haven't been pressing enough for me to get around to them. Th drive doe no provid an acces t th mode handshak line (CTS DTR etc.) I ou cas that' no s bad bu som modem ma nee that for dialing or disconnect or ring-detect or something. Ther i als nothin i th drive t se th UAR paramater -- stuf lik no o sto bits parity an th like Again hasn' bee problem yet. An ther i n on-lin printe support Thi i on reall d pla t d somethin about A yo ma know th philosoph o Tdo i tha th use doesn' nee printe statu call Presumably you'l tur spoolin o an jus assum tha it' alway o t sen anothe char And indeed suspec tha thi setu woul wor o goin int th spooler thoug haven' trie it Wha i reall neede here guess i som cod durin initializatio t tes i spoolin i o o off I it' on se fla t alway retur printe ready I it' off provid som routin i th overla tha ca actuall tes printe status Mayb writ ful drive fo th printe int th overlay. Anyway that' th statu a thi point I'v bee extremel happ wit th overal operatio o thi setup an I' happ t shar thi wit an other wh ma benefi fro it I' quit intereste t hea wha kin o result yo com u with chec i prett regularl wit Nightowl FortFone, and Seneca. Rarely to very rarely on Compuserve. Roger D. Lange 04/26/85