📄 dos4gwqa.gml
字号:
.* (c) Portions Copyright 1990, 1995 by Tenberry Software, Inc.
.*
.chap &dos4gprd Commonly Asked Questions
.*
.np
.ix '&dos4gprd' 'common questions'
.ix 'common questions' '&dos4gprd'
The following information has been provided by Tenberry Software, Inc.
for their &dos4gprd and &dos4gprd Professional product.
The content of this chapter has been edited by &company..
In most cases, the information is applicable to both products.
.np
This chapter covers the following topics:
.begbull
.bull
Access to technical support
.bull
Differences within the DOS/4G product line
.bull
Addressing
.bull
Interrupt and exception handling
.bull
Memory management
.bull
DOS, BIOS, and mouse services
.bull
Virtual memory
.bull
Debugging
.bull
Compatibility
.endbull
.*
.section Access to Technical Support
.*
.begnote $setptnt 2
.*
.note 1a. How to reach technical support.
.*
.np
.ix 'technical support' 'Tenberry Software'
Here are the various ways you may contact Tenberry Software for
technical support.
.millust begin
WWW: http://www.tenberry.com/dos4g/
Email: 4gwhelp@tenberry.com
Phone: 1.480.767.8868
Fax: 1.480.767.8709
Mail: Tenberry Software, Inc.
PO Box 20050
Fountain Hills, Arizona
U.S.A 85269-0050
.millust end
.bi PLEASE GIVE YOUR SERIAL NUMBER WHEN YOU CONTACT TENBERRY.
.np
.*
.keep
.note 1b. When to contact &company, when to contact Tenberry.
.*
.np
.ix '&dos4gprd' 'contacting Tenberry'
Since &dos4gprd Professional is intended to be completely compatible
with &dos4gprd, you may wish to ascertain whether your program works
properly under &dos4gprd before contacting Tenberry Software for
technical support. (This is likely to be the second question we ask
you, after your serial number.)
.np
If your program fails under both &dos4gprd and &dos4gprd Professional,
and you suspect your own code or a problem compiling or linking, you
may wish to contact &company first. Tenberry Software support
personnel are not able to help you with most programming questions, or
questions about using the &company tools.
.np
If your program only fails with &dos4gprd Professional, you have
probably found a bug in &dos4gprd Professional, so please contact us
right away.
.*
.keep
.note 1c. Telephone support.
.*
.np
.ix '&dos4gprd' 'telephone support'
Tenberry Software's hours for telephone support are 9am-6pm EST.
Please note that telephone support is free for the first 30 days only.
A one-year contract for continuing telephone support on &dos4gprd
Professional is US$500 per developer, including an update subscription
for one year, to customers in the United States and Canada; for
overseas customers, the price is $600. Site licenses may be
negotiated.
.np
There is no time limit on free support by fax, mail, or electronic
means.
.*
.keep
.note 1d. References.
.*
.np
.ix '&dos4gprd' 'documentation'
The &dos4gprd documentation from &company is the primary reference for
&dos4gprd Professional as well.
.ix 'DPMI specification'
Another useful reference is the DPMI specification.
In the past, the DPMI specification could be obtained free of charge
by contacting Intel Literature.
We have been advised that the DPMI specification is no longer
available in printed form.
.np
However, the DPMI 1.0 specification can be obtained at:
.code begin
http://www.delorie.com/djgpp/doc/dpmi/
.code end
.pc
Online HTML as well as a downloadable archive are provided.
.endnote
.*
.section Differences Within the DOS/4G Product Line
.*
.begnote $setptnt 2
.*
.note 2a. &dos4gprd Professional versus &dos4gprd.
.*
.ix '&dos4gprd' 'differences with Professional version'
.np
&dos4gprd Professional was designed to be a higher-performance version
of &dos4gprd suitable for commercial applications. Here is a summary
of the advantages of &dos4gprd Professional with respect to &dos4gprd:
.begbull
.bull
Extender binds to the application program file
.bull
Extender startup time has been reduced
.bull
Support for &company floating-point emulator has been optimized
.bull
Virtual memory manager performance has been greatly improved
.bull
Under VMM, programs are demand loaded
.bull
Virtual address space is 4 GB instead of 32 MB
.bull
Extender memory requirements have been reduced by more than 50K
.bull
Extender disk space requirements have been reduced by 40K
.bull
Can omit virtual memory manager to save 50K more disk space
.bull
Support for INT 31h functions 301h-304h and 702h-703h
.endbull
.np
&dos4gprd Professional is intended to be fully compatible with
programs written for &dos4gprd 1.9 and up. The only functional
difference is that the extender is bound to your program instead of
residing in a separate file. Not only does this help reduce startup
time, but it eliminates version-control problems when someone has both
&dos4gprd and &dos4gprd Professional applications present on one
machine.
.*
.keep
.note 2b. &dos4gprd Professional versus DOS/4G.
.*
.ix '&dos4gprd' 'differences with DOS/4G'
.np
&dos4gprd Professional is not intended to provide any other new DOS
extender functionality. Tenberry Software's top-of-the-line 32-bit
extender, DOS/4G, is not sold on a retail basis but is of special
interest to developers who require more flexibility (such as OEMs).
DOS/4G offers these additional features beyond &dos4gprd and &dos4gprd
Professional:
.begbull
.bull
Complete documentation
.bull
DLL support
.bull
TSR support
.bull
Support for INT 31h functions 301h-306h, 504h-50Ah, 702h-703h
.bull
A C language API that offers more control over interrupt handling and
program loading, as well as making it easier to use the extender
.bull
An optional (more protected) nonzero-based flat memory model
.bull
Remappable error messages
.bull
More configuration options
.bull
The D32 debugger, GLU linker, and other tools
.bull
Support for other compilers besides &company
.bull
A higher level of technical support
.bull
Custom work is available (e.g., support for additional executable
formats, operating system API emulations, mixed 16-bit and 32-bit
code)
.endbull
.np
Please contact Tenberry Software if you have questions about other
products (present or future) in the DOS/4G line.
.*
.keep
.note 2c. DPMI functions supported by &dos4gprd..
.*
.ix '&dos4gprd' 'DPMI support'
.np
Note that when a &dos4gprd application runs under a DPMI host, such as
Windows 3.1 in enhanced mode, an OS/2 virtual DOS machine, 386Max
(with DEBUG=DPMIXCOPY), or QDPMI (with EXTCHKOFF), the DPMI host
provides the DPMI services, not &dos4gprd.. The DPMI host also
provides virtual memory, if any. Performance (speed and memory use)
under different DPMI hosts varies greatly due to the quality of the
DPMI implementation.
.np
These are the services provided by &dos4gprd and &dos4gprd
Professional in the absence of a DPMI host.
.begnote $compact
.note 0000
Allocate LDT Descriptors
.note 0001
Free LDT Descriptor
.note 0002
Map Real-Mode Segment to Descriptor
.note 0003
Get Selector Increment Value
.note 0006
Get Segment Base Address
.note 0007
Set Segment Base Address
.note 0008
Set Segment Limit
.note 0009
Set Descriptor Access Rights
.note 000A
Create Alias Descriptor
.note 000B
Get Descriptor
.note 000C
Set Descriptor
.note 000D
Allocate Specific LDT Descriptor
.np
.note 0100
Allocate DOS Memory Block
.note 0101
Free DOS Memory Block
.note 0102
Resize DOS Memory Block
.np
.note 0200
Get Real-Mode Interrupt Vector
.note 0201
Set Real-Mode Interrupt Vector
.note 0202
Get Processor Exception Handler
.note 0203
Set Processor Exception Handler
.note 0204
Get Protected-Mode Interrupt Vector
.note 0205
Set Protected-Mode Interrupt Vector
.np
.note 0300
Simulate Real-Mode Interrupt
.note 0301
Call Real-Mode Procedure with Far Return Frame
(&dos4gprd Professional only)
.note 0302
Call Real-Mode Procedure with IRET Frame
(&dos4gprd Professional only)
.note 0303
Allocate Real-Mode Callback Address
(&dos4gprd Professional only)
.note 0304
Free Real-Mode Callback Address
(&dos4gprd Professional only)
.np
.note 0400
Get DPMI Version
.np
.note 0500
Get Free Memory Information
.note 0501
Allocate Memory Block
.note 0502
Free Memory Block
.note 0503
Resize Memory Block
.np
.note 0600
Lock Linear Region
.note 0601
Unlock Linear Region
.note 0604
Get Page Size (VM only)
.np
.note 0702
Mark Page as Demand Paging Candidate
(&dos4gprd Professional only)
.note 0703
Discard Page Contents
(&dos4gprd Professional only)
.np
.note 0800
Physical Address Mapping
.note 0801
Free Physical Address Mapping
.np
.note 0900
Get and Disable Virtual Interrupt State
.note 0901
Get and Enable Virtual Interrupt State
.note 0902
Get Virtual Interrupt State
.np
.note 0A00
Get Tenberry Software API Entry Point
.np
.note 0E00
Get Coprocessor Status
.note 0E01
Set Coprocessor Emulation
.endnote
.*
.endnote
.*
.section Addressing
.*
.begnote $setptnt 2
.*
.note 3a. Converting between pointers and linear addresses.
.*
.ix '&dos4gprd' 'pointers vs linear addresses'
.np
Because &dos4gprd uses a zero-based flat memory model, converting
between pointers and linear addresses is trivial. A pointer value is
always relative to the current segment (the value in CS for a code
pointer, or in DS or SS for a data pointer). The segment bases for the
default DS, SS, and CS are all zero. Hence a near pointer is exactly
the same thing as a linear address: a null pointer points to linear
address 0, and a pointer with value 0x10000 points to linear address
0x10000.
.*
.keep
.note 3b. Converting between code and data pointers.
.*
.ix '&dos4gprd' 'code and data addresses'
.np
Because DS and CS have the same base address, they are natural aliases
for each other. To create a data alias for a code pointer, merely
create a data pointer and set it equal to the code pointer. It's not
necessary for you to create your own alias descriptor. Similarly, to
create a code alias for a data pointer, merely create a code pointer
and set it equal to the data pointer.
.*
.keep
.note 3c. Converting between pointers and low memory addresses.
.*
.ix '&dos4gprd' 'low memory access'
.np
Linear addresses under 1 MB map directly to physical memory. Hence the
real-mode interrupt vector table is at address 0, the BIOS data
segment is at address 0x400, the monochrome video memory is at address
0xB0000, and the color video memory is at address 0xB8000. To read and
write any of these, you can just use a pointer set to the proper
address. You don't need to create a far pointer, using some magic
segment value.
.*
.keep
.note 3d. Converting between linear and physical addresses.
.*
.ix '&dos4gprd' 'linear vs physical addresses'
.np
Linear addresses at or above 1 MB do not map directly to physical
memory, so you can not in general read or write extended memory
directly, nor can you tell how a particular block of extended memory
has been used.
.np
&dos4gprd supports the DPMI call INT 31h/800h, which maps physical
addresses to linear addresses. In other words, if you have a
peripheral device in your machine that has memory at a physical
address of 256 MB, you can issue this call to create a linear address
that points to that physical memory. The linear address is the same
thing as a near pointer to the memory and can be manipulated as such.
.np
There is no way in a DPMI environment to determine the physical
address corresponding to a given linear address. This is part of the
design of DPMI. You must design your application accordingly.
.*
.keep
.note 3e. Null pointer checking.
.*
.ix '&dos4gprd' 'NULL pointer references'
.ix 'DOS4G' 'NULLP option'
.np
&dos4gprd will trap references to the first sixteen bytes of physical
memory if you set the environment variable DOS4G=NULLP. This is
currently the only null-pointer check facility provided by &dos4gprd..
.np
As of release 1.95, &dos4gprd traps both reads and writes. Prior to
this, it only trapped writes.
.np
You may experience problems if you set DOS4G=NULLP and use some
versions of the &dbgname with a 1.95 or later extender. These problems
have been corrected in later versions of the &dbgname..
.endnote
.*
.section Interrupt and Exception Handling
.*
.begnote $setptnt 2
.*
.note 4a. Handling asynchronous interrupts.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -