home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / qb / technote.lzh / TECHNOTE.NOT
Encoding:
Text File  |  1988-05-01  |  39.2 KB  |  641 lines

  1. ProBas Technical Notes
  2.  
  3. ProBas  is a collection of 232 routines, 226 of which are written  in  assembly
  4. language, and the remaining 6 in BASIC.  ProBas works with all versions of  the
  5. Microsoft  QuickBASIC compiler, the Microsoft Business Basic compiler, and  the
  6. IBM BASIC compiler.
  7.  
  8. ProBas  is  shipped  with the .OBJ files for all assembler  routines,  and  the
  9. source  code  to  the BASIC routines.  Assembly language  source  code  is  not
  10. included.   All  ProBas  routines are designed to be stored in  a  library  and
  11. invoked using the CALL statement.
  12.  
  13. A  selection  of batch files is included to create the proper type  of  library
  14. (.LIB  link  library,  .EXE  user library, or  .QLB  quick  library)  for  your
  15. particular compiler.  This allows you to easily manage what is in your  library
  16. or libraries.
  17.  
  18. ProBas  comes  with  a 600-page manual which is divided  into  three  sections:
  19. Introduction,   Tutorial,  and  Reference.  The  Introduction  section   covers
  20. installation,  setup,  an  overview of ProBas, and  chapters  on  using  BASIC,
  21. Programming in BASIC, Top-Down BASIC, and The BASIC Numbers Game.  The Tutorial
  22. section  provides an in-depth look at using various ProBas routines to  perform
  23. day-to-day  chores.   For  example, there is a 46-page  chapter  on  using  the
  24. various ProBas screen snapshot routines that not only examines each routine  in
  25. clear  English,  but also presents real-life situations and  tips  on  handling
  26. them.  The Reference section, arranged in alphabetical order, devotes at  least
  27. a  page,  often  more, to each routine. Each  listing  includes  the  routine's
  28. compatibility  level,  (BIOS,  CLONE, DOS, ANY) type, (input,  video,  etc.)  a
  29. detailed  description, calling syntax, and a BASIC example using  the  routine.
  30. Any  compiler  limitations,  such as QuickBASIC 4.0-only, are  also  listed  in
  31. boldface italics.
  32.  
  33. You'll  also receive a ready-to-run DEMO program that uses many of  the  ProBas
  34. routines--  with  over  300k of fully narrated source  code.   The  source  was
  35. designed  to be read like a book and shows in great detail how to take  maximum
  36. advantage  of  the ProBas routines to do things like design bar  and  pull-down
  37. menus  with full mouse support, or create a window the user can "drag"  on  the
  38. screen using the mouse or cursor keys.
  39.  
  40. ProBas  contains  a  number of routines that work with  what  we  call  virtual
  41. screens.  How  it works is simple: you DIM(2000) a dynamic array for use  as  a
  42. virtual screen and treat it just as if it were the display screen. Rather  than
  43. use  XQPRINT  to  display  a string, you  use  DXQPRINT.   Similarly,  you  use
  44. DWindowManager  in  place  of WindowManager to draw  windows.   The  DPUTSCREEN
  45. routine  is  used to display all or part of the virtual screen to  the  display
  46. screen in the blink of an eye.  Displaying is a memory to memory block move  at
  47. assembly language speeds.  You just can't get any faster.
  48.  
  49. Virtual screens are not limited to 25x80, or 43x80 screens. Using the CALCSIZE,
  50. VGETSCREEN and VPUTSCREEN routines, you can cut and paste a portion of a screen
  51. to  its  own array, DIMed to just the size necessary. In the  ProBas  demo,  we
  52. examine  this technique in great detail.  For example, we used a FOR/NEXT  loop
  53. to  write  seven pull-down menus, complete with text (read in via  a  READ/DATA
  54. statement)  to a full-sized virtual screen. As each menu was finished,  it  was
  55. moved  to its own virtual screen array.  When the loop is done, the  full-sized
  56. array  is  ERASEd and the seven menu arrays take up less memory than  a  single
  57. 25x80 screen.  The entire process takes just 23 lines of code and less than one
  58. 18th of a second to execute.  With all seven menus in memory, a single call  to
  59. DPUTSCREEN  displays  any  menu instantly.  Because such  virtual  screens  are
  60. stored  in dynamic numeric arrays, you can use all available base  memory,  and
  61. optionally  EMS memory, to store literally hundreds of screens in memory  at  a
  62. time, all ready for display at assembly speeds.
  63.  
  64. And that's not even using the SCRUNCH routine to compress the screens.  SCRUNCH
  65. uses  run-length  encoding  to compress screens by 75 to 90%.   In  the  ProRef
  66. package,  we used the ProScreen screen editor to draw 49 pull-down menus.   The
  67. 49  files took up a little over 200k.  After running them through SCRUNCH,  the
  68. 49  files were compressed to a single file of just 16,114 bytes.  ProRef  reads
  69. this  file into a single dynamic array so that all 49 menus are in  memory  and
  70. instantly available.
  71.  
  72. ProBas allows you to have virtual screens that are far larger than the physical
  73. display  screen.   You can create a virtual screen of up to 255  rows  and  132
  74. columns  and then treat the display screen as a "window" that "moves" over  the
  75. larger virtual screen.  Any ProBas routine that ends in the letters "SS"  works
  76. with this type of sizable-screens.
  77.  
  78. But screens handling routines make up just a fraction of the ProBas library....
  79.  
  80. BASIC is notoriously slow in the area of file I/O.  ProBas includes a  complete
  81. set  of assembly language disk read and write routines that are  optimized  for
  82. speed.   You  can  create  or open a file, (using DOS  or  network  access  and
  83. locking) and perform reads or writes in any of three ways (to or from a buffer,
  84. to  or  from  an array, and to or from a string). You can even  mix  and  match
  85. techniques as desired.
  86.  
  87. To  read 300 records of 100 bytes each into memory in BASIC, you OPEN  a  file,
  88. field  it,  and do 300 GETs, storing each field in its own  string  or  numeric
  89. array.  Obviously  you would either run out of string space  or  patience  long
  90. before  reaching the end of the file.  With ProBas, you DIM a  dynamic  numeric
  91. array  to 15,000 elements (1 integer = 2 bytes), call DFREAD specifying  30,000
  92. bytes,  and in slightly over one 18th of a second (on an 8Mhz 1 Wait State  AT)
  93. the data is in memory.
  94.  
  95. With  ProBas,  you can read in a megabyte of data and store it in EMS  in  less
  96. than  one  half second.  Even though you are storing mixed string  and  numeric
  97. data in a numeric array, the DGETREC and DPUTREC routines handle the conversion
  98. to strings invisibly. Keeping track of where you are in the file is easy with a
  99. wide  variety of record, byte, and offset file pointers that allow you to  work
  100. with  files  up  to 2 gigabytes in size.  For smaller files,  up  to  available
  101. string space, use the SFREAD/SFWRITE routines that work with strings.  For  the
  102. occasional access of small amounts of data, the FREAD/FWRITE routines work with
  103. a buffer.
  104.  
  105. ProBas  includes dozens of routines that just make life a bit easier,  such  as
  106. parsing  filespecs  into  drive,  path  and  file,  computing  elapsed   times,
  107. stripping/rotating/extracting  strings,  compacting  or  converting  dates  and
  108. times,  and general disk I/O routines for directory functions.  The savings  in
  109. programmer man-hours pays for ProBas in just a few days.  So why re-invent  the
  110. wheel?
  111.  
  112. The  precursor  to  ProBas,  the shareware ADVBAS library,  has  been  used  by
  113. thousands  of  programmers  since 1985 and is available  on  most  BBS  systems
  114. throughout  the nation.  If you are still not convinced that ProBas is a  boon,
  115. please  feel  free  to download a copy of ADVBAS and "test drive"  it.  We  are
  116. confident  that  once  you  try  ADVBAS, you'll  want  the  much  larger,  more
  117. comprehensive ProBas library.
  118.  
  119. ProBas  was  designed  for the professional programmer.  You  may  link  ProBas
  120. routines with your commercial programs without paying any royalty or  including
  121. a Hammerly Computer Services copyright notice.
  122.  
  123.  
  124.  
  125. Routine List
  126.  
  127. ADDMATI..........Add an integer to the first x elements in an array
  128. ANY2DEC..........Convert a number in any base to base 10 (decimal)
  129. BICKEL...........Check how closely two strings match using Bickels algorithm
  130. BIGPRINT.........Display (print) big characters to the screen
  131. BKSCROLL.........Scroll a portion of the screen backwards (down)
  132. BKSPACE..........Move the cursor back one space (destructive backspace)
  133. BLINK............Disable blink to allow 16 fore and 16 background colors
  134. BLOCKMOVE........Copy a block of data from one memory location to another
  135. BSQ..............Compress or squeeze a string
  136. BUSQ.............Decompress or unsqueeze a BSQ'd string
  137. BUSQLEN..........The new length of a BSQ'd (compressed) string
  138. CALCATTR.........Set the color attributes for direct screen writes
  139. CALCSIZE.........Calculate the size to DIM an array to hold a partial screen
  140. CARRIER..........Detect if carrier is present on the comm port
  141. CHECKKEY.........Check keyboard/mouse for input without waiting
  142. CHECKSUM.........Calculate the checksum for XMODEM-type protocolos
  143. CIPHER...........Encrypt a string
  144. CIPHERP..........Encrypt a string using graphic characters for serial files
  145. CLRCOLS..........Clear a given column(s)
  146. CLREOL...........Clear to end of line
  147. CLREOP...........Clear to end of page (screen)
  148. CLRKBD...........Clear keyboard buffer of any pending keystrokes
  149. CLRSOL...........Clear from start of line to cursor
  150. CLRSOP...........Clear from start of page (screen) to cursor
  151. COPYFILE.........Copy a file -- faster than SHELLing to DOS and running COPY
  152. CRC..............Compute a Cyclic Redundancy Check for a record using formula
  153. CRC2.............Compute a CRC using tables for improved speed
  154. CRUNCH...........Crunch successive occurrences of a character within a string
  155. DATASEG..........Returns the value of BASIC's data segment
  156. DATE2INT.........Convert three integers (MONTH,DAY,YR) to a single integer
  157. DATEN2S..........Convert three integers (MONTH,DAY,YR) to a string (mm/dd/yy)
  158. DATES2N..........Converts a string (mm/dd/yy-yyyy) to 3 integers (MONTH,DAY,YR)
  159. DBIGPRINT........Version of BIGPRINT for use with virtual screens
  160. DCLEAR...........Do a "CLS" of a virtual screen array
  161. DCLEARSS........."CLS" a virtual screen array of up to 255 rows and 132 cols
  162. DDOSTASKS........Turn DoubleDos task switching on or off
  163. DEC2ANY..........Convert a number in base 10 (decimal) to any base (2-35)
  164. DELAY............Delay for n seconds using the clock (independent of CPU speed)
  165. DELAY18TH........Delay for n 18ths of a second using the clock
  166. DELCHR...........Delete a character from the screen
  167. DELFILE..........Delete a disk file.  Returns error code to eliminate ON ERROR
  168. DELLINE..........Delete a line (row) on the screen
  169. DELSUB...........Delete subdirectory. Returns error code to eliminate ON ERROR
  170. DFREAD...........Read from a file to an array.  Much faster than BASIC's GET
  171. DFWRITE..........Write to a file from an array.  Much faster than BASIC's PUT
  172. DGETREC..........Get a string record that was stored in a numeric array
  173. DGETSCREEN.......Take snapshot of all or part of a screen and store in an array
  174. DGETSCREENSS.....Same as DGETSCREEN for screens of up to 255 rows by 132 cols
  175. DGQPRINT.........Print strings to a graphic screen in an array
  176. DGXQPRINT........Print strings to a graphic screen in an array w/ color choice
  177. DISKSTAT.........Disk stats-- free/total clusters, bytes/sector, sector/cluster
  178. DISSOLVE.........Clear a screen using a "dissolve"
  179. DMPRINT..........Display string with DOS calls-- supports drivers like ANSI.SYS
  180. DOSINKEY.........Get a key from the standard input device-- allows redirection
  181. DOUB2LONG........Convert a double precision value to a simulated long integer
  182. DPUTREC..........Opposite of DGETREC-- stores a string in a numeric array
  183. DPUTSCREEN.......Restore a full or partial snapshot, stored in an array
  184. DPUTSCREENSS.....Same as DPUTSCREEN for screens of up to 255 rows by 132 cols
  185. DRVSPACE.........Returns the amount of free disk space on a given drive
  186. DRVSPACEL........Returns free disk space on a given drive in long integer
  187. DSORT............Sort strings stored in a numeric array
  188. DSORTB...........Sort strings stored in a numeric array backwards
  189. DTR..............Tell if Data Terminal Ready (DTR) is detected
  190. DWindowManager...Version of windowing routine for virtual screen arrays
  191. DXQPRINT.........Display a string to a virtual screen array
  192. DYNPTR...........Returns segment and offset of an array
  193. Elapsed..........Computes the elapsed time between start/stop times (strings)
  194. EMSCLOSE.........Close (ERASE) an EMS array
  195. EMSGET...........Get data from an EMS array and put it in a BASIC variable
  196. EMSOPEN..........Open (DIM) an EMS array
  197. EMSPUT...........Put data from a BASIC variable to an EMS array
  198. EQUIPMENT........Equipment info-- RAM in k, # of parallel, serial, game ports
  199. EXIST............Check if a file exists-- supports network and multi-tasking
  200. EXTRACT..........Extract a delimited string from within a larger string
  201. FADEOUT..........Clear the screen using a fadeout to a specified color
  202. FCLOSE...........Close a file opened with FOPEN or FCREATE
  203. FCREATE..........Create a file for access with ProBas assembly routines
  204. FGETLOC..........Get the current location of the file pointer
  205. FINDFIRSTF.......Find the first file that matches a filespec-- wildcards ok
  206. FINDNEXTF........Find the next file after a FINDFIRSTF
  207. FOPEN............Open a file for access with ProBas assembly routines
  208. FREAD............Read data from a file into a buffer
  209. FSETEND..........Set file pointer to the end of the file for an append
  210. FSETLOC..........Set file pointer to a given byte location within the file
  211. FSETOFS..........Set file pointer to a offset from the current location
  212. FSETREC..........Set file pointer to the next record in a random acccess file
  213. FSIZE............Returns the size of a file in bytes
  214. FWRITE...........Writes data to a file opened with FOPEN or FCREATE
  215. GETATTRF.........Returns attribute of a file found with FINDFIRSTF/FINDNEXTF
  216. GETCRT...........Returns zero if a monochrome or nonzero if a color display
  217. GETDATEF.........Returns date stamp of a file found with FINDFIRSTF/FINDNEXTF
  218. GETDDOS..........Tells if the program is running under DoubleDos
  219. GETDOSV..........Returns the version of DOS (2.1, 3.3 etc)
  220. GETDRV...........Returns the current logged drive
  221. GETEGA...........Tells if an EGA adapter is installed and how much RAM it has
  222. GETEXTM..........Returns the amount of extended (AT) memory is installed
  223. GETFATTR.........Returns the file attribute of a given file
  224. GETFDATE.........Returns the date stamp of a given file
  225. GETFTIME.........Returns the time stamp of a given file
  226. GETKBD...........Returns status of keyboard toggles-- Caps Lock, Num Lock, etc
  227. GETKEY...........Check keyboard/mouse for input and wait until key or click
  228. GETLIMM..........Returns the amount of total and free EMS memory, if any
  229. GETLIMV..........Returns the current EMS version number
  230. GETLINE..........Reads a line from the screen and puts it in a string array
  231. GETMOUSELOC......Returns the current mouse cursor location (25x80 text mode)
  232. GETNAMEF.........Returns the name of the file found with FINDFIRSTF/FINDNEXTF
  233. GETROWS..........Returns the mode (25 or 43 rows)
  234. GETSCREEN........Take snapshot of a full or partial screen-- store in an array
  235. GETSIZEF.........Return the size of a file found with FINDFIRSTF/FINDNEXTF
  236. GETSIZEFL........Same as GETSIZEFL but returns a long integer
  237. GETSUB...........Returns the current subdirectory
  238. GETSWITCH........Returns the DOS switch character
  239. GETTIME..........Returns the current time to hundredths of a second
  240. GETTIMEF.........Returns time stamp of a file found with FINDFIRSTF/FINDNEXTF
  241. GETTVIEW.........Tells if program is running under TopView/DesqView/TaskView
  242. GETVALIDKEY......Waits until one of a list of valid keys is pressed
  243. GETVERIFY........Returns the status of the DOS VERIFY switch (off or on)
  244. GETVIDMODE.......Returns the current video mode (0-16)
  245. GLOAD............A faster BLOAD
  246. GQPRINT..........Display a string to the screen in the default color attribute
  247. GRAFPRINT........Display a string to a graphics screen in any size of type
  248. GRAFREST.........Restore a snapshot of a graphics screen taken with GRAFSAVE
  249. GRAFSAVE.........Take a snapshot of a CGA graphics screen
  250. GXQPRINT.........Display text in the selected color to a graphics screen
  251. INSCHR...........Insert a character, moving all to the right one position
  252. INSLINE..........Insert a line (row) on the screen
  253. INT2DATE.........Restore a date integer saved with DATE2INT back to 3 integers
  254. INT2TIME.........Restore a time saved with TIME2INT back to three integers
  255. IPTRSORT.........Integer pointer sort
  256. KEYPRESS.........Tell if a key is waiting in the keyboard buffer
  257. LCLOSE...........Close an EMS "file" opened with LOPEN--  treats EMS as a file
  258. LGET.............Read (GET) a record from an EMS file opened with LOPEN
  259. LOCASE...........Converts a string to all lower case characters
  260. Long2Doub........Converts simulated long to double precision for pre-QB4.0
  261. LOPEN............Open an area of EMS memory as if it were a "file"
  262. LPRTSORT.........Long Integer Pointer Sort
  263. LPUT.............Write (PUT) a record to an EMS file opened with LOPEN
  264. LROTATE..........Rotate the characters in a string left
  265. LSCROLL..........Scroll a selected portion of the screen to the left
  266. MAKESUB..........Create a DOS subdirectory (MKDIR)
  267. MDELCHR..........Delete a character in a window
  268. MINSCHR..........Insert a character in a window
  269. MMBUTTON.........Returns which mouse button, if any, is currently pressed
  270. MMCHECK..........Returns if a mouse in installed, and if so, how many buttons
  271. MMCLICK..........Tells how many times a mouse button was clicked since last
  272. MMCURSOROFF......Turn the mouse cursor off
  273. MMCURSORON.......Turn the mouse cursor on
  274. MMGETLOC.........Returns the current location of mouse cursor in any video mode
  275. MMSETLOC.........Sets the location of mouse cursor in any video mode
  276. MMSETRANGE.......Sets the range on the screen where the mouse cursor may go
  277. MONTH............Returns the month (January, February, etc.) of a number 1-12
  278. MPRINT...........Display a string using DOS/BIOS in the window set by MWINDOW
  279. MULTIAND.........Characters in a given string are ANDed with a given value
  280. MULTIOR..........Characters in a given string are ORed with a given value
  281. MULTIXOR.........Characters in a given string are XORed with a given value
  282. MWINDOW..........Sets up a scrolling region for MPRINT, MINSCHR and MDELCHR
  283. NumFormat........Like "PRINT USING", except the output goes to a string
  284. NUMPROC..........Returns the type of coprocessor (8087, 80287, 80387) if any
  285. PARSEFSPEC.......Parses a filespec into strings for drive, path, and filename
  286. PCTYPE...........Returns the machine code to tell if on a PC, XT, AT, etc
  287. PRINTSCREEN......The same as pressing Shift-PrtSc
  288. PROCESSOR........Returns the type of processor (8088, 80186, 80286, 80386)
  289. PRTCHECK.........Checks the printer to see if it's ready to avoid ON ERROR
  290. PRTSWAP..........Swaps the parallel ports associated with two printers
  291. PUTSCREEN........Restores a full or partial screen snapshot from a static array
  292. QPRINT...........Displays a string to the screen in the default color
  293. READBITF.........Read numbers of a custom bit length for compact storage
  294. RECOLOR..........Change everything on a screen of one color to another color
  295. RECOLORAREA......Change a portion of a screen from one color to another color
  296. RENAME...........Rename a disk file--  eliminates ON ERROR trapping
  297. REPLACE..........Replace every occurrence of a char in a string to another char
  298. RESETPOINT.......Reset a point on the screen for 80x50 text mode graphics
  299. REVERSE..........Reverse the order of characters in a string
  300. REVERSEPTR.......Reverses the order of arrays sorted with pointer sorts
  301. RROTATE..........Rotate the characters in a string right
  302. RSCROLL..........Scroll a selected portion of the screen to the right
  303. SCR2FILE.........Store 25x80 text screen snapshot(s) to a disk file
  304. SCR2FILESS.......Store screen snapshots (up to 255x132) to a disk file
  305. SCROLL...........Scroll a selected portion of the screen
  306. SCRREST..........Save a full screen snapshot to a static array
  307. SCRSAVE..........Restore a full screen snapshot to the screen
  308. SCRUNCH..........Uses run-length encoding to compress snapshots by 75-90%
  309. SETCOMM..........Set baud rate, parity, etc of a comm port without closing it
  310. SETDRV...........Set the default drive
  311. SETERROR.........Set the DOS error level upon exit for use in batch files
  312. SETFATTR.........Set a given file's attribute
  313. SETFTD...........Set a given file's date/time stamp
  314. SETKBD...........Set status of the keyboard toggles (Caps Lock, Num Lock, etc)
  315. SETMATI..........Set the first n values of an integer array to a given value
  316. SETMOUSELOC......Set the mouse cursor location (25x80 mode only)
  317. SETMOUSERANGE....Set the mouse range (25x80 mode only)
  318. SETPIXEL.........Plots a graphics point-- like PSET and PRESET, but much faster
  319. SETPOINT.........Sets a point on a text screen for 80x50 text mode graphics
  320. SETROWS..........Set the number of rows on the screen (25 or 43 if EGA)
  321. SETSUB...........Move to the specified subdirectory
  322. SETVERIFY........Turn the DOS VERIFY switch on or off
  323. SFREAD...........Read a string from a file opened with FOPEN/FCREATE
  324. SFWRITE..........Write a string to a file opened with FOPEN/FCREATE
  325. SHIFTL...........Shifts all bits in an integer left n times
  326. SHIFTLL..........Shifts all bits in a long integer left n times
  327. SHIFTR...........Shifts all bits in an integer right n times
  328. SHIFTRL..........Shifts all bits in a long integer right n times
  329. SINPUT...........Fielded input using DOS and WordStar editing commands
  330. SINPUTSET........Set/modify SINPUT options
  331. SOUNDEX..........Get the SOUNDEX code of a given string
  332. SPEAKER..........Turn the speaker on or off without affecting timing routines
  333. SPTRSORT.........String Pointer Sort
  334. SSRCH............Similar to INSTR but not case sensitive
  335. Strip............Strips all leading and trailing blanks from a string
  336. STRIPBLANKS......Strips leading, trailing or both blanks and control characters
  337. STRIPCHR.........Strips all occurrences of a given character from a string
  338. STRIPRANGE.......Strips all characters in a given range from a string
  339. SUBEXIST.........Tells if a given subdirectory exists
  340. TESTPIXEL........Tests a graphics point-- like BASIC's POINT but much faster
  341. TESTPOINT........Tests a point on 50x80 text mode graphics
  342. TIME2INT.........Convert three integers (HOUR,MIN,SEC) to a single integer
  343. TIMEN2S..........Convert three integers (HOUR,MIN,SEC) to a string (hh:mm:ss)
  344. TIMES2N..........Converts a string (hh:mm:ss) to three integers (HOUR,MIN,SEC)
  345. TINSTR...........Search for a given char type (alpha,numeric, etc.) in a string
  346. UNSCRUNCH........Decompress a screen snapshot compressed with SCRUNCH
  347. UPCASE...........Converts a string to all upper case characters
  348. VGETSCREEN.......Move a partial-screen snapshot to its own array
  349. VGETSCREENSS.....Same as VGETSCREEN for screens of up to 255 rows and 132 cols
  350. VPUTSCREEN.......Move a partial screen back to a full-sized screen array
  351. VPUTSCREENSS.....Same as VPUTSCREEN for screens of up to 255 rows and 132 cols
  352. WEEKDAY..........Returns the day of the week as an integer (1-7)
  353. WindowManager....Draw windows on screen with options like shadow and exploding
  354. WRITEBITF........Allows compact storage of numbers using custom bit lengths
  355. XLATE............Translate a string using a translation table that you supply
  356. XMPRINT..........Combines the MPRINT and XLATE functions into a single routine
  357. XQPRINT..........Display a string directly to the screen in the color specified
  358.  
  359.  
  360. Routines in upper case are written in assembly language.
  361. Routines in mixed upper/lower case are written in BASIC.
  362. Routines ending in "SS" are for sizable virtual screens.
  363.  
  364.  
  365.  
  366. ProBas ToolKit Technical Notes
  367.  
  368. The  philosophy behind the ProBas Professional BASIC Programming Library is  to
  369. provide  powerful,  proven, low-level routines that afford the  programmer  the
  370. most  capability  with  the least encumbrance.  In other  words,  no  arbitrary
  371. limitations  or preconceptions.  If you want to design a bar menu on  the  25th
  372. row,  with  pull-up  menus rather than the more  traditional  pull-down  menus,
  373. there's nothing to hinder you.  Use the XQPRINT, WindowManager, RECOLORAREA and
  374. mouse routines, and code it any way you like.
  375.  
  376. The  idea  behind the ProBas ToolKit is to provide higher-level  routines  that
  377. utilize  the low-level routines in ProBas and work as "plug-in"  modules.   For
  378. example,  if  you don't want to take the time to code that bar  menu  with  the
  379. unusual  pull-up  menus, use the ToolKit and save yourself a lot of  work.   Or
  380. maybe you want to display a text file in a window, complete with scrolling  and
  381. paging  functions.   Wouldn't  you rather just specify the  filename  and  call
  382. WindowText rather than writing and debugging it yourself?
  383.  
  384. The  ToolKit has menu generators to suit almost every need.  You may  select  a
  385. menu  that writes directly to the screen or writes to a virtual  screen  array,
  386. with  or without mouse support, with or without a scrolling light bar, so  that
  387. only the code that is needed is linked with the program and unnecessary code is
  388. not there to waste memory or slow things down.
  389.  
  390. The  ProBas  ToolKit  contains  dozens of  routines  like  sizeable  mini  word
  391. processors with word wrap and time/date/calendar routines that make life easier
  392. and help keep you from constantly having to re-invent the wheel.
  393.  
  394. The ToolKit comes with a complete assembly language Btree indexing system  that
  395. allows  you  to  create, find, add, edit, delete, insert and sort  keys  in  an
  396. index.   Use  these routines with the lightning-fast ProBas assembly  file  I/O
  397. routines  and you can access and manipulate large data bases hundreds of  times
  398. faster than BASIC would allow.
  399.  
  400. Then  there  are  routines that allow you to patch .EXE files  to  write  self-
  401. modifying code.  Why use cumbersome data files to hold filespecs, passwords, or
  402. even user-defined menu choices when you can just write the information directly
  403. to the .EXE file itself?
  404.  
  405. Or  perhaps  you  would like to pass large amounts  of  data  between  programs
  406. compiled  with BCOMxx.LIB or even programs written in different languages.  The
  407. ToolKit provides a complete system of protected memory-resident data areas  and
  408. assembly routines that "peek" and "poke" large chunks of data at a clip.
  409.  
  410. At  HCSI  we have not forgotten our shareware roots.  Not only does  our  staff
  411. regularly  add  new  routines to the ToolKit, but programmers  who  use  ProBas
  412. frequently contribute routines and allow us to incorporate them in the product.
  413. It  is our intention to make these additions available to registered  users  at
  414. minimal  cost,  usually $10 per disk.  Every four to six months a  new  updated
  415. manual  is  available  for  a nominal charge.  Beginning  in  May  1988,  these
  416. routines  will be available to registered users in the ProBas ToolKit  area  of
  417. our multi-user BBS so that you can download them for just the cost of the phone
  418. call.
  419.  
  420. For years C and Pascal programmers have relied on tools like these to  increase
  421. their  productivity and ease their work load.  Isn't it time BASIC  programmers
  422. got the same attention?
  423.  
  424.  
  425.  
  426. ProBas TeleComm ToolKit Technical Notes
  427.  
  428. The ProBas TeleComm ToolKit is a collection of communication-related tools that
  429. you $INCLUDE in your programs to provide such features as:
  430.  
  431.    o  Xmodem Single File Transfer Protocol (CRC & Checksum)
  432.    o  Modem7 Batch  File Transfer Protocol (CRC & Checksum)
  433.    o  Ymodem Single File Transfer Protocol (CRC & Checksum)
  434.    o  Ymodem Batch  File Transfer Protocol (CRC & Checksum)
  435.    o  VT52  Terminal Emulation
  436.    o  VT100 Terminal Emulation
  437.    o  ANSI BBS Terminal Emulation
  438.    o  Baud rates of 300 bps to 57,600 bps
  439.    o  Powerful Keyboard Command Processor/Command Center
  440.    o  Script file language for automated modem sessions
  441.    o  Dialing directory with advanced editing
  442.    o  Auto-dialing via keyboard, database, script file, etc
  443.    o  Plus many other help features and conveniences
  444.  
  445. Each module is added to your code via the $INCLUDE statement and then  accessed
  446. by  a  GOSUB.   You need only include the modules that  you  use.   The  ProBas
  447. TeleComm  ToolKit comes with full BASIC source code and each module is  heavily
  448. documented with comments on almost every line of code.  You also get a detailed
  449. manual,  sample  script files, and source code for a working  terminal  program
  450. that uses all of the TeleComm ToolKit modules and routines.
  451.  
  452. Working  with  the  TeleComm ToolKit is easy.  To initiate  file  transfer  for
  453. example,  you  just  set  a few variables  and  "GOSUB  XmodemSend"  or  "GOSUB
  454. YmodemRecv"  as desired.  The transfer will then take place, with or without  a
  455. window  showing  the progress.  When done, the routine returns  a  full  status
  456. report.
  457.  
  458. The powerful command center works with both keyboard and script file input  for
  459. hassle-free  control.   The  command center supports  the  popular  ProComm(TM)
  460. command set.  Adding your own command set can be done with a minimum of effort.
  461.  
  462. The  ProBas  TeleComm  ToolKit requires ProBas and QuickBASIC  version  3.0  or
  463. higher.  You may include these tools in your commercial programs without paying
  464. any royalty or including a Hammerly Computer Services copyright notice.
  465.  
  466.  
  467.  
  468. ProRef Technical Notes
  469.  
  470. ProRef is actually three products in one.  It is a Terminate and Stay  Resident
  471. (TSR)  online help system for ProBas, a TSR online help system for  your  help,
  472. and an extension to the QuickBASIC programming environment.
  473.  
  474. The  232 routines in ProBas are just too much for anyone to remember, and  even
  475. though  we  are proud of the ProBas documentation, at 600 pages, it's  just  so
  476. *big*.   ProRef  allows  you to press a hot-key and quickly  find  the  calling
  477. syntax  and  up  to six lines of text on each routine.   When  the  hot-key  is
  478. pressed,  the ProRef bar menu replaces QuickBASIC's bar menu with  choices  for
  479. Screen,  sTring,  File, Input, Memory, Numeric, Equipment  and  Other.   ProRef
  480. works just like QuickBASIC, including the mouse, so you already know how to use
  481. it.  For example, to get help for (say) the routines to treat EMS memory as  an
  482. array, just move the mouse to the Memory choice, click the mouse, and move  the
  483. highlight  down to the EMS choice.  A second menu will appear with each of  the
  484. routine  names.  Click on any choice, and the calling syntax and help for  that
  485. routine appears. Press the ESC key or click the right mouse button to return to
  486. QuickBASIC.
  487.  
  488. Adding your own help information, such as notes and the calling syntax for your
  489. own routines and subprograms, is easy.  Just use your favorite text editor  and
  490. put character delimiters in the beginning and end.  Accessing the help is  just
  491. pressing the hot-key and selecting the help from a two-line-per-entry index.
  492.  
  493. Online  help is not exactly front page news, but the most powerful features  of
  494. ProRef  are in the area of extending the programming environment. ProRef  comes
  495. with a number of handy pop-up productivity tools that were especially  designed
  496. for the BASIC programmer:
  497.  
  498.      o  Pop-up full-screen ASCII chart
  499.      o  Pop-up BOX chart to show what graphics characters make up boxes
  500.      o  Pop-up multi-mode, dual memory calculator
  501.      o  Pop-up SCAN code module tells the codes for any key pressed
  502.      o  Pop-up listing of all DOS/ProBas file I/O error codes
  503.      o  Pop-up listing of file attributes
  504.  
  505. Each  productivity  tool is available from the Other menu, or  via  a  hot-key.
  506. Nice,  but  not  exactly earth-shattering.  But ProRef takes this  a  good  bit
  507. farther:
  508.  
  509. You  may  add up to 10 additional programs to your own menu within  ProBas  and
  510. access almost any DOS program from within QuickBASIC, or any other program  for
  511. that matter.  Now here's the real kicker: you can make almost any DOS  program,
  512. including the ones you write in BASIC, available via a hot-key.
  513.  
  514. Now  you  can  pop  up great programs like your  favorite  text  editor,  modem
  515. program,  or  third-party software like The Norton Utilities  via  hot-key.  In
  516. fact, you can even use your editor as your environment and run QuickBASIC as  a
  517. pop-up!   So  why  use a plethora of TSRs, many of which are  only  subsets  of
  518. better programs, when you can have the real thing available?  Unlike some other
  519. task-switchers,  ProRef  doesn't  force  you to live  with  an  unwelcome  user
  520. interface, use .PIF files, or define every last detail about the program to  be
  521. run.  Just select a hot-key and specify the drive:\path\filename of the program
  522. to run.
  523.  
  524. ProRef  put  all  of  this together in a single package  that  is  super  fast,
  525. seamless,  and  easy  to  use.  ProRef was written  in  QuickBASIC,  using  the
  526. routines in ProBas and the ProBas ToolKit.  TSR capabilities were  accomplished
  527. using the Weiner Shell Memory Resident Programming Utility and Language,  which
  528. is also available from HCSI.
  529.  
  530.  
  531.  
  532. ProScreen Technical Notes
  533.  
  534. ProScreen is a state-of-the-art screen generator/editor system that allows  you
  535. to  create  and  edit 25x80 or 43x80 text mode screens.   ProScreen  does  with
  536. screens what word-processors do for text.
  537.  
  538. To create a screen, you set the foreground and background colors and begin with
  539. a blank screen.  Pressing the F1 key puts you in Line Draw Mode.  You may  then
  540. draw  single and double lines anywhere on the screen by pressing a  Shift-Arrow
  541. key  combination. Drawing boxes is just as easy.  Press F2 for Box  Draw  Mode,
  542. position  the  cursor  where you want the upper right corner to  be  and  press
  543. Enter.   A blinking phantom box outlines the box as you move the cursor to  the
  544. lower  right  corner  and press Enter again. You can use any  of  the  standard
  545. single/double  line character configurations for the frame, or you  may  select
  546. any of the 256 ASCII characters instead.
  547.  
  548. Once a box is drawn, you may set a four-sided margin, similar to that of a word
  549. processor,  within the box for text and other graphics in any  color.  Advanced
  550. ProScreen features include automatic center of one or all rows within  margins,
  551. text  margins,  block  move, block copy, copy row, copy  column  and  character
  552. painting.
  553.  
  554. Color control is a ProScreen forte. With just a few keystrokes, you can  change
  555. the  colors on the entire screen, or just within the margins. You  can  replace
  556. one  color  with another, and you can even have 16 foreground  colors  over  16
  557. background colors on any CGA, EGA, or VGA adapter.  You can finally have  color
  558. combinations  like  cyan (3) over high intensity cyan (11) or  black  (0)  over
  559. yellow  (14).   In fact, you can control the colors for each character  on  the
  560. screen.
  561.  
  562. ProScreen  gives you three complete screen buffers so that you can  edit  three
  563. different screens at the same time, copy or cut and paste between the  buffers,
  564. merge  screens inside or outside windows, and much more.  You can even use  the
  565. UnDo key as a fourth buffer to see pop-up windows appear and disappear, because
  566. the  UnDo  will  undo  an  UnDo!  Each ProScreen  function  takes  only  a  few
  567. keystrokes, and an entire indexed manual is available by pressing the  Shift-F8
  568. key.   With just 3 or 4 keystrokes, you can jump into help, view an Index,  and
  569. get up to 17 pages of help for any command or function.
  570.  
  571. We  use ProScreen as a tool to help prototype our software.  We use the  editor
  572. to design complex screens with overlying menus and pop-up windows in just a few
  573. minutes, setting the colors the way we want, and using ProScreen's rich set  of
  574. features to handle things like centering.  Once the screen is designed, all  of
  575. the  row/column, color and screen formatting information is displayed  and  can
  576. easily be inserted into the code.  Just read the data, write the code, and  run
  577. it. No more tedious writing, compiling, viewing, changing your mind, rewriting,
  578. and recompiling over and over again to get screens right.
  579.  
  580. Once a screen is designed, it can be incorporated into your BASIC programs with
  581. the  routines in ProBas or with either the BASIC or assembly  modules  provided
  582. with  ProScreen.  We used ProScreen to design 49 pull-down menus in our  ProRef
  583. product.   This  made designing the menus a snap and modifying menus  down  the
  584. road a breeze.  The 49 ProRef screen files take up over 200k of disk space  and
  585. any  file can be loaded from disk in less than one 18th of a second  using  the
  586. ProBas  DFREAD  routine.   But that wasn't good enough.   We  used  the  ProBas
  587. SCRUNCH  routine to put all 49 menus in a single 16,114-byte file and read  the
  588. entire  file, all 49 screens, to a 16k array so that any menu can be  instantly
  589. displayed  anywhere  on  the  screen, with  the  fast  memory-to-memory  screen
  590. routines in ProBas.
  591.  
  592. But  designing  and displaying cute screens is only a fraction  of  ProScreen's
  593. abilities.   You  may specify up to 130 input/output fields  per  screen.   The
  594. powerful  fielding features include 19 pre-defined input masks, 2  user-defined
  595. input masks, options like mandatory fill, numeric input only, accept input only
  596. within  a  predetermined range, and much more.   Not only can  you  design  the
  597. fields  in  the ProScreen editor, you can test them as  well,  tweaking  things
  598. until  they  are  just  right.  Rather than  a  clumsy  attempt  at  generating
  599. inefficient BASIC code, the field information is stored in the screen file, and
  600. you  get  optimized BASIC source code to $INCLUDE or MERGE  into  your  program
  601. (ProScreen supports the interpreter) which you access via a GOSUB, passing data
  602. via arrays.  This is much more efficient and has the added benefit of  allowing
  603. you to alter screens and field information without recompiling the program.
  604.  
  605. ProScreen  is  a must for designing real-time demos of software.  The  resident
  606. PSMPHOTO  module stays in memory and allows you to take snapshots of any  text-
  607. mode  screen and import it into the ProScreen editor.  Since ProScreen  screens
  608. are  BLOAD  compatible,  you can use ProScreen with any  of  the  popular  demo
  609. packages  like  Dan Bricklin's DEMO or Microsoft's Show Partner.   Or  you  can
  610. write your own demo program in BASIC.
  611.  
  612. One of the more powerful features of ProScreen is that you can save windows  to
  613. file just as easily as you can save entire screens.  With the PSMPHOTO  program
  614. and  the  cut  and  paste capabilties in the ProScreen  editor,  you  can  take
  615. snapshots  of each screen in your program, and separate windows and menus  into
  616. their  own files.  Using the ProBas system of virtual screens, you  can  create
  617. dazzling  demos or emulate your programs in real time. Just using  the  example
  618. code in the ProBas demo, you could pop-up a window generated in your program or
  619. the  ProScreen editor, and allow the user to move it anywhere on the screen  in
  620. real-time, using either a mouse or the arrow keys.
  621.  
  622. ProScreen  comes  with  a  288-page manual  with  Introduction,  Tutorial,  and
  623. Reference  sections that not only show you how to use ProScreen, but  also  has
  624. helpful  tips and effective techniques on using ProScreen alone,  or  ProScreen
  625. and ProBas together for even more power.  We even explain in detail how we  did
  626. the trick of compressing 49 screens of over 200k to a single 16k file, and  how
  627. to use it once it has been compressed.
  628.  
  629. ProScreen  was  formerly  marketed by DNA Systems under  the  name  SMS  Screen
  630. Management System and over 3,000 have been sold throughout the world.  We think
  631. you'll agree that it is the best screen generator/editor on the market.
  632.  
  633.  
  634.  
  635. Copyright  1988  Hammerly  Computer Services, Inc.  The  information  presented
  636. herein may not be reproduced without permission. Trademarks: ProBas, The ProBas
  637. ToolKit,  The  ProBas TeleComm ToolKit, ProScreen,  ProRef:  Hammerly  Computer
  638. Services,  Inc.   The  Weiner Shell:  Gryphon  Microproducts  Inc.  QuickBASIC,
  639. BASCOM:  Microsoft  Inc.  IBM: International Business Machines  Corp.  ProComm:
  640. DataQuest Inc:  Norton Utilities: Peter Norton Computing Inc.
  641.