IMD 1.17: 19/01/2010 20:39:24 sc 2 of 2   sc bond distribution :PUniFLEX Backup - O  @`! #@%`')+-/1 3@5`79;?A C@E`GIKMOQ S@U`WY[]ac@ogikmoq s@u`wy{ @ O ` @ `  o @ ` ǀ ɠ o ٠  @` @`!Aa   !Aa/#A%a')+-/brI  rJ/ 7cursesextralibs "- ʀ ʔ ʜ- ȰZd Ȱ  Cs" _tstptstp.c"  !$'*-0369<?BEHKNQTWZ]`bdfhjlnprtvxz|~  ^@^A^B^C^D^E^F^G^H^I^J^K^L^M^N^O^P^Q^R^S^T^U^V^W^X^Y^Z^[^\^]^~^_ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~^?  $(,048<@DHLPTX\`dhlptx|  $(,048<@DHLPTX\`dhlptx| __unctrlunctrl.c-#addch.cIaddstr.cIbox.c clear.cclrtobot.c`clrtoeol.cSHcr_put.cUcr_tty.c curses.c'9delch.c,1deleteln.c-/delwin.c.1.endwin.c/_erase.c1Y?getch.c3getstr.c6initscr.c7*insch.c:insertln.c<longname.c>Dmove.c>mvprintw.c?mmvscanw.c@hmvwin.cBbnewwin.cCvJoverlay.cHoverwrite.cJ  printw.cL\refresh.cMy2scanw.c\[scroll.c^Kstandout.c_Qttouchwin.c`tstp.ca]unctrl.cb|yb__unctrla_tstp` _touchwin_Q _wstandend_Q _wstandout^_scroll\__sscans\_wscanw\_scanwMy _wrefreshMy__winL __sprintwL_wprintwL_printwJ _overwriteH_overlayCv_subwinCv_newwinBb_mvwin@ _mvwscanw@_mvscanw? _mvwprintw? _mvprintw>_wmove>D _longname< _winsertln:_winsch7*_initscr6_wgetstr3_wgetch1Y_werase/__endwin.1_delwin-/ _wdeleteln,1_wdelch'_PC'_VS'_VE'_VB'_US'_UP'_UE'_UC'_TI'_TE'_TA'_SR'_SO'_SF'_SE'_NL'_ND'_MA'_LL'_IP'_IM'_IC'_HO'_EI'_ED'_DO'_DM'_DL'_DC'_CR'_CM'_CL'_CE'_CD'_BT'_BC'_AL'__pfast'_normtty' _UPPERCASE'_NONL'_XN'_UL'_OS'_NC'_MS'_MI'_IN'_HZ'_GT'_EO'_DB'_DA'_CA'_BS'_AM'__tty'_curscr'_stdscr' __res_flg'_COLS'_LINES'__tty_ch' _Def_term'_ttytype'__endwin'_My_term' __rawmode'__echoit_getcap_zap_setterm _gettmode_ospeed_tabcol_plod_plodput_fgoto __putchar_mvcurS _wclrtoeol _wclrtobot_wclear_boxI_waddstr_waddchu  !$'*-0369<?BEHKNQTWZ]`bdfhjlnprtvxz|~  tc1.cextralibs "- ʀ ʔ ʜ-- ȰZd Ȱ  Cc"/* * $Header: tc1.c,v 1.1 84/05/08 13:17:56 terryl Exp $ * * $Log: tc1.c,v $ * Revision 1.1 84/05/08 13:17:56 terryl * Initial revision * */ #ifndef lint static char sccsid[] = "@(#)tc1.c 4.1 (Berkeley) 6/27/83"; #endif /* * tc1 [term] * dummy program to test termlib. * gets entry, counts it, and prints it. */ #include char buf[1024]; /*char *getenv();*/ main(argc, argv) char **argv; { char *p; int rc; #ifdef notdef if (argc < 2) p = getenv("TERM"); else p = argv[1]; rc = tgetent(buf,p); #endif rc = tgetent(buf,"pegasus"); printf("tgetent returns %d, len=%d, text=\n'%s'\n",rc,strlen(buf),buf); } P^Q^R^S^T^U^V^W^X^Y^Z^[^\^]^~^_ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~^?  $(,048<@DL M*tc2.cextralibs "- ʀ ʔ ʜ-- ȰZd Ȱ  Cc"բ  RR  * RR  RR  * RR  !R(R  *!RJRt  !RlR]  *RRF  RR/  * RR론բ  RR  RR  2R R  3 RRꡨբ  ,R&R  ,R*R 5R.Rq 7R0R` 9R2RO ;R4R>ꡨբ  R6R!ꡠբ (RJR    /* * $Header: tc2.c,v 1.1 84/05/08 13:18:23 terryl Exp $ * * $Log: tc2.c,v $ * Revision 1.1 84/05/08 13:18:23 terryl * Initial revision * */ #ifndef lint static char sccsid[] = "@(#)tc2.c 4.1 (Berkeley) 6/27/83"; #endif /* * tc2 [term] * Dummy program to test out termlib. * Commands are "tcc\n" where t is type (s for string, f for flag, * or n for number) and cc is the name of the capability. */ #include char buf[1024]; char /**getenv(),*/ *tgetstr(); main(argc, argv) char **argv; { char *p, *q; int rc; char b[3], c; char area[200]; #ifdef notdef if (argc < 2) p = getenv("TERM"); else p = argv[1]; rc = tgetent(buf,p); #endif rc = tgetent(buf,"pegasus"); for (;;) { c = getchar(); if (c < 0) exit(0); b[0] = getchar(); if (b[0] < ' ') exit(0); b[1] = getchar(); b[2] = 0; getchar(); switch(c) { case 'f': printf("%s: %d\n",b,tgetflag(b)); break; case 'n': printf("%s: %d\n",b,tgetnum(b)); break; case 's': q = area; printf("%s: %s\n",b,tgetstr(b,&q)); break; default: exit(0); } } } lptx|  $(,048<@Df g #tc3.cextralibs "- ʀ ʔ ʜ-- ȰZd Ȱ  Cc"#ifndef lint static char sccsid[] = "@(#)tc3.c 4.1 (Berkeley) 6/27/83"; #endif /* * tc3 [term] * Dummy program to test out termlib. * Input two numbers and it prints out the tgoto string generated. */ #include char buf[1024]; char *getenv(), *tgetstr(); char *rdchar(); char *tgoto(); char *CM; char cmbuff[30]; char *x; char *UP; char *tgout; main(argc, argv) char **argv; { char *p; int rc; int row, col; if (argc < 2) p = getenv("TERM"); else p = argv[1]; rc = tgetent(buf,p); x = cmbuff; UP = tgetstr("up", &x); printf("UP = %x = ", UP); pr(UP); printf("\n"); if (UP && *UP==0) UP = 0; CM = tgetstr("cm", &x); printf("CM = "); pr(CM); printf("\n"); for (;;) { if (scanf("%d %d", &row, &col) < 2) exit(0); tgout = tgoto(CM, row, col); pr(tgout); printf("\n"); } } pr(p) register char *p; { for (; *p; p++) printf("%s", rdchar(*p)); } /* * rdchar: returns a readable representation of an ASCII char, using ^ notation. */ #include char *rdchar(c) char c; { static char ret[4]; register char *p; /* * Due to a bug in isprint, this prints spaces as ^`, but this is OK * because we want something to show up on the screen. */ ret[0] = ((c&0377) > 0177) ? '\'' : ' '; c &= 0177; ret[1] = isprint(c) ? ' ' : '^'; ret[2] = isprint(c) ? c : c^0100; ret[3] = 0; for (p=ret; *p==' '; p++) ; return (p); }   $(,048<@D" "d 1termcap.cextralibs "- ʀ ʔ ʜ-- ȰZd Ȱ  Cc"uP}@u1uPj@u3D tDOPvv%]D @tD u$3P PP?Pr$L d L$vv3]U$r@s v6[13PPP?P\rLv}]U3FFFF ًVظ=!r%F3PxDF ^#?!sIotFNNFF^#V?!rPuF v ?[y[*؎X^FS#^S\^x~ u뙋^>!FDf]U$prr Ea$<uMa]UDt*sDN t =   /* * $Header: termcap.c,v 1.2 85/02/28 21:56:29 toddb Exp $ * * $Log: termcap.c,v $ * Revision 1.2 85/02/28 21:56:29 toddb * Added in the magnolia window stuff. Also added a fix to avoid walking off * then end of a line that has no trailing ':'. * * Revision 1.1 84/05/08 13:20:07 terryl * Initial revision * */ #ifndef lint static char sccsid[] = "@(#)termcap.c 4.1 (Berkeley) 6/27/83"; #endif #define BUFSIZ 1024 #define MAXHOP 32 /* max number of tc= indirections */ #define E_TERMCAP "/etc/termcap" #include #ifdef MAGNOLIA #include #include #include #include #endif /* * termcap - routines for dealing with the terminal capability data base * * BUG: Should use a "last" pointer in tbuf, so that searching * for capabilities alphabetically would not be a n**2/2 * process when large numbers of capabilities are given. * Note: If we add a last pointer now we will screw up the * tc capability. We really should compile termcap. * * Essentially all the work here is scanning and decoding escapes * in string capabilities. We don't use stdio because the editor * doesn't, and because living w/o it is not hard. */ static char *tbuf; static int hopcount; /* detect infinite loops in termcap, init 0 */ char *tskip(); char *tgetstr(); char *tdecode(); char *getenv(); /* * Get an entry for terminal name in buffer bp, * from the termcap file. Parse is very rudimentary; * we just notice escaped newlines.  */ tgetent(bp, name) char *bp, *name; { register char *cp; register int c; register int i = 0, cnt = 0; char ibuf[BUFSIZ]; char *cp2; int tf; tbuf = bp; tf = 0; #ifndef V6 cp = getenv("TERMCAP"); /* * TERMCAP can have one of two things in it. It can be the * name of a file to use instead of /etc/termcap. In this * case it better start with a "/". Or it can be an entry to * use so we don't have to read the file. In this case it * has to already have the newlines crunched out. */ if (cp && *cp) { if (*cp!='/') { cp2 = getenv("TERM"); if (cp2==(char *) 0 || strcmp(name,cp2)==0) { strcpy(bp,cp); return(tnchktc()); } else { tf = open(E_TERMCAP, 0); } } else tf = open(cp, 0); } if (tf==0) tf = open(E_TERMCAP, 0); #else tf = open(E_TERMCAP, 0); #endif if (tf < 0) return (-1); for (;;) { cp = bp; for (;;) { if (i == cnt) { cnt = read(tf, ibuf, BUFSIZ); if (cnt <= 0) { close(tf); return (0); } i = 0; } c = ibuf[i++]; if (c == '\n') { if (cp > bp && cp[-1] == '\\'){ cp--; continue; } break; } if (cp >= bp+BUFSIZ) { write(2,"Termcap entry too long\n", 23); break; } else *cp++ = c; } *cp = 0; /* * The real work for the match. */ if (tnamatch(name)) { close(tf); return(tnchktc()); } } } /* * tnchktc: check the last entry, see if it's tc=xxx. If so, * recursively find xxx and append that entry (minus the names) * to take the place of the tc=xxx entry. This allows termcap * entries to say "like an HP2621 but doesn't turn on the labels". * Note that this works because of the left to right scan. */ tnchktc() { register char *p, *q; char tcname[16]; /* name of similar terminal */ char tcbuf[BUFSIZ]; char *holdtbuf = tbuf; int l; p = tbuf + strlen(tbuf) - 2; /* before the last colon */ while (*--p != ':') if (p MAXHOP) { write(2, "Infinite tc= loop\n", 18); return (0); } if (tgetent(tcbuf, tcname) != 1) return(0); for (q=tcbuf; *q != ':'; q++) ; l = p - holdtbuf + strlen(q); if (l > BUFSIZ) { write(2, "Termcap entry too long\n", 23); q[BUFSIZ - (p-tbuf)] = 0; } strcpy(p, q+1); tbuf = holdtbuf; return(1); } /* * Tnamatch deals with name matching. The first field of the  T dBϊDBËDTDN t,pT32 @DTuL:LðpD @ud `\ ud P$[DatL  uA DCP[ uWK_1dDA% DH'r|t= |uT-UpFdDa$ < uLI@DH%?DN t |Tu D:tL#D9tKL<tb%ut%%td̩@tDatdH%DtDtNtgd:f]DtmtFd:DuDat4\ #endif old /* * If this is a Magnolia, then constructs like ":li=#:" are legal and don't * necessarily return zero. Instead this routine looks at which id was * specified and figures out from the size of the Magnolia window what * value to return. At least for now, only li and co make any sense. */ windsize(id) char *id; { register int which = 0, i = 0, retval = 0, ttyn; struct WINDOW *wind; #ifndef old struct sgwindb wb; #endif old char *tty; if (strcmp("li", id) == 0) which = 1; else if (strcmp("co", id) != 0) return(0); #ifdef old tty = ttyname(1); if (strncmp(tty, "/dev/wind", 9) != 0 && strncmp(tty, "/dev/ttyw", 9) != 0) { write(2, "Not Magnolia window\n", 20); return(0); } ttyn = atoi(tty + 9); wind = (struct WINDOW *)openobj(WINDNAME + ttyn); #else old if (ioctl(2, WIOCGETP, &wb) < 0) { write(2, "Not Magnolia window\n", 20); return(0); } wind = (struct WINDOW *)openobj(WINDNAME + wb.mdev); #endif old if (wind == (struct WINDOW *)0) { write(2, "openobj failed\n", 20); return(0); } for (i=0; wind->linew < 1 || wind->lineh < 1 || wind->linew > 1000 || wind->lineh > 1000 || i < 100; i++) ; if (which == 0) { /* want number of columns */ retval = wind->linew; } else { /* must want number of lines */ retval = wind->lineh; } closeobj(wind); return(retval); } #endif /* * Handle a flag option. * Flag options are given "naked", i.e. followed by a : or the end * of the buffer. Return 1 if we find the option, or 0 if it is * not given. */ tgetflag(id) char *id; { register char *bp = tbuf; for (;;) { bp = tskip(bp); if (!*bp) return (0); if (*bp++ == id[0] && *bp != 0 && *bp++ == id[1]) { if (!*bp || *bp == ':') return (1); else if (*bp == '@')  return(0); } } } /* * Get a string valued option. * These are given as * cl=^Z * Much decoding is done on the strings, and the strings are * placed in area, which is a ref parameter which is updated. * No checking on area overflow. */ char * tgetstr(id, area) char *id, **area; { register char *bp = tbuf; for (;;) { bp = tskip(bp); if (!*bp) return (0); if (*bp++ != id[0] || *bp == 0 || *bp++ != id[1]) continue; if (*bp == '@') return(0); if (*bp != '=') continue; b^H^yb^>Zt 6^( S^@;b^u^>Zt 6^|( *9P>~t 6~>Zt ~=pIupIP>Zt ^6\\0;u^6\D0V 6 >~t ]>t(~=IuIP@塤yWP>~t @F8>~u v&6~D0VFy F\ PP?F=t=t>~u vv6~M 6~0ރ S3S6P BuP'.;u  p++; return (tdecode(bp, area)); } } /* * Tdecode does the grung work to decode the * string capability escapes. */ static char * tdecode(str, area) register char *str; char **area; { register char *cp; register int c; register char *dp; int i; cp = *area; while ((c = *str++) && c != ':') { switch (c) { case '^': c = *str++ & 037; break; case '\\': dp = "E\033^^\\\\::n\nr\rt\tb\bf\f"; c = *str++; nextc: if (*dp++ == c) { c = *dp++; break; } dp++; if (*dp) goto nextc; if (isdigit(c)) { c -= '0', i = 2; do c <<= 3, c |= *str++ - '0'; while (--i && isdigit(*str)); } break; } *cp++ = c; } *cp++ = 0; str = *area; *area = cp; return (str); } gister char *bp; { while (*bp && *bp != ':') bp++; if (*bp == ':') bp++; return (bp); } /* * Return the (numeric) option id. * Numeric options look like * li#80 * i.e. the option string is separated from the numeric value by * a # character. If the option is not found w + ,termcap.rextralibs "- ʀ ʔ ʜ-- ȰZd Ȱ  Cr"n NVH |z#t-B.%N*@ gxgr /gZ.-N-@tg./. NXJf./.NXa`t./<2NX-@`t.HUNX-@Jft./<?NX-@Jlp`*nf..Hn/.NP*Jn.Np`~|$RA0(HH. fo -\fS`*`,$.mt./<Lt/NP``vB. a|Jg.Na``RL N^NuNVH0-y.Nй*@`$lt./<dt/NPp`% :fR tf -cgp`$ V.HnNXI`Rg :fBR ot./<wt/NPp`A.HnaX gp`pI`R :f.N$ Ђ-@ o*t./<t/NP$ DB4($ R.HUNX#pL0N^NuNVH0(y #fp`T*n`NqRRggJf |g :gJfp`&`Rg :g |fJg :fp`R`L0N^NuNVH *n`Rg :f :fR L N^NuNVH *y.a*@Jfp`v nf Jg(g`X @fp`R #fHR| 0f|~`./NX.HH0ނH |0 HHf ``~L N^NuNVH *y.a*@fp`0 nf$Jg (fg :fp` @fp``L N^NuNVH *y.a*@fp`8 nf Jg(g` @fp` =fR. HUaX``L N^NuNVH8*n n (P` `HH.`&|HH.HH¾f HH.`jRf |0xHHg:0t-BHH0SgH |0 HHf` ^gn \gvHH.g :fHB n *P n L8N^Nu@(#)termcap.c 4.1 (Berkeley) 6/27/83TERMCAPTERM/etc/termcap/etc/termcapTermcap entry too long Bad termcap entry Infinite tc= loop Termcap entry too long E^^\\::n r t bf $_getenv<B_getenv\_strcmpn_strcpy_open_open_open_read_closeFP_writer_close_strlen΀_write_strcpy *6@_writez_strlen_writeȀ_strcpylmul __chcodes4> __chcodesx __chcodes _tgetent _tnchktc _tnamatch _tgetnum( _tgetflag _tgetstrtermcap.ctty = ttyname(1); if (strncmp(tty, "/dev/wind", 9) != 0 && strncmp(tty, "/dev/ttyw", 9) != 0) { write(2, "Not Magnolia window\n", 20); return(0); } ttyn = atoi(tty + 9); wind = (struct WINDOW *)D 0^;}6K0v0;tFFԋF3ۣtv D 0%tFHFFFv \ 0;}vF>K܃]Ur;&wv졌F~3F  <t&FFN F  v D 0^;~F .ࡌ]U?PP TAP3P v3P} NP3PPP]Ur;&wNPP*PP ~u?vD053P*PPvD053P ]U r;&w63F v|tD 0%uV*塤y ]Ã>Z   2 tgoto.cextralibs "- ʀ ʔ ʜ-- ȰZd Ȱ  Cc"/* * $Header: tgoto.c,v 1.1 84/05/08 13:20:35 terryl Exp $ * * $Log: tgoto.c,v $ * Revision 1.1 84/05/08 13:20:35 terryl * Initial revision * */ #ifndef lint static char sccsid[] = "@(#)tgoto.c 4.1 (Berkeley) 6/27/83"; #endif /* Copyright (c) 1979 Regents of the University of California */ #define CTRL(c) ('c' & 037) #define MAXRETURNSIZE 64 extern char *UP; extern char *BC; /* * Routine to perform cursor addressing. * CM is a string containing printf type escapes to allow * cursor addressing. We start out ready to print the destination * line, and switch each time we print row or column. * The following escapes are defined for substituting row/column: * * %d as in printf * %2 like %2d * %3 like %3d * %. gives %c hacking special case characters * %+x like %c but adding x first * * The codes below affect the state but don't use up a value. * * %>xy if value > x add y * %r reverses row/column * %i increments row/column (for one origin indexing) * %% gives % * %B BCD (2 decimal digits encoded in one byte) * %D Delta Data (backwards bcd) * * all other characters are ``self-inserting''. */ char * tgoto(CM, destcol, destline) char *CM; int destcol, destline; { static char result[MAXRETURNSIZE]; static char added[10]; char *cp = CM; register char *dp = result; register int c; int oncol = 0; register int which = destline; if (cp == 0) { toohard: /* * ``We don't do that under BOZO's big top'' */ return ("OOPS"); } added[0] = 0; while (c = *cp++) { if (c != '%') { *dp++ = c; continue; } switch (c = *cp++) { #ifdef CM_N case 'n': destcol ^= 0140; destline ^= 0140; goto setwhich; #endif case 'd': if (which < 10) goto one; if (which < 100) goto two; /* fall into... */ case '3': *dp++ = (which / 100) | '0'; which %= 100; /* fall into... */ case '2': two: *dp++ = which / 10 | '0'; one: *dp++ = which % 10 | '0'; swap: oncol = 1 - oncol; setwhich: which = oncol ? destcol : destline; continue; #ifdef CM_GT case '>': if (which > *cp++) which += *cp++; else cp++; continue; #endif case '+': which += *cp++; /* fall into... */ case '.': casedot: /* * This code is worth scratching your head at for a * while. The idea is that various weird things can * happen to nulls, EOT's, tabs, and newlines by the * tty driver, arpanet, and so on, so we don't send * them if we can help it. * * Tab is taken out to get Ann Arbors to work, otherwise * when they go to column 9 we increment which is wrong * because bcd isn't continuous. We should take out * the rest too, or run the thing through more than * once until it doesn't make any of these, but that * would make termlib (and hence pdp-11 ex) bigger, * and also somewhat slower. This requires all * programs which use termlib to stty tabs so they * don't get expanded. They should do this anyway * because some terminals use ^I for other things, * like nondestructive space. */ if (which == 0 || which == CTRL(d) || /* which == '\t' || */ which == '\n') { if (oncol || UP) /* Assumption: backspace works */ /* * Loop needed because newline happens * to be the successor of tab. */ do { strcat(added, oncol ? (BC ? BC : "\b") : UP); which++; } while (which == '\n'); } *dp++ = which; goto swap; case 'r': oncol = 1; goto setwhich; case 'i': destcol++; destline++; which++; continue; case SS"FxPP3PPP6&6$3PP塤]U r;&w׋Fvvvey ]vKFF;}Fv0vf0;uMFv0uF+F^^ ]ËF@;Fuv~F른 ]ËFt3ۅyKF^FuFVFg ]Ur;&w֋FFb;~Xz SPFFzSP 6Fz 3SP\FFFd;~X: SP2FF:SP 6F:  '%': *dp++ = c; continue; #ifdef CM_B case 'B': which = (which/10 << 4) + which%10; continue; #endif #ifdef CM_D case 'D': which = which - 2 * (which%16); continue; #endif default: goto toohard; } } strcpy(dp, added); return (result); } a) char *id, **area; { register char *bp = tbuf; for (;;) { bp = tskip(bp); if (!*bp) return (0); if (*bp++ != id[0] || *bp == 0 || *bp++ != id[1]) continue; if (*bp == '@') return(0); if (*bp != '=') continue; b/tgoto.rextralibs "- ʀ ʔ ʜ-- ȰZd Ȱ  Cr"*JNVH -n*|t-B,.Jf <#`fB9@`2 %g` n-HHH. ` ` ``l mD dm&td./NX0td./NX,t ./NX0t ./NX0t-B$.g . ` .,`H n-HHH¼o-HHH܂`R` n-HHH܂Jg g fL$.fJg>$.gJg y` |(` y./<@NXR g`Dt-B`DR RR``t ./NX"./NXҀ,`ft./NXЀDІ,`L`8 ngd dgl 3gr 2g >g +g .g rgP igP %gT BgP Dgl` n-HHH.f.@HUNX <L N^Nu@(#)tgoto.c 4.1 (Berkeley) 6/27/83OOPS(2ldivlmodldiv€lmodD_UPR_BCZ_BCbj_UPrx_strcatlmod€ldivڀlmod_strcpy _tgototgoto.c (2 decimalH I tputs.cextralibs "- ʀ ʔ ʜ-- ȰZd Ȱ  Cc"/* * $Header: tputs.c,v 1.1 84/05/08 13:20:50 terryl Exp $ * * $Log: tputs.c,v $ * Revision 1.1 84/05/08 13:20:50 terryl * Initial revision * */ #ifndef lint static char sccsid[] = "@(#)tputs.c 4.1 (Berkeley) 6/27/83"; #endif /* Copyright (c) 1979 Regents of the University of California */ #include #ifndef PEGASUS #include /* * The following array gives the number of tens of milliseconds per * character for each speed as returned by gtty. Thus since 300 * baud returns a 7, there are 33.3 milliseconds per char at 300 baud. */ static short tmspc10[] = { 0, 2000, 1333, 909, 743, 666, 500, 333, 166, 83, 55, 41, 20, 10, 5 }; short ospeed; char PC; #endif PEGASUS /* * Put the character string cp out, with padding. * The number of affected lines is affcnt, and the routine * used to output one character is outc. */ tputs(cp, affcnt, outc) register char *cp; int affcnt; int (*outc)(); { register int i = 0; register int mspc10; if (cp == 0) return; /* * Convert the number representing the delay. */ if (isdigit(*cp)) { do i = i * 10 + *cp++ - '0'; while (isdigit(*cp)); } i *= 10; if (*cp == '.') { cp++; if (isdigit(*cp)) i += *cp - '0'; /* * Only one digit to the right of the decimal point. */ while (isdigit(*cp)) cp++; } /* * If the delay is followed by a `*', then * multiply by the affected lines count. */ if (*cp == '*') cp++, i *= affcnt; /* * The guts of the string. */ while (*cp) (*outc)(*cp++); /* * ^;FvF0= uF0= tF NF F@v^J=F ^|0=~0v JPvt~ ;F Ft3]Ã>Kt&]ÍFPv vF;F t3]F R~ tX0=~0v JPvt ;F Ft3]Ã>Kt&]ÍFPv vF;F t3]ËF]ËF]K]U;::;=s.(=Uv?Fu ]ËvD0t 33ۃ]à0=~5vvvvtpF^>KuK]ËFFFF^F^,vD!F\#^F^vDF\^F^  If no delay needed, or output speed is * not comprehensible, then don't try to delay. */ #ifndef PEGASUS if (i == 0) return; if (ospeed <= 0 || ospeed >= (sizeof tmspc10 / sizeof tmspc10[0])) #endif PEGASUS return; #ifndef PEGASUS /* * Round up by a half a character frame, * and then do the delay. * Too bad there are no user program accessible programmed delays. * Transmitting pad characters slows many * terminals down and also loads the system. */ mspc10 = tmspc10[ospeed]; i += mspc10 / 2; for (i /= mspc10; i > 0; i--) (*outc)(PC); #endif PEGASUS } e cp++; continue; #endif case '+': which += *cp++; /* fall into... */ case '.': casedot: /* * This code is worth scratching your head at for a * while. The idea is that various weird things can * happen to nulls, EOT's, tabs, and newlines by the * tty driver, arpanet, and so on, so we don't send * them if we can help it. * * Tab is taken out to get Ann Arbors to work, otherwise * wtputs.rextralibs "- ʀ ʔ ʜ-- ȰZd Ȱ  Cr"$PNVH *n~ f`H |0 HHg0HH ЇЀԀ0.H |0 HHf ЇЀ. .fDRH |0 HHgHH0ނ`RH |0 HHf *fR. /NX.`HH. nNfL N^Nu@(#)tputs.c 4.1 (Berkeley) 6/27/83 __chcodesN __chcodesx __chcodes __chcodesĀlmul _tputstputs.cacter for each speed as returned by gtty. Thus since 300 * baud returns a #z3$ Heh  U0'extralibs/tputs.rextralibstputs.rtputs.rF@u3]øP3P3Sv!~ tF~ t3^ SvF@u3]Â~ tFf~ t^ ؁PSv7F@u3]Â~ tF3]=wt=rui=auF*MtNF vDvDFvD D3DDFDƃ]UvD0%t VPvD0% u| t t t4 3vDD DD 0Pj]Uv~u3]ËvD0%D0 DFDMD 3]U63FF v:0-F FFFu F:F v:0F@K0%tJ~0uF0v:F:0%Fv:0@K0%tF F:0ÉFыv:0=.u7F:Fv:0@K0%tF F:0ÉFыv:0=lu F:FFv:0~tv>\ N^ v>3ɅyIN ^F yBV ^^ F1~tv>\ N^ v>3F ^F FHFF ^3ɺ v0vR"F ^3ɺ F ^F Fu~u FHB"-FF"^ظ +FF ^~tv>\ N^ v>3F ^FFH^ N3ہMZ"^ V^ FV^ F FuF"^ظ+FF ^G~tv>\ N^ v>3F ^F FH^ N3ہ0J"^ V^ FV^ F FuF"^ظ +FF ^~uFv>ۉ^uMFF F ^;v0tuF F"F v>FN"VFOFHFA36]fAMe:Mg3McMsLoBLxKuKdJ .;OMu.QMy뿃~uFt;F }F FF )FF~ t?F HF xFFv<~FދFHFxQFFv<FFHFxFFv<FF HF xFFv<~FދFv@F:@6]Ã~uF~|FF @~t33CN"QNQNQSPv>4 v>^"NɉF N^y^~u~ t ~|33@F~ tN3F~tF~t!F@^Ë^ۉFx^~t1F,FFFyF=cF~F~~F~ u)F;F~!F)FFHFxvMu ^ MM%MM؋F ;É^uM3F ^MF ]3]UF3SPv F^]UF^33]ËF^NF 3ɺp^N ˋM3^оMFNVMvFu\؋N;ȉ^sv FDƋv3]ËF;Fu)~ D3ۋNȋVӉMNjv3]ËF ;FsM3+F^M]ËF ;FuUvt^;vM3+F^M]ËvD3F^Dt^;u GD3]ËF^ FN^ F v3ۋFDÃ]UMt0MF]øPB]UMt0MF]øP]U~ u PPvPF]UM0t]ËFM]U Pu33CÃ]Uv F 0Ft)LKۉLx6LL0ԸLPvơLHLx6LL 0 LP P]UFv F 0Ft(v\K\x 0 vvtFNjF]Uv <t(~=t F F0 0+ˉNt׋]Ëv <t]Ëv<t]3]U~t5v <t-~=t%F F0 0+ˉNt]NŃ~u v <t]Ëv<t]3]P3XPx+u3;twH XUfFV!]UvD0%t3]Ëv| tD0%u t tF vDD0 D3D DD]Uv D0%0t]Ëv | uD0%uVt]Ëv D0%tF)v D0%t]Ëv D0 DD Fv D 0vtPߋFyv D0 D~uv D0 DF~ v DDv D0%0t]Ëv DHDx 0 v ؋Ã]U Fv\00Ft ]Ëv| ujD0%u`~u3 ]vt ]ËvD0 DD DHDx^0 vvv؋à ]ËvD0%t8~u3 ]ËFv\ 0F v NQSFFFvD0%t ]ËvD0 D~t2|~,DHDx^0 vvFv+DF tD 0v tPNFF~uvD0 DF;F tvD0 DvD DDF=t \K\x 0 vvCvD0%0t ]Ã~u3 ]ËF ]Uv| tD0%u3]6M*vDuK ]áMvD D0%D3DD]UN u33F u33NFyy 333o3v3yڃux ;r+COu3ɋ!;r u;r+COu΋3FtFtڃ]U(FF v,DyN%u |u |u FuNF txvN }F ϋFxA=7FF^NV ֊͊ߊĿOu% F 3333ҋv4Ft D\Lv2F(]þ@3^NV~ = r- GNu^NV~ ËF F FЉFFЉFFЉFË3Ã3ɿCK[ÃCOOyËF^NV NuF^NV Ã~,t F,F,V0FN.uNFtLattice C 2.100QInvalid stack size $Invalid I/O redirection $Insufficient memory $*** STACK OVERFLOW *** $  GPIB.COMĿĿ   SELECT (use right/left arrow keys): ENTER (directly from the keyboard): 0123456789ABCDEF . ............................... ??????? AAAAAQAAEOOOOOOOOMMAIIIIIIAAAAAAAAAAAAAAAAAAAAAAAiiiiiiaaaaaaaaaaaaaaaaaaaaAAA Invalid character for option ring Invalid character for current field Invalid data in current field Cannot rename a board    Cannot (dis)connect a board Unfinished task in progress INTERNAL ERROR: Unrecognized code No handler file present Unable to open file Unable to locate data structures File I/O error: READ/WRITE/SEEK Wrong revision level Too many boards in file Too many devices in file GHn,Rx6IBM PCIBM PC-XT/portableIBM PC-ATIBM PCjrAT&T PCCompaq PCTI ProfessionalIBM PC compatiblep -2>223b3334Bad data on input line. Changes saved. To activate changes, reboot your system with the handler file %s in the root directory of your boot drive. Handler file unchanged. *** Press any key to continue ***Unrecognized machine -- IBM PC compatible assumed. Press any key to continue...*** Press any key to return *** NONENONE NOTYPEFile: %s Scanning file for data...Instruments$Boar$Devireading. CAPACITY: %d Board(s) %d Device(s)Ŀ;This address is used to compute theunique I/O addresses which identifythe board or device on the GPIB.* Adding 20H to the primary address forms the Listen Address (LA).* Adding 40H to the primary address forms the Talk Address (TA).EXAMPLE: Selecting a primary addressof 10H yields the following:10H + 20H = 30H (Listen address)10H + 40H = 50H (Talk address)Valid listen addresses -- 20H to 3EHValid talk addresses ---- 40H to 5EH+++ +' +K +l +++--+3+XSelecting a secondary address causesextended addressing to be used bythe handler when addressing theboard or device.EXTENDED ADDRESSING means that theboard or device must receive bothits primary address and secondaryaddress in sequence before becomingaddressed for I/O.Selecting "NONE" will disable theuse of extended addressing by thehandler.Valid secondary addresses range from60H to 7EH.++++9 +J +m + ++++ +,+5+ZThis setting is an approximation ofthe amount of time that may elapsebefore completion of an I/O functionor occurrence of a specified event.The timeouts are as follows:TNONE disabled T100ms 100 msecT10us 10 usec T300ms 300 msecT30us 30 usec T1s 1 secT100us 100 usec T3s 3 secT300us 300 usec T10s 10 secT1ms 1 msec T30s 30 secT3ms 3 msec T100s 100 secT10ms 10 msec T300s 300 secT30ms 30 msec T1000s 1000 sec++++, +P +m +m +++++#+G+k++m < < <<<<<<<<<Some devices are programmed to havean I/O operation terminate followingthe transmission of a selected byte,such as the ASCII linefeed (0AH) orsemicolon (';') character.This byte, called the EOS byte, maybe any 8-bit value from 00H to FFH.NOTE: The handler software does NOTautomatically append the EOS byte tothe end of data strings (the user'sprogram must explicitly do this).The designation of the EOS byte hereis only for the purpose of informingthe handler of its value so that I/Otermination is handled correctly.+\+++ + + +- +Q +u + + + +!+*!+O!Terminate a Read on EOS- a yesresponse will cause the interfaceboard to terminate a data transferwhenever it receives the EOS byte.Set EOI with EOS on Writeboard to send the GPIB END messagewhenever it sends the EOS byte.Type of compare on EOS- A 7-bitcompare will ignore the value ofthe most significant bit. An 8-bitcompare uses the entire byte. Thisfield is only meaningful if a yesresponse is entered for at leastone of the two fields above.+*-!E!-!-"-7" +* -Z" G! -! -t" -"+*-"D"-"-"-#-?#-a#-#A GPIB interface may signal the endof a data transfer by sending theGPIB uniline message END. This isaccomplished by asserting the EOIline along with the transmissionof the last byte.A yes response in this field willcause the interface board to set EOIwith the last byte of every datawrite to the GPIB.+$$+H$+j$+$ +$ +$ +$ +%+(%+I%This software package may be usedwith either of two boards:* Nat  ional Instruments GPIB-PC2A* National Instruments GPIB-PC2You must specify the correct boardmodel here so that the handler willuse the appropriate hardwareaddressing scheme.+%+%+% +% +& +?&+c&+&The System Controller (SC) in a GPIBsystem is the device which maintainsultimate control over the bus.There should be at most one devicedesignated SC in any GPIB system.In general, the GPIB-PC card shouldbe designated the System Controllerby responding yes to this field. Insome situations, however, such as ina network of computers linked by theGPIB, an interface board should bedesignated NOT System Controller. Insuch cases you should respond no tothis field.+&+&+' +3' +V' +x' +'+'+'+ (+.(+Q(+v(+(The LLO message is used by the GPIBController-in-Charge to "lock out"devices on the bus from returning tolocal control while being programmedremotely via the GPIB.Any devices accessed with high-levelfunction calls will automatically beplaced in the Remote State (REMS) bythe handler software. A yes responseto this field will further cause thedevices to be placed in the Remotewith Lockout State (RWLS).+)+$)+G)+l) +) +) +) +)+*+<*+a*+*The base I/O address for board GPIB0is initially configured to match theas-shipped address setting on theinterface board itself. If you havechanged the address setting on theboard from the original factorydefault, enter the new address herethat corresponds to the new setting.The interface board may be assignedany one of the legal I/O channel orport addresses for the GPIB-PC modelselected (PC2A or PC2).+*+++8++Z+ +~+ ++ ++ +++ ,+.,+R,+w,The interface board may use any DMAchannel provided that channel is notbeing used by another device.Selecting "NONE" will disable DMAcapability and cause programmed I/Oto be used for all data transfers.+,+-+'- +E- +g- +-This field must be set to the samevalue as the interrupt level jumpersetting on the GPIB-PC board itself.Any valid interrupt level may beselected, provided that level doesnot conflict with other equipment.In most cases, this jumper settingreflects the actual interrupt levelselected. The jumper setting on theTI Professional, however, has thefollowing correspondence.Jumper Setting --- 2 3 4 5 6 7: : : : : :Interrupt Level -- 0 1 2 4 5 6+-+-+. +D. +e. +. +.+.+.+/+8/+R/>v/+/The use of three-state drivers onthe GPIB-PC allows you the option ofselecting a high-speed data settlingtime for faster GPIB transfers.Some devices, however, are unable touse the high-speed timing. If yoursystem uses such devices, you shouldprobably select the low-speed timingby responding no to this field.+0+(0+M0+r0 +0 +0 +0 +0+$1Under normal operation, the handlersoftware will automatically conducta serial poll of the devices on theGPIB whenever the Service Requestline (SRQ) is asserted.If this feature is incompatible withsome devices in your system, you maydisable Auto Serial Polling with ayes response to this field.Normally, this feature will notconflict with devices that conformto the IEEE-488 specification.+1+1+1+1 +2 +&2 +K2 +p2+2+2+2+2 Primary GPIB Address Secondary GPIB Address Timeout Setting  EOS (End-of-String) Byte EOS (End-of-String) Modes EOI (End-or-Identify) Signal GPIB-PC Model System Controller Local Lockout (LLO) Message Base I/O Address Setting DMA Channel Interrupt Jumper Setting High-speed vs. Low-speed Timing Automatic Serial Polling u3333 4 4 434Y444445=5c5~fr!###\%&(*,-/D13HELP: Device MapTERMS AND EXPLANATIONS:* An interface board is associated witheach Device Map. This board, named atthe top of the screen, is called the"currently active board".* One interface board is associatedwith each device you use. This boardis called the "access board" for thatdevice. By default, 16 devices areconnected to access board GPIB0.* The field preceding each device namein the map shows the access boardnumber for that device (e.g. "0" forboard GPIB0). This field is empty ifthe device has been discon  nected.FUNCTIONS:Renamethe selected device. Type in the new name in response to theprompt at the bottom of the screen.(Dis)connectthe selected device toor from the currently active board.Editor examine the characteristicsof the selected board or device.Exitthe program. If you made anychanges, you will be asked if theyshould be saved to the disk.NOTE: The TI Professional uses up/down arrow keys for PgUp/PgDn. 5556A6 f6 6 6 66737Z7|777+7+727+8+88 +\8 8i8 +8 +8 08+8+808+ 9+.9+K9+p9HELP: CharacteristicsEXPLANATIONS:* There are two types of input fields:(1) Option Rings - indicated by ' '.Use the right/left arrow keysto select new values.(2) Direct Input - indicated by thepresence of a cursor. Use thekeyboard to enter new values.* The range of valid input values for a selected field appears to the rightof that field. (H = Hexadecimal) * You are not allowed to exit a fieldwhile it contains invalid data.* Use the up/down cursor arrow keysto select a different field.* Use the PgUp/PgDn keys to displaya different board or device.Explain Field.Display an expandedexplanation of the current field.Reset Value.Reset the current fieldto the value it contained when itwas last selected.Return to Map.Return to the DeviceMap for the currently active board.^:t:::# : : ; &;D;b;;;;;+<-@<+]<-< +7 +< :<+<+<8<+=+*=+==:L=+a=National Instruments GPIB-PC Software Configuration Utility, Rev C.0.Copyright (c) 1984 National Instruments, Inc. All rights reserved.@>>(((   ! # %'(    1 /-+,/National Instruments999?;`3Device Map for Board * Use cursor control keys to select a device or board.* Use function keys below to select desired action.* Use PgUp/PgDn to display maps for other boards.F1: Help F4: Rename F5: (Dis)connect F8: Edit F9: Exit?    @C@w@(((@((((((( ( ( ( ( ((((((((((B(Board CharacteristicsBoard:F1: Help F2: Explain Field F6: Reset Value F9: Return to MapB(AABDevice CharacteristicsDevice:Access:B(vBBBB~`TNONET10usT30usT100usT300usT1msT3msT10msT30msT100msT300msT1sT3sT10sT30sT100sT300sT1000sBBC CCCC"C(C.C5C' 1 to 3; NONE disables 2 to 7 yes or no PC2A or PC2 7 or 8 bit (ASCII or Binary) Type in new name, then press RETURN Type 'y' or 'n', then press RETURN  bb"Bb 000H to 3F8H (increments of 8) 02E1H to 62E1H (increments of 2000H) 1, 2, or 7  Primary GPIB Address Secondary GPIB Address Timeout setting EOS byte Terminate Read on EOS Set EOI with EOS on Write Type of compare on EOS Set EOI w/last byte of Write GPIB-PC Model Board is System Controller Local Lockout on all devices Disable Auto Serial Polling High-speed timing Interrupt jumper setting Base I/O Address DMA channel EBC FBC$FBbCD5FB*D ?FCD VFCD qFCD FCDFCD FCD FCDFCD GCD GBvD :GZEzE LGBPDEBC FBC$FBbCD5FB*D ?FCD VFCD qFCD FCDDevice name: bIE@Save changes? I4Econ:CON:prn:PRN:lst:LST  :lpt:LPT:lpt1:LPT1:aux:AUX:com:COM:com1:COM1:rdr:RDR:pun:PUN:nul:NUL:null:NULL:rwaCan't open stdin file Can't open stdout file ((((( H ((((( H 0123456789ABCDEFMZ&D CQ + ظCм0! u\>|'&,n t>l3u uG>p& 2$F&>}<t<=tA< t< uI3u:2ItF&< t< t GĀ tͺ;3It.F&< t&< t",0|(< $r rrr2r tB늺rpBہwBr'&+u r;w؎ЌQã`d&+vϱË%fh{' uZ3P>l>p|&5\&lnڋʃ+6cG6 G&6FG6&P'>|L!˴ !>|L!3Pˡ-ື !>|L!ˀ>| FL!-U@Pz3P7]Ur;&w~u0 X@@PVP]Utr;&wsFxR6RP6R~ tJFFFt"FPtFNt FP >Tt6TdT뜃t]Ur;&wFP1TP4uFVP*TPu\P ]ËF]Ur;&w^SFtF;F uFv]ËF3]Ur;&wZ3^SFFvFXP6FyZiP ]ø]P3]P3]T+T-T!TAT.;u.y릱FF0F0^ S1TSPJt P]ÍF P1TPtF F Pt3]FF0^S1TSPuP(]ËFF F0VSATSPF uyP]á^0N Q"TQSF uP]ËF F8SHDFABMnlND .;0u.2yVPTPuPm]ø PvFP]Ur;&wUv v Ft>RtP3]ËFcPmlPbaPWVPLKZP P87'P-,S!H DFAN.;,u..yP6R0t?3]ËF]Ur;&wtVPTPtv ]v 1TPt]øVP(TP}FVPATPkt'j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~u v <t]Ëv<t]3]P3XPx+u3;twH XUvD0%t3]Ëv| tD0%u t tF vDD0 D3D DD]Uv D0%0t]Ëv | uD0%uVt]Ëv D0%tF)v D0%t]Ëv D0 DD Fv D 0vtPFyv D0 D~uv D0 DF~ v DDv D0%0t]Ëv DHDx 0 v ؋Ã]U Fv\00Ft ]Ëv| ujD0%u`~u3 ]vt ]ËvD0 DD DHDx^0 vvv؋à ]ËvD0%t8~u3 ]ËFv\ 0F v NQSFnFFvD0%t ]ËvD0 D~t2|~,DHDx^0 vvFv+DF tD 0v tPFF~uvD0 DF;F tvD0 DvD DDF=t \K\x 0 vvCvD0%0t ]Ã~u3 ]ËF ]Uv| tD0%u3]6HEvDuC ]áHEvD D0%D3DD]UN u33F u33NFyy 333o3v3yڃux ;r+COu3ɋ!;r u;r+COu΋3FtFtڃ]Lattice C 2.10HInvalid stack size $Invalid I/O redirection $Insufficient memory $*** STACK OVERFLOW *** $ibcmdaibwrtaibrdaibstopibcmdibwrtibrdibwrtfibrdfibwaitwibrppibdiagibonlibrscibsicibsreibrsvibpadibsadibistibdmaibeosibtmoibeotibgtsibcac$ibpokeprintibfindsethelpeqbufferibxtrcibtrgibclriblocibpctibppcibbnaibrspSvSlAXSqSgASFbF] MM B{An%n+1n7N=NCNI  nOnUN[NangnmnsF uN|S DD H4n n NA ND B0EDVREARGESACECICEABOENOLEADRENEBEDMAEBTOEOIPECAPEFSOEOWNEBUSESTBESRQ6;@EJOTY^c h m r w |dcasdtaslacstacsatncicremlokcmplrqssrqiendtimoerrbit0bit1bit2bit3bit4bit5bit6bit7bit8bit9bit10bit11bit12bit13bit14bit15 @ @"', 1@6;@EKQW ]@cNational InstrumentsInterface Bus Interactive Control Program (IBIC) Rev C.0Copyright (C) 1984 National Instruments, Inc.All rights reserved.Type 'help' for help.Use IBFIND to initially open a board or device.Use SET to select an already opened board or device.23H22  %s: '*' expectedBad function. Enter 'help' for help abortTrailing garbage command file error enter number: enter byte count: enter filename: enter board/device name: enter help topic keyword: enter string: Invalid mask bitNon-terminated stringNumber syntax !*()+-><0123456789ABCDEF%s Device not open -- try IBFINDCannot open fileCannot alloc bufferToo many outstanding asynchronous callsUse IBFIND to open a deviceInvalid deviceToo many boards/devices open[%4x] ( %s ) error: %derror: %s (%d) previous value: %d count: %d Poll: 0x%x bad format (must be 0,1 or 2)buffer: (off) buffer: %c%2x %c >>> Invalid help topicFor information on these topics, enter the keyword shown:Keyword Topic Keyword Topic------- ------------------------- + ------- ---------------------------------DEVICE GPIB-PC device functions | I/O Data Input/Output functionsBOARD GPIB-PC board functions | CONTROL Controller functionsSTATUS Status word (IBSTA) codes | POLL Serial & Parallel Poll functionsERROR Error (IBERR) codes | RECONF Handler reconfiguration functionsAUX IBIC Auxiliary functions | OTHER Other GPIB-PC functionsFor argument and syntax rules of these GPIB-PC and Auxiliary functions,enter the function name: GPIB-PC Functions Auxiliary Functions---------------------------------------------- -------------------ibbna ibeos ibonl ibrdf ibsic ibwrt set n*ibcac ibeot ibpad ibrpp ibsre ibwrta ! n* !ibclr ibfind ibpct ibrsc ibstop ibwrtf - printibcmd ibgts ibppc ibrsp ibtmo + eibcmda ibist ibrd ibrsv ibtrg $ qibdma ibloc ibrda ibsad ibwait  R . ~ % t W3 DATA I/O FUNCTIONS (functions that send/receive device-dependent messages) Synchronous I/O (call returns after I/O completes):ibrd v Read v data bytes and display on screenibwrt string Write data bytes from string Asynchronous I/O (call returns after I/O begins):ibrda v Read v data bytes and display on screenibwrta string Write data bytes from stringibwait (cmpl timo) Wait for I/O completion or timeoutibstop Abort I/O Synchronous File I/O:ibrdf flname Read data bytes into a fileibwrtf flname Write data bytes from a fileDo you need the syntax rules for string, v, and flname? (y/n) Syntax Rules for I/O Function Arguments:string Replace with a list of ASCII characters, hex or octal bytes, or special symbols, enclosed in double quotes. An octal byte is preceded by a backslash. A hex byte is preceded by backslash x. The two special symbols are \n for newline and \r for return. "\xD "\15 and "\r" are equivalent strings. Example: ibwrt "f2r3t0x" OR ibwrta "   \xFF0\r\n"v Replace with a hex, octal, or decimal integer. Hex numbers must be preceded by zero and x (e.g., 0xD). Octal numbers must be preceded by zero only (e.g., 015). Other numbers are assumed to be decimal. Example: ibrd 20 OR ibrda 500flname Replace with the DOS pathname for the file Example: ibrdf estscope.set OR ibwrtf b:printer.buf   @~  0c    S  e= {Z  GPIB CONTROLLER FUNCTIONS System Controller Functions:ibsic Send Interface Clear for 200 microsecondsibsre [v] Set Remote Enable if v is non-zero; else clear the signalibrsc [v] Request System Control if v is non-zero; else release control Controller-in-Charge Functions:ibcac [v] Become Active Controller: Take control synchronously if v is non-zero; otherwise, take control asynchronouslyibclr Send the Selected Device Clear command to the device.ibcmd string Send commands synchronously from stringibcmda string Send commands asynchronously from stringibgts [v] Go to Standby: Shadow handshake and holdoff on END if v is non-zero; else do not shadow handshake and do not holdoff.ibloc Send the Go To Local command to the device.ibpct Pass control to the device.ibtrg Send the Group Execute Trigger command to the device.Do you need syntax rules for [v] and string? (y/n) is preceded by a backlash. A hex byte is preceded by \r for return. "\xD "\15 and "\r" are equivalent strings.[v] This is an optional argument and if omitted, the value is 1. Replace with a hex, octal, or decimal integer. Hex numbers ~  !j  <|0{+ p  1|Z DEVICE FUNCTIONSThese functions operate on the selected GPIB device identified in the IBICprompt rather than on a GPIB-PC interface board.ibbna Change access board | ibrda Read data asynchibclr Clear internal functions | ibrdf Read data to fileibeos Change/disable EOS mode | ibrsp Return Serial Poll responseibeot Enable/disable END message | ibsad Change/disable Sec Addressibfind Open device | ibstop Abort asynchronous I/Oibloc Go to Local | ibtmo Change/disable time limitibonl Place device on/offline | ibtrg Trigger selected deviceibpad Change Primary Address | ibwait Wait for selected eventibpct Pass Control | ibwrt Write dataibppc Parallel Poll Configure | ibwrta Write data asynchronouslyibrd Read data | ibwrtf Write data from fileFor argument and syntax rules of any function, ask for help, e.g., help ibrd  8 =$qE  BOARD FUNCTIONSThese low level functions operate on the selected GPIB0 or GPIB1 interfaceboard identified in the IBIC prompt, rather than on a GPIB device.ibcac Become Active Controller | ibrd Read dataibcmd Send commands | ibrda Read data asynchibcmda Send commands asynch | ibrdf Read data to fileibdma Enable/disable DMA | ibrpp Conduct Parallel Pollibeos Change/disable EOS mode | ibrsc Request/release System Ctlibeot Enable/disable END | ibsad Change/disable Sec Addressibfind Open board | ibsic Send IFCibgts Go to Standby | ibsre Set/clear Remote Enableibist Set/clear ist flag | ibstop Abort asynchronous I/Oibloc Go to Local | ibtmo Change time limitibonl Place board on/offline | ibwait Wait for eventibpad Change Primary Address | ibwrt Write dataibppc Parallel Poll Configure | ibwrta Write data asynch | ibwrtf Write data from file R  !K!!! "o"""G###$Z$$  IBIC AUXILIARY FUNCTIONSset bdname Select active device or board. Replace bdname with symbolic name of new device or board, e.g. set dev2.help [option] Display help information; if an option is omitted, a menu of options appears.- Turn OFF display of   status, error, count, and data+ Turn ON display of status, error, count, and datan* function Execute function n times. Replace function with correct function syntax.n* ! Execute previous function n times$ flname Execute indirect file. Replace filename with DOS pathname of a file that contains IBIC function to be executed.print string Print string on display. Replace string with a list of ASCII characters, octal or hex bytes, or special symbols, enclosed in quotes. An octal byte is preceded by back- slash (e.g., \15); a hex byte by backslash and x (\xD). The two special symbols are \n for newline and \r for return. For example, print "Turn the meter on now."e Exit IBICq Exit IBIC % L%%% &K&&&'A'u'' (T(((4)|))) RECONFIGURATION FUNCTIONS (functions that change software parameters in the handler)ibbna bname Change the device's address board to bname (GPIB0 or GPIB1).ibdma [v] Enable DMA if v is non-zero; else, enable programmed I/O.ibeos v Change or disable EOS mode. The bit pattern of v= 0 0 0 C B A 0 0 E7 E6 E5 E4 E3 E2 E1 E0, where E7-E0 is the EOS character; A = 1/0 to terminate/not terminate read when EOS is detected; B = 1/0 to send/not send END when EOS is written;  C = 1/0 to use all 8/lower 7 EOS bits (byte/ASCII character).ibeot [v] If v is non-zero/zero, do/do not send END with last data byte.ibpad v Change primary GPIB address. Low 5 bits of v is new address.ibsad v Change or disable secondary GPIB address. To enable, set v to valid secondary address (MSA). To disable, set v to zero.ibtmo v Change time limit as follows (times approximate): v= timeout= v= timeout= v= timeout= v= timeout= 0 no limit 5 1 msec 10 300 msec 15 100 sec 1 10 usec 6 3 msec 11 1 sec 16 300 sec 2 30 usec 7 10 msec 12 3 sec 17 1000 sec 3 100 usec 8 30 msec 13 10 sec 4 300 usec 9 100 msec 14 30 sec **_* **9+z+++-,m,,-R---(.p...F/}/ SERIAL POLL FUNCTIONSibrsp Display status response from the device. If a stored response is unavailable, poll the device to obtain its current status.ibrsv v Change the boards status response to v; assert SRQ if hex 40 bit is set. PARALLEL POLL FUNCTIONSibrpp Conduct a poll and display response.ibppc v Configure device or board for polling; v is valid Parallel Poll Enable or Disable (PPE or PPD) command.ibist [v] Set boards individual status bit if v is non-zero; otherwise, clear the bit.Syntax rules for v and [ ]:[ ] Argument is optional and if omitted, a value of one is used. / 0b000 1 E1x111H2 e2 {Z2 MISCELLANEOUS FUNCTIONSibfind bdname Open the device or board and pass unit descriptor to IBIC.ibonl [v] Place device or board online (enabled) if v is non-zero; otherwise, place offline (disabled).ibstop Abort asynchronous I/O operation.ibwait mask Wait for event or condition specified in mask. Bit assignments and mnemonics of mask are the same as the status word IBSTA (see STATUS help).Syntax rules for v, [ ] , and mask:mask Replace with hex, octal, or decimal integer (same rules as v) or with list of mask bit mnemonics enclosed in parentheses. For example, these are equivalent: ibwait 0x4900 and ibwait (timo rqs cmpl) 2 *3s3334Z44 4 {Z24E555 STATUS WORD (IBSTA) CODESMnemonic Bit  Hex Type Fnct Description Position Value dev/board-------- -------- ----- --------- ------------------------------------- ERR 15 8000 db GPIB error TIMO 14 4000 db Time limit exceeded END 13 2000 db GPIB-PC detected END or EOS SRQI 12 1000 b SRQ on RQS 11 800 d Device requesting service CMPL 8 100 db I/O completed LOK 7 8   0 b GPIB-PC is in Lockout State REM 6 40 b GPIB-PC is in Remote State CIC 5 20 b GPIB-PC is Controller-in-Charge ATN 4 10 b Attention is asserted TACS 3 8 b GPIB-PC is Talker LACS 2 4 b GPIB-PC is Listener DTAS 1 2 b GPIB-PC is in Device Trigger State DCAS 0 1 b GPIB-PC is in Device Clear State .6 ^666 7:7t777#8W888 9\999: ERROR (IBERR) CODESMnemonic Decimal Explanation Value-------- ------- ----------------------------------------------------- EDVR 0 DOS error (IBCNT or Count has error code) ECIC 1 Function requires GPIB-PC to be Controller-in-Charge ENOL 2 No Listeners detected on write function EADR 3 GPIB-PC not addressed correctly EARG 4 Invalid argument to function call ESAC 5 GPIB-PC not System Controller as required EABO 6 I/O operation aborted ENEB 7 Non-existent GPIB-PC board EOIP 10 I/O started before previous operation completed ECAP 11 No capability for operation EFSO 12 File system error (IBCNT or Count has error code) EBUS 14 Command error during device call ESTB 15 Serial Poll status byte lost ESRQ 16 SRQ stuck in on position : ::: D;;; B>menudeviceboardstatuserrori/oibrdibwrtibrdaibwrtaibrdfibwrtfcontrolibsicibsreibrscibcacibclribcmdibcmdaibgtsiblocibpctibtrgreconfibbnaibdmaibeosibeotibpadibsadibtmopollibrspibrsvibrppibppcibistotheribfindibonlibstopibwaitauxset!-+$n*n* !printeqhelp>Z>( >$>^:>r>>*>*>*>*>*>*>*>>>>?? ????%?+?1?/8?/>?/D?/J?/P?/V?/\?/b?2g?2m?2s?2y?2?2?6?6?6?6?6?)?)?)?)?)?)?)?)?)?)?)?)@%c  \ (c) Copyright 1984, National Instrumentscon:CON:prn:PRN:lst:LST:lpt:LPT:lpt1:LPT1:aux:AUX:com:COM:com1:COM1:rdr:RDR:pun:PUN:nul:NUL:null:NULL:rwaCan't open stdin file Can't open stdout file ((((( H ((((( H -#-?#-a#-#A GPIB interface may signal the endof a data transfer by sending theGPIB uniline message END. This isaccomplished by asserting the EOIline along with the transmissionof the last byte.A yes response in this field willcause the interface board to set EOIwith the last byte of every datawrite to the GPIB.+$$+H$+j$+$ +$ +$ +$ +%+(%+I%This software package may be usedwith either of two boards:* Nat  print "this is test1 of the ibic $ function" ibfind gpib0 ibfind t7d20 ibclr ibrsp ibwrt "ID?" ibrd 33 print "end of indirect file" }zO 'IBCONF EXE QI DIBIC EXE \] =&IBIC$1 l print "IBIC Example - Using device function calls" print "Access device DVM that is assumed to " print " be configured in handler." ibfind DVM print "Clear the device. User should check for ERR" print "on each IBIC GPIB call to be safe." ibclr print "Write the function, range, and trigger " print "source instructions to the DVM." ibwrt "F3R7T3" print "Trigger the device." ibtrg print "Wait for the DVM to set RQS or for a" print "timeout; if the current timeout limit is" print "too short, use ibtmo to change it." ibwait (TIMO RQS) print "It is assumed here that neither a timeout" print "nor an error occurred, hence ibwait must have" print "returned on RQS. Next serial poll the device." ibrsp print "Now examine the status byte. If the response" print "is 0xC0, the DVM has valid data to send;" print "otherwise, it has a fault condition to report." print "Assuming the data is valid,(the response was 0xC0)," print "read the measurement." ibrd 16 print "To close out a programming sequence," print "reset the device, and call ibonl to " print "place the device offlne." ibclr ibonl 0 print "Return to DOS." exit tJFFFt"FPtFNt FP >Tt6TdT뜃t]Ur;&wFP1TP4uFVP*TPu\P ]ËF]Ur;&w^SFtF;F uFv]ËF3]Ur;&wZ3^SFFvFXP6FyZiP ]ø]P3]P3print "IBIC Example - Using board function calls" print "Make board GPIB0 the current board." ibfind GPIB0 print "Send the IFC (interface clear) message" print "to all devices. User should check for " print "ERR on each IBIC GPIB call to be safe." ibsic print "Turn on the REN (remote enable) signal." ibsre 1 print "Inhibit front panel control with the LLO" print "(local lockout) command, place the DVM" print "in remote mode by addressing it to" print "listen, send the DCL (device clear)" print "message to clear internal device" print "functions, and address GPIB-PC to talk." ibcmd "\021#\024@" print "Write the function, range, and trigger" print "source instructions to the DVM." ibwrt "F3R7T3" print "Send the GET message to trigger a" print "measurement reading." ibcmd "\010" print "Wait for the DVM to set SRQ or for a" print "timeout; if the current timeout limit is" print "too short, use ibtmo to change it." ibwait (TIMO SRQI) print "It is assumed here that neither a timeout" print "nor an error occurred, hence ibwait must " print "have returned on SRQ. It is also assumed" print "that the DVM is the only device attached" print "to the bus. Next do a serial" print "poll. First unaddress bus devices and" print "send the SPE (serial poll enable) command," print "followed by the DVM's talk address, and" print "the GPIB-PC's listen address." ibcmd "?_\030C " print "Now read the status byte. If it is 0xC0," print "the DVM has valid data t   o send; otherwise" print "it has a fault condition to report." ibrd 1 print "Complete the serial poll by sending the" print "SPD (serial poll disable) message." ibcmd "\031" print "Since the DVM and GPIB-PC are still" print "addressed to talk and listen, the" print "measurement can be read as follows." ibrd 16 print "To close out a programming sequence, send" print "IFC to initialize the bus and disable the" print "hardware and software. " ibsic ibonl 0 print "Return to DOS"  exit KZP P87'P-,S!H DFAN.;,u..yP6R0t?3]ËF]Ur;&wtVPTPtv ]v 1TPt]øVP(TP}FVPATPkt'jP6y Ft Fָ7P]øVP)TP3Fv ]Ur;&wF F #60FFv"TdF xIHPs]F @0 xu F 60Pt860v PFxF n FF ĸ^P]Ëv1T60Z ,i : IBM BASICA Declarations IBINIT1 i : IBINIT2 IBINIT1  : Lines 1 through 6 MUST be included in your program. "bib.m",IBINIT1 IBINIT1(IBFIND,IBTRG,IBCLR,IBPCT,IBSIC,IBLOC,IBPPC,IBBNA,IBONL,IBRSC,IBSRE,IBRSV,IBPAD,IBSAD,IBIST,IBDMA,IBEOS,IBTMO,IBEOT,IBRDF,IBWRTF)0 IBINIT2(IBGTS,IBCAC,IBWAIT,IBPOKE,IBWRT,IBWRTA,IBCMD,IBCMDA,IBRD,IBRDA,IBSTOP,IBRPP,IBRSP,IBDIAG,IBXTRC,IBRDI,IBWRTI,IBRDIA,IBWRTIA,IBSTA%,IBERR%,IBCNT%) ************** END DECLARATIONS FOR GPIB INTERFACE **********************d: CHA41.BAS Version 1.0 8 March 85n: Copyright (c) 1984, Tektronix, Inc. All rights reserved.;x:---------------------------------------------------------------- * 'begin initializationsBD%:DEV%BD$"gpib0": IBFIND(BD$,BD%) :set up GPIB interface board 0$ IBSIC(BD%) :Send Interface ClearoDEV$"T7D20": IBFIND(DEV$,DEV%) :set up Tek 7D20 on board 0 :clear screen * begin interaction with operator )"GPIB TALKER" :program titleN "This program talks to one instrument at a time using "; "its GPIB address." "The terminator is EOI by default.": ) "INSTRUCTIONS" "1. finish each entry by pressing the ENTER key." "2. at T/C/E ? enter T to Talk to a device"N "  C to Change addresses" " E to End the program": "BEGIN:"" "enter PRIMARY ADDRESS ";, "(0-31, any other # to End):";6 ADPRI% :GET PRIMARY ADDRESSe@ ADPRI%  ADPRI%  : quit if addr not validJ IBPAD(DEV%,ADPRI%) : send addr to GPIB cardT; "T/C/E ? :",TL$ :PROMPT OPERATOR FOR OPERATION7^ TL$"t" TL$"T" |  : am I to Talk?h TL$"c" TL$"C"  : am I to Change addresses?r TL$"e" TL$"E"  :  : am I to End the program? | " ";: "STRING TO SEND:" ,A$ :TALK ROUTINE. Get commandT IBWRT(DEV%,A$) : T : write to GPIB device & rtn IBLOC (DEV%) :END. Go to Local.:: "Go to Local"; " (last addressed device responds to manual control again)"2 "PROGRAM ENDED": : program end messagesY "type RUN to restart program"~ "type SYSTEM to return to DOS"T~<tIC9876543210"_(.;yu.{y=F vD]U r;&w'F60="Fuau ]F60=\t#@0 ]F F FF F~}060SPFx^؉^Fʃ~t6D0FF~}060SPFx^؉^Fʃ~uS6  Z ,i : IBM BASICA Declarations IBINIT1 i : IBINIT2 IBINIT1  : Lines 1 through 6 MUST be included in your program. "bib.m",IBINIT1 IBINIT1(IBFIND,IBTRG,IBCLR,IBPCT,IBSIC,IBLOC,IBPPC,IBBNA,IBONL,IBRSC,IBSRE,IBRSV,IBPAD,IBSAD,IBIST,IBDMA,IBEOS,IBTMO,IBEOT,IBRDF,IBWRTF)0 IBINIT2(IBGTS,IBCAC,IBWAIT,IBPOKE,IBWRT,IBWRTA,IBCMD,IBCMDA,IBRD,IBRDA,IBSTOP,IBRPP,IBRSP,IBDIAG,IBXTRC,IBRDI,IBWRTI,IBRDIA,IBWRTIA,IBSTA%,IBERR%,IBCNT%) ************** END DECLARATIONS FOR GPIB INTERFACE **********************d: CHA42.BAS Version 1.0 8 March 85n: Copyright (c) 1984, Tektronix, Inc. All rights reserved.7x:---------------------------------------------------------------| * 'begin initializationsBD%: DEV%: RD$()BD$"gpib0": IBFIND(BD$,BD%) :set up GPIB interface board 0- IBSIC(BD%) :Send Interface ClearxDEV$"T7D20": IBFIND(DEV$,DEV%) :set up Tek 7D20 on board 0 :clear screen * begin interaction with operator )"GPIB TALKER/LISTENER" :program titlec "This program talks and listens to one instrument at a time using "; "its GPIB address." " The terminator is EOI by default.": ) "INSTRUCTIONS" "1. finish each entry by pressing the ENTER key."0 "2. at T/L/C/E ? enter T to Talk to a device"h " L to Listen to a device" " C to Change addresses" " E to End the program"": "BEGIN:", "enter PRIMARY ADDRESS ";,6 "(0-31, any other # to End):";o@ ADPRI% :GET PRIMARY ADDRESSJ ADPRI%  ADPRI%  : quit if addr not validT IBPAD(DEV%,ADPRI%) : send addr to GPIB cardJ^; "T/L/C/E ? :",TL$  :PROMPT OPERATOR FOR OPERATIONh TL$"t" TL$"T"  : am I to Talk?r TL$"l" TL$"L"  : am I to Listen?| TL$"c" TL$"C" " : am I to Change addresses?U TL$"e" TL$"E"  :  : am I to End the program? " ";: "STRING TO SEND:" ,A$ :TALK ROUTINE. Get command IBWRT(DEV%,A$) : ^ : write to GPIB device & rtn,RD$() :LISTEN ROUTINE. Set up RD$x IBRD(DEV%,RD$) : read GPIB unit DEV% to RD$ " ";IBCNT%;"char rcvd:"; : print rcvd message length RD1$(RD$,IBCNT%) : remove trailing blanksT RD1$: ^ : print rcvd message & return" IBLOC (DEV%) :END. Go to Local.:: "Go to Local"; " (last addressed device responds to manual control again)"2 "PROGRAM ENDED": : program end messagesY "type RUN to restart program"~ "type SYSTEM to return to DOS"+ ]Ur;&w60lSPx]Ur;&wQFv <tF 0;F uF]F߸]Ur;&woPvy33CÃ]Ur;&wF= ~ =~3@3]Ur;&w~.tvt v~t33@]Ur;&w~FF^;~.x0N 0;ىNt x0 ;uF]Fȸ]Uw]Ur;&w >Rt>Pt vPX N : TPG.BAS Version 1.0 25 January 1985: Copyright (C) 1985, Tektronix, Inc. All rights reserved.: See Section 7 of the GURU manual for documentationc:----------------------------------------------------------------------Rd ',i : initialize for GPIB interfaceon IBINIT1 ix IBINIT2 IBINIT1  "bib.m",IBINIT1@ IBINIT1(IBFIND,IBTRG,IBCLR,IBPCT,IBSIC,IBLOC,IBPPC,IBBNA,IBONL,IBRSC,IBSRE,IBRSV,IBPAD,IBSAD,IBIST,IBDMA,   IBEOS,IBTMO,IBEOT,IBRDF,IBWRTF) IBINIT2(IBGTS,IBCAC,IBWAIT,IBPOKE,IBWRT,IBWRTA,IBCMD,IBCMDA,IBRD,IBRDA,IBSTOP,IBRPP,IBRSP,IBDIAG,IBXTRC,IBRDI,IBWRTI,IBRDIA,IBWRTIA,IBSTA%,IBERR%,IBCNT%)7:-------------------------------------------------------------------------W: definition of variables A$() :procedure bufferBEEEP% :beeper flag 0=off=false -1=on=trueELF% :error log flag!DONE% :procedure done flagMSS% :single step flagFAIL% :operator input, numeric or ascii test failurePASS :procedure PASS #P% :index to procedure buffer)NG% :number of GPIB deviceseRE$"" :anticipated response from deviceRV$"" :actual response from device"F$"" :filename,I$"" :input string6R$"" :rename stringA@DEVICE$""  :last device accessedjJX% :temp variableTY% :temp variable^: also see standard definitions in DECL.BASh:-------------------------------------------------------------------------g|:------------------------------------------------------------------------- : main menu display and dispatcher " TPG.BAS V1.0 - a test procedure generator in BASIC "MAIN MENU:+" (1) Create a new procedureY" (2) Modify a procedure_" (3) Execute a procedure" (4) Single step a procedure" (5) List available procedures*" (6) Rename a procedureX" (7) Delete a procedure^&" (8) Utilities0" (9) Quit - return to BASIC:DN "Selection:";SEL% X SEL% v,&,, ,,j,,2,b el:-------------------------------------------------------------------------v:"Create a new procedure A$()""  :if prodedure in buffer then delete it:"Have you saved the current procedure (y/n)";I$@ ((I$,)"y") ((I$,)"Y") :make them save it if noFdDONE%::init done flagP%::reset step pointer "Please wait - clearing bufferA$(P%)"" :clear first step A$(P%)"" A$(P%)"":P%P%: ::clear rest of buffer "done";P% :reset step pointerA_ >::define resources DONE% :: there was an error in def resources  V::build a command step DONE%   :loop till end command  ::store procedure *Z4:------------------------------------------------------------------------->"First, we need to define the system resourcesHR"how many devices are on the GPIB";NG%\f NG% "more than 16, not allowed": > p Q NG%z"Device #";Q7"What is it's name";N$FDEVICE$N$LcA$(P%)"f "N$" "  : test to see if device is installedP%P% :update pointer for next device Q!:-------------------------------------------------------------------------U :save the procedure currently in the buffer "name of procedure - (default=no save) or (d:filename.pro):";F$ F$""  (,F$,".") F$F$".pro" :add extension if none there  F$ OUTPUT AS # :open disk file8 P% :start from beginning^  #,A$(P%) :put it out on disk| $P%P% :update pointer . A$(P%)""  :test for z end 8 # :close the file B!L:-------------------------------------------------------------------------B!V:"step #";P% :print the build menuH!`z!j"What function do you want this step to do?"!t!~" (P) Print a message to the operator!" * (W) Wait for operator input: (y)es (n)o (Q)uit or [enter]!'"" (S) Send a command to a deviceT"" * (N) Numeric acquisition and test"" * (A) ASCII string acquisition and test""" (D) Delay for a given number of seconds" #" (B) Branch to step #___ conditional or non-conditional4#" (C) Chain to another procedure:#o#" (E) End procedure - return to main menu.u## " * These input commands control the branch condition.##"function:"$(X%(" pwsnadbcePWSNADBCE",) :do the request$2 X% (&$< X% X%  X%U$F X% n,J,,,,,^,,@a$PP%P%g$Z$d:-------------------------------------------------------------------------$n " What is the message:";M$ : P command$xA$(P%)"p "M$%4%"device";DE$ : S command^% DE$"" DE$DEVICE$ : DEVICE$DE$r%"command:";CO$%A$(P%)"s "DE$" "CO$% h :: test command%%:get a measurement N command%"device:";DE$#& DE$"" DE$DEVICE$ : DEVICE$DE$?&"expected result:";RE$Y&"tolerance (x%)";TL$}&A$(P%)"n "DE$" "RE$" "TL$&  :test it&&: delay D command&" " enter delay period (seconds):";DL$',A$(P%)"d "DL$'6F'@DONE%:A$(P%)"e": : E command}'JA$(P%)"w" :W command'T'^:branch B command'h"branch on input (P)ass=yes (F)ail=no or (A)lways ";TY$(r (TY$)a TY$((TY$) )0(| TY$"" rC(" step #";ST$V( ST$"" r(A$(P%)"b "TY$" "ST$x(( "device";DE$ : A command( DE$"" DE$DEVICE$ : DEVICE$DE$( "expected response: ";RE$)A$(P%)"a "DE$" "RE$,)  :test command2)^) "procedure name (d:filename.pro):";F$n) F$"" ) (,F$,".") F$F$".pro")A$(P%)"c "F$)):-------------------------------------------------------------------------*&: "modify a procedure-*0EF%::end flag3*:Y*D " (I) Insert a step*N " (D) Delete a step*X " (R) Replace a step*b*l " (L) List procedure in internal form*v+ " (S) Save this procedure+O+ " (Q) Quit - return to main menuU+i+ " Selection:"+X%(" idrlsqIDRLSQ",)+ X% + X% X%X%+ X% ,\,,,,+ EF% + : ,:" enter step # to insert:";P%,PTEMP%P%E,:"Please wait - preparing to insertO, F$""_, F$,A$(P%)k, P%P%~,* F$"" ,4P%PTEMP%,>DONE%,H `,R,\: "enter step # to delete:";P%,f: "please wait - deleting step #";P% -pA$(P%)A$(P%)-zP%P%4- A$(P%)"" : pZ-: "enter step # to replace:";P%g-DONE%q- `w--EF%:-P%- " - P%,A$(P%)- A$(P%)"" A$(P%)"e" : P%P%: -M.:-------------------------------------------------------------------------s.: this is the main execute loop. I$"":SS% :disable single step. :"What procedure to execute -(default=no load) or (d:filename.pro):";F$. F$"" ~ /$ (,F$,".") F$F$".pro"0/. F$ AS #J/8 P%::reset pointerP/B i/L "loading procedure"y/V #,A$(P%)/` P%P%/j () "loading complete" : V /t #/~ / ELF% "error log file (d:filename.elf):";F$ :  0 F$"" ELF%00 (,F$,".") F$F$".elf"Q0 ELF% F$ OUTPUT AS #l0 :"starting execution0 PASS:: init pass #0 P%::reset pointer to first command0 DONE%::done flag reset0 2 ::execute current line 1 P% PASSPASS&1 P%P%::next line:1 ()  p1 ,: " (Q)uit or [enter] to continue";F$: ,1 F$"q" DONE%1 DONE% #: :  1 SS%:  ::set single step flag for execution,2( :-------------------------------------------------------------------------o22 "pass #";PASS,,"step#";P%,A$(P%) :heart of tpg execution2< SS% "Single Step pause - [Q]uit or [enter] to execute this step";I$2F I$"q" DONE%:2P A$(P%)"" DONE%: 3Z F$(A$(P%),)::isolate the functionP3d X%(,"fpwsnadebc",F$)::give it a number3n X%  , , ,h , , , , , , 3x 3 :-------------------------------------------------------------------------4 X%(,A$(P%)," ") : verify device specified is installed84 BDNAME$(A$(P%),,X%)R4 IBFIND(BDNAME$,BD%)n4 BD% DONE% : t4 4 "ERROR - ";BDNAME$;" is not installed4 " You need to use IBCONF and reboot to add device4 "press [enter] to continue";I$5 5 "operator message:"&5 ,95 (A$(P%),)C5 ,I5 Z5 BEEEP% ~5" FAIL% :clear condition flag5, ,56 "[y]es [n]o [Q]uit [enter] to continue";I$5@ ,5J (I$,)"N" (I$,)"n" FAIL% 6T I$"q" DONE%6^ )6h :Command t   o deviceM6r  ::open and verify deviceo6| DONE% :: exit if error6 WRT$(A$(P%),X%) :find command in buffer6 IBWRT(BD%,WRT$) : send it6 IBSTA%  7 "GPIB ERROR - device is installed but not on-line!":.7 QP% : QP%47 `7 :PRINT "Get a measurement and test itl7 FAIL%7  ::open and verify device7 DONE% :: exit on error7 Y%(X%,A$(P%)," ") : parse command string for parameters8 RE((A$(P%),X%,Y%X%)).8 TL((A$(P%),Y%))[8 RV$() :provide space for response8 IBRD(BD%,RV$) :read response from device8 IBSTA%  8 "GPIB ERROR - device is installed but not on-line!":8 QP% : QP%9 RV(RV$) :turn into a number[9 RV : :parse it (strip ascii header) if necessary9& (RV$) RV$(RV$,) : RV: : 90  9: ,: RV: , :print results9D RE RVRE(RETL #z) FAIL%:N RE RVRE(RETL #z) FAIL%@:X RE  RVRE(RETL #z) FAIL%l:b RE RVRE(RETL #z) FAIL%:l BEEEP% FAIL% :v FAIL% ELF% #,,,(PASS),(P%),A$(P%),(RE),(TL),(RV): : :delay: X%((A$(P%),)) ; Q% X%6; DELAY%  : :do nothing loop<; B; O; DONE%U; ; (A$(P%),,)"f" FAIL% P%((A$(P%),)):; (A$(P%),,)"p" FAIL% P%((A$(P%),)):< (A$(P%),,)"a" P%((A$(P%),)):< W< :-------------------------------------------------------------------------v< : verify response string< FAIL%:TL$" "<  :: verify if device ok<* DONE% :exit if bad<4 RE$(A$(P%),(BDNAME$)) :find argument=> RV$() :make space9=H IBRD(BD%,RV$) :read itO=R IBSTA% \ =T "GPIB ERROR - device is installed but not on-line!":=V QP% : QP%=\ RV$(RV$,(RE$)) :find data interested in - length of re$>f RE$RV$ FAIL%,>p ,: RE$,RV$: , :print resultsE>z FAIL% BEEEP% > FAIL% ELF% #,,,(PASS%),(P%),A$(P%),RE$,TL$,RV$> > > :chain command> F$(A$(P%),)> F$ AS #> P%? #,A$(P%) :load new procedure? P%P%(? () # :  2? P%8? ? :-------------------------------------------------------------------------?: "List available procedures?? "drive (A or B):";DR$?$ DR$"" DR$"b"?.DR$DR$":"?8 DR$ @B DR$(@L"[enter] to continue";I$.@V@`:-------------------------------------------------------------------------@j:"Rename a procedure@t@~"procedure to rename (d:filename.pro):";F$@ (,F$,".") F$F$".pro",A"new name for above procedure (d:filename.pro):";R$OA (,R$,".") R$R$".pro"_A F$ AS R$eAA:-------------------------------------------------------------------------A:"Delete a procedureAB"name of procedure to delete (d:filename.pro):";F$B8B (,F$,".") F$F$".pro"LB"deleting ";F$RBkB " ARE YOU SURE?";I$B (I$,)"y" F$BB(:-------------------------------------------------------------------------B2: "UtilitiesB<EF%CF8CP " (B) Beep ON/OFF currently ";BCZ ,aCd BEEEP% "ON" : "OFF"kCn ,qCxC " (E) Enable error log currently ";C ,C ELF% "ON" : "OFF"C ,D " (D) Display error log1D " (S) Summarize error log7DvD " (L) List current procedure file to printerD " (P) Print error log file to printerDD " (Q) Quit - return to main menuDE " Selection:";"EX%(" bedslpqBEDSLPQ",)3E X% HE X% X%X%oE" X% 6,J,^,,, ,E, EF% : 2 :loop til quitting timeE6 BEEEP% BEEEP% : BEEEP% :turn beeper off and onE@!FJ ELF% ELF% : ELF% :turn error logging on or off'FTKF^ :display the error log fileuFh"error log file (d:filename.elf)";F$Fr F$"" F| (,F$,".") F$F$".elf"F F$ AS #F () F #,TI$,DA$,PA$,ST$,FU$,RE$,TL$,RV$8G TI$;" ";DA$;" ";PA$;" ";ST$;" ";FU$;" ";RE$;" ";TL$;" ";RV$LG () XG "eof"aG #G "press [enter] to continue";I$GG: "error log file to summerize (d:filename.elf):";F$G F$"" G: "reference step #";RSTEP% H F$"" BHCOUNT%:TOTAL:MA  Xv:MINv :init valueseH (,F$,".") F$F$".elf"xH F$ AS #H& () H0 #,TI$,DA$,PA$,ST$,FU$,RE$,TL$,RV$ :get infoH: RSTEP% RSTEP%(ST$) D : lIDCOUNT%COUNT% :do stats on file,INTOTALTOTAL(RV$)YIX MAX(RV$) MAX(RV$):MAXTIME$TI$Ib MIN(RV$) MIN(RV$):MINTIME$TI$Il () 0 :loop til endIv "number of samples:";COUNT%I COUNT%  J "average value: ";TOTALCOUNT%7J "maximum value:  ";MAX,"at ";MAXTIME$eJ "minimum value: ";MIN,"at ";MINTIME$J "press [enter] to continue";I$J #JJ: "Is the printer ready:";I$ :print procedureJ I$"y" JP%: "lpt1:" AS #%K #," "JK A$(P%)"" #,"EOF ": #:]K #,P%,A$(P%)iKP%P%sK  KEF%: :quitK K* "error log file to print (d:filename.elf):";F$K4 F$"" K> (,F$,".") F$F$".elf"LH:"Is the printer ready:";I$*LR I$"y" >L\ "lpt1:" AS #QLf F$ AS #Lp #,"