ain@j.cc.purdue.edu (Patrick White) (11/30/87)
Program Name: AUX handler Submitted By: Bill Koester CATS (cbmvax!bill@rutgers.edu) written by Steve Drew Summary: The AUX: handler off of fish dish 79 Poster Boy: Pat White (ain@j.cc.purdue.edu) Untested. NOTES: Written by Steve Drew, but sent to us from Fish Disk #79 by Bill Koester. Didn't bother testign it as it has probably been tested. -- Pat White (co-moderator comp.sources/binaries.amiga) UUCP: k.cc.purdue.edu!ain BITNET: PATWHITE@PURCCVM PHONE: (317) 743-8421 U.S. Mail: 320 Brown St. apt. 406, West Lafayette, IN 47906 ---------------------------------------- This is the Aux-handler from fish disk #79 # This is a shell archive. # Remove everything above and including the cut line. # Then run the rest of the file through sh. #----cut here-----cut here-----cut here-----cut here----# #!/bin/sh # shar: Shell Archiver # Run the following text with /bin/sh to create: # aux-handler.uue # aux-handler.uue.orig # aux.sh # This archive created: Thu Mar 20 23:08:52 1980 echo shar: extracting aux-handler.uue sed 's/^XX//' << \SHAR_EOF > aux-handler.uue XXbegin 777 aux-handler XXM```#\P`````````#``````````(```0I````&0````$```/I```$*4[Z#4).` XXM50``(&T`""\H`!`B;0`(+RD`#"\M``PO+0`(80A/[P`03EU.=4Y5__@@;0`(L XXM(6T`$``,(&T`""%M`!0`$"!M``@K:``$__@@;0`(*U#__"!M``@@+0`,T+P`9 XXM``!<(4``!"!M__PA;0`(``H@;?_\0I`@;?_\0J@`!"\M__PO+?_X3KH/OE!/7 XXM3EU.=4Y5__@@+0`(T+P```!<*T#__"\M__Q.N@_L6$\O+?_\3KH/7%A/*T#_' XXM^"!M__@@*``*3EU.=4Y5_LA!^@3>*TC__"M\`````?_@0JW_T$*G3KH._%A/7 XXM*T#_^"\M__A.NO^@6$\K0/_T(&W_]"`H`!SE@"M`_^P@;?_L("W_^-"\````( XXM7"%```@@+?_XT+P```!<*T#_Y"!M__0O*``02'C__R\M__@O+?_T3KK^[D_OX XXM`!!"K(`H0JR`+$*L@#!"K(`@2JW_X&<`!$9*K?_09P``Z"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M__0O*0`83KH&#%!/(&W_]")M__0C:``<``PO+?_XM XXM+RW_]$ZZ^Y103V```20K;?_T__`([``$@"L@;(`80J@`("!M__`B;(`8(V@`" XXM%``D+RR`&$ZZ"\!83R\M__@O+?_P2&W^T$ZZ`FQ/[P`,8```X"!M__1*J``4, XXM9PX([``"@"L(K```@"M@#`BL``*`*PCL``"`*TZZ`CP@;?_T+R@`$$AX__\O[ XXM+?_X+RW_]$ZZ^S!/[P`08```F%.M_]!F#$*M_^!.N@?$3KH'6B!M__0@+(`@C XXML*@`%&8$0JR`("!M__0O*``02'C__R\M__@O+?_T3KKZ[$_O`!!@5$AX`-%"N XXMIR\M__@O+?_T3KKZU$_O`!!@/)"\````%&<`_Q*0O````#YG`/ZN6X!G`/[,* XXMD+P```.+9P#_/)"\````"V<`_-A3@&<`_/)3@&<`_VY@K&``^[8@;?_L0J@`< XXM"$Y=3G5697(@,2XP("AC*2!3=&5V92!$<F5W(#$Y.#<`0558.D5.1$-,20!%4 XXM3D1#3$D*``!.5?_P*WP````!__!(>``(2'H`]"\M``A.N@?Z3^\`#$J`9P1.5 XXM74YU("T`"%"`*T#__$JM__!G``#**VW__/_X8`12K?_\(&W__$H09PHB;?_\' XXM#!$`+V;J(&W__$H09@1"K?_P(&W__$(0("W_^%2`*T``""!M__RQ[0`(8WP@8 XXM;?_X$!!(@$C`8"0K?`````'_]&`P*WP````"__1@)BM\````!/_T8!Q"K?_TA XXM8!:0O````$-GWE6`9]"0O`````UGW&#D(&T`"`P0`$]F+"!M``@,*`!.``%F& XXM"B`M__2!K(`H8!8@;0`(#"@`1@`!9@H@+?_T1H#!K(`H4JW__&``_S)@`/\@Z XXM0558.E-%5"\``$Y5```@;(`0(7P````!`"0@;(`0,7P``@`<0>R`#B)L@!`CG XXM2``H+RR`$$ZZ"4I83TY=3G5.5?_X0JW_^$JL@#!G"`@L``*`*V8(2JR`+&<`X XXM`4@(+``$@"MG3@BL``2`*R!M``PA?/____\`#"\L@!A.N@;,6$\O+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XM_I@B;P`$+&R`)$[N_C(B;P`$("\`""QL@"1.[OZ\("\`!"QL@"1.[O["(F\`- XXM!"QL@"1.[OXF3OH``B!O``0L;(`D3N[^@````^P````!`````0``#;@`````I XX@```#\@```^H````!`!0``````_(```/K`````0```_(!1 XX`` XXend SHAR_EOF if test 6124 -ne "`wc -c aux-handler.uue`" then echo shar: error transmitting aux-handler.uue '(should have been 6124 characters)' fi echo shar: extracting aux-handler.uue.orig sed 's/^XX//' << \SHAR_EOF > aux-handler.uue.orig XXbegin 777 aux-handler XXM #\P # ( 2< 0 !@ /I $G$[Z#K!. XXM50 (&T ""\H ! B;0 (+RD #"\M PO+0 (80A/[P 03EU.=4Y5__@@;0 ( XXM(6T $ ,(&T ""%M !0 $"!M @K: $__@@;0 (*U#__"!M @@+0 ,T+P XXM !<(4 !"!M__PA;0 ( H@;?_\0I @;?_\0J@ !"\M__PO+?_X3KD !(" XXM4$].74YU3E7_^" M C0O %PK0/_\+RW__$ZY 27%A/+RW__$ZY 1 XXMQ%A/*T#_^"!M__@@* *3EU.=4Y5_LA!^@5$*TC__"M\ ?_@0JW_T$*G XXM3KD !&*6$\K0/_X+RW_^$ZY DEA/*T#_]"!M__0@* <Y8 K0/_L(&W_ XXM[" M__C0O %PA0 (("W_^-"\ 7"M _^0@;?_T+R@ $$AX__\O+?_X XXM+RW_]$ZY *D_O !!"N0 ")"N0 "9"N0 "I"N0 !I*K?_@9P $ XXMGDJM_]!G $ (&W_Y' $"@ #W(!X:$B>0 HL:0 .= 4+@ /=@'EHX*# XXM+'D 6=@ 6+@ /= 'GHH*"+P%.N0 $D!83RM _LP@>0 !9P ! H ]R XXM >&APJW^S&<N+SD 23KD !).6$\(N0 $ )2!M__!"J ,+RW_^"\M XXM__!.N0 103R!Y "B)H YP ! I ]R >&APJW^S&<P+SD *3KD XXM ^P6$]*@&<>2&W^T$ZZ!Q!83R\M__@O+?_P2&W^T$ZZ!5Q/[P ,(&W_Y' XXM$"@ #W(!X:'"K?[,9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XM C__PPM /__V8>0BW__TJY &F<22'@0 "\Y &DZY 2+E!/"#D XXM @ "5F $4$"W__TB 2,!@ #40BW__TJY &F<22'@@ "\Y &DZY XXM 2+E!/8 YG &T#__TB 2, CP "I2N0 "9@ #,"#D 0 "5G XXM!AM\ K__V +@(.0 ! )6<$0BW__V *9*N0 "IG)B!M C1^0 XXM "H,* *__]G%%.Y *DAX -(>@$J3KH!+E!/0BW__V!P2KD J9R@@ XXM;0 (T?D J#"@ "O__9Q93N0 "I(> #2'H ^DZZ /I03V#00BW__V Z XXM0BW__V T68!G /\J68!GAE6 9P#_<%> 9P#_5E& 9ZI7@&>F5X!GV%. 9P#_ XXM*I"\ 8V< _V!@R@@Y E9RP(.0 ! )6<2#"T "O__9@I(> - XXM3KH Z%A/$"W__TB 2, O $ZZ -A83PPM K__V8&4KD F#+D #^ XXM*FTX"/D !0 "5*N0 "9F)@@Y ( E9AQ2N0 "8@.0 "I2N0 XXM "H@;0 ($;P "@@ 8 1.NOPV2BW__V<6(#D J4KD J(&T "!&M__\( XXM $Y=3G4(( @ "" ( $Y5__I"K?_\0JW__& Z("W__"!M @;< @ __L,+0 * XXM__MF$@@Y $ E9PA(> -82)83Q M__M(@$C +P!A%%A/4JW__" M__RP XXMK0 ,;;Q.74YU3E4 $HM MG*B!Y #B%\ 0 D0>T "R)Y #B-( XXM "@O.0 Y.N0 $7)83TY=3G5.5?_T(_P # (DAY $ 4AX %). XXMN0 $5Q03R/ "F8&< !.74YU2'D 0 !2'@ 4DZY 17%!/(\ . XXM9A9(> !2+SD *3KD !&>4$]P &#,0J="ITZY /S%!/('D *(4 XXM#D*G+SD *0J=(>@$P3KD !'J3^\ $$J 9SP@>0 HO* .3KD !!D XXM6$](> !2+SD .3KD !&>4$](> !2+SD *3KD !&>4$]P & _V K XXM>0 K_^"MY #O_\0JW_]& 6(&W_^%*M__@B;?_\4JW__!*04JW_] RM XXM 4O_T9>!"IT*G3KD _,4$\@>0 XA0 .('D .,7P P <0J=" XXM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\ ""5\____ XXM_P 4< 0*@ /+P!.N0 $;983TAX "(O"DZY 1GE!/3-\$#$Y=3G4B;P $ XXM+'D >3N[^GB O 0L>0 !Y.[OZV3E4 $CG,"!*K0 (9@IP $S?! Q. XXM74YU2'D 0 !+RT #$ZY 17%!/)$!*@&8$< !@W!5\ 4 "#5M X $B5M XXM @ #B *8,9.50 2.<P("1M @@"F8(3-\$#$Y=3G45? #_ @E?/____\ XXM%"5\_____P 8< P*@ 2+P O"DZY 1GE!/8,Y.^0 $6),[P # 0L>0 XXM !Y.[O\Z2.<# ")O PL>0 !Y.KOXX3-\ P$YU3OD !&0(F\ !"QY XXM'D[N_MI.^0 $:0B;P $("\ ""QY 'D[N_RX@+P $+'D >3N[^L$[Y XXM 1RB!O 0L>0 !Y.[OZ,(&\ !""(6)!"J $(4@ "$YU(&\ !$SO @$ XXM""(O ! L>0 !Y.[OY$3.\# $+'D >3N[^DB)O 0L>0 !Y.[OZ8 XXM(F\ !"QY 'D[N_C(B;P $("\ ""QY 'D[N_KP@+P $+'D >3N[^ XXMPB)O 0L>0 !Y.[OXF3OD !)B(&\ !"QY 'D[N_H /L @ XXM $ ZV /,@ $X B *H "V Z /@ %& ! XXML =@ 'X "( F( )Z "J M0 ,& #* U8 -X XXM #F@ [8 /B $7@ !+X 3X %7 !:8 7 &8 !Y0 XXM ?H ']@ "! @@ (^ "38 E, )>@ "; O6 +^@ XXM#!H PT ,1 #&0 Q\ ,C@ #* SH -"@ #20 U$ - XXMP@ #= WB -] #@( X4 .)@ #E YB .> #QP _: XXM 0 $! ! X 03 $%H !!Z 0F $*8 !#T 15 $5X XXM !&, 1H $<8 !)> E ( %0 !5@ 5P %B !A@ XXM 9P &\ !T@ >( ( "&@ I( .& #P !! 0V $ XXM= !-( 38 $Y@ !/( 4D %+ !38 4^ %@ !8P <J XXM '1 !V0 =R '?@ !X0 >. 'J ![( >Z 'Q@ !] XXM ?B '\ !_X @N (.@ "$( A* (4@ "%@ B8 (L@ XXM",P C4 (W@ ".0 D& )$ "1H E& )5 "6@ ET ) XXMA "9X FJ )Q@ "<P G8 )[ "?P H( *%@ "C H\ XXM *2@ "J( JL *W@ "N@ KR *^ "P( L* +$ "Q8 XXM LR +. "WH NT +Q@ "] OJ , @ #"( PN ,3 XXM#%@ QR ,B #)H RN ,M@ #/ SZ -$@ #1X TL - XXM-@ #5( U> -: #7P VT -O #<H W8 -[@ #?P X* XXM .( #C8 X^ .2@ #EP YJ .<@ #KP [4 .W@ #P@ XXM ^H /M@ #\0 !"Z 0R $6H !%\ 1E@ $:X !&\ 1T XXM$?H !(* 2& $B8 !(X 21@ $E0 !)H _( /J XX5 0 4 /R #ZP !@ /R XX XXend SHAR_EOF if test 7932 -ne "`wc -c aux-handler.uue.orig`" then echo shar: error transmitting aux-handler.uue.orig '(should have been 7932 characters)' fi echo shar: extracting aux.sh sed 's/^XX//' << \SHAR_EOF > aux.sh XX# This is a shell archive. XX# Remove everything above and including the cut line. XX# Then run the rest of the file through sh. XX#----cut here-----cut here-----cut here-----cut here----# XX#!/bin/sh XX# shar: Shell Archiver XX# Run the following text with /bin/sh to create: XX# aux.doc XX# makefile.orig XX# mountlist XX# myaux.c.orig XX# NewChanges XX# README.fnf XX# POSTER XX# myaux.c XX# misc.c XX# makefile XX# This archive created: Thu Mar 20 23:04:04 1980 XXecho shar: extracting aux.doc XXsed 's/^XX//' << \SHAR_EOF > aux.doc XXXX XXXX Aux-Handler V1.0 (c) Steve Drew 1987 XXXX ---------------- XXXX XXXXI. Desciption: XXXX XXXX - Installs as a dos handler to control the serial port as a console. XXXX - Support all relevent dos packets including WaitForChar and XXXX ACTION_SCREEN_MODE. XXXX - To your process it looks just like a CON: handler, screening XXXX control chars doing CRLF translations and handling deletes ect... XXXX - Can be made into a RAW console via ACTION_SCREEN_MODE, it then XXXX acts like a RAW console which does not echo characters or handle XXXX control chars, but just passes all keys entered back to the process. XXXX This would allow you to implement a ANSI style screen editor like XXXX maybe MicroEMACS 3.x to work through AUX:. Now thats a multiuser XXXX system! XXXX XXXXII. Installation: XXXX XXXX 1. Insert the included MOUNTLIST file into you DEVS:MOUNTLST XXXX XXXX 2. Copy the Aux-Handler to the l: directory XXXX XXXX 3. Enter Mount AUX: to load the driver. XXXX XXXX XXXXIII Using XXXX XXXX - 'NEWCLI AUX:' will start a cli on the Serial port. XXXX XXXX - <BS> <DEL> both delete last char typed. XXXX XXXX - ^X or ^U delete entire line. XXXX XXXX - ^S / ^Q stop/start screen display (if XON/XOFF selected under prefs.) XXXX XXXXIV Notes: XXXX XXXX - Setups': XXXX The Aux-Handler opens the serial port with its current XXXX settings (as set up in preferences). XXXX However you may specify if you want ECHO, CRLF, or XXXX RAW Mode on/off via specifiying keyword 'Set': XXXX Newcli AUX:Set/E:[On/Off]/C:[On/Off]/R:[On/Off] XXXX for example to set Raw off, Echo off and CRLF on. XXXX Newcli AUX:Set/e:off/c:on/r:off XXXX XXXX Case is insensitive. The default if any parameters XXXX not specified is: XXXX Echo ON, Raw Off, CRLF ON. XXXX XXXX - Killing A CLI: XXXX Normally you just do a ENDCLI. However if you had XXXX some one in over a modem or fired it up by mistake XXXX you can force an ENDCLI command to be sent to the XXXX process by doing a 'ECHO >AUX:ENDCLI' from another XXXX CLI. XXXX XXSHAR_EOF XXif test 1913 -ne "`wc -c aux.doc`" XXthen XXecho shar: error transmitting aux.doc '(should have been 1913 characters)' XXfi XXecho shar: extracting makefile.orig XXsed 's/^XX//' << \SHAR_EOF > makefile.orig XXXX######################################################################### XXXX# XXXX# Aux-Handler Makefile XXXX# V 1.0 (c) Steve Drew 1987 XXXX# For Manx 3.40a XXXX# XXXX######################################################################### XXXX XXXX XXXXaux-handler : misc.o myaux.o XXXX ln -o aux-handler misc.o myaux.o -lcl32 XXXX XXXXmisc.o : misc.c XXXX cc +C +D +L +Hmyaux.syms misc.c XXXX XXXXmyaux.o : myaux.c XXXX cc +C +D +L +Imyaux.syms myaux.c XXXX XXSHAR_EOF XXif test 401 -ne "`wc -c makefile.orig`" XXthen XXecho shar: error transmitting makefile.orig '(should have been 401 characters)' XXfi XXecho shar: extracting mountlist XXsed 's/^XX//' << \SHAR_EOF > mountlist XXXX XXXX/* XXXX Installs Aux-Handler V 1.0 (C) Steve Drew XXXX*/ XXXX XXXXAUX: Handler = L:Aux-Handler XXXX Stacksize = 4000 XXXX Priority = 5 XXXX GlobVec = 1 XXXX# XXSHAR_EOF XXif test 162 -ne "`wc -c mountlist`" XXthen XXecho shar: error transmitting mountlist '(should have been 162 characters)' XXfi XXecho shar: extracting myaux.c.orig XXsed 's/^XX//' << \SHAR_EOF > myaux.c.orig XXXX/**************************************************************************** XXXX * XXXX * Aux Driver V1.0 (c)CopyRight 1987, Steve Drew. All Rights Reserved. XXXX * XXXX * Aux-Handler Ver. 1.0 1-May-1987 XXXX * XXXX * Steve Drew XXXX * 52-Castledale Cres. N.E. XXXX * Calgary, Ab. Canada. XXXX * XXXX * |You may freely distribute this source as long as | XXXX * |the Copyright notice is left intact. | XXXX ***************************************************************************/ XXXX XXXX XXXX#include <devices/serial.h> XXXX#include <devices/timer.h> XXXX XXXX XXXXtypedef unsigned char u_char; XXXX XXXX#undef BADDR XXXX#define BADDR(x) ((APTR)((long)x << 2)) XXXX XXXX#define ACTION_FINDINPUT 1005L XXXX#define ACTION_FINDOUTPUT 1006L XXXX#define ACTION_END 1007L XXXX#define ACTION_SCREEN_MODE 994L XXXX XXXX#define DOS_FALSE 0L XXXX#define DOS_TRUE -1L XXXX XXXX#define AUX_ECHO 1 XXXX#define AUX_CRLF 2 XXXX#define AUX_RAW 4 XXXX#define AUX_RPEND 8 XXXX#define AUX_WAIT_FOR 16 XXXX#define AUX_TYPEAHEAD_FULL 32 XXXX#define AUXBUFSIZE 256 /* Same as CON: handler */ XXXX#define MAXLINESIZE 254 /* save two for \n'\0' */ XXXX XXXX XXXX#define MYPORT_SIG (1L << myport->mp_SigBit) XXXX#define READSER_SIG (1L << ReadSER->IOSer.io_Message.mn_ReplyPort->mp_SigBit) XXXX#define TIMER_SIG (1L << Timer_Port->mp_SigBit) XXXX XXXX/* extern long AbsExecBase; */ XXXX XXXX/* My Globals */ XXXX XXXX XXXXstruct IOExtSer *ReadSER; XXXXstruct IOExtSer *WriteSER; XXXXstruct timerequest *Timer; XXXXstruct MsgPort *Timer_Port; XXXXstruct Task *reader; XXXXlong SysBase; XXXXint aux_stat, XXXX aux_avail, XXXX in_len; XXXXu_char in_c; XXXX XXXX_main() XXXX{ XXXX XXXX extern void returnpkt(); /* sends back the packet */ XXXX extern void returnpktplain(); /* use args in Res1 */ XXXX extern struct DosPacket *taskwait(); XXXX XXXX char *version = "Ver 1.0 (c) Steve Drew 1987"; XXXX struct Process *myproc; /* my process */ XXXX struct DosPacket *mypkt; /* a pointer to the dos packet */ XXXX struct DosPacket *rdpkt; XXXX struct DeviceNode *mynode; /* our device node (parmpkt Arg3) */ XXXX struct FileHandle *fh; /* a pointer to our file handle */ XXXX struct MsgPort *myport; XXXX long run = TRUE; /* handler main loop flag */ XXXX u_char *ptr; /* ptr for name translation */ XXXX char *name,*s; /* ptr to name for open */ XXXX int aux_open = 0; /* aux open count */ XXXX char auxbuf[AUXBUFSIZE];/* Our type ahead buffer */ XXXX long signals; /* signals that occurred in Wait */ XXXX XXXX XXXX /* Initializing the handler */ XXXX XXXX myproc = (struct Process *)FindTask(0L); XXXX mypkt = taskwait(myproc); /* Wait for my startup message */ XXXX XXXX /* I don't need the name or extra info passed in Arg1/2 */ XXXX XXXX mynode = (struct DeviceNode *)BADDR(mypkt->dp_Arg3); XXXX mynode->dn_Task = &myproc->pr_MsgPort; XXXX myport = &myproc->pr_MsgPort; XXXX returnpkt(mypkt, myproc, DOS_TRUE, mypkt->dp_Res2); XXXX XXXX in_len = aux_avail = aux_stat = 0; XXXX reader = (struct Task *) 0; XXXX XXXX XXXX /* done initial stuff, now for some work */ XXXX XXXX while(run) { XXXX XXXX if (aux_open) { /* then wait for read char or new action */ XXXX XXXX signals = Wait( MYPORT_SIG | READSER_SIG | TIMER_SIG ); XXXX XXXX if (signals & TIMER_SIG) { XXXX WaitIO(Timer); XXXX aux_stat &= ~AUX_WAIT_FOR; XXXX rdpkt->dp_Res1 = DOS_FALSE; XXXX returnpktplain(rdpkt,myproc); XXXX } XXXX if ((signals & READSER_SIG) && CheckIO(ReadSER)) { XXXX read_ser(auxbuf); XXXX chk_pend(auxbuf,rdpkt,myproc); XXXX } XXXX if (signals & MYPORT_SIG) { XXXX mypkt = taskwait(myproc); XXXX } XXXX else /* no new dospackets */ XXXX continue; XXXX } XXXX else /* only port at the moment is myport */ XXXX mypkt = taskwait(myproc); XXXX XXXX switch(mypkt->dp_Type) { /* find what action to perform */ XXXX XXXX case ACTION_FINDINPUT: XXXX XXXX if (reader) { /* Have I already got a someone reading */ XXXX returnpkt(mypkt, myproc, DOS_FALSE, ERROR_OBJECT_IN_USE); XXXX break; XXXX } XXXX XXXX case ACTION_FINDOUTPUT: XXXX XXXX /* XXXX I allow for multiple writers. But doesn't make sense XXXX to allow for mutilple readers. XXXX */ XXXX if (!aux_open) { /* first time here we open the devices */ XXXX if ((aux_open = open_stuff()) == 0) { XXXX returnpkt(mypkt, myproc, DOS_FALSE, ERROR_OBJECT_IN_USE); XXXX break; XXXX } XXXX } XXXX else XXXX aux_open++; XXXX XXXX /* get file name and Upper case it */ XXXX ptr = (u_char *)BADDR(mypkt->dp_Arg3); XXXX name = AllocMem((long)*ptr + 1, MEMF_PUBLIC); XXXX movmem(ptr+1, name, *ptr); XXXX name[*ptr] = '\0'; XXXX for (s = name; *s; ++s) *s = toupper(*s); XXXX XXXX XXXX /* XXXX This is a Hack to allow a bail out of a NEWCLI XXXX that is using the AUX. By doing say an echo >AUX:ENDCLI XXXX from another process the reader (being the NEWCLI) XXXX will be sent a ENDCLI command. XXXX */ XXXX XXXX if (!strcmp(name,"AUX:ENDCLI") && (aux_stat & AUX_RPEND)) { XXXX strcpy(rdpkt->dp_Arg2,"ENDCLI\n"); XXXX rdpkt->dp_Res1 = 7L; XXXX returnpktplain(rdpkt, myproc); XXXX aux_stat &= ~AUX_RPEND; XXXX } XXXX else XXXX chk_params(name); XXXX XXXX FreeMem(name, (long)*ptr +1); XXXX fh = (struct FileHandle *)BADDR(mypkt->dp_Arg1); XXXX fh->fh_Arg1 = DOS_TRUE; XXXX fh->fh_Port = (struct MsgPort *)DOS_TRUE; XXXX XXXX if (!reader && (mypkt->dp_Type == ACTION_FINDINPUT)) { XXXX struct MsgPort *port; XXXX XXXX port = mypkt->dp_Port; XXXX reader = port->mp_SigTask; XXXX fh->fh_Arg1 = (long)port->mp_SigTask; XXXX } XXXX XXXX returnpkt(mypkt, myproc, DOS_TRUE, mypkt->dp_Res2); XXXX break; XXXX XXXX case ACTION_READ: XXXX XXXX rdpkt = mypkt; XXXX aux_stat |= AUX_RPEND; XXXX chk_pend(auxbuf,rdpkt,myproc); XXXX XXXX break; XXXX XXXX case ACTION_WRITE: XXXX XXXX write_ser(mypkt->dp_Arg2,(int)mypkt->dp_Arg3); XXXX mypkt->dp_Res1 = mypkt->dp_Arg3; /* tell em we wrote them all */ XXXX XXXX returnpktplain(mypkt, myproc); XXXX break; XXXX XXXX case ACTION_WAIT_CHAR: XXXX XXXX /* just queue up to wait for data */ XXXX XXXX rdpkt = mypkt; XXXX aux_stat |= AUX_WAIT_FOR; XXXX Timer->tr_time.tv_secs = 0L; XXXX Timer->tr_time.tv_micro = rdpkt->dp_Arg1; XXXX SendIO(Timer); XXXX chk_pend(auxbuf,rdpkt,myproc); XXXX break; XXXX XXXX case ACTION_SCREEN_MODE: XXXX XXXX if (mypkt->dp_Arg1) { XXXX aux_stat |= AUX_RAW; XXXX aux_stat &= ~AUX_ECHO; XXXX } XXXX else { XXXX aux_stat &= ~AUX_RAW; XXXX aux_stat |= AUX_ECHO; XXXX } XXXX chk_pend(); XXXX returnpkt(mypkt, myproc, DOS_TRUE, mypkt->dp_Res2); XXXX break; XXXX XXXX case ACTION_END: XXXX XXXX if (--aux_open == 0) { XXXX run = 0; XXXX close_timer(); XXXX close_ser(); XXXX } XXXX if (mypkt->dp_Arg1 == (long)reader) reader = (struct Task *) 0; XXXX returnpkt(mypkt, myproc, DOS_TRUE, mypkt->dp_Res2); XXXX break; XXXX XXXX default: XXXX XXXX returnpkt(mypkt, myproc, DOS_FALSE, ERROR_ACTION_NOT_KNOWN); XXXX break; XXXX } XXXX } /* end while */ XXXX mynode->dn_Task = FALSE; XXXX} XXXX XXXX XXXX/* XXXX Allows some flexibilty to control the port. XXXX Can dynamically change CRLF translation, XXXX Echo or RAW mode on/off. XXXX*/ XXXXchk_params(str) XXXXchar *str; XXXX{ XXXX char *ptr, *s; XXXX int param, i=1; XXXX XXXX if (strncmp(str,"AUX:SET/",8)) return; XXXX ptr = str + 8; XXXX while(i) { XXXX for (s = ptr; *ptr && *ptr != '/'; ++ptr); XXXX if (*ptr == '\0') i = 0; XXXX *ptr = '\0'; XXXX str = s+2; XXXX if (ptr > str) { XXXX switch (*s) { XXXX case 'E': XXXX param = AUX_ECHO; XXXX break; XXXX case 'C': XXXX param = AUX_CRLF; XXXX break; XXXX case 'R': XXXX param = AUX_RAW; XXXX break; XXXX default: XXXX param = 0; XXXX break; XXXX } XXXX if (*str == 'O') { XXXX if (*(str+1) == 'N') aux_stat |= param; XXXX else XXXX if (*(str+1) == 'F') aux_stat &= ~param; XXXX } XXXX } XXXX ++ptr; XXXX } XXXX} XXXX XXXX XXXX/* XXXX Start a asynchronous Read request XXXX*/ XXXXset_read() XXXX{ XXXX /* set up for a read */ XXXX ReadSER->IOSer.io_Length = 1L; XXXX ReadSER->IOSer.io_Command = CMD_READ; XXXX ReadSER->IOSer.io_Data = (APTR) &in_c; XXXX SendIO(ReadSER); XXXX} XXXX XXXX/* XXXX Check our buf to see if we have a line to return yet. Or if raw mode XXXX give 'em all we got. XXXX*/ XXXXchk_pend(buf,pkt,proc) XXXXchar *buf; XXXXstruct DosPacket *pkt; XXXXstruct Process *proc; XXXX{ XXXX extern void returnpktplain(); XXXX char *p; XXXX int i=0; XXXX XXXX if ((in_len && (aux_stat & AUX_RAW)) || aux_avail) { XXXX if (aux_stat & AUX_WAIT_FOR) { XXXX aux_stat &= ~AUX_WAIT_FOR; /* clear the wait_for */ XXXX pkt->dp_Res1 = DOS_TRUE; XXXX AbortIO(Timer); XXXX WaitIO(Timer); XXXX Wait (1L << Timer_Port->mp_SigBit); XXXX returnpktplain(pkt,proc); XXXX } XXXX else if (aux_stat & AUX_RPEND) { XXXX aux_stat &= ~AUX_RPEND; /* clear the pending read */ XXXX if (aux_stat & AUX_RAW) { XXXX aux_avail = 0; /* since we're sending all */ XXXX } XXXX else XXXX --aux_avail; XXXX XXXX /* if in_len is zero, then aux_avail must of been XXXX set up to force us here to reply with Res1 = 0; XXXX thus actually returning an EOF. XXXX */ XXXX if (in_len) { XXXX for (i = 1,p = (char *) pkt->dp_Arg2; XXXX ((p[i-1] = buf[i-1]) != 10 || (aux_stat & AUX_RAW)) && XXXX i < pkt->dp_Arg3 && i < in_len; ++i) ; XXXX XXXX /* reader asked for less than 256 chars but no cr XXXX was found. If not in raw mode then bump avail back XXXX up since we still have the remaining CR terminated XXXX line in buf[]. XXXX */ XXXX if (p[i-1] != 10 && !(aux_stat & AUX_RAW)) { XXXX ++aux_avail; XXXX } XXXX } XXXX in_len -= i; XXXX movmem(buf+i,buf,in_len); XXXX if (in_len < MAXLINESIZE - 1 && (aux_stat & AUX_TYPEAHEAD_FULL)) { XXXX aux_stat &= ~AUX_TYPEAHEAD_FULL; XXXX set_read(); /* start waiting for reads again */ XXXX } XXXX pkt->dp_Res1 = (long)i; XXXX returnpktplain(pkt,proc); XXXX } XXXX } XXXX} XXXX XXXX/* XXXX Only called here if there really is a character waiting to be read. XXXX*/ XXXXread_ser(buf) XXXXchar *buf; XXXX{ XXXX char c; XXXX XXXX WaitIO(ReadSER); XXXX c = in_c; XXXX XXXX if (c == 3) { /* ^C typed so immediately send the signal */ XXXX c = 0; XXXX if (reader) XXXX Signal(reader,SIGBREAKF_CTRL_C); XXXX } XXXX XXXX if (!(aux_stat & AUX_RAW)) switch(c) { XXXX case 4: /* ^D, send the signal if not in raw mode */ XXXX c = 0; XXXX if (reader) XXXX Signal(reader,SIGBREAKF_CTRL_D); XXXX break; XXXX case 28: /* ^\ so wipe out line and force EOF */ XXXX in_len = c = 0; XXXX ++aux_avail; XXXX break; XXXX case 13: /* CR convert to LF if CRLF turned on */ XXXX if (aux_stat & AUX_CRLF) c = 10; XXXX break; XXXX case 10: /* ignore these */ XXXX if (aux_stat & AUX_CRLF) c = 0; XXXX break; XXXX case 8: /* BS */ XXXX case 127: /* DEL */ XXXX if (in_len && buf[in_len-1] != 10) { XXXX --in_len; XXXX write_ser("\010 \010",3); XXXX } XXXX c = 0; XXXX break; XXXX case 24: /* ^X */ XXXX case 21: /* ^U */ XXXX while(in_len && buf[in_len-1] != 10) { XXXX --in_len; XXXX write_ser("\010 \010",3); XXXX } XXXX c = 0; XXXX break; XXXX case 27: /* <ESC> */ XXXX c = 0; XXXX default: XXXX break; XXXX } XXXX if (aux_stat & AUX_ECHO) { XXXX if ((aux_stat & AUX_CRLF) && c == 10) putc_ser(13); XXXX putc_ser(c); XXXX } XXXX if (c == 10) ++aux_avail; /* always done when CR received */ XXXX XXXX /* If our buffer is full then ignore any further input. (it XXXX will stack up in the serial.device buffer) If our buffer XXXX contains no CR's (unterminated) then add a newline. At XXXX this point the CON: driver would wait for the user to type XXXX a return while ignoring any other key strokes. XXXX In raw mode the buffer CAN be full and unterminated. Since XXXX when ever the reader asks for data we give him what ever XXXX we have so far. XXXX */ XXXX if (in_len >= MAXLINESIZE) { XXXX aux_stat |= AUX_TYPEAHEAD_FULL; XXXX if (!aux_avail && !(aux_stat & AUX_RAW)) { XXXX ++aux_avail; XXXX buf[in_len++] = 10; XXXX } XXXX } XXXX else XXXX set_read(); XXXX XXXX if (c) buf[in_len++] = c; XXXX} XXXX XXXX/* XXXX Write 'em out one by one converting to CR LF if enabled. XXXX*/ XXXXwrite_ser(buf,len) XXXXchar *buf; XXXXint len; XXXX{ XXXX int i=0; XXXX char c; XXXX XXXX for (i=0; i<len; i++) { XXXX c = buf[i]; XXXX if (c == 10 && (aux_stat & AUX_CRLF)) putc_ser(13); XXXX putc_ser(c); XXXX } XXXX} XXXX XXXX/* XXXX Perform Synchronous write. XXXX*/ XXXXputc_ser(c) XXXXchar c; XXXX{ XXXX if (c) { XXXX WriteSER->IOSer.io_Length = 1L; XXXX WriteSER->IOSer.io_Data = (APTR) &c; XXXX DoIO(WriteSER); XXXX } XXXX} XXXX XXXXopen_stuff() XXXX{ XXXXBYTE *c,*b; XXXXint i; XXXX XXXX aux_stat = AUX_ECHO | AUX_CRLF; /* set the default */ XXXX if ((ReadSER = (struct IOExtSer *) XXXX AllocMem((long)sizeof(*ReadSER),MEMF_PUBLIC|MEMF_CLEAR)) == NULL) XXXX return(0); XXXX if ((WriteSER = (struct IOExtSer *) XXXX AllocMem((long)sizeof(*WriteSER),MEMF_PUBLIC|MEMF_CLEAR)) == NULL) { XXXX FreeMem(ReadSER,(long)sizeof(*ReadSER)); XXXX return(0); XXXX } XXXX ReadSER->IOSer.io_Message.mn_ReplyPort = CreatePort(0,0); XXXX if (OpenDevice(SERIALNAME,NULL,ReadSER,NULL)) { XXXX DeletePort(ReadSER->IOSer.io_Message.mn_ReplyPort); XXXX FreeMem(WriteSER,(long)sizeof(*WriteSER)); XXXX FreeMem(ReadSER,(long)sizeof(*ReadSER)); XXXX return(0); XXXX } XXXX XXXX b = (BYTE *)ReadSER; XXXX c = (BYTE *)WriteSER; XXXX for (i=0;i<sizeof(struct IOExtSer);i++) *c++ = *b++; XXXX XXXX WriteSER->IOSer.io_Message.mn_ReplyPort = CreatePort(0,0); XXXX WriteSER->IOSer.io_Command = CMD_WRITE; XXXX XXXX /* Open Timer.device */ XXXX if (Timer_Port = CreatePort (NULL, NULL)) { XXXX if ((Timer = CreateExtIO (Timer_Port, (long) sizeof (*Timer)))) { XXXX if (!(OpenDevice (TIMERNAME, UNIT_VBLANK, Timer, 0L))) { XXXX Timer->tr_node.io_Command = TR_ADDREQUEST; XXXX Timer->tr_node.io_Flags = 0; XXXX Timer->tr_node.io_Error = 0; XXXX set_read(); XXXX return(1); XXXX } XXXX } XXXX } XXXX Timer->tr_node.io_Device = 0; XXXX close_timer(); XXXX close_ser(); XXXX return(0); XXXX XXXX} XXXX XXXXclose_ser() XXXX{ XXXX if (!(aux_stat & AUX_TYPEAHEAD_FULL)) { XXXX AbortIO(ReadSER); XXXX WaitIO(ReadSER); XXXX } XXXX DeletePort(WriteSER->IOSer.io_Message.mn_ReplyPort); XXXX FreeMem(WriteSER,(long)sizeof(*WriteSER)); XXXX CloseDevice(ReadSER); XXXX DeletePort(ReadSER->IOSer.io_Message.mn_ReplyPort); XXXX FreeMem(ReadSER,(long)sizeof(*ReadSER)); XXXX} XXXX XXXXclose_timer() XXXX{ XXXX XXXX if (Timer) { XXXX if (Timer->tr_node.io_Device) XXXX CloseDevice (Timer); XXXX DeleteExtIO (Timer, (long) sizeof (*Timer)); XXXX } XXXX if (Timer_Port) DeletePort(Timer_Port); XXXX XXXX} XXXX XXXX XXSHAR_EOF XXif test 13852 -ne "`wc -c myaux.c.orig`" XXthen XXecho shar: error transmitting myaux.c.orig '(should have been 13852 characters)' XXfi XXecho shar: extracting NewChanges XXsed 's/^XX//' << \SHAR_EOF > NewChanges XXXXArticle 4582 of comp.sys.amiga: XXXXPath: mcdsun!noao!hao!gatech!rutgers!sri-spam!ames!ucbcad!ucbvax!decvax!decwrl!cgfsv1.dec.com!drew XXXXFrom: drew@cgfsv1.dec.com (Steve Drew) XXXXNewsgroups: comp.sys.amiga XXXXSubject: Notes on AUX: handler, Emacs. XXXXMessage-ID: <9846@decwrl.DEC.COM> XXXXDate: 13 May 87 00:08:09 GMT XXXXSender: daemon@decwrl.DEC.COM XXXXOrganization: Digital Equipment Corporation XXXXLines: 78 XXXX XXXXHeres a couple of notes for those with manx 3.4a in regards to XXXXmy aux-handler: XXXX XXXX XXXXMaking AUX HANDLER shrink from 5736 bytes to approx 4450 bytes: XXXX--------------------------------------------------------------- XXXX XXXXOne thing I meant to do before posting my Aux-handler was to remove XXXXthe Large Code/Date switches. I had compiled this way while debugging just XXXXto play it safe. Anyway I tried it now with-out +C +D and the executable XXXXshrinks from 5736 bytes to 4344 bytes. (Link with c32.lib instead of cl32.lib) XXXX(This is all with manx 3.4a.) XXXX XXXXSmall (minor) Bug fix: XXXX---------------------- XXXX XXXXProblem: Handler eats up ^C in RAW mode when it should'nt. XXXX XXXXFix: add the line in read_ser() that's indicated below: XXXX XXXX if (c == 3) { /* ^C typed so immediately send the signal */ XXXX==> if (!(aux_stat & AUX_RAW)) XXXX c = 0; XXXX if (reader) XXXX Signal(reader,SIGBREAKF_CTRL_C); XXXX } XXXX XXXX XXXXPATCH TO MAKE MicroEmacs 3.x run through AUX: XXXX--------------------------------------------- XXXX XXXX(This was even easier than I thought it would be!) XXXX XXXXJust add the indicated lines below (=>) to the 'termio.c' module and XXXXrecompile. XXXXWhat it does: When invoked emacs will now only open a RAW window if 'Run', XXXXif you just invoke emacs eg: '1> emacs file' from it will change the console XXXXto RAW mode and use that. Since my aux-handler supports RAW mode it works XXXXthe same way to a ansi (vt100) style terminal. XXXX XXXXttopen() XXXX{ XXXX#if AMIGA XXXX XXXX=> extern int Enable_Abort; XXXX=> XXXX=> Enable_Abort = 0; XXXX=> if (IsInteractive(Input()) && IsInteractive(Output())) { XXXX=> terminal = (long)Output(); XXXX=> set_raw(); XXXX=> } XXXX=> else XXXX XXXX terminal = Open("RAW:0/0/640/200/MicroEMACS 3.8b", NEW); XXXX#endif XXXX XXXX XXXXttclose() XXXX{ XXXX#if AMIGA XXXX amg_flush(); XXXX XXXX=> if (Output() != terminal) XXXX Close(terminal); XXXX=> else XXXX=> set_con(); XXXX XXXX#endif XXXX XXXXOk, so now we can dail up, use shell, emacs a file, compile it, hummm... XXXXall we need now it a mini kermit server. (And a hard drive, sniff) XXXX XXXX/Steve. XXXX============================================================================ XXXX Steve Drew at ENET: CGFSV1::DREW XXXX ARPA: drew%cfgsv1.dec.com@decwrl.dec.com XXXX USENET: {decvax!decwrl}!cgfsv1.dec.com!drew XXXX============================================================================ XXXX XXXX XXSHAR_EOF XXif test 2665 -ne "`wc -c NewChanges`" XXthen XXecho shar: error transmitting NewChanges '(should have been 2665 characters)' XXfi XXecho shar: extracting README.fnf XXsed 's/^XX//' << \SHAR_EOF > README.fnf XXXXI've applied the changes given in the "NewChanges" file before compiling XXXXwith Manx 3.40A (patch level 3). The original files have ".orig" appended XXXXto their names. The new aux-handler, with the specified changes, has XXXXnot been tested. XXXX XXXX-Fred XXXX 30-May-87 XXSHAR_EOF XXif test 253 -ne "`wc -c README.fnf`" XXthen XXecho shar: error transmitting README.fnf '(should have been 253 characters)' XXfi XXecho shar: extracting POSTER XXsed 's/^XX//' << \SHAR_EOF > POSTER XXXXArticle 4471 of comp.sys.amiga: XXXXPath: mcdsun!noao!hao!ames!ucbcad!ucbvax!decvax!decwrl!cgou01.dec.com!drew XXXXFrom: drew@cgou01.dec.com (Steve Drew) XXXXNewsgroups: comp.sys.amiga XXXXSubject: Aux: Handler (Part 1 of 2 doc/executable) XXXXMessage-ID: <9775@decwrl.DEC.COM> XXXXDate: 8 May 87 17:14:09 GMT XXXXSender: daemon@decwrl.DEC.COM XXXXOrganization: Digital Equipment Corporation XXXXLines: 260 XXXX XXXX XXXX XXXXHere's my first attempt at a dos handler. Please read the docs!! XXXXI wrote in support for ACTION_SCREEN_MODE originally thinking that XXXXmy commandline editing under shell would work ok through AUX: to XXXXa vt100 style terminal. But alas some of the escape sequences I used XXXXunder shell (for inserting / deleting char's) were Amiga specific XXXXand not ansi sequences. So as a quick alternative I added a switch XXXXto shell to turn of CLE for use over AUX:. XXXX XXXXBut with the capability of RAW mode you could write/modify a ansi XXXXstyle screen editor that would also work through aux-handler to a XXXXansi style terminal. Any volunteers? XXXX XXXXFollowing the dos's and executable are the sources. XXXX XXXX< I code because I enjoy getting frustrated!! > XXXX XXXXPlease email me any bugs found to: XXXX XXXX%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% XXXX Steve Drew at ENET: CGFSV1::DREW XXXX ARPA: drew%cfgsv1.dec.com@decwrl.dec.com XXXX USENET: {decvax!decwrl}!cgfsv1.dec.com!drew XXXX%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% XXXX XXSHAR_EOF XXif test 1428 -ne "`wc -c POSTER`" XXthen XXecho shar: error transmitting POSTER '(should have been 1428 characters)' XXfi XXecho shar: extracting myaux.c XXsed 's/^XX//' << \SHAR_EOF > myaux.c XXXX/**************************************************************************** XXXX * XXXX * Aux Driver V1.0 (c)CopyRight 1987, Steve Drew. All Rights Reserved. XXXX * XXXX * Aux-Handler Ver. 1.0 1-May-1987 XXXX * XXXX * Steve Drew XXXX * 52-Castledale Cres. N.E. XXXX * Calgary, Ab. Canada. XXXX * XXXX * |You may freely distribute this source as long as | XXXX * |the Copyright notice is left intact. | XXXX ***************************************************************************/ XXXX XXXX XXXX#include <devices/serial.h> XXXX#include <devices/timer.h> XXXX XXXX XXXXtypedef unsigned char u_char; XXXX XXXX#undef BADDR XXXX#define BADDR(x) ((APTR)((long)x << 2)) XXXX XXXX#define ACTION_FINDINPUT 1005L XXXX#define ACTION_FINDOUTPUT 1006L XXXX#define ACTION_END 1007L XXXX#define ACTION_SCREEN_MODE 994L XXXX XXXX#define DOS_FALSE 0L XXXX#define DOS_TRUE -1L XXXX XXXX#define AUX_ECHO 1 XXXX#define AUX_CRLF 2 XXXX#define AUX_RAW 4 XXXX#define AUX_RPEND 8 XXXX#define AUX_WAIT_FOR 16 XXXX#define AUX_TYPEAHEAD_FULL 32 XXXX#define AUXBUFSIZE 256 /* Same as CON: handler */ XXXX#define MAXLINESIZE 254 /* save two for \n'\0' */ XXXX XXXX XXXX#define MYPORT_SIG (1L << myport->mp_SigBit) XXXX#define READSER_SIG (1L << ReadSER->IOSer.io_Message.mn_ReplyPort->mp_SigBit) XXXX#define TIMER_SIG (1L << Timer_Port->mp_SigBit) XXXX XXXX/* extern long AbsExecBase; */ XXXX XXXX/* My Globals */ XXXX XXXX XXXXstruct IOExtSer *ReadSER; XXXXstruct IOExtSer *WriteSER; XXXXstruct timerequest *Timer; XXXXstruct MsgPort *Timer_Port; XXXXstruct Task *reader; XXXXlong SysBase; XXXXint aux_stat, XXXX aux_avail, XXXX in_len; XXXXu_char in_c; XXXX XXXX_main() XXXX{ XXXX XXXX extern void returnpkt(); /* sends back the packet */ XXXX extern void returnpktplain(); /* use args in Res1 */ XXXX extern struct DosPacket *taskwait(); XXXX XXXX char *version = "Ver 1.0 (c) Steve Drew 1987"; XXXX struct Process *myproc; /* my process */ XXXX struct DosPacket *mypkt; /* a pointer to the dos packet */ XXXX struct DosPacket *rdpkt; XXXX struct DeviceNode *mynode; /* our device node (parmpkt Arg3) */ XXXX struct FileHandle *fh; /* a pointer to our file handle */ XXXX struct MsgPort *myport; XXXX long run = TRUE; /* handler main loop flag */ XXXX u_char *ptr; /* ptr for name translation */ XXXX char *name,*s; /* ptr to name for open */ XXXX int aux_open = 0; /* aux open count */ XXXX char auxbuf[AUXBUFSIZE];/* Our type ahead buffer */ XXXX long signals; /* signals that occurred in Wait */ XXXX XXXX XXXX /* Initializing the handler */ XXXX XXXX myproc = (struct Process *)FindTask(0L); XXXX mypkt = taskwait(myproc); /* Wait for my startup message */ XXXX XXXX /* I don't need the name or extra info passed in Arg1/2 */ XXXX XXXX mynode = (struct DeviceNode *)BADDR(mypkt->dp_Arg3); XXXX mynode->dn_Task = &myproc->pr_MsgPort; XXXX myport = &myproc->pr_MsgPort; XXXX returnpkt(mypkt, myproc, DOS_TRUE, mypkt->dp_Res2); XXXX XXXX in_len = aux_avail = aux_stat = 0; XXXX reader = (struct Task *) 0; XXXX XXXX XXXX /* done initial stuff, now for some work */ XXXX XXXX while(run) { XXXX XXXX if (aux_open) { /* then wait for read char or new action */ XXXX XXXX signals = Wait( MYPORT_SIG | READSER_SIG | TIMER_SIG ); XXXX XXXX if (signals & TIMER_SIG) { XXXX WaitIO(Timer); XXXX aux_stat &= ~AUX_WAIT_FOR; XXXX rdpkt->dp_Res1 = DOS_FALSE; XXXX returnpktplain(rdpkt,myproc); XXXX } XXXX if ((signals & READSER_SIG) && CheckIO(ReadSER)) { XXXX read_ser(auxbuf); XXXX chk_pend(auxbuf,rdpkt,myproc); XXXX } XXXX if (signals & MYPORT_SIG) { XXXX mypkt = taskwait(myproc); XXXX } XXXX else /* no new dospackets */ XXXX continue; XXXX } XXXX else /* only port at the moment is myport */ XXXX mypkt = taskwait(myproc); XXXX XXXX switch(mypkt->dp_Type) { /* find what action to perform */ XXXX XXXX case ACTION_FINDINPUT: XXXX XXXX if (reader) { /* Have I already got a someone reading */ XXXX returnpkt(mypkt, myproc, DOS_FALSE, ERROR_OBJECT_IN_USE); XXXX break; XXXX } XXXX XXXX case ACTION_FINDOUTPUT: XXXX XXXX /* XXXX I allow for multiple writers. But doesn't make sense XXXX to allow for mutilple readers. XXXX */ XXXX if (!aux_open) { /* first time here we open the devices */ XXXX if ((aux_open = open_stuff()) == 0) { XXXX returnpkt(mypkt, myproc, DOS_FALSE, ERROR_OBJECT_IN_USE); XXXX break; XXXX } XXXX } XXXX else XXXX aux_open++; XXXX XXXX /* get file name and Upper case it */ XXXX ptr = (u_char *)BADDR(mypkt->dp_Arg3); XXXX name = AllocMem((long)*ptr + 1, MEMF_PUBLIC); XXXX movmem(ptr+1, name, *ptr); XXXX name[*ptr] = '\0'; XXXX for (s = name; *s; ++s) *s = toupper(*s); XXXX XXXX XXXX /* XXXX This is a Hack to allow a bail out of a NEWCLI XXXX that is using the AUX. By doing say an echo >AUX:ENDCLI XXXX from another process the reader (being the NEWCLI) XXXX will be sent a ENDCLI command. XXXX */ XXXX XXXX if (!strcmp(name,"AUX:ENDCLI") && (aux_stat & AUX_RPEND)) { XXXX strcpy(rdpkt->dp_Arg2,"ENDCLI\n"); XXXX rdpkt->dp_Res1 = 7L; XXXX returnpktplain(rdpkt, myproc); XXXX aux_stat &= ~AUX_RPEND; XXXX } XXXX else XXXX chk_params(name); XXXX XXXX FreeMem(name, (long)*ptr +1); XXXX fh = (struct FileHandle *)BADDR(mypkt->dp_Arg1); XXXX fh->fh_Arg1 = DOS_TRUE; XXXX fh->fh_Port = (struct MsgPort *)DOS_TRUE; XXXX XXXX if (!reader && (mypkt->dp_Type == ACTION_FINDINPUT)) { XXXX struct MsgPort *port; XXXX XXXX port = mypkt->dp_Port; XXXX reader = port->mp_SigTask; XXXX fh->fh_Arg1 = (long)port->mp_SigTask; XXXX } XXXX XXXX returnpkt(mypkt, myproc, DOS_TRUE, mypkt->dp_Res2); XXXX break; XXXX XXXX case ACTION_READ: XXXX XXXX rdpkt = mypkt; XXXX aux_stat |= AUX_RPEND; XXXX chk_pend(auxbuf,rdpkt,myproc); XXXX XXXX break; XXXX XXXX case ACTION_WRITE: XXXX XXXX write_ser(mypkt->dp_Arg2,(int)mypkt->dp_Arg3); XXXX mypkt->dp_Res1 = mypkt->dp_Arg3; /* tell em we wrote them all */ XXXX XXXX returnpktplain(mypkt, myproc); XXXX break; XXXX XXXX case ACTION_WAIT_CHAR: XXXX XXXX /* just queue up to wait for data */ XXXX XXXX rdpkt = mypkt; XXXX aux_stat |= AUX_WAIT_FOR; XXXX Timer->tr_time.tv_secs = 0L; XXXX Timer->tr_time.tv_micro = rdpkt->dp_Arg1; XXXX SendIO(Timer); XXXX chk_pend(auxbuf,rdpkt,myproc); XXXX break; XXXX XXXX case ACTION_SCREEN_MODE: XXXX XXXX if (mypkt->dp_Arg1) { XXXX aux_stat |= AUX_RAW; XXXX aux_stat &= ~AUX_ECHO; XXXX } XXXX else { XXXX aux_stat &= ~AUX_RAW; XXXX aux_stat |= AUX_ECHO; XXXX } XXXX chk_pend(); XXXX returnpkt(mypkt, myproc, DOS_TRUE, mypkt->dp_Res2); XXXX break; XXXX XXXX case ACTION_END: XXXX XXXX if (--aux_open == 0) { XXXX run = 0; XXXX close_timer(); XXXX close_ser(); XXXX } XXXX if (mypkt->dp_Arg1 == (long)reader) reader = (struct Task *) 0; XXXX returnpkt(mypkt, myproc, DOS_TRUE, mypkt->dp_Res2); XXXX break; XXXX XXXX default: XXXX XXXX returnpkt(mypkt, myproc, DOS_FALSE, ERROR_ACTION_NOT_KNOWN); XXXX break; XXXX } XXXX } /* end while */ XXXX mynode->dn_Task = FALSE; XXXX} XXXX XXXX XXXX/* XXXX Allows some flexibilty to control the port. XXXX Can dynamically change CRLF translation, XXXX Echo or RAW mode on/off. XXXX*/ XXXXchk_params(str) XXXXchar *str; XXXX{ XXXX char *ptr, *s; XXXX int param, i=1; XXXX XXXX if (strncmp(str,"AUX:SET/",8)) return; XXXX ptr = str + 8; XXXX while(i) { XXXX for (s = ptr; *ptr && *ptr != '/'; ++ptr); XXXX if (*ptr == '\0') i = 0; XXXX *ptr = '\0'; XXXX str = s+2; XXXX if (ptr > str) { XXXX switch (*s) { XXXX case 'E': XXXX param = AUX_ECHO; XXXX break; XXXX case 'C': XXXX param = AUX_CRLF; XXXX break; XXXX case 'R': XXXX param = AUX_RAW; XXXX break; XXXX default: XXXX param = 0; XXXX break; XXXX } XXXX if (*str == 'O') { XXXX if (*(str+1) == 'N') aux_stat |= param; XXXX else XXXX if (*(str+1) == 'F') aux_stat &= ~param; XXXX } XXXX } XXXX ++ptr; XXXX } XXXX} XXXX XXXX XXXX/* XXXX Start a asynchronous Read request XXXX*/ XXXXset_read() XXXX{ XXXX /* set up for a read */ XXXX ReadSER->IOSer.io_Length = 1L; XXXX ReadSER->IOSer.io_Command = CMD_READ; XXXX ReadSER->IOSer.io_Data = (APTR) &in_c; XXXX SendIO(ReadSER); XXXX} XXXX XXXX/* XXXX Check our buf to see if we have a line to return yet. Or if raw mode XXXX give 'em all we got. XXXX*/ XXXXchk_pend(buf,pkt,proc) XXXXchar *buf; XXXXstruct DosPacket *pkt; XXXXstruct Process *proc; XXXX{ XXXX extern void returnpktplain(); XXXX char *p; XXXX int i=0; XXXX XXXX if ((in_len && (aux_stat & AUX_RAW)) || aux_avail) { XXXX if (aux_stat & AUX_WAIT_FOR) { XXXX aux_stat &= ~AUX_WAIT_FOR; /* clear the wait_for */ XXXX pkt->dp_Res1 = DOS_TRUE; XXXX AbortIO(Timer); XXXX WaitIO(Timer); XXXX Wait (1L << Timer_Port->mp_SigBit); XXXX returnpktplain(pkt,proc); XXXX } XXXX else if (aux_stat & AUX_RPEND) { XXXX aux_stat &= ~AUX_RPEND; /* clear the pending read */ XXXX if (aux_stat & AUX_RAW) { XXXX aux_avail = 0; /* since we're sending all */ XXXX } XXXX else XXXX --aux_avail; XXXX XXXX /* if in_len is zero, then aux_avail must of been XXXX set up to force us here to reply with Res1 = 0; XXXX thus actually returning an EOF. XXXX */ XXXX if (in_len) { XXXX for (i = 1,p = (char *) pkt->dp_Arg2; XXXX ((p[i-1] = buf[i-1]) != 10 || (aux_stat & AUX_RAW)) && XXXX i < pkt->dp_Arg3 && i < in_len; ++i) ; XXXX XXXX /* reader asked for less than 256 chars but no cr XXXX was found. If not in raw mode then bump avail back XXXX up since we still have the remaining CR terminated XXXX line in buf[]. XXXX */ XXXX if (p[i-1] != 10 && !(aux_stat & AUX_RAW)) { XXXX ++aux_avail; XXXX } XXXX } XXXX in_len -= i; XXXX movmem(buf+i,buf,in_len); XXXX if (in_len < MAXLINESIZE - 1 && (aux_stat & AUX_TYPEAHEAD_FULL)) { XXXX aux_stat &= ~AUX_TYPEAHEAD_FULL; XXXX set_read(); /* start waiting for reads again */ XXXX } XXXX pkt->dp_Res1 = (long)i; XXXX returnpktplain(pkt,proc); XXXX } XXXX } XXXX} XXXX XXXX/* XXXX Only called here if there really is a character waiting to be read. XXXX*/ XXXXread_ser(buf) XXXXchar *buf; XXXX{ XXXX char c; XXXX XXXX WaitIO(ReadSER); XXXX c = in_c; XXXX XXXX if (c == 3) { /* ^C typed so immediately send the signal */ XXXX if (!(aux_stat & AUX_RAW)) XXXX c = 0; XXXX if (reader) XXXX Signal(reader,SIGBREAKF_CTRL_C); XXXX } XXXX XXXX if (!(aux_stat & AUX_RAW)) switch(c) { XXXX case 4: /* ^D, send the signal if not in raw mode */ XXXX c = 0; XXXX if (reader) XXXX Signal(reader,SIGBREAKF_CTRL_D); XXXX break; XXXX case 28: /* ^\ so wipe out line and force EOF */ XXXX in_len = c = 0; XXXX ++aux_avail; XXXX break; XXXX case 13: /* CR convert to LF if CRLF turned on */ XXXX if (aux_stat & AUX_CRLF) c = 10; XXXX break; XXXX case 10: /* ignore these */ XXXX if (aux_stat & AUX_CRLF) c = 0; XXXX break; XXXX case 8: /* BS */ XXXX case 127: /* DEL */ XXXX if (in_len && buf[in_len-1] != 10) { XXXX --in_len; XXXX write_ser("\010 \010",3); XXXX } XXXX c = 0; XXXX break; XXXX case 24: /* ^X */ XXXX case 21: /* ^U */ XXXX while(in_len && buf[in_len-1] != 10) { XXXX --in_len; XXXX write_ser("\010 \010",3); XXXX } XXXX c = 0; XXXX break; XXXX case 27: /* <ESC> */ XXXX c = 0; XXXX default: XXXX break; XXXX } XXXX if (aux_stat & AUX_ECHO) { XXXX if ((aux_stat & AUX_CRLF) && c == 10) putc_ser(13); XXXX putc_ser(c); XXXX } XXXX if (c == 10) ++aux_avail; /* always done when CR received */ XXXX XXXX /* If our buffer is full then ignore any further input. (it XXXX will stack up in the serial.device buffer) If our buffer XXXX contains no CR's (unterminated) then add a newline. At XXXX this point the CON: driver would wait for the user to type XXXX a return while ignoring any other key strokes. XXXX In raw mode the buffer CAN be full and unterminated. Since XXXX when ever the reader asks for data we give him what ever XXXX we have so far. XXXX */ XXXX if (in_len >= MAXLINESIZE) { XXXX aux_stat |= AUX_TYPEAHEAD_FULL; XXXX if (!aux_avail && !(aux_stat & AUX_RAW)) { XXXX ++aux_avail; XXXX buf[in_len++] = 10; XXXX } XXXX } XXXX else XXXX set_read(); XXXX XXXX if (c) buf[in_len++] = c; XXXX} XXXX XXXX/* XXXX Write 'em out one by one converting to CR LF if enabled. XXXX*/ XXXXwrite_ser(buf,len) XXXXchar *buf; XXXXint len; XXXX{ XXXX int i=0; XXXX char c; XXXX XXXX for (i=0; i<len; i++) { XXXX c = buf[i]; XXXX if (c == 10 && (aux_stat & AUX_CRLF)) putc_ser(13); XXXX putc_ser(c); XXXX } XXXX} XXXX XXXX/* XXXX Perform Synchronous write. XXXX*/ XXXXputc_ser(c) XXXXchar c; XXXX{ XXXX if (c) { XXXX WriteSER->IOSer.io_Length = 1L; XXXX WriteSER->IOSer.io_Data = (APTR) &c; XXXX DoIO(WriteSER); XXXX } XXXX} XXXX XXXXopen_stuff() XXXX{ XXXXBYTE *c,*b; XXXXint i; XXXX XXXX aux_stat = AUX_ECHO | AUX_CRLF; /* set the default */ XXXX if ((ReadSER = (struct IOExtSer *) XXXX AllocMem((long)sizeof(*ReadSER),MEMF_PUBLIC|MEMF_CLEAR)) == NULL) XXXX return(0); XXXX if ((WriteSER = (struct IOExtSer *) XXXX AllocMem((long)sizeof(*WriteSER),MEMF_PUBLIC|MEMF_CLEAR)) == NULL) { XXXX FreeMem(ReadSER,(long)sizeof(*ReadSER)); XXXX return(0); XXXX } XXXX ReadSER->IOSer.io_Message.mn_ReplyPort = CreatePort(0,0); XXXX if (OpenDevice(SERIALNAME,NULL,ReadSER,NULL)) { XXXX DeletePort(ReadSER->IOSer.io_Message.mn_ReplyPort); XXXX FreeMem(WriteSER,(long)sizeof(*WriteSER)); XXXX FreeMem(ReadSER,(long)sizeof(*ReadSER)); XXXX return(0); XXXX } XXXX XXXX b = (BYTE *)ReadSER; XXXX c = (BYTE *)WriteSER; XXXX for (i=0;i<sizeof(struct IOExtSer);i++) *c++ = *b++; XXXX XXXX WriteSER->IOSer.io_Message.mn_ReplyPort = CreatePort(0,0); XXXX WriteSER->IOSer.io_Command = CMD_WRITE; XXXX XXXX /* Open Timer.device */ XXXX if (Timer_Port = CreatePort (NULL, NULL)) { XXXX if ((Timer = CreateExtIO (Timer_Port, (long) sizeof (*Timer)))) { XXXX if (!(OpenDevice (TIMERNAME, UNIT_VBLANK, Timer, 0L))) { XXXX Timer->tr_node.io_Command = TR_ADDREQUEST; XXXX Timer->tr_node.io_Flags = 0; XXXX Timer->tr_node.io_Error = 0; XXXX set_read(); XXXX return(1); XXXX } XXXX } XXXX } XXXX Timer->tr_node.io_Device = 0; XXXX close_timer(); XXXX close_ser(); XXXX return(0); XXXX XXXX} XXXX XXXXclose_ser() XXXX{ XXXX if (!(aux_stat & AUX_TYPEAHEAD_FULL)) { XXXX AbortIO(ReadSER); XXXX WaitIO(ReadSER); XXXX } XXXX DeletePort(WriteSER->IOSer.io_Message.mn_ReplyPort); XXXX FreeMem(WriteSER,(long)sizeof(*WriteSER)); XXXX CloseDevice(ReadSER); XXXX DeletePort(ReadSER->IOSer.io_Message.mn_ReplyPort); XXXX FreeMem(ReadSER,(long)sizeof(*ReadSER)); XXXX} XXXX XXXXclose_timer() XXXX{ XXXX XXXX if (Timer) { XXXX if (Timer->tr_node.io_Device) XXXX CloseDevice (Timer); XXXX DeleteExtIO (Timer, (long) sizeof (*Timer)); XXXX } XXXX if (Timer_Port) DeletePort(Timer_Port); XXXX XXXX} XXXX XXXX XXSHAR_EOF XXif test 13887 -ne "`wc -c myaux.c`" XXthen XXecho shar: error transmitting myaux.c '(should have been 13887 characters)' XXfi XXecho shar: extracting misc.c XXsed 's/^XX//' << \SHAR_EOF > misc.c XXXX/* XXXX * misc.c - support routines - Phillip Lindsay (C) Commodore 1986 XXXX * You may freely distribute this source and use it for Amiga Development - XXXX * as long as the Copyright notice is left intact. XXXX * XXXX * 30-SEP-86 XXXX * XXXX */ XXXX#include <functions.h> XXXX#include <stdio.h> XXXX#include <exec/types.h> XXXX#include <exec/nodes.h> XXXX#include <exec/lists.h> XXXX#include <exec/ports.h> XXXX#include <exec/libraries.h> XXXX#include <exec/devices.h> XXXX#include <exec/io.h> XXXX#include <exec/memory.h> XXXX#include <devices/console.h> XXXX#include <libraries/dos.h> XXXX#include <libraries/dosextens.h> XXXX#include <libraries/filehandler.h> XXXX XXXXextern void returnpkt(); XXXX XXXX/* returnpkt() - packet support routine XXXX * here is the guy who sends the packet back to the sender... XXXX * XXXX * (I modeled this just like the BCPL routine [so its a little redundant] ) XXXX */ XXXX XXXXvoid XXXXreturnpktplain(packet, myproc) XXXXstruct DosPacket *packet; XXXXstruct Process *myproc; XXXX{ XXXX returnpkt(packet, myproc, packet->dp_Res1, packet->dp_Res2); XXXX} XXXX XXXXvoid XXXXreturnpkt(packet, myproc, res1, res2) XXXXstruct DosPacket *packet; XXXXstruct Process *myproc; XXXXULONG res1, res2; XXXX{ XXXX struct Message *mess; XXXX struct MsgPort *replyport; XXXX XXXX packet->dp_Res1 = res1; XXXX packet->dp_Res2 = res2; XXXX replyport = packet->dp_Port; XXXX mess = packet->dp_Link; XXXX packet->dp_Port = &myproc->pr_MsgPort; XXXX mess->mn_Node.ln_Name = (char *) packet; XXXX mess->mn_Node.ln_Succ = NULL; XXXX mess->mn_Node.ln_Pred = NULL; XXXX PutMsg(replyport, mess); XXXX} XXXX XXXX XXXX/* XXXX * taskwait() ... Waits for a message to arrive at your port and XXXX * extracts the packet address which is returned to you. XXXX */ XXXX XXXXstruct DosPacket * XXXXtaskwait(myproc) XXXXstruct Process *myproc; XXXX{ XXXX struct MsgPort *myport; XXXX struct Message *mymess; XXXX XXXX myport = &myproc->pr_MsgPort; XXXX WaitPort(myport); XXXX mymess = GetMsg(myport); XXXX return((struct DosPacket *)mymess->mn_Node.ln_Name); XXXX} XXXX XXXX/* end of misc.c */ XXXX XXXX XXSHAR_EOF XXif test 1924 -ne "`wc -c misc.c`" XXthen XXecho shar: error transmitting misc.c '(should have been 1924 characters)' XXfi XXecho shar: extracting makefile XXsed 's/^XX//' << \SHAR_EOF > makefile XXXX######################################################################### XXXX# XXXX# Aux-Handler Makefile XXXX# V 1.0 (c) Steve Drew 1987 XXXX# For Manx 3.40a XXXX# XXXX######################################################################### XXXX XXXX XXXXaux-handler : misc.o myaux.o XXXX ln -o aux-handler misc.o myaux.o -lc32 XXXX XXXXmisc.o : misc.c XXXX cc +L +Hmyaux.syms misc.c XXXX XXXXmyaux.o : myaux.c XXXX cc +L +Imyaux.syms myaux.c XXXX XXSHAR_EOF XXif test 388 -ne "`wc -c makefile`" XXthen XXecho shar: error transmitting makefile '(should have been 388 characters)' XXfi XX# End of shell archive XXexit 0 SHAR_EOF if test 42214 -ne "`wc -c aux.sh`" then echo shar: error transmitting aux.sh '(should have been 42214 characters)' fi # End of shell archive exit 0 -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Bill Koester -- CBM >>Amiga Technical Support<< UUCP ...{allegra|burdvax|rutgers|ihnp4}!cbmvax!bill PHONE (215) 431-9355 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Pleese desrigard eny spealing airors!!!!!!!!!!! =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=