home *** CD-ROM | disk | FTP | other *** search
/ Between Heaven & Hell 2 / BetweenHeavenHell.cdr / 500 / 436 / advbas.qrf < prev    next >
Text File  |  1987-04-02  |  16KB  |  415 lines

  1.                           ADVBAS v3.3 Quick Reference
  2.  
  3.  
  4.  
  5.      Note: variable  names  here  are  chosen  for  special clarity and may not
  6.  match  those  found  in  the ADVBAS.DOC file.  The names of the variables used
  7.  are  not  important  per  se  and  may  be  changed  readily.  This is a quick
  8.  reference  for  your  convenience,  and is not intended to be used without the
  9.  DOC file!
  10.  
  11.  
  12.  
  13.  
  14.  ADDMATI       Add a scalar to an array.
  15.                CALL ADDMATI(ARRAYLOC, ARRAYSIZE, SCALAR, OVFLOWERR)
  16.  
  17.  ANY2DEC       Convert an integer in any base (2-35) to decimal (base 10).
  18.                CALL ANY2DEC(ANUM$, NBASE, DNUM, ERCD)
  19.  
  20.  BKSCROLL      Scroll part of the screen backwards or clear it.
  21.                BKSCROLL(LEFTCOL, TOPROW, RTCOL, BOTROW, LINES)
  22.  
  23.  BKSPACE       Destructive backspace.
  24.                CALL BKSPACE(COL, ROW): LOCATE ROW, COL
  25.  
  26.  BLOCKMOVE     Copy information from one area of memory to another.
  27.                CALL BLOCKMOVE(FROMSEG, FROMOFS, TOSEG, TOOFS, BYTES, DIRECTION)
  28.  
  29.  BSQ           Squeeze the blanks out of a text string by encoding it.
  30.                CALL BSQ(ST$, SLEN)
  31.  
  32.  BUSQLEN       Tell how long a BSQed string will be once unsqueezed.
  33.                CALL BUSQLEN(ST$, SLEN)
  34.  
  35.  BUSQ          Unsqueeze a BSQed string (use this -after- BUSQLEN).
  36.                CALL BUSQ(ST$, USQST$)
  37.  
  38.  CALCATTR      Calculate attribute (for Xqprint, etc) from colors.
  39.                CALL CALCATTR(FOREGROUND, BACKGROUND, ATTRIBUTE)
  40.  
  41.  CARRIER       Get modem Carrier Detect status.
  42.                CALL CARRIER(COMMPORT, CDSTATUS)
  43.  
  44.  CHECKSUM      Calculate Xmodem-type checksum for a string.
  45.                CALL CHECKSUM(RECORD$, CHKSUM)
  46.  
  47.  CLREOL        Clear to the end of the current screen line.
  48.                CALL CLREOL
  49.  
  50.  CLRKBD        Clear the keyboard buffer of any pending keys.
  51.                CALL CLRKBD
  52.  
  53.  COPYFILE      Copies a file.
  54.                CALL COPYFILE(FROMFILE$, TOFILE$, ERRCODE)
  55.  
  56.  CRC           Calculate Xmodem-type Cyclical Redundancy Check for a string.
  57.                CALL CRC(RECORD$, HICRC, LOCRC)
  58.  
  59.  DATASEG       Return BASIC's Data Segment.
  60.                CALL DATASEG(DSEG)
  61.  
  62.  DATE2INT      Squeeze a date to a single integer.
  63.                CALL DATE2INT(MONTH, DAY, YEAR, SQZDATE)
  64.  
  65.  DATEN2S       Convert a date from numeric to string form.
  66.                CALL DATEN2S(MONTH, DAY, YEAR, DAT$)
  67.  
  68.  DATES2N       Convert a date from string to numeric form.
  69.                CALL DATES2N(MONTH, DAY, YEAR, DAT$)
  70.  
  71.  DEC2ANY       Converts a decimal (base 10) integer to any base (2-35).
  72.                CALL DEC2ANY(DNUM, NBASE, ANUM$, ALEN)
  73.  
  74.  DELAY         Delays for a given number of seconds.
  75.                CALL DELAY(SECONDS)
  76.  
  77.  DELAY18TH     Delays for a given number of 18ths of seconds.
  78.                CALL DELAY18TH(FRACSECONDS)
  79.  
  80.  DELCHR        Delete a char from the specified screen location.
  81.                CALL DELCHR(ROW, COL)
  82.  
  83.  DELSUB        Delete a subdirectory.
  84.                SUBDIR$ = SUBDIR$ + CHR$(0): CALL DELSUB(SUBDIR$, ERRCD)
  85.  
  86.  DISKSTAT      Returns disk status information.
  87.                CALL DISKSTAT(DRIVE$, FREE.CLUSTERS, TOTAL.CLUSTERS,
  88.                              BYTES.PER.SECTOR, SECTORS.PER.CLUSTER)
  89.  
  90.  DMPRINT       Displays a string using only DOS functions.
  91.                CALL DMPRINT(ST$)
  92.  
  93.  DOSINKEY      Get a character from the DOS standard input device.
  94.                CALL DOSINKEY(CHRCODE, CHRTYPE)
  95.  
  96.  DRVSPACE      Return free space left on disk (error returns negative value).
  97.                CALL DRVSPACE(DRV$, A, B, C): FREE# = CDBL(A)*CDBL(B)*CDBL(C)
  98.  
  99.  DTR           Turn the comm signal DTR on (TOGGLE=1) or off (TOGGLE=0).
  100.                CALL DTR(COMMPORT, TOGGLE)
  101.  
  102.  EQUIPMENT     Return hardware configuration: K of RAM and I/O ports.
  103.                CALL EQUIPMENT(MEMORY, PARALLEL, SERIAL, JOYSTICK)
  104.  
  105.  EXIST         See if a given file exists (no wildcards).
  106.                CALL EXIST(FIL$, FILEXISTS)
  107.  
  108.  EXTRACT       Extract a substring from a string using a given delimiter.
  109.                CALL EXTRACT(ST$, DLM$, INDEX, START, SLEN):
  110.                SUBSTR$ = MID$(ST$, START, SLEN)
  111.  
  112.  FCLOSE        Close a file opened by FOPEN or FCREATE.
  113.                CALL FCLOSE(HANDLE)
  114.  
  115.  FCREATE       Create a file or truncate an existing one.
  116.                CALL FCREATE(FIL$, ATTR, HANDLE, ERRCODE)
  117.  
  118.  FINDFIRSTF    Get a file using wildcards (used for first call).  See also
  119.                FINDNEXTF, GETNAMEF, GETATTRF, GETDATEF, GETTIMEF, GETSIZEF.
  120.                FIL$ = FIL$ + CHR$(0): CALL FINDFIRST(FIL$, ATTR, ERRCD)
  121.  
  122.  FINDNEXTF     Get the next file using wildcards (see FINDFIRSTF et al).
  123.                CALL FINDNEXTF(ERRCD)
  124.  
  125.  FOPEN         Open an existing file.
  126.                CALL FOPEN(FIL$, FACCESS, FMODE, ERRCODE)
  127.  
  128.  FREAD         Read from a file opened by FOPEN or FCREATE.
  129.                CALL FREAD(HANDLE, BUFFER, BYTES, BYTESREAD, ERRCODE)
  130.  
  131.  FSETEND       Move to the end of an open file (for appending).
  132.                CALL FSETEND(HANDLE)
  133.  
  134.  FSETREC       Move to a given record of an open file.
  135.                CALL FSETREC(HANDLE, RECSIZE, RECNUMBER)
  136.  
  137.  FWRITE        Write to a file opened by FOPEN or FCREATE.
  138.                CALL FWRITE(HANDLE, BUFFER, BYTES, BYTESWRITTEN, ERRCODE)
  139.  
  140.  GETATTRF      Get the attribute of a file found with FINDxxxF.
  141.                CALL GETATTRF(ATTR)
  142.  
  143.  GETCRT        Get the display type (0: mono, -1: color).
  144.                CALL GETCRT(DISPLAYTYPE)
  145.  
  146.  GETDATEF      Get the date of a file found with FINDxxxF.
  147.                CALL GETDATEF(MONTH, DAY, YEAR)
  148.  
  149.  GETDOSV       Get the current DOS version.
  150.                CALL GETDOSV(MAJORV, MINORV)
  151.  
  152.  GETDRV        Get the current default disk drive.
  153.                DRV$ = " ": CALL GETDRV(DRV$)
  154.  
  155.  GETEXTM       Get amount of extended memory (AT systems only).
  156.                CALL GETEXTM(KILOBYTES)
  157.  
  158.  GETFATTR      Get the attribute of a file.
  159.                FIL$ = FIL$ + CHR$(0): CALL GETFATTR(FIL$, ATTR)
  160.  
  161.  GETFDATE      Get the date of a file.  If error, MONTH set to -1.
  162.                FIL$ = FIL$ + CHR$(0): CALL GETFDATE(FIL$, MONTH, DAY, YEAR)
  163.  
  164.  GETFTIME      Get the (24hr) time of a file.  If error, HOUR set to -1.
  165.                FIL$ = FIL$ + CHR$(0): CALL GETFTIME(FIL$, HOUR, MINUTE, SECOND)
  166.  
  167.  GETKBD        Get the status of the keyboard toggles.
  168.                CALL GETKBD(INSERT, CAPSLOCK, NUMLOCK, SCROLLLOCK)
  169.  
  170.  GETKEY        Wait for and return one of a specified list of keys.
  171.                KY$=" ": CALL GETKEY(GOODKEY$, KY$)
  172.  
  173.  GETLIMM       Returns the status of expanded memory in the system.
  174.                CALL GETLIMM(TOTPAGES, FREEPAGES)
  175.  
  176.  GETLINE       Returns a selected line from a saved screen (see SCRSAVE).
  177.                LINE$ = SPACE$(80): CALL GETLINE(SCRLOC, LINENR, LINE$, LLEN):
  178.                LINE$ = LEFT$(LINE$, LLEN)
  179.  
  180.  GETNAMEF      Get the filename of a file found using FINDxxxF.
  181.                FIL$ = SPACE$(12): CALL GETNAMEF(FIL$, FLEN):
  182.                FIL$ = LEFT$(FIL$, FLEN)
  183.  
  184.  GETSCREEN     Get and save any part of any screen page in an array.
  185.                CALL GETSCREEN(SCRN(0), TOPROW, LFTCOL, BOTROW, RGTCOL,
  186.                               PAGE, SCRMODE)
  187.  
  188.  GETSIZEF      Get the size of a file found using FINDxxxF.
  189.                CALL GETSIZEF(SIZELO, SIZEHI): SIZELO# = CDBL(SIZELO):
  190.                IF SIZELO<0 THEN SIZELO# = SIZELO# + 65536#
  191.                FILESIZE# = SIZELO# + CDBL(SIZEHI) * 65536#
  192.  
  193.  GETSUB        Get the default subdirectory.
  194.                SUB$ = STRING$(64,0): CALL GETSUB(SUB$, SLEN):
  195.                SUB$ = "\" + LEFT$(SUB$, SLEN)
  196.  
  197.  GETTIMEF      Return the (24hr) time of a file found using FINDxxxF.
  198.                CALL GETTIMEF(HOUR, MINUTE, SECOND)
  199.  
  200.  INSCHR        Insert a space at the specified screen location.
  201.                CALL INSCHR(ROW, COL)
  202.  
  203.  INT2DATE      Unsqueeze a date squeezed by DATE2INT.
  204.                CALL INT2DATE(MONTH, DAY, YEAR, SQZDATE)
  205.  
  206.  INT2TIME      Unsqueeze a time squeezed by TIME2INT.
  207.                CALL INT2TIME(HOUR, MIN, SEC, SQZTIME)
  208.  
  209.  KEYPRESS      Returns nonzero if a key is waiting in the keyboard buffer.
  210.                CALL KEYPRESS(KEYHIT)
  211.  
  212.  LOCASE        Convert uppercase characters to lowercase.
  213.                CALL LOCASE(ST$)
  214.  
  215.  LROTATE       Rotate the characters in a string left once.
  216.                CALL LROTATE(ST$)
  217.  
  218.  MAKESUB       Make a subdirectory.  Sets ERRCD if error.
  219.                SUB$ = SUB$ + CHR$(0): CALL MAKESUB(SUB$, ERRCD)
  220.  
  221.  MAKEWINDOW    Makes a pop-up window appear on the display.
  222.                CALL MAKEWINDOW(LEFTCOL, TOPROW, RIGHTCOL, BOTTOMROW,
  223.                                LABEL$, FRAME, TYPE, FORE, BACK, PAGE)
  224.  
  225.  MDELCHR       Delete char at current cursor position, obeying MWINDOW (qv).
  226.                CALL MDELCHR.
  227.  
  228.  MINSCHR       Insert space at current cursor position, obeying MWINDOW (qv).
  229.                CALL MINSCHR.
  230.  
  231.  MLOAD         Same as BASIC's BLOAD statement.
  232.                CALL MLOAD(FIL$)
  233.  
  234.  MMBUTTON      Returns which mouse buttons are currently pressed.
  235.                CALL MMBUTTON(LEFTBUTTON, RIGHTBUTTON)
  236.  
  237.  MMCHECK       Returns status of mouse and number of buttons if existent.
  238.                CALL MMCHECK(BUTTONS): IF BUTTONS=0 THEN PRINT "No Mouse!"
  239.  
  240.  MMCLICK       Returns which mouse buttons were clicked since last check.
  241.                CALL MMCLICK(LEFTBUTTON, RIGHTBUTTON)
  242.  
  243.  MMCURSOROFF   Makes the mouse cursor invisible.
  244.                CALL MMCURSOROFF
  245.  
  246.  MMCURSORON    Makes the mouse cursor visible.
  247.                CALL MMCURSORON
  248.  
  249.  MMGETLOC      Returns the position of the mouse cursor.
  250.                CALL MMGETLOC(COL, ROW)
  251.  
  252.  MMSETLOC      Sets the position of the mouse cursor.
  253.                CALL MMSETLOC(COL, ROW)
  254.  
  255.  MMSETRANGE    Sets the range of permissible values for the mouse cursor.
  256.                CALL MMSETRANGE(LEFTCOL, TOPROW, RIGHTCOL, BOTTOMROW)
  257.  
  258.  MONTH         Given the month number, return the month name.
  259.                MONTH$ = SPACE$(9)
  260.                CALL MONTH(MONTH$, MLENGTH, MONTHNR)
  261.                MONTH$ = LEFT$(MONTH$, MLENGTH)
  262.  
  263.  MPRINTC       Display a character using DOS calls, obeying MWINDOW (qv).
  264.                CALL MPRINTC(CH$, COL, ROW): LOCATE ROW, COL
  265.  
  266.  MPRINT        Display a string using DOS calls, obeying MWINDOW (qv).
  267.                CALL MPRINT(ST$, COL, ROW): LOCATE ROW, COL
  268.  
  269.  MULTIAND      Performs AND on each char of a string with a supplied value.
  270.                CALL MULTIAND(ST$, ANDVAL)
  271.  
  272.  MULTIOR       Performs OR on each char of a string.
  273.                CALL MULTIOR(ST$, ORVAL)
  274.  
  275.  MULTIXOR      Performs XOR on each char of a string.
  276.                CALL MULTIXOR(ST$, XORVAL)
  277.  
  278.  MWINDOW       Set up a screen window for MPRINT/MPRINTC/MINSCHR/MDELCHR.
  279.                CALL MWINDOW(LEFTCOL, TOPROW, RTCOL, BOTROW)
  280.  
  281.  PRINTSCREEN   Send the current screen display to the first printer device.
  282.                CALL PRINTSCREEN
  283.  
  284.  PUTSCREEN     Put a saved area of the screen back at a given location.
  285.                CALL PUTSCREEN(SCRN(0), TOPROW, LFTCOL, BOTROW, RGTCOL,
  286.                               PAGE, SCRMODE)
  287.  
  288.  QPRINT        Quick print to screen.  Doesn't understand control codes.
  289.                CALL QPRINT(ST$, ROW, COL)
  290.  
  291.  READBITF      Returns a value from an array of arbitrary (1-8) bit length.
  292.                CALL READBITF(ARRAYLOC, INDEX, BITLEN, VALUE)
  293.  
  294.  RECOLOR       Switch everything on the screen of one color to another (text).
  295.                CALL RECOLOR(OLDCOLRATTR, NEWCOLRATTR)
  296.  
  297.  RESETPOINT    Resets a point on a text screen (0-79 col by 0-49 row).
  298.                CALL RESETPOINT(COLUMN, ROW)
  299.  
  300.  REVERSE       Reverse the chars in a string.
  301.                CALL REVERSE(ST$)
  302.  
  303.  RROTATE       Rotate the chars in a string right once.
  304.                CALL RROTATE(ST$)
  305.  
  306.  SCROLL        Scroll a section of the screen or clear it.
  307.                CALL SCROLL(LEFTCOL, TOPROW, RTCOL, BOTROW, LINES)
  308.  
  309.  SCRREST       Restore the screen display from an array (see SCRSAVE).
  310.                CALL SCRREST(ARRAYLOC)
  311.  
  312.  SCRRESTP      Restore the screen display to a given page from an array.
  313.                CALL SCRREST(ARRAYLOC, SCRNPAGE)
  314.  
  315.  SCRRESTPD     Restore the screen to a given page with direct screen writes.
  316.                CALL SCRREST(ARRAYLOC, SCRNPAGE)
  317.  
  318.  SCRSAVE       Save the current screen display to an array.
  319.                CALL SCRSAVE(ARRAYLOC)
  320.  
  321.  SCRSAVEP      Save the display on a given screen page to an array.
  322.                CALL SCRSAVEP(ARRAYLOC, SCRNPAGE)
  323.  
  324.  SCRSAVEPD     Save a given screen page with direct screen reads to an array.
  325.                CALL SCRSAVEPD(ARRAYLOC, SCRNPAGE)
  326.  
  327.  SETCOMM       Set a communications port to the given parameters.
  328.                CALL SETCOMM(COMMPORT, BPS, PARITY, WORDLENGTH, STOPBITS)
  329.  
  330.  SETDRV        Set the default drive.
  331.                DRV$ = "B": CALL SETDRV(DRV$)
  332.  
  333.  SETFATTR      Set a file's attribute.
  334.                FIL$ = FIL$ + CHR$(0): SETFATTR(FIL$, ATTR)
  335.  
  336.  SETFTD        Set a file's time and date.  If error, return -1 in MONTH.
  337.                FIL$ = FIL$ + CHR$(0)
  338.                CALL SETFTD(FIL$, MONTH, DAY, YEAR, HOUR, MINUTE, SECOND)
  339.  
  340.  SETMATI       Set an array to a given scalar (integer) value.
  341.                CALL SETMATI(ARRAYLOC, ARRAYSIZE, VALUE)
  342.  
  343.  SETKBD        Set the status of the keyboard toggles.
  344.                CALL GETKBD(INSERT, CAPSLOCK, NUMLOCK, SCROLLLOCK)
  345.  
  346.  SETPOINT      Sets a point on a text screen (0-79 col by 0-49 row).
  347.                CALL SETPOINT(COLUMN, ROW)
  348.  
  349.  SETSUB        Set the default subdirectory.  Returns -1 if error.
  350.                SUB$ = SUB$ + CHR$(0): CALL SETSUB(SUB$, ERRCD)
  351.  
  352.  SHIFTL        Shift an integer left by COUNT bits.
  353.                CALL SHIFTL(VALUE, COUNT)
  354.  
  355.  SHIFTR        Shift an integer right by COUNT bits.
  356.                CALL SHIFTR(VALUE, COUNT)
  357.  
  358.  SOUNDEX       Returns the Soundex code for a string.
  359.                SCODE$ = ST$: CALL SOUNDEX(ST$, SCODE$, SLEN):
  360.                SCODE$ = LEFT$(SCODE$, SLEN)
  361.  
  362.  SPEAKER       Enables (TOGGLE=1) or disables (TOGGLE=0) the speaker.
  363.                CALL SPEAKER(TOGGLE)
  364.  
  365.  STRIP         Strips occurrences of a target character from a string.
  366.                CALL STRIP(ST$, TCHR$, SLEN): ST$ = LEFT$(ST$, SLEN)
  367.  
  368.  STRIPBLANKS   Strips blanks (and control chars) from left (1), right (2),
  369.                or both (3) sides of a string.
  370.                CALL STRIPBLANKS(ST$, STRIPWHICH, SLEN)
  371.                ST$ = LEFT$(ST$, SLEN)
  372.  
  373.  STRIPRANGE    Strips chars within a given (inclusive) range from a string.
  374.                CALL STRIPRANGE(ST$, LO, HI, SLEN): ST$ = LEFT$(ST$, SLEN)
  375.  
  376.  SUBEXIST      See if a subdirectory exists (drive spec is acceptable).
  377.                CALL SUBEXIST(SUBDIR$, STATUS)
  378.  
  379.  TESTPOINT     Tests a point on a text screen (0-79 col by 0-49 row).
  380.                CALL TESTPOINT(COLUMN, ROW, RESULT)
  381.  
  382.  TIME2INT      Squeeze the time down to a single integer.
  383.                CALL TIME2INT(HOUR,MIN,SEC,SQZTIME)
  384.  
  385.  TIMEN2S       Convert a time from numeric to string form.
  386.                CALL TIMEN2S(HOUR, MIN, SEC, TIM$)
  387.  
  388.  TIMES2N       Convert a time from string to numeric form.
  389.                CALL TIMES2N(HOUR, MIN, SEC, TIM$)
  390.  
  391.  TINSTR        Search for a given type of character in a string.
  392.                Alpha=1, Numeric=2, Symbol=4, Control=8, Graphics=16, Blank=32.
  393.                CALL TINSTR(ST$,CHRTYPE,PLACE)
  394.  
  395.  UPCASE        Convert a string to uppercase.
  396.                CALL UPCASE(ST$)
  397.  
  398.  WEEKDAY       Return the weekday (1 - 7, Sunday thru Saturday).
  399.                CALL WEEKDAY(DAY)
  400.  
  401.  WRITEBITF     Put a value in an array of arbitrary (1-8) bit length.
  402.                CALL WRITEBITF(ARRAYLOC, INDEX, BITLEN, VALUE)
  403.  
  404.  XLATE         Translate a string, char by char, using a translation table.
  405.                CALL XLATE(CH$, XLATETABL$)
  406.  
  407.  XMPRINT       Translate a char, and if it's not NUL, display it via DOS.
  408.                CALL XMPRINT(CH$, XLATETABL$, COL, ROW): LOCATE ROW, COL
  409.  
  410.  XQPRINT       Extended quick print, with color and page selection.
  411.                CALL XQPRINT(ST$, ROW, COL, ATTR, PAGE)
  412.  
  413.  XQPRINTD      Extended direct quick print, with color and page selection.
  414.                CALL XQPRINTD(ST$, ROW, COL, ATTR, PAGE)
  415.