home *** CD-ROM | disk | FTP | other *** search
Text File | 1987-10-14 | 64.0 KB | 3,697 lines |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Q B W A R E / 1
-
-
-
-
-
-
- QBBIOS.LIB
-
- THE QUICKBASIC BIOS INTERFACE LIBRARY
-
-
-
- Version 1.0
-
-
-
-
-
- R E F E R E N C E M A N U A L
-
-
-
-
-
-
-
-
-
-
-
- AJM Software
- P.O. Box 5303
- Arvada, Co. 80005-0303
-
-
-
-
-
- Copyright (c) 1987 AJM Software
- All Rights Reserved
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- TABLE OF CONTENTS
-
-
- I. Introduction to QBBIOS.LIB .......................... 2
-
- II. A word about User supported software ................ 3
-
- III. Warranty Information ................................ 5
-
- IV. Registration and License Information ................ 6
-
- V. Product Support ..................................... 10
-
- VI. AJM Software Shareware Products ..................... 11
-
- VII. Using QBBIOS.LIB .................................... 12
-
- VIII. PRECAUTIONS (READ THIS SECTION) ..................... 14
-
- IX. BIOS Video Services ................................. 15
-
- X. BIOS Keyboard Services .............................. 22
-
- XI. BIOS Diskette Services .............................. 29
-
- XII. BIOS Miscellaneous Services ......................... 37
-
- XIII. BIOS AT Disk Services ............................... 43
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 1-
-
-
-
-
-
-
-
-
-
-
-
- Introduction to QBBIOS.LIB
-
-
- QBBIOS.LIB is the first part of the 3-part QBWARE/1 package. The entire
- package also includes QBDOS.LIB and QBFILE.LIB. The other packages will
- are described briefly in this documentation and are available immediately
- through AJM Software or should be available through normal shareware chan-
- nels before November 1, 1987. All of these products are sold together as
- QBWARE/1, but because of the wide functional differences between each
- library, the documentation and library routines are being kept separate.
- Any mention of QBWARE/1 in this documentation references all three
- libraries.
-
- QBBIOS.LIB is a series of assembler language subroutines specifically
- designed to provide an easy to use interface between Quickbasic programs
- and your computer's Basic Input/Output System (BIOS). The system BIOS is
- a collection of programs that control most of the fundamental processes or
- functions of your computer such as system startup or initialization, com-
- munications with peripheral devices such as video, disks, modems, print-
- ers, etc., handling of certain error conditions such as Ctrl-Break, Divide
- by zero, and others.
-
- Some of the services presented here are already provided in Quickbasic
- and many of them are not. They will provide you with a greater degree of
- control over the environment in which your program executes as well as
- performing these services much more quickly.
-
- You must keep in mind that these routines interact with your computer's
- BIOS and have been designed and tested on IBM and COMPAQ computers. In
- order for them to function properly, your computer must be an IBM or Com-
- patible. These functions have been tested with both version 2 and
- version 3 of Quickbasic.
-
-
-
-
-
-
-
-
-
-
-
- Quickbasic is a registered trademark of Microsoft.
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 2-
-
-
-
-
-
-
-
-
-
-
-
-
- A Word about User-supported Software
-
- User-supported software is a means for the computing community to receive
- quality software while directly supporting software authors. It is based
- on the ideas that:
-
- The value and utility of software is best assessed by the
- user on his or her own system. Only after using a program
- can one really determine whether it serves personal
- applications, needs and tastes.
-
- The creation of independent personal computer software can
- and should be supported by the computing community.
-
- Copying of programs should be encouraged, rather than
- restricted. The ease with which software can be distributed
- outside traditional commercial channels reflects the
- strength, rather than the weakness, of electronic
- information.
-
- Under the user supported concept, anyone may request a copy of a
- user-supported program by sending a blank, formatted disk to the program
- author together with an addressed, postage-paid return mailer. A copy of
- the program, along with documentation on disk, will be sent by return
- mail on the user's disk.
-
- The program carries a notice suggesting registration for the program. You
- should register if you are going to use the program on a regular basis.
- Regardless of whether you register and use the program, you are
- encouraged to copy and distribute the program for the private,
- non-commercial, trial use of others.
-
- User supported software is generally not public domain material; most
- programs of this nature carry a copyright notice. Rather, the author has
- licensed you to copy and use the program under certain conditions.
- Likewise, user supported software is not intended to be free software; it
- is an experiment in economics, not altruism. It is intended to provide
- quality software at a low price, while directly supporting the author,
- without the overhead of distributors, dealers and advertising that
- produces $500 software packages.
-
- User supported software is having a hard time. More and more packages
- are being taken out of this market, and offered as more traditional, and
- expensive, products. The reason for this is simple: lots of people are
- using the packages but very few are paying for them. And without the
- support of the users, there is absolutely no incentive for software
- authors to provide their programs in this fashion.
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 3-
-
-
-
-
-
-
-
-
-
-
-
-
-
- There are many good reasons to register. Besides supporting the author
- (that is, paying for the software you use), you generally get better
- support and receive mailed notification of updates and other products.
-
- In conclusion, if you regularly use a user supported program (sometimes
- called Freeware or Shareware) and have not sent in a registration to the
- author, please do so now. Only through the financial support of users
- will this kind of inexpensive software continue to be available.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 4-
-
-
-
-
-
-
-
-
-
-
-
-
- WARRANTY
-
-
- AJM Software makes no warranty of any kind, express or implied,
- including without limitation, any warranties of merchantability
- and/or fitness for a particular purpose. AJM Software shall
- not be liable for any damages, whether direct, indirect, special or
- consequential arising from a failure of this program to operate in the
- manner desired by the user. AJM Software shall not be liable
- for any damage to data or property which may be caused directly or
- indirectly by use of the program.
-
- IN NO EVENT WILL AJM Software BE LIABLE TO YOU FOR ANY DAMAGES,
- INCLUDING ANY LOST PROFITS, LOST SAVINGS OR OTHER INCIDENTAL OR
- CONSEQUENTIAL DAMAGES ARISING OUT OF YOUR USE OR INABILITY TO USE
- THE PROGRAM, OR FOR ANY CLAIM BY ANY OTHER PARTY.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 5-
-
-
-
-
-
-
-
-
-
-
-
-
- Registration and ordering information
-
-
- A QBWARE/1 registration licenses you to use the product on a regular
- basis. Registration includes mailed notification of updates and priority
- support.
- Users need register only one version of QBWARE/1 - registration includes
- licensed use of all upgrades.
-
- Individual registrations for QBWARE/1 are available from AJM Software
- at a cost of $39.00. AJM will provide you with the most current release
- of QBBIOS.LIB in both object and assembly source code form on 5 1/4 inch
- diskette. The reference manual will also be included on the diskette.
- A bound reference manual is available for an additional $25.00.
-
- Registration entitles you to include any QBWARE/1 routine in your
- applications for distribution without royalty. Including QBWARE/1
- in your applications without registration is strictly prohibited.
-
- Quantity discounts are available. Please see the section titled
- 'Corporate and quantity purchases'.
-
- In addition, evaluation disks are available at any time for $10. These
- disks do not include registration. The fee covers diskette, postage and
- handling.
-
- Please use the enclosed order form when placing an order.
-
- ORDERS OUTSIDE THE US: Please include an additional $10.00 to cover
- additional postage and handling costs. No C.O.D.'s will be accepted
- on orders delivered outside the US.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 6-
-
-
-
-
-
-
-
-
-
-
-
-
- Remit to: AJM Software Order Form
- P.O. Box 5303
- Arvada, CO 80005-0303
-
- Please send:
-
- ____ QBWARE/1 Disk (Evaluation only) ........... @ $ 10.00 ea $ ______
- (includes QBBIOS,QBDOS,QBFILE routines and manual on disk)
-
- ____ QBWARE/1 Registration ..................... @ $ 39.00 ea $ ______
- (includes QBWARE/1 disk and source code)
-
- ____ QBWARE/1 Bound Reference Manual ........... @ $ 25.00 ea $ ______
- (includes only the reference manual)
- Subtotal ______
-
- Less Discount <______>
-
- C.O.D. Fee ($5.00) ______
-
- Total $ ______
-
- Payment by: ( ) Check ( ) C.O.D.
-
- Name: ____________________________________________________________
-
- Company: ____________________________________________________________
-
- Address: ____________________________________________________________
-
- : ____________________________________________________________
-
- : ____________________________________________________________
-
- Day Phone: _________________________ Eve: ___________________________
-
-
-
- ORDERS OUTSIDE THE US: Please include an additional $10.00 to cover
- additional postage and handling costs. No C.O.D.'s will be accepted
- on orders delivered outside the US.
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 7-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Corporate and Quantity Purchases
-
-
- All corporate, business, government or other commercial users of QBBIOS.LIB
- must be registered. We offer quantity discounts starting at the sixth
- copy.
-
- Orders in quantities of less than 50 units are handled as bulk purchases.
- Purchases of over 50 units may be handled as quantity purchases or as
- corporate licensing agreements. Licensing agreements allow duplication
- and distribution of specific numbers of copies within the licensed
- institution. Duplication of multiple copies is not allowed except
- through execution of a licensing agreement. Please write for
- details.
-
- The quantity purchase discounts are as follows:
-
- 0- 5 copies: no discount
- 6- 20 copies: 20% discount
- 21+ copies: 40% discount
-
- ALL PRICES AND DISCOUNTS ARE SUBJECT TO CHANGE WITHOUT NOTICE. Discounts
- are not cumulative; they apply to single orders of like products only.
- Unit prices are the same as for individual users.
-
- WARNING: YOU MAY NOT USE QBWARE/1 WITHIN YOUR ORGANIZATION WITHOUT A PRIOR
- PURCHASE OR LICENSE ARRANGEMENT.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 8-
-
-
-
-
-
-
-
-
-
-
-
-
- LICENSE
-
- All versions of QBWARE/1, including version 1.0, are not public domain
- software, nor are they free software.
-
- QBWARE/1 is copyright (C) 1987 by AJM Software
-
- Non-registered users are granted a limited license to use QBWARE/1 on a
- trial basis for the purpose of determining whether it is suitable
- for their needs. Use of QBWARE/1, except for this limited purpose,
- requires registration. Use of non-registered copies of QBWARE/1 by any
- person, business, corporation, governmental agency or other entity
- institution is strictly forbidden.
-
- Registration permits a user the license to use QBWARE/1 for development
- purposes, only on a single computer. QBWARE/1 can be included into any
- program and distributed in library form only without royalty.
- A registered user may use the program on a different computer,
- but may not use the program on more than one computer at the same time.
-
- All users are granted a limited license to copy QBWARE/1 only for the
- trial use of others subject to the above limitations, and also the
- following:
-
- QBWARE/1 must be copied in unmodified form, complete with the file
- containing this license information.
-
- The full QBWARE/1 documentation must be included with the copy.
-
- No fee, charge or other compensation may be accepted or requested
- by any licensee, except a handling fee not to exceed $10.00
-
- QBWARE/1 may not be distributed in conjunction with any other
- product.
-
- The ASSEMBLY source code for QBWARE/1 may NOT be distributed under
- any circumstances.
-
- The object modules supplied with a registered copy of QBWARE/1
- may NOT be distributed under any circumstances.
-
- Operators of electronic bulletin board systems (Sysops) may post QBWARE/1
- for downloading by their users only as long as the above conditions are
- met.
-
- Distributors of public domain or user supported software, other than
- operators of electronic bulletin board systems, may distribute
- copies of QBWARE/1 subject to the above conditions only after obtaining
- written permission from AJM Software.
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 9-
-
-
-
-
-
-
-
-
-
-
-
-
- Product Support
-
- If you have any questions or comments about the use of QBWARE/1, please
- fill out a problem log and send it to us.
-
- In your note, describe as completely as possible the problem you
- are having. Let us know your machine configuration, which routine
- you are questioning, the version of QBBIOS.LIB, and any resident software
- installed. If possible, include a copy (on paper) of your source code.
-
- Describe what steps you take before the problem occurs, and exactly what
- the program does when it occurs. If you do not provide us with a
- complete description of the problem there is little we can do to help.
- We'll do our best to get you past the problem, but if you are not a
- registered user we do not guarantee to provide support of any kind.
-
- Please be patient. We usually respond to registered users within 3
- working days at the most.
-
- We will provide support to non-registered users at our discretion. It
- generally depends on how the request is worded and the mental disposition
- of the staff person assigned to handle requests on that day.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 10-
-
-
-
-
-
-
-
-
-
-
-
-
- AJM Software Shareware Products
-
- AJM Software has developed several software products being released
- through Shareware channels. These are:
-
- QBWARE/1
-
- QBBIOS.LIB The Quickbasic BIOS interface library
- QBDOS.LIB The Quickbasic DOS interface library
- QBFILE.LIB The Quickbasic DOS File Mgmt interface library
-
- QBWARE/2
-
- QBWINDOW.LIB The Quickbasic windowing system library
- QBFUNC.LIB The Quickbasic function library
-
-
- QBBIOS.LIB is the Quickbasic - BIOS interface library. This is a collec-
- tion of assembler routines that can be called from Quickbasic to gain
- direct access to video, keyboard, disk, and printer services. It also
- provides a method of determining the computer's configuration, including
- amount of RAM - conventional, extended, and LIMM expanded, number of hard
- disks and floppy disks, and more.
-
-
- QBDOS.LIB is the Quickbasic - DOS interface library. This is a collection
- of assembler routines that can be called from Quickbasic to gain access to
- most of the DOS facilities. Services include access to the print spooler
- (DOS V3.00 or higher only), acquisition of an additional 64KB of string
- space, access to the DOS Video routines, and routines to provide DOS redi-
- rection in a Quickbasic program, and more.
-
-
- QBFILE.LIB is the Quickbasic - DOS File Manager interface library. This
- is a collection of assembly language routines that can be called from
- Quickbasic to gain access to the DOS File Manager facilities. Services
- include file open, close, and various versions of create, get, set or
- change current drive or directory, read or write individual sectors, read
- or write individual records within a file, get or change disk volume
- names, rename or copy files, get or set file creation dates or times,
- directly access the disk directory or sub-directories, and more.
-
- QBWARE/2 will be released as a Shareware product on December 1, 1987.
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 11-
-
-
-
-
-
-
-
-
-
-
-
-
- Using QBBIOS.LIB
-
- All of the QBBIOS.LIB routines can be accessed via the Quickbasic 'Call'
- statement. The format of this statement is as follows:
-
- Call Function(Parm1%, Parm2%, Parm3$)
-
- Function is the name of the routine to be executed. It must be spelled
- exactly as shown in the following chapters. The parameters to be passed
- to the routine will also be explained in the following chapters. You must
- use the exact number of parameters shown in each function description and
- each parameter must be the type (i.e. character or integer) shown in each
- function description. Using an incorrect number of parameters or using a
- parameter of the wrong type (i.e. using character instead of integer) will
- generally result in the abnormal termination of your program. Usually you
- will get either a 'String Space Corrupt' error or you will start executing
- the wrong statements in your program. In any event, it is almost impos-
- sible to predict the results of these two types of errors, so it is criti-
- cal that you be very careful in coding the call statements.
-
- The parameters passed to QBBIOS.LIB routines will be either character or
- numeric integers. There are no special requirements for passing integers
- and constants may also be used. There is no functional difference between
- these two sets of statements:
-
- Example 1
-
- Drive$ = "A" 'Indicate drive a
- Type% = 2 'Indicate 360KB disk
- Call BsDASTyp(Drive$, Type%, Rc%) 'Call QBBIOS routine
-
- Example 2
-
- Call BsDASTyp("A", 2, Rc%)
-
- Note that Rc% must not be defined as a constant because the QBBIOS routine
- will return a value in this field and your Quickbasic program cannot
- access this field if it is defined as a constant. All character fields
- must be initialized to the proper length before calling a QBBIOS.LIB func-
- tion. Failing to do so may result in a 'String Space Corrupt' condition.
- The following two examples appear similar but Example 1 will fail and
- Example 2 will succeed because 'Char$' has been properly initialized.
-
- Example 1 (incorrect)
-
- Char$ = "" 'clear work field
- Call BsGKey(Char$, Scan.Code%) 'get the next keystroke
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 12-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Example 2 (correct)
-
- Char$ = space$(1) 'clear work field
- Call BsGKey(Char$, Scan.Code%) 'get the next keystroke
-
-
- Including the QBBIOS.LIB routines in your programs can be accomplished in
- a variety of ways. The non-registered user can do one of the following:
-
- 1) compile the program from within the Quickbasic interactive develop-
- ment environment
-
- 2) compile the program from the DOS prompt
-
- In order to use method 1, place the file QBBIOS.EXE in the directory con-
- taining your Quickbasic files (i.e. QB.EXE and BRUN20.LIB). When starting
- Quickbasic, enter the following command at the DOS prompt:
-
- QB /L QBBIOS.EXE
-
- You may now use any of the QBBIOS.LIB functions in your programs. If you
- compile your program using the 'Exe' output option, the appropriate
- QBBIOS.LIB functions will be available to the EXE file.
-
- In order to use method 2, place the file QBBIOS.EXE in the directory con-
- taining your Quickbasic system files. The following example shows how to
- create an executable file from the Basic source code in the file
- 'FILECHK.BAS':
-
- QB FILECHK /L QBBIOS.EXE;
- LINK FILECHK;
-
- Doing this will create the executable file 'FILECHK.EXE'
-
- Additionally, registered users will have the ability to create their own
- custom user library (see the file BUILDLIB.QBB on the QBBIOS.LIB disk for
- instructions) or they can include the appropriate functions into their
- program when it is linked. For example, if the program 'INPUT.BAS' uses
- the QBBIOS.LIB routines BSKGET and BSKNXT, an executable file can be
- created using the following commands at the DOS prompt:
-
- QB INPUT;
- LINK INPUT BSKGET BSKNXT;
-
- This assumes that all of the files on the QBBIOS.LIB disk have been placed
- into the directory containing the Quickbasic system files.
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 13-
-
-
-
-
-
-
-
-
-
-
-
-
- PRECAUTIONS!!!!!!
-
-
- These routines were designed to used with Quickbasic on an IBM PC or com-
- patible computer. Using this product with any Basic compiler or inter-
- preter other than Quickbasic version 2 or 3 will probably not work and may
- cause loss of data.
-
- Using this product on a non-IBM compatible computer will give hit or miss
- results. Some things will work, some things won't work. The only way to
- find out is to try.
-
- A SPECIAL NOTE ABOUT HARD DISKS - there are many manufacturers and vari-
- eties of hard disks available for the IBM PC and compatible computer.
- Many of these hard disks work through the traditional BIOS functions and
- many provide their own proprietary software to function properly. These
- disks with proprietary software may not respond properly to some of the
- BIOS interface routines. IN ANY EVENT, DO NOT TEST ANY HARD DISK OR
- FLOPPY DISK ROUTINES WITHOUT FIRST BACKING UP YOUR DISK - REPEAT - DO
- NOT TEST ANY HARD DISK OR FLOPPY DISK ROUTINES WITHOUT FIRST BACKING UP
- YOUR DISK.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 14-
-
-
-
-
-
-
-
-
-
-
-
-
- The BIOS Video Services
-
-
- Function Summary
-
-
- BSVMODE - Get or set video mode
-
- BSVSCUR - Set or get cursor size
-
- BSVSWID - Get screen width
-
- BSVSPOS - Get or set cursor position
-
- BSVSPAG - Get or set video display page
-
- BSVSCRUP - Scroll up or clear a window
-
- BSVSCRDN - Scroll down or clear a window
-
- BSVRCHR - Read a character and attribute from the screen
-
- BSVWCHR - Write a character to the screen
-
- BSVWTTY - Write in teletype mode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 15-
-
-
-
-
-
-
-
-
-
-
-
-
- BSVMODE - Get or set video mode
-
- Usage - Call BsVMode(Function%, Mode%)
-
-
- Function% 0 - set video mode
- 1 - get video mode
-
- Mode% (When Function% = 0, Mode% must be initialized to one
- of the following values. When Function% = 1, Mode% will
- return one of the following values.)
-
- Mode Type Adapter
-
- 0 40 X 25 B/W text CGA
- 1 40 X 25 16 color text CGA
- 2 80 X 25 B/W text CGA
- 3 80 X 25 16 color text CGA
- 4 320 X 200 4 color graphics CGA
- 5 320 X 200 4-Grey graphics CGA
- 6 640 X 200 B/W graphics CGA
- 7 80 X 25 B/W text MA(Monochrome)
- 8 160 X 200 16 color graphics PCjr
- 9 320 X 200 16 color graphics PCjr
- 10 640 X 200 4 color graphics PCjr
- 10 640 X 200 16 color graphics EGA
- 13 320 X 200 4 color graphics EGA
- 14 640 X 200 16 color graphics EGA
- 15 640 X 350 4 color graphics EGA
- 16 640 X 350 4 or 16 color graphics EGA
-
- Programming notes:
-
- For RGB monitors, there is no functional difference between modes 0 and 1,
- or between modes 2 and 3.
-
- The EGA will support all modes except 8 and 9.
-
- Normally, the screen buffer will be cleared when you set the video mode -
- even if you set it the same mode. This is not, however, a recommended
- method for clearing the screen as it could cause some delay in many PC-
- compatibles.
-
- Using a mode that is not supported by your video adapter card will have
- unpredictable results.
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 16-
-
-
-
-
-
-
-
-
-
-
-
-
- BSVSCUR - Set or get cursor size
-
- Usage - Call BsVSCur(Function%, Start%, End%)
-
- Function% 0 - set cursor size
- 1 - get cursor size
-
- Start% Starting scan line
-
- End% Ending scan line
-
- Programming notes:
-
- The scan line is a row of pixels that make up a character on the screen.
- On monochrome monitors, there are 13 scan lines numbered 0 thru 12. On
- RGB monitors, there are 8 scan lines numbered 0 thru 7. The default val-
- ues for cursor size are as follows:
-
- Mode Display Start End
-
- 0-3 RGB Monitor (text modes) 6 7
- 7 Monochrome 11 12
-
- The hardware causes the cursor to blink and it normally cannot be dis-
- abled while in text mode, however, some machines will cause the cursor to
- disappear when a starting scan line of 32 is used. A technique that
- always makes the cursor disappear is to move it off the screen using
- BSVSPOS (e.g. move it to column 1, row 26).
-
- Using a starting scan line that is greater than the ending scan line will
- make the cursor wrap and cause a two-part cursor to show on the screen.
-
- Function% must be initialized prior to calling BSVSCUR. If function% is 0
- then Start% and End% must be initialized to proper values prior to making
- the call.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 17-
-
-
-
-
-
-
-
-
-
-
-
-
- BSVSWID - Get screen width
-
- Usage - Call BsVSWid(Wid%)
-
- Wid% Number of characters that can be displayed on the screen -
- either 40 or 80.
-
-
-
- BSVSPOS - Get or set cursor position
-
- Usage - Call BsVSPos(Function%, Row%, Column%, Page%)
-
- Function% 0 - set cursor position
- 1 - get cursor position
-
- Row% Cursor coordinate
-
- Column% Cursor coordinate
-
- Page% Display page whose cursor position is to be set or
- retrieved.
-
-
- Programming notes:
-
- A separate cursor is maintained for each display page (See BSVSPAG for
- more on display pages). The cursor is affected only in the display page
- specified.
-
- Coordinates (1,1) represent the upper left hand corner of the screen.
-
- Coordinates (80,25) represent the lower right-hand corner of the screen.
-
- Positioning the cursor outside the limits of the current display will
- cause the cursor to disappear.
-
- In graphics modes, Row% and Column% should be interpreted as pixel coordi-
- nates.
-
- Function% and Page% must be initialized prior to calling BSVSPOS. If
- Function% is 0 then Row% and Column% must be initialized prior to making
- the call.
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 18-
-
-
-
-
-
-
-
-
-
-
-
-
- BSVSPAG - Get or set video display page
-
- Usage - Call(BsVSPag(Function%, Page%)
-
- Function% 0 - set current page
- 1 - get current page
-
- Programming Notes:
-
- Valid page ranges are as follows:
-
- Page range Mode Adapter
-
- 0 - 7 0 CGA
- 0 - 7 1 CGA
- 0 - 3 2 CGA
- 0 - 3 3 CGA
- 0 - 7 2 EGA
- 0 - 7 3 EGA
- 0 - 7 13 EGA
- 0 - 3 14 EGA
- 0 - 1 15 EGA
- 0 - 1 16 EGA
-
-
- Changing pages has no effect on their contents and text can be written to
- any page regardless of which page is active.
-
- Using multiple pages is not possible on a monochrome monitor with an MDA
- adapter.
-
- Function% must be initialized to 0 or 1 prior to calling BSVSPAG. If
- Function% is 0 then Page% must be initialized to a valid page number.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 19-
-
-
-
-
-
-
-
-
-
-
-
-
- BSVSCRUP - Scroll up or clear a window
-
- Usage - Call BsVScrup(Lines%, FgColor%, BgColor%, Ulc%, Ulr%, Lrc%, Lrr%)
-
- Lines% Number of lines to scroll up. If Lines% is zero, then the
- entire window is blanked.
-
- FgColor% Foreground color - 0 thru 31 are valid foreground colors.
-
- BgColor% Background color - 0 thru 7 are valid background colors.
-
- Ulc% Coordinate of the left column of the scroll window.
- 1 indicates the far left column.
-
- Ulr% Coordinate of the top row of the scroll window. 1 indi-
- cates the top row of the screen.
-
- Lrc% Coordinate of the right column of the scroll window. 80
- is the far right column.
-
- Lrr% Coordinate of the bottom row of the scroll window. 25 is
- the last row of the screen.
-
- Programming notes:
-
- This function affects only the currently active display page and any data
- scrolled off of the window is lost. Blank lines are inserted at the bot-
- tom of the window. If the number of lines to scroll equals zero, then the
- entire window is blanked out.
-
- All fields must be initialized prior to calling BSVSCRUP.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 20-
-
-
-
-
-
-
-
-
-
-
-
-
- BSVSCRDN - Scroll down or clear a window
-
- Usage - Call BsVScrdn(Lines%, FgColor%, BgColor%, Ulc%, Ulr%, Lrc%, Lrr%)
-
- Lines% Number of lines to scroll down. If Lines% is zero, then
- the entire window is blanked.
-
- FgColor% Foreground color - 0 thru 31 are valid foreground colors.
-
- BgColor% Background color - 0 thru 7 are valid background colors.
-
- Ulc% Coordinate of the left column of the scroll window.
- 1 indicates the far left column.
-
- Ulr% Coordinate of the top row of the scroll window. 1 indi-
- cates the top row of the screen.
-
- Lrc% Coordinate of the right column of the scroll window. 80
- is the far right column.
-
- Lrr% Coordinate of the bottom row of the scroll window. 25 is
- the last row of the screen.
-
- Programming notes:
-
- This function affects only the currently active display page and any data
- scrolled off of the window is lost. Blank lines are inserted at the top
- of the window. If the number of lines to scroll equals zero, then the
- entire window is blanked out.
-
- All fields must be initialized prior to calling BSVSCRDN.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 21-
-
-
-
-
-
-
-
-
-
-
-
-
- The BIOS Keyboard Services
-
-
-
- Function Summary
-
-
- BSKGET - Get a character from the keyboard
-
- BSKSTAT - Determine the status of the toggle keys
-
- BSKCLR - Clear the keyboard buffer
-
- BSKNXT - Preview the keyboard buffer
-
- BSKSTOG - Set keyboard toggles
-
- BSKTOGH - Determine whether toggle keys are pressed
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 22-
-
-
-
-
-
-
-
-
-
-
-
-
- BSKGET - Get a character from the keyboard
-
- Usage - Call BsKGet(Char$, Scancode%)
-
- Char$ The character entered at the keyboard.
-
- Scancode% The scan code of the character entered at the keyboard.
- A partial list of scancodes is provided in Appendix A.
-
-
- Programming notes:
-
- This function retrieves the next character in the keyboard buffer. If
- there is nothing in the buffer, it will wait until a character is ready
- and thereby suspend program execution. BSKNXT, discussed later, will
- allow you to peek into the keyboard buffer to determine if a key has been
- pressed without suspending the program.
-
- Char$ will either the standard ASCII code of the key pressed or CHR$(0) if
- a special key was pressed (i.e. the function keys, PgUp, Home, etc.). If
- Char$ is a CHR$(0), then Scancode% will indicate which key was pressed.
- See Appendix A for a list of scancodes.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 23-
-
-
-
-
-
-
-
-
-
-
-
-
- BSKSTAT - Determine the status of the toggle keys
-
- Usage -
- Call BsKStat(Insert%, Caps%, Num%, Scroll%, Alt%, Ctrl%, LShift%, RShift%)
-
-
- Programming notes:
-
- For Insert%, Caps%, Num%, and Scroll% - If the returned value is 1, then
- that mode has been toggled on (i.e. - Caps light is on). If the value
- returned is 0, then that mode has been toggled off.
-
- For Alt%, Ctrl%, LShift%, RShift% - If the returned value is 1, then that
- key is currently depressed. If the value is 0, then that key is not
- depressed.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 24-
-
-
-
-
-
-
-
-
-
-
-
-
- BSKCLR - Clear the keyboard buffer
-
- Usage - Call BsKClr
-
-
- Programming notes:
-
- BSKCLR is not passed any parameters, nor does it return any values. It
- simply clears any keystrokes that have not been read into your program but
- are waiting in the keyboard buffer.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 25-
-
-
-
-
-
-
-
-
-
-
-
-
- BSKNXT - Preview the keyboard buffer
-
- Usage - Call BsKNxt(Char$, Scancode%, Rc%)
-
- Char$ The character entered at the keyboard.
-
- Scancode% The scan code of the character entered at the keyboard.
- A partial list of scancodes is provided in Appendix A.
-
- Rc% Return code 0 indicates that no key has been pressed.
- Return code 1 indicates that a key has been pressed.
-
-
- Programming notes:
-
- This function will not remove a character from the keyboard buffer. If
- the return code indicates that a character is in the buffer, you must use
- BSKGET to get the character out of the buffer.
-
- See notes for BSKGET and Appendix A.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 26-
-
-
-
-
-
-
-
-
-
-
-
-
- BSKSTOG - Set keyboard toggles
-
- Usage - Call BsKSTog(Insert%, Caps%, Num%, Scroll%)
-
-
- Programming notes:
-
- Each parameter must be initialized to 0 or 1. If the parameter is ini-
- tialized to 1 then that toggle will be turned on. If the parameter is 0
- then that toggle will be turned off. For example:
-
- Call BsKSTog(0,1,1,0)
-
- will turn CapsLock and NumLock on, and it will turn ScrollLock and Insert
- mode off.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 27-
-
-
-
-
-
-
-
-
-
-
-
-
- BSKTOGH - Determine whether toggle keys are pressed
-
- Usage - Call BsKTogH(Insert%, Caps%, Num%, Scroll%)
-
-
- Programming notes:
-
- No parameters need to be initialized prior to making this call. If any of
- the returned values is 1, that indicates that the corresponding key is
- currently being held down. If any of the returned values is 0, that indi-
- cates that the corresponding key is not currently being held down.
-
- Note that this function does not tell us the status of the toggle keys,
- only whether or not someone is physically pressing them at that moment.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 28-
-
-
-
-
-
-
-
-
-
-
-
- The BIOS Diskette Services
-
-
-
- Function Summary
-
-
- BSDSTAT - Get diskette controller status
-
- BSDRESET - Reset floppy disk controller
-
- BSDVRFY - Verify sectors on a diskette
-
- BSDREAD - Read a sector from a diskette
-
- BSDWRIT - Write a sector to diskette
-
- BSDFMT - Format a track on a diskette
-
-
-
- *********************** IMPORTANT *************************
-
- Before using any of these functions, please read the documentation care-
- fully and when testing your programs, please use blank diskettes. These
- functions will also work with a hard disk, so if you have a hard disk
- installed, please take extra precautions.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 29-
-
-
-
-
-
-
-
-
-
-
-
-
- BSDSTAT - Get diskette controller status
-
- Usage Call BsDStat(Rc%)
-
- Rc% Reason - Diskette drives only
-
- 0 Successful
- 1 Invalid function
- 2 Address mark not found
- 3 Write protect error
- 4 Sector not found
- 6 Diskette change detected
- 8 DMA failure
- 9 DMA boundary overrun
- 16 bad CRC: parity check
- 32 controller malfunction
- 64 seek failure - move to requested track failed
- 128 time out - drive did not respond (the door is open)
-
- Rc% Reason - Hard disk drives only
-
- 0 Successful
- 1 Invalid function
- 2 Address mark not found
- 4 Sector not found
- 5 Reset failed
- 7 Drive parameter activity failed
- 9 DMA boundary overrun
- 10 Bad block flag detected
- 16 Uncorrectable ECC data error
- 17 ECC corrected data error
- 32 controller malfunction
- 64 seek failure - move to requested track failed
- 128 time out - drive did not respond
- 170 Drive not ready
- 187 Undefined error occured
- 204 Write fault active
- 255 Sense operation failed
-
-
- Programming notes:
-
- This function always returns the status of the last disk operation.
-
- The messages normally seen when accessing a diskette with DOS, such as:
- Not ready error reading drive a
- Abort, Retry, Ignore
- will not be seen when using this function (and any other BIOS diskette
- function), therefore, you must always determine whether a disk operation
- has failed or succeeded when using the BIOS disk services.
-
-
- Copyright (c) 1987, AJM Software
- -Page 30-
-
-
-
-
-
-
-
-
-
-
-
-
- BSDRESET - Reset floppy disk controller
-
- Usage - Call BsDReset
-
-
- Programming notes:
-
- This function resets the disk controller and prepares it for I/O. It will
- force the BIOS diskette support routines to recalibrate the disk drive's
- read/write head. It should be used only after an error is detected during
- a disk drive operation.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 31-
-
-
-
-
-
-
-
-
-
-
-
-
- BSDVRFY - Verify sectors on a disk
-
- Usage - Call BsDVrfy(Buffer$, Drive$, Head%, Track%, Sector%, Rc%)
-
- Buffer$ Not used for this function.
-
- Drive$ Letter designation for to drive containing the diskette
- to be verified.
-
- Head% Cylinder head
-
- Track% Track containing sector to be verified.
-
- Sector% Relative ID of the sector to be verified.
-
- Rc% Return code - see function BSDSTAT
-
-
- Programming notes:
-
- For 1.2 Meg drives, the diskette drive parameter table must reflect the
- type of media installed for correct operation. It is the responsibility
- of the programmer to ensure that the diskette drive parameter table is
- correct. Unpredictable results can occur otherwise (See BSDASTYP).
-
-
- This service will verify only a single sector with each call. If needed,
- the Assembler source can easily be modified to verify more than one
- sector (up to an entire track).
-
- The verify service reads the specified sector and insures that it passes
- the CRC check.
-
- See Appendix C - Miscellaneous diskette information.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 32-
-
-
-
-
-
-
-
-
-
-
-
-
- BSDREAD - Read a sector from a disk
-
- Usage - Call BsDRead(Buffer$, Drive$, Head%, Track%, Sector%, Rc%)
-
- Buffer$ The string where the data read from disk will be placed
- into.
-
- Drive$ Letter designation for to drive containing the disk
- to be read.
-
- Head% Cylinder head containing the track to be read.
-
- Track% Track containing sector to be read.
-
- Sector% Relative ID of the sector to be read.
-
- Rc% Return code - see function BSDSTAT
-
-
- Programming notes:
-
- It is the responsibility of the programmer to ensure that Buffer$ is long
- enough to hold the sector read from disk (usually 512 bytes). If it is
- not long enough, the results are unpredictable. Generally you will see a
- 'String Space Corrupt' message returned from BASIC.
-
- This service will read only a single sector with each call. If necessary,
- the Assembler source can easily be modified to read more than one sector
- (up to an entire track).
-
- See Appendix C - Miscellaneous diskette information.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 33-
-
-
-
-
-
-
-
-
-
-
-
-
- BSDWRIT - Write a sector to disk
-
- Usage - Call BsDWrit(Buffer$, Drive$, Head%, Track%, Sector%, Rc%)
-
- Buffer$ The string containing the data to be written to disk.
-
- Drive$ Letter designation for to drive containing the disk
- to be written
-
- Head% Cylinder head containing the track to be written.
-
- Track% Track containing sector to be written.
-
- Sector% Relative ID of the sector to be written.
-
- Rc% Return code - see function BSDSTAT
-
-
- Programming notes:
-
- When testing, first backup your diskette. It is very easy to inadver-
- tently erase usable data or render a diskette unusable with this service.
-
- This service will always write a complete sector. If Buffer$ is shorter
- than the length of a sector (usually 512 bytes), the contents of the sec-
- tor written will be unpredictable.
-
- This service will write only a single sector with each call. If needed,
- the Assembler source can easily be modified to write more than one sector
- (up to an entire track).
-
- See Appendix C - Miscellaneous diskette information.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 34-
-
-
-
-
-
-
-
-
-
-
-
-
- BSDFMT - Format a track on a disk
-
- Usage - Call BsDFmt(Buffer$, Drive$, Head%, Track%, Sector%, Rc%)
-
- Buffer$ The string containing the track format table (See Appen-
- dix C).
-
- Drive$ Letter designation for to drive containing the diskette
- to be formatted.
-
- Head% Cylinder head containing the track to be formatted.
-
- Track% Track containing sector to be formatted.
-
- Sector% Number of sectors to be formatted.
-
- Rc% Return code - see function BSDSTAT
-
-
- Programming notes:
-
-
- For 1.2 Meg drives, the diskette drive parameter table must reflect the
- type of media installed for correct operation. It is the responsibility
- of the programmer to ensure that the diskette drive parameter table is
- correct. Unpredictable results can occur otherwise (See BSDASTYP).
-
- When testing, first backup your diskette. It is very easy to inadver-
- tently erase usable data or render a diskette unusable with this service.
-
- This service will always format a complete track. If Sector% is less than
- the maximum number of sectors that can fit on that track, then the unfor-
- matted sectors will no longer be available.
-
- If you format track 0 on a diskette with this service, the diskette will
- not be usable until a boot record is written to sector 0. If needed, the
- Assembler source code can be modified to write a boot record to the dis-
- kette.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 35-
-
-
-
-
-
-
-
-
-
-
-
-
-
- The BIOS Miscellaneous Services
-
-
-
- Function Summary
-
-
- BSEQPMT - Get installed equipment
-
- BSPINIT - Initialize printer
-
- BSPSTAT - Get printer status
-
- BSPRINT - Print a string of characters
-
- BSPRTSC - Print screen
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 36-
-
-
-
-
-
-
-
-
-
-
-
-
- BSEQPMT - Get installed equipment
-
- Usage -
- Call BsEqpmt(RomDate$, RAM%, ExtRAM%, ExpRAM%, Printers%, RS232%,
- Floppies%, Gameport%, Disks%)
-
- RomDate$ ROM-BIOS revision date
-
- RAM% Amount, in Kilobytes, of installed RAM.
-
- ExtRAM% Amount, in Kilobytes, of extended memory.
-
- ExpRAM% Amount, in 16K pages, of LIMM expanded memory.
-
- Printers% Number of printer ports installed.
-
- Rs232% Number of serial ports installed.
-
- Floppies% Number of floppy disk drives installed.
-
- Gameport% Number of gameports installed.
-
- Disks% Number of hard disks installed.
-
-
- Programming notes:
-
- Some of these fields may not be reliable in certain hardware configura-
- tions. Items to be wary about are RomDate$, ExtRAM%, and in particular,
- the number of hard disks.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 37-
-
-
-
-
-
-
-
-
-
-
-
-
- BSPINIT - Initialize printer
-
- Usage - Call BsPInit(Printer%, Rc%)
-
- Printer% The printer port number - 0 is LPT1, 1 is LPT2, etc.
-
- Rc% Return code - see BSPSTAT
-
-
- Programming notes:
-
- This service will initialize the printer. That is to say, it will:
-
- - Reset top-of-form
- - Return the printer to its default setup
- - poll the printer for printer status
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 38-
-
-
-
-
-
-
-
-
-
-
-
-
- BSPSTAT - Get printer status
-
- Usage - Call BsPStat(Printer%, Rc%)
-
- Printer% The printer port number - 0 is LPT1, 1 is LPT2, etc.
-
- Rc% Return code
-
-
- Programming notes:
-
- The return code is actually a series of bit settings that indicates the
- following conditions:
-
- - Printer ready
- - Acknowledge
- - Out of paper
- - I/O error (on some printers, this indicates an off-line condition)
- - Timeout
- - Selected
-
- When checking printer status, the 'selected' indicator tells you that the
- printer is on-line and ready to go. Some printers will return a "Printer
- ready' status even when turned off (this, incidentally, is why Quickbasic
- will occasionally print to a printer that is turned off and never return
- an error condition). Before issuing an LPRINT (or equivalent) command in
- Quickbasic, make sure that the printer is selected.
-
-
-
-
- ***************************** IMPORTANT *********************************
-
-
- See the next page for a Quickbasic program segment that properly inter-
- prets Rc%.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 39-
-
-
-
-
-
-
-
-
-
-
-
- The following code segment will extract the appropriate values. It is
- included in the sample program archive(Registered owners only).
-
-
- Printer% = 0 'Use LPT1
- Call BsPStat(Printer%, Rc%) 'Get status of printer
-
- Printer.Ready% = (Rc% and 128) = 128 '1st bit indicates printer ready
- Acknowledge% = (Rc% and 64) = 64 '2nd bit indicates Ack
- Out.of.Paper% = (Rc% and 32) = 32 '3rd bit indicates out of paper
- IO.Error% = (Rc% and 8) = 8 '5th bit indicates I/O Error
- Timeout% = (Rc% and 1) = 1 '8th bit indicates Timeout
- Selected% = (Rc% and 16) = 16 '4th bit indicates Selected
-
- Locate 1,1: Color 15,1: Cls
-
- If Printer.Ready% then
- Print "Printer at LPT1 reports Ready"
- End if
-
- If Acknowledge% then
- Print "Printer at LPT1 reports Acknowledge"
- End if
-
- If Out.of.Paper% then
- Print "Printer at LPT1 reports Out of Paper of Paper jam"
- End if
-
- If IO.Error% then
- Print "Printer at LPT1 reports I/O error or Printer off-line"
- End if
-
- If Timeout% then
- Print "Printer at LPT1 has timed out"
- End if
-
- If Selected% then
- Print "Printer at LPT1 is selected"
- End if
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 40-
-
-
-
-
-
-
-
-
-
-
-
-
- BSPRINT - Print a string of characters
-
- Usage - Call BsPrint(Text$, Printer%, Rc%)
-
- Text$ String to print
-
- Printer% Printer port
-
- Rc% Return code
-
-
- Programming notes:
-
- See BSPSTAT for an explanation of return codes.
-
- This service sends whatever is in Text$ to the appropriate printer port.
- All special printer codes such as NewLine, TopofForm, etc, will be inter-
- preted correctly by the printer.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 41-
-
-
-
-
-
-
-
-
-
-
-
- BSPRTSC - Print screen
-
- Usage - Call BsPrtSc
-
-
- Programming notes:
-
- This service is the equivalent of pressing the 'PrtSc' key on the key-
- board.
-
- The screen will be printed to LPT1.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 42-
-
-
-
-
-
-
-
-
-
-
-
-
- The BIOS AT Disk Services
-
-
-
- Function Summary
-
-
- BSDAPARM - Get current drive parameters
-
- BSDATST - Test for drive ready
-
- BSDARST - Alternate disk reset
-
- BSDARCL - Recalibrate drive
-
- BSDADIAG - Perform controller diagnostics
-
- BSDASTAT - Detect diskette change
-
- BSDATYPE - Get disk type
-
- BSDASTYP - Set diskette type
-
- BSDASEEK - Position heads over a specified cylinder
-
-
-
- *********************** IMPORTANT *************************
-
- These functions are documented only for AT type machines. These machines
- generally use a 1.2 Meg diskette drive whose characteristics are different
- enough from the 360KB drive to warrant these new BIOS services. These
- services also provide additional support for hard disks.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 43-
-
-
-
-
-
-
-
-
-
-
-
-
- BSDAPARM - Get current drive parameters
-
- Usage - Call BsDAParm(Drive$, Heads%, Cylinders%, Sectors%)
-
- Drive$ Letter designation of the target drive
-
- Heads% Maximum number of heads on the disk
-
- Cylinders% Maximum number of Cylinders/Head
-
- Sectors% Maximum number of Sectors/Cylinder
-
-
- Programming notes:
-
- This service will not function on a diskette drive. It is intended for
- use with a hard disk only.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 44-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BSDATST - Test for drive ready
-
- Usage - Call DsDATst(Drive$, Rc%)
-
- Drive$ Letter designation of the target drive
-
- Rc% Return code
-
-
- Programming notes:
-
- This service will not function on a diskette drive. It is intended for
- use with a hard disk only.
-
- This service tests the status of the DRIVE READY signal on the selected
- drive.
-
- See BSDSTAT documentation for an explanation of return codes.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 45-
-
-
-
-
-
-
-
-
-
-
-
-
- BSDARST - Alternate disk reset
-
- Usage - Call BsDARst(Drive$, Rc%)
-
- Drive$ Letter designation of the target drive
-
- Rc% Return code
-
-
- Programming notes:
-
- This service is the same as BSDRESET documented earlier except that
- BSDARST can be used only with hard disk controllers.
-
- See BSDSTAT documentation for an explanation of return codes.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 46-
-
-
-
-
-
-
-
-
-
-
-
-
- BSDARCL - Recalibrate drive
-
- Usage - Call BsDARcl(Drive$, Rc%)
-
- Drive$ Letter designation of the target drive
-
- Rc% Return code
-
-
- Programming notes:
-
- This service will not function on a diskette drive. It is intended for
- use with a hard disk only.
-
- This service instructs the specified drive to recalibrate. This is done
- by seeking track 0.
-
- This service should be used only after an error has been detected and
- before any retries are made.
-
- See BSDSTAT documentation for an explanation of return codes.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 47-
-
-
-
-
-
-
-
-
-
-
-
-
- BSDADIAG - Perform controller diagnostics
-
- Usage BsDADiag(Rc%)
-
- Rc% Return code
-
-
- Programming notes:
-
- This service will not function on a diskette drive. It is intended for
- use with a hard disk only.
-
- This service instructs the hard disk controller to perform its internal
- diagnostic routines.
-
- See BSDSTAT documentation for an explanation of return codes.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 48-
-
-
-
-
-
-
-
-
-
-
-
-
- BSDASTAT - Detect diskette change
-
- Usage - Call BsDAStat(Drive$, Rc%)
-
- Drive$ Letter designation of the target drive
-
- Rc% Return code
-
-
- Programming notes:
-
- This service will detect whether or not the disk drive door has been
- opened since the last disk operation. It is meaningless for hard drives.
-
- This service should be used only with those drives that can detect disk
- changes (See BSDATYPE).
-
- See BSDSTAT documentation for an explanation of return codes.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 49-
-
-
-
-
-
-
-
-
-
-
-
-
- BSDATYPE - Get disk type
-
- Usage - Call BsDAType(Drive$, Rc%)
-
- Drive$ Letter designation of the target drive
-
- Rc% 0 - drive is not present
- 1 - diskette without change detection
- 2 - diskette with change detection%
- 3 - fixed disk
-
-
- Programming notes:
-
- This service will work with both hard and floppy disk drives.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 50-
-
-
-
-
-
-
-
-
-
-
-
-
- BSDASTYP - Set diskette type
-
- Usage - Call BsDASTyp(Drive$, Type%, Rc%)
-
- Drive$ Letter designation of the target drive
-
- Type% 1 - Double-density drive
- 2 - 360KB diskette in a 1.2MB drive
- 3 - 1.2MB diskette in a 1.2MB drive
-
- Rc% Return code
-
-
- Programming notes:
-
- This service is meaningless for fixed disks.
-
- This service should be used prior to all Format and Verify requests to any
- 1.2MB diskette drives.
-
- See BSDSTAT for an explanation of return codes.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 51-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BSDASEEK - Position heads over a specified cylinder
-
- Usage - Call BsDASeek(Drive$, Head%, Cylinder%, Rc%)
-
- Drive$ Letter designation of the target drive
-
- Head% Head to be positioned
-
- Cylinder% Cylinder over which the head will be positioned.
-
- Rc% Return code
-
-
- Programming notes:
-
- This service will not function on a diskette drive. It is intended for
- use with a hard disk only.
-
- This service can be used to park your fixed disk
-
- See BSDSTAT for an explanation of return codes.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 52-
-
-
-
-
-
-
-
-
-
-
-
-
- Appendix A
-
- Keyboard Scan Codes
-
-
- Decimal Character
-
- 3 NUL
- 15 Shft-tab
- 16-25 Alt+(Q,W,E,R,T,Y,U,I,O,P)
- 30-38 Alt+(A,S,D,F,G,H,J,K,L)
- 44-50 Alt+(Z,X,C,V,B,N,M)
- 59,68 F1-F10
- 71 Home
- 72 Up cursor
- 73 PgUp
- 75 Left cursor
- 77 Right cursor
- 79 End
- 80 Down cursor
- 81 PgDn
- 82 Ins
- 83 Del
- 84-93 Shft-(F1-F10)
- 94-103 Ctrl-(F1-F10)
- 104-113 Alt+(F1-F10)
- 114 PrtSc
- 115 Left cursor
- 116 Right cursor
- 117 End
- 118 PgDn
- 119 Home
- 120-131 Alt+(1,2,3,4,5,6,7,8,9,0,-,=)
- 132 PgUp
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 53-
-
-
-
-
-
-
-
-
-
-
-
-
- Appendix B
-
- BASIC Colors
-
-
- Color code Color
-
- 0 Black
- 1 Blue
- 2 Green
- 3 Cyan
- 4 Red
- 5 Magenta
- 6 Brown
- 7 White
- 8 Gray
- 9 Light Blue
- 10 Light Green
- 11 Light Cyan
- 12 Light Red
- 13 Light Magenta
- 14 Yellow
- 15 High-Intensity White
-
-
- Notes:
-
- The only valid background colors are 0-7.
-
- Add 16 (sixteen) to the color to cause blinking.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 54-
-
-
-
-
-
-
-
-
-
-
-
-
- Appendix C
-
- About Disks and Diskettes
-
-
- This Appendix is available only to registered users until December 1,
- 1987. It consists of a discussion about topics:
-
- - disk and diskette formats
-
- - the FAT
-
- - Formatting a diskette
-
- - Copy protection
-
- - the 1.2MB drive and how to use it
-
- - Diskette drive interrupts
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (c) 1987, AJM Software
- -Page 55-
-
-
-
-