Files
TeslaRel410/BORLAND/DTEXT23/USRBOOKS/BOOKS/DOSREF/EBT/DOSREF.DAT
T
CydandClaude Fable 5 63312e07f9 source410: literal 4.10 source reconstruction + BC++ 4.52 fleet toolchain archived
- BORLAND/: Borland C++ 4.52 (chosen over 4.5 by byte-match: CODE/RP/CW32.LIB
  is identical to 4.52's install lib). BCC32/TLINK32/TLIB/MAKE run natively on
  Win11; CODE/BT/OPT.MAK is the shipped BTL4OPT.EXE's exact flag recipe
  (extender = Borland PowerPack DPMI32, not Phar Lap TNT).
- restoration/source410/: the literal 1995-form reconstruction of the missing
  BT game source (never mixed into CODE/). Round 1-3 state:
  * 6 of 10 surviving original TUs COMPILE CLEAN under the period toolchain
    (BTMSSN, BTCNSL, BTSCNRL, BTTEAM, BTL4MODE, BTL4ARND) - first builds
    since 1996.
  * BT_L4/BTL4APP.CPP pilot reconstruction: 12/12 functions, Fail() lands on
    its binary-recorded line 400 exactly.
  * BT/BTCNSL.HPP: console wire IDs recovered from the binary's ctors
    (Killed=9, Damaged=10, ScoreUpdate=13, DeathWithoutHonor=15 [T1];
    TeamScore=12 flagged [T4]).
  * MUNGA/: 8 engine-header backfills back-dated from the BT412 WinTesla tree
    (VDATA numbering decomp-verified; AUDREND's OpenAL-era virtual removed -
    the period compiler is the drift detector).
  * Tooling: backdate.py (WinTesla->1995 header transform), compile410.sh
    (per-TU verification sweep under authentic OPT.MAK flags).
  * README: corrected roadmap - MECH.HPP is the capstone grown with the mech
    TU reconstructions; BTREG.CPP green = the header-family milestone.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 07:33:26 -05:00

177 lines
428 KiB
Plaintext

#EDIR DATA#
DOCTYPE='book' PUBLICID='-//HaL and OReilly//DTD DocBook//EN' SYSTEMID=''ROLE=''REMAP='zTitleBook'ID='X-79120'Borland C++ DOS ReferenceVERSION 4.5CLASS="TRADE"Boland International, Inc.100 Borland Way660001Scotts ValleyCA95067-000119871994Borland International.REMAP='zPrintHistory'Printed in the U.S.A.REMAP='zLegalNotice'Borland may have patents and/or pending patent applications covering subject matter in this document. The furnishing of this document does not give you any license to these patents.REMAP='zLegalNotice'All rights reserved. All Borland products are trademarks or registered trademarks of Borland International, Inc. Other brand and product names are trademarks or registered trademarks of their respective holders.REMAP='BodyNoLead'REMAP='IntroTitle'REMAP='Body'This manual provides information you might need to develop 16-bit applications that are targeted to run DOS. The following manuals in this documentation set also discuss DOS-related issues:MARK='bullet'REMAP='Bullet1'The TARGETDOCENT='xref.intro.mif.bcug' LOCALINFO='X-41776' nd.ent='xref.intro.mif.bcug' nd.pub='' nd.sys='bc_ug' nn.not='EBT-BOOK' nn.pub='EBT' nn.sys=''Borland C++ User's Guide provides a description of all the programming options that can be used to develop applications on any platform supported by Borland C++ 4.5.REMAP='Bullet1'The TARGETDOCENT='xref.intro.mif.bcpg' LOCALINFO='X-77180' nd.ent='xref.intro.mif.bcpg' nd.pub='' nd.sys='bc_pg' nn.not='EBT-BOOK' nn.pub='EBT' nn.sys=''Borland C++ Programmer's Guide describes the implementation and extensions to the C and C++ programming languages. Much of the information in the TARGETDOCENT='xref.intro.mif.bcpg' LOCALINFO='X-77180' nd.ent='xref.intro.mif.bcpg' nd.pub='' nd.sys='bc_pg' nn.not='EBT-BOOK' nn.pub='EBT' nn.sys=''Borland C++ Programmer's Guide (for example, information regarding exception-handling, RTTI, and other recent additions to the C++ language) is applicable to 16-bit DOS programming.REMAP='Bullet1'The TARGETDOCENT='xref.intro.mif.bclr' LOCALINFO='X-77180' nd.ent='xref.intro.mif.bclr' nd.pub='' nd.sys='bc_lr' nn.not='EBT-BOOK' nn.pub='EBT' nn.sys=''Borland C++ Library Reference provides a reference to functions and macros, many of which are marked as being available to DOS programs.REMAP='Bullet1'The TARGETDOCENT='xref.intro.mif.bccl' LOCALINFO='X-60437' nd.ent='xref.intro.mif.bccl' nd.pub='' nd.sys='bc_cl' nn.not='EBT-BOOK' nn.pub='EBT' nn.sys=''Borland C++ Class Libraries Guide provides a discussion and reference to classes and macros that are available only for C++ programs.REMAP='Body'Typefaces and icons used in these books are described in the TARGETDOCENT='xref.intro.mif.bcug' LOCALINFO='X-41776' nd.ent='xref.intro.mif.bcug' nd.pub='' nd.sys='bc_ug' nn.not='EBT-BOOK' nn.pub='EBT' nn.sys=''Borland C++ User's Guide.REMAP='.Head1' RENDERAS="SECT1"What's in this bookREMAP='Body'LINKEND='X-14780' TYPE='XREF-TEXTCOPY'Chapter 1, "DOS memory management" describes memory models, overlays, and mixed-model programming. Remember that in DOS-only applications you can use any of the six memory models (the tiny and huge memory models aren't supported in Windows applications). Overlays are supported only in DOS applications.REMAP='Body'LINKEND='X-10249' TYPE='XREF-TEXTCOPY'Chapter 2, "Math" covers floating-point issues and how to use the ROLE='italic'bcd and ROLE='italic'complex math classes. Much of the information regarding math options is specific to DOS applications. The discussion of ROLE='italic'bcd and ROLE='italic'complex isn't specific to DOS and is available to applications on Windows and OS/2 platforms.REMAP='Body'LINKEND='X-41225' TYPE='XREF-TEXTCOPY'Chapter 3, "Video functions" discusses graphics in Borland C++. The topics discussed in this chapter are available only for 16-bit DOS applications.REMAP='Body'LINKEND='X-14995' TYPE='XREF-TEXTCOPY'Chapter 4, "Borland graphics interface" is a reference to the functions declared in the graphics.h header file. The functions discussed in this chapter are available only for 16-bit DOS applications. Sample programs for these functions are available in the online Help.REMAP='Body'LINKEND='X-12043' TYPE='XREF-TEXTCOPY'Chapter 5, "DOS-only functions" is a reference to those functions that are available only in a 16-bit DOS-targeted application. There are many additional functions and C++ classes that can be used in DOS applications (and are also available to other platforms). Those additional functions are documented in the TARGETDOCENT='xref.intro.mif.bclr' LOCALINFO='X-77180' nd.ent='xref.intro.mif.bclr' nd.pub='' nd.sys='bc_lr' nn.not='EBT-BOOK' nn.pub='EBT' nn.sys=''Borland C++ Library Reference. The online Help provides many sample programs for the functions that are referenced here and in the TARGETDOCENT='xref.intro.mif.bclr' LOCALINFO='X-77180' nd.ent='xref.intro.mif.bclr' nd.pub='' nd.sys='bc_lr' nn.not='EBT-BOOK' nn.pub='EBT' nn.sys=''Borland C++ Library Reference.REMAP='Body'LINKEND='X-28359' TYPE='XREF-TEXTCOPY'Appendix A, "DOS libraries" provides an overview of the libraries and global variables that are available only for 16-bit DOS applications.REMAP='Body'LINKEND='X-34528' TYPE='XREF-TEXTCOPY'Appendix B, "DOS global variables" describes the global variables that are available only for 16-bit DOS applications.REMAP='NumChapter'ID='X-14780'DOS memory managementREMAP='Body'This chapter discussesMARK='bullet'REMAP='Bullet1'What to do when you receive "Out of memory" errors.REMAP='Bullet1'What memory models are: how to choose one, and why you would (or wouldn't) want to use a particular memory model.REMAP='Bullet1'How overlays work, and how to use them.REMAP='Bullet1'How to overlay modules with exception-handling constructs.REMAP='.Head1' RENDERAS="SECT1"Running out of memoryREMAP='Body'Borland C++ does not generate any intermediate data structures to disk when it is compiling (Borland C++ writes only .OBJ files to disk); instead it uses RAM for intermediate data structures between passes. Because of this, you might encounter the message "Out of memory" if there isn't enough memory available for the compiler.REMAP='Body'The solution to this problem is to make your functions smaller, or to split up the file that has large functions.REMAP='.Head1' RENDERAS="SECT1"Memory modelsREMAP='Body'Borland C++ gives you six memory models, each suited for different program and code sizes. Each memory model uses memory differently. What do you need to know to use memory models? To answer that question, you need to take a look at the computer system you're working on. Its central processing unit (CPU) is a microprocessor belonging to the Intel iAPx86 family; an 80286, 80386, 80486, or Pentium. For now, we'll just refer to it as an 8086.REMAP='.ScanBold'ROLE='bold'NoteREMAP='Body'See LINKEND='X-21224' TYPE='XREF-TEXTCOPY'"The six memory models" for a summary of each memory model.REMAP='.Head2' RENDERAS="SECT2"The 8086 registersREMAP='Body'The following figure shows some of the registers found in the 8086 processor. There are other registersname='mdash' font=symbol charset=fontspecific code=190
descr='[mdash]'because they can't be accessed directly, they aren't shown here.REMAP='FigCap' FLOAT="0"8086 registersFILEREF='mem_1.gif'REMAP='.Head3' RENDERAS="SECT3"General-purpose registersREMAP='BodyNoLead'The general-purpose registers are the registers used most often to hold and manipulate data. Each has some special functions that only it can do. For example,MARK='bullet'REMAP='Bullet1'Some math operations can only be done using AX.REMAP='BulletNoLead1'BX can be used as an index register.REMAP='BulletNoLead1'CX is used by LOOP and some string instructions.REMAP='BulletNoLead1'DX is implicitly used for some math operations.REMAP='Body'But there are many operations that all these registers can do; in many cases, you can freely exchange one for another.REMAP='.Head3' RENDERAS="SECT3"Segment registersREMAP='BodyNoLead'The segment registers hold the starting address of each of the four segments. As described in the next section, the 16-bit value in a segment register is shifted left 4 bits (multiplied by 16) to get the true 20-bit address of that segment.REMAP='.Head3' RENDERAS="SECT3"Special-purpose registersREMAP='BodyNoLead'The 8086 also has some special-purpose registers:MARK='bullet'REMAP='Bullet1'The SI and DI registers can do many of the things the general-purpose registers can, plus they are used as index registers. They're also used by Borland C++ for register variables.REMAP='Bullet1'The SP register points to the current top-of-stack and is an offset into the stack segment.REMAP='Bullet1'The BP register is a secondary stack pointer, usually used to index into the stack in order to retrieve arguments or automatic variables.REMAP='Body'Borland C++ functions use the base pointer (BP) register as a base address for arguments and automatic variables. Parameters have positive offsets from BP, which vary depending on the memory model. BP points to the saved previous BP value if there is a stack frame. Functions that have no arguments will not use or save BP if the Standard Stack Frame option is ROLE='italic'Off.REMAP='Body'Automatic variables are given negative offsets from BP. The offsets depend on how much space has already been assigned to local variables.REMAP='.Head3' RENDERAS="SECT3"The flags registerREMAP='BodyNoLead'The 16-bit flags register contains all pertinent information about the state of the 8086 and the results of recent instructions.REMAP='Body'For example, if you wanted to know whether a subtraction produced a zero result, you would check the ROLE='italic'zero flag (the Z bit in the flags register) immediately after the instruction; if it were set, you would know the result was zero. Other flags, such as the ROLE='italic'carry and ROLE='italic'overflow flags, similarly report the results of arithmetic and logical operations.REMAP='FigCap' FLOAT="0"Flags register of the 8086FILEREF='mem_2.gif'REMAP='Body'Other flags control the 8086 operation modes. The ROLE='italic'direction flag controls the direction in which the string instructions move, and the ROLE='italic'interrupt flag controls whether external hardware, such as a keyboard or modem, is allowed to halt the current code temporarily so that urgent needs can be serviced. The ROLE='italic'trap flag is used only by software that debugs other software.REMAP='Body'The flags register isn't usually modified or read directly. Instead, the flags register is generally controlled through special assembler instructions (such as ROLE='bold'CLD,ROLE='bold' STI, and ROLE='bold'CMC) and through arithmetic and logical instructions that modify certain flags. Likewise, the contents of certain bits of the flags register affect the operation of instructions such as ROLE='bold'JZ, RCR, and ROLE='bold'MOVSB. The flags register is not really used as a storage location, but rather holds the status and control data for the 8086.REMAP='.Head2' RENDERAS="SECT2"Memory segmentationREMAP='Body'The Intel 8086 microprocessor has a ROLE='italic'segmented memory architecture. It has a total address space of 1 MB, but is designed to directly address only 64K of memory at a time. A 64K chunk of memory is known as a segment; hence the phrase "segmented memory architecture."MARK='bullet'REMAP='Bullet1'The 8086 keeps track of four different segments: ROLE='italic'code, data, stack, and ROLE='italic'extra. The code segment is where the machine instructions are; the data segment is where information is; the stack is, of course, the stack; and the extra segment is also used for extra data.REMAP='Bullet1'The 8086 has four 16-bit segment registers (one for each segment) named CS, DS, SS, and ES; these point to the code, data, stack, and extra segments, respectively.REMAP='Bullet1'A segment can be located anywhere in memory. In DOS real mode it can be located almost anywhere. For reasons that will become clear as you read on, a segment must start on an address that's evenly divisible by 16 (in decimal).REMAP='.Head3' RENDERAS="SECT3"Address calculationREMAP='.ScanBold'ROLE='bold'NoteREMAP='BodyNoLead'This whole section is applicable only to real mode under DOS. You can safely ignore it for Windows development.REMAP='Body'A complete address on the 8086 is composed of two 16-bit values: the segment address and the offset. Suppose the data segment addressname='mdash' font=symbol charset=fontspecific code=190
descr='[mdash]'the value in the DS registername='mdash' font=symbol charset=fontspecific code=190
descr='[mdash]'is 2F84 (base 16), and you want to calculate the actual address of some data that has an offset of 0532 (base 16) from the start of the data segment: how is that done?REMAP='Body'Address calculation is done as follows: Shift the value of the segment register 4 bits to the left (equivalent to one hex digit), then add in the offset.REMAP='Body'The resulting 20-bit value is the actual address of the data, as illustrated here:FORMAT="LINESPECIFIC"DS register (shifted): 0010 1111 1000 0100 0000 = 2F840
Offset: 0000 0101 0011 0010 = 00532REMAP='Body' __________________ ____________________________FORMAT="LINESPECIFIC"Address: 0010 1111 1101 0111 0010 = 2FD72REMAP='.ScanBold'ROLE='bold'NoteREMAP='Body'A chunk of 16 bytes is known as a ROLE='italic'paragraph, so you could say that a segment always starts on a paragraph boundary.REMAP='Body'The starting address of a segment is always a 20-bit number, but a segment register only holds 16 bitsname='mdash' font=symbol charset=fontspecific code=190
descr='[mdash]'so the bottom 4 bits are always assumed to be all zeros. This means segments can only start every 16 bytes through memory, at an address where the last 4 bits (or last hex digit) are zero. So, if the DS register is holding a value of 2F84, then the data segment actually starts at address 2F840.REMAP='Body'The standard notation for an address takes the form ROLE='italic'segment:offset; for example, the previous address would be written as 2F84:0532. Note that since offsets can overlap, a given segment:offset pair is not unique; the following addresses all refer to the same memory location:FORMAT="LINESPECIFIC"0000:0123
0002:0103
0008:00A3
0010:0023
0012:0003REMAP='Body'Segments can overlap (but don't have to). For example, all four segments could start at the same address, which means that your entire program would take up no more than 64Kname='mdash' font=symbol charset=fontspecific code=190
descr='[mdash]'but that's all the space you'd have for your code, your data, and your stack.REMAP='.Head2' RENDERAS="SECT2"PointersREMAP='Body'Although you can declare a pointer or function to be a specific type regardless of the model used, by default the type of memory model you choose determines the default type of pointers used for code and data. There are four types of pointers: ROLE='italic'near (16 bits), ROLE='italic'far (32 bits), ROLE='italic'huge (also 32 bits), and ROLE='italic'segment (16 bits).REMAP='.Head3' RENDERAS="SECT3"Near pointersREMAP='BodyNoLead'A near pointer (16-bits) relies on one of the segment registers to finish calculating its address; for example, a pointer to a function would add its 16-bit value to the left-shifted contents of the code segment (CS) register. In a similar fashion, a near data pointer contains an offset to the data segment (DS) register. Near pointers are easy to manipulate, since any arithmetic (such as addition) can be done without worrying about the segment.REMAP='.Head3' RENDERAS="SECT3"Far pointersREMAP='BodyNoLead'A far pointer (32-bits) contains not only the offset within the segment, but also the segment address (as another 16-bit value), which is then left-shifted and added to the offset. By using far pointers, you can have multiple code segments; this, in turn, allows you to have programs larger than 64K. You can also address more than 64K of data.REMAP='Body'When you use far pointers for data, you need to be aware of some potential problems in pointer manipulation. As explained in the section on address calculation, you can have many different segment:offset pairs refer to the same address. For example, the far pointers 0000:0120, 0010:0020, and 0012:0000 all resolve to the same 20-bit address. However, if you had three different far pointer variablesname='mdash' font=symbol charset=fontspecific code=190
descr='[mdash]'ROLE='italic'a, b, and ROLE='italic'cname='mdash' font=symbol charset=fontspecific code=190
descr='[mdash]'containing those three values respectively, then all the following expressions would be ROLE='italic'false:FORMAT="LINESPECIFIC"if (a == b)
if (b == c)
if (a == c) REMAP='Body'A related problem occurs when you want to compare far pointers using the ROLE='bold'>, >=, <, and ROLE='bold'<= operators. In those cases, only the offset (as an ROLE='bold'unsigned) is used for comparison purposes; given that ROLE='italic'a, b, and ROLE='italic'c still have the values previously listed, the following expressions would all be ROLE='italic'true:FORMAT="LINESPECIFIC"if (a > b)
if (b > c)
if (a > c) REMAP='Body'The equals (ROLE='bold'==) and not-equal (ROLE='bold'!=) operators use the 32-bit value as an ROLE='bold'unsigned long (not as the full memory address). The comparison operators (ROLE='bold'<=, >=, <, and ROLE='bold'>) use just the offset.REMAP='Body'The ROLE='bold'== and ROLE='bold'!= operators need all 32 bits, so the computer can compare to the NULL pointer (0000:0000). If you used only the offset value for equality checking, any pointer with 0000 offset would be equal to the NULL pointer, which is not what you want.REMAP='.ScanBold'ROLE='bold'NoteREMAP='Body'If you add values to a far pointer, only the offset is changed. If you add enough to cause the offset to exceed FFFF (its maximum possible value), the pointer just wraps around back to the beginning of the segment. For example, if you add 1 to 5031:FFFF, the result would be 5031:0000 (not 6031:0000). Likewise, if you subtract 1 from 5031:0000, you would get 5031:FFFF (not 5030:000F).REMAP='Body'If you want to do pointer comparisons, it's safest to use either near pointersname='mdash' font=symbol charset=fontspecific code=190
descr='[mdash]'which all use the same segment addressname='mdash' font=symbol charset=fontspecific code=190
descr='[mdash]'or huge pointers, described next.REMAP='.Head3' RENDERAS="SECT3"Huge pointersREMAP='BodyNoLead'Huge pointers are also 32 bits long. Like far pointers, they contain both a segment address and an offset. Unlike far pointers, they are ROLE='italic'normalized to avoid the problems associated with far pointers.REMAP='Body'A normalized pointer is a 32-bit pointer that has as much of its value in the segment address as possible. Since a segment can start every 16 bytes (10 in base 16), this means that the offset will only have a value from 0 to 15 (0 to F in base 16).REMAP='Body'To normalize a pointer, convert it to its 20-bit address, then use the right 4 bits for your offset and the left 16 bits for your segment address. For example, given the pointer 2F84:0532, you would convert that to the absolute address 2FD72, which you would then normalize to 2FD7:0002. Here are a few more pointers with their normalized equivalents:FORMAT="LINESPECIFIC"0000 : 0123 0012 : 0003
0040 : 0056 0045 : 0006
500D: 9407 594D : 0007
7418 : D03F 811B : 000FREMAP='Body'There are three reasons why it is important to always keep huge pointers normalized:NUMERATION='ARABIC' CONTINUATION="RESTARTS" INHERITNUM="IGNORE"REMAP='.NumList1'For any given memory address there is only one possible huge address (segment:offset) pair. That means that the ROLE='bold'== and ROLE='bold'!= operators return correct answers for any huge pointers.REMAP='.NumList1'In addition, the ROLE='bold'>, >=, <, and ROLE='bold'<= operators are all used on the full 32-bit value for huge pointers. Normalization guarantees that the results of these comparisons will also be correct.REMAP='.NumList1'Finally, because of normalization, the offset in a huge pointer automatically wraps around every 16 values, butname='mdash' font=symbol charset=fontspecific code=190
descr='[mdash]'unlike far pointersname='mdash' font=symbol charset=fontspecific code=190
descr='[mdash]'the segment is adjusted as well. For example, if you were to increment 811B:000F, the result would be 811C:0000; likewise, if you decrement 811C:0000, you get 811B:000F. It is this aspect of huge pointers that allows you to manipulate data structures greater than 64K in size. This ensures that, for example, if you have a huge array of ROLE='bold'structs that's larger than 64K, indexing into the array and selecting a ROLE='bold'struct field will always work with structs of any size.REMAP='Body'There is a price for using huge pointers: additional overhead. Huge pointer arithmetic is done with calls to special subroutines. Because of this, huge pointer arithmetic is significantly slower than that of far or near pointers.REMAP='.Head2' RENDERAS="SECT2"ID='X-21224'The six memory modelsREMAP='Body'Borland C++ gives you six memory models for 16-bit DOS programs: tiny, small, medium, compact, large, and huge. Your program requirements determine which one you pick. Here's a brief summary of each:MARK='bullet'REMAP='Bullet1'ROLE='bold'Tiny. As you might guess, this is the smallest of the memory models. All four segment registers (CS, DS, SS, ES) are set to the same address, so you have a total of 64K for all of your code, data, and stack. Near pointers are always used. Tiny model programs can be converted to .COM format by linking with the /t option. Use this model when memory is at an absolute premium.REMAP='Bullet1'ROLE='bold'Small. The code and data segments are different and don't overlap, so you have 64K of code and 64K of data and stack. Near pointers are always used. This is a good size for average applications.REMAP='Bullet1'ROLE='bold'Medium. Far pointers are used for code, but not for data. As a result, data plus stack are limited to 64K, but code can occupy up to 1 MB. This model is best for large programs without much data in memory.REMAP='Bullet1'ROLE='bold'Compact. The inverse of medium: Far pointers are used for data, but not for code. Code is then limited to 64K, while data has a 1 MB range. This model is best if code is small but needs to address a lot of data.REMAP='Bullet1'ROLE='bold'Large. Far pointers are used for both code and data, giving both a 1 MB range. Large and huge are needed only for very large applications.REMAP='Bullet1'ROLE='bold'Huge. Far pointers are used for both code and data. Borland C++ normally limits the size of all static data to 64K; the huge memory model sets aside that limit, allowing data to occupy more than 64K.REMAP='Body'Figures LINKEND='X-30745' TYPE='XREF-TEXTCOPY'1.3 through LINKEND='X-38019' TYPE='XREF-TEXTCOPY'1.8 show how memory in the 8086 is apportioned for the Borland C++ memory models. To select these memory models, you can either use menu selections from the IDE or you can type options invoking the command-line compiler version of Borland C++.REMAP='FigCap' FLOAT="0"ID='X-30745'Tiny model memory segmentationFILEREF='mem_3.gif'REMAP='FigCap' FLOAT="0"Small model memory segmentationFILEREF='mem_4.gif'REMAP='FigCap' FLOAT="0"Medium model memory segmentationFILEREF='mem_5.gif'REMAP='FigCap' FLOAT="0"Compact model memory segmentationFILEREF='mem_6.gif'REMAP='FigCap' FLOAT="0"Large model memory segmentationFILEREF='mem_7.gif'REMAP='FigCap' FLOAT="0"ID='X-38019'Huge model memory segmentationFILEREF='mem_8.gif'REMAP='Body'LINKEND='X-63858' TYPE='XREF-TEXTCOPY'Table 1.1 summarizes the different models and how they compare to one another. The models are often grouped according to whether their code or data models are ROLE='italic'small (64K) or ROLE='italic'large (16 MB); these groups correspond to the rows and columns in LINKEND='X-63858' TYPE='XREF-TEXTCOPY'Table 1.1. ID='X-1'TOCENTRY="1"REMAP='TblCap'ROLE='BOLD'ID='X-63858'Memory modelsCOLS='3' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='62*'COLNAME='C2' COLWIDTH='155*'COLNAME='C3' COLWIDTH='156*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'Data sizeCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading.Center'Code size 64KCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Heading.Center'Code size 16MBCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'64KCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Tiny (data, code overlap; total size = 64K)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'64KCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Small (no overlap; total size = 128K)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Medium (small data, large code)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'16 MBCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Compact (large data, small code)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Large (large data, code)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'16 MBCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Huge (same as large but static data > 64K)REMAP='Body'The models tiny, small, and compact are small code models because, by default, code pointers are near; likewise, compact, large, and huge are large data models because, by default, data pointers are far.REMAP='Body'When you compile a module (a given source file with some number of routines in it), the resulting code for that module cannot be greater than 64K, since it must all fit inside of one code segment. This is true even if you're using one of the larger code models (medium, large, or huge). If your module is too big to fit into one (64K) code segment, you must break it up into different source code files, compile each file separately, then link them together. Similarly, even though the huge model permits static data to total more than 64K, it still must be less than 64K in ROLE='italic'each module.REMAP='.Head1' RENDERAS="SECT1"Mixed-model programming: Addressing modifiersREMAP='Body'Borland C++ introduces eight new keywords not found in standard ANSI C. These keywords are ROLE='bold'_ _near, ROLE='bold'_ _far, ROLE='bold'_ _huge, ROLE='bold'_ _cs, ROLE='bold'_ _ds, ROLE='bold'_ _es, ROLE='bold'_ _ss, and ROLE='bold'_ _seg. These keywords can be used as modifiers to pointers (and in some cases, to functions), with certain limitations and warnings.REMAP='Body'In Borland C++, you can modify the declarations of pointers, objects, and functions with the keywords ROLE='bold'_ _near, ROLE='bold'_ _far, or ROLE='bold'_ _huge. The ROLE='bold'_ _near, ROLE='bold'_ _far, and ROLE='bold'_ _huge data pointers are described earlier in this chapter. You can declare far objects using the ROLE='bold'_ _far keyword. ROLE='bold'_ _near functions are invoked with near calls and exit with near returns. Similarly, ROLE='bold'_ _far functions are called ROLE='bold'_ _far and return far values. ROLE='bold'_ _huge functions are like ROLE='bold'_ _far functions, except that ROLE='bold'_ _huge functions set DS to a new value, and ROLE='bold'_ _far functions do not.REMAP='Body'There are also four special _ _near data pointers: ROLE='bold'_ _cs, ROLE='bold'_ _ds, ROLE='bold'_ _es, and ROLE='bold'_ _ss. These are 16-bit pointers that are specifically associated with the corresponding segment register. For example, if you were to declare a pointer to beFORMAT="LINESPECIFIC"MOREINFO="NONE"char _ss *p;REMAP='Body'then ROLE='italic'p would contain a 16-bit offset into the stack segment.REMAP='Body'Functions and pointers within a given program default to near or far, depending on the memory model you select. If the function or pointer is near, it is automatically associated with either the CS or DS register.REMAP='Body'The next table shows how this works. Note that the size of the pointer corresponds to whether it is working within a 64K memory limit (near, within a segment) or inside the general 1 MB memory space (far, has its own segment address).TOCENTRY="1"REMAP='TblCap'Pointer resultsCOLS='3' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='81*'COLNAME='C2' COLWIDTH='81*'COLNAME='C3' COLWIDTH='81*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'Memory modelCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'Function pointersCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Heading'Data pointersVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'TinyCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'near, _csCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'near, _dsCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'SmallCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'near, _csCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'near, _dsCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'MediumCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'farCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'near, _dsCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'CompactCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'near, _csCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'farCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'LargeCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'farCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'farCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'HugeCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'farCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'farREMAP='.Head2' RENDERAS="SECT2"Segment pointersREMAP='Body'Use ROLE='bold'_ _seg in segment pointer type declarators. The resulting pointers are 16-bit segment pointers. The syntax for ROLE='bold'_ _seg is:REMAP='.Indent1' ROLE='indent1'ROLE='italic'datatype _seg *ROLE='italic'identifier;REMAP='Body'For example,FORMAT="LINESPECIFIC"MOREINFO="NONE"int _seg *name;REMAP='Body'Any indirection through ROLE='italic'identifier has an assumed offset of 0. In arithmetic involving segment pointers the following rules hold true:NUMERATION='ARABIC' CONTINUATION="RESTARTS" INHERITNUM="IGNORE"REMAP='.NumList1'You can't use the ROLE='bold'++, - -, +=, or ROLE='bold'-= operators with segment pointers.REMAP='.NumList1'You cannot subtract one segment pointer from another.REMAP='.NumList1'When adding a near pointer to a segment pointer, the result is a far pointer that is formed by using the segment from the segment pointer and the offset from the near pointer. Therefore, the two pointers must either point to the same type, or one must be a pointer to void. There is no multiplication of the offset regardless of the type pointed to.REMAP='.NumList1'When a segment pointer is used in an indirection expression, it is also implicitly converted to a far pointer.REMAP='.NumList1'When adding or subtracting an integer operand to or from a segment pointer, the result is a far pointer, with the segment taken from the segment pointer and the offset found by multiplying the size of the object pointed to by the integer operand. The arithmetic is performed as if the integer were added to or subtracted from the far pointer.REMAP='.NumList1'Segment pointers can be assigned, initialized, passed into and out of functions, compared and so forth. (Segment pointers are compared as if their values were ROLE='bold'unsigned integers.) In other words, other than the above restrictions, they are treated exactly like any other pointer.REMAP='.Head2' RENDERAS="SECT2"Declaring far objectsREMAP='Body'You can declare far objects in Borland C++. For example,FORMAT="LINESPECIFIC"int far x = 5;
int far z;
extern int far y = 4;
static long j;REMAP='Body'The command-line compiler options ROLE='bold'-zE, -zF, and ROLE='bold'-zH (which can also be set using ROLE='bold'#pragma option) affect the far segment name, class, and group, respectively. When you use ROLE='bold'#pragma option, you can make them apply to any ensuing far object declarations. Thus you could use the following sequence to create a far object in a specific segment:FORMAT="LINESPECIFIC"#pragma option -zEmysegment -zHmygroup -zFmyclass
int far x;
#pragma option -zE* -zH* -zF*REMAP='Body'This will put ROLE='italic'x in segment MYSEGMENT 'MYCLASS' in the group 'MYGROUP', then reset all of the far object items to the default values. Note that by using these options, several far objects can be forced into a single segment:FORMAT="LINESPECIFIC"#pragma option -zEcombined -zFmyclass
int far x;
double far y;
#pragma option -zE* -zF*REMAP='Body'Both ROLE='italic'x and ROLE='italic'y will appear in the segment COMBINED 'MYCLASS' with no group.REMAP='.Head2' RENDERAS="SECT2"Declaring functions to be near or farREMAP='Body'On occasion, you'll want (or need) to override the default function type of your memory model.REMAP='Body'For example, suppose you're using the large memory model, but you have a recursive (self-calling) function in your program, like this:FORMAT="LINESPECIFIC"double power(double x,int exp) {
if (exp <= 0)
return(1);
else
return(x * power(x, exp-1));
}REMAP='Body'Every time ROLE='italic'power calls itself, it has to do a far call, which uses more stack space and clock cycles. By declaring power as ROLE='bold'_ _near, you eliminate some of the overhead by forcing all calls to that function to be near:FORMAT="LINESPECIFIC"MOREINFO="NONE"double _ _near power(double x,int exp)REMAP='Body'This guarantees that ROLE='italic'power is callable only within the code segment in which it was compiled, and that all calls to it are near calls.REMAP='Body'This means that if you're using a large code model (medium, large, or huge), you can only call ROLE='italic'power from within the module where it is defined. Other modules have their own code segment and thus cannot call ROLE='bold'_ _near functions in different modules. Furthermore, a near function must be either defined or declared before the first time it is used, or the compiler won't know it needs to generate a near call.REMAP='Body'Conversely, declaring a function to be far means that a far return is generated. In the small code models, the far function must be declared or defined before its first use to ensure it is invoked with a far call.REMAP='Body'Look back at the ROLE='italic'power example at the beginning of this section. It is wise to also declare ROLE='italic'power as static, since it should be called only from within the current module. That way, being a static, its name will not be available to any functions outside the module.REMAP='.Head2' RENDERAS="SECT2"Declaring pointers to be near, far, or hugeREMAP='Body'You've seen why you might want to declare functions to be of a different model than the rest of the program. For the same reasons given in the preceding section, you might want to modify pointer declarations: either to avoid unnecessary overhead (declaring ROLE='bold'_ _near when the default would be ROLE='bold'_ _far) or to reference something outside of the default segment (declaring ROLE='bold'_ _far or ROLE='bold'_ _huge when the default would be ROLE='bold'_ _near).REMAP='Body'There are, of course, potential pitfalls in declaring functions and pointers to be of nondefault types. For example, say you have the following small model program:FORMAT="LINESPECIFIC"void myputs(s) {
char *s;
int i;
for (i = 0; s[i] != 0; i++) putc(s[i]);
}
main() {
char near *mystr;
mystr = "Hello, world\n" myputs(mystr);
}REMAP='Body'This program works fine. In fact, the ROLE='bold'_ _near declaration on ROLE='italic'mystr is redundant, since all pointers, both code and data, will be near.REMAP='Body'But what if you recompile this program using the compact (or large or huge) memory model? The pointer ROLE='italic'mystr in ROLE='italic'main is still near (it's still a 16-bit pointer). However, the pointer s in ROLE='italic'myputs is now far, because that's the default. This means that myputs will pull two words out of the stack in an effort to create a far pointer, and the address it ends up with will certainly not be that of ROLE='italic'mystr.REMAP='Body'How do you avoid this problem? If you're going to explicitly declare pointers to be of type ROLE='bold'_ _far or ROLE='bold'_ _near, be sure to use function prototypes for any functions that might use them. The solution is to define ROLE='italic'myputs in ANSI C style, like this:FORMAT="LINESPECIFIC"void myputs(char *s) {
/* body of myputs */
}REMAP='Body'Now when Borland C++ compiles your program, it knows that ROLE='italic'myputs expects a pointer to ROLE='bold'char; and since you're compiling under the large model, it knows that the pointer must be ROLE='bold'_ _far. Because of that, Borland C++ will push the data segment (DS) register onto the stack along with the 16-bit value of ROLE='italic'mystr, forming a far pointer.REMAP='Body'How about the reverse case: arguments to ROLE='italic'myputs declared as ROLE='bold'_ _far and compiled with a small data model? Again, without the function prototype, you will have problems, because ROLE='italic'main will push both the offset and the segment address onto the stack, but ROLE='italic'myputs will expect only the offset. With the prototype-style function definitions, though, ROLE='italic'main will only push the offset onto the stack.REMAP='.Head3' RENDERAS="SECT3"Pointing to a given segment:offset addressREMAP='BodyNoLead'You can make a far pointer point to a given memory location (a specific segment:offset address). You can do this with the macro ROLE='italic'MK_FP, which takes a segment and an offset and returns a far pointer. For example,FORMAT="LINESPECIFIC"MOREINFO="NONE"MK_FP(segment_value, offset_value)REMAP='Body'Given a ROLE='bold'_ _far pointer, ROLE='italic'fp, you can get the segment component with ROLE='italic'FP_SEG(fp) and the offset component with ROLE='italic'FP_OFF(fp). For more information about these three Borland C++ library routines, refer to the TARGETDOCENT='xref.memmgmt.mif.bclr' LOCALINFO='X-77180' nd.ent='xref.memmgmt.mif.bclr' nd.pub='' nd.sys='bc_lr' nn.not='EBT-BOOK' nn.pub='EBT' nn.sys=''Borland C++ Library Reference.REMAP='.Head2' RENDERAS="SECT2"Using library filesREMAP='Body'Borland C++ offers a version of the standard library routines for each of the six memory models. Borland C++ is smart enough to link in the appropriate libraries in the proper order, depending on which model you've selected. However, if you're using the Borland C++ linker, TLINK, directly (as a standalone linker), you need to specify which libraries to use. See TARGETDOCENT='xref.memmgmt.mif.bcug' LOCALINFO='X-37306' nd.ent='xref.memmgmt.mif.bcug' nd.pub='' nd.sys='bc_ug' nn.not='EBT-BOOK' nn.pub='EBT' nn.sys=''Chapter 9 in the ROLE='italic'User's Guide for details on how to do this.REMAP='.Head2' RENDERAS="SECT2"Linking mixed modulesREMAP='Body'Suppose you compiled one module using the small memory model and another module using the large model, then wanted to link them together. This would present some problems, but they can be solved.REMAP='Body'The files would link together fine, but the problems you would encounter would be similar to those described in the earlier section, "Declaring functions to be near or far." If a function in the small module called a function in the large module, it would do so with a near call, which would probably be disastrous. Furthermore, you could face the same problems with pointers as described in the earlier section, "Declaring pointers to be near, far, or huge," since a function in the small module would expect to pass and receive ROLE='bold'_ _near pointers, and a function in the large module would expect ROLE='bold'_ _far pointers.REMAP='Body'The solution, again, is to use function prototypes. Suppose that you put ROLE='italic'myputs into its own module and compile it with the large memory model. Then create a header file called myputs.h (or some other name with a .h extension), which would have the following function prototype in it:FORMAT="LINESPECIFIC"void far myputs(char far *s);REMAP='Body'Now, put ROLE='italic'main into its own module (called MYMAIN.C), and set things up like this:FORMAT="LINESPECIFIC"#include <stdio.h>
#include "myputs.h"
main() {
char near *mystr;
mystr = "Hello, world\n"; myputs(mystr);
}REMAP='Body'When you compile this program, Borland C++ reads in the function prototype from myputs.h and sees that it is a ROLE='bold'_ _far function that expects a ROLE='bold'_ _far pointer. Therefore, it generates the proper calling code, even if it's compiled using the small memory model.REMAP='Body'What if, on top of all this, you need to link in library routines? Your best bet is to use one of the large model libraries and declare everything to be ROLE='bold'_ _far. To do this, make a copy of each header file you would normally include (such as stdio.h), and rename the copy to something appropriate (such as fstdio.h).REMAP='Body'Then edit each function prototype in the copy so that it is explicitly ROLE='bold'_ _far, like this:FORMAT="LINESPECIFIC"int far cdecl printf(char far * format, ...);REMAP='Body'That way, not only will ROLE='bold'_ _far calls be made to the routines, but the pointers passed will also be ROLE='bold'_ _far pointers. Modify your program so that it includes the new header file:FORMAT="LINESPECIFIC"#include <fstdio.h>
void main() {
char near *mystr;
mystr = "Hello, world\n"; printf(mystr);
}REMAP='Body'Compile your program with the command-line compiler BCC then link it with TLINK, specifying a large model library, such as CL.LIB. Mixing models is tricky, but it can be done; just be prepared for some difficult bugs if you do things wrong.REMAP='.Head1' RENDERAS="SECT1"Overlays (VROOMM) for DOSREMAP='Body'Overlays are used only in 16-bit DOS programs; you can mark the code segments of a Windows application as discardable to decrease memory consumption. ROLE='italic'Overlays are parts of a program's code that share a common memory area. Only the parts of the program that are required for a given function reside in memory at the same time.REMAP='Body'Overlays can significantly reduce a program's total run-time memory requirements. With overlays, you can execute programs that are much larger than the total available memory, since only parts of the program reside in memory at any given time.REMAP='.Head2' RENDERAS="SECT2"How overlays workREMAP='Body'Borland C++'s overlay manager (called VROOMM for Virtual Run-time Object-Oriented Memory Manager) is highly sophisticated; it does much of the work for you. In a conventional overlay system, modules are grouped together into a base and a set of overlay units. Routines in a given overlay unit can call other routines in the same unit and routines in the base, but not routines in other units. The overlay units are overlaid against each other; that is, only one overlay unit can be in memory at a time, and each unit occupies the same physical memory. The total amount of memory needed to run the program is the size of the base plus the size of the largest overlay.REMAP='Body'This conventional scheme is quite inflexible. It requires complete understanding of the possible calling dependencies in the program, and requires you to have the overlays grouped accordingly. It might be impossible to break your program into overlays if you can't split it into separable calling dependencies.REMAP='Body'VROOMM's scheme is quite different. It provides dynamic segment swapping. The basic swapping unit is the segment. A segment can be one or more modules. More importantly, any segment can call any other segment.REMAP='Body'Memory is divided into an area for the base plus a swap area. Whenever a function is called in a segment that is neither in the base nor in the swap area, the segment containing the called function is brought into the swap area, possibly displacing other segments. This is a powerful approachname='mdash' font=symbol charset=fontspecific code=190
descr='[mdash]'it is like software virtual memory. You no longer have to break your code into static, distinct, overlay units. You just let it run!REMAP='Body'Suppose a segment needs to be brought into the swap area. If there is room for the segment, execution continues. If there is not, then one or more segments in the swap area must be thrown out to make room.REMAP='Body'The algorithm for deciding which segment to throw out is quite sophisticated. Here's a simplified version: if there is an inactive segment, choose it for removal. Inactive segments are those without executing functions. Otherwise, pick an active segment and swap it out. Keep swapping out segments until there is enough room available. This technique is called dynamic swapping.REMAP='Body'The more memory you provide for the swap area, the better the program performs. The swap area acts like a cache; the bigger the cache, the faster the program runs. The best setting for the size of the swap area is the size of the program's working set.REMAP='Body'Once an overlay is loaded into memory, it is placed in the overlay buffer, which resides in memory between the stack segment and the far heap. By default, the size of the overlay buffer is estimated and set at startup, but you can change it using the global variable ROLE='italic'_ovrbuffer (see LINKEND='X-34528' TYPE='XREF-TEXTCOPY'Appendix B). If there isn't enough available memory, an error message is displayed by DOS ("Program too big to fit in memory") or by the C startup code ("Not enough memory to run program").REMAP='Body'One important option of the overlay manager is the ability to swap the modules to expanded or extended memory when they are discarded from the overlay buffer. Next time the module is needed, the overlay manager can copy it from where the module was swapped to instead of reading from the file. This makes the overlay manager much faster.REMAP='Body'When using overlays, memory is used as shown in the next figure.REMAP='FigWideCap' FLOAT="0"Memory maps for overlaysFILEREF='mem_9.gif'REMAP='.Head3' RENDERAS="SECT3"Guidelines for using Borland C++ overlays effectivelyREMAP='BodyNoLead'To get the best out of Borland C++ overlays,MARK='bullet'REMAP='Bullet1'Minimize resident code (resident run-time library, interrupt handlers, and device drivers are a good starting point).REMAP='Bullet1'Set overlay buffer size to be a comfortable working set (start with 128K and adjust up and down to see the speed/size tradeoff). See LINKEND='X-21803' TYPE='XREF-TEXTCOPY'"Buffer size" for more information on setting the size of the overlay buffer.REMAP='Bullet1'Think versatility and variety: take advantage of the overlay system to provide support for special cases, interactive help, and other end-user benefits you couldn't consider before.REMAP='.Head2' RENDERAS="SECT2"RequirementsREMAP='Body'To create overlays, you'll need to remember a few rules:MARK='bullet'REMAP='Bullet1'The smallest part of a program that can be made into an overlay is a segment.REMAP='Bullet1'Overlaid applications must use the medium, large, or huge programming models; the tiny, small, and compact models are not supported.REMAP='Bullet1'Normal segment merging rules govern overlaid segments. That is, several .OBJ modules can contribute to the same overlaid segment.REMAP='Body'The link-time generation of overlays is completely separated from the run-time overlay management; the linker does not automatically include code to manage the overlays. In fact, from the linker's point of view, the overlay manager is just another piece of code that gets linked in. The only assumption the linker makes is that the overlay manager takes over an interrupt vector (typically INT 3FH) through which all dynamic loading is controlled. This level of transparency makes it very easy to implement custom-built overlay managers that suit the particular needs of each application.REMAP='.Head2' RENDERAS="SECT2"ID='X-13859'Exception handling and overlaysREMAP='Body'If you overlay a C++ program that contains exception-handling constructs, there are a number of situations that you must avoid. The following program elements cannot contain an exception-handling construct:MARK='bullet'REMAP='Bullet1'Inline functions that are not expanded inlineREMAP='BulletNoLead1'Template functionsREMAP='BulletNoLead1'Member functions of template classesREMAP='Body'Exception-handling constructs include user-written ROLE='bold'try/catch and ROLE='bold'_ _try/ROLE='bold'_ _except blocks. In addition, the compiler can insert exception handlers for blocks with automatic class variables, exception specifications, and some ROLE='bold'new/delete expressions.REMAP='Body'If you attempt to overlay any of the above exception-handling constructs, the linker identifies the function and module with the following message:FORMAT="LINESPECIFIC"Error: Illegal local public in ROLE='italic'function_name in module ROLE='italic'module_nameREMAP='Body'When this error is caused by an inline function, you can rewrite the function so that it is not inline. If the error is caused by a template function, you can do the following:MARK='bullet'REMAP='Bullet1'Remove all exception-handling constructs from the functionREMAP='BulletNoLead1'Remove the function from the overlay moduleREMAP='Body'You need to pay special attention when overlaying a program that uses multiple inheritance. An attempt to overlay a module that defines or uses class constructors or destructors that are required for a multiple inheritance class can cause the linker to generate the following message:FORMAT="LINESPECIFIC"Error: Illegal local public in ROLE='italic'class_name:: in module ROLE='italic'module_nameREMAP='Body'When such a message is generated, the module identified by the linker message should not be overlaid.REMAP='Body'The container classes (in the BIDS?.LIB) have the exception-handling mechanism turned off by default. However, the diagnostic version of BIDS throws exceptions and should not be used with overlays. By default, the ROLE='italic'string class can throw exceptions and should not be used in programs that use overlays. See the TARGETDOCENT='xref.memmgmt.mif.bccl' LOCALINFO='X-60437' nd.ent='xref.memmgmt.mif.bccl' nd.pub='' nd.sys='bc_cl' nn.not='EBT-BOOK' nn.pub='EBT' nn.sys=''Borland C++ Class Libraries Guide for a discussion of BIDS and the ROLE='italic'string class.REMAP='.Head2' RENDERAS="SECT2"Using overlaysREMAP='Body'Overlays can be used only in 16-bit DOS programs. To overlay a program, all of its modules must be compiled with the ROLE='bold'-Y compiler option enabled. To make a particular module into an overlay, it needs to be compiled with the ROLE='bold'-Yo option. (ROLE='bold'-Yo automatically enables ROLE='bold'-Y.)REMAP='Body'The ROLE='bold'-Yo option applies to all modules and libraries that follow it on the command line; you can disable it with ROLE='bold'-Yo-. These are the only command line options that are allowed to follow file names. For example, to overlay the module OVL.C but not the library GRAPHICS.LIB, either of the following command lines could be used:FORMAT="LINESPECIFIC"MOREINFO="NONE"BCC -ml -Yo ovl.c -Yo- graphics.libREMAP='Body'orFORMAT="LINESPECIFIC"MOREINFO="NONE"BCC -ml graphics.lib -Yo ovl.cREMAP='Body'If TLINK is invoked explicitly to link the .EXE file, the ROLE='bold'/o linker option must be specified on the linker command line or response file. See the TARGETDOCENT='xref.memmgmt.mif.bcug' LOCALINFO='X-41776' nd.ent='xref.memmgmt.mif.bcug' nd.pub='' nd.sys='bc_ug' nn.not='EBT-BOOK' nn.pub='EBT' nn.sys=''Borland C++ User's Guide for details on how to use the ROLE='bold'/o option.REMAP='.Head3' RENDERAS="SECT3"Overlay exampleREMAP='BodyNoLead'Suppose that you want to overlay a program consisting of three modules: MAIN.C, O1.C, and O2.C. Only the modules O1.C and O2.C should be made into overlays. (MAIN.C contains time-critical routines and interrupt handlers, so it should stay resident.) Let's assume that the program uses the large memory model.REMAP='Body'The following command accomplishes the task:FORMAT="LINESPECIFIC"BCC -ml -Y main.c -Yo o1.c o2.cREMAP='Body'The result will be an executable file MAIN.EXE, containing two overlays.REMAP='.ScanBold'ROLE='bold'NoteREMAP='Body'See the discussion of TargetExpert in the TARGETDOCENT='xref.memmgmt.mif.bcug' LOCALINFO='X-41776' nd.ent='xref.memmgmt.mif.bcug' nd.pub='' nd.sys='bc_ug' nn.not='EBT-BOOK' nn.pub='EBT' nn.sys=''Borland C++ User's Guide for information on programming with overlays.REMAP='.Head2' RENDERAS="SECT2"Overlaid programsREMAP='Body'This section discusses issues vital to well-behaved overlaid applications.REMAP='.Head3' RENDERAS="SECT3"The far call requirementREMAP='BodyNoLead'Use a large code model (medium, large, or huge) when you want to compile an overlay module. At any call to an overlaid function in another module, you ROLE='italic'must guarantee that all currently active functions are far.REMAP='Body'You ROLE='italic'must compile all overlaid modules with the ROLE='bold'-Y option, which makes the compiler generate code that can be overlaid.REMAP='.ScanBold'ROLE='bold'NoteREMAP='Body'Failing to observe the far call requirement in an overlaid program will cause unpredictable and possibly catastrophic results when the program is executed.REMAP='.Head3' RENDERAS="SECT3"ID='X-21803'Buffer sizeREMAP='BodyNoLead'The default overlay buffer size is twice the size of the largest overlay. This is adequate for some applications. But imagine that a particular function of a program is implemented through many modules, each of which is overlaid. If the total size of those modules is larger than the overlay buffer, a substantial amount of swapping will occur if the modules make frequent calls to each other.REMAP='Body'The solution is to increase the size of the overlay buffer so that enough memory is available at any given time to contain all overlays that make frequent calls to each other. You can do this by setting the ROLE='italic'_ovrbuffer global variable (see LINKEND='X-34528' TYPE='XREF-TEXTCOPY'Appendix B) to the required size in paragraphs. For example, to set the overlay buffer to 128K, include the following statement in your code:FORMAT="LINESPECIFIC"MOREINFO="NONE"unsigned _ovrbuffer = 0x2000;REMAP='Body'There is no general formula for determining the ideal overlay buffer size.REMAP='.Head3' RENDERAS="SECT3"What not to overlayREMAP='BodyNoLead'Exception-handling constructs in overlays require special attention. See LINKEND='X-13859' TYPE='XREF-TEXTCOPY'"Exception handling and overlays" for a discussion of exception handling.REMAP='Body'Don't overlay modules that contain interrupt handlers, or small and time-critical routines. Due to the non-reentrant nature of the DOS operating system, modules that might be called by interrupt functions should not be overlaid.REMAP='Body'Borland C++'s overlay manager fully supports passing overlaid functions as arguments, assigning and initializing function pointer variables with addresses of overlaid functions, and calling overlaid routines via function pointers.REMAP='.Head3' RENDERAS="SECT3"Debugging overlaysREMAP='BodyNoLead'Most debuggers have very limited overlay debugging capabilities, if any at all. Not so with Borland C++'s Turbo Debugger, the standalone debugger. The debugger fully supports single-stepping and breakpoints in overlays in a manner completely transparent to you. By using overlays, you can easily engineer and debug huge applicationsname='mdash' font=symbol charset=fontspecific code=190
descr='[mdash]'all by using Turbo Debugger.REMAP='.ScanBold'ROLE='bold'NoteREMAP='Body'Overlays should not be used with any diagnostic version of the BIDS libraries.REMAP='.Head3' RENDERAS="SECT3"External routines in overlaysREMAP='BodyNoLead'Like normal C functions, ROLE='bold'external assembly language routines must observe certain programming rules to work correctly with the overlay manager.REMAP='Body'If an assembly language routine makes calls to ROLE='italic'any overlaid functions, the assembly language routine ROLE='italic'must be declared FAR, and it ROLE='italic'must set up a stack frame using the BP register. For example, assuming that ROLE='italic'OtherFunc is an overlaid function in another module, and that the assembly language routine ROLE='italic'ExternFunc calls it, then ROLE='italic'ExternFunc must be FAR and set up a stack frame, as shown:FORMAT="LINESPECIFIC"ExternFunc PROC FAR
push bp ;Save BP
mov bp,sp ;Set up stack frame
sub sp,LocalSize ;Allocate local variables
.
.
.
call OtherFunc ;Call another overlaid module
.
.
.
mov sp,bp ;Dispose local variables
pop bp ;Restore BP
RET ;Return
ExternFunc ENDPREMAP='Body'where ROLE='italic'LocalSize is the size of the local variables. If ROLE='italic'LocalSize is zero, you can omit the two lines to allocate and dispose local variables, but you must not omit setting up the BP stack frame even if you have no arguments or variables on the stack.REMAP='Body'These requirements are the same if ROLE='italic'ExternFunc makes ROLE='italic'indirect references to overlaid functions. For example, if ROLE='italic'OtherFunc makes calls to overlaid functions, but is not itself overlaid, ROLE='italic'ExternFunc must be FAR and still has to set up a stack frame.REMAP='Body'In the case where an assembly language routine doesn't make any direct or indirect references to overlaid functions, there are no special requirements; the assembly language routine can be declared NEAR. It does not have to set up a stack frame.REMAP='Body'Overlaid assembly language routines should ROLE='italic'not create variables in the code segment, since any modifications made to an overlaid code segment are lost when the overlay is disposed. Likewise, pointers to objects based in an overlaid code segment cannot be expected to remain valid across calls to other overlays, since the overlay manager freely moves around and disposes overlaid code segments.REMAP='.Head2' RENDERAS="SECT2"SwappingREMAP='Body'If you have expanded or extended memory available, you can tell the overlay manager to use it for swapping. If you do so, when the overlay manager has to discard a module from the overlay buffer (because it should load a new module and the buffer is full), it can store the discarded module in this memory. Any later loading of this module is reduced to in-memory transfer, which is significantly faster than reading from a disk file.REMAP='Body'In both cases there are two possibilities: the overlay manager can either detect the presence of expanded or extended memory and can take it over by itself, or it can use an already detected and allocated portion of memory. For extended memory, the detection of the memory use is not always successful because of the many different cache and RAM disk programs that can take over extended memory without any mark. To avoid this problem, you can tell the overlay manager the starting address of the extended memory and how much of it is safe to use.REMAP='Body'Borland C++ provides two functions that allow you to initialize expanded and extended memory. See LINKEND='X-12043' TYPE='XREF-TEXTCOPY'Chapter 5 for a description of the ROLE='italic'_OvrInitEms and ROLE='italic'_OvrrInitExt functions.REMAP='NumChapter'ID='X-10249'MathREMAP='Body'This chapter describes the floating-point options and explains how to use ROLE='italic'complex and ROLE='italic'bcd numerical types.REMAP='.Head1' RENDERAS="SECT1"Floating-point I/OREMAP='Body'Floating-point output requires linking of conversion routines used by ROLE='italic'printf, scanf, and any variants of these functions. To reduce executable size, the floating-point formats are not automatically linked. However, this linkage is done automatically whenever your program uses a mathematical routine or the address is taken of some floating-point number. If neither of these actions occur, the missing floating-point formats can result in a run-time error.REMAP='Body'The following program illustrates how to set up your program to properly execute.FORMAT="LINESPECIFIC"/* PREPARE TO OUTPUT FLOATING-POINT NUMBERS. */
#include <stdio.h>
#pragma extref _floatconvert
void main() {
printf("d = %f\n", 1.3);
}REMAP='.Head1' RENDERAS="SECT1"Floating-point optionsREMAP='Body'There are two types of numbers you work with in C: integer (ROLE='bold'int, short, long, and so on) and floating point (ROLE='bold'float, double, and ROLE='bold'long double). Your computer's processor can easily handle integer values, but more time and effort are required to handle floating-point values.REMAP='Body'However, the iAPx86 family of processors has a corresponding family of math coprocessors, the 8087, the 80287, and the 80387. We refer to this entire family of math coprocessors as the 80x87, or "the coprocessor."REMAP='Body'The 80x87 is a special hardware numeric processor that can be installed in your PC. It executes floating-point instructions very quickly. If you use floating point a lot, you'll probably want a coprocessor. The CPU in your computer interfaces to the 80x87 via special hardware lines.REMAP='.ScanBold'ROLE='bold'NoteREMAP='Body'If you have an 80486 or Pentium processor, the numeric coprocessor is probably already built in.REMAP='.Head2' RENDERAS="SECT2"Emulating the 80x87 chipREMAP='Body'The default Borland C++ code-generation option is ROLE='italic'emulation (the ROLE='bold'-f command-line compiler option). This option is for programs that might or might not have floating point, and for machines that might or might not have an 80x87 math coprocessor.REMAP='Body'With the emulation option, the compiler will generate code as if the 80x87 were present, but will also link in the emulation library (EMU.LIB). When the program runs, it uses the 80x87 if it is present; if no coprocessor is present at run time, it uses special software that emulates the 80x87. This software uses 512 bytes of your stack, so make allowance for it when using the emulation option and set your stack size accordingly.REMAP='.Head2' RENDERAS="SECT2"Using the 80x87 codeREMAP='Body'If your program is going to run only on machines that have an 80x87 math coprocessor, you can save a small amount in your .EXE file size by omitting the 80x87 autodetection and emulation logic. Choose the 80x87 floating-point code-generation option (the ROLE='bold'-f87 command-line compiler option). Borland C++ will then link your programs with FP87.LIB instead of with EMU.LIB.REMAP='.Head2' RENDERAS="SECT2"No floating-point codeREMAP='Body'If there is no floating-point code in your program, you can save a small amount of link time by choosing None for the floating-point code-generation option (the -f- command-line compiler option). Then Borland C++ will not link with EMU.LIB, FP87.LIB, or MATHx.LIB.REMAP='.Head2' RENDERAS="SECT2"Fast floating-point optionREMAP='Body'Borland C++ has a fast floating-point option (the ROLE='bold'-ff command-line compiler option). It can be turned off with ROLE='bold'-ff- on the command line. Its purpose is to allow certain optimizations that are technically contrary to correct C semantics. For example,FORMAT="LINESPECIFIC"double x;
x = (float)(3.5*x);REMAP='Body'To execute this correctly, ROLE='italic'x is multiplied by 3.5 to give a ROLE='bold'double that is truncated to float precision, then stored as a ROLE='bold'double in ROLE='italic'x. Under the fast floating-point option, the long ROLE='bold'double product is converted directly to a ROLE='bold'double. Since very few programs depend on the loss of precision in passing to a narrower floating-point type, fast floating point is the default.REMAP='.Head2' RENDERAS="SECT2"The 87 environment variableREMAP='Body'If you build your program with 80x87 emulation, which is the default, your program will automatically check to see if an 80x87 is available, and will use it if it is.REMAP='Body'There are some situations in which you might want to override this default autodetection behavior. For example, your own run-time system might have an 80x87, but you might need to verify that your program will work as intended on systems without a coprocessor. Or your program might need to run on a PC-compatible system, but that particular system returns incorrect information to the autodetection logic (saying that a nonexistent 80x87 is available, or vice versa).REMAP='Body'Borland C++ provides an option for overriding the start-up code's default autodetection logic; this option is the 87 environment variable.REMAP='Body'You set the 87 environment variable at the DOS prompt with the SET command, like this:REMAP='Body'MOREINFO="NONE" C> SET 87=NREMAP='Body'or like this:REMAP='Body'MOREINFO="NONE" C> SET 87=YREMAP='Body'Don't include spaces on either side of the =. Setting the 87 environment variable to N (for No) tells the start-up code that you do not want to use the 80x87, even though it might be present in the system.REMAP='.ScanBold'ROLE='bold'NoteREMAP='Body'Setting the 87 environment variable to Y (for Yes) means that the coprocessor is there, and you want the program to use it. ROLE='italic'Let the programmer beware: If you set 87 = Y when, in fact, there is no 80x87 available on that system, your system will hang.REMAP='Body'If the 87 environment variable has been defined (to any value) but you want to undefine it, enter the following at the DOS prompt:FORMAT="LINESPECIFIC"MOREINFO="NONE"C> SET 87=REMAP='Body'Press ROLE='italic'Enter immediately after typing the equal sign.REMAP='.Head2' RENDERAS="SECT2"Registers and the 80x87REMAP='Body'When you use floating point, make note of these points about registers:MARK='bullet'REMAP='Bullet1'In 80x87 emulation mode, register wraparound and certain other 80x87 peculiarities are not supported.REMAP='Bullet1'If you are mixing floating point with inline assembly, you might need to take special care when using 80x87 registers. Unless you are sure that enough free registers exist, you might need to save and pop the 80x87 registers before calling functions that use the coprocessor.REMAP='.Head2' RENDERAS="SECT2"Disabling floating-point exceptionsREMAP='Body'By default, Borland C++ programs abort if a floating-point overflow or divide-by-zero error occurs. You can mask these floating-point exceptions by a call to ROLE='italic'_control87 in main, before any floating-point operations are performed. For example,FORMAT="LINESPECIFIC"#include <float.h>
main() {
_control87(MCW_EM,MCW_EM);
.
.
.
}REMAP='Body'You can determine whether a floating-point exception occurred after the fact by calling ROLE='italic'_status87 or ROLE='italic'_clear87. See the TARGETDOCENT='xref.cmath.mif.bclr' LOCALINFO='X-77180' nd.ent='xref.cmath.mif.bclr' nd.pub='' nd.sys='bc_lr' nn.not='EBT-BOOK' nn.pub='EBT' nn.sys=''Borland C++ Library Reference entries for these functions for details.REMAP='Body'Certain math errors can also occur in library functions; for instance, if you try to take the square root of a negative number. The default behavior is to print an error message to the screen, and to return a NAN (an IEEE not-a-number). Use of the NAN is likely to cause a floating-point exception later, which will abort the program if unmasked. If you don't want the message to be printed, insert the following version of ROLE='italic'_matherr into your program:FORMAT="LINESPECIFIC"#include <math.h>
int _matherr(struct _exception *e)
{
return 1; /* error has been handled */
}REMAP='Body'Any other use of ROLE='italic'_matherr to intercept math errors is not encouraged; it is considered obsolete and might not be supported in future versions of Borland C++.REMAP='.Head1' RENDERAS="SECT1"Using complex typesREMAP='Body'Complex numbers are numbers of the form ROLE='italic'x +ROLE='italic' yi, where ROLE='italic'x and ROLE='italic'y are real numbers, and ROLE='italic'i is the square root of -1. Borland C++ has always had a typeFORMAT="LINESPECIFIC"struct complex
{
double x, y;
};REMAP='Body'defined in math.h. This type is convenient for holding complex numbers, because they can be considered a pair of real numbers. However, the limitations of C make arithmetic with complex numbers rather cumbersome. With the addition of C++, complex math is much simpler.REMAP='Body'A significant advantage to using the Borland C++ ROLE='italic'complex numerical type is that all of the ANSI C Standard mathematical routines are defined to operate with it. These mathematical routines are not defined for use with the C ROLE='bold'struct complex.REMAP='.ScanBold'ROLE='bold'NoteREMAP='Body'See the TARGETDOCENT='xref.cmath.mif.bccl' LOCALINFO='X-60437' nd.ent='xref.cmath.mif.bccl' nd.pub='' nd.sys='bc_cl' nn.not='EBT-BOOK' nn.pub='EBT' nn.sys=''Borland C++ Class Libraries Guide for more information.REMAP='Body'To use complex numbers in C++, all you have to do is to include complex.h. In complex.h, all the following have been overloaded to handle complex numbers:MARK='bullet'REMAP='Bullet1'All of the binary arithmetic operators.REMAP='BulletNoLead1'The input and output operators, >> and <<.REMAP='BulletNoLead1'The ANSI C math functions.REMAP='Body'The complex library is invoked only if the argument is of type ROLE='italic'complex. Thus, to get the complex square root of -1, useFORMAT="LINESPECIFIC"MOREINFO="NONE"sqrt(complex(-1))REMAP='Body'and notFORMAT="LINESPECIFIC"MOREINFO="NONE"sqrt(-1)REMAP='Body'The following functions are defined by class ROLE='italic'complex:FORMAT="LINESPECIFIC"double arg(complex&); // angle in the plane
complex conj(complex&); // complex conjugate
double imag(complex&); // imaginary part
double norm(complex&); // square of the magnitude
double real(complex&); // real part
// Use polar coordinates to create a complex.
complex polar(double mag, double angle = 0);REMAP='.Head1' RENDERAS="SECT1"Using bcd typesREMAP='Body'Borland C++, along with almost every other computer and compiler, does arithmetic on binary numbers (that is, base 2). This can sometimes be confusing to people who are used to decimal (base 10) representations. Many numbers that are exactly representable in base 10, such as 0.01, can only be approximated in base 2.REMAP='.ScanBold'ROLE='bold'NoteREMAP='Body'See the TARGETDOCENT='xref.cmath.mif.bccl' LOCALINFO='X-60437' nd.ent='xref.cmath.mif.bccl' nd.pub='' nd.sys='bc_cl' nn.not='EBT-BOOK' nn.pub='EBT' nn.sys=''Borland C++ Class Libraries Guide for more information.REMAP='Body'Binary numbers are preferable for most applications, but in some situations the round-off error involved in converting between base 2 and 10 is undesirable. The most common example of this is a financial or accounting application, where the pennies are supposed to add up. Consider the following program to add up 100 pennies and subtract a dollar:FORMAT="LINESPECIFIC"#include <stdio.h>
int i;
float x = 0.0;
for (i = 0; i < 100; ++i)
x += 0.01;
x -= 1.0;
printf("100*.01 - 1 = %g\n",x);REMAP='Body'The correct answer is 0.0, but the computed answer is a small number close to 0.0. The computation magnifies the tiny round-off error that occurs when converting 0.01 to base 2. Changing the type of x to ROLE='bold'double or ROLE='bold'long double reduces the error, but does not eliminate it.REMAP='Body'To solve this problem, Borland C++ offers the C++ type ROLE='italic'bcd, which is declared in bcd.h. With ROLE='italic'bcd, the number 0.01 is represented exactly, and the ROLE='italic'bcd variable x provides an exact penny count.FORMAT="LINESPECIFIC"#include <bcd.h>
int i;
bcd x = 0.0;
for (i = 0; i < 100; ++i)
x += 0.01;
x -= 1.0;
cout << "100*.01 - 1 = " << x << "\n";REMAP='Body'Here are some facts to keep in mind about ROLE='italic'bcd:MARK='bullet'REMAP='Bullet1'ROLE='italic'bcd does not eliminate all round-off error: A computation like 1.0/3.0 will still have round-off error.REMAP='Bullet1'ROLE='italic'bcd types can be used with ANSI C math functions.REMAP='Bullet1'ROLE='italic'bcd numbers have about 17 decimal digits precision, and a range of about 1ROLE='bold' xROLE='symbol' 10-125 to 1 x 10125.REMAP='.Head2' RENDERAS="SECT2"Converting bcd numbersREMAP='Body'bcd is a defined type distinct from ROLE='bold'float, double, or ROLE='bold'long double; decimal arithmetic is performed only when at least one operand is of the type ROLE='italic'bcd.REMAP='.ScanBold'ROLE='bold'NoteREMAP='Body'The ROLE='italic'bcd member function ROLE='italic'real is available for converting a ROLE='italic'bcd number back to one of the usual formats (ROLE='bold'float, double, or ROLE='bold'long double), though the conversion is not done automatically. ROLE='italic'real does the necessary conversion to ROLE='bold'long double, which can then be converted to other types using the usual C conversions. For example, a ROLE='italic'bcd can be printed using any of the following four output statements with ROLE='italic'cout and ROLE='italic'printf.FORMAT="LINESPECIFIC"/* PRINTING bcd NUMBERS */
/* This must be compiled as a C++ program. */
#include <bcd.h>
#include <iostream.h>
#include <stdio.h>
void main(void) {
bcd a = 12.1;
double x = real(a); // This conversion required for printf().
printf("\na = %g", x);
printf("\na = %Lg", real(a));
printf("\na = %g", (double)real(a));
cout << "\na = " << a; // The preferred method.
}REMAP='Body'Note that since ROLE='italic'printf doesn't do argument checking, the format specifier must have the ROLE='italic'L if the ROLE='bold'long double value ROLE='italic'real(a) is passed.REMAP='.Head2' RENDERAS="SECT2"Number of decimal digitsREMAP='Body'You can specify how many decimal digits after the decimal point are to be carried in a conversion from a binary type to a ROLE='italic'bcd. The number of places is an optional second argument to the constructor bcd. For example, to convert $1000.00/7 to a ROLE='italic'bcd variable rounded to the nearest penny, useREMAP='Body'MOREINFO="NONE" bcd a = bcd(1000.00/7, 2)REMAP='Body'where 2 indicates two digits following the decimal point. Thus,COLS='3' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='78*'COLNAME='C2' COLWIDTH='27*'COLNAME='C3' COLWIDTH='59*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'MOREINFO="NONE"1000.00/7COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'=COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'142.85714...COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'MOREINFO="NONE"bcd(1000.00/7, 2)COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'=COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'142.860COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'MOREINFO="NONE"bcd(1000.00/7, 1)COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'=COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'142.900COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'MOREINFO="NONE"bcd(1000.00/7, 0)COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'=COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'143.000COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'MOREINFO="NONE"bcd(1000.00/7, -1)COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'=COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'140.000COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'MOREINFO="NONE"bcd(1000.00/7, -2)COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'=COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'100.000REMAP='Body'The number is rounded using banker's rounding (as specified by IEEE), which rounds to the nearest whole number, with ties being rounded to an even digit. For exampleCOLS='3' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='83*'COLNAME='C2' COLWIDTH='32*'COLNAME='C3' COLWIDTH='35*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'MOREINFO="NONE"bcd(12.335, 2)COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'=COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'12.34COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'MOREINFO="NONE"bcd(12.345, 2)COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'=COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'12.34COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'MOREINFO="NONE"bcd(12.355, 2)COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'=COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'12.36REMAP='NumChapter'ID='X-41225'Video functionsREMAP='Body'Borland C++ comes with a complete library of graphics functions, so you can produce onscreen charts and diagrams. The graphics functions are available for 16-bit DOS-only applications. This chapter briefly discusses video modes and windows, then explains how to program in graphics mode.REMAP='.Head1' RENDERAS="SECT1"Video modesREMAP='Body'Your PC has some type of video adapter. This can be a Monochrome Display Adapter (MDA) for text-only display, or it can be a graphics adapter, such as a Color/Graphics Adapter (CGA), an Enhanced Graphics Adapter (EGA), a Video Graphics Array adapter (VGA), or a Hercules Monochrome Graphics Adapter. Each adapter can operate in a variety of modes; the mode specifies whether the screen displays 80 or 40 columns (text mode only), the display resolution (graphics mode only), and the display type (color or black and white).REMAP='Body'The screen's operating mode is defined when your program calls one of the mode-defining functions ROLE='italic'textmode, initgraph, or ROLE='italic'setgraphmode.MARK='bullet'REMAP='Bullet1'In ROLE='italic'text mode, your PC's screen is divided into cells (80- or 40-columns wide by 25, 43, or 50 lines high). Each cell consists of a character and an attribute. The character is the displayed ASCII character; the attribute specifies ROLE='italic'how the character is displayed (its color, intensity, and so on). Borland C++ provides a full range of routines for manipulating the text screen, for writing text directly to the screen, and for controlling cell attributes.REMAP='Bullet1'In ROLE='italic'graphics mode, your PC's screen is divided into pixels; each pixel displays a single dot onscreen. The number of pixels (the resolution) depends on the type of video adapter connected to your system and the mode that adapter is in. You can use functions from Borland C++'s graphics library to create graphic displays onscreen: You can draw lines and shapes, fill enclosed areas with patterns, and control the color of each pixel.REMAP='Body'In text modes, the upper left corner of the screen is position (1,1), with x-coordinates increasing from left to right, and y-coordinates increasing from screen-top to screen-bottom. In graphics modes, the upper left corner is position (0,0), with the x- and y-coordinate values increasing in the same manner.REMAP='.Head1' RENDERAS="SECT1"Windows and viewportsREMAP='Body'Borland C++ provides functions for creating and managing windows on your screen in text mode (and viewports in graphics mode). If you aren't familiar with windows and viewports, you should read this brief overview. Borland C++'s window- and viewport-management functions are explained in the "Programming in graphics mode" section.REMAP='Body'A ROLE='italic'window is a rectangular area defined on your PC's video screen when it's in a text mode. When your program writes to the screen, its output is restricted to the active window. The rest of the screen (outside the window) remains untouched.REMAP='Body'The default window is a full-screen text window. Your program can change this default window to a text window smaller than the full screen (with a call to the ROLE='italic'window function, which specifies the window's position in terms of screen coordinates).REMAP='Body'In graphics mode, you can also define a rectangular area on your PC's video screen; this is a ROLE='italic'viewport. When your graphics program outputs drawings and so on, the viewport acts as the virtual screen. The rest of the screen (outside the viewport) remains untouched. You define a viewport in terms of screen coordinates with a call to the ROLE='italic'setviewport function.REMAP='Body'Except for these window- and viewport-defining functions, all ROLE='italic'coordinates for text-mode and graphics-mode functions are given in window- or viewport-relative terms, not in absolute screen coordinates. The upper left corner of the text-mode window is the coordinate origin, referred to as (1,1); in graphics modes, the viewport coordinate origin is position (0,0).REMAP='.Head1' RENDERAS="SECT1"Programming in graphics modeREMAP='Body'This section provides a brief summary of the functions used in graphics mode. For more detailed information about these functions, refer to LINKEND='X-14995' TYPE='XREF-TEXTCOPY'Chapter 4.REMAP='Body'Borland C++ provides a separate library of over 70 graphics functions, ranging from high-level calls (like ROLE='italic'setviewport, ROLE='italic'bar3d, and ROLE='italic'drawpoly) to bit-oriented functions (like ROLE='italic'getimage and ROLE='italic'putimage). The graphics library supports numerous fill and line styles, and provides several text fonts that you can size, justify, and orient horizontally or vertically.REMAP='Body'These functions are in the library file GRAPHICS.LIB, and they are prototyped in the header file graphics.h. In addition to these two files, the graphics package includes graphics device drivers (*.BGI files) and stroked character fonts (*.CHR files); these files are discussed in following sections.REMAP='Body'To use the graphics functions with the BCC.EXE command-line compiler, you have to list GRAPHICS.LIB on the command line. For example, if your program MYPROG.C uses graphics, the BCC command line would beFORMAT="LINESPECIFIC"MOREINFO="NONE"BCC MYPROG GRAPHICS.LIBREMAP='Body'See the TARGETDOCENT='xref.graphics.mif.bcug' LOCALINFO='X-41776' nd.ent='xref.graphics.mif.bcug' nd.pub='' nd.sys='bc_ug' nn.not='EBT-BOOK' nn.pub='EBT' nn.sys=''Borland C++ User's Guide discussion of TargetExpert for a description of DOS programming with graphics. When you make your program, the linker automatically links in the Borland C++ graphics library.REMAP='.ScanWord'NoteREMAP='Body'Because graphics functions use ROLE='BOLD'far pointers, graphics aren't supported in the tiny memory model.REMAP='Body'There is only one graphics library, not separate versions for each memory model (in contrast to the standard libraries CS.LIB, CC.LIB, CM.LIB, and so on, which are memory-model specific). Each function in GRAPHICS.LIB is a ROLE='bold'far function, and those graphics functions that take pointers take ROLE='bold'far pointers. For these functions to work correctly, it is important that you #include graphics.h in every module that uses graphics.REMAP='.Head2' RENDERAS="SECT2"The graphics library functionsREMAP='Body'There are seven categories of Borland C++ graphics functions:MARK='bullet'REMAP='Bullet1'Graphics system controlREMAP='Bullet1'Drawing and fillingREMAP='Bullet1'Manipulating screens and viewportsREMAP='Bullet1'Text outputREMAP='Bullet1'Color controlREMAP='Bullet1'Error handlingREMAP='Bullet1'State queryREMAP='.Head3' RENDERAS="SECT3"Graphics system controlREMAP='BodyNoLead'Here's a summary of the graphics system control:COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='72*'COLNAME='C2' COLWIDTH='300*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'FunctionCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'DescriptionVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'closegraphCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Shuts down the graphics system.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'detectgraphCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Checks the hardware and determines which graphics driver to use; recommends a mode.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'graphdefaultsCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Resets all graphics system variables to their default settings.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'_graphfreememCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Deallocates graphics memory; hook for defining your own routine.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'_graphgetmemCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Allocates graphics memory; hook for defining your own routine.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getgraphmodeCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Returns the current graphics mode.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getmoderangeCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Returns lowest and highest valid modes for specified driver.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'initgraphCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Initializes the graphics system and puts the hardware into graphics mode.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'installuserdriverCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Installs a vendor-added device driver to the BGI device driver table.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'installuserfontCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Loads a vendor-added stroked font file to the BGI character file table.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'registerbgidriverCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Registers a linked-in or user-loaded driver file for inclusion at link time.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'restorecrtmodeCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Restores the original (pre-ROLE='italic'initgraph) screen mode.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'setgraphbufsizeCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Specifies size of the internal graphics buffer.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'setgraphmodeCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Selects the specified graphics mode, clears the screen, and restores all defaults.REMAP='Body'Borland C++'s graphics package provides graphics drivers for the following graphics adapters (and true compatibles):MARK='bullet'REMAP='Bullet1'Color/Graphics Adapter (CGA)REMAP='BulletNoLead1'Multi-Color Graphics Array (MCGA)REMAP='BulletNoLead1'Enhanced Graphics Adapter (EGA)REMAP='BulletNoLead1'Video Graphics Array (VGA)REMAP='BulletNoLead1'Hercules Graphics AdapterREMAP='BulletNoLead1'AT&T 400-line Graphics AdapterREMAP='BulletNoLead1'3270 PC Graphics AdapterREMAP='BulletNoLead1'IBM 8514 Graphics AdapterREMAP='Body'To start the graphics system, you first call the ROLE='italic'initgraph function. ROLE='italic'initgraph loads the graphics driver and puts the system into graphics mode.REMAP='Body'You can tell ROLE='italic'initgraph to use a particular graphics driver and mode, or to autodetect the attached video adapter at run time and pick the corresponding driver. If you tell ROLE='italic'initgraph to autodetect, it calls ROLE='italic'detectgraph to select a graphics driver and mode. If you tell ROLE='italic'initgraph to use a particular graphics driver and mode, you must be sure that the hardware is present. If you force ROLE='italic'initgraph to use hardware that is not present, the results will be unpredictable.REMAP='Body'Once a graphics driver has been loaded, you can use the ROLE='italic'gerdrivername function to find out the name of the driver and the ROLE='italic'getmaxmode function to find out how many modes a driver supports. ROLE='italic'getgraphmode will tell you which graphics mode you are currently in. Once you have a mode number, you can find out the name of the mode with ROLE='italic'getmodename. You can change graphics modes with ROLE='italic'setgraphmode and return the video mode to its original state (before graphics was initialized) with ROLE='italic'restorecrtmode. restorecrtmode returns the screen to text mode, but it does not close the graphics system (the fonts and drivers are still in memory).REMAP='Body'ROLE='italic'graphdefaults resets the graphics state's settings (viewport size, draw color, fill color and pattern, and so on) to their default values.REMAP='Body'ROLE='italic'installuserdriver and ROLE='italic'installuserfont let you add new device drivers and fonts to your BGI.REMAP='Body'Finally, when you're through using graphics, call ROLE='italic'closegraph to shut down the graphics system. ROLE='italic'closegraph unloads the driver from memory and restores the original video mode (via ROLE='italic'restorecrtmode).REMAP='.Head3' RENDERAS="SECT3"A more detailed discussionREMAP='BodyNoLead'The previous discussion provided an overview of how ROLE='italic'initgraph operates. In the following paragraphs, we describe the behavior ofROLE='italic' initgraph, _graphgetmem, and ROLE='italic'_graphfreemem in some detail.REMAP='Body'Normally, the ROLE='italic'initgraph routine loads a graphics driver by allocating memory for the driver, then loading the appropriate .BGI file from disk. As an alternative to this dynamic loading scheme, you can link a graphics driver file (or several of them) directly into your executable program file. You do this by first converting the .BGI file to an .OBJ file (using the BGIOBJ utilityROLE='bold'name='mdash' font=symbol charset=fontspecific code=190
descr='[mdash]'see UTILS.TXT, included with your distribution disks), then placing calls to ROLE='italic'registerbgidriver in your source code (before the call to ROLE='italic'initgraph) to ROLE='italic'register the graphics driver(s). When you build your program, you need to link the .OBJ files for the registered drivers.REMAP='Body'After determining which graphics driver to use (via ROLE='italic'detectgraph), ROLE='italic'initgraph checks to see if the desired driver has been registered. If so, ROLE='BOLD'initgraph uses the registered driver directly from memory. Otherwise, ROLE='italic'initgraph allocates memory for the driver and loads the .BGI file from disk.REMAP='.ScanBold'ROLE='bold'NoteREMAP='Body'Using ROLE='italic'registerbgidriver is an advanced programming technique, not recommended for novice programmers. This function is described in more detail in LINKEND='X-14995' TYPE='XREF-TEXTCOPY'Chapter 4.REMAP='Body'During run time, the graphics system might need to allocate memory for drivers, fonts, and internal buffers. If this is necessary, it calls ROLE='italic'_graphgetmem to allocate memory and ROLE='italic'_graphfreemem to free memory. By default, these routines call ROLE='italic'malloc and ROLE='italic'free, respectively.REMAP='Body'You can override this default behavior by defining your own ROLE='italic'_graphgetmem and ROLE='italic'_graphfreemem functions. By doing this, you can control graphics memory allocation yourself. You must, however, use the same names for your own versions of these memory-allocation routines: they will override the default functions with the same names that are in the standard C libraries.REMAP='.ScanBold'ROLE='bold'NoteREMAP='Body'If you provide your own ROLE='italic'_graphgetmem or ROLE='italic'_graphfreemem, you might get a "duplicate symbols" warning message. Just ignore the warning.REMAP='.Head3' RENDERAS="SECT3"Drawing and fillingREMAP='BodyNoLead'Here's a quick summary of the drawing and filling functions:COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='85*'COLNAME='C2' COLWIDTH='276*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'ROLE='BOLD'Drawing functionsCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'DescriptionVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'arcCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Draws a circular arc.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'circleCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Draws a circle.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'drawpolyCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Draws the outline of a polygon.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'ellipseCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Draws an elliptical arc.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getarccoordsCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Returns the coordinates of the last call to ROLE='italic'arc or ROLE='italic'ellipse.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getaspectratioCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Returns the aspect ratio of the current graphics mode.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getlinesettingsCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Returns the current line style, line pattern, and line thickness.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'lineCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Draws a line from (ROLE='BOLD'x0,ROLE='BOLD'y0) to (ROLE='BOLD'x1,ROLE='BOLD'y1).COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'linerelCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Draws a line to a point some relative distance from the current position (CP).COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'linetoCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Draws a line from the current position (CP) to (ROLE='italic'x,y).COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'movetoCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Moves the current position (CP) to (ROLE='italic'x,y).COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'moverelCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Moves the current position (CP) a relative distance.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'rectangleCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Draws a rectangle.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'setaspectratioCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Changes the default aspect ratio-correction factor.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'setlinestyleCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Sets the current line width and style.REMAP='Body'COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='96*'COLNAME='C2' COLWIDTH='276*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'Filling functionsCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'DescriptionVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'barCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Draws and fills a bar.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'bar3dCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Draws and fills a 3-D bar.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'fillellipseCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Draws and fills an ellipse.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'fillpolyCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Draws and fills a polygon.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'floodfillCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Flood-fills a bounded region.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getfillpatternCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Returns the user-defined fill pattern.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getfillsettingsCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Returns information about the current fillpattern and color.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'piesliceCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Draws and fills a pie slice.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'sectorCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Draws and fills an elliptical pie slice.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'setfillpatternCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Selects a user-defined fill pattern.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'setfillstyleCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Sets the fill pattern and fill color.REMAP='Body'With Borland C++'s drawing and painting functions, you can draw colored lines, arcs, circles, ellipses, rectangles, pie slices, two- and three-dimensional bars, polygons, and regular or irregular shapes based on combinations of these. You can fill any bounded shape (or any region surrounding such a shape) with one of eleven predefined patterns, or your own user-defined pattern. You can also control the thickness and style of the drawing line, and the location of the current position (CP).REMAP='Body'You draw lines and unfilled shapes with the functions ROLE='italic'arc, circle, drawpoly, ellipse, line, linerel, lineto, and ROLE='italic'rectangle. You can fill these shapes with ROLE='italic'floodfill, or combine drawing and filling into one step withROLE='italic' bar, bar3d, fillellipse, fillpoly, pieslice, and ROLE='italic'sector. You use ROLE='italic'setlinestyle to specify whether the drawing line (and border line for filled shapes) is thick or thin, and whether its style is solid, dotted, and so forth, or some other line pattern you've defined. You can select a predefined fill pattern with ROLE='italic'setfillstyle, and define your own fill pattern with ROLE='italic'setfillpattern. You move the CP to a specified location with ROLE='italic'moveto, and move it a specified displacement with ROLE='italic'moverel.REMAP='Body'To find out the current line style and thickness, call ROLE='italic'getlinesettings. For information about the current fill pattern and fill color, call ROLE='italic'getfillsettings; you can get the user-defined fill pattern with ROLE='italic'getfillpattern.REMAP='Body'You can get the aspect ratio (the scaling factor used by the graphics system to make sure circles come out round) with ROLE='italic'getaspectratio, and the coordinates of the last drawn arc or ellipse with ROLE='italic'getarccoords. If your circles aren't perfectly round, use ROLE='italic'setaspectratio to correct them.REMAP='.Head3' RENDERAS="SECT3"Manipulating the screen and viewportREMAP='BodyNoLead'Here's a quick summary of the screen-, viewport-, image-, and pixel-manipulation functionsREMAP='Body'COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='62*'COLNAME='C2' COLWIDTH='264*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'FunctionCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'DescriptionVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C2' NAMEST='C1' ROTATE='0'REMAP='Tbl.Subhead'Screen manipulationCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'cleardeviceCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Clears the screen (active page).COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'setactivepageCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Sets the active page for graphics output.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'setvisualpageCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Sets the visual graphics page number.COLNAME='C1' MOREROWS='0' NAMEEND='C2' NAMEST='C1' ROTATE='0'REMAP='Tbl.Subhead'Viewport manipulationCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'clearviewportCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Clears the current viewport.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getviewsettingsCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Returns information about the current viewport.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'setviewport COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Sets the current output viewport for graphics output.COLNAME='C1' MOREROWS='0' NAMEEND='C2' NAMEST='C1' ROTATE='0'REMAP='Tbl.Subhead'Image manipulationCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getimageCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Saves a bit image of the specified region to memory.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'imagesizeCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Returns the number of bytes required to store a rectangular region of the screen.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'putimageCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Puts a previously saved bit image onto the screen.COLNAME='C1' MOREROWS='0' NAMEEND='C2' NAMEST='C1' ROTATE='0'REMAP='Tbl.Subhead'Pixel manipulationCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getpixelCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Gets the pixel color at (ROLE='italic'x,y).COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'putpixelCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Plots a pixel at (ROLE='italic'x,y).REMAP='Body'Besides drawing and painting, the graphics library offers several functions for manipulating the screen, viewports, images, and pixels. You can clear the whole screen in one step with a call to ROLE='italic'cleardevice; this routine erases the entire screen and homes the CP in the viewport, but leaves all other graphics system settings intact (the line, fill, and text styles; the palette; the viewport settings; and so on).REMAP='Body'Depending on your graphics adapter, your system has between one and four screen-page buffer; these are areas in memory where individual whole-screen images are stored dot-by-dot. You can specify the active screen page (where graphics functions place their output) with ROLE='italic'setactivepage and the visual page (the one displayed onscreen) with ROLE='italic'setvisualpage.REMAP='Body'Once your screen is in graphics mode, you can define a viewport (a rectangular "virtual screen") on your screen with a call to ROLE='italic'setviewport. You define the viewport's position in terms of absolute screen coordinates and specify whether clipping is on (active) or off. You clear the viewport with ROLE='italic'clearviewport. To find out the current viewport's absolute screen coordinates and clipping status, call ROLE='italic'getviewsettings.REMAP='Body'You can capture a portion of the onscreen image with ROLE='italic'getimage, call ROLE='italic'imagesize to calculate the number of bytes required to store that captured image in memory, then put the stored image back on the screen (anywhere you want) with ROLE='italic'putimage.REMAP='Body'The coordinates for all output functions (drawing, filling, text, and so on) are viewport-relative.REMAP='Body'You can also manipulate the color of individual pixels with the functions ROLE='italic'getpixel (which returns the color of a given pixel) and ROLE='italic'putpixel (which plots a specified pixel in a given color).REMAP='.Head3' RENDERAS="SECT3"Text output in graphics modeREMAP='BodyNoLead'Here's a quick summary of the graphics-mode text output functions:COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='66*'COLNAME='C2' COLWIDTH='246*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'FunctionCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'DescriptionVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'gettextsettings COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Returns the current text font, direction, size, and justification.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'outtext COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Sends a string to the screen at the current position (CP).COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'outtextxy COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Sends a string to the screen at the specified position.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'registerbgifontCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Registers a linked-in or user-loaded font.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'settextjustify COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Sets text justification values used by outtext and outtextxy.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'settextstyle COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Sets the current text font, style, and character magnification factor.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'setusercharsizeCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Sets width and height ratios for stroked fonts.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'textheight COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Returns the height of a string in pixels.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'textwidth COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Returns the width of a string in pixels.REMAP='Body'The graphics library includes an 8X8 bit-mapped font and several stroked fonts for text output while in graphics mode.MARK='bullet'REMAP='Bullet1'In a ROLE='italic'bit-mapped font, each character is defined by a matrix of pixels.REMAP='Bullet1'In a ROLE='italic'stroked font, each character is defined by a series of vectors that tell the graphics system how to draw that character.REMAP='Body'The advantage of using a stroked font is apparent when you start to draw large characters. Since a stroked font is defined by vectors, it retains good resolution and quality when the font is enlarged. On the other hand, when you enlarge a bit-mapped font, the matrix is multiplied by a scaling factor; as the scaling factor becomes larger, the characters' resolution becomes coarser. For small characters, the bit-mapped font should be sufficient, but for larger text you should select a stroked font.REMAP='Body'You output graphics text by calling either ROLE='italic'outtext or ROLE='italic'outtextxy, and you control the justification of the output text (with respect to the CP) with ROLE='italic'settextjustify. You choose the character font, direction (horizontal or vertical), and size (scale) with ROLE='italic'settextstyle. You can find out the current text settings by calling ROLE='italic'gettextsettings, which returns the current text font, justification, magnification, and direction in a ROLE='italic'textsettings structure. ROLE='italic'setusercharsize lets you modify the character width and height of stroked fonts.REMAP='Body'If clipping is ROLE='italic'on, all text strings output by ROLE='italic'outtext and ROLE='italic'outtextxy are clipped at the viewport borders. If clipping is ROLE='italic'off, these functions throw away bit-mapped font output if any part of the text string would go off the screen edge; stroked font output is truncated at the screen edges.REMAP='Body'To determine the onscreen size of a given text string, call ROLE='italic'textheight (which measures the string's height in pixels) and ROLE='italic'textwidth (which measures its width in pixels).REMAP='Body'The default 8x8 bit-mapped font is built into the graphics package, so it's always available at run time. The stroked fonts are each kept in a separate .CHR file; they can be loaded at run time or converted to .OBJ files (with the BGIOBJ utility) and linked into your .EXE file.REMAP='Body'Normally, the ROLE='italic'settextstyle routine loads a font file by allocating memory for the font, then loading the appropriate .CHR file from disk. As an alternative to this dynamic loading scheme, you can link a character font file (or several of them) directly into your executable program file. You do this by first converting the .CHR file to an .OBJ file (using the BGIOBJ utilityname='mdash' font=symbol charset=fontspecific code=190
descr='[mdash]'you can read about it in UTILS.TXT, the online documentation included with your distribution disks), then placing calls to ROLE='italic'registerbgifont in your source code (before the call to ROLE='italic'settextstyle) to ROLE='italic'register the character font(s). When you build your program, you need to link in the .OBJ files for the stroked fonts you register.REMAP='.ScanBold'ROLE='bold'NoteREMAP='Body'Using ROLE='italic'registerbgifont is an advanced programming technique, not recommended for novice programmers. This function is described in more detail in UTILS.TXT, which is included with your distribution disks.REMAP='.Head3' RENDERAS="SECT3"Color controlREMAP='BodyNoLead'Here's a quick summary of the color control functions:COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='63*'COLNAME='C2' COLWIDTH='270*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'FunctionCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'DescriptionVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C2' NAMEST='C1' ROTATE='0'REMAP='Tbl.Subhead'Get color informationCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getbkcolor COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Returns the current background color.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getcolor COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Returns the current drawing color.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getdefaultpaletteCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Returns the palette definition structure.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getmaxcolorCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Returns the maximum color value available in the current graphics mode.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getpalette COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Returns the current palette and its size.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getpalettesizeCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Returns the size of the palette look-up table.COLNAME='C1' MOREROWS='0' NAMEEND='C2' NAMEST='C1' ROTATE='0'REMAP='Tbl.Subhead'Set one or more colorsCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'setallpalette COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Changes all palette colors as specified.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'setbkcolor COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Sets the current background color.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'setcolor COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Sets the current drawing color.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'setpalette COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Changes one palette color as specified by its arguments.REMAP='Body'Before summarizing how these color control functions work, we first present a basic description of how colors are actually produced on your graphics screen.REMAP='.Head3' RENDERAS="SECT3"Pixels and palettesREMAP='BodyNoLead'The graphics screen consists of an array of pixels; each pixel produces a single (colored) dot onscreen. The pixel's value does not specify the precise color directly; it is an index into a color table called a ROLE='italic'palette. The palette entry corresponding to a given pixel value contains the exact color information for that pixel.REMAP='Body'This indirection scheme has a number of implications. Though the hardware might be capable of displaying many colors, only a subset of those colors can be displayed at any given time. The number of colors in this subset is equal to the number of entries in the palette (the palette's ROLE='italic'size). For example, on an EGA, the hardware can display 64 different colors, but only 16 of them at a time; the EGA palette's ROLE='italic'size is 16.REMAP='Body'The ROLE='italic'size of the palette determines the range of values a pixel can assume, from 0 to (ROLE='italic'size - 1). ROLE='italic'getmaxcolor returns the highest valid pixel value (ROLE='italic'size - 1) for the current graphics driver and mode.REMAP='Body'When we discuss the Borland C++'s graphics functions, we often use the term ROLE='italic'color, such as the current drawing color, fill color and pixel color. In fact, this color is a pixel's value: it's an index into the palette. Only the palette determines the true color on the screen. By manipulating the palette, you can change the actual color displayed on the screen even though the pixel values (drawing color, fill color, and so on) haven't changed.REMAP='.Head3' RENDERAS="SECT3"Background and drawing colorREMAP='Body'The ROLE='italic'background color always corresponds to pixel value 0. When an area is cleared to the background color, that area's pixels are set to 0.REMAP='Body'The ROLE='italic'drawing color is the value to which pixels are set when lines are drawn. You choose a drawing color with MOREINFO="NONE"setcolor(n), where n is a valid pixel value for the current palette.REMAP='.Head3' RENDERAS="SECT3"Color control on a CGAREMAP='BodyNoLead'Due to graphics hardware differences, how you actually control color differs quite a bit between CGA and EGA, so they're presented separately. Color control on the AT&T driver, and the lower resolutions of the MCGA driver is similar to CGA.REMAP='BodyNoLead'On the CGA, you can choose to display your graphics in low resolution (320x200), which allows you to use four colors, or in high resolution (640x200), in which you can use two colors.REMAP='.Head4' RENDERAS="SECT4"CGA low resolutionREMAP='BodyNoLead'In the low-resolution modes, you can choose from four predefined four-color palettes. In any of these palettes, you can set only the first palette entry; entries 1, 2, and 3 are fixed. The first palette entry (color 0) is the background color; it can be any one of the 16 available colors (see the following table of CGA background colors).REMAP='BodyNoLead'You choose which palette you want by selecting the appropriate mode (CGAC0, CGAC1, CGAC2, CGAC3); these modes use color palette 0 through color palette 3, as detailed in the following table. The CGA drawing colors and the equivalent constants are defined in graphics.h.COLS='4' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='48*'COLNAME='C2' COLWIDTH='108*'COLNAME='C3' COLWIDTH='108*'COLNAME='C4' COLWIDTH='108*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='1' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'PaletteREMAP='Tbl.Heading'numberCOLNAME='C2' MOREROWS='0' NAMEEND='C4' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading.Center'Constant assigned to color number (pixel value):COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading.Center'1COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Heading.Center'2COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Heading.Center'3VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'CGA_LIGHTGREENCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'CGA_LIGHTREDCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'CGA_YELLOWCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'CGA_LIGHTCYANCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'CGA_LIGHTMAGENTACOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'CGA_WHITECOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'CGA_GREENCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'CGA_REDCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'CGA_BROWNCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'3COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'CGA_CYANCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'CGA_MAGENTACOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'CGA_LIGHTGRAYREMAP='Body'To assign one of these colors as the CGA drawing color, call ROLE='bold'setcolor with either the color number or the corresponding constant name as an argument; for example, if you're using palette 3 and you want to use cyan as the drawing color:FORMAT="LINESPECIFIC"MOREINFO="NONE"setcolor(1);REMAP='Body'orFORMAT="LINESPECIFIC"MOREINFO="NONE"setcolor(CGA_CYAN);REMAP='Body'The available CGA background and foreground colors, defined in graphics.h, are listed in the following table:COLS='4' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='73*'COLNAME='C2' COLWIDTH='76*'COLNAME='C3' COLWIDTH='72*'COLNAME='C4' COLWIDTH='82*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading.Center'Numeric valueCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'Symbolic nameCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Heading.Center'Numeric valueCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Heading'Symbolic nameVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'BLACKCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body' 8COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'DARKGRAYCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'BLUECOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body' 9COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'LIGHTBLUECOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'GREENCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'10COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'LIGHTGREENCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'3COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'CYANCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'11COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'LIGHTCYANCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'4COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'REDCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'12COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'LIGHTREDCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'5COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'MAGENTACOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'13COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'LIGHTMAGENTACOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'6COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'BROWNCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'14COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'YELLOWCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'7COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'LIGHTGRAYCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'15COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'WHITEREMAP='Body'To assign one of these colors to the CGA background color, use ROLE='italic'setbkcolor(color), where color is one of the entries in the preceding table. For CGA, this color is not a pixel value (palette index); it directly specifies the actual color to be put in the first palette entry.REMAP='.Head4' RENDERAS="SECT4"CGA high resolutionREMAP='BodyNoLead'In high-resolution mode (640x200), the CGA displays two colors: a black background and a colored foreground. Pixels can take on values of either 0 or 1. Because of a quirk in the CGA itself, the foreground color is actually what the hardware thinks of as its background color; you set it with the ROLE='italic'setbkcolor routine. (Strange but true.)REMAP='Body'The colors available for the colored foreground are those listed in the preceding table. The CGA uses this color to display all pixels whose value equals 1.REMAP='Body'The modes that behave in this way are CGAHI, MCGAMED, MCGAHI, ATT400MED, and ATT400HI.REMAP='.Head4' RENDERAS="SECT4"CGA palette routinesREMAP='BodyNoLead'Because the CGA palette is predetermined, you shouldn't use the setallpalette routine on a CGA. Also, you shouldn't use ROLE='italic'setpalette(index, actual_color), except for ROLE='italic'index = 0. (This is an alternate way to set the CGA background color to ROLE='italic'actual_color.)REMAP='.Head3' RENDERAS="SECT3"Color control on the EGA and VGAREMAP='BodyNoLead'On the EGA, the palette contains 16 entries from a total of 64 possible colors; each entry is user-settable. You can retrieve the current palette with ROLE='italic'getpalette, which fills in a structure with the palette's size (16) and an array of the actual palette entries (the "hardware color numbers" stored in the palette). You can change the palette entries individually with ROLE='italic'setpalette, or all at once with ROLE='italic'setallpalette.REMAP='Body'The default EGA palette corresponds to the 16 CGA colors, as given in the previous color table: black is in entry 0, blue in entry 1, ..., white in entry 15. There are constants defined in graphics.h that contain the corresponding hardware color values: these are EGA_BLACK, EGA_WHITE, and so on. You can also get these values with ROLE='italic'getpalette.REMAP='Body'The ROLE='italic'setbkcolor(color) routine behaves differently on an EGA than on a CGA. On an EGA, ROLE='italic'setbkcolor copies the actual color value that's stored in entry #ROLE='italic'color into entry #0.REMAP='Body'As far as colors are concerned, the VGA driver behaves like the EGA driver; it just has higher resolution (and smaller pixels).REMAP='.Head3' RENDERAS="SECT3"Error handling in graphics modeREMAP='BodyNoLead'Here's a quick summary of the graphics-mode error-handling functions:COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='57*'COLNAME='C2' COLWIDTH='161*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'FunctionCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'DescriptionVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'grapherrormsgCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Returns an error message string for the specified error code.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'graphresultCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Returns an error code for the last graphics operation that encountered a problem.REMAP='Body'If an error occurs when a graphics library function is called (such as a font requested with ROLE='italic'settextstyle not being found), an internal error code is set. You retrieve the error code for the last graphics operation that reported an error by calling ROLE='italic'graphresult. A call to ROLE='italic'grapherrormsg(graphresult()) returns the error strings listed in the following table.REMAP='Body'The error return-code accumulates, changing only when a graphics function reports an error. The error return code is reset to 0 only when ROLE='italic'initgraph executes successfully or when you call ROLE='italic'graphresult. Therefore, if you want to know which graphics function returned which error, you should store the value of ROLE='italic'graphresult into a temporary variable and then test it.COLS='3' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='60*'COLNAME='C2' COLWIDTH='106*'COLNAME='C3' COLWIDTH='157*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading.Center'Error codeCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'ROLE='bold:italic'graphics_errors constantCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Heading'Corresponding error message stringVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grOkCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'No errorCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-1COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grNoInitGraphCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'(BGI) graphics not installed (use ROLE='BOLD'initgraph)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-2COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grNotDetectedCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Graphics hardwaren't detectedCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-3COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grFileNotFoundCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Device driver file not foundCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-4COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grInvalidDriverCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Invalid device driver fileCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-5COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grNoLoadMemCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Not enough memory to load driverCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-6COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grNoScanMemCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Out of memory in scan fillCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-7COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grNoFloodMemCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Out of memory in flood fillCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-8COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grFontNotFoundCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Font file not foundCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-9COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grNoFontMemCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Not enough memory to load fontCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-10COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grInvalidModeCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Invalid graphics mode for selected driverCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-11COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grErrorCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Graphics errorCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-12COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grIOerrorCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Graphics I/O errorCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-13COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grInvalidFontCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Invalid font fileCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-14COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grInvalidFontNumCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Invalid font numberCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-15COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grInvalidDeviceNumCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Invalid device numberCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-18COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grInvalidVersionCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Invalid version of fileREMAP='.Head3' RENDERAS="SECT3"State queryREMAP='BodyNoLead'The following table summarizes the graphics mode state query functions:TOCENTRY="1"REMAP='TblCap'Graphics mode state query functions COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='67*'COLNAME='C2' COLWIDTH='231*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'FunctionCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'ReturnsVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getarccoords COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Information about the coordinates of the last call to ROLE='italic'arc or ROLE='italic'ellipse.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getaspectratio COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Aspect ratio of the graphics screen.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getbkcolor COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Current background color.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getcolor COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Current drawing color.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getdrivernameCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Name of current graphics driver.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getfillpattern COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'User-defined fill pattern.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getfillsettings COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Information about the current fill pattern and color.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getgraphmode COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Current graphics mode.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getlinesettings COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Current line style, line pattern, and line thickness.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getmaxcolorCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Current highest valid pixel value.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getmaxmodeCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Maximum mode number for current driver.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getmaxx COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Current ROLE='italic'x resolution.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getmaxy COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Current ROLE='italic'y resolution.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getmodenameCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Name of a given driver mode.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getmoderangeCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Mode range for a given driver.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getpalette COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Current palette and its size.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getpixel COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Color of the pixel at ROLE='italic'x,ROLE='italic'y.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'gettextsettings COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Current text font, direction, size, and justification.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getviewsettings COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Information about the current viewport.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'getx COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'x coordinate of the current position (CP).COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'gety COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'y coordinate of the current position (CP).REMAP='Body'Each of Borland C++'s graphics function categories has at least one state query function. These functions are mentioned under their respective categories and also covered here. Each of the Borland C++ graphics state query functions is named get something (except in the error-handling category). Some of them take no argument and return a single value representing the requested information; others take a pointer to a structure defined in graphics.h, fill that structure with the appropriate information, and return no value.REMAP='Body'The state query functions for the graphics system control category are ROLE='italic'getgraphmode, ROLE='italic'getmaxmode, and ROLE='italic'getmoderange: the first returns an integer representing the current graphics driver and mode, the second returns the maximum mode number for a given driver, and the third returns the range of modes supported by a given graphics driver. ROLE='italic'getmaxx and ROLE='italic'getmaxy return the maximum x and y screen coordinates for the current graphics mode.REMAP='Body'The drawing and filling state query functions are ROLE='italic'getarccoords, getaspectratio, getfillpattern, getfillsettings, and ROLE='italic'getlinesettings. ROLE='italic'getarccoords fills a structure with coordinates from the last call to ROLE='italic'arc or ROLE='italic'ellipse; getaspectratio tells the current mode's aspect ratio, which the graphics system uses to make circles come out round. ROLE='italic'getfillpattern returns the current user-defined fill pattern. ROLE='italic'getfillsettings fills a structure with the current fill pattern and fill color. ROLE='italic'getlinesettings fills a structure with the current line style (solid, dashed, and so on), line width (normal or thick), and line pattern.REMAP='Body'In the screen- and viewport-manipulation category, the state query functions are ROLE='italic'getviewsettings, getx, gety, and ROLE='italic'getpixel. When you have defined a viewport, you can find out its absolute screen coordinates and whether clipping is active by calling ROLE='italic'getviewsettings, which fills a structure with the information. getx and gety return the (viewport-relative) ROLE='italic'x- and ROLE='italic'y-coordinates of the CP. ROLE='italic'getpixel returns the color of a specified pixel.REMAP='Body'The graphics mode text-output function category contains one all-inclusive state query function: ROLE='italic'gettextsettings. This function fills a structure with information about the current character font, the direction in which text will be displayed (horizontal or bottom-to-top vertical), the character magnification factor, and the text-string justification (both horizontal and vertical).REMAP='Body'Borland C++'s color-control function category includes four state query functions. ROLE='italic'getbkcolor returns the current background color, and getcolor returns the current drawing color. ROLE='italic'getpalette fills a structure with the size of the current drawing palette and the palette's contents. ROLE='italic'getmaxcolor returns the highest valid pixel value for the current graphics driver and mode (palette size -1).REMAP='Body'Finally, ROLE='italic'getmodename and ROLE='italic'getdrivername return the name of a given driver mode and the name of the current graphics driver, respectively.REMAP='NumChapter'ID='X-14995'Borland graphics interfaceREMAP='Body'This chapter presents a description, in alphabetical order, of the Borland C++ graphics functions. The graphics functions are available only for 16-bit DOS applications.arcMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Draws an arc.SyntaxFORMAT="LINESPECIFIC"MOREINFO="NONE" void far arc(int x, int y, int stangle, int endangle, int radius);RemarksREMAP='BodyNoLead'ROLE='italic'arc draws a circular arc in the current drawing color centered at (ROLE='italic'x,y) with a radius given by ROLE='italic'radius. The arc travels from ROLE='italic'stangle to ROLE='italic'endangle. If ROLE='italic'stangle equals 0 and ROLE='italic'endangle equals 360, the call to ROLE='italic'arc draws a complete circle.REMAP='Body'The angle for arc is reckoned counterclockwise, with 0 degrees at 3 o'clock, 90 degrees at 12 o'clock, and so on.REMAP='Body'The ROLE='italic'linestyle parameter does not affect arcs, circles, ellipses, or pie slices. Only the ROLE='italic'thickness parameter is used.REMAP='Body'If you're using a CGA in high resolution mode or a monochrome graphics adapter, the examples in online Help that show how to use graphics functions might not produce the expected results. If your system runs on a CGA or monochrome adapter, pass the value 1 to those functions that alter the fill or drawing color (ROLE='italic'setcolor, setfillstyle, and ROLE='italic'setlinestyle, for example), instead of a symbolic color constant (defined in graphics.h).Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'circle, ellipse, fillellipse, getarccoords, getaspectratio, graphresult, pieslice, sector barMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Draws a two-dimensional bar.SyntaxFORMAT="LINESPECIFIC"MOREINFO="NONE" void far bar(int left, int top, int right, int bottom);RemarksREMAP='BodyNoLead'ROLE='italic'bar draws a filled-in, rectangular, two-dimensional bar. The bar is filled using the current fill pattern and fill color. ROLE='italic'bar does not outline the bar; to draw an outlined two-dimensional bar, use ROLE='italic'bar3d with ROLE='italic'depth equal to 0.REMAP='Body'The upper left and lower right corners of the rectangle are given by (ROLE='italic'left, top) and (ROLE='italic'right, bottom), respectively. The coordinates refer to pixels.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'bar3d, rectangle, setcolor, setfillstyle, setlinestyle bar3dMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Draws a three-dimensional bar.SyntaxFORMAT="LINESPECIFIC"MOREINFO="NONE" void far bar3d(int left, int top, int right, int bottom, int depth, int topflag);RemarksREMAP='BodyNoLead'ROLE='italic'bar3d draws a three-dimensional rectangular bar, then fills it using the current fill pattern and fill color. The three-dimensional outline of the bar is drawn in the current line style and color. The bar's depth in pixels is given by ROLE='italic'depth. The ROLE='italic'topflag parameter governs whether a three-dimensional top is put on the bar. If ROLE='italic'topflag is nonzero, a top is put on; otherwise, no top is put on the bar (making it possible to stack several bars on top of one another).REMAP='Body'The upper left and lower right corners of the rectangle are given by (ROLE='italic'left, top) and (ROLE='italic'right, bottom), respectively.REMAP='Body'To calculate a typical depth for ROLE='italic'bar3d, take 25% of the width of the bar, like this:FORMAT="LINESPECIFIC"bar3d(left,top,right,bottom, (right-left)/4,1);Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'bar, rectangle, setcolor, setfillstyle, setlinestyle circleMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Draws a circle of the given radius with its center at (ROLE='italic'x,y).SyntaxFORMAT="LINESPECIFIC"MOREINFO="NONE" void far circle(int x, int y, int radius);RemarksREMAP='BodyNoLead'ROLE='italic'circle draws a circle in the current drawing color with its center at (ROLE='italic'x,y) and the radius given by ROLE='italic'radius.REMAP='.ScanWord'NoteREMAP='Body'The ROLE='italic'linestyle parameter does not affect arcs, circles, ellipses, or pie slices. Only the ROLE='italic'thickness parameter is used.REMAP='Body'If your circles are not perfectly round, adjust the aspect ratio.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'arc, ellipse, fillellipse, getaspectratio, sector, setaspectratio cleardeviceMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Clears the graphics screen.SyntaxFORMAT="LINESPECIFIC"ROLE='italic' void far cleardevice(void);RemarksREMAP='BodyNoLead'ROLE='italic'cleardevice erases (that is, fills with the current background color) the entire graphics screen and moves the CP (current position) to home (0,0).Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'clearviewport clearviewportMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Clears the current viewport.SyntaxFORMAT="LINESPECIFIC"MOREINFO="NONE" void far clearviewport(void);RemarksREMAP='BodyNoLead'ROLE='italic'clearviewport erases the viewport and moves the CP (current position) to home (0,0), relative to the viewport.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'cleardevice, getviewsettings, setviewport closegraphMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Shuts down the graphics system.SyntaxMOREINFO="NONE" void far closegraph(void);RemarksREMAP='BodyNoLead'ROLE='italic'closegraph deallocates all memory allocated by the graphics system, then restores the screen to the mode it was in before you called ROLE='italic'initgraph. (The graphics system deallocates memory, such as the drivers, fonts, and an internal buffer, through a call to ROLE='italic'_graphfreemem.)Return valueNone.See alsoREMAP='BodyNoLead'ROLE='italic'initgraph, setgraphbufsizedetectgraphMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Determines graphics driver and graphics mode to use by checking the hardware.SyntaxFORMAT="LINESPECIFIC"MOREINFO="NONE" void far detectgraph(int far *graphdriver, int far *graphmode);RemarksREMAP='BodyNoLead'ROLE='italic'detectgraph detects your system's graphics adapter and chooses the mode that provides the highest resolution for that adapter. If no graphics hardware is detected, *ROLE='italic'graphdriver is set to grNotDetected (-2), and ROLE='italic'graphresult returns grNotDetected (-2).REMAP='Body'ROLE='BOLD'*ROLE='italic'graphdriver is an integer that specifies the graphics driver to be used. You can give it a value using a constant of the ROLE='italic'graphics_drivers enumeration type, which is defined in graphics.h and listed in the following table.ROLE='BOLD'TOCENTRY="1"REMAP='TblCap'ROLE='BOLD'detectgraph constants COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='111*'COLNAME='C2' COLWIDTH='105*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'ROLE='italic' graphics_drivers constantCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'Numeric valueVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'CURRENT_DRIVERCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'-1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'DETECTCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body' 0 (requests autodetection)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'CGACOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body' 1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'MCGACOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body' 2COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'EGACOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body' 3COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'EGA64COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body' 4COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'EGAMONOCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body' 5COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'IBM8514COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body' 6COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'HERCMONOCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body' 7COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ATT400COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body' 8COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'VGACOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body' 9COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'PC3270COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'10REMAP='Body'ROLE='italic'*graphmode is an integer that specifies the initial graphics mode (unless ROLE='italic'*graphdriver equals DETECT; in which case, ROLE='italic'*graphmode is set to the highest resolution available for the detected driver). You can give ROLE='italic'*graphmode a value using a constant of the ROLE='italic'graphics_modes enumeration type, which is defined in graphics.h and listed in the following table.TOCENTRY="1"REMAP='TblCap'Graphics drivers information COLS='6' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='73*'COLNAME='C2' COLWIDTH='78*'COLNAME='C3' COLWIDTH='36*'COLNAME='C4' COLWIDTH='72*'COLNAME='C5' COLWIDTH='42*'COLNAME='C6' COLWIDTH='37*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'Graphics driverCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'gROLE='italic'raphics_modesCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Heading'ValueCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Heading'Column ROLE='BOLD' rowCOLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Heading'PaletteCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Heading'PagesVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'CGACOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'CGAC0COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'320x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'C0COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'CGAC1COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'320x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'C1COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'CGAC2COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'320x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'C2COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'CGAC3COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'3COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'320x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'C3COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'CGAHICOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'4COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'2 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'MCGACOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'MCGAC0COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'320x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'C0COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'MCGAC1COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'320x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'C1COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'MCGAC2COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'320x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'C2COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'MCGAC3COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'3COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'320x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'C3COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'MCGAMEDCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'4COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'2 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'MCGAHICOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'5COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x480COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'2 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'EGACOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'EGALOCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'16 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'4COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'EGAHICOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x350COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'16 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'EGA64COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'EGA64LOCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'16 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'EGA64HICOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x350COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'4 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'EGA-MONOCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'EGAMONOHICOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'3COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x350COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'2 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1*COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'EGAMONOHICOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'3COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x350COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'2 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'2**COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'HERCCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'HERCMONOHICOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'720x348COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'2 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ATT400COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'ATT400C0COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'320x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'C0COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'ATT400C1COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'320x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'C1COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'ATT400C2COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'320x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'C2COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'ATT400C3COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'3COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'320x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'C3COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'ATT400MEDCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'4COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'2 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'ATT400HICOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'5COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x400COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'2 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'VGACOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'VGALOCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'16 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'VGAMEDCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x350COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'16 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'VGAHICOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x480COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'16 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'PC3270COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'PC3270HICOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'720x350COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'2 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'IBM8514COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'IBM8514HICOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x480COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'256 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'IBM8514LOCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'1024x768COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'256 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'COLNAME='C1' MOREROWS='0' NAMEEND='C2' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body' * 64K on EGAMONO cardCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'COLNAME='C1' MOREROWS='0' NAMEEND='C2' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'** 256K on EGAMONO cardCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'REMAP='.ScanBold'ROLE='bold'NoteREMAP='Body'The main reason to call ROLE='italic'detectgraph directly is to override the graphics mode that ROLE='italic'detectgraph recommends to initgraph.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'graphresult, initgraph drawpolyMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Draws the outline of a polygon.SyntaxFORMAT="LINESPECIFIC"void far drawpoly(int numpoints, int far *polypoints);RemarksREMAP='BodyNoLead'ROLE='italic'drawpoly draws a polygon with ROLE='italic'numpoints points, using the current line style and color.REMAP='Body'*ROLE='italic'polypoints points to a sequence of (ROLE='italic'numpointsROLE='symbol' x 2) integers. Each pair of integers gives the ROLE='italic'x and ROLE='italic'y coordinates of a point on the polygon.REMAP='Body'To draw a closed figure with ROLE='italic'n vertices, you must pass ROLE='italic'n + 1 coordinates to ROLE='italic'drawpoly where the ROLE='italic'nth coordinate is equal to the 0th.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'fillpoly, floodfill, graphresult, setwritemode ellipseMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Draws an elliptical arc.SyntaxFORMAT="LINESPECIFIC"void far ellipse(int x, int y, int stangle, int endangle, int xradius, int yradius);RemarksREMAP='BodyNoLead'ROLE='italic'ellipse draws an elliptical arc in the current drawing color with its center at (x,y) and the horizontal and vertical axes given by ROLE='italic'xradius and ROLE='italic'yradius, respectively. The ellipse travels from ROLE='italic'stangle to ROLE='italic'endangle. If ROLE='italic'stangle equals 0 and ROLE='italic'endangle equals 360, the call to ROLE='italic'ellipse draws a complete ellipse.REMAP='Body'The angle for ROLE='italic'ellipse is reckoned counterclockwise, with 0 degrees at 3 o'clock, 90 degrees at 12 o'clock, and so on.REMAP='Body'The ROLE='italic'linestyle parameter does not affect arcs, circles, ellipses, or pie slices. Only the ROLE='italic'thickness parameter is used.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'arc, circle, fillellipse, sector fillellipseMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Draws and fills an ellipse.SyntaxFORMAT="LINESPECIFIC"void far fillellipse(int x, int y, int xradius, int yradius);RemarksREMAP='BodyNoLead'ROLE='italic'fillellipse draws an ellipse using (ROLE='italic'x,y) as a center point and ROLE='italic'xradius and ROLE='italic'yradius as the horizontal and vertical axes; fills it with the current fill color and pattern.Return valueNone.See alsoREMAP='BodyNoLead'ROLE='italic'arc, circle, ellipse, pieslice fillpolyMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Draws and fills a polygon.SyntaxFORMAT="LINESPECIFIC"void far fillpoly(int numpoints, int far *polypoints);RemarksREMAP='BodyNoLead'ROLE='italic'fillpoly draws the outline of a polygon with ROLE='italic'numpoints points in the current line style and color (just as ROLE='italic'drawpoly does), then fills the polygon using the current fill pattern and fill color.REMAP='Body'ROLE='BOLD'polypoints points to a sequence of (ROLE='italic'numpointsROLE='symbol' 2) integers. Each pair of integers gives the ROLE='italic'x and ROLE='italic'y coordinates of a point on the polygon.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'drawpoly, floodfill, graphresult, setfillstyle floodfillMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Flood-fills a bounded region.SyntaxFORMAT="LINESPECIFIC"void far floodfill(int x, int y, int border);RemarksREMAP='BodyNoLead'ROLE='italic'floodfill fills an enclosed area on bitmap devices. (ROLE='italic'x,y) is a "seed point" within the enclosed area to be filled. The area bounded by the color ROLE='italic'border is flooded with the current fill pattern and fill color. If the seed point is within an enclosed area, the inside will be filled. If the seed is outside the enclosed area, the exterior will be filled.REMAP='Body'Use ROLE='italic'fillpoly instead of ROLE='italic'floodfill whenever possible so that you can maintain code compatibility with future versions.REMAP='.ScanWord'ROLE='bold'NoteREMAP='Body'ROLE='italic'floodfill does not work with the IBM-8514 driver.Return valueREMAP='BodyNoLead'If an error occurs while flooding a region, ROLE='italic'graphresult returns a value of -7.See alsoREMAP='BodyNoLead'ROLE='italic'drawpoly, fillpoly, graphresult, setcolor, setfillstyle getarccoordsMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Gets coordinates of the last call to ROLE='italic'arc.SyntaxFORMAT="LINESPECIFIC"void far getarccoords(struct arccoordstype far *arccoords);RemarksREMAP='BodyNoLead'ROLE='BOLD'getarccoords fills in the ROLE='italic'arccoordstype structure pointed to by ROLE='italic'arccoords with information about the last call to ROLE='italic'arc. The ROLE='italic'arccoordstype structure is defined in graphics.h as follows:FORMAT="LINESPECIFIC"struct arccoordstype {
int x, y;
int xstart, ystart, xend, yend;
};REMAP='Body'The members of this structure are used to specify the center point (ROLE='italic'x,y), the starting position (ROLE='italic'xstart, ystart), and the ending position (ROLE='italic'xend, yend) of the arc. They are useful if you need to make a line meet at the end of an arc.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'arc, fillellipse, sector getaspectratioMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Retrieves the current graphics mode's aspect ratio.SyntaxFORMAT="LINESPECIFIC"void far getaspectratio(int far *xasp, int far *yasp);RemarksREMAP='BodyNoLead'The ROLE='italic'y aspect factor, *ROLE='italic'yasp, is normalized to 10,000. On all graphics adapters except the VGA, *ROLE='italic'xasp (the ROLE='italic'x aspect factor) is less than *ROLE='italic'yasp because the pixels are taller than they are wide. On the VGA, which has "square" pixels, *ROLE='italic'xasp equals *ROLE='italic'yasp. In general, the relationship between *ROLE='italic'yasp and *ROLE='italic'xasp can be stated asREMAP='.Indent1' ROLE='indent1'*ROLE='italic'yasp = 10,000REMAP='.Indent1' ROLE='indent1'*ROLE='italic'xasp <= 10,000REMAP='Body'ROLE='italic'getaspectratio gets the values in *ROLE='italic'xasp and *ROLE='italic'yasp.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'arc, circle, ellipse, fillellipse, pieslice, sector, setaspectratio getbkcolorMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Returns the current background color.SyntaxFORMAT="LINESPECIFIC"int far getbkcolor(void);RemarksREMAP='BodyNoLead'ROLE='italic'getbkcolor returns the current background color. (See the table under ROLE='italic'setbkcolor for details.)Return valueREMAP='BodyNoLead'ROLE='italic'getbkcolor returns the current background color.See alsoREMAP='BodyNoLead'ROLE='italic'getcolor, getmaxcolor, getpalette, setbkcolor getcolorMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Returns the current drawing color.SyntaxFORMAT="LINESPECIFIC"int far getcolor(void);RemarksREMAP='BodyNoLead'ROLE='italic'getcolor returns the current drawing color.REMAP='Body'The drawing color is the value to which pixels are set when lines and so on are drawn. For example, in CGAC0 mode, the palette contains four colors: the background color, light green, light red, and yellow. In this mode, if ROLE='italic'getcolor returns 1, the current drawing color is light green.Return valueREMAP='BodyNoLead'ROLE='italic'getcolor returns the current drawing color.See alsoREMAP='BodyNoLead'ROLE='italic'getbkcolor, getmaxcolor, getpalette, setcolor getdefaultpaletteMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Returns the palette definition structure.SyntaxFORMAT="LINESPECIFIC"struct palettetype *far getdefaultpalette(void);RemarksREMAP='BodyNoLead'ROLE='italic'getdefaultpalette finds the ROLE='italic'palettetype structure that contains the palette initialized by the driver during ROLE='italic'initgraph.Return valueREMAP='BodyNoLead'ROLE='italic'getdefaultpalette returns a pointer to the default palette set up by the current driver when that driver was initialized.See alsoREMAP='BodyNoLead'ROLE='italic'getpalette, initgraph getdrivernameMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Returns a pointer to a string containing the name of the current graphics driver.SyntaxFORMAT="LINESPECIFIC"char *far getdrivername(void);RemarksREMAP='BodyNoLead'After a call to ROLE='italic'initgraph, getdrivername returns the name of the driver that is currently loaded.Return valueREMAP='BodyNoLead'ROLE='italic'getdrivername returns a pointer to a string with the name of the currently loaded graphics driver.See alsoREMAP='BodyNoLead'ROLE='italic'initgraph getfillpatternMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Copies a user-defined fill pattern into memory.SyntaxFORMAT="LINESPECIFIC"void far getfillpattern(char far *pattern);RemarksREMAP='BodyNoLead'ROLE='italic'getfillpattern copies the user-defined fill pattern, as set by ROLE='italic'setfillpattern, into the 8-byte area pointed to by ROLE='italic'pattern.REMAP='Body'ROLE='italic'pattern is a pointer to a sequence of 8 bytes, with each byte corresponding to 8 pixels in the pattern. Whenever a bit in a pattern byte is set to 1, the corresponding pixel will be plotted. For example, the following user-defined fill pattern represents a checkerboard:FORMAT="LINESPECIFIC"char checkboard[8] = { 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55 };Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'getfillsettings, setfillpattern getfillsettingsMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Gets information about current fill pattern and color.SyntaxFORMAT="LINESPECIFIC"void far getfillsettings(struct fillsettingstype far *fillinfo);RemarksREMAP='BodyNoLead'ROLE='italic'getfillsettings fills in the ROLE='italic'fillsettingstype structure pointed to by ROLE='italic'fillinfo with information about the current fill pattern and fill color. The ROLE='italic'fillsettingstype structure is defined in graphics.h as follows:FORMAT="LINESPECIFIC"struct fillsettingstype {
int pattern; /* current fill pattern */
int color; /* current fill color */
};REMAP='Body'The functions ROLE='italic'bar, bar3d, fillpoly, floodfill, and ROLE='italic'pieslice all fill an area with the current fill pattern in the current fill color. There are 11 predefined fill pattern styles (such as solid, crosshatch, dotted, and so on). Symbolic names for the predefined patterns are provided by the enumerated type ROLE='italic'fill_patterns in graphics.h (see the following table). In addition, you can define your own fill pattern.REMAP='Body'If ROLE='italic'pattern equals 12 (USER_FILL), then a user-defined fill pattern is being used; otherwise, ROLE='italic'pattern gives the number of a predefined pattern.REMAP='Body'The enumerated type ROLE='italic'fill_patterns, defined in graphics.h, gives names for the predefined fill patterns, plus an indicator for a user-defined pattern.ROLE='BOLD'COLS='3' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='83*'COLNAME='C2' COLWIDTH='42*'COLNAME='C3' COLWIDTH='109*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'NameCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading.Center'ValueCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Heading'DescriptionVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'EMPTY_FILLCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Fill with background colorCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'SOLID_FILLCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Solid fillCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'LINE_FILLCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Fill withname='mdash' font=symbol charset=fontspecific code=190
descr='[mdash]'name='mdash' font=symbol charset=fontspecific code=190
descr='[mdash]'COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'LTSLASH_FILLCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'3COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Fill with ///COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'SLASH_FILLCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'4COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Fill with ///, thick linesCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'BKSLASH_FILLCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'5COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Fill with \\\, thick linesCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'LTBKSLASH_FILLCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'6COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Fill with \\\COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'HATCH_FILLCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'7COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Light hatch fillCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'XHATCH_FILLCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'8COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Heavy crosshatch fillCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'INTERLEAVE_FILLCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'9COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Interleaving line fillCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'WIDE_DOT_FILLCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'10COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Widely spaced dot fillCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'CLOSE_DOT_FILLCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'11COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Closely spaced dot fillCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'USER_FILLCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'12COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'User-defined fill patternREMAP='Body'All but EMPTY_FILL fill with the current fill color; EMPTY_FILL uses the current background color.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'getfillpattern, setfillpattern, setfillstyle getgraphmodeMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Returns the current graphics mode.SyntaxFORMAT="LINESPECIFIC"int far getgraphmode(void);RemarksREMAP='BodyNoLead'Your program must make a successful call to ROLE='italic'initgraph before calling ROLE='italic'getgraphmode.REMAP='Body'The enumeration ROLE='italic'graphics_mode, defined in graphics.h, gives names for the predefined graphics modes. For a table listing these enumeration values, refer to the description for ROLE='italic'initgraph.Return valueREMAP='BodyNoLead'ROLE='italic'getgraphmode returns the graphics mode set by ROLE='italic'initgraph or ROLE='italic'setgraphmode.See alsoREMAP='BodyNoLead'ROLE='italic'getmoderange, restorecrtmode, setgraphmode getimageMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Saves a bit image of the specified region into memory.SyntaxFORMAT="LINESPECIFIC"void far getimage(int left, int top, int right, int bottom, void far *bitmap);RemarksREMAP='BodyNoLead'ROLE='italic'getimage copies an image from the screen to memory.REMAP='Body'ROLE='italic'left, top, right, and ROLE='italic'bottom define the screen area to which the rectangle is copied. ROLE='italic'bitmap points to the area in memory where the bit image is stored. The first two words of this area are used for the width and height of the rectangle; the remainder holds the image itself.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'imagesize, putimage, putpixel getlinesettingsMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Gets the current line style, pattern, and thickness.SyntaxFORMAT="LINESPECIFIC"void far getlinesettings(struct linesettingstype far *lineinfo);RemarksREMAP='BodyNoLead'ROLE='italic'getlinesettings fills a ROLE='italic'linesettingstype structure pointed to by ROLE='italic'lineinfo with information about the current line style, pattern, and thickness.REMAP='Body'The ROLE='italic'linesettingstype structure is defined in graphics.h as follows:FORMAT="LINESPECIFIC"struct linesettingstype {
int linestyle;
unsigned upattern;
int thickness;
};REMAP='Body'ROLE='italic'linestyle specifies in which style subsequent lines will be drawn (such as solid, dotted, centered, dashed). The enumeration ROLE='italic'line_styles, defined in graphics.h, gives names to these operators:ROLE='BOLD'COLS='3' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='68*'COLNAME='C2' COLWIDTH='40*'COLNAME='C3' COLWIDTH='90*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'NameCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading.Center'Value COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Heading'DescriptionVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'SOLID_LINECOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Solid lineCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'DOTTED_LINE COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Dotted lineCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'CENTER_LINE COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Centered lineCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'DASHED_LINE COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'3COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Dashed lineCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'USERBIT_LINECOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'4COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'User-defined line styleREMAP='Body'ROLE='italic'thickness specifies whether the width of subsequent lines drawn will be normal or thick.ROLE='BOLD'COLS='3' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='70*'COLNAME='C2' COLWIDTH='39*'COLNAME='C3' COLWIDTH='67*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'Name COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading.Center'Value COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Heading'DescriptionVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'NORM_WIDTH COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'1 pixel wideCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'THICK_WIDTHCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'3COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'3 pixels wideREMAP='Body'ROLE='italic'upattern is a 16-bit pattern that applies only if ROLE='italic'linestyle is USERBIT_LINE (4). In that case, whenever a bit in the pattern word is 1, the corresponding pixel in the line is drawn in the current drawing color. For example, a solid line corresponds to a ROLE='italic'upattern of 0xFFFF (all pixels drawn), while a dashed line can correspond to a ROLE='italic'upattern of 0x3333 or 0x0F0F. If the ROLE='italic'linestyle parameter to ROLE='italic'setlinestyle is not USERBIT_LINE (!=4), the ROLE='italic'upattern parameter must still be supplied but is ignored.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'setlinestyle getmaxcolorMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Returns maximum color value that can be passed to the ROLE='italic'setcolor function.SyntaxFORMAT="LINESPECIFIC"int far getmaxcolor(void);RemarksREMAP='BodyNoLead'ROLE='italic'getmaxcolor returns the highest valid color value for the current graphics driver and mode that can be passed to ROLE='italic'setcolor.REMAP='Body'For example, on a 256K EGA, ROLE='italic'getmaxcolor always returns 15, which means that any call to ROLE='BOLD'setcolor with a value from 0 to 15 is valid. On a CGA in high-resolution mode or on a Hercules monochrome adapter, ROLE='italic'getmaxcolor returns a value of 1.Return valueREMAP='BodyNoLead'ROLE='italic'getmaxcolor returns the highest available color value.See alsoREMAP='BodyNoLead'ROLE='italic'getbkcolor, getcolor, getpalette, getpalettesize, setcolor getmaxmodeMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Returns the maximum mode number for the current driver.SyntaxFORMAT="LINESPECIFIC"int far getmaxmode(void);RemarksREMAP='BodyNoLead'ROLE='italic'getmaxmode lets you find out the maximum mode number for the currently loaded driver, directly from the driver. This gives it an advantage over ROLE='italic'getmoderange, which works for Borland drivers only. The minimum mode is 0.Return valueREMAP='BodyNoLead'ROLE='italic'getmaxmode returns the maximum mode number for the current driver.See alsoREMAP='BodyNoLead'ROLE='italic'getmodename, getmoderange getmaxxMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Returns maximum ROLE='BOLD'x screen coordinate.SyntaxFORMAT="LINESPECIFIC"int far getmaxx(void);RemarksREMAP='BodyNoLead'ROLE='italic'getmaxx returns the maximum (screen-relative) ROLE='italic'x value for the current graphics driver and mode.REMAP='Body'For example, on a CGA in 320ROLE='symbol'200 mode, ROLE='italic'getmaxx returns 319. ROLE='italic'getmaxx is invaluable for centering, determining the boundaries of a region onscreen, and so on.Return valueREMAP='BodyNoLead'ROLE='italic'getmaxx returns the maximum ROLE='italic'x screen coordinate.See alsoREMAP='BodyNoLead'ROLE='italic'getmaxy, getx getmaxyMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Returns maximum ROLE='italic'y screen coordinate.SyntaxFORMAT="LINESPECIFIC"int far getmaxy(void);RemarksREMAP='BodyNoLead'ROLE='italic'getmaxy returns the maximum (screen-relative) ROLE='italic'y value for the current graphics driver and mode.REMAP='Body'For example, on a CGA in 320ROLE='symbol'200 mode, ROLE='italic'getmaxy returns 199. ROLE='italic'getmaxy is invaluable for centering, determining the boundaries of a region onscreen, and so on.Return valueREMAP='BodyNoLead'ROLE='italic'getmaxy returns the maximum ROLE='italic'y screen coordinate.See alsoREMAP='BodyNoLead'ROLE='italic'getmaxx, getx, gety getmodenameMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Returns a pointer to a string containing the name of a specified graphics mode.SyntaxFORMAT="LINESPECIFIC"char *far getmodename(int mode_number);RemarksREMAP='BodyNoLead'ROLE='italic'getmodename accepts a graphics mode number as input and returns a string containing the name of the corresponding graphics mode. The mode names are embedded in each driver. The return values ("320ROLE='symbol'200 CGA P1," "640ROLE='symbol'200 CGA," and so on) are useful for building menus or displaying status.Return valueREMAP='BodyNoLead'ROLE='italic'getmodename returns a pointer to a string with the name of the graphics mode.See alsoREMAP='BodyNoLead'ROLE='italic'getmaxmode, getmoderange getmoderangeMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Gets the range of modes for a given graphics driver.SyntaxFORMAT="LINESPECIFIC"void far getmoderange(int graphdriver, int far *lomode, int far *himode);RemarksREMAP='BodyNoLead'ROLE='italic'getmoderange gets the range of valid graphics modes for the given graphics driver, ROLE='italic'graphdriver. The lowest permissible mode value is returned in *ROLE='italic'lomode, and the highest permissible value is *ROLE='italic'himode. If ROLE='italic'graphdriver specifies an invalid graphics driver, both *ROLE='italic'lomode and *ROLE='italic'himode are set to -1. If the value of ROLE='italic'graphdriver is -1, the currently loaded driver modes are given.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'getgraphmode, getmaxmode, getmodename, initgraph, setgraphmode getpaletteMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Gets information about the current palette.SyntaxFORMAT="LINESPECIFIC"void far getpalette(struct palettetype far *palette);RemarksREMAP='BodyNoLead'ROLE='italic'getpalette fills the ROLE='italic'palettetype structure pointed to by ROLE='italic'palette with information about the current palette's size and colors.REMAP='Body'The MAXCOLORS constant and the ROLE='italic'palettetype structure used by ROLE='italic'getpalette are defined in graphics.h as follows:FORMAT="LINESPECIFIC"#define MAXCOLORS 15
struct palettetype {
unsigned char size;
signed char colors[MAXCOLORS + 1];
};REMAP='Body'ROLE='italic'size gives the number of colors in the palette for the current graphics driver in the current mode.REMAP='Body'ROLE='italic'colors is an array of ROLE='italic'size bytes containing the actual raw color numbers for each entry in the palette.REMAP='.ScanBold'ROLE='bold'NoteREMAP='Body'ROLE='italic'getpalette cannot be used with the IBM-8514 driver.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'getbkcolor, getcolor, getdefaultpalette, getmaxcolor, setallpalette, setpalette getpalettesizeMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Returns size of palette color lookup table.SyntaxFORMAT="LINESPECIFIC"int far getpalettesize(void);RemarksREMAP='BodyNoLead'ROLE='italic'getpalettesize is used to determine how many palette entries can be set for the current graphics mode. For example, the EGA in color mode returns 16.Return valueREMAP='BodyNoLead'ROLE='italic'getpalettesize returns the number of palette entries in the current palette.See alsoREMAP='BodyNoLead'ROLE='italic'setpalette, setallpalette getpixelMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Gets the color of a specified pixel.SyntaxFORMAT="LINESPECIFIC"unsigned far getpixel(int x, int y);RemarksREMAP='BodyNoLead'ROLE='italic'getpixel gets the color of the pixel located at (ROLE='italic'x,ROLE='italic'y).Return valueREMAP='BodyNoLead'ROLE='italic'getpixel returns the color of the given pixel.See alsoREMAP='BodyNoLead'ROLE='italic'getimage, putpixel gettextsettingsMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Gets information about the current graphics text font.SyntaxFORMAT="LINESPECIFIC"void far gettextsettings(struct textsettingstype far *texttypeinfo);RemarksREMAP='BodyNoLead'ROLE='italic'gettextsettings fills the ROLE='italic'textsettingstype structure pointed to by ROLE='italic'textinfo with information about the current text font, direction, size, and justification.REMAP='Body'The ROLE='italic'textsettingstype structure used by ROLE='italic'gettextsettings is defined in graphics.h as follows:FORMAT="LINESPECIFIC"struct textsettingstype {
int font;
int direction;
int charsize;
int horiz;
int vert;
};REMAP='Body'See ROLE='italic'settextstyle for a description of these fields.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'outtext, outtextxy, registerbgifont, settextjustify, settextstyle, setusercharsize, textheight, textwidth getviewsettingsMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Gets information about the current viewport.SyntaxFORMAT="LINESPECIFIC"void far getviewsettings(struct viewporttype far *viewport);RemarksREMAP='BodyNoLead'ROLE='italic'getviewsettings fills the ROLE='italic'viewporttype structure pointed to by ROLE='italic'viewport with information about the current viewport.REMAP='Body'The ROLE='italic'viewporttype structure used by ROLE='italic'getviewport is defined in graphics.h as follows:FORMAT="LINESPECIFIC"struct viewporttype {
int left, top, right, bottom;
int clip;
};Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'clearviewport, getx, gety, setviewport getxMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Returns the current graphics position's x-coordinate.SyntaxFORMAT="LINESPECIFIC"int far getx(void);RemarksREMAP='BodyNoLead'ROLE='italic'getx finds the current graphics position's x-coordinate. The value is viewport-relative.Return valueREMAP='BodyNoLead'ROLE='italic'getx returns the x-coordinate of the current position.See alsoREMAP='BodyNoLead'ROLE='italic'getmaxx, getmaxy, getviewsettings, gety, moveto getyMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Returns the current graphics position's y-coordinate.SyntaxFORMAT="LINESPECIFIC"int far gety(void);RemarksREMAP='BodyNoLead'ROLE='italic'gety returns the current graphics position's y-coordinate. The value is viewport-relative.Return valueREMAP='BodyNoLead'ROLE='italic'gety returns the y-coordinate of the current position.See alsoREMAP='BodyNoLead'ROLE='italic'getmaxx, getmaxy, getviewsettings, getx, moveto graphdefaultsMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Resets all graphics settings to their defaults.SyntaxFORMAT="LINESPECIFIC"void far graphdefaults(void);RemarksREMAP='BodyNoLead'ROLE='italic'graphdefaults resets all graphics settings to their defaults:MARK='bullet'REMAP='Bullet1'Sets the viewport to the entire screen.REMAP='Bullet1'Moves the current position to (0,0).REMAP='Bullet1'Sets the default palette colors, background color, and drawing color.REMAP='Bullet1'Sets the default fill style and pattern.REMAP='Bullet1'Sets the default text font and justification.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'initgraph, setgraphmode grapherrormsgMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Returns a pointer to an error message string.SyntaxFORMAT="LINESPECIFIC"char * far grapherrormsg(int errorcode);RemarksREMAP='BodyNoLead'ROLE='italic'grapherrormsg returns a pointer to the error message string associated with ROLE='italic'errorcode, the value returned by ROLE='italic'graphresult.REMAP='Body'Refer to the entry for ROLE='italic'errno in the ROLE='italic'Library Reference for a list of error messages and mnemonics.Return valueREMAP='BodyNoLead'ROLE='italic'grapherrormsg returns a pointer to an error message string.See alsoREMAP='BodyNoLead'ROLE='italic'graphresult _graphfreememMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'User hook into graphics memory deallocation.SyntaxFORMAT="LINESPECIFIC"void far _graphfreemem(void far *ptr, unsigned size);RemarksREMAP='BodyNoLead'The graphics library calls ROLE='italic'_graphfreemem to release memory previously allocated through ROLE='italic'_graphgetmem. You can choose to control the graphics library memory management by simply defining your own version of ROLE='italic'_graphfreemem (you must declare it exactly as shown in the declaration). The default version of this routine merely calls free.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'_graphgetmem, setgraphbufsize _graphgetmemMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'User hook into graphics memory allocation.SyntaxFORMAT="LINESPECIFIC"void far * far _graphgetmem(unsigned size);RemarksREMAP='BodyNoLead'Routines in the graphics library (not the user program) normally call ROLE='italic'_graphgetmem to allocate memory for internal buffers, graphics drivers, and character sets. You can choose to control the memory management of the graphics library by defining your own version of ROLE='italic'_graphgetmem (you must declare it exactly as shown in the declaration). The default version of this routine merely calls ROLE='italic'malloc.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'_graphfreemem, initgraph, setgraphbufsize graphresultMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Returns an error code for the last unsuccessful graphics operation.SyntaxFORMAT="LINESPECIFIC"int far graphresult(void);RemarksREMAP='BodyNoLead'ROLE='italic'graphresult returns the error code for the last graphics operation that reported an error and resets the error level to grOk.REMAP='Body'The following table lists the error codes returned by ROLE='italic'graphresult. The enumerated type ROLE='italic'graph_errors defines the errors in this table. ROLE='italic'graph_errors is declared in graphicsROLE='BOLD'.h.COLS='3' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='58*'COLNAME='C2' COLWIDTH='108*'COLNAME='C3' COLWIDTH='157*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'Error codeCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'ROLE='italic'graphics_errors constantCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Heading'Corresponding error message stringVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grOk COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'No errorCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-1COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grNoInitGraphCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'(BGI) graphics not installed (useROLE='italic' initgraph)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-2COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grNotDetectedCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Graphics hardware not detectedCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-3COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grFileNotFoundCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Device driver file not foundCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-4COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grInvalidDriverCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body' Invalid device driver fileCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-5COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grNoLoadMemCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Not enough memory to load driverCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body' -6COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grNoScanMemCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body' Out of memory in scan fillCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-7COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grNoFloodMemCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body' Out of memory in flood fillCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-8COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grFontNotFoundCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Font file not foundCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-9COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'igrNoFontMemCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Not enough memory to load fontCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-10COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grInvalidModeCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Invalid graphics mode for selected driverCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-11COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grErrorCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Graphics errorCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-12COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grIOerrorCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Graphics I/O errorCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-13COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grInvalidFontCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Invalid font fileCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-14COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grInvalidFontNumCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Invalid font numberCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-15COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grInvalidDeviceNumCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Invalid device numberCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'-18COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'grInvalidVersionCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Invalid version numberREMAP='Body'Note that the variable maintained by graphresult is reset to 0 after graphresult has been called. Therefore, you should store the value of graphresult into a temporary variable and then test it.Return valueREMAP='BodyNoLead'ROLE='italic'graphresult returns the current graphics error number, an integer in the range -15 to 0; ROLE='italic'grapherrormsg returns a pointer to a string associated with the value returned by ROLE='italic'graphresult.See alsoREMAP='BodyNoLead'ROLE='italic'detectgraph, drawpoly, fillpoly, floodfill, grapherrormsg, initgraph, pieslice, registerbgidriver, registerbgifont, setallpalette, setcolor, setfillstyle, setgraphmode, setlinestyle, setpalette, settextjustify, settextstyle, setusercharsize, setviewport, setvisualpage imagesizeMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Returns the number of bytes required to store a bit image.SyntaxFORMAT="LINESPECIFIC"unsigned far imagesize(int left, int top, int right, int bottom);RemarksREMAP='BodyNoLead'ROLE='italic'imagesize determines the size of the memory area required to store a bit image. If the size required for the selected image is greater than or equal to 64K - 1 bytes, ROLE='italic'imagesize returns 0xFFFF (-1).Return valueREMAP='BodyNoLead'ROLE='italic'imagesize returns the size of the required memory area in bytes.See alsoREMAP='BodyNoLead'ROLE='italic'getimage, putimage initgraphMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Initializes the graphics system.SyntaxFORMAT="LINESPECIFIC"void far initgraph(int far *graphdriver, int far *graphmode, char far *pathtodriver);RemarksREMAP='BodyNoLead'ROLE='italic'initgraph initializes the graphics system by loading a graphics driver from disk (or validating a registered driver), and putting the system into graphics mode.REMAP='Body'To start the graphics system, first call the ROLE='italic'initgraph function. ROLE='italic'initgraph loads the graphics driver and puts the system into graphics mode. You can tell ROLE='italic'initgraph to use a particular graphics driver and mode, or to autodetect the attached video adapter at run time and pick the corresponding driver.REMAP='Body'If you tell ROLE='italic'initgraph to autodetect, it calls ROLE='italic'detectgraph to select a graphics driver and mode. ROLE='italic'initgraph also resets all graphics settings to their defaults (current position, palette, color, viewport, and so on) and resets ROLE='italic'graphresult to 0.REMAP='Body'Normally, ROLE='italic'initgraph loads a graphics driver by allocating memory for the driver (through ROLE='italic'_graphgetmem), then loading the appropriate .BGI file from disk. As an alternative to this dynamic loading scheme, you can link a graphics driver file (or several of them) directly into your executable program file. See UTILS.TXT (included with your distribution disks) for more information on BGIOBJ.REMAP='Body'ROLE='italic'pathtodriver specifies the directory path where ROLE='italic'initgraph looks for graphics drivers. ROLE='italic'initgraph first looks in the path specified in ROLE='italic'pathtodriver, then (if they're not there) in the current directory. Accordingly, if ROLE='italic'pathtodriver is null, the driver files (*.BGI) must be in the current directory. This is also the path ROLE='italic'settextstyle searches for the stroked character font files (*.CHR).REMAP='Body'*ROLE='italic'graphdriver is an integer that specifies the graphics driver to be used. You can give it a value using a constant of the ROLE='italic'graphics_drivers enumeration type, which is defined in graphics.h and listed in LINKEND='X-23171' TYPE='XREF-TEXTCOPY'Table 4.3. TOCENTRY="1"REMAP='TblCap'ID='X-23171'Graphics drivers constants COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='108*'COLNAME='C2' COLWIDTH='104*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'ROLE='italic'graphics_drivers constantCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'Numeric valueVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'DETECTCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body' 0 (requests autodetection)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'CGACOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body' 1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'MCGACOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body' 2COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'EGACOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body' 3COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'EGA64COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body' 4COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'EGAMONOCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body' 5COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'IBM8514COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body' 6COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'HERCMONOCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body' 7COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ATT400COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body' 8COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'VGACOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body' 9COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'PC3270COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'10REMAP='Body'*ROLE='italic'graphmode is an integer that specifies the initial graphics mode (unless *ROLE='italic'graphdriver equals DETECT, in which case *ROLE='italic'graphmode is set by ROLE='italic'initgraph to the highest resolution available for the detected driver). You can give *ROLE='italic'graphmode a value using a constant of the ROLE='italic'graphics_modes enumeration type, which is defined in graphics.h and listed in LINKEND='X-41433' TYPE='XREF-TEXTCOPY'Table 4.5.REMAP='.ScanWord'ROLE='bold'NoteREMAP='Body'ROLE='italic'graphdriver and ROLE='italic'graphmode must be set to valid values from Tables LINKEND='X-23171' TYPE='XREF-TEXTCOPY'4.3 and LINKEND='X-41433' TYPE='XREF-TEXTCOPY'4.5, or you'll get unpredictable results. The exception is ROLE='italic'graphdriver = DETECT.REMAP='Body'In LINKEND='X-41433' TYPE='XREF-TEXTCOPY'Table 4.5, the ROLE='bold'Palette listings C0, C1, C2, and C3 refer to the four predefined four-color palettes available on CGA (and compatible) systems. You can select the background color (entry #0) in each of these palettes, but the other colors are fixed. These palettes are described in greater detail in LINKEND='X-41225' TYPE='XREF-TEXTCOPY'Chapter 3, and summarized inLINKEND='X-32632' TYPE='XREF-TEXTCOPY'Table 4.4.TOCENTRY="1"REMAP='TblCap'ID='X-32632'Color palettesCOLS='4' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='42*'COLNAME='C2' COLWIDTH='72*'COLNAME='C3' COLWIDTH='78*'COLNAME='C4' COLWIDTH='72*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='1' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'Palette numberCOLNAME='C2' MOREROWS='0' NAMEEND='C4' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading.Center'Color assigned to pixel valueCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading.Center'1COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Heading.Center'2COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Heading.Center'3VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'LIGHTGREENCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'LIGHTREDCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'YELLOWCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'LIGHTCYANCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'LIGHTMAGENTACOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'WHITECOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'GREENCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'REDCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'BROWNCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'3COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'CYAN COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'MAGENTACOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'LIGHTGRAYREMAP='Body'After a call toROLE='italic' initgraph, ROLE='italic'*graphdriver is set to the current graphics driver, and ROLE='italic'*graphmode is set to the current graphics mode.TOCENTRY="1"REMAP='TblCap'ROLE='BOLD'ID='X-41433'Graphics modes COLS='6' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='72*'COLNAME='C2' COLWIDTH='77*'COLNAME='C3' COLWIDTH='37*'COLNAME='C4' COLWIDTH='84*'COLNAME='C5' COLWIDTH='47*'COLNAME='C6' COLWIDTH='33*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'Graphics driverCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'ROLE='italic'graphics_modesCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Heading'ValueCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Heading'_Column ROLE='symbol'rowCOLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Heading'PaletteCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Heading'PagesVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'CGACOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'CGAC0COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'320x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'C0COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'CGAC1COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'320x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'C1COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'CGAC2COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'320x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'C2COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'CGAC3COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'3COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'320x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'C3COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'CGAHICOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'4COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'2 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'MCGACOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'MCGAC0COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'320x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'C0COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'MCGAC1COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'320x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'C1COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'MCGAC2COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'320x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'C2COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'MCGAC3COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'3COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'320x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'C3COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'MCGAMEDCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'4COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'2 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'MCGAHICOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'5COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x480COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'2 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'EGACOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'EGALOCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'16 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'4COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'EGAHICOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x350COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'16 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'EGA64COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'EGA64LOCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'16 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'EGA64HICOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x350COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'4 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'EGA-MONOCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'EGAMONOHICOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'3COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x350COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'2 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1*COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'EGAMONOHICOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'3COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x350COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'2 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'2**COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'HERCCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'HERCMONOHICOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'720x348COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'2 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ATT400COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'ATT400C0COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'320x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'C0COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'ATT400C1COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'320x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'C1COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'ATT400C2COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'320x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'C2COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'ATT400C3COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'3COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'320x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'C3COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'ATT400MEDCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'4COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'2 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'ATT400HICOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'5COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x400COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'2 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'VGACOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'VGALOCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x200COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'16 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'VGAMEDCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x350COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'16 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'VGAHICOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x480COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'16 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'PC3270COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'PC3270HICOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'720x350COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'2 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'IBM8514COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'IBM8514HICOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'1024x768COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'256 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'IBM8514LOCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'640x480COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'256 colorCOLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'COLNAME='C1' MOREROWS='0' NAMEEND='C2' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body' * 64K on EGAMONO cardCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'COLNAME='C1' MOREROWS='0' NAMEEND='C2' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'** 256K on EGAMONO cardCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'COLNAME='C5' MOREROWS='0' NAMEEND='C5' NAMEST='C5' ROTATE='0'REMAP='Tbl.Body'COLNAME='C6' MOREROWS='0' NAMEEND='C6' NAMEST='C6' ROTATE='0'REMAP='Tbl.Body'Return valueREMAP='BodyNoLead'ROLE='italic'initgraph always sets the internal error code; on success, it sets the code to 0. If an error occurred, ROLE='italic'*graphdriver is set to -2, -3, -4, or -5, and ROLE='italic'graphresult returns the same value as listed here:COLS='3' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='81*'COLNAME='C2' COLWIDTH='24*'COLNAME='C3' COLWIDTH='159*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'grNotDetectedCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'ROLE='BOLD'-2 COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Cannot detect a graphics cardCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'grFileNotFoundCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'ROLE='BOLD'-3 COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Cannot find driver fileCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'grInvalidDriverCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'ROLE='BOLD'-4 COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Invalid driverCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'grNoLoadMemCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'ROLE='BOLD'-5 COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Insufficient memory to load driverSee alsoREMAP='BodyNoLead'ROLE='italic'closegraph, detectgraph, getdefaultpalette, getdrivername, getgraphmode, getmoderange, graphdefaults, _graphgetmem, graphresult, installuserdriver, registerbgidriver, registerbgifont, restorecrtmode, setgraphbufsize, setgraphmode installuserdriverMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Installs a vendor-added device driver to the BGI device-driver table.SyntaxFORMAT="LINESPECIFIC"int far installuserdriver(char far *name, int huge (*detect)(void));RemarksREMAP='BodyNoLead'ROLE='italic'installuserdriver lets you add a vendor-added device driver to the BGI internal table. The ROLE='italic'name parameter is the name of the new device-driver file (.BGI), and the ROLE='italic'detect parameter is a pointer to an optional autodetect function that can accompany the new driver. This autodetect function takes no parameters and returns an integer value.REMAP='Body'There are two ways to use this vendor-supplied driver. Let's assume you have a new video card called the Spiffy Graphics Array (SGA) and that the SGA manufacturer provided you with a BGI device driver (SGA.BGI). The easiest way to use this driver is to install it by calling ROLE='italic'installuserdriver and then passing the return value (the assigned driver number) directly to ROLE='italic'initgraph.REMAP='Body'The other, more general way to use this driver is to link in an autodetect function that will be called by ROLE='italic'initgraph as part of its hardware-detection logic (presumably, the manufacturer of the SGA gave you this autodetect function). When you install the driver (by calling ROLE='italic'installuserdriver), you pass the address of this function, along with the device driver's file name.REMAP='Body'After you install the device-driver file name and the SGA autodetect function, call ROLE='italic'initgraph and let it go through its normal autodetection process. Before initgraph calls its built-in autodetection function (ROLE='italic'detectgraph), it first calls the SGA autodetect function. If the SGA autodetect function doesn't find the SGA hardware, it returns a value of -11 (grError), and ROLE='italic'initgraph proceeds with its normal hardware detection logic (which can include calling any other vendor-supplied autodetection functions in the order in which they were "installed"). If, however, the autodetect function determines that an SGA is present, it returns a nonnegative mode number; then ROLE='italic'initgraph locates and loads SGA.BGI, puts the hardware into the default graphics mode recommended by the autodetect function, and finally returns control to your program.REMAP='Body'You can install up to ten drivers at one time.Return valueREMAP='BodyNoLead'The value returned by ROLE='italic'installuserdriver is the driver number parameter you would pass to ROLE='italic'initgraph in order to select the newly installed driver manually.See alsoREMAP='BodyNoLead'ROLE='italic'initgraph, registerbgidriver installuserfontMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Loads a font file (.CHR) that is not built into the BGI system.SyntaxFORMAT="LINESPECIFIC"int far installuserfont(char far *name);RemarksREMAP='BodyNoLead'ROLE='italic'name is a filename in the current directory (pathname is not supported) of a font file containing a stroked font. Up to twenty fonts can be installed at one time.Return valueREMAP='BodyNoLead'ROLE='italic'installuserfont returns a font ID number that can then be passed to ROLE='italic'settextstyle to select the corresponding font. If the internal font table is full, a value of -11 (grError) is returned.See alsoREMAP='BodyNoLead'ROLE='italic'settextstyle lineMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Draws a line between two specified points.SyntaxFORMAT="LINESPECIFIC"void far line(int x1, int y1, int x2, int y2);RemarksREMAP='BodyNoLead'ROLE='italic'line draws a line in the current color, using the current line style and thickness between the two points specified, (ROLE='italic'x1,y1) and (ROLE='italic'x2,y2), without updating the current position (CP).Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'getlinesettings, linerel, lineto, setcolor, setlinestyle, setwritemode linerelMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Draws a line a relative distance from the current position (CP).SyntaxFORMAT="LINESPECIFIC"void far linerel(int dx, int dy);RemarksREMAP='BodyNoLead'ROLE='italic'linerel draws a line from the CP to a point that is a relative distance (ROLE='italic'dx,dy) from the CP. The CP is advanced by (ROLE='italic'dx,dy).Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'getlinesettings, line, lineto, setcolor, setlinestyle, setwritemode linetoMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Draws a line from the current position (CP) to (ROLE='italic'x,y).SyntaxFORMAT="LINESPECIFIC"void far lineto(int x, int y);RemarksREMAP='BodyNoLead'ROLE='italic'lineto draws a line from the CP to (ROLE='italic'x,y), then moves the CP to (ROLE='italic'x,y).Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'getlinesettings, line, linerel, setcolor, setlinestyle, setvisualpage, setwritemode moverelMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Moves the current position (CP) a relative distance.SyntaxFORMAT="LINESPECIFIC"void far moverel(int dx, int dy);RemarksREMAP='BodyNoLead'ROLE='italic'moverel moves the current position (CP) ROLE='italic'dx pixels in the ROLE='italic'x direction and ROLE='italic'dy pixels in the ROLE='italic'y direction.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'moveto movetoMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Moves the current position (CP) to (ROLE='BOLD'x,y).SyntaxFORMAT="LINESPECIFIC"void far moveto(int x, int y);RemarksREMAP='BodyNoLead'ROLE='italic'moveto moves the current position (CP) to viewport position (ROLE='italic'x,y).Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'moverel outtextMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Displays a string in the viewport.SyntaxFORMAT="LINESPECIFIC"void far outtext(char far *textstring);RemarksREMAP='BodyNoLead'ROLE='italic'outtext displays a text string in the viewport, using the current font, direction, and size.REMAP='Body'ROLE='italic'outtext outputs ROLE='italic'textstring at the current position (CP). If the horizontal text justification is LEFT_TEXT and the text direction is HORIZ_DIR, the CP's x-coordinate is advanced by ROLE='italic'textwidth(ROLE='italic'textstring). Otherwise, the CP remains unchanged.REMAP='Body'To maintain code compatibility when using several fonts, use ROLE='italic'textwidth and ROLE='italic'textheight to determine the dimensions of the string.REMAP='.ScanWord'ROLE='bold'NoteREMAP='Body'If a string is printed with the default font using ROLE='italic'outtext, any part of the string that extends outside the current viewport is truncated.REMAP='Body'ROLE='italic'outtext is for use in graphics mode; it will not work in text mode.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'gettextsettings, outtextxy, settextjustify, textheight, textwidth outtextxyMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Displays a string at a specified location.SyntaxFORMAT="LINESPECIFIC"void far outtextxy(int x, int y, char far *textstring);RemarksREMAP='BodyNoLead'ROLE='italic'outtextxy displays a text string in the viewport at the given position (ROLE='italic'x, y), using the current justification settings and the current font, direction, and size.REMAP='Body'To maintain code compatibility when using several fonts, use ROLE='italic'textwidth and ROLE='italic'textheight to determine the dimensions of the string.REMAP='.ScanWord'ROLE='bold'NoteREMAP='Body'If a string is printed with the default font using ROLE='italic'outtext or ROLE='italic'outtextxy, any part of the string that extends outside the current viewport is truncated.REMAP='Body'ROLE='italic'outtextxy is for use in graphics mode; it will not work in text mode.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'gettextsettings, outtext, textheight, textwidth piesliceMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Draws and fills in pie slice.SyntaxFORMAT="LINESPECIFIC"void far pie
slice(int x, int y, int stangle, int endangle, int radius);RemarksREMAP='BodyNoLead'ROLE='italic'pieslice draws and fills a pie slice centered at (ROLE='italic'x,y) with a radius given by ROLE='italic'radius. The slice travels from ROLE='italic'stangle to ROLE='italic'endangle. The slice is outlined in the current drawing color and then filled using the current fill pattern and fill color.REMAP='Body'The angles for ROLE='italic'pieslice are given in degrees. They are measured counterclockwise, with 0 degrees at 3 o'clock, 90 degrees at 12 o'clock, and so on.REMAP='Body'If you're using a CGA or monochrome adapter, the examples in online Help that show how to use graphics functions might not produce the expected results. If your system runs on a CGA or monochrome adapter, use the value 1 (one) instead of the symbolic color constant, and consult the second online Help example under ROLE='italic'arc on how to use the ROLE='italic'pieslice function.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'fillellipse, fill_patterns (enumerated type), ROLE='italic'graphresult, sector, setfillstyle putimageMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Outputs a bit image to screen.SyntaxFORMAT="LINESPECIFIC"void far putimage(int left, int top, void far *bitmap, int op);RemarksREMAP='BodyNoLead'ROLE='italic'putimage puts the bit image previously saved with ROLE='italic'getimage back onto the screen, with the upper left corner of the image placed at (ROLE='italic'left,top). ROLE='italic'bitmap points to the area in memory where the source image is stored.REMAP='Body'The ROLE='italic'op parameter to ROLE='italic'putimage specifies a combination operator that controls how the color for each destination pixel onscreen is computed, based on the pixel already onscreen and the corresponding source pixel in memory.REMAP='Body'The enumeration ROLE='italic'putimage_ops, as defined in graphics.h, gives names to these operators.COLS='3' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='63*'COLNAME='C2' COLWIDTH='40*'COLNAME='C3' COLWIDTH='119*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'NameCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'ValueCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Heading'DescriptionVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COPY_PUTCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'CopyCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'XOR_PUTCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Exclusive orCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'OR_PUTCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Inclusive orCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'AND_PUTCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'3COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'AndCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'NOT_PUTCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'4COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Copy the inverse of the sourceREMAP='Body'In other words, COPY_PUT copies the source bitmap image onto the screen, XOR_PUT XORs the source image with the image already onscreen, OR_PUT ORs the source image with that onscreen, and so on.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'getimage, imagesize, putpixel, setvisualpage putpixelMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Plots a pixel at a specified point.SyntaxFORMAT="LINESPECIFIC"void far putpixel(int x, int y, int color);RemarksREMAP='BodyNoLead'ROLE='italic'putpixel plots a point in the color defined by ROLE='italic'color at (ROLE='italic'x,y).Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'getpixel, putimage rectangleMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Draws a rectangle.SyntaxFORMAT="LINESPECIFIC"void far rectangle(int left, int top, int right, int bottom);RemarksREMAP='BodyNoLead'ROLE='italic'rectangle draws a rectangle in the current line style, thickness, and drawing color.REMAP='Body'(ROLE='italic'left,top) is the upper left corner of the rectangle, and (ROLE='italic'right,bottom) is its lower right corner.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'bar, bar3d, setcolor, setlinestyle registerbgifontMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Registers linked-in stroked font code.SyntaxFORMAT="LINESPECIFIC"int registerbgifont(void (*font)(void));RemarksREMAP='BodyNoLead'Calling ROLE='italic'registerbgifont informs the graphics system that the ROLE='italic'font pointed to by font was included at link time. This routine checks the linked-in code for the specified font; if the code is valid, it registers the code in internal tables. Linked-in fonts are discussed in detail under BGIOBJ in UTILS.TXT included with your distribution disks.REMAP='Body'By using the name of a linked-in font in a call to ROLE='italic'registerbgifont, you also tell the compiler (and linker) to link in the object file with that public name.REMAP='Body'If you register a user-supplied font, you must pass the result of ROLE='italic'registerbgifont to ROLE='italic'settextstyle as the font number to be used.Return valueREMAP='BodyNoLead'ROLE='italic'registerbgifont returns a negative graphics error code if the specified font is invalid. Otherwise, ROLE='italic'registerbgifont returns the font number of the registered font.See alsoREMAP='BodyNoLead'ROLE='italic'graphresult, initgraph, installuserdriver, registerbgidriver, settextstyle registerbgidriverMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Registers a user-loaded or linked-in graphics driver code with the graphics system.SyntaxFORMAT="LINESPECIFIC"int registerbgidriver(void (*driver)(void));RemarksREMAP='BodyNoLead'ROLE='italic'registerbgidriver enables a user to load a driver file and "register" the driver. Once its memory location has been passed to ROLE='italic'registerbgidriver, ROLE='italic'initgraph uses the registered driver. A user-registered driver can be loaded from disk onto the heap, or converted to an .OBJ file (using BGIOBJ.EXE) and linked into the .EXE.REMAP='Body'Calling ROLE='italic'registerbgidriver informs the graphics system that the driver pointed to by ROLE='italic'driver was included at link time. This routine checks the linked-in code for the specified driver; if the code is valid, it registers the code in internal tables. Linked-in drivers are discussed in detail in UTILS.TXT, included with your distribution disks.REMAP='Body'By using the name of a linked-in driver in a call to ROLE='italic'registerbgidriver, you also tell the compiler (and linker) to link in the object file with that public name.Return valueREMAP='BodyNoLead'ROLE='italic'registerbgidriver returns a negative graphics error code if the specified driver or font is invalid. Otherwise, ROLE='italic'registerbgidriver returns the driver number.REMAP='Body'If you register a user-supplied driver, you ROLE='italic'must pass the result of ROLE='italic'registerbgidriver to ROLE='italic'initgraph as the driver number to be used.See alsoREMAP='BodyNoLead'ROLE='italic'graphresult, initgraph, installuserdriver, registerbgifont restorecrtmodeMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Restores the screen mode to its pre-ROLE='italic'initgraph setting.SyntaxFORMAT="LINESPECIFIC"void far restorecrtmode(void);RemarksREMAP='BodyNoLead'ROLE='italic'restorecrtmode restores the original video mode detected by ROLE='italic'initgraph.REMAP='Body'This function can be used in conjunction with ROLE='italic'setgraphmode to switch back and forth between text and graphics modes. ROLE='italic'textmode should not be used for this purpose; use it only when the screen is in text mode, to change to a different text mode.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'getgraphmode, initgraph, setgraphmode sectorMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Draws and fills an elliptical pie slice.SyntaxFORMAT="LINESPECIFIC"void far sector(int x, int y, int stangle, int endangle, int xradius, int yradius);RemarksREMAP='BodyNoLead'Draws and fills an elliptical pie slice using (x,y) as the center point, xradius and yradius as the horizontal and vertical radii, respectively, and drawing from stangle to endangle. The pie slice is outlined using the current color, and filled using the pattern and color defined by ROLE='italic'setfillstyle or ROLE='italic'setfillpattern.REMAP='Body'The angles for ROLE='italic'sector are given in degrees. They are measured counterclockwise with 0 degrees at 3 o'clock, 90 degrees at 12 o'clock, and so on.REMAP='Body'If an error occurs while the pie slice is filling, ROLE='italic'graphresult returns a value of -6 (grNoScanMem).Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'arc, circle, ellipse, getarccoords, getaspectratio, graphresult, pieslice, setfillpattern, setfillstyle, setgraphbufsize setactivepageMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Sets active page for graphics output.SyntaxFORMAT="LINESPECIFIC"void far setactivepage(int page);RemarksREMAP='BodyNoLead'ROLE='italic'setactivepage makes ROLE='italic'page the active graphics page. All subsequent graphics output will be directed to that graphics page.REMAP='Body'The active graphics page might not be the one you see onscreen, depending on how many graphics pages are available on your system. Only the EGA, VGA, and Hercules graphics cards support multiple pages.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'setvisualpage setallpaletteMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Changes all palette colors as specified.SyntaxFORMAT="LINESPECIFIC"void far setallpalette(struct palettetype far *palette);RemarksREMAP='BodyNoLead'ROLE='italic'setallpalette sets the current palette to the values given in the ROLE='italic'palettetype structure pointed to by ROLE='italic'palette.REMAP='Body'You can partially (or completely) change the colors in the EGA/VGA palette with ROLE='italic'setallpalette.REMAP='Body'The MAXCOLORS constant and the palettetype structure used by setallpalette are defined in graphics.h as follows:FORMAT="LINESPECIFIC"#define MAXCOLORS 15
struct palettetype {
unsigned char size;
signed char colors[MAXCOLORS + 1];
};REMAP='Body'ROLE='italic'size gives the number of colors in the palette for the current graphics driver in the current mode.REMAP='Body'ROLE='italic'colors is an array of ROLE='italic'size bytes containing the actual raw color numbers for each entry in the palette. If an element of ROLE='italic'colors is -1, the palette color for that entry is not changed.REMAP='Body'The elements in the ROLE='italic'colors array used by ROLE='italic'setallpalette can be represented by symbolic constants which are defined in graphics.h.TOCENTRY="1"REMAP='TblCap'Actual color tableROLE='BOLD' COLS='4' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='80*'COLNAME='C2' COLWIDTH='36*'COLNAME='C3' COLWIDTH='99*'COLNAME='C4' COLWIDTH='32*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C2' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading.Center'CGACOLNAME='C3' MOREROWS='0' NAMEEND='C4' NAMEST='C3' ROTATE='0'REMAP='Tbl.Heading.Center'EGA/VGACOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'NameCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'ValueCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Heading'NameCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Heading'ValueVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'BLACKCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_BLACKCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'BLUECOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_BLUE COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'GREENCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_GREENCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'CYANCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'3COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_CYAN COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'3COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'REDCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'4COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_REDCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'4COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'MAGENTACOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'5COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_MAGENTACOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'5COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'BROWNCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'6COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_LIGHTGRAYCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'7COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'LIGHTGRAYCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'7COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_BROWNCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'20COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'DARKGRAYCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'8COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_DARKGRAYCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'56COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'LIGHTBLUECOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'9COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_LIGHTBLUECOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'57COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'LIGHTGREENCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'10COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_LIGHTGREENCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'58COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'LIGHTCYANCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'11COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_LIGHTCYANCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'59COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'LIGHTREDCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'12COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_LIGHTREDCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'60COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'LIGHTMAGENTACOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'13COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_LIGHTMAGENTACOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'61COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'YELLOWCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'14COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_YELLOWCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'62COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'WHITECOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'15COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_WHITECOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'63REMAP='Body'Note that valid colors depend on the current graphics driver and current graphics mode.REMAP='Body'Changes made to the palette are seen immediately onscreen. Each time a palette color is changed, all occurrences of that color onscreen will change to the new color value.REMAP='.ScanBold'ROLE='bold'NoteREMAP='Body'ROLE='italic'setallpalette cannot be used with the IBM-8514 driver.Return valueREMAP='BodyNoLead'If invalid input is passed to ROLE='italic'setallpalette, ROLE='italic'graphresult returns -11 (grError), and the current palette remains unchanged.See alsoREMAP='BodyNoLead'MOREINFO="NONE"getpalette, getpalettesize, graphresult, setbkcolor, setcolor, setpalette setaspectratioMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Changes the default aspect ratio correction factor.SyntaxFORMAT="LINESPECIFIC"void far setaspectratio(int xasp, int yasp);RemarksREMAP='BodyNoLead'ROLE='italic'setaspectratio changes the default aspect ratio of the graphics system. The graphics system uses the aspect ratio to make sure that circles are round onscreen. If circles appear elliptical, the monitor is not aligned properly. You could correct this in the hardware by realigning the monitor, but it's easier to change in the software by using ROLE='italic'setaspectratio to set the aspect ratio. To obtain the current aspect ratio from the system, call ROLE='italic'getaspectratio.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'circle, getaspectratio setbkcolorMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Sets the current background color using the palette.SyntaxFORMAT="LINESPECIFIC"void far setbkcolor(int color);RemarksREMAP='BodyNoLead'ROLE='italic'setbkcolor sets the background to the color specified by ROLE='italic'color. The argument ROLE='italic'color can be a name or a number, as listed in the following table:ROLE='BOLD'COLS='4' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='47*'COLNAME='C2' COLWIDTH='72*'COLNAME='C3' COLWIDTH='49*'COLNAME='C4' COLWIDTH='77*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'NumberCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'NameCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Heading'NumberCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Heading'NameVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'BLACKCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'8COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'DARKGRAYCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'BLUECOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'9COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'LIGHTBLUECOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'GREENCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'10COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'LIGHTGREENCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'3COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'CYANCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'11COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'LIGHTCYANCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'4COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'REDCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'12COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'LIGHTREDCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'5COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'MAGENTACOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'13COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'LIGHTMAGENTACOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'6COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'BROWNCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'14COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'YELLOWCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'7COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'LIGHTGRAYCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'15COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'WHITEREMAP='.ScanBold'ROLE='bold'NoteREMAP='Body'These symbolic names are which are defined in graphics.h.REMAP='Body'For example, if you want to set the background color to blue, you can callFORMAT="LINESPECIFIC"MOREINFO="NONE"ASPROGRAMC setbkcolor(BLUE) /* or */ setbkcolor(1)REMAP='Body'On CGA and EGA systems, ROLE='italic'setbkcolor changes the background color by changing the first entry in the palette.REMAP='.ScanWord'ROLE='bold'NoteREMAP='Body'If you use an EGA or a VGA, and you change the palette colors with ROLE='italic'setpalette or ROLE='italic'setallpalette, the defined symbolic constants might not give you the correct color. This is because the parameter to ROLE='italic'setbkcolor indicates the entry number in the current palette rather than a specific color (unless the parameter passed is 0, which always sets the background color to black).Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'getbkcolor, setallpalette, setcolor, setpalette setcolorMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Sets the current drawing color using the palette.SyntaxFORMAT="LINESPECIFIC"void far setcolor(int color);RemarksREMAP='BodyNoLead'ROLE='italic'setcolor sets the current drawing color to ROLE='italic'color, which can range from 0 to ROLE='italic'getmaxcolor.REMAP='Body'The current drawing color is the value to which pixels are set when lines, and so on are drawn. The following tables show the drawing colors available for the CGA and EGA, respectively.ROLE='BOLD'COLS='4' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='48*'COLNAME='C2' COLWIDTH='97*'COLNAME='C3' COLWIDTH='97*'COLNAME='C4' COLWIDTH='97*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='1' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'Palette numberCOLNAME='C2' MOREROWS='0' NAMEEND='C4' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading.Center'Constant assigned to color number (pixel value)COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading.Center'1COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Heading.Center'2COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Heading.Center'3VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'CGA_LIGHTGREENCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'CGA_LIGHTREDCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'CGA_YELLOWCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'CGA_LIGHTCYANCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'CGA_LIGHTMAGENTACOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'CGA_WHITECOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'CGA_GREENCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'CGA_REDCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'CGA_BROWNCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'3COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'CGA_CYANCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'CGA_MAGENTACOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'CGA_LIGHTGRAYCOLS='4' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='47*'COLNAME='C2' COLWIDTH='77*'COLNAME='C3' COLWIDTH='47*'COLNAME='C4' COLWIDTH='77*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'NumberCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'NameCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Heading'NumberCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Heading'NameVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'BLACKCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'8COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'DARKGRAYCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'BLUECOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'9COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'LIGHTBLUECOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'GREENCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'10COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'LIGHTGREENCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'3COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'CYANCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'11COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'LIGHTCYANCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'4COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'REDCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'12COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'LIGHTREDCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'5COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'MAGENTACOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'13COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'LIGHTMAGENTACOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'6COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'BROWNCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'14COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'YELLOWCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'7COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'LIGHTGRAYCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'15COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'WHITEREMAP='Body'You select a drawing color by passing either the color number itself or the equivalent symbolic name to ROLE='italic'setcolor. For example, in CGAC0 mode, the palette contains four colors: the background color, light green, light red, and yellow. In this mode, either ROLE='italic'setcolor(3) or ROLE='italic'setcolor(CGA_YELLOW) selects a drawing color of yellow.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'getcolor, getmaxcolor, graphresult, setallpalette, setbkcolor, setpalette setfillpatternMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Selects a user-defined fill pattern.SyntaxFORMAT="LINESPECIFIC"void far setfillpattern(char far *upattern, int color);RemarksREMAP='BodyNoLead'ROLE='italic'setfillpattern is like ROLE='italic'setfillstyle, except that you use it to set a user-defined 8x8 pattern rather than a predefined pattern.REMAP='Body'ROLE='italic'upattern is a pointer to a sequence of 8 bytes, with each byte corresponding to 8 pixels in the pattern. Whenever a bit in a pattern byte is set to 1, the corresponding pixel is plotted.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'getfillpattern, getfillsettings, graphresult, sector, setfillstyle setfillstyleMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Sets the fill pattern and color.SyntaxFORMAT="LINESPECIFIC"void far setfillstyle(int pattern, int color);RemarksREMAP='BodyNoLead'ROLE='italic'setfillstyle sets the current fill pattern and fill color. To set a user-defined fill pattern, do ROLE='italic'not give a pattern of 12 (USER_FILL) to ROLE='italic'setfillstyle; instead, call ROLE='italic'setfillpattern.REMAP='Body'The enumeration ROLE='italic'fill_patterns, which is defined in graphics.h, gives names for the predefined fill patterns and an indicator for a user-defined pattern.ROLE='BOLD'COLS='3' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='84*'COLNAME='C2' COLWIDTH='33*'COLNAME='C3' COLWIDTH='105*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'NameCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'ValueCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Heading'DescriptionVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'EMPTY_FILLCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Fill with background colorCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'SOLID_FILLCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Solid fillCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'LINE_FILLCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Fill with name='mdash' font=symbol charset=fontspecific code=190
descr='[mdash]'name='mdash' font=symbol charset=fontspecific code=190
descr='[mdash]'COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'LTSLASH_FILLCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'3COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Fill with ///COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'SLASH_FILLCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'4COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Fill with ///, thick linesCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'BKSLASH_FILLCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'5COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Fill with \\\, thick linesCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'LTBKSLASH_FILLCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'6COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Fill with \\\COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'HATCH_FILLCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'7COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Light hatch fillCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'XHATCH_FILLCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'8COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Heavy crosshatch fillCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'INTERLEAVE_FILLCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'9COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Interleaving line fillCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'WIDE_DOT_FILLCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'10COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Widely spaced dot fillCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'CLOSE_DOT_FILLCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'11COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Closely spaced dot fillCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'USER_FILLCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'12COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'User-defined fill patternREMAP='Body'All but EMPTY_FILL fill with the current fill color; EMPTY_FILL use the current background color.REMAP='Body'If invalid input is passed to ROLE='italic'setfillstyle, graphresult returns -11 (grError), and the current fill pattern and fill color remain unchanged.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'bar, bar3d, fillpoly, floodfill, getfillsettings, graphresult, pieslice, sector, setfillpattern setgraphmodeMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Sets the system to graphics mode and clears the screen.SyntaxFORMAT="LINESPECIFIC"void far setgraphmode(int mode);RemarksREMAP='BodyNoLead'ROLE='italic'setgraphmode selects a graphics mode different than the default one set by ROLE='italic'initgraph. mode must be a valid mode for the current device driver. ROLE='italic'setgraphmode clears the screen and resets all graphics settings to their defaults (current position, palette, color, viewport, and so on).REMAP='Body'You can use ROLE='italic'setgraphmode in conjunction with ROLE='italic'restorecrtmode to switch back and forth between text and graphics modes.Return valueREMAP='BodyNoLead'If you give ROLE='italic'setgraphmode an invalid mode for the current device driver, ROLE='italic'graphresult returns a value of -10 (grInvalidMode).See alsoREMAP='BodyNoLead'ROLE='italic'getgraphmode, getmoderange, graphresult, initgraph, restorecrtmode setgraphbufsizeMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Changes the size of the internal graphics buffer.SyntaxFORMAT="LINESPECIFIC"unsigned far setgraphbufsize(unsigned bufsize);RemarksREMAP='BodyNoLead'Some of the graphics routines (such as ROLE='italic'floodfill) use a memory buffer that is allocated when ROLE='italic'initgraph is called and released when ROLE='italic'closegraph is called. The default size of this buffer, allocated by ROLE='italic'_graphgetmem, is 4,096 bytes.REMAP='Body'You might want to make this buffer smaller (to save memory space) or bigger (if, for example, a call to ROLE='italic'floodfill produces error -7: Out of flood memory).REMAP='Body'ROLE='italic'setgraphbufsize tells ROLE='italic'initgraph how much memory to allocate for this internal graphics buffer when it calls ROLE='italic'_graphgetmem.REMAP='.ScanBold'ROLE='bold'NoteREMAP='Body'You ROLE='italic'must call ROLE='italic'setgraphbufsize before calling ROLE='italic'initgraph. Once ROLE='italic'initgraph has been called, all calls to ROLE='italic'setgraphbufsize are ignored until after the next call to ROLE='italic'closegraph.Return valueREMAP='BodyNoLead'ROLE='italic'setgraphbufsize returns the previous size of the internal buffer.See alsoREMAP='BodyNoLead'ROLE='italic'closegraph, _graphfreemem, _graphgetmem, initgraph, sector setlinestyleMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Sets the current line width and style.SyntaxFORMAT="LINESPECIFIC"void far setlinestyle(int linestyle, unsigned upattern, int thickness);RemarksREMAP='BodyNoLead'ROLE='italic'setlinestyle sets the style for all lines drawn by ROLE='italic'line, lineto, rectangle, drawpoly, and so on.REMAP='Body'The ROLE='italic'linesettingstype structure is defined in graphics.h as follows:FORMAT="LINESPECIFIC"struct linesettingstype {
int linestyle;
unsigned upattern;
int thickness;
};REMAP='Body'ROLE='italic'linestyle specifies in which of several styles subsequent lines will be drawn (such as solid, dotted, centered, dashed). The enumeration ROLE='italic'line_styles, which is defined in graphics.h, gives names to these operatorsROLE='BOLD':COLS='3' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='72*'COLNAME='C2' COLWIDTH='36*'COLNAME='C3' COLWIDTH='93*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'NameCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'ValueCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Heading'DescriptionVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'SOLID_LINECOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Solid lineCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'DOTTED_LINECOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Dotted lineCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'CENTER_LINECOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Centered lineCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'DASHED_LINECOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'3COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Dashed lineCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'USERBIT_LINECOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'4COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'User-defined line styleREMAP='Body'ROLE='italic'thickness specifies whether the width of subsequent lines drawn will be normal or thick.ROLE='BOLD'COLS='3' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='72*'COLNAME='C2' COLWIDTH='36*'COLNAME='C3' COLWIDTH='72*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'NameCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'ValueCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Heading'DescriptionVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'NORM_WIDTHCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'1 pixel wideCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'THICK_WIDTHCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'3COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'3 pixels wideREMAP='Body'ROLE='italic'upattern is a 16-bit pattern that applies only if ROLE='italic'linestyle is USERBIT_LINE (4). In that case, whenever a bit in the pattern word is 1, the corresponding pixel in the line is drawn in the current drawing color. For example, a solid line corresponds to a ROLE='italic'upattern of 0xFFFF (all pixels drawn), and a dashed line can correspond to a ROLE='italic'upattern of 0x3333 or 0x0F0F. If the ROLE='italic'linestyle parameter to setlinestyle is not USERBIT_LINE (in other words, if it is not equal to 4), you must still provide the ROLE='italic'upattern parameter, but it will be ignored.REMAP='.ScanBold'ROLE='bold'NoteREMAP='Body'The ROLE='italic'linestyle parameter does not affect arcs, circles, ellipses, or pie slices. Only the ROLE='italic'thickness parameter is used.Return valueREMAP='BodyNoLead'If invalid input is passed to ROLE='italic'setlinestyle, graphresult returns -11, and the current line style remains unchanged.See alsoREMAP='BodyNoLead'ROLE='italic'arc, bar3d, circle, drawpoly, ellipse, getlinesettings, graphresult, line, linerel, lineto, pieslice, rectanglesetpaletteMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Changes one palette color.SyntaxFORMAT="LINESPECIFIC"void far setpalette(int colornum, int color);RemarksREMAP='Body'ROLE='italic'setpalette changes the ROLE='italic'colornum entry in the palette to ROLE='italic'color. For example, ROLE='italic'setpalette(0,5) changes the first color in the current palette (the background color) to actual color number 5. If ROLE='italic'size is the number of entries in the current palette, ROLE='italic'colornum can range between 0 and (ROLE='italic'size -1).REMAP='Body'You can partially (or completely) change the colors in the EGA/VGA palette with ROLE='italic'setpalette. On a CGA, you can only change the first entry in the palette (ROLE='italic'colornum equals 0, the background color) with a call to ROLE='italic'setpalette.REMAP='Body'The ROLE='italic'color parameter passed to ROLE='italic'setpalette can be represented by symbolic constants which are defined in graphics.h.ROLE='BOLD'COLS='4' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='100*'COLNAME='C2' COLWIDTH='36*'COLNAME='C3' COLWIDTH='100*'COLNAME='C4' COLWIDTH='36*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C2' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading.Center'CGACOLNAME='C3' MOREROWS='0' NAMEEND='C4' NAMEST='C3' ROTATE='0'REMAP='Tbl.Heading.Center'EGA/VGACOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'NameCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'ValueCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Heading'NameCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Heading'ValueVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'BLACKCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_BLACKCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'BLUECOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_BLUE COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'GREENCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_GREENCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'CYANCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'3COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_CYANCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'3COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'REDCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'4COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_REDCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'4COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'MAGENTACOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'5COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_MAGENTACOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'5COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'BROWNCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'6COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_LIGHTGRAYCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'7COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'LIGHTGRAYCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'7COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_BROWNCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'20COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'DARKGRAYCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'8COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_DARKGRAYCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'56COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'LIGHTBLUECOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'9COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_LIGHTBLUECOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'57COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'LIGHTGREENCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'10COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_LIGHTGREENCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'58COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'LIGHTCYANCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'11COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_LIGHTCYANCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'59COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'LIGHTREDCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'12COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_LIGHTREDCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'60COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'LIGHTMAGENTACOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'13COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_LIGHTMAGENTACOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'61COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'YELLOWCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'14COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_YELLOWCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'62COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'WHITECOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'15COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'EGA_WHITECOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'63REMAP='Body'Note that valid colors depend on the current graphics driver and current graphics mode.REMAP='Body'Changes made to the palette are seen immediately onscreen. Each time a palette color is changed, all occurrences of that color onscreen change to the new color value.REMAP='.ScanBold'ROLE='bold'NoteREMAP='Body'ROLE='italic'setpalette cannot be used with the IBM-8514 driver; use ROLE='italic'setrgbpalette instead.Return valueREMAP='BodyNoLead'If invalid input is passed to ROLE='italic'setpalette, ROLE='italic'graphresult returns -11, and the current palette remains unchanged.See alsoREMAP='BodyNoLead'ROLE='italic'getpalette, graphresult, setallpalette, setbkcolor, setcolor, setrgbpalette setrgbpaletteMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Lets user define colors for the IBM 8514.SyntaxFORMAT="LINESPECIFIC"void far setrgbpalette(int colornum, int red, int green, int blue);RemarksREMAP='BodyNoLead'ROLE='italic'setrgbpalette can be used with the IBM 8514 and VGA drivers.REMAP='Body'ROLE='italic'colornum defines the palette entry to be loaded, while ROLE='italic'red, ROLE='italic'green, and ROLE='italic'blue define the component colors of the palette entry.REMAP='Body'For the IBM 8514 display (and the VGA in 256K color mode), ROLE='italic'colornum is in the range 0 to 255. For the remaining modes of the VGA, ROLE='italic'colornum is in the range 0 to 15. Only the lower byte of ROLE='italic'red, ROLE='italic'green, or ROLE='italic'blue is used, and out of each byte, only the 6 most significant bits are loaded in the palette.REMAP='.ScanBold'ROLE='bold'NoteREMAP='Body'For compatibility with other IBM graphics adapters, the BGI driver defines the first 16 palette entries of the IBM 8514 to the default colors of the EGA/VGA. These values can be used as is, or they can be changed using ROLE='italic'setrgbpalette.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'setpalettesettextjustifyMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Sets text justification for graphics functions.SyntaxFORMAT="LINESPECIFIC"void far settextjustify(int horiz, int vert);RemarksREMAP='BodyNoLead'Text output after a call to ROLE='italic'settextjustify is justified around the current position (CP) horizontally and vertically, as specified. The default justification settings are LEFT_TEXT (for horizontal) and TOP_TEXT (for vertical). The enumeration ROLE='italic'text_just in graphics.h provides names for the ROLE='italic'horiz and ROLE='italic'vert settings passed to ROLE='italic'settextjustify.ROLE='BOLD'COLS='4' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='58*'COLNAME='C2' COLWIDTH='79*'COLNAME='C3' COLWIDTH='37*'COLNAME='C4' COLWIDTH='79*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'DescriptionCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'NameCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Heading'ValueCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Heading'ActionVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'horizCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'LEFT_TEXTCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'Left-justify textCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'CENTER_TEXTCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'Center textCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'RIGHT_TEXTCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'Right-justify textCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'vertCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'BOTTOM_TEXTCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'Justify from bottomCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'CENTER_TEXTCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'Center textCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'TOP_TEXTCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'Justify from topREMAP='Body'If ROLE='italic'horiz is equal to LEFT_TEXT and direction equals HORIZ_DIR, the CP's x component is advanced after a call to ROLE='italic'outtext(ROLE='italic'string) byROLE='italic' textwidth(ROLE='italic'string).REMAP='Body'ROLE='italic'settextjustify affects text written with ROLE='italic'outtext and cannot be used with text mode and stream functions.Return valueREMAP='BodyNoLead'If invalid input is passed to ROLE='italic'settextjustify, ROLE='italic'graphresult returns -11, and the current text justification remains unchanged.See alsoREMAP='BodyNoLead'ROLE='italic'gettextsettings, graphresult, outtext, settextstyle settextstyleMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Sets the current text characteristics for graphics output.SyntaxFORMAT="LINESPECIFIC"void far settextstyle(int font, int direction, int charsize);RemarksREMAP='BodyNoLead'ROLE='italic'settextstyle sets the text font, the direction in which text is displayed, and the size of the characters. A call to ROLE='italic'settextstyle affects all text output by ROLE='italic'outtext and ROLE='italic'outtextxy.REMAP='Body'The parameters ROLE='italic'font, direction, and ROLE='italic'charsize passed to ROLE='italic'settextstyle are described in the following:REMAP='Body'ROLE='italic'font: One 8x8 bit-mapped font and several "stroked" fonts are available. The 8x8 bit-mapped font is the default. The enumeration ROLE='italic'font_names, which is defined in graphics.h, provides names for these different font settings:ROLE='BOLD'COLS='3' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='100*'COLNAME='C2' COLWIDTH='33*'COLNAME='C3' COLWIDTH='100*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'NameCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'ValueCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Heading'DescriptionVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'DEFAULT_FONTCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'8x8 bit-mapped fontCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'TRIPLEX_FONTCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Stroked triplex fontCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'SMALL_FONTCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Stroked small fontCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'SANS_SERIF_FONTCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'3COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Stroked sans-serif fontCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'GOTHIC_FONTCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'4COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Stroked gothic fontCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'SCRIPT_FONTCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'5COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Stroked script fontCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'SIMPLEX_FONTCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'6COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Stroked triplex script fontCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'TRIPLEX_SCR_FONTCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'7COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Stroked triplex script fontCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COMPLEX_FONTCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'8COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Stroked complex fontCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'EUROPEAN_FONTCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'9COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Stroked European fontCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'BOLD_FONTCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'10COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Stroked bold fontREMAP='Body'The default bit-mapped font is built into the graphics system. Stroked fonts are stored in *.CHR disk files, and only one at a time is kept in memory. Therefore, when you select a stroked font (different from the last selected stroked font), the corresponding *.CHR file must be loaded from disk.REMAP='Body'To avoid this loading when several stroked fonts are used, you can link font files into your program. Do this by converting them into object files with the BGIOBJ utility, then registering them through ROLE='italic'registerbgifont, as described in UTILS.TXT, included with your distributions disks.REMAP='Body'ROLE='italic'direction: Font directions supported are horizontal text (left to right) and vertical text (rotated 90 degrees counterclockwise). The default direction is HORIZ_DIR.ROLE='BOLD'COLS='3' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='72*'COLNAME='C2' COLWIDTH='41*'COLNAME='C3' COLWIDTH='72*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'NameCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'ValueCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Heading'DescriptionVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'HORIZ_DIRCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Left to rightCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'VERT_DIRCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Bottom to topREMAP='Body'ROLE='italic'charsize: The size of each character can be magnified using the ROLE='italic'charsize factor. If ROLE='italic'charsize is nonzero, it can affect bit-mapped or stroked characters. A ROLE='italic'charsize value of 0 can be used only with stroked fonts.MARK='bullet'REMAP='Bullet1'If ROLE='italic'charsize equals 1, ROLE='italic'outtext and ROLE='italic'outtextxy displays characters from the 8x8 bit-mapped font in an 8x8 pixel rectangle onscreen.REMAP='Bullet1'If ROLE='italic'charsize equals 2, these output functions display characters from the 8x8 bit-mapped font in a 16x16 pixel rectangle, and so on (up to a limit of ten times the normal size).REMAP='Bullet1'When ROLE='italic'charsize equals 0, the output functions ROLE='italic'outtext and ROLE='italic'outtextxy magnify the stroked font text using either the default character magnification factor (4) or the user-defined character size given by ROLE='italic'setusercharsize.REMAP='Body'Always use ROLE='italic'textheight and ROLE='italic'textwidth to determine the actual dimensions of the text.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'gettextsettings, graphresult, installuserfont, settextjustify, setusercharsize, textheight, textwidth setusercharsizeMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Varies character width and height for stroked fonts.SyntaxFORMAT="LINESPECIFIC"void far setusercharsize(int multx, int divx, int multy, int divy);RemarksREMAP='BodyNoLead'ROLE='italic'setusercharsize gives you finer control over the size of text from stroked fonts used with graphics functions. The values set by ROLE='italic'setusercharsize are active ROLE='italic'only if ROLE='italic'charsize equals 0, as set by a previous call to ROLE='italic'settextstyle.REMAP='Body'With ROLE='italic'setusercharsize, you specify factors by which the width and height are scaled. The default width is scaled by ROLE='italic'multx : ROLE='italic'divx, and the default height is scaled by ROLE='italic'multy : ROLE='italic'divy. For example, to make text twice as wide and 50% taller than the default, setFORMAT="LINESPECIFIC"multx = 2; divx = 1;
multy = 3; divy = 2;Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='italic'gettextsettings, graphresult, settextstyle setviewportMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Sets the current viewport for graphics output.SyntaxFORMAT="LINESPECIFIC"void far setviewport(int left, int top, int right, int bottom, int clip);RemarksREMAP='BodyNoLead'ROLE='italic'setviewport establishes a new viewport for graphics output.REMAP='Body'The viewport's corners are given in absolute screen coordinates by (ROLE='italic'left,top) and (ROLE='italic'right,bottom). The current position (CP) is moved to (0,0) in the new window.REMAP='Body'The parameter ROLE='italic'clip determines whether drawings are clipped (truncated) at the current viewport boundaries. If ROLE='italic'clip is nonzero, all drawings will be clipped to the current viewport.Return valueREMAP='BodyNoLead'If invalid input is passed to ROLE='italic'setviewport, ROLE='italic'graphresult returns -11, and the current view settings remain unchanged.See alsoREMAP='BodyNoLead'ROLE='BOLD'clearviewport, ROLE='BOLD'getviewsettings, ROLE='BOLD'graphresult setvisualpageMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Sets the visual graphics page number.SyntaxFORMAT="LINESPECIFIC"void far setvisualpage(int page);RemarksREMAP='BodyNoLead'ROLE='italic'setvisualpage makes ROLE='italic'page the visual graphics page.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='BOLD'graphresult, ROLE='BOLD'setactivepage setwritemodeMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Sets the writing mode for line drawing in graphics mode.SyntaxFORMAT="LINESPECIFIC"void far setwritemode(int mode);RemarksREMAP='BodyNoLead'The following constants are defined:FORMAT="LINESPECIFIC"COPY_PUT = 0 /* MOV */
XOR_PUT = 1 /* XOR */REMAP='Body'Each constant corresponds to a binary operation between each byte in the line and the corresponding bytes onscreen. COPY_PUT uses the assembly language ROLE='BOLD'MOV instruction, overwriting with the line whatever is on the screen. XOR_PUT uses the ROLE='BOLD'XOR command to combine the line with the screen. Two successive ROLE='BOLD'XOR commands will erase the line and restore the screen to its original appearance.REMAP='.ScanWord'ROLE='bold'NoteREMAP='Body'ROLE='italic'setwritemode currently works only with ROLE='italic'line, ROLE='italic'linerel, ROLE='italic'lineto, ROLE='italic'rectangle, and ROLE='italic'drawpoly.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='BOLD'drawpoly, ROLE='BOLD'line, ROLE='BOLD'linerel, ROLE='BOLD'lineto, ROLE='BOLD'putimage textheightMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Returns the height of a string in pixels.SyntaxFORMAT="LINESPECIFIC"int far textheight(char far *textstring);RemarksREMAP='BodyNoLead'The graphics function ROLE='italic'textheight takes the current font size and multiplication factor, and determines the height of ROLE='italic'textstring in pixels. This function is useful for adjusting the spacing between lines, computing viewport heights, sizing a title to make it fit on a graph or in a box, and so on.REMAP='Body'For example, with the 8x8 bit-mapped font and a multiplication factor of 1 (set by ROLE='italic'settextstyle), the string ROLE='italic'TurboC++ is 8 pixels high.REMAP='.ScanWord'ROLE='bold'NoteREMAP='Body'Use ROLE='italic'textheight to compute the height of strings, instead of doing the computations manually. By using this function, no source code modifications have to be made when different fonts are selected.Return valueREMAP='BodyNoLead'ROLE='italic'textheight returns the text height in pixels.See alsoREMAP='BodyNoLead'ROLE='BOLD'gettextsettings, ROLE='BOLD'outtext, ROLE='BOLD'outtextxy, ROLE='BOLD'settextstyle, ROLE='BOLD'textwidth textwidthMOREINFO="NONE"graphics.hFunctionREMAP='BodyNoLead'Returns the width of a string in pixels.SyntaxFORMAT="LINESPECIFIC"int far textwidth(char far *textstring);RemarksREMAP='BodyNoLead'The graphics function ROLE='italic'textwidth takes the string length, current font size, and multiplication factor, and determines the width of ROLE='italic'textstring in pixels.REMAP='Body'This function is useful for computing viewport widths, sizing a title to make it fit on a graph or in a box, and so on.REMAP='.ScanWord'ROLE='bold'NoteREMAP='Body'Use ROLE='italic'textwidth to compute the width of strings, instead of doing the computations manually. When you use this function, no source code modifications have to be made when different fonts are selected.Return valueREMAP='BodyNoLead'ROLE='italic'textwidth returns the text width in pixels.See alsoREMAP='BodyNoLead'ROLE='BOLD'gettextsettings, ROLE='BOLD'outtext, ROLE='BOLD'outtextxy, ROLE='BOLD'settextstyle, ROLE='BOLD'textheight REMAP='NumChapter'ID='X-12043'DOS-only functionsREMAP='Body'Except for the functions ROLE='BOLD'brk and ROLE='BOLD'sbrk (which are available on DOS and UNIX), the functions described in this chapter are available only for 16-bit DOS applications. The ROLE='italic'Library Reference, TARGETDOCENT='xref.dosrtl.mif.bccl' LOCALINFO='X-32797' nd.ent='xref.dosrtl.mif.bccl' nd.pub='' nd.sys='bc_cl' nn.not='EBT-BOOK' nn.pub='EBT' nn.sys=''Chapter 3, describes additional functions; some of those functions can also be used in 16-bit DOS applications. The descriptions of some of the functions listed in the ROLE='bold'See also entries of this chapter can be found in TARGETDOCENT='xref.dosrtl.mif.bccl' LOCALINFO='X-32797' nd.ent='xref.dosrtl.mif.bccl' nd.pub='' nd.sys='bc_cl' nn.not='EBT-BOOK' nn.pub='EBT' nn.sys=''Chapter 3 of the ROLE='italic'Library Reference.absreadMOREINFO="NONE"dos.hFunctionREMAP='BodyNoLead'Reads absolute disk sectors.SyntaxFORMAT="LINESPECIFIC"int absread(int drive, int nsects, long lsect, void *buffer);RemarksREMAP='BodyNoLead'ROLE='italic'absread reads specific disk sectors. It ignores the logical structure of a disk and pays no attention to files, FATs, or directories.REMAP='Body'ROLE='italic'absread uses DOS interrupt 0x25 to read specific disk sectors.COLS='3' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='36*'COLNAME='C2' COLWIDTH='24*'COLNAME='C3' COLWIDTH='240*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'driveCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'=COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'drive number to read (0 = A, 1 = B, etc.)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'nsectsCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'=COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'number of sectors to readCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'lsectCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'=COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'beginning logical sector numberCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'bufferCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'=COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'memory address where the data is to be readREMAP='Body'The number of sectors to read is limited to 64K or the size of the buffer, whichever is smaller.Return valueREMAP='BodyNoLead'If it is successful, ROLE='italic'absread returns 0.REMAP='Body'On error, the routine returns -1 and sets the global variable ROLE='italic'errno to the value returned by the system call in the AX register.See alsoREMAP='BodyNoLead'ROLE='italic'abswrite, biosdisk abswriteMOREINFO="NONE"dos.hFunctionREMAP='BodyNoLead'Writes absolute disk sectors.SyntaxFORMAT="LINESPECIFIC"int abswrite(int drive, int nsects, long lsect, void *buffer);RemarksREMAP='BodyNoLead'ROLE='italic'abswrite writes specific disk sectors. It ignores the logical structure of a disk and pays no attention to files, FATs, or directories.REMAP='.ScanWord'ROLE='bold'NoteREMAP='Body'If used improperly, ROLE='italic'abswrite can overwrite files, directories, and FATs.REMAP='Body'ROLE='italic'abswrite uses DOS interrupt 0x26 to write specific disk sectors.COLS='3' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='42*'COLNAME='C2' COLWIDTH='24*'COLNAME='C3' COLWIDTH='240*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'driveCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'=COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'drive number to write to (0 = A, 1 = B, etc.)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'nsectsCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'=COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'number of sectors to write toCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'lsectCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'=COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'beginning logical sector numberCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'bufferCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'=COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'memory address where the data is to be writtenREMAP='Body'The number of sectors to write to is limited to 64K or the size of the buffer, whichever is smaller.Return valueREMAP='BodyNoLead'If it is successful, ROLE='italic'abswrite returns 0.REMAP='Body'On error, the routine returns -1 and sets the global variable ROLE='italic'errno to the value of the AX register returned by the system call.See alsoREMAP='BodyNoLead'ROLE='BOLD'absread, ROLE='BOLD'biosdisk allocmem, _dos_allocmemMOREINFO="NONE"dos.hFunctionREMAP='BodyNoLead'Allocates DOS memory segment.SyntaxFORMAT="LINESPECIFIC"int allocmem(unsigned size, unsigned *segp);
unsigned _dos_allocmem(unsigned size, unsigned *segp);RemarksREMAP='BodyNoLead'ROLE='italic'allocmem and ROLE='italic'_dos_allocmem use the DOS system call 0x48 to allocate a block of free memory and return the segment address of the allocated block.REMAP='Body'ROLE='italic'size is the desired size in paragraphs (a paragraph is 16 bytes). ROLE='italic'segp is a pointer to a word that will be assigned the segment address of the newly allocated block.REMAP='Body'For ROLE='italic'allocmem, if not enough room is available, no assignment is made to the word pointed to by ROLE='italic'segp.REMAP='Body'For ROLE='italic'_dos_allocmem, if not enough room is available, the size of the largest available block will be stored in the word pointed to by ROLE='italic'segp.REMAP='Body'All allocated blocks are paragraph-aligned.REMAP='.ScanBold'ROLE='bold'NoteREMAP='Body'ROLE='italic'allocmem and ROLE='italic'_dos_allocmem cannot coexist with ROLE='italic'malloc.Return valueREMAP='BodyNoLead'ROLE='italic'allocmem returns -1 on success. In the event of error, ROLE='italic'allocmem returns a number indicating the size in paragraphs of the largest available block.REMAP='Body'ROLE='italic'_dos_allocmem returns 0 on success. In the event of error, ROLE='italic'_dos_allocmem returns the DOS error code and sets the word pointed to by ROLE='italic'segp to the size in paragraphs of the largest available block.REMAP='Body'An error return from ROLE='italic'allocmem or ROLE='italic'_dos_allocmem sets the global variable ROLE='italic'_doserrno and sets the global variable errno to the following:COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='72*'COLNAME='C2' COLWIDTH='144*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ENOMEMCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Not enough memorySee alsoREMAP='BodyNoLead'ROLE='italic'coreleft, freemem, malloc, setblock bioscomMOREINFO="NONE"bios.hFunctionREMAP='BodyNoLead'Performs serial I/O.SyntaxFORMAT="LINESPECIFIC"int bioscom(int cmd, char abyte, int port);RemarksREMAP='BodyNoLead'ROLE='italic'bioscom performs various RS-232 communications over the I/O port given in ROLE='italic'port.REMAP='Body'A ROLE='italic'port value of 0 corresponds to COM1, 1 corresponds to COM2, and so forth.REMAP='Body'The value of ROLE='italic'cmd can be one of the followinROLE='BOLD'g:COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='24*'COLNAME='C2' COLWIDTH='277*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'0COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Sets the communications parameters to the value in ROLE='italic'abyte.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'1COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Sends the character in ROLE='italic'abyte out over the communications line.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'2COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Receives a character from the communications line.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'3COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Returns the current status of the communications port.REMAP='Body'ROLE='italic'abyte is a combination of the following bits (one value is selected from each of the groups):COLS='4' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='48*'COLNAME='C2' COLWIDTH='72*'COLNAME='C3' COLWIDTH='48*'COLNAME='C4' COLWIDTH='72*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'0x02COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'7 data bitsCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'0x00COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body' 110 baudCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'0x03COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'8 data bitsCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'0x20COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body' 150 baudCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'0x40COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body' 300 baudCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'0x00COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'1 stop bitCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'0x60COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body' 600 baudCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'0x04COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'2 stop bitsCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'0x80COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'1200 baudCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'0x00COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'No parityCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'0xA0COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'2400 baudCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'0x08COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Odd parityCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'0xC0COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'4800 baudCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'0x18COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Even parityCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'0xE0COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'9600 baudREMAP='Body'For example, a value of 0xEB (0xE0|0x08|0x00|0x03) for ROLE='italic'abyte sets the communications port to 9600 baud, odd parity, 1 stop bit, and 8 data bits. ROLE='italic'bioscom uses the BIOS 0x14 interrupt.Return valueREMAP='BodyNoLead'For all values of ROLE='italic'cmd, bioscom returns a 16-bit integer, of which the upper 8 bits are status bits and the lower 8 bits vary, depending on the value of ROLE='italic'cmd. The upper bits of the return value are defined as follows:COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='48*'COLNAME='C2' COLWIDTH='144*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 15COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Time outCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 14COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Transmit shift register emptyCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 13COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Transmit holding register emptyCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 12COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Break detectCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 11COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Framing errorCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 10COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Parity errorCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 9COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Overrun errorCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 8COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Data readyREMAP='Body'If the ROLE='italic'abyte value could not be sent, bit 15 is set to 1. Otherwise, the remaining upper and lower bits are appropriately set. For example, if a framing error has occurred, bit 11 is set to 1.REMAP='Body'With a ROLE='italic'cmd value of 2, the byte read is in the lower bits of the return value if there is no error. If an error occurs, at least one of the upper bits is set to 1. If no upper bits are set to 1, the byte was received without error.REMAP='Body'With a ROLE='italic'cmd value of 0 or 3, the return value has the upper bits set as defined, and the lower bits are defined as follows:COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='48*'COLNAME='C2' COLWIDTH='240*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 7COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Received line signal detectCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 6COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Ring indicatorCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 5COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Data set readyCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 4COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Clear to sendCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 3COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Change in receive line signal detectorCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 2COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Trailing edge ring detector COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 1COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Change in data set readyCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 0COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Change in clear to sendbiosdiskMOREINFO="NONE"bios.hFunctionREMAP='BodyNoLead'Issues BIOS disk drive services.SyntaxFORMAT="LINESPECIFIC"int biosdisk(int cmd, int drive, int head, int track, int sector, int nsects, void *buffer);RemarksREMAP='BodyNoLead'ROLE='italic'biosdisk uses interrupt 0x13 to issue disk operations directly to the BIOS.REMAP='Body'ROLE='italic'drive is a number that specifies which disk drive is to be used: 0 for the first floppy disk drive, 1 for the second floppy disk drive, 2 for the third, and so on. For hard disk drives, a ROLE='italic'drive value of 0x80 specifies the first drive, 0x81 specifies the second, 0x82 the third, and so forth.REMAP='Body'For hard disks, the physical drive is specified, not the disk partition. If necessary, the application program must interpret the partition table information itself.REMAP='Body'ROLE='italic'cmd indicates the operation to perform. Depending on the value of ROLE='italic'cmd, the other parameters might or might not be needed.REMAP='Body'Here are the possible values for ROLE='italic'cmd for the IBM PC, XT, AT, or PS/2, or any compatible system:COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='36*'COLNAME='C2' COLWIDTH='324*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'ROLE='BOLD'ValueCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'DescriptionVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body' 0COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Resets disk system, forcing the drive controller to do a hard reset. All other parameters are ignored.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body' 1COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Returns the status of the last disk operation. All other parameters are ignored.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body' 2COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Reads one or more disk sectors into memory. The starting sector to read is given by ROLE='italic'head, ROLE='italic'track, and ROLE='italic'sector. The number of sectors is given by ROLE='italic'nsects. The data is read, 512 bytes per sector, into ROLE='italic'buffer.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body' 3COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Writes one or more disk sectors from memory. The starting sector to write is given by ROLE='italic'head, ROLE='BOLD'track, and ROLE='BOLD'sector. The number of sectors is given by ROLE='italic'nsects. The data is written, 512 bytes per sector, from ROLE='italic'buffer.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body' 4COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Verifies one or more sectors. The starting sector is given by ROLE='BOLD'head, ROLE='BOLD'track, and ROLE='BOLD'sector. The number of sectors is given by ROLE='italic'nsects.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body' 5COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Formats a track. The track is specified by ROLE='BOLD'head and ROLE='italic'track. ROLE='italic'buffer points to a table of sector headers to be written on the named ROLE='BOLD'track. See the ROLE='italic'Technical Reference Manual for the IBM PC for a description of this table and the format operation.REMAP='Body'The following cmd values are allowed only for the XT, AT, PS/2, and compatibles:COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='36*'COLNAME='C2' COLWIDTH='251*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'ValueCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'DescriptionVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'6COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Formats a track and sets bad sector flags.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'7COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Formats the drive beginning at a specific track.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'8COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Returns the current drive parameters. The drive information is returned in ROLE='italic'buffer in the first 4 bytes.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'9COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Initializes drive-pair characteristics.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'10COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Does a long read, which reads 512 plus 4 extra bytes per sector.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'11COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Does a long write, which writes 512 plus 4 extra bytes per sector.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'12COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Does a disk seek.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'13COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Alternates disk reset.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'14COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Reads sector buffer.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'15COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Writes sector buffer.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'16COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Tests whether the named drive is ready.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'17COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Recalibrates the drive.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'18COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Controller RAM diagnostic.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'19COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Drive diagnostic.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'20COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Controller internal diagnostic.REMAP='.ScanBold'ROLE='bold'NoteREMAP='Body'ROLE='italic'biosdisk operates below the level of files on raw sectors. ROLE='italic'It can destoy file contents and directories on a hard disk.Return valueREMAP='BodyNoLead'ROLE='italic'biosdisk returns a status byte composed of the following bits:COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='36*'COLNAME='C2' COLWIDTH='204*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'BitsCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'DescriptionVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0x00COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Operation successful.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0x01COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Bad command.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0x02COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Address mark not found.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0x03COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Attempt to write to write-protected disk.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0x04COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Sector not found.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0x05COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Reset failed (hard disk).COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0x06COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Disk changed since last operation.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0x07COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Drive parameter activity failed.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0x08COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Direct memory access (DMA) overrun.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0x09COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Attempt to perform DMA across 64K boundary.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0x0ACOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Bad sector detected.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0x0BCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Bad track detected.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0x0CCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Unsupported track.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0x10COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Bad CRC/ECC on disk read.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0x11COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'CRC/ECC corrected data error.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0x20COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Controller has failed.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0x40COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Seek operation failed.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0x80COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Attachment failed to respond.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0xAACOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Drive not ready (hard disk only).COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0xBBCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Undefined error occurred (hard disk only).COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0xCCCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Write fault occurred.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0xE0COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Status error.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0xFFCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Sense operation failed.REMAP='Blurb' ROLE='indent1'0x11 is not an error because the data is correct. The value is returned to give the application an opportunity to decide for itself.See alsoREMAP='BodyNoLead'ROLE='BOLD'absread, ROLE='BOLD'abswrite _bios_diskMOREINFO="NONE"bios.hFunctionREMAP='BodyNoLead'Issues BIOS disk drive servicesSyntaxFORMAT="LINESPECIFIC"unsigned _bios_disk(unsigned cmd, struct diskinfo_t *dinfo);RemarksREMAP='BodyNoLead'ROLE='italic'_bios_disk uses interrupt 0x13 to issue disk operations directly to the BIOS. The ROLE='italic'cmd argument specifies the operation to perform, and ROLE='italic'dinfo points to a ROLE='italic'diskinfo_t structure that contains the remaining parameters required by the operation.REMAP='Body'The ROLE='italic'diskinfo_t structure (defined in bios.h) has the following format:FORMAT="LINESPECIFIC"struct diskinfo_t {
unsigned drive, head, track, sector, nsectors;
void far *buffer;
};REMAP='Body'ROLE='italic'drive is a number that specifies which disk drive is to be used: 0 for the first floppy disk drive, 1 for the second floppy disk drive, 2 for the third, and so on. For hard disk drives, a ROLE='italic'drive value of 0x80 specifies the first drive, 0x81 specifies the second, 0x82 the third, and so forth.REMAP='Body'For hard disks, the physical drive is specified, not the disk partition. If necessary, the application program must interpret the partition table information itself.REMAP='Body'Depending on the value of ROLE='italic'cmd, the other parameters in the ROLE='italic'diskinfo_t structure might or might not be needed.REMAP='Body'The possible values for ROLE='italic'cmd (defined in bios.h) are the following:COLS='3' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='72*'COLNAME='C2' COLWIDTH='36*'COLNAME='C3' COLWIDTH='252*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'ValueCOLNAME='C2' MOREROWS='0' NAMEEND='C3' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'DescriptionVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_DISK_RESETCOLNAME='C2' MOREROWS='0' NAMEEND='C3' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Resets disk system, forcing the drive controller to do a hard reset. All ROLE='italic'diskinfo_t parameters are ignored.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_DISK_STATUSCOLNAME='C2' MOREROWS='0' NAMEEND='C3' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Returns the status of the last disk operation. All ROLE='italic'diskinfo_t parameters are ignored.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_DISK_READCOLNAME='C2' MOREROWS='0' NAMEEND='C3' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Reads one or more disk sectors into memory. The starting sector to read is given by ROLE='italic'head, ROLE='italic'track, and ROLE='italic'sector. The number of sectors is given by ROLE='italic'nsectors. The data is read, 512 bytes per sector, into ROLE='italic'buffer. If the operation is successful, the high byte of the return value will be 0 and the low byte will contain the number of sectors. If an error occurred, the high byte of the return value will have one of the following values:COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0x01COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Bad command.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0x02COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Address mark not found.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0x03COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Attempt to write to write-protected disk.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0x04COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Sector not found.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0x05COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Reset failed (hard disk).COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0x06COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Disk changed since last operation.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0x07COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Drive parameter activity failed.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0x08COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Direct memory access (DMA) overrun.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0x09COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Attempt to perform DMA across 64K boundary.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0x0ACOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Bad sector detected.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0x0BCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Bad track detected.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0x0CCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Unsupported track.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0x10COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Bad CRC/ECC on disk read.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0x11COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'CRC/ECC corrected data error.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0x20COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Controller has failed.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0x40COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Seek operation failed.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0x80COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Attachment failed to respond.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0xAACOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Drive not ready (hard disk only).COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0xBBCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Undefined error occurred (hard disk only).COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0xCCCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Write fault occurred.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0xE0COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Status error.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0xFFCOLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'Sense operation failed.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C3' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'0x11 is not an error because the data is correct. The value is returned to give the application an opportunity to decide for itself.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_DISK_WRITECOLNAME='C2' MOREROWS='0' NAMEEND='C3' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Writes one or more disk sectors from memory. The starting sector to write is given by ROLE='italic'head, ROLE='italic'track, and ROLE='italic'sector. The number of sectors is given by ROLE='BOLD'nsectors. The data is written, 512 bytes per sector, from ROLE='italic'buffer. See _DISK_READ (above) for a description of the return value.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_DISK_VERIFYCOLNAME='C2' MOREROWS='0' NAMEEND='C3' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Verifies one or more sectors. The starting sector is given by ROLE='italic'head, ROLE='italic'track, and ROLE='italic'sector. The number of sectors is given by ROLE='italic'nsectors. See _DISK_READ (above) for a description of the return value.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_DISK_FORMATCOLNAME='C2' MOREROWS='0' NAMEEND='C3' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Formats a track. The track is specified by ROLE='italic'head and ROLE='italic'track. ROLE='italic'buffer points to a table of sector headers to be written on the named ROLE='BOLD'track. See the ROLE='italic'Technical Reference Manual for the IBM PC for a description of this table and the format operation.Return valueREMAP='BodyNoLead'ROLE='italic'_bios_disk returns the value of the AX register set by the INT 0x13 BIOS call.See AlsoREMAP='BodyNoLead'ROLE='BOLD'absread, ROLE='BOLD'abswrite, ROLE='italic'biosdisk bioskeyMOREINFO="NONE"bios.hFunctionREMAP='BodyNoLead'Keyboard interface, using BIOS services directly.SyntaxFORMAT="LINESPECIFIC"int bioskey(int cmd);RemarksREMAP='BodyNoLead'ROLE='italic'bioskey performs various keyboard operations using BIOS interrupt 0x16. The parameter cmd determines the exact operation.Return valueREMAP='BodyNoLead'The value returned by bioskey depends on the task it performs, determined by the value of ROLE='italic'cmd:COLS='4' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='35*'COLNAME='C2' COLWIDTH='50*'COLNAME='C3' COLWIDTH='50*'COLNAME='C4' COLWIDTH='225*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'ValueCOLNAME='C2' MOREROWS='0' NAMEEND='C4' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'DescriptionVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C2' MOREROWS='0' NAMEEND='C4' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'If the lower 8 bits are nonzero, ROLE='BOLD'bioskey returns the ASCII character for the next keystroke waiting in the queue or the next key pressed at the keyboard. If the lower 8 bits are zero, the upper 8 bits are the extended keyboard codes defined in the IBM PC ROLE='italic'Technical Reference Manual.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C2' MOREROWS='0' NAMEEND='C4' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'This tests whether a keystroke is available to be read. A return value of zero means no key is available. The return value is 0xFFFFF (-1) if ROLE='italic'Ctrl-Brk has been pressed. Otherwise, the value of the next keystroke is returned. The keystroke itself is kept to be returned by the next call to ROLE='italic'bioskey that has a ROLE='italic'cmd value of zero.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C2' MOREROWS='0' NAMEEND='C4' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Requests the current shift key status. The value is obtained by ORing the following values together:COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Bit 7COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0x80COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'Insert onCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Bit 6COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0x40COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'Caps onCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Bit 5COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0x20COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'Num Lock onCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Bit 4COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0x10COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'Scroll Lock onCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Bit 3COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0x08COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'Alt pressedCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Bit 2COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0x04COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'Ctrl pressedCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Bit 1COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0x02COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'Left ArrowROLE='BOLD' ROLE='italic'Shift pressedCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Bit 0COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0x01COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'Right Arrow ROLE='italic'Shift pressed_bios_keybrdMOREINFO="NONE"bios.hFunctionREMAP='BodyNoLead'Keyboard interface, using BIOS services directly.SyntaxFORMAT="LINESPECIFIC"unsigned _bios_keybrd(unsigned cmd);RemarksREMAP='BodyNoLead'ROLE='italic'_bios_keybrd performs various keyboard operations using BIOS interrupt 0x16. The parameter ROLE='italic'cmd determines the exact operation.Return valueREMAP='BodyNoLead'The value returned by ROLE='italic'_bios_keybrd depends on the task it performs, determined by the value of ROLE='italic'cmd (defined in bios.h):COLS='4' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='111*'COLNAME='C2' COLWIDTH='48*'COLNAME='C3' COLWIDTH='48*'COLNAME='C4' COLWIDTH='156*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'ValueCOLNAME='C2' MOREROWS='0' NAMEEND='C4' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'DescriptionVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_KEYBRD_READCOLNAME='C2' MOREROWS='0' NAMEEND='C4' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'If the lower 8 bits are nonzero, ROLE='italic'_bios_keybrd returns the ASCII character for the next keystroke waiting in the queue or the next key pressed at the keyboard. If the lower 8 bits are zero, the upper 8 bits are the extended keyboard codes defined in the IBM PC ROLE='italic'Technical Reference Manual.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_NKEYBRD_READCOLNAME='C2' MOREROWS='0' NAMEEND='C4' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Use this value instead of _KEYBRD_READY to read the keyboard codes for enhanced keyboards, which have additional cursor and function keys.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_KEYBRD_READYCOLNAME='C2' MOREROWS='0' NAMEEND='C4' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'This tests whether a keystroke is available to be read. A return value of zero means no key is available. The return value is 0xFFFF (-1) if ROLE='italic'Ctrl- Brk has been pressed. Otherwise, the value of the next keystroke is returned, as described in _KEYBRD_READ (above). The keystroke itself is kept to be returned by the next call to ROLE='italic'_bios_keybrd that has a ROLE='italic'cmd value of _KEYBRD_READ or _NKEYBRD_READ.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_NKEYBRD_READYCOLNAME='C2' MOREROWS='0' NAMEEND='C4' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Use this value to check the status of enhanced keyboards, which have additional cursor and function keys.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_KEYBRD_SHIFTSTATUSCOLNAME='C2' MOREROWS='0' NAMEEND='C4' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Requests the current shift key status. The value will contain an OR of zero or more of the following values:COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Bit 7COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0x80COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'Insert onCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Bit 6COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0x40COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'Caps onCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Bit 5COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0x20COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'Num Lock onCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Bit 4COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0x10COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'Scroll Lock onCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Bit 3COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0x08COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'Alt pressedCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Bit 2COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0x04COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'Ctrl pressedCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Bit 1COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0x02COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'LeftROLE='BOLD' ROLE='italic'Shift pressedCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Bit 0COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0x01COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'RightROLE='BOLD' ROLE='italic'Shift pressedCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_NKEYBRD_SHIFTSTATUSCOLNAME='C2' MOREROWS='0' NAMEEND='C4' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Use this value instead of _KEYBRD_SHIFTSTATUS to request the full 16-bit shift key status for enhanced keyboards. The return value will contain an OR of zero or more of the bits defined above in _KEYBRD_SHIFTSTATUS, and additionally, any of the following bits:COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Bit 15COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0x8000COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'Sys Req pressedCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Bit 14COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0x4000COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'Caps Lock pressedCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Bit 13COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0x2000COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'Num Lock pressedCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Bit 12COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0x1000COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'ROLE='italic'Scroll Lock pressedCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Bit 11COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0x0800COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'RightROLE='BOLD' ROLE='italic'Alt pressedCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Bit 10COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0x0400COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'RightROLE='BOLD' ROLE='italic'Ctrl pressedCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Bit 9COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0x0200COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'LeftROLE='BOLD' ROLE='italic'Alt pressedCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Bit 8COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Tbl.Body'0x0100COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Tbl.Body'LeftROLE='BOLD' ROLE='italic'Ctrl pressedbiosprintMOREINFO="NONE"bios.hFunctionREMAP='BodyNoLead'Printer I/O using BIOS services directly.SyntaxFORMAT="LINESPECIFIC"int biosprint(int cmd, int abyte, int port);RemarksREMAP='BodyNoLead'ROLE='italic'biosprint performs various printer functions on the printer identified by the parameter port using BIOS interrupt 0x17.REMAP='Body'A ROLE='italic'port value of 0 corresponds to LPT1; a ROLE='italic'port value of 1 corresponds to LPT2; and so on.REMAP='Body'The value of ROLE='italic'cmd can be one of the followingROLE='BOLD':COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='24*'COLNAME='C2' COLWIDTH='157*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'0COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Prints the character in ROLE='italic'abyte.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'1COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Initializes the printer port.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'2COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Reads the printer status.REMAP='Body'The value of ROLE='italic'abyte can be 0 to 255.Return valueREMAP='BodyNoLead'The value returned from any of these operations is the current printer status, which is obtained by ORing these bit values together:COLS='3' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='36*'COLNAME='C2' COLWIDTH='48*'COLNAME='C3' COLWIDTH='124*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 0COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'0x01COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'Device time outCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 3COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'0x08COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'I/O errorCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 4COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'0x10COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'SelectedCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 5COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'0x20COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'Out of paperCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 6COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'0x40COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'AcknowledgeCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 7COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'0x80COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'Not busy_bios_printerMOREINFO="NONE"bios.hFunctionREMAP='BodyNoLead'Printer I/O using BIOS services directly.SyntaxFORMAT="LINESPECIFIC"unsigned _bios_printer(int cmd, int port, int abyte);RemarksREMAP='BodyNoLead'ROLE='italic'_bios_printer performs various printer functions on the printer identified by the parameter ROLE='italic'port using BIOS interrupt 0x17.REMAP='Body'A ROLE='italic'port value of 0 corresponds to LPT1; a ROLE='italic'port value of 1 corresponds to LPT2; and so on.REMAP='Body'The value of ROLE='italic'cmd caROLE='BOLD'n be one of the following values (defined in bios.h):COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='96*'COLNAME='C2' COLWIDTH='267*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'_PRINTER_WRITECOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Prints the character in ROLE='italic'abyte. The value of ROLE='italic'abyte can be 0 to 255.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'_PRINTER_INITCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Initializes the printer port. The ROLE='italic'abyte argument is ignored.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'_PRINTER_STATUSCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Reads the printer status. The ROLE='italic'abyte argument is ignored.Return valueREMAP='BodyNoLead'The value returned from any of these operations is the current printer status, which is obtained by ORing these bit values together:COLS='3' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='48*'COLNAME='C2' COLWIDTH='48*'COLNAME='C3' COLWIDTH='165*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 0COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'0x01COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'Device time outCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 3COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'0x08COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'I/O errorCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 4COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'0x10COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'SelectedCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 5COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'0x20COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'Out of paperCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 6COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'0x40COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'AcknowledgeCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 7COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'0x80COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'Not busy_bios_serialcomMOREINFO="NONE"bios.hFunctionREMAP='BodyNoLead'Performs serial I/O.SyntaxFORMAT="LINESPECIFIC"unsigned _bios_serialcom(int cmd, int port, char abyte);RemarksREMAP='BodyNoLead'ROLE='italic'_bios_serialcom performs various RS-232 communications over the I/O port given in ROLE='italic'port.REMAP='Body'A ROLE='italic'port value of 0 corresponds to COM1, 1 corresponds to COM2, and so forth.REMAP='Body'The value of ROLE='italic'cmd can be one of the following values (definROLE='BOLD'ed in bios.h):COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='72*'COLNAME='C2' COLWIDTH='231*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'ValueCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'DescriptionVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_COM_INITCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Sets the communications parameters to the value in ROLE='italic'abyte.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_COM_SENDCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Sends the character in ROLE='italic'abyte out over the communications line.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_COM_RECEIVECOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Receives a character from the communications line. The ROLE='italic'abyte argument is ignored.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_COM_STATUSCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Returns the current status of the communications port. The ROLE='italic'abyte argument is ignored.REMAP='Body'When ROLE='italic'cmd is _COM_INIT, ROLE='italic'abyte is a OR combination of the following bits:REMAP='Body'* Select only one of these:COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='99*'COLNAME='C2' COLWIDTH='163*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_COM_CHR7COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'7 data bitsCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_COM_CHR8COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'8 data bitsREMAP='Body'* Select only one of these:COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='99*'COLNAME='C2' COLWIDTH='161*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_COM_STOP1COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'1 stop bitCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_COM_STOP2COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'2 stop bitsREMAP='Body'* Select only one of these:COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='99*'COLNAME='C2' COLWIDTH='161*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_COM_NOPARITYCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'No parityCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_COM_ODDPARITYCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Odd parityCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_COM_EVENPARITYCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Even parityREMAP='Body'* Select only one of these:COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='99*'COLNAME='C2' COLWIDTH='160*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_COM_110COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'110 baudCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_COM_150COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'150 baudCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_COM_300COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'300 baudCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_COM_600COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'600 baudCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_COM_1200COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'1200 baudCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_COM_2400COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'2400 baudCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_COM_4800COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'4800 baudCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'_COM_9600COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'9600 baudREMAP='Body'For example, a value of (_COM_9600 | _COM_ODDPARITY | _COM_STOP1 | _COM_CHR8) for ROLE='italic'abyte sets the communications port to 9600 baud, odd parity, 1 stop bit, and 8 data bits. ROLE='italic'_bios_serialcom uses the BIOS 0x14 interrupt.Return valueREMAP='BodyNoLead'For all values of ROLE='italic'cmd, ROLE='italic'_bios_serialcom returns a 16-bit integer of which the upper 8 bits are status bits and the lower 8 bits vary, depending on the value of ROLE='italic'cmd. The upper bits of the return value are defined as follows:COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='60*'COLNAME='C2' COLWIDTH='234*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 15COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Time outCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 14COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Transmit shift register emptyCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 13COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Transmit holding register emptyCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 12COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Break detectCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 11COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Framing errorCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 10COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Parity errorCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 9COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Overrun errorCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 8COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Data readyREMAP='Body'If the ROLE='italic'abyte value could not be sent, bit 15 is set to 1. Otherwise, the remaining upper and lower bits are appropriately set. For example, if a framing error has occurred, bit 11 is set to 1.REMAP='Body'With a ROLE='italic'cmd value of _COM_RECEIVE, the byte read is in the lower bits of the return value if there is no error. If an error occurs, at least one of the upper bits is set to 1. If no upper bits are set to 1, the byte was received without error.REMAP='Body'With a ROLE='italic'cmd value of _COM_INIT or _COM_STATUS, the return value has the upper bits set as defined, and the lower bits are defined as follows:COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='72*'COLNAME='C2' COLWIDTH='198*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 7COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Received line signal detectCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 6COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Ring indicatorCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 5COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Data set readyCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 4COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Clear to sendCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 3COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Change in receive line signal detectorCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 2COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Trailing edge ring detectorCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 1COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Change in data set readyCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'Bit 0COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Change in clear to sendbrkMOREINFO="NONE"alloc.hFunctionREMAP='BodyNoLead'Changes data-segment space allocation.SyntaxFORMAT="LINESPECIFIC"int brk(void *addr);RemarksREMAP='BodyNoLead'ROLE='italic'brk dynamically changes the amount of space allocated to the calling program's heap. The change is made by resetting the program's ROLE='italic'break value, which is the address of the first location beyond the end of the data segment. The amount of allocated space increases as the break value increases.REMAP='Body'ROLE='italic'brk sets the break value to ROLE='italic'addr and changes the allocated space accordingly.REMAP='Body'This function will fail without making any change in the allocated space if such a change would allocate more space than is allowable.Return valueREMAP='BodyNoLead'Upon successful completion, ROLE='italic'brk returns a value of 0. On failure, this function returns a value of -1 and the global variable ROLE='italic'errno is set to the following:COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='72*'COLNAME='C2' COLWIDTH='177*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ENOMEMCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Not enough memorySee alsoREMAP='BodyNoLead'ROLE='BOLD'coreleft, ROLE='BOLD'sbrk coreleftMOREINFO="NONE"alloc.hFunctionREMAP='BodyNoLead'Returns a measure of unused RAM memory.SyntaxREMAP='BodyNoLead'ROLE='italic'In the tiny, small, and medium models:FORMAT="LINESPECIFIC"unsigned coreleft(void);REMAP='Body'ROLE='italic'In the compact, large, and huge models:FORMAT="LINESPECIFIC"unsigned long coreleft(void);RemarksREMAP='BodyNoLead'ROLE='italic'coreleft returns a measure of RAM memory not in use. It gives a different measurement value, depending on whether the memory model is of the small data group or the large data group.Return valueREMAP='BodyNoLead'In the small data models, ROLE='italic'coreleft returns the amount of unused memory between the top of the heap and the stack. In the large data models, ROLE='italic'coreleft returns the amount of memory between the highest allocated block and the end of available memory.See alsoREMAP='BodyNoLead'ROLE='BOLD'allocmem, ROLE='BOLD'brk, ROLE='BOLD'farcoreleft, ROLE='BOLD'malloc delayMOREINFO="NONE"dos.hFunctionREMAP='BodyNoLead'Suspends execution for an interval (milliseconds).SyntaxFORMAT="LINESPECIFIC"void delay(unsigned milliseconds);RemarksREMAP='BodyNoLead'With a call to ROLE='italic'delay, the current program is suspended from execution for the number of milliseconds specified by the argument ROLE='italic'milliseconds. It is no longer necessary to make a calibration call to delay before using it. ROLE='italic'delay is accurate to a millisecond.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='BOLD'nosound, ROLE='BOLD'sleep, ROLE='BOLD'sound farcoreleftMOREINFO="NONE"alloc.hFunctionREMAP='BodyNoLead'Returns a measure of unused memory in far heap.SyntaxFORMAT="LINESPECIFIC"unsigned long farcoreleft(void);RemarksREMAP='BodyNoLead'ROLE='italic'farcoreleft returns a measure of the amount of unused memory in the far heap beyond the highest allocated block.REMAP='Body'A tiny model program cannot make use of ROLE='italic'farcoreleft.Return valueREMAP='BodyNoLead'ROLE='italic'farcoreleft returns the total amount of space left in the far heap, between the highest allocated block and the end of available memory.See alsoREMAP='BodyNoLead'ROLE='BOLD'coreleft, ROLE='BOLD'farcalloc, ROLE='BOLD'farmalloc farheapcheckMOREINFO="NONE"alloc.hFunctionREMAP='BodyNoLead'Checks and verifies the far heap.SyntaxFORMAT="LINESPECIFIC"int farheapcheck(void);RemarksREMAP='BodyNoLead'ROLE='italic'farheapcheck walks through the far heap and examines each block, checking its pointers, size, and other critical attributes.Return valueREMAP='BodyNoLead'The return value is less than zero for an error and greater than zero for success.REMAP='Body'_HEAPEMPTY is returned if there is no heap (value 1)._HEAPOK is returned if the heap is verified (value 2)._HEAPCORRUPT is returned if the heap has been corrupted (value -1).See alsoREMAP='BodyNoLead'ROLE='italic'heapcheck farheapcheckfreeMOREINFO="NONE"alloc.hFunctionREMAP='BodyNoLead'Checks the free blocks on the far heap for a constant value.SyntaxFORMAT="LINESPECIFIC"int farheapcheckfree(unsigned int fillvalue);Return valueREMAP='BodyNoLead'The return value is less than zero for an error and greater than zero for success.REMAP='Body'_HEAPEMPTY is returned if there is no heap (value 1)._HEAPOK is returned if the heap is accurate (value 2)._HEAPCORRUPT is returned if the heap has been corrupted (value -1)._BADVALUE is returned if a value other than the fill value was found (value -3).See alsoREMAP='BodyNoLead'ROLE='BOLD'farheapfillfree, ROLE='BOLD'heapcheckfree farheapchecknodeMOREINFO="NONE"alloc.hFunctionREMAP='BodyNoLead'Checks and verifies a single node on the far heap.SyntaxFORMAT="LINESPECIFIC"int farheapchecknode(void *node);RemarksREMAP='BodyNoLead'If a node has been freed and ROLE='italic'farheapchecknode is called with a pointer to the freed block, ROLE='italic'farheapchecknode can return _BADNODE rather than the expected _FREEENTRY. This is because adjacent free blocks on the heap are merged, and the block in question no longer exists.Return valueREMAP='BodyNoLead'The return value is less than zero for an error and greater than zero for success.REMAP='Body'_HEAPEMPTY is returned if there is no heap (value 1)._HEAPCORRUPT is returned if the heap has been corrupted (value -1)._BADNODE is returned if the node could not be found (value -2)._FREEENTRY is returned if the node is a free block (value 3)._USEDENTRY is returned if the node is a used block (value 4).See alsoREMAP='BodyNoLead'ROLE='italic'heapchecknode farheapfillfreeMOREINFO="NONE"alloc.hFunctionREMAP='BodyNoLead'Fills the free blocks on the far heap with a constant value.SyntaxFORMAT="LINESPECIFIC"int farheapfillfree(unsigned int fillvalue);Return valueREMAP='BodyNoLead'The return value is less than zero for an error and greater than zero for success.REMAP='Body'_HEAPEMPTY is returned if there is no heap (value 1)._HEAPOK is returned if the heap is accurate (value 2)._HEAPCORRUPT is returned if the heap has been corrupted (value -1).See alsoREMAP='BodyNoLead'ROLE='BOLD'farheapcheckfree, ROLE='BOLD'heapfillfree farheapwalkMOREINFO="NONE"alloc.hFunctionREMAP='BodyNoLead'ROLE='italic'farheapwalk is used to "walk" through the far heap node by node.SyntaxFORMAT="LINESPECIFIC"int farheapwalk(struct farheapinfo *hi);RemarksREMAP='BodyNoLead'ROLE='italic'farheapwalk assumes the heap is correct. Use ROLE='italic'farheapcheck to verify the heap before using ROLE='italic'farheapwalk. _HEAPOK is returned with the last block on the heap. _HEAPEND will be returned on the next call to farheapwalk.REMAP='Body'ROLE='italic'farheapwalk receives a pointer to a structure of type ROLE='italic'heapinfo (defined in alloc.h). For the first call to ROLE='italic'farheapwalk, set the hi.ptr field to null. ROLE='italic'farheapwalk returns with hi.ptr containing the address of the first block. hi.size holds the size of the block in bytes. hi.in_use is a flag that's set if the block is currently in use.Return valueREMAP='BodyNoLead'_HEAPEMPTY is returned if there is no heap (value 1)._HEAPOK is returned if the heapinfo block contains valid data (value 2)._HEAPEND is returned if the end of the heap has been reached (value 5).See alsoREMAP='BodyNoLead'ROLE='italic'heapwalk freemem, _dos_freememMOREINFO="NONE"dos.hFunctionREMAP='BodyNoLead'Frees a previously allocated DOS memory block.SyntaxFORMAT="LINESPECIFIC"int freemem(unsigned segx);
unsigned _dos_freemem(unsigned segx);RemarksREMAP='BodyNoLead'ROLE='italic'freemem frees a memory block allocated by a previous call to allocmem.REMAP='Body'ROLE='italic'_dos_freemem frees a memory block allocated by a previous call to ROLE='italic'_dos_allocmem. ROLE='italic'segx is the segment address of that block.Return valueREMAP='BodyNoLead'ROLE='italic'freemem and ROLE='italic'_dos_freemem return 0 on success.REMAP='Body'In the event of error, ROLE='italic'freemem returns -1 and sets ROLE='italic'errno.REMAP='Body'In the event of error, ROLE='italic'_dos_freemem returns the DOS error code and sets ROLE='italic'errno.REMAP='Body'In the event of error, these functions set global variable ROLE='italic'errno to the following:COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='72*'COLNAME='C2' COLWIDTH='145*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ENOMEMCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Insufficient memorySee alsoREMAP='BodyNoLead'ROLE='italic'allocmem, _dos_allocmem, free harderr, hardresume, hardretnMOREINFO="NONE"dos.hFunctionREMAP='BodyNoLead'Establishes and handles hardware errors.SyntaxFORMAT="LINESPECIFIC"void harderr(int (*handler)());
void hardresume(int axret);
void hardretn(int retn);RemarksREMAP='BodyNoLead'The error handler established by ROLE='italic'harderr can call hardresume to return to DOS. The return value of the ROLE='italic'rescode (result code) of ROLE='italic'hardresume contains an abort (2), retry (1), or ignore (0) indicator. The abort is accomplished by invoking DOS interrupt 0x23, the control-break interrupt.REMAP='Body'The error handler established by ROLE='italic'harderr can return directly to the application program by calling ROLE='italic'hardretn. The returned value is whatever value you passed to ROLE='italic'hardretn.REMAP='Body'ROLE='italic'harderr establishes a hardware error handler for the current program. This error handler is invoked whenever an interrupt 0x24 occurs. (See your DOS reference manuals for a discussion of the interrupt.)REMAP='Body'The function pointed to by ROLE='italic'handler is called when such an interrupt occurs. The handler function is called with the following arguments:FORMAT="LINESPECIFIC"MOREINFO="NONE"handler(int errval, int ax, int bp, int si);REMAP='Body'ROLE='italic'errval is the error code set in the DI register by DOS. ROLE='italic'ax, bp, and ROLE='italic'si are the values DOS sets for the AX, BP, and SI registers, respectively.MARK='bullet'REMAP='Bullet1'ROLE='italic'ax indicates whether a disk error or other device error was encountered. If ROLE='italic'ax is nonnegative, a disk error was encountered; otherwise, the error was a device error. For a disk error, ROLE='italic'ax ANDed with 0x00FF gives the failing drive number (0 equals A, 1 equals B, and so on).REMAP='Bullet1'ROLE='italic'bp and ROLE='italic'si together point to the device driver header of the failing driver. bp contains the segment address, and si the offset.REMAP='Body'The function pointed to by ROLE='italic'handler is not called directly. harderr establishes a DOS interrupt handler that calls the function.REMAP='Body'The handler can issue DOS calls 1 through 0xC; any other DOS call corrupts DOS. In particular, any of the C standard I/O or UNIX-emulation I/O calls ROLE='italic'cannot be used.REMAP='Body'The handler must return 0 for ignore, 1 for retry, and 2 for abort.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='BOLD'peek, ROLE='BOLD'poke _harderrMOREINFO="NONE"dos.hFunctionREMAP='BodyNoLead'Establishes a hardware error handler.SyntaxFORMAT="LINESPECIFIC"void _harderr(int (far *handler)());RemarksREMAP='BodyNoLead'ROLE='italic'_harderr establishes a hardware error handler for the current program. This error handler is invoked whenever an interrupt 0x24 occurs. (See your DOS reference manuals for a discussion of the interrupt.)REMAP='Body'The function pointed to by ROLE='italic'handler is called when such an interrupt occurs. The handler function is called with the following arguments:FORMAT="LINESPECIFIC"void far handler(unsigned deverr, unsigned errval, unsigned far *devhdr);MARK='bullet'REMAP='Bullet1'ROLE='italic'deverr is the device error code (passed to the handler by DOS in the AX register).REMAP='Bullet1'ROLE='italic'errval is the error code (passed to the handler by DOS in the DI register).REMAP='Bullet1'ROLE='italic'devhdr a far pointer to the driver header of the device that caused the error (passed to the handler by DOS in the BP:SI register pair).REMAP='Blurb' ROLE='indent1'The handler should use these arguments instead of referring directly to the CPU registers.REMAP='Body'ROLE='italic'deverr indicates whether a disk error or other device error was encountered. If bit 15 of ROLE='italic'deverr is 0, a disk error was encountered. Otherwise, the error was a device error. For a disk error, ROLE='italic'deverr ANDed with 0x00FF give the failing drive number (0 equals A, 1 equals B, and so on).REMAP='Body'The function pointed to by ROLE='italic'handler is not called directly. ROLE='italic'_harderr establishes a DOS interrupt handler that calls the function.REMAP='Body'The handler can issue DOS calls 1 through 0xC; any other DOS call corrupts DOS. In particular, any of the C standard I/O or UNIX-emulation I/O calls ROLE='italic'cannot be used.REMAP='Body'The handler does not return a value, and it must exit using ROLE='italic'_hardretn or ROLE='italic'_hardresume.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='BOLD'_hardresume, ROLE='BOLD'_hardretn _hardresumeMOREINFO="NONE"dos.hFunctionREMAP='BodyNoLead'Hardware error handler.SyntaxFORMAT="LINESPECIFIC"void _hardresume(int rescode);RemarksREMAP='BodyNoLead'The error handler established by ROLE='italic'_harderr can call ROLE='italic'_hardresume to return to DOS. The return value of the ROLE='italic'rescode (result code) of ROLE='italic'_hardresume contains one of the following values:COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='120*'COLNAME='C2' COLWIDTH='242*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'_HARDERR_ABORTCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Abort the program by invoking DOS interrupt 0x23, the control-break interrupt.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'_HARDERR_IGNORECOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Ignore the error.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'_HARDERR_RETRYCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Retry the operation.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'_HARDERR_FAILCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Fail the operation.Return valueREMAP='BodyNoLead'The ROLE='italic'_hardresume function does not return a value, and does not return to the caller.See alsoREMAP='BodyNoLead'ROLE='BOLD'_harderr, ROLE='BOLD'_hardretn _hardretnMOREINFO="NONE"dos.hFunctionREMAP='BodyNoLead'Hardware error handler.SyntaxFORMAT="LINESPECIFIC"void _hardretn(int retn);RemarksREMAP='BodyNoLead'The error handler established by ROLE='italic'_harderr can return directly to the application program by calling ROLE='italic'_hardretn.REMAP='Body'If the DOS function that caused the error is less than 0x38, and it is a function that can indicate an error condition, then ROLE='italic'_hardretn will return to the application program with the AL register set to 0xFF. The ROLE='italic'retn argument is ignored for all DOS functions less than 0x38.REMAP='Body'If the DOS function is greater than or equal to 0x38, the ROLE='italic'retn argument should be a DOS error code; it is returned to the application program in the AX register. The carry flag is also set to indicate to the application that the operation resulted in an error.Return valueREMAP='BodyNoLead'The ROLE='italic'_hardresume function does not return a value, and does not return to the caller.See alsoREMAP='BodyNoLead'ROLE='BOLD'_harderr, ROLE='BOLD'_hardresume keep, _dos_keepMOREINFO="NONE"dos.hFunctionREMAP='BodyNoLead'Exits and remains resident.SyntaxFORMAT="LINESPECIFIC"void keep(unsigned char status, unsigned size);
void _dos_keep(unsigned char status, unsigned size);RemarksREMAP='BodyNoLead'ROLE='italic'keep and ROLE='italic'_dos_keep return to DOS with the exit status in ROLE='italic'status. The current program remains resident, however. The program is set to ROLE='italic'size paragraphs in length, and the remainder of the memory of the program is freed.REMAP='Body'ROLE='italic'keep and ROLE='italic'_dos_keep can be used when installing TSR programs. ROLE='italic'keep and ROLE='italic'_dos_keep use DOS function 0x31.REMAP='Body'Before ROLE='italic'_dos_keep exits, it calls any registered "exit functions" (posted with ROLE='italic'atexit), flushes file buffers, and restores interrupt vectors modified by the startup code.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='BOLD'abort, ROLE='BOLD'exit nosoundMOREINFO="NONE"dos.hFunctionREMAP='BodyNoLead'Turns PC speaker off.SyntaxFORMAT="LINESPECIFIC"void nosound(void);RemarksREMAP='BodyNoLead'Turns the speaker off after it has been turned on by a call to ROLE='italic'sound.Return valueREMAP='BodyNoLead'None.See alsoREMAP='BodyNoLead'ROLE='BOLD'delay, ROLE='BOLD'sound _OvrInitEmsMOREINFO="NONE"dos.hFunctionREMAP='BodyNoLead'Initializes expanded memory swapping for the overlay manager.SyntaxFORMAT="LINESPECIFIC"int _ _cdecl _ _far _OvrInitEms(unsigned emsHandle, unsigned firstPage, unsigned pages);RemarksREMAP='BodyNoLead'ROLE='italic'_OvrInitEms checks for the presence of expanded memory by looking for an EMS driver and allocating memory from it. If ROLE='italic'emsHandle is zero, the overlay manager allocates EMS pages and uses them for swapping. If ROLE='italic'emsHandle is not zero, then it should be a valid EMS handle; the overlay manager will use it for swapping. In that case, you can specify ROLE='italic'firstPage, where the swapping can start inside that area.REMAP='Body'In both cases, a nonzero ROLE='italic'pages parameter gives the limit of the usable pages by the overlay manager.Return valueREMAP='BodyNoLead'ROLE='italic'_OvrInitEms returns 0 if the overlay manager is able to use expanded memory for swapping.See alsoREMAP='BodyNoLead'ROLE='italic'_OvrInitExt, _ovrbuffer (global variable)_OvrInitExtMOREINFO="NONE"dos.hFunctionREMAP='BodyNoLead'Initializes extended memory swapping for the overlay manager.SyntaxFORMAT="LINESPECIFIC"int _ _cdecl _ _far _OvrInitExt(unsigned long startAddress, unsigned long length);RemarksREMAP='BodyNoLead'ROLE='italic'_OvrInitExt checks for the presence of extended memory, using the known methods to detect the presence of other programs using extended memory, and allocates memory from it. If ROLE='italic'startAddress is zero, the overlay manager determines the start address and uses, at most, the size of the overlays. If ROLE='italic'startAddress is not zero, then the overlay manager uses the extended memory above that address.REMAP='Body'In both cases, a nonzero length parameter gives the limit of the usable extended memory by the overlay manager.Return valueREMAP='BodyNoLead'ROLE='italic'_OvrInitExt returns 0 if the overlay manager is able to use extended memory for swapping.See alsoREMAP='BodyNoLead'ROLE='BOLD'_OvrInitEms, ROLE='BOLD'_ovrbuffer (global variable)randbrdMOREINFO="NONE"dos.hFunctionREMAP='BodyNoLead'Reads random block.SyntaxFORMAT="LINESPECIFIC"int randbrd(struct fcb *fcb, int rcnt);RemarksREMAP='BodyNoLead'ROLE='italic'randbrd reads ROLE='italic'rcnt number of records using the open file control block (FCB) pointed to by ROLE='italic'fcb. The records are read into memory at the current disk transfer address (DTA). They are read from the disk record indicated in the random record field of the FCB. This is accomplished by calling DOS system call 0x27.REMAP='Body'The actual number of records read can be determined by examining the random record field of the FCB. The random record field is advanced by the number of records actually read.Return valueREMAP='BodyNoLead'The following values are returned, depending on the result of the ROLE='italic'randbrd operation:COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='24*'COLNAME='C2' COLWIDTH='336*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'0COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'All records are read.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'1COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'End-of-file is reached and the last record read is complete.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'2COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Reading records would have wrapped around address 0xFFFF (as many records as possible are read).COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'3COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'End-of-file is reached with the last record incomplete.See alsoREMAP='BodyNoLead'ROLE='italic'getdta, randbwr, setdta randbwrMOREINFO="NONE"dos.hFunctionREMAP='BodyNoLead'Writes random block.SyntaxFORMAT="LINESPECIFIC"int randbwr(struct fcb *fcb, int rcnt);RemarksREMAP='BodyNoLead'ROLE='italic'randbwr writes ROLE='italic'rcnt number of records to disk using the open file control block (FCB) pointed to by ROLE='italic'fcb. This is accomplished using DOS system call 0x28. If ROLE='italic'rcnt is 0, the file is truncated to the length indicated by the random record field.REMAP='Body'The actual number of records written can be determined by examining the random record field of the FCB. The random record field is advanced by the number of records actually written.Return valueREMAP='BodyNoLead'The following values are returned, depending on the result of the ROLE='italic'randbwr operation:COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='24*'COLNAME='C2' COLWIDTH='339*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'0COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'All records are written.COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'1COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'There is not enough disk space to write the records (no records are written).COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'2COLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Writing records would have wrapped around address 0xFFFF (as many records as possible are written).See alsoREMAP='BodyNoLead'ROLE='italic'randbrd sbrkMOREINFO="NONE"alloc.hFunctionREMAP='BodyNoLead'Changes data segment space allocation.SyntaxFORMAT="LINESPECIFIC"void *sbrk(int incr);RemarksREMAP='BodyNoLead'ROLE='italic'sbrk adds ROLE='italic'incr bytes to the break value and changes the allocated space accordingly. ROLE='italic'incr can be negative, in which case the amount of allocated space is decreased.REMAP='Body'ROLE='italic'sbrk will fail without making any change in the allocated space if such a change would result in more space being allocated than is allowable.Return valueREMAP='BodyNoLead'Upon successful completion, ROLE='italic'sbrk returns the old break value. On failure, ROLE='italic'sbrk returns a value of -1, and the global variable ROLE='italic'errno is set to the following:COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='72*'COLNAME='C2' COLWIDTH='113*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ENOMEMCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Not enough coreSee alsoREMAP='BodyNoLead'ROLE='italic'brk setblock, _dos_setblockMOREINFO="NONE"dos.hFunctionREMAP='BodyNoLead'Modifies the size of a previously allocated block.SyntaxFORMAT="LINESPECIFIC"int setblock(unsigned segx, unsigned newsize);
unsigned _dos_setblock(unsigned newsize, unsigned segx, unsigned *maxp);RemarksREMAP='BodyNoLead'ROLE='italic'setblock and ROLE='italic'_dos_setblock modify the size of a memory segment. ROLE='italic'segx is the segment address returned by a previous call to ROLE='italic'allocmem or ROLE='italic'_dos_allocmem. ROLE='italic'newsize is the new, requested size in paragraphs. If the segment cannot be changed to the new size, ROLE='italic'_dos_setblock stores the size of the largest possible segment at the location pointed to by ROLE='italic'maxp.Return valueREMAP='BodyNoLead'ROLE='italic'setblock returns -1 on success. In the event of error, it returns the size of the largest possible block (in paragraphs), and the global variable ROLE='italic'_doserrno is set.REMAP='Body'ROLE='italic'_dos_setblock returns 0 on success. In the event of error, it returns the DOS error code, and the global variable ROLE='italic'errno is set to the following:COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='72*'COLNAME='C2' COLWIDTH='265*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ENOMEMCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'Not enough memory, or bad segment addressSee alsoREMAP='BodyNoLead'ROLE='italic'allocmem, freemem soundMOREINFO="NONE"dos.hFunctionREMAP='BodyNoLead'Turns PC speaker on at specified frequency.SyntaxFORMAT="LINESPECIFIC"void sound(unsigned frequency);RemarksREMAP='BodyNoLead'ROLE='italic'sound turns on the PC's speaker at a given frequency. ROLE='italic'frequency specifies the frequency of the sound in hertz (cycles per second). To turn the speaker off after a call to ROLE='italic'sound, call the function ROLE='italic'nosound.See alsoREMAP='BodyNoLead'ROLE='BOLD'delay, ROLE='BOLD'nosound REMAP='NumAppendix'ID='X-28359'DOS librariesREMAP='Body'This appendix provides an overview of the Borland C++ library routines available to 16-bit DOS-only applications. Library routines are composed of functions and macros that you can call from within your C and C++ programs to perform a wide variety of tasks. These tasks include low- and high-level I/O, string and file manipulation, memory allocation, process control, data conversion, mathematical calculations, and much more.REMAP='Body'This appendix provides the following information:MARK='bullet'REMAP='Bullet1'Names the libraries and files found in the LIB subdirectory, and describes their uses.REMAP='Bullet1'Categorizes the library routines according to the type of tasks they perform.REMAP='.Head1' RENDERAS="SECT1"The run-time librariesREMAP='Body'The DOS-specific applications use static run-time libraries (OBJ and LIB). The libraries summarized in this appendix are available only to the 16-bit development tools. See the ROLE='italic'Borland C++ Library Reference, TARGETDOCENT='xref.libxref.mif.bclr' LOCALINFO='X-32733' nd.ent='xref.libxref.mif.bclr' nd.pub='' nd.sys='bc_lr' nn.not='EBT-BOOK' nn.pub='EBT' nn.sys=''Chapter 1, "Library cross-reference", for a description of additional libraries.REMAP='Body'Several versions of the run-time library are available. For example, there are memory-model specific versions and diagnostic versions. There are also optional libraries that provide containers, graphics, and mathematics.REMAP='Body'Keep these guidelines in mind when selecting which run-time libraries to use:MARK='bullet'REMAP='Bullet1'The libraries listed below are for use in 16-bit DOS applications only.REMAP='Bullet1'Information on additional DOS routines can be found in the TARGETDOCENT='xref.libxref.mif.bclr' LOCALINFO='X-77180' nd.ent='xref.libxref.mif.bclr' nd.pub='' nd.sys='bc_lr' nn.not='EBT-BOOK' nn.pub='EBT' nn.sys=''Borland C++ Library Reference.REMAP='Bullet1'Exception-handling should not be used with overlays. See the discussion of exceptions in LINKEND='X-13859' TYPE='XREF-TEXTCOPY'"Exception handling and overlays".REMAP='.Head2' RENDERAS="SECT2"The DOS support librariesREMAP='Body'The static (OBJ and LIB) 16-bit Borland C++ run-time libraries are contained in the LIB subdirectory of your installation. For each of the library file names, the '?' character represents one of the six (tiny, compact, small, medium, large, and huge) distinct memory models supported by Borland. Each model has its own library file and math file containing versions of the routines written for that particular model. See LINKEND='X-14780' TYPE='XREF-TEXTCOPY'Chapter 1, "DOS memory management" for details on memory models.REMAP='Body'The following table lists the Borland C++ libraries names and uses that are available for 16-bit DOS-only applications. See the TARGETDOCENT='xref.libxref.mif.bcug' LOCALINFO='X-41776' nd.ent='xref.libxref.mif.bcug' nd.pub='' nd.sys='bc_ug' nn.not='EBT-BOOK' nn.pub='EBT' nn.sys=''Borland C++ User's Guide for information on linkers, linker options, requirements, and selection of libraries. See also the TARGETDOCENT='xref.libxref.mif.bclr' LOCALINFO='X-77180' nd.ent='xref.libxref.mif.bclr' nd.pub='' nd.sys='bc_lr' nn.not='EBT-BOOK' nn.pub='EBT' nn.sys=''Borland C++ Library Reference for more information on other libraries and header files that can provide additional DOS support.TOCENTRY="1"REMAP='TblCap'ROLE='BOLD'Summary of DOS run-time libraries COLS='2' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='68*'COLNAME='C2' COLWIDTH='212*'VALIGN="BOTTOM"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Heading'File nameCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Heading'UseVALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'BIDSH.LIBCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Huge memory model of Borland classlibsCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'BIDSDBH.LIBCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Diagnostic version of the above libraryCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'C?.LIBCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'DOS-only librariesCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'C0F?.OBJCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'MS compatible startupCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'C0?.OBJCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'BC startupCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'EMU.LIBCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Floating-point emulationCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'FP87.LIBCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'For programs that run on machines with 80x87 coprocessorCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'GRAPHICS.LIBCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Borland graphics interfaceCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'MATH?.LIBCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Math routinesCOLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Tbl.Body'OVERLAY.LIBCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Tbl.Body'Overlay developmentREMAP='.Head2' RENDERAS="SECT2"Graphics routinesREMAP='Body'These routines let you create onscreen graphics with text. COLS='4' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='72*'COLNAME='C2' COLWIDTH='72*'COLNAME='C3' COLWIDTH='72*'COLNAME='C4' COLWIDTH='72*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'arcCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'getdefaultpaletteCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'barCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'getdrivernameCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'bar3dCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'getfillpatternCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'circleCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'getfillsettingsCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'cleardeviceCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'getgraphmodeCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'clearviewportCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'getimageCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'closegraphCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'getlinesettingsCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'detectgraphCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'getmaxcolorCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'drawpolyCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'getmaxmodeCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'ellipseCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'getmaxxCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'fillellipseCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'getmaxyCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'fillpolyCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'getmodenameCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'floodfillCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'getmoderangeCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'getarccoordsCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'getpaletteCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'getaspectratioCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'getpalettesizeCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'getbkcolorCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'getpixelCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'getcolorCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'gettextsettingsCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLS='4' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='72*'COLNAME='C2' COLWIDTH='72*'COLNAME='C3' COLWIDTH='72*'COLNAME='C4' COLWIDTH='72*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'getviewsettingsCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'registerbgifontCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'getxCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'restorecrtmodeCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'getyCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'sectorCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'graphdefaultsCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'setactivepageCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'grapherrormsgCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'setallpaletteCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'_graphfreememCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'setaspectratioCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'_graphgetmemCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'setbkcolorCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'graphresultCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'setcolorCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'imagesizeCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'_setcursortypeCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(conio.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'initgraphCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'setfillpatternCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'installuserdriverCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'setfillstyleCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'installuserfontCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'setgraphbufsizeCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'lineCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'setgraphmodeCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'linerelCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'setlinestyleCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'linetoCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'setpaletteCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'moverelCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'setrgbpaletteCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'movetoCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'settextjustifyCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'outtextCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'settextstyleCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'outtextxyCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'setusercharsizeCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'piesliceCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'setviewportCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'putimageCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'setvisualpageCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'putpixelCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'setwritemodeCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'rectangleCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'textheightCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'registerbgidriverCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(graphics.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'textwidthCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(graphics.h)REMAP='.Head2' RENDERAS="SECT2"Interface routinesREMAP='Body'These routines provide operating-system BIOS and machine-specific capabilities.COLS='4' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='72*'COLNAME='C2' COLWIDTH='72*'COLNAME='C3' COLWIDTH='72*'COLNAME='C4' COLWIDTH='72*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'absreadCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(dos.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'_dos_freememCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(dos.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'abswriteCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(dos.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'freememCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(dos.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'bioscomCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(bios.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'_harderrCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(dos.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'_bios_diskCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(bios.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'harderrCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(dos.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'biosdiskCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(bios.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'_hardresumeCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(dos.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'_bios_keybrdCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(bios.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'hardresumeCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(dos.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'bioskeyCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(bios.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'_hardretnCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(dos.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'biosprintCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(bios.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'hardretnCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(dos.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'_bios_printerCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(bios.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'keepCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(dos.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'_bios_serialcomCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(bios.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'randbrdCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(dos.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'_dos_keepCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(dos.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'randbwrCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(dos.h)REMAP='.Head2' RENDERAS="SECT2"Memory routinesREMAP='Body'These routines provide dynamic memory allocation in the small-data and large-data models.COLS='4' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='73*'COLNAME='C2' COLWIDTH='84*'COLNAME='C3' COLWIDTH='72*'COLNAME='C4' COLWIDTH='72*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'allocmemCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(dos.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'farheapcheckCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(alloc.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'brkCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(alloc.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'farheapcheckfreeCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(alloc.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'coreleftCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(alloc.h, stdlib.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'farheapchecknodeCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(alloc.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'_dos_allocmemCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(dos.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'farheapfillfreeCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(alloc.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'_dos_freememCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(dos.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'farheapwalkCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(alloc.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'_dos_setblockCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(dos.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'farreallocCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(alloc.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'farcoreleftCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(alloc.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'sbrkCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(alloc.h)REMAP='.Head2' RENDERAS="SECT2"Miscellaneous routinesREMAP='Body'These routines provide sound effects and time delay.COLS='4' CHAROFF="50" CHAR="" ALIGN="LEFT"COLNAME='C1' COLWIDTH='72*'COLNAME='C2' COLWIDTH='72*'COLNAME='C3' COLWIDTH='72*'COLNAME='C4' COLWIDTH='72*'VALIGN="TOP"COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'delayCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(dos.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'ROLE='italic'soundCOLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'(dos.h)COLNAME='C1' MOREROWS='0' NAMEEND='C1' NAMEST='C1' ROTATE='0'REMAP='Body'ROLE='italic'nosoundCOLNAME='C2' MOREROWS='0' NAMEEND='C2' NAMEST='C2' ROTATE='0'REMAP='Body'(dos.h)COLNAME='C3' MOREROWS='0' NAMEEND='C3' NAMEST='C3' ROTATE='0'REMAP='Body'COLNAME='C4' MOREROWS='0' NAMEEND='C4' NAMEST='C4' ROTATE='0'REMAP='Body'REMAP='Body'REMAP='NumAppendix'ID='X-34528'DOS global variablesREMAP='Body'This appendix describes the Borland C++ global variables that are available for 16-bit DOS-only applications. Additional global variables are described in the TARGETDOCENT='xref.dosglobs.mif.bclr' LOCALINFO='X-77180' nd.ent='xref.dosglobs.mif.bclr' nd.pub='' nd.sys='bc_lr' nn.not='EBT-BOOK' nn.pub='EBT' nn.sys=''Borland C++ Library Reference._heaplenMOREINFO="NONE"dos.hFunctionREMAP='BodyNoLead'Holds the length of the near heap.SyntaxFORMAT="LINESPECIFIC"extern unsigned _heaplen;RemarksREMAP='BodyNoLead'ROLE='italic'_heaplen specifies the size (in bytes) of the near heap in the small data models (tiny, small, and medium). ROLE='italic'_heaplen does not exist in the large data models (compact, large, and huge) because they do not have a near heap.REMAP='Body'In the small and medium models, the data segment size is computed as follows:FORMAT="LINESPECIFIC"data segment [small,medium] = global data + heap + stackREMAP='Body'where the size of the stack can be adjusted with ROLE='italic'_stklen.REMAP='Body'If ROLE='italic'_heaplen is set to 0, the program allocates 64K bytes for the data segment, and the effective heap size isFORMAT="LINESPECIFIC"64K - (global data + stack) bytesREMAP='Body'By default, ROLE='italic'_heaplen equals 0, so you'll get a 64K data segment unless you specify a particular ROLE='italic'_heaplen value.REMAP='Body'In the tiny model, everything (including code) is in the same segment, so the data segment computations are adjusted to include the code plus 256 bytes for the program segment prefix (PSP).FORMAT="LINESPECIFIC"data segment [tiny] = 256 + code + global data + heap + stackREMAP='Body'If ROLE='italic'_heaplen equals 0 in the tiny model, the effective heap size is obtained by subtracting the PSP, code, global data, and stack from 64K.REMAP='Body'In the compact and large models, there is no near heap, and the stack is in its own segment, so the data segment isFORMAT="LINESPECIFIC"data segment [compact,large] = global dataREMAP='Body'In the huge model, the stack is a separate segment, and each module has its own data segment.See alsoREMAP='BodyNoLead'ROLE='italic'_stklen_ovrbufferMOREINFO="NONE"dos.hFunctionREMAP='BodyNoLead'Changes the size of the overlay buffer.SyntaxFORMAT="LINESPECIFIC"unsigned _ovrbuffer = size;RemarksREMAP='BodyNoLead'The default overlay buffer size is twice the size of the largest overlay. This is adequate for some applications. But imagine that a particular function of a program is implemented through many modules, each of which is overlaid. If the total size of those modules is larger than the overlay buffer, a substantial amount of swapping will occur if the modules make frequent calls to each other.REMAP='Body'The solution is to increase the size of the overlay buffer so that enough memory is available at any given time to contain all overlays that make frequent calls to each other. You can do this by setting the ROLE='italic'_ovrbuffer global variable to the required size in paragraphs. For example, to set the overlay buffer to 128K, include the following statement in your code:FORMAT="LINESPECIFIC"unsigned _ovrbuffer = 0x2000;REMAP='Body'There is no general formula for determining the ideal overlay buffer size.See alsoREMAP='BodyNoLead'ROLE='italic'_OvrInitEms, _OvrInitExt_stklenMOREINFO="NONE"dos.hFunctionREMAP='BodyNoLead'Holds size of the stack.SyntaxFORMAT="LINESPECIFIC"extern unsigned _stklen;RemarksREMAP='BodyNoLead'ROLE='italic'_stklen specifies the size of the stack for all six memory models. The minimum stack size allowed is 128 words; if you give a smaller value, ROLE='italic'_stklen is automatically adjusted to the minimum. The default stack size is 4K.REMAP='Body'In the small and medium models, the data segment size is computed as follows:FORMAT="LINESPECIFIC"data segment [small, medium] = global data + heap + stackREMAP='Body'where the size of the heap can be adjusted with ROLE='italic'_heaplen.REMAP='Body'In the tiny model, everything (including code) is in the same segment, so the data segment computations are adjusted to include the code plus 256 bytes for the program segment prefix (PSP).FORMAT="LINESPECIFIC"data segment [tiny] = 256 + code + global data + heap + stackREMAP='Body'In the compact and large models, there is no near heap, and the stack is in its own segment, so the data segment is simplyFORMAT="LINESPECIFIC"data segment [compact,large] = global dataREMAP='Body'In the huge model, the stack is a separate segment, and each module has its own data segment.See alsoREMAP='BodyNoLead'ROLE='italic'_heaplen