C FUNCTION LIBRARY † for the † Texas Instrument Professional Computer Available to interface with either Microsoft C 3.0,ÿ4.0 and 5.0, these utilities save the programmer from reinventingÿthe wheel. In addition, all MS-DOS functions work on any MS-DOSÿcomputer including the IBM-PC with the ANSI.SYS file installedÿfor the extended screen and keyboard control as described in theÿPC-DOS manual. Most of the functions are written in assemblyÿlanguage for speed and compactness. The functions come in a searchable library that limits theÿlibrary overhead, loading only those functions that are needed byÿthe program. The MS-DOS LIB program may be used to remove or addÿmodules to the library thus allowing the programmer to minimizeÿthe disk space needed. The library is available for $103 and includes the completeÿsource code for all functions. At this time there are 130 functions available. ‰MS-DOS functions ˆ blinkcol clk‡ sets blinking text Sets or Reads system colour time. ˆclr_eos dblstr‡ clear from cursor to input an array of an end of page unknown number of ˆclr_line ‡double valuesÿfrom a clear from cursor to string. end of line ˆdeltime ˆclrtext ‡determines the elapsed clears text screen, time in hundredths of home cursor aÿsecond. ˆdat dir‡ Sets or Reads system show disk directory date. in theÿstructure ˆdir_c „file_data‡ for directory search and selection, manipulation returnsÿdirectory or sorting. Theÿmode information in the parameter can be used structure file_data for to select the file selection,ÿmanipulation attribute of theÿsearch or sorting. criteria. ˆdir_na directory search and ˆdir_s‡ returnsÿdirectory Returns the number of information of only the files fitting name and file attribute theÿpattern specified by filespec. ˆdisk_spc fdate‡ returns space available Gets the date stamp of on specified disk drive a file. ˆfinfoh‡ Get time, date and size ˆdrive_no ‡data on a file. (handle) returns the number of ˆfinfos‡ the default drive Get time, date and size ˆeltime ‡data onÿa file (stream). determines the elapsed ˆfopene‡ time in seconds. Open file using Environment variable. ˆfopenp intstr‡ Open file using PATH input an array of an variable to locate unknown number of file. integer valuesÿfrom a ˆf_time ‡string. Gets the time stamp of ˆlabel‡ a file. get disk label ˆget_cpos offcur‡ get current cursor hide cursor position ˆoncur‡ ˆgotoxy ‡show cursor position text cursor ˆpmatch scr_read‡ string pattern matching returns character and using wild card attribute at current expressions.ÿ cursorÿposition. ˆres_cpos sv_c_pos‡ restore cursor to saves cursor position position ˆtcolour ˆ revcol ‡sets text colour sets reverse video ˆundercol‡ colour sets underline video colour ‰TI - ROM based functions †Graphics functions ˆ bar box‡ draws filled box with draws box in specified corners upper left at colour x1, y1 andÿlower right ˆcircle‡ at x2,y2 in colour Draw circle ˆblank erase‡ set palette latches to graphics screen erase zero (hide graphics) ˆfill line‡ fill region with colour Draw line to boundary ˆpalset ˆ gsave ‡sets the graphics graphics screen save palette. ˆgget point‡ graphics screen get Put coloured dot on ˆgetpixel ‡screen at x,y get pixel attributes at ˆrestore‡ x,y reset all palette ˆhline ‡latches draws horizontal line ˆvline wtod‡ draws vertical line change world coordinates to device (0-719, 0-299) ‰World Coordinate Functions ˆbar_w cir_w‡ bar in world circle in world coordinates coordinates ˆbox_w clr_v‡ box in world clear viewport coordinates ˆdtow ln_w‡ change device line using world coordinates to world coordinates systemÿ ˆfil_w pt_w‡ fill area in world point function for coordinates world coordinates ˆget_pw set_v‡ get pixel colour in set viewport to world coordinates fraction of screen (0 - ˆhline_w ‡1) in both (xÿand y) horizontal line in directions world coordinates ˆset_w vline_w‡ set world coordinates vertical line in world coordinates ‡Screen functions ˆall_attr dbox‡ change entire screen draw character box with attributes single or double ˆcstr ‡lineÿborder with centre string in attribute specified width ˆfprn get_str‡ print string to screen get a string from the memory - fastÿ console with ˆfprna ‡editing capability print string to screen ˆgotorc‡ memory with attribute DSR screen positioning ˆfprn_clr ‡ (row, column) clear a line or partial ˆgotoxyf‡ line onÿscreen. DSR screen positioning ˆget_attr ‡ (column, row) return the current screen attribute latch ˆput_sc read_sc‡ put a previously saved read a portion of the portion of the video video screen into a screen backÿto the memoryÿbuffer screen. ˆscr_attr ˆ read_ch ‡set screen text read character and attributes attribute at ˆscroll‡ currentÿcursor position performs a hardware ˆread_rc ‡scroll on a rectangular read character region ofÿthe screen. attributes ˆ tclear‡ Clears text screen ‰ Window Functions ˆ waopen wbgfill The low level window Fills a window in the open. background with a ˆ wbgclr ‡character.ÿ Clears a window in the ˆwclear‡ background. Clears the current window. ˆ wclose wfill‡ Closes a window. Fills the current ˆ wclrln ‡window with a character Clears a line in the and attribute. current window. ˆwgets ˆ wcpos ‡Gets string input, Gets the cursor echoing to a window. position in a window. ˆwgotorc ˆ wcur ‡Moves the cursor to Sets the type of cursor row, column in the in the window. currentÿwindow. ˆ winhide wrtbg‡ Hides a window. Writes a string to a ˆ winshow ‡window in the Shows a window. background. ˆ wmove wselect‡ Moves a window. Selects a window to be ˆ wopen ‡the current window. The high level window ˆwwrt ‡ open function. Writes a string to the ˆ wrfsh ‡current window. Redraws a window. ˆ wwrta ‡ Writes a string to the current window and with theÿdisplay attribute specified. ‰ Printer functions ˆ pr_char pr_scrn ‡ direct printer output print text screen on of character printer ˆ pr_str p_gscrn ‡ direct printer output print graphics screen of string vertically ‰ Cursor Shape ˆ crsrnorm undernb ‡ sets cursor to large sets cursor to steady blinking rectangle underline ˆ curset undersb ‡ sets cursor shape to a sets cursor to slow specific size. blinking underline ˆ underfb ‡ sets cursor to fast blinking underline ‰ Keyboard functions ˆ clr_key kbready ‡ clear any function key Return key waiting in assignments buffer, but leave it ˆ kbgetch ‡there Read keyboard via ROM ˆrset_key ‡ DSR (recognizes restore function key function key input) assignments ˆ kbgets ‡previously cleared Bypass DOS for string input with editing ˆ yesno ‡ Displays a prompt at the specified screen location andÿthen waits for one of 'Y', 'y', 'N', or 'n' to be pressed. ‰ Miscellaneous functions ˆ delay get_offset ‡ delay in milli-seconds Gets the text screen ˆ dsr ‡memory offset from filters legal DSR DE00H. function calls. ˆ poke ˆ peek stat_ln ‡ for Microsoft C 3.0, creates a status line 4.0, 5.0 at the bottom of ˆ randomiz ‡the screen resets rand function ˆstlnclr ‡ with pseudo random seed Clears a status line ˆ sound ‡region. produce a sound specifying frequency and duration ÿ ‰ Mouse Functions ˆ mclose m_read ‡ terminate resident companion program to mouse driver M_INIT to avoid ˆ m_init ‡sideÿeffects. install Mouse Systems ˆset_m ‡ Mouse to interface with sets mouse to position a Cÿprogram x,y ‰ Halo Graphics Support Functions „ These functions are designed to be used with the „ graphics libraryÿavailable from Media Cybernetics „ Inc. ˆ start_m close_m ‡ initializes Halo closes Halo graphics graphics locator mouse locator ˆ rd_mouse cbox ‡ read mouse position and move halo cross-hair switch status cursor with cursor keys ˆ mbox‡ move halo cross-hair cursor with mouse As new functions are developed they are added to the library as ÿwell as improved versions of previously defined functions.ÿ 103.00