home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / BASIC / BASDLX16.ZIP / BASDLX.DOC next >
Encoding:
Text File  |  1987-09-08  |  54.9 KB  |  1,501 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.              BASDLX (C) Copyright 1986,1987 By Gustavo H. Verdun  Page 1
  8.  
  9.  
  10.                                      BASDLX.LIB
  11.  
  12.             Deluxe Library of functions written in ASSEMBLY language for
  13.                   the Microsoft QuickBASIC and IBM BASIC compilers
  14.  
  15.           Basic Deluxe
  16.  
  17.           To use  BASDLX you will need,  either the IBM Basic  compiler  or
  18.           the  Microsoft QuickBASIC compiler,  PC-DOS/MS-DOS version 2.0 or
  19.           later is required for drive functions to  work.  These  functions
  20.           have  been  tested  with  the  IBM Basic compiler version 2.0 and
  21.           QuickBASIC version 2.01 and have caused no problems.  However,  I
  22.           am not responsible for any damages caused by but, not limited to,
  23.           the  use,  misuse,    non-use or inability to use BASDLX.   These
  24.           function are intended to be used in compiled basic only.  Do  not
  25.           confuse  compiled BASIC with the BASIC interpreter,  BASIC.COM or
  26.           BASICA.COM that comes with DOS or GWBASIC. The functions provided
  27.           in this library have been designed to run faster  than  any  cor-
  28.           respondent BASIC code,  and often take up less space, leaving you
  29.           with more room to write longer programs!
  30.  
  31.           Distribution
  32.  
  33.           You are free to use the functions provided in the BASDLX  library
  34.           in your programs.  The copyright is only here to preserve my work
  35.           and to protect you from any unauthorized modifications of BASDLX;
  36.           it is NOT here  to  protect  against  the  free  distribution  of
  37.           BASDLX.  You may copy and distribute BASDLX to  others as long as
  38.           no  fee or special consideration is charged and all  of  the  re-
  39.           lated  files  to  BASDLX  are included together in the unmodified
  40.           form.  If you find use of BASDLX in your programs and find  it  a
  41.           valuable programming tool then I would appreciate it if you would
  42.           send  a  contribution  ($25 suggested).  It  would be nice if you
  43.           could acknowledge use of BASDLX functions  in  your  programs  or
  44.           documentation that use them. With a minimum contribution of $25 I
  45.           will  send  you  a disk with the source code to BASDLX.  Previous
  46.           contributors will  need only send $10 to  receive  an  update  of
  47.           BASDLX. A contribution of $55 will grant you a one year subscrip-
  48.           tion  to  BASDLX.  With  a  subscription   you will automatically
  49.           receive new updates as soon as they come out  (about  10  updates
  50.           per  year.)    Updates  come  complete with source & object code,
  51.           BASDLX library, and disk-based documentation.
  52.  
  53.           Using BASDLX with the IBM BASIC Compiler
  54.  
  55.           These functions have been incorporated into  a  library  to  make
  56.           them easily accessible by the DOS LINK.EXE program.  All you have
  57.           to  do is copy BASDLX.LIB to the directory or disk where you keep
  58.           your library files.   When you link your  programs that use func-
  59.  
  60.                     --- BASDLX   Version 1.6   September 1987 ---
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.              BASDLX (C) Copyright 1986,1987 By Gustavo H. Verdun  Page 2
  68.  
  69.           tions  from  BASDLX,   be sure to specify: BASDLX when the linker
  70.           prompts you for a Library [.LIB] file(s).  Please refer  to  your
  71.           DOS manual for more information on the LINK.EXE program.
  72.  
  73.           Using BASDLX with the Microsoft QuickBASIC Compiler
  74.  
  75.           I  am  now  including  a  user  library  for  use with QuickBASIC
  76.           (BASDLX.EXE.) Please read your QuickBASIC user  manual  for  more
  77.           information on User Libraries.
  78.  
  79.           Note: If you need to get a copy of the object code then,  send me
  80.           $5 or,  $3 and  a Disk and I'll mail you the  latest  version  of
  81.           BASDLX with Object code.
  82.  
  83.           Attention QuickBASIC 3.0 Users
  84.  
  85.           If  you  need  to  create a stand alone program using QB with the
  86.           compile to BCOM30 option, do not use the programming environment;
  87.           It has a bug in it!  Use the compile from command line option in-
  88.           stead. See page 71 of any QB manual for more information about QB
  89.           compile options.
  90.  
  91.           The Future
  92.  
  93.           I have over 20 new function ideas that I hope to add to BASDLX as
  94.           soon as they are ready. Some are in the alpha testing stage while
  95.           others  are  still  on paper.  The primary goal for BASDLX is the
  96.           creation of a library of functions that are not only helpful  but
  97.           are one-of-a-kind, Original & Unique. I am always more than will-
  98.           ing to hear from you any suggestions you may have for BASDLX.
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.                     --- BASDLX   Version 1.6   September 1987 ---
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.              BASDLX (C) Copyright 1986,1987 By Gustavo H. Verdun  Page 3
  128.  
  129.                                     Special Notes
  130.  
  131.           The  functions  provided  in this library are available to you by
  132.           using the CALL command from compiled BASIC. All numeric variables
  133.           passed as arguments to the functions must  defined  as  integers.
  134.           This means that you can either globally set all numeric variables
  135.           to integers by issuing the DEFINT A-Z command at the beginning of
  136.           your program or,  you can declare a single variable as integer by
  137.           adding a "%" symbol at the end of its name. (i.e.  I%,  this will
  138.           declare the variable as being integer). I will always add the "%"
  139.           symbol  at  the  end of all my numeric variables in all of my ex-
  140.           amples, to remind you that they MUST be integers.
  141.  
  142.           The variable names used in my examples don't have to  be  exactly
  143.           the  same.  you  may  choose  other  names that would be more ap-
  144.           propriate. keep in mind that the variable types do have to be the
  145.           same in the argument list (i.e. strings must be strings, integers
  146.           must be integers).
  147.  
  148.           NOTE: You may find in the argument list some arguments  that  are
  149.           enclosed in []'s.  This is used to signify which arguments can be
  150.           safely entered directly instead of needing to set the value in  a
  151.           variable. i.e. CALL GUN(10) or CALL GUN(5+5): are perfectly legal
  152.           ways to `call' the GUN function;  Either form will "fire" the gun
  153.           10 times and return.  Only some of the variables in BASDLX may be
  154.           entered  this way in argument list,  This is because BASIC stores
  155.           the values in a temporary variable and upon return from the func-
  156.           tion BASIC destroys them,  and BASDLX sometimes returns vital in-
  157.           formation in that variable.
  158.  
  159.           As I mentioned before I have tested these functions and they,  to
  160.           the best of my knowledge,  work bug free.  But,  if you happen to
  161.           find  any  bugs I'll be happy to fix them.  Be sure to check that
  162.           you are CALLing the functions properly.  That  is  that  you  are
  163.           sending  the  correct arguments to the function.  One of the most
  164.           common error that occurs is when the  calling  program  sends  to
  165.           the  function  an incorrect variable type.  Remember that numeric
  166.           variables must be declared integer.
  167.  
  168.           Please refer any questions, comments,  requests for new functions
  169.           or contributions to the following address:
  170.  
  171.                                  Gustavo  H. Verdun
  172.                                  6424 Hollins Drive
  173.                                  Bethesda, MD 20817
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.                     --- BASDLX   Version 1.6   September 1987 ---
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.              BASDLX (C) Copyright 1986,1987 By Gustavo H. Verdun  Page 4
  188.  
  189.           Function Name: ALLDIRS
  190.           Arguments    : (Dir.Array$(),Maxdirs%,Drive$,Ercd%)
  191.           Type         : DOS/System
  192.           Purpose      : Searches and returns  all  of the available direc-
  193.                          tory paths of the specified drive in an array.
  194.  
  195.           Description  :
  196.  
  197.           Dir.Array$(0),  This  is  where the directory names found will be
  198.           saved.  Each element in this ONE dimensional array must be set to
  199.           some  length.  ALLDIRS is not very picky about the minimum length
  200.           but if it ever finds a directory path that will not  fit  in  the
  201.           space  provided  it  will  stop and return with an `out of string
  202.           space condition'.  DOS limits the maximum length of any directory
  203.           path  to  64 characters including the drive specifier (i.e.  C:),
  204.           slashes and string terminator (ASCII 0) So,  you will never  need
  205.           more than a string length of 64 characters per element.
  206.  
  207.           Maxdirs%,  tells  ALLDIRS the number of elements in Dir.Array$().
  208.           If ALLDIRS finds more directories than  space  is  provided  then
  209.           ALLDIRS stops and returns with a `Out of string space condition'.
  210.           Upon  return  from  ALLDIRS,  Maxdirs%= the number of directories
  211.           found.
  212.  
  213.           Drive$,  Specify drive to search.  The first  character  in  this
  214.           string  must  specify  the drive letter all other characters,  if
  215.           any,  are ignored.  (ALLDIRS will NOT convert the drive letter to
  216.           upper case, you may have to do it separately if it is important.)
  217.  
  218.           Ercd%,  like all disk functions,  errors may occur.  If,  Ercd%=0
  219.           then everything is o.k.  An error code of -1 = Drive selected  is
  220.           not valid. -2 = Out of String space.
  221.  
  222.           Example:
  223.           Dim dir.array$(50):for i=0 to 50:dir$(i)=space$(64):next:d$="C:"
  224.           ercd%=0:max%=51:call alldirs(dir.array$(0),max%,d$,ercd%)
  225.           if ercd% then print "Error :";ercd%
  226.           print "Directories found:"
  227.           for i= 0 to max%:print dir$(i):next
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.                     --- BASDLX   Version 1.6   September 1987 ---
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.              BASDLX (C) Copyright 1986,1987 By Gustavo H. Verdun  Page 5
  248.  
  249.           Function Name: ALLDRIVES
  250.           Arguments    : (Num_of_drives)
  251.           Type         : DOS/System
  252.           Purpose            : Returns  the total  number of logical drives
  253.                          (Diskette, Fixed, Ram, Etc.) Available.
  254.  
  255.           Description  :
  256.           This function will return a minimum of 2 Drives,  since any  com-
  257.           puter is assumed to have the logical drives A: & B: Even if there
  258.           is only one physical drive.
  259.  
  260.           Example:
  261.  
  262.           drvs%=0:call alldrives(drvs%)
  263.           print "You have ";drvs%;" drives available."
  264.  
  265.           Function Name: ALLFILES
  266.           Arguments    : (search$,[file_attribute%],dir$(),max_elem%,ercd%)
  267.           Type         : DOS/System
  268.           Purpose       : Scans drive  and returns the specified files in a
  269.                          string array.
  270.  
  271.           Description  :
  272.           search$: This specifies the search pattern.  if Search$ = "" then
  273.           the default "*." pattern is used (without the quotes). The search
  274.           pattern may contain a drive letter, path, filename and extension.
  275.           The * and ?  wildcards are accepted. The search$ must end with an
  276.           ASCII 0 character.
  277.  
  278.           file_attribute%: This specifies the attribute of the files to  be
  279.           searched for.  See: "File Attributes" at the end of this documen-
  280.           tation for a detailed explanation.
  281.  
  282.           dir$(): This is the first array element where matched files  will
  283.           be  stored.  Make sure that every element in this one-dimensional
  284.           array is of a minimum length of 12.
  285.  
  286.           max_elem%: When calling the function this number must be  set  to
  287.           the maximum number of array elements available to ALLFILES.  Upon
  288.           return from ALLFILES this variable will  contain  the  number  of
  289.           files found.
  290.  
  291.           ercd%:  If  ercd%=0 then no errors have occurred.  (Note: A files
  292.           not found error is only recorded by max_elem%=0)
  293.           -1        Bad DOS Version
  294.           -2        Out of string space (Either the elements in dir$()  are
  295.                     not  set  to  the  minimum  string  length of 13 or not
  296.                     enough elements.)
  297.  
  298.  
  299.  
  300.                     --- BASDLX   Version 1.6   September 1987 ---
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.              BASDLX (C) Copyright 1986,1987 By Gustavo H. Verdun  Page 6
  308.  
  309.           Function Name: ALLFILES (Continued)
  310.  
  311.           Example:
  312.  
  313.           Option Base 0
  314.           dim dir$(100)
  315.           .
  316.           for i%=0 to 100:dir$(i%)=space$(13):next
  317.           search$="":attr%=0:files%=101
  318.           call allfiles(search$,attr%,dir$(0),files%,ercd%)
  319.           if ercd% then print "Directory size exceeded program limits":end
  320.           for i%=0 to files%-1:print dir$(i%):next
  321.  
  322.  
  323.           Function Name: BOX
  324.           Arguments    : ([width%],[height%],[FRAME$],[color%],[mode%])
  325.           Type         : integer array service
  326.           Purpose      : Draws a box using the supplied arguments.
  327.  
  328.           Description  :
  329.           [width%] & [height%] :   All dimensions are internal.  This func-
  330.           tion  uses  the  current  cursor location as the top right corner
  331.           (frame) of the box.
  332.  
  333.           [FRAME%] See Documentation supplement for a complete  description
  334.           of the [FRAME%]
  335.  
  336.           [color%], here, you may specify the color attribute that BOX will
  337.           use.   The   formula   for   the   color  value  is  as  follows:
  338.           color%=(BACKGROUND and 7)*16+FOREGROUND
  339.  
  340.           [mode%] :
  341.  
  342.             0       No Grow, `Boxes' Flash on screen.
  343.             1       Grow From Center out.
  344.             2       Grow From Top Right to Bottom Left
  345.             3       Grow From Top Left to Bottom Right.
  346.             4       Grow From Bottom Left to Top Right.
  347.             5       Grow From Bottom Right to Top Left.
  348.  
  349.           Example:
  350.  
  351.           locate 1,1
  352.           call box (78,23,FRAME$,7,1)
  353.           'rem this will draw a box around the entire screen.
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.                     --- BASDLX   Version 1.6   September 1987 ---
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.              BASDLX (C) Copyright 1986,1987 By Gustavo H. Verdun  Page 7
  368.  
  369.           Function Name: BSORTN
  370.           Arguments    : (Num_of_elements,Integer_array%(start))
  371.           Type         : integer array service
  372.           Purpose      : Sorts an integer array in ascending order with
  373.                          negative numbers appearing at the end  in
  374.                          ascending order.
  375.  
  376.           Description:
  377.           Integer variables in BASIC can contain  numbers  between  -32,768
  378.                and 32,767. This function does not distinguish between nega-
  379.                tive  or positive numbers.  It will sort the elements in as-
  380.                cending order with all the negative  numbers  (if  existing)
  381.                appearing  after  the  positive  numbers in ascending order.
  382.                Make sure that the array is of type  integer.  Unpredictable
  383.                results may occur if not!
  384.  
  385.           Example:
  386.           dim a%(300):print "Array Before sort:"
  387.           for i%=0 to 300:a%(i%)=int(rnd(1)*30000):print a%(i%),:next
  388.           enum%=301:call bsortn(enum%,a%(0))
  389.           rem enum%=301 because there are 301 elements in the array (0-300)
  390.                print "Array After sort:":for i%=0 to 300:print a%(i%),:next
  391.           rem the list should be sorted in ascending numerical order!
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.                     --- BASDLX   Version 1.6   September 1987 ---
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.              BASDLX (C) Copyright 1986,1987 By Gustavo H. Verdun  Page 8
  428.  
  429.           Function Name: BSORTS
  430.           Arguments    : (Num_of_elements%,Array$(start_position))
  431.           Type         : String array service
  432.           Purpose      : Sorts a string array in ascending alphabetical
  433.                          order.
  434.  
  435.           Description:
  436.           The  first argument should contain the number of elements to sort
  437.                in the array.  The second argument is the array  itself.  be
  438.                sure  to  specify  the  starting position in the array [i.e.
  439.                BSORTS(elements%,a$(0))]
  440.           IMPORTANT: All of the elements  in  the  array  MUST  have  equal
  441.                lengths, if not, unpredictable results will occur to BASIC
  442.  
  443.           Example:
  444.           dim a$(10):a$(0)"First":a$(1)="Second":a$(2)="Third"
  445.           a$(3)="Fourth":a$(4)="Fifth":a$(5)="Sixth":a$(6)="Seventh"
  446.           a$(7)="Eighth":a$(8)="Ninth":a$(9)="Tenth"
  447.           for i%=0 to 9:b$=space$(10):call setl(a$(i%),b$):a$(i%)=b$:next
  448.           rem the above line will make all of the elements in the array
  449.           rem have equal lengths.
  450.           print "Array before sort:":for i%=0 to 9:print a$(i%):next
  451.           enum%=10:call bsorts(enum%,a$(0))
  452.           rem  enum%=10  because  there  are 10 elements in the array (0-9)
  453.                print "Array After sort:":for i%=0 to 9:print a$(i%):next
  454.           rem the list should be sorted in ascending alphabetical order!
  455.  
  456.           Function Name: CASESTR   (Name changed to conform with QB 3.00)
  457.           Arguments    : (string_var$,[case_val%])
  458.           Type         : String service
  459.           Purpose      : Converts string to defined case.
  460.  
  461.           Description  :
  462.           case_val%, 0 = Convert string to lower case. 1 = Convert string
  463.           to upper case,  2 = Swap case (All upper case characters
  464.           will be converted to lower case and vice-versa.)
  465.  
  466.           Example:
  467.  
  468.           a$="this will be in caps":case%=1:call case(a$,case%)
  469.           print a$
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.                     --- BASDLX   Version 1.6   September 1987 ---
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.              BASDLX (C) Copyright 1986,1987 By Gustavo H. Verdun  Page 9
  488.  
  489.           Function Name: CASERANGE
  490.           Arguments    : (string_var$,[start%],[length%],[case_val%])
  491.           Type         : String service
  492.           Purpose      : Converts a portion of a string to defined case.
  493.  
  494.           Description  :
  495.           case_val%, 0 = Convert string to lower case. 1 = Convert string
  496.           to upper case,  2 = Swap case (All upper case characters
  497.           will be converted to lower case and vice-versa.)
  498.  
  499.           Example:
  500.           a$="the word `caps' will be in upper case :caps"
  501.           case%=1:call case(a$,40,4,1):print a$
  502.  
  503.           Function Name: CNFGSD
  504.           Arguments    : ([overwrite%],[insert%],[frame%],[tab%])
  505.           Type         : Configuration for GETSTRD
  506.           Purpose      : Change default settings for GETSTRD.
  507.  
  508.           Description  :
  509.           [Overwrite%] & [Insert%],  (Default is Full &  Half  size  cursor
  510.           respectively) These two arguments contain the cursor shapes  that
  511.           indicate  if overwrite or insert  is active.  The formula for the
  512.           values that must be stored in these two arguments is as  follows:
  513.           =(START  and 31)*256+STOP   Where START & STOP are the values for
  514.           cursor start & stop scan lines which must be in the range  of  0-
  515.           31.  (See the BASIC LOCATE command for more information on cursor
  516.           shapes.) NOTE: a value of zero for  these  options  leaves  their
  517.           current defaults in effect.
  518.  
  519.           [Frame%],  (Default  ASCII  95)  This argument contains the ASCII
  520.           code for the frame character.  GETSTRD draws a one line frame  of
  521.           the  length of String$ to let you see the field size.  A value of
  522.           zero for this option leaves its current default in effect.
  523.  
  524.           [Tab%],  (Default 1) Number of spaces to insert for a [TAB]  key.
  525.           Valid number is in the range of 0-10. A value above 10 leaves the
  526.           current default unchanged.
  527.  
  528.           Example:
  529.           oc%=(0 and 31)*256+7:ic%=(5 and 31)*256+7 'rem this is here to
  530.           'rem show the values of the default cursors.
  531.           ic%=0:oc%=:frame%=177:tab%=0:call cnfgsd(ic%,oc%,frame%,tab%)
  532.  
  533.           -In this example: Insert & overwrite cursor values are unchanged.
  534.           Frame  character  is  set  to ASCII 177.  [TAB] key will insert 0
  535.           spaces in string (disables [TAB] key).  NOTE: If ASCII 32 (space)
  536.           is not a valid key in GETSTRD then [TAB] does nothing.
  537.  
  538.  
  539.  
  540.                     --- BASDLX   Version 1.6   September 1987 ---
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.             BASDLX (C) Copyright 1986,1987 By Gustavo H. Verdun  Page 10
  548.  
  549.           Function Name: DATESTR
  550.           Arguments    : (String_space$,Length%,[mode%])
  551.           Type         : Date support
  552.           Purpose      : Reads  the  date and writes string_space$ with the
  553.                          date  in the following format: week-day month day,
  554.                          year. (i.e. Thursday, March 12, 1987)
  555.  
  556.           Description  :
  557.           The first argument,  String_space$,  must be  of    at  least  30
  558.           characters  of length.  If Length% returns with a zero then there
  559.           wasn't enough space in the  string  variable  String_space$.  The
  560.           Mode%  argument  tells the function to either write the full name
  561.           of the week-day and month or just  the  first  three  letters  of
  562.           each.  If  Mode%=0,  or any number other than one,  then the full
  563.           names of the week-day and month will be written.  If Mode%=1 then
  564.           only the first three characters of the week-day and month will be
  565.           written.  The Length% argument is used to tell BASIC the true and
  566.           final length of String_space$ (This way you easily get rid of the
  567.           trailing characters after the year since,  the actual  length  of
  568.           String_space$ will vary greatly depending on the date.)
  569.           NOTE:  String_space$  will never be any longer than 30 characters
  570.           of length.
  571.  
  572.           Example:
  573.           D$=space$(30):l%=0:mode%=0:call datestr(d$,l%,mode%)
  574.           if l%=0 then print "Not enough space in D$!":stop
  575.           d$=left(d$,l%):print "Today is ";d$
  576.           D$=space$(30):l%=0:mode%=1:call datestr(d$,l%,mode%)
  577.           if l%=0 then print "Not enough space in D$!":stop
  578.           d$=left(d$,l%):print "Today is ";d$
  579.  
  580.           Function Name: DLXMOUSE
  581.           Arguments    : (buttons%)
  582.           Type         : Mouse support
  583.           Purpose      : Resets mouse and returns the number of buttons.
  584.  
  585.           Description  :
  586.           This function performs three tasks.  First,  it checks to see  if
  587.           the mouse is installed by attempting to reset it. If mouse is not
  588.           available  then  buttons% = 0 otherwise it will return the number
  589.           of available buttons. Second, depending if mouse is available, it
  590.           sets an internal `switch' used,  internally,  by BASDLX functions
  591.           to tell if mouse should be supported.  Third, if you set buttons%
  592.           = -1 before calling the function it will automatically `lock-out'
  593.           the use of the mouse by any function in BASDLX. (one may override
  594.           a forced lock-out or force a mouse reset  from  the  keyboard  by
  595.           pressing  the  [Ctrl]-[Backspace] keys together while inside of a
  596.           BASDLX function that supports a mouse.
  597.  
  598.  
  599.  
  600.                     --- BASDLX   Version 1.6   September 1987 ---
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.             BASDLX (C) Copyright 1986,1987 By Gustavo H. Verdun  Page 11
  608.  
  609.           Function Name: DLXMOUSE (Continued)
  610.  
  611.           Currently,  only GETSTRD supports the use of a mouse,  but  there
  612.           will be several other functions,  soon to be released,  that will
  613.           also support a mouse.
  614.  
  615.           Example:
  616.           call dlxmouse(b%)
  617.           print "You have ";b%;"mouse buttons available."
  618.  
  619.  
  620.           Function Name: GETSTRD
  621.           Arguments    : (string$,length%,validkeys$,[color%],mode%)
  622.           Type         : String/Data entry enhancement
  623.           Purpose     : This  function accepts input from the keyboard  and
  624.                          stores  it  in  the  String$ argument allowing the
  625.                          use of standard editing commands.
  626.  
  627.           Description  :
  628.           String$,  This is the space where the input data will be  stored.
  629.           The  field  size  of  the input data will be set to the length of
  630.           this string.  If there is already some data in the string it will
  631.           not be erased. Just be sure to set the length to the proper value
  632.           to  let  GETSTRD  know  that there is already data in the String$
  633.           variable that is ready to be edited.  Due to the limitations that
  634.           BASIC  imposes  on assembly language with variables,  the String$
  635.           variable must be filled in to the maximum size of the field.
  636.  
  637.           Length%,  If you have a string length that is  shorter  than  the
  638.           field size that you have allocated for the data,  GETSTRD will be
  639.           able to know and upon return tell you the actual  length  of  the
  640.           string.  This  makes it easy to remove the trailing spaces in the
  641.           String$ if they are  not  important.  A  Length%  of  zero  tells
  642.           GETSTRD  that  it  is a `fresh' data field containing no previous
  643.           input.
  644.  
  645.           Validkeys$,  This is the new option added  to  GETSTRD.  If  this
  646.           string is set to null (i.e. length of 0) then GETSTRD will accept
  647.           all  keys  from ASCII 32-126,  otherwise GETSTRD will accept only
  648.           the keys  defined  in  this  string.  (Control  keys,  except  ^M
  649.           [Return],  ^[ [Escape],  ^H [Backspace],  & ^I [Tab],  are always
  650.           discarded.)
  651.  
  652.           [Color%], here,  you may specify the color attribute that GETSTRD
  653.           will  use.  The  formula  for  the  color  value  is  as follows:
  654.           Color%=(BACKGROUND and 7)*16+FOREGROUND
  655.  
  656.  
  657.  
  658.  
  659.  
  660.                     --- BASDLX   Version 1.6   September 1987 ---
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.             BASDLX (C) Copyright 1986,1987 By Gustavo H. Verdun  Page 12
  668.  
  669.           Function Name: GETSTRD (Continued)
  670.  
  671.  
  672.           Mode%,  GETSTRD currently supports two  modes  of  operation.  If
  673.           Mode%=0  GETSTRD  will  operate  normally  without exiting unless
  674.           [ESC] or [RETURN] is pressed.  If Mode%=1  GETSTRD  will  operate
  675.           normally  except  that  if it reads from the keyboard an extended
  676.           scan code that is not one of it's editing commands it  will  exit
  677.           the  function  and return with the extended scan code to that key
  678.           in Mode%. This feature makes it easy to write programs that allow
  679.           the user to scroll through other data fields without changing  or
  680.           having  to re-enter data.  If upon exit from the GETSTRD function
  681.           Mode%=-1 then the [ESC] key was pressed and your  program  should
  682.           do whatever the [ESC] key means. If [ESC] means nothing to your
  683.  
  684.           program then just go back to the line that CALLs GETSTRD and con-
  685.           tinue.
  686.  
  687.           The following Editing keys are supported:
  688.           [LEFT-ARROW]             Move cursor one space left.
  689.           [RIGHT-ARROW]            Move cursor one space right.
  690.           [HOME]                   Move cursor to beginning of line.
  691.           [END]                    Move cursor to the end of line.
  692.           (NOTE:    The end of the line is determined by the current length
  693.           of the input data and not the maximum length of the data field.)
  694.           [CTRL]-[RIGHT-ARROW]     Move cursor one word right.
  695.           [CTRL]-[LEFT-ARROW]      Move cursor one word left.
  696.           [CTRL]-[HOME]            Erase entire input field.
  697.           [CTRL]-[END]             Erase from cursor position to the end of
  698.                                    the line.
  699.           [CTRL]-[BACKSPACE]       Forces a mouse reset.
  700.                                    (SEE FUNCTION: DLXMOUSE
  701.                                     SEE ALSO MOUSE NOTES at the end off
  702.                                     this documentation.)
  703.           [INS]                    Set/Clear Insert mode.
  704.           [DEL]                    Deletes character at cursor position.
  705.           [BACKSPACE]              Deletes character to the left of cursor.
  706.           [TAB]                    Inserts x spaces. (See function CNFGSD)
  707.  
  708.           GETSTRD  now  supports the mouse as a pointing device.  Press the
  709.           left most mouse button and you will see a `second' cursor appear.
  710.           You can, while pressing the left-most button, move the mouse left
  711.           or right.  Once you are over the character where you wish to move
  712.           to,  release  the  button and you will see the cursor in that new
  713.           location.  If you wish to cancel the mouse movement then move the
  714.           mouse  to  the end of the line  and release the button (This will
  715.           cancel the mouse movement only if the input field  is  not  full,
  716.           otherwise it will move the cursor to the end of the field.)
  717.  
  718.  
  719.  
  720.                     --- BASDLX   Version 1.6   September 1987 ---
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.             BASDLX (C) Copyright 1986,1987 By Gustavo H. Verdun  Page 13
  728.  
  729.           Function Name: GETSTRD (Continue)
  730.  
  731.           Example      :
  732.           10 rem This example is for mode 0.
  733.           12 mode%=0
  734.           14 c%=31:A$="":valkey$="0123456789()-" ' Valid keys for phone #.
  735.           18 l%=len(A$):b$=space$(15):call setl(a$,b$):a$=b$ 'rem add field
  736.           20 print "Enter Phone #";
  737.           22 call getstrd(a$,l%,valkey$,c%,mode%)
  738.           24 a$=left$(a$,l%):if mode%=-1 then 18
  739.           .
  740.  
  741.           10 rem this example is for mode 1.
  742.           12 mode%=1:c%=31:A$=""
  743.           18 l%=len(A$):b$=space$(25):call setl(a$,b$):a$=b$:rem add field
  744.           20 locate 10,5:print "Enter  Name : ";:valkey$=""
  745.           22 call getstrd(a$,l%,valkey$,c%,mode%)
  746.           24 a$=left$(a$,l%):if mode%=-1 then 36
  747.           26 l%=len(C$):b$=space$(15):call setl(C$,b$):C$=b$:rem add field
  748.           28 locate 11,5:print "Enter Phone # ";:valkey$="01234567890()-"
  749.           30 call getstrd(c$,l%,valkey$,c%,mode%)
  750.           32 a$=left$(c$,l%):if mode%=-1 then 36
  751.           34 if mode%=72 or mode%=80 then 18
  752.           36 print "Data A: ";a$:print "Data B: ";c$:end
  753.  
  754.  
  755.  
  756.           Function Name: GRID
  757.           Arguments    : (X%(strt%),Y%(strt2%),[FRAME$],[Color%],[Mode%])
  758.           Type         : Video
  759.           Purpose      : Draws the specified grid on the screen.
  760.  
  761.           Description  :
  762.           x%(start),   This   array   specifies   the  "widths"  of  the  X
  763.           (Horizontal) range of the grid.  The first element (strt) in this
  764.           array  contains  the  cell  width  of  the left most column.  All
  765.           `cells' in a column will have the same "width".  The last element
  766.           in the array must be a -1.
  767.  
  768.           y%(start), This array specifies the "heights" of the Y (Vertical)
  769.           range  of the grid.  The first element in this array contains the
  770.           "cell height" of the first row,  the  second  contains  the  next
  771.           height of the second row.  All the `cells' in a row will have the
  772.           same cell height.  The last element (strt2) in this array must be
  773.           a -1.
  774.  
  775.           Note:  A Cell height or width of 0 (zero) is valid.  Cell heights
  776.           and widths are internal dimensions.
  777.  
  778.  
  779.  
  780.                     --- BASDLX   Version 1.6   September 1987 ---
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.             BASDLX (C) Copyright 1986,1987 By Gustavo H. Verdun  Page 14
  788.  
  789.           Function Name: GRID (Continued)
  790.  
  791.  
  792.           [FRAME$] This is the string that specifies the  frame  characters
  793.           for the grid.  Please SEE the documentation supplement file for a
  794.           complete description of the [FRAME$] argument.
  795.           [mode%], This argument specifies the grow mode to use. Grow modes
  796.           are as follows:
  797.  
  798.                0    No grow
  799.                1    Grow from the center of the grid.
  800.                2    Grow from the top right corner.
  801.                3    Grow from the top left corner.
  802.                4    Grow from the bottom left corner.
  803.                5    Grow from the bottom right corner.
  804.  
  805.           [color%],  here,  you may specify the color attribute  that  GRID
  806.           will  use.  The  formula  for  the  color  value  is  as follows:
  807.           color%=(BACKGROUND and 7)*16+FOREGROUND
  808.  
  809.           The grid's top left corner will be at the current location of the
  810.           cursor. Use the LOCATE command to set the location of the grid.
  811.  
  812.           Example:
  813.  
  814.           option base 1 'rem the option base of 1 is not necessary you
  815.           'rem may use option base 0 if you like but, remember to adjust
  816.           'the starting of the array. (strt)
  817.           dim x%(4),y%(5)
  818.           .
  819.           .
  820.           x%(1)=20:x%(2)=20:x%(3)=20:x%(4)=-1 ' Last element MUST be a -1
  821.           y%(0)=1:y%(2)=1:y%(3)=1:y%(4)=0:y%(5)=-1
  822.           attr%=7:mode%=1:f$=FRAME$
  823.           'Please SEE the documentation supplement a complete description
  824.           'of the FRAME$ argument.
  825.           call grid(x%(1),y%(1),f$,attr$,mode%)
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.                     --- BASDLX   Version 1.6   September 1987 ---
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.             BASDLX (C) Copyright 1986,1987 By Gustavo H. Verdun  Page 15
  848.  
  849.           Function Name: GUN
  850.           Arguments    : ([Num_of_shots%])
  851.           Type         : Speaker support
  852.           Purpose      : Simulates the sound of a gun or machine gun
  853.  
  854.           Description  :
  855.           This function generates the sound  by  sending  spurts  of  white
  856.           noise  to the speaker.  This will create the sound of a quick ex-
  857.           plosion.  the only parameter needed is the  number  of  shots  to
  858.           fire.
  859.  
  860.           Example:
  861.           input "Number of shots to fire :",shots%:if shots%=0 then end
  862.  
  863.           call gun(shots%)
  864.  
  865.           Function Name: JRCLICK
  866.           Arguments    : ([value%])
  867.           Type         : PCjr.
  868.           Purpose      : Activates/deactivates   the keyboard  click on the
  869.                          PCjr.
  870.  
  871.           Description  :
  872.           value%,  if  0  it turns the keyboard click off.  Any other value
  873.           will activate the keyboard click. This works only on the PCjr.
  874.  
  875.           Example :
  876.           call jrclick(0) 'rem deactivate the keyboard click
  877.           val%=1:call jrclick(val%) 'rem activate the keyboard click
  878.  
  879.           Function Name: MACHINE
  880.           Arguments    : (value%)
  881.           Type         : IBM machine type
  882.           Purpose      : Reads memory and returns machine code.
  883.  
  884.           Description  :
  885.           value%,  upon return the value% will contain a code  number.  Use
  886.           the following table to determine the machine type:
  887.  
  888.                Code                Machine
  889.                ----                -------
  890.                255                 PC
  891.                254                 PC-XT or Portable PC
  892.                253                 PCjr
  893.                252                 PC AT
  894.  
  895.           Note:  The  identification  number  of  PC  compatibles will most
  896.           likely differ from these numbers.  Some early XTs have a  machine
  897.           code of 255.
  898.  
  899.  
  900.                     --- BASDLX   Version 1.6   September 1987 ---
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.             BASDLX (C) Copyright 1986,1987 By Gustavo H. Verdun  Page 16
  908.  
  909.           Function Name: MACHINE (Continued)
  910.  
  911.           Example:
  912.           call machine(code%):print "Identification code :";code%
  913.  
  914.           Function Name: READP
  915.           Arguments    : (Port_num%)
  916.           Type         : Printer support
  917.           Purpose      : Reads the printer status of the specified port
  918.                          number (1-3) and returns with the status byte
  919.                          for that port in the Port_num% variable.
  920.  
  921.           Description:
  922.           The status byte of contains the following information:
  923.  
  924.           bit:     7    6    5    4    3    2-1  0
  925.                    |    |    |    |    |    |    |_Time out
  926.                    |    |    |    |    |    |_Unused
  927.                    |    |    |    |    |_1 = I/O Error
  928.                    |    |    |    |_1 = Selected
  929.                    |    |    |_1 = Out of Paper
  930.                    |    |_1 = Acknowledge
  931.                    |_1 = Not Busy
  932.  
  933.           IMPORTANT:  This function does not check for a valid port number.
  934.           Be sure that the port number is in the range of 1-3
  935.  
  936.           Example:
  937.           port%=1:call readp(port%):print port%
  938.           if port% and 32=32 then print "Printer is out of paper"
  939.           if port% and 128=0 then print "Printer is Off-line"
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.                     --- BASDLX   Version 1.6   September 1987 ---
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.             BASDLX (C) Copyright 1986,1987 By Gustavo H. Verdun  Page 17
  968.  
  969.           Function Name: RESETP
  970.           Arguments    : (Port_num%)
  971.           Type         : Printer support
  972.           Purpose      : Resets the specified printer port number (1-3)
  973.                          and returns with its status byte (see the READP
  974.                          function description for information on the
  975.                          printer status byte)
  976.  
  977.           Description:
  978.           This function sends a  reset status through the  parallel  inter-
  979.           face  of the specified port number.  This function does check the
  980.           parameters to be sure that they are in the range of 1  to  3.  If
  981.           the  Port_num% argument is equal to -1  upon return then the port
  982.           number is not valid.
  983.  
  984.           Example:
  985.           port%=1:call resetp(port%):print port%
  986.           if port%=-1 then print"Port number must be in the range of 1-3"
  987.           if port% and 32=32 then print "Printer is out of paper"
  988.           if port% and 128=0 then print "Printer is Off-line"
  989.  
  990.  
  991.  
  992.           Function Name: SETL
  993.           Arguments    : (Source_string$,Destination_string$)
  994.           Type         : String manipulation
  995.           Purpose      : This function will place the source string inside
  996.                          of the destination left-justified. If the source
  997.                          string is longer than the destination string then
  998.                          the right portion of the string will be truncated.
  999.  
  1000.           Description  :
  1001.           This function automatically  clears  the  destination  string  to
  1002.           spaces (ASCII 32) even if the source string is of length zero. Be
  1003.           sure  to save the destination string into the source string after
  1004.           the call.
  1005.  
  1006.           Example:
  1007.           a$="Enter Name":b$=space(20):call setl(a$,b$):a$=b$
  1008.           rem the last command "a$=b$" saves the destination string in the
  1009.           rem source string since the function cant' change the length of
  1010.           rem any string.
  1011.           print ">";a$";"<":REM this will show you the new length of a$
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.                     --- BASDLX   Version 1.6   September 1987 ---
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.             BASDLX (C) Copyright 1986,1987 By Gustavo H. Verdun  Page 18
  1028.  
  1029.           Function Name: SETR
  1030.           Arguments    : (Source_string$,Destination_string$)
  1031.           Type         : String manipulation
  1032.           Purpose      : This function will place the source string inside
  1033.                          the destination string right justified. If the
  1034.                          destination string is shorter than the source
  1035.                          string then the right portion of the string will
  1036.                          be truncated.
  1037.  
  1038.           Description  :
  1039.           This function automatically sets the destination  string  to  all
  1040.           spaces (ASCII 32) even if the source string is of length zero. Be
  1041.           sure  to save the destination string into the source string after
  1042.           the call.
  1043.  
  1044.           Example:
  1045.           a$="Enter Name":b$=space(20):call setr(a$,b$):a$=b$
  1046.           rem the last command "a$=b$" saves the destination string in the
  1047.           rem source string since the function cant' change the length of
  1048.           rem any string.
  1049.           print ">";a$;"<":REM this will show you the new length of a$
  1050.  
  1051.           Function Name: SNDOFF
  1052.           Arguments    : NONE
  1053.           Type         : Speaker support
  1054.           Purpose      : Turns speaker off. If this function is used then
  1055.                          the BASIC SOUND or BEEP commands will not work.
  1056.  
  1057.           Description  :
  1058.           This function can be useful for those  programs  that  use  sound
  1059.           prompts to get attention when input is required.  With this func-
  1060.           tion you can easily add the feature to your  programs  that  will
  1061.           let  the  user decide if he wants to have the sound prompts on or
  1062.           off.  If he wants the off then at the beginning of  your  program
  1063.           just call this function. Any sound statements following this com-
  1064.           mand  will execute without producing a single sound.  Be sure not
  1065.           to forget to turn them on before the program finishes (SNDON).
  1066.  
  1067.  
  1068.           Example :
  1069.           sound 200,1:sound 300,1:sound 400,1:call sndoff
  1070.           sound 200,1:sound 300,1:sound 400,1
  1071.  
  1072.  
  1073.  
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.                     --- BASDLX   Version 1.6   September 1987 ---
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.             BASDLX (C) Copyright 1986,1987 By Gustavo H. Verdun  Page 19
  1088.  
  1089.           Function Name: SNDON
  1090.           Arguments    : NONE
  1091.           Type         : Speaker support
  1092.           Purpose      : Turns sound on so that the BASIC SOUND and BEEP
  1093.                          commands work.
  1094.  
  1095.           Description:
  1096.           This function can help solve the problem that occurs when you use
  1097.           some memory resident programs that use the speaker and when  they
  1098.           are done the turn it off so that any SOUND or BEEP commands won't
  1099.           produce an audible signal.  It can also turn on the sound when it
  1100.           was turned off by the function SNDOFF!
  1101.  
  1102.           Example:
  1103.           sound 200,1:sound 300,1:sound 400,1:call sndoff
  1104.           sound 200,1:sound 300,1:sound 400,1:call sndon
  1105.           sound 200,1:sound 300,1:sound 400,1
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140.                     --- BASDLX   Version 1.6   September 1987 ---
  1141.  
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147.             BASDLX (C) Copyright 1986,1987 By Gustavo H. Verdun  Page 20
  1148.  
  1149.           Function Name: SPELLNUMBER
  1150.           Arguments    : ([num%],string_space$,length%,[type%])
  1151.           Type         : String Service
  1152.           Purpose      : Will   convert  the  number  in  num%  to  written
  1153.                          english using, ordinal or cardinal form.
  1154.  
  1155.           Description  :
  1156.           num%, any number you wish to convert to written form.
  1157.  
  1158.           string_space$,  Here  is where the spelled-out form of the number
  1159.           will be stored.  Since the length of this string depends  on  how
  1160.           large the number,  use your own discretion as too how long to set
  1161.           it. I suggest a length of 40 characters.
  1162.  
  1163.           length%,  Upon return from the function the length of the  string
  1164.           will be returned in this variable.
  1165.  
  1166.           type%,  if  type  = 0 then the cardinal spelling will be used for
  1167.           the number. Cardinal numbers are : one,two,three. .  .  Any other
  1168.           value  will  return  the ordinal spelling.  Ordinal numbers are :
  1169.           first,second,third. . .
  1170.  
  1171.           Example:
  1172.           n%=12:n$=space$(4):t%=0:call spellnumber(n%,n$,l%,t%) ' cardinal
  1173.           n$=left$(n$,l%):print "You have ";n$;" files available."
  1174.           .
  1175.           n%=val(mid$(date$,4,2)):n$=space$(40):t%=1
  1176.           call spellnumber(n%,n$,l%,t%):n$=left$(n$,l%) ' ordinal
  1177.           print "This is the ";n$;" day of the month."
  1178.  
  1179.           Function Name: TIMESTR
  1180.           Arguments    : (String_space$)
  1181.           Type         : Time support
  1182.           Purpose      : Reads  clock and loads String_space$ with the time
  1183.                          in  decimal  ASCII.  The  format  is  as  follows:
  1184.                          HH:MM:SS.HD
  1185.                          Where, HH are hours,MM are minutes, SS are seconds
  1186.                          and, HD are Hundredths of a second.
  1187.  
  1188.           Description  :
  1189.           String_space$  must  be  of  at least 11 characters of length for
  1190.           this function to work successfully.  If it is not of  the  proper
  1191.           minimum  length then the function will do nothing and return with
  1192.           the String_space$ unmodified.
  1193.  
  1194.           Example:
  1195.           t$=space$(11):call timestr(t$):print t$
  1196.  
  1197.  
  1198.  
  1199.  
  1200.                     --- BASDLX   Version 1.6   September 1987 ---
  1201.  
  1202.  
  1203.  
  1204.  
  1205.  
  1206.  
  1207.             BASDLX (C) Copyright 1986,1987 By Gustavo H. Verdun  Page 21
  1208.  
  1209.                                 Summary of functions
  1210.  
  1211.           Please use this as a quick summary to BASDLX functions. This sum-
  1212.           mary should only be used once you understand the  functions,  but
  1213.           just need a quick refreshment.
  1214.  
  1215.           Function Name: ALLDIRS
  1216.           Arguments    : (Dir.Array$(),Maxdirs%,Drive$,Ercd%)
  1217.           Type         : DOS/System
  1218.           Purpose      : Searches  and  returns  all  of the directories in
  1219.                          Drive$.
  1220.  
  1221.           Function Name: ALLDRIVES
  1222.           Arguments    : (Num_of_drives)
  1223.           Type         : DOS/System
  1224.           Purpose            : Returns  the total  number of logical drives
  1225.                          (Diskette, Fixed, Ram, Etc.) Available.
  1226.  
  1227.           Function Name: ALLFILES
  1228.           Arguments    : (search$,[file_attribute%],dir$(),max_elem%,ercd%)
  1229.           Type         : DOS/System
  1230.           Purpose      : Scans drive and returns the specified files  in  a
  1231.                          string array.
  1232.  
  1233.           Function Name: BOX
  1234.           Arguments    : (width%,height%,[FRAME$],[color%],[mode%])
  1235.           Type         : Video
  1236.           Purpose      : Draws a box using the supplied arguments.
  1237.  
  1238.           Function Name: BSORTN
  1239.           Arguments    : (Num_of_elements,Integer_array%(start))
  1240.           type         : integer variable service
  1241.           Purpose        : Sorts   an integer array in ascending order with
  1242.                          negative numbers appearing at the end  in  ascend-
  1243.                          ing order.
  1244.  
  1245.           Function Name: BSORTS
  1246.           Arguments    : (Num_of_elements%,Array$(start_position))
  1247.           Type         : String service
  1248.           Purpose         : Sorts  a string array in ascending alphabetical
  1249.                          order.
  1250.  
  1251.           Function Name: CASE
  1252.           Arguments    : (string_var$,[case_val%])
  1253.           Type         : String service
  1254.           Purpose      : Converts string to specified case.
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.                     --- BASDLX   Version 1.6   September 1987 ---
  1261.  
  1262.  
  1263.  
  1264.  
  1265.  
  1266.  
  1267.             BASDLX (C) Copyright 1986,1987 By Gustavo H. Verdun  Page 22
  1268.  
  1269.                             Summary of functions (Cont.)
  1270.  
  1271.           Function Name: CASERANGE
  1272.           Arguments    : (string_var%,[start%],[length%],[case_val%])
  1273.           Type         : String service
  1274.           Purpose      : Converts a portion of a string to specified case.
  1275.  
  1276.           Function Name: CNFGSD
  1277.           Arguments    : ([overwrite%],[insert%],[frame%],[tab%])
  1278.           Type         : Configuration for GETSTRD
  1279.           Purpose      : Change default settings for GETSTRD.
  1280.  
  1281.           Function Name: DATESTR
  1282.           Arguments    : (String_space$,Length%,mode%)
  1283.           Type         : Date support
  1284.           Purpose      : Reads  the  date and writes string_space$ with the
  1285.                          date in the following format: week-day month  day,
  1286.                          year. (i.e. Thursday, March 12, 1987)
  1287.  
  1288.           Function Name: DLXMOUSE
  1289.           Arguments    : (buttons%)
  1290.           Type         : Mouse Support
  1291.           Purpose      : Resets  the  mouse  and returns the number of but-
  1292.                          tons.
  1293.  
  1294.           Function Name: GETSTRD (Improved in this Version)
  1295.           Arguments    : (String$,length%,Validkeys$,[color%],mode%)
  1296.           Type         : String/Data entry enhancement
  1297.           Purpose      : This  function accepts input from the keyboard and
  1298.                          stores it in the  String$  argument  allowing  the
  1299.                          use of standard editing commands.
  1300.  
  1301.           Function Name: GRID
  1302.           Arguments    : (x%(strt%),y%(strt2%),[FRAME$],[color%],[mode%])
  1303.           Type         : Video
  1304.           Purpose      : Draws the specified grid on the screen.
  1305.  
  1306.           Function Name: GUN
  1307.           Arguments    : (Num_of_shots%)
  1308.           Type         : Speaker support
  1309.           Purpose      : Simulates the sound of a gun or machine gun
  1310.  
  1311.           Function Name: JRCLICK
  1312.           Arguments    : ([value%])
  1313.           Type         : PCjr.
  1314.           Purpose      : Activates or deactivates the keyboard click on the
  1315.                          PCjr.
  1316.  
  1317.  
  1318.  
  1319.  
  1320.                     --- BASDLX   Version 1.6   September 1987 ---
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.             BASDLX (C) Copyright 1986,1987 By Gustavo H. Verdun  Page 23
  1328.  
  1329.                             Summary of functions (Cont.)
  1330.  
  1331.           Function Name: MACHINE
  1332.           Arguments    : (value%)
  1333.           Type         : IBM machine type
  1334.           Purpose      : Reads memory and returns machine code.
  1335.  
  1336.           Function Name: READP
  1337.           Arguments    : (Port_num%)
  1338.           Type         : Printer support
  1339.           Purpose      : Reads the   printer status  of  the specified port
  1340.                          number  (1-3) and returns with the status byte for
  1341.                          that port in the port_num% variable.
  1342.  
  1343.           Function Name: RESETP
  1344.           Arguments    : (Port_num%)
  1345.           Type         : Printer support
  1346.           Purpose      : Resets  the specified printer  port  number  (1-3)
  1347.                          and  returns  with  its status byte (see the READP
  1348.                          function  description  for  information   on   the
  1349.                          printer status byte)
  1350.  
  1351.           Function Name: SETL
  1352.           Arguments    : (Source_string$,Destination_string$)
  1353.           Type         : String manipulation
  1354.           Purpose      : This function  will place the source string inside
  1355.                          of the destination left-justified.  If the  source
  1356.                          string  is longer than the destination string then
  1357.                          the right portion of the string will be truncated.
  1358.  
  1359.           Function Name: SETR
  1360.           Arguments    : (Source_string$,Destination_string$)
  1361.           Type         : String manipulation
  1362.           Purpose      : This function will place  the source string inside
  1363.                          the destination string  right  justified.  If  the
  1364.                          destination  string  is  shorter  than  the source
  1365.                          string then the right portion of the  string  will
  1366.                          be truncated.
  1367.  
  1368.           Function Name: SNDOFF
  1369.           Arguments    : NONE
  1370.           Type         : Speaker support
  1371.           Purpose     : Turns  speaker off.   If this function is used then
  1372.                          the BASIC SOUND or BEEP commands will not work.
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.                     --- BASDLX   Version 1.6   September 1987 ---
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.             BASDLX (C) Copyright 1986,1987 By Gustavo H. Verdun  Page 24
  1388.  
  1389.                             Summary of functions (Cont.)
  1390.  
  1391.           Function Name: SNDON
  1392.           Arguments    : NONE
  1393.           Type         : Speaker support
  1394.           Purpose      : Turns sound on so that the BASIC  SOUND  and  BEEP
  1395.                          commands work.
  1396.  
  1397.           Function Name: SPELLNUMBER
  1398.           Arguments    : ([num%],string_space$,length%,[type%])
  1399.           Type         : String Service
  1400.           Purpose      : Will convert the number in num% to written english
  1401.                          using, ordinal or cardinal form.
  1402.  
  1403.           Function Name: TIMESTR
  1404.           Arguments    : (String_space$)
  1405.           Type         : Time support
  1406.           Purpose      : Reads  clock and loads String_space$ with the time
  1407.                          in  decimal  ASCII.  The  format  is  as  follows:
  1408.                          HH:MM:SS.HD
  1409.                          Where, HH are hours,MM are minutes, SS are seconds
  1410.                          and, HD are Hundredths of a second.
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.                     --- BASDLX   Version 1.6   September 1987 ---
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.             BASDLX (C) Copyright 1986,1987 By Gustavo H. Verdun  Page 25
  1448.  
  1449.                                    File Attributes
  1450.  
  1451.           The following is a table containing the attribute for  each  type
  1452.           of file:
  1453.  
  1454.           Attribute      Type      Description
  1455.           ---------      ----      ----------------------------------------
  1456.                0         Normal    Most files have this code.
  1457.                1         Read Only This file may be read from but,
  1458.                                    NOT written to. (Write protects just
  1459.                                    the file.)
  1460.                2         Hidden    This type of file is hidden from
  1461.                                    the normal DIR (DOS) or FILES (BASIC)
  1462.                                    command.
  1463.                4         System    Indicates it is a SYSTEM File.
  1464.  
  1465.           Note:  It  is  valid  for  a file to contain more than one of the
  1466.           above attributes.  i.e.  a file may be Hidden and Read Only  thus
  1467.           having an attribute of (2 (hidden) + 1 (Read Only)) = 3.
  1468.  
  1469.  
  1470.                                      MOUSE NOTES
  1471.  
  1472.           GETSTRD  is  the only function that supports the use of the mouse
  1473.           as a pointing device.  Yet,  I am working on  several  functions,
  1474.           that are soon to be released, that will also support the mouse.
  1475.  
  1476.           Every time the mouse is reset, through a software command,  there
  1477.           is  about a second and a half or more,  depending on the speed of
  1478.           your machine,  of a delay.  This  unfavorable  delay  will  cause
  1479.           several  functions of BASDLX to slow down a program especially if
  1480.           several calls to a function are made.  This  delay  only  happens
  1481.           every  time  a mouse reset is performed.  It is only necessary to
  1482.           reset the mouse once in a program.  So,  I added the  Function  :
  1483.           DLXMOUSE  to  let BASDLX functions know that a mouse is installed
  1484.           or not with-out having to the time consuming `software reset'  on
  1485.           the  mouse every time the function is called.  This method should
  1486.           work well with the following exception: The mouse  register  that
  1487.           keeps  tab  on  the  cursor  (on/off)  is  a  decrement/increment
  1488.           register.  This means that if you execute the command to turn the
  1489.           cursor off two times in a row,  you will need to execute the com-
  1490.           mand to turn the cursor on,  two times again before you  see  the
  1491.           `mouse  cursor' on the screen.  the functions in BASDLX (that ac-
  1492.           cept the mouse) require that the mouse cursor be off  upon  entry
  1493.           and  that  just one command to turn the cursor on be necessary to
  1494.           show the `mouse cursor'.  BASDLX will have a full  set  of  mouse
  1495.           functions in a future release.
  1496.  
  1497.  
  1498.  
  1499.  
  1500.                     --- BASDLX   Version 1.6   September 1987 ---
  1501.