IOB toolkit =========== Wrapping for the IOB.xxx traps to send and fetch strings or bytes Compatible with SMSQ/E and, apart from IOSUML%, QDOS and Minerva Usage: ------ Fetch buflen% bytes from channel #ch% into string str$ within time given in timeout%. Return any errors in er% er% = IOBFMUL%([#ch%;] timeout%, buflen%, str$) er% = IOBFLIN%([#ch%;] timeout%, buflen%, str$) where: #ch% is the channel number to use (default #3) timeout% [-1,0..32k] allow this many frames to complete buflen% is the size of the string buffer str$ contains the string recieved from the channel. er% error code: Soft errors: NC, EOF, BFFL Hard errors: ICHN, etc Note: LF is included in str$ in IOBFLIN%, and must therefore be accommodated by the size of the buffer. In the case of a Buffer Full error, the terminating character is undefined. If you use IOBFLIN% in a window channel, the cursor appears and the string may be edited; it works a bit like INPUT. This is not the case with IOBFMUL%. However, you can still type in characters only they wont be echoed on screen, and any editing keystrokes, including <ENTER> will be regarded as part of the string! It will only return when the buffer is full, on timeout, or if <break> is pressed (where possible). Send string: er% = IOBSMUL%( [#ch%;] timeout%, str$) : rem Send bytes er% = IOBSUML%( [#ch%;] timeout%, str$) : rem Send Untranslated bytes where: #ch% is the channel number to use (default #3) timeout% [-1,0..32k] allow this many frames to complete str$ contains the string to send to the channel. Any residual bytes in string$ that could not be transmitted before timeout, or due to error, are retained in str$, and may be used for a later retry er% error code: Soft errors: NC, DVFL Hard errors: ICHN, etc IOBSUML% is similar to IOBSMUL% but it does not translate the characters. Therefore, the setting of translation tables is ignored as well as the parameter in the device open call (e.g. SERd, SERt, PARd, PARt). A safe way of sending graphics data or control codes to the printer, as they will never be translated into other byte patterns. IOBSUML% only works on SMSQ/E! This updated version (V0.05) has not been used in anger, so is not as thoroughly tested over meny years, and across many platforms, as previous versions have been! So please report back if you find any bugs! Software status --------------- V0.01 ©PWitte, 2ooo V0.04, pjw, February 23rd 2018, altered names to IOB.. V0.05, pjw, June 5th 2019, new library (safer bp.let) Conditions of use and DISCLAIMER as per Knoware.no
Generated by QuickHTM, 2024 Apr 06