Xref: utzoo misc.misc:4318 comp.sys.hp:1394 comp.sys.misc:1993 Path: utzoo!attcan!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!lll-lcc!scowles From: scowles@lll-lcc.llnl.gov (Sid Cowles) Newsgroups: misc.misc,comp.sys.hp,comp.sys.misc Subject: Re: HP9836 BASIC -- HELP !! Message-ID: <2229@lll-lcc.llnl.gov> Date: 2 Jan 89 21:52:55 GMT References: <281@vmsa.technion.ac.il> Reply-To: scowles@lll-lcc.llnl.gov.UUCP (Sid Cowles) Organization: Lawrence Livermore Labs, Env Sci Div, Livermore CA Lines: 32 In article <281@vmsa.technion.ac.il> ners001@vmsa.technion.ac.il writes: >Does anybody out there know what the following lines of BASIC mean? > >SUB Out_word(@GPIB,INTEGER Xbuf(*),N) > INTEGER Odata > FOR I=1 TO N > Odata=ROTATE(Xbuf(I),8) > OUTPUT @GPIB USING "#,W";Odata > NEXT I > SUBEND > > ... What does the ROTATE function do? What does the >output look like (binary word transfer or formatted ASCII)? benjamin, the rotate function is described as: "this function returns an integer which equals the value obtained by shifting the 16-bit binary representation of the argument by the number of bit positions specified. the shift is performed with wrap-around." i'd guess that the io-path, @gpib, was assigned with format off since the output statement is using a 2 byte word ("W") format with no end-of-line sequence. i hope this helps. sid ======================================================================= s cowles att: +1 415 423 0929 lawrence livermore national lab uucp: {backbone}!lll-lcc!scowles environmental sciences division internet: scowles@lll-lcc.llnl.gov p. o. box 5507 L-524 livermore, california 94550