IMD 1.17: 11/11/2014 15:19:41 82VKXBVERDOS C* VERSADOS/RMS68K OBJECT 4.4 SN=48634 22 OF 22  BT22a82VKXBVERDOS 0420¼-Iñ¨¹Ëeaè" HzaDNqNq%‚Y�bô`Eò$ ‚àŠáŠ$BµËeÜa¶@ç/: !ßFßIú¢Cú2$ ÕÌ•É%$¹ÉbúGúüà'z Î (z Þ,z ÞCú B”‰ÛÂßÂ+MžNÐHçKúMúaLß`.<°a”a azAú B€aFFü Fü'azHçKúæMúðaÊLß`.<¿a^ z Z"hÓú V.Pßú P-ngNÖNÑHçÀ`CúR•ÊB�²f`$ˆÑ×XŠR�µüeèLßNuHç€`“ÉEú JaLßNuHç€`•ÊCú 8`ì <ÿ$ÙQÈÿüNu /Na¬a¨a¤a aœa˜a”a�aŒaˆa„a€a|axatapalahada`a\aXaTaPaLaHaDa@a .gJ4k`ÊÀ6<ÿþ` ƒ€g ƒ'cÀ` =C ` À`À4<aX6< Gî at4<aD n& f| 6< GîaR4<a"(%0G86@6HTP=XO`6hBp1x:€Bˆ8�<˜> 4¨9°@¸CÀKÈ;ÐAØGàFè9ðDø;A7 9*�01/30/85‚Modified‚KEYBRD.AG,�OUTCHS.SA,�POUTCHS.SA,�and.*šEDITMODE.SA‚to�use�the�BELL�in�the�keyboard.?*�10/10/84‚There�was�a�problem�if�any�other�board�in�the�system0*šis�configured�to�use�the�same�interrupt�level,-*šbecause�GET_CHAR�assumes�that�the�interrupt*šis�always�for�him.,*šFixed�GET_CHAR�to�send�back�both�Z�bit�and)*šV�bit�set�if�the�interrupt�is�not�ours,+*šso�that�IN_CHAR�will�pass�it�along�to�the1*šmain�interrupt�handler,�and�we�will�then�return4*što�CMR�with�the�carry�bit�cleared�to�indicate�that *šthe�interrupt�is�not�ours.†bwn;*‘2/�9/84‚Fixed�problem�with�READ�TERMINATOR�initialization*šin�subroutine�SETUP.6*‘7/19/83‚Changed�RESET�command�sent�to�OUTCHS�to�$F7.**‘6/�3/83‚Initial�writing�by�Steve�Franck.**‰RMS68K�routines�used: *�TR0$.RQPA *�TR0$.QEVENT*�TR0$.QEVENTI *�TR0$.LOGPHY *�TR0$.KILLER *�TR0$.GETTCB**‰Other�notes:6*�Currently�this�code�is�neither�ROMable�nor�position-*’independent.'*�Assemble�using�chain�file�TERMDRV.AF.*J**************************************************************************J**************************************************************************J**************************************************************************J**************************************************************************‰PAGE*F*‚To�assemble�this�code�for�its�proper�target�environment,�change�thisééA*‚equate,�which�will�serve�as�a�switch�in�conditional�assemblies.2*‚Valid�values�for�the�switch�are:‚'7201',�'EX/S'.(*‚FOR�NOW,�THIS�SWITCH�MUST�BE�'EX/S'!!!*ENVIRONMENT EQU 'EX/S' * *‚XDEF's.*8ŠXDEFƒGOT_CHAR‹Entry�point�for�driver�to�receive�a�char.7ŠXDEFƒCHECK_WORK‰Background�exec's�entry�point�to�check*§for�more�work. * *‚XREF's.*=ŠXREFƒSTOP_IT,UNSTOP…Device-specific�routines�to�stop�further&*§traffic�from�the�device�and�to�allow *§it�again. ‰IFEQ†ENVIRONMENT-'EX/S'"*§Subroutines�for�initializing�and'*§controlling�VME/10�keyboard�&�screen."ŠXREFƒINIT_KEYBOARD,IN_CHAR,OUTCHS‰ENDC  **‚Equate�files�included:**‰EQUSTR*‰EQUTCB*‰EQUCCB*‰VMES10.IOE.SA*‰NIO*‰LV5&*‰NEC7201‚only�if�ENVIRONMENT�=�'7201'*‰VMES10.TERMDRV.EQ*ŠNOLISTŠINCLUDE�9995.&.STR.EQŠNOLISTŠINCLUDE�9995.&.TCB.EQŠINCLUDE�9995.&.CCB.EQŠINCLUDE�9995.&.IOE.EQŠINCLUDE�9995.&.NIO.EQŠINCLUDE�9995.&.LV5.EQŠLISTŠPAGEO*********************************************************************************‰NOTES�ON�CODING�STANDARDS*O******************************************************************************* G*‚Because�this�is�an�I/O�driver,�speed�is�of�the�utmost�importance,�andG*‚as�a�result�tradeoffs�were�made�decreasing�the�straightforwardness�ofL*‚the�code�in�favor�of�less�time�spent�processing�interrupts.‚In�particular,F*‚the�interrupt�service�portion�of�this�driver�is�not�at�all�modular--H*‚some�'routines'�have�multiple�entry�and�exit�points,�and�return�is�not*‚always�to�the�caller.*G*‚One�visual�aid�used�which�may�save�you�some�work�is�the�use�of�labelsD*‚in�executable�code.‚Consider�the�following�sample�program�segment:*.*‰LABEL1:˜label�alone�on�line,�followed�by�':'*‘MOVE.B�......7*‰LABEL2:�ADD.B‚......Šlabel�not�alone,�followed�by�':'-*‰LABEL3‚CMP.B‚......Šlabel�not�alone,�no�':'*F*‚Each�way�of�writing�the�label�has�its�own�significance.‚LABEL1�marks C*‚the�beginning�of�a�logical�module,�and�nothing�falls�into�LABEL1.G*‚LABEL2�is�a�label�branched�to�from�outside�the�logical�module.‚LABEL3F*‚is�a�'local'�label,�branched�to�only�from�within�the�logical�module.  >*‚For�each�subroutine,�register�usage�is�specified�as�follows:**‰Entry:�A5�=�address�of�CCB**‰Exit:‚A0�=�garbage"*�A1�=�address�of�our�side�of�7201*G*‚The�entry�conditions�specify�only�the�REQUIREMENTS�of�the�routine.‚InI*‚other�words,�a�register�may�be�known�to�contain�a�particular�value,�butI*‚if�it�is�not�used�by�a�routine,�it�is�not�listed�as�an�entry�condition.J*‚The�exit�conditions�list�only�those�registers�which�CHANGE.‚In�the�aboveH*‚example,�the�fact�that�A5�is�not�listed�as�an�exit�condition�indicates"*‚that�it�still�points�to�the�CCB.*J*‚If�a�module�does�not�represent�a�subroutine�(that�is,�will�not�return�toK*‚the�code�it�was�entered�from),�the�exit�conditions�for�the�registers�will*‚not�be�specified.ŠPAGEO******************************************************************************** *‰EQUATES*O******************************************************************************* *,* EQUATES FOR SOME SPECIAL ASCII CHARACTERS.*'NUL†EQU‡$00‡Null�char.‚Usually�ignored..BEL†EQU‡$07‡Bell�char.‚Rings�bell�on�terminal.BS‡EQU‡$08‡Backspace�char.6LF‡EQU‡$0A‡Line�feed�char.‚Causes�cursor�to�move�down.=CR‡EQU‡$0D†Carriage�return�char.‚Moves�cursor�to�left�margin.SPACE„EQU‡$20‡Space�char.$L_ARROW‚EQU‡$3C‡Left‚arrow�char�'<'.%R_ARROW‚EQU‡$3E‡Right�arrow�char�'>'.#BKSLASH‚EQU‡$5C‡Backslash�char�'\'.'CARET„EQU‡$5E‡Uparrow�(caret)�char�'^'.8DEL†EQU‡$7F‡Delete�char�(also�called�'rubout').‚Like�BS. $HI_CTLƒEQU‡$1F‡Highest�control�char. IBS_SP_BS�EQU�BS<<24+SPACE<<16+BS<<8‚Backspace,�space,�backspace�all�left-*§justified�in�32�bits. *?*‚Masks�delineating�all�recognized�(REC)�and�unrecognized�(UNR)(*‚attributes�(ATT)�and�parameters�(PAR).*‰IFEQ†ENVIRONMENT-'EX/S'BREC_ATTƒEQU„%1000001111000001‚1�bits�represent�defined�attributes.CUNR_ATTƒEQU„$FFFF-REC_ATT†The�1's�complement�of�that�are�undefined. BREC_PARƒEQU„%0111011111111111‚1�bits�represent�defined�parameters.CUNR_PARƒEQU„$FFFF-REC_PAR†The�1's�complement�of�that�are�undefined.‰ENDC ŠPAGE**‚Miscellaneous�equates.* *IOEVCD„EQU„1’Event�code�we�will�use�(I/O). ;BRK_LENƒEQU„300�#�of�milliseconds�to�maintain�break�signal. *I*‚This�is�a�semi-arbitrary�value�that�can�be�written�out�to�a�register�onH*‚some�device�and�then�read�back,�in�order�to�test�(in�a�very�small�way)C*‚the�device's�health.‚On�the�7201,�for�example,�this�is�written�to*‚the�vector�register�(2B).*TEST_VAL‚EQU„$17ŠPAGEK*****************************************************************************‰EQUATES�FOR�TRANSPARENT�MODE*K*************************************************************************** *F*‚Equates�describing�the�part�of�the�CSB�used�when�setting�TRANSPARENTH*‚MODE.‚We�pass�the�driver�the�address�of�our�branch�table�and�he�passesI*‚us�back�the�address�of�his�branch�table,�the�value�we�should�have�in�A5G*‚when�we�call�him,�and�the�SR�that�we�should�use.‚Actually,�we�may�useG*‚a�different�SR�as�long�as�the�supervisor�bit�is�set�and�the�interrupt9*‚level�is�not�lower�than�the�one�in�the�SR�he�passes�us.*7ŠOFFSET�IOSTTM�This�stuff�will�be�in�the�CSB�at�IOSTTM.9IOSTMU„DS.Bƒ4’Here�the�user�will�store,�before�making�the&*§CHANGE�DEFAULTS�call,�the�address�of*§his�table�of�branches. 7ŠOFFSET�IOSTTM�This�stuff�will�be�in�the�CSB�at�IOSTTM.9IOSTMD„DS.Bƒ4’the�addr�of�the�driver's�table�of�branches;/IOSTMA„DS.Bƒ4’the�value�the�driver�wants�in�A5;5IOSTMS„DS.Bƒ2’the�SR�with�the�MINIMUM�interrupt�level*§set. 5ŠOFFSET�0ŽThis�defines�the�user's�TM�interface�table.*£We�JSR�to�this�entry�when:#TM_RCA„DS.Bƒ4’...we�receive�a�char.7TM_TBE„DS.Bƒ4’...we�become�capable�of�another�transmit.2TM_BRK_RECV�DS.B�4’...we�detect�an�incoming�break. �