home *** CD-ROM | disk | FTP | other *** search
- Advanced OS/2 Programming
-
- Errata and Supplementary Information
-
- March 21, 1989
-
-
- This document lists the known errors in the 1st Printing of Advanced
- OS/2 Programming as of March 21, 1989, as well as certain
- supplementary information related to OS/2 version 1.1 that was not
- known by me at the time the book went to press.
-
- You can tell which printing you own by looking at the reverse of the
- second title page (the first line on the page is "PUBLISHED BY."
- About two-thirds of the way down the page, just after the line
- "Printed and bound in the United States of America," there is a
- series of numbers. The first number on the line is the number of the
- printing. For instance, in the first printing, the line says
-
- 1 2 3 4 5 6 7 8 9 FGFG 3 2 1 0 9 8
-
- In the second printing, the line will say
-
- 2 3 4 5 6 7 8 9 FGFG 3 2 1 0 9 8
-
- and so on.
-
-
- --------------------------------------------------------------------
-
-
- Page 16, 2nd paragraph, 2nd line, "OS2DOS.COM" should be "OS2KRNL"
-
-
- Page 24, second from last line on the page, delete the words
-
- "(Figure 2-10)"
-
- in that line, they make no sense here since Figure 2-10 is the
- memory map for a protected mode-ONLY system.
-
-
- Page 36, caption for figure 4-7, "SCLIBC.LIB" should be "SLIBC.LIB"
-
-
- Page 74, 5th paragraph (just below the italic paragraph that begins
- with "Note"), REMOVE Ctrl-Break from the list in the second sentence.
-
-
- Page 81, program listing in figure 5-7, insert the line
-
- kaction dw 0 ; receives DosOpen action
-
- after the 2nd line of the listing (i.e. between the declaration of
- the 'khandle' and 'oldmode' variables).
-
-
- Page 102, under the second full paragraph, art department lost some
- stuff here, it should read
-
- <Esc>[s save cursor position
- <Esc>[u restore cursor to saved position
-
-
- (added 2/6/89)
- Page 104, third line under "Miscellaneous Functions" in figure 6-6,
- VioScrLock should have a double-dagger, not a single-dagger.
-
-
- Page 107, figures 6-9 and 6-10, art department got the two figures
- backwards. The diagram in figure 6-9 belongs to figure 6-10 and vice
- versa.
-
-
- Page 162, 1st paragraph, 2nd line, delete the words
-
- "and the DUMP.DEF file (Figure 8-13)"
-
- because the .DEF file is not needed for the C version of the program.
-
-
- Page 195, last line of the paragraph under the heading "Reserved
- Area", "page 196" should be "page 192"
-
-
- Page 201, the first three words on the page "Fixed Disk Partitions"
- are supposed to be the page heading. This was OK on galleys, don't
- know what happened to it!
-
-
- Page 202, figure 10-10, the solid line around the byte at 01BFH
- should properly also include the byte at 01BEH, since the first
- partition entry is bytes 01BEH through 01CDH.
-
-
- (added 2/7/89)
- Page 215, art for figure 11-6 should be modified as follows:
-
- F E D C B A 9 8 7 6 5 4 3 2 1 0
- -------------------------------------------------
- | | | | | |
- -------------------------------------------------
- | | | | |
- | | | | |
- | | | | |
- | | | | -- shareable with
- | | | | DosGiveSeg
- | | | |
- | | | ----- shareable with
- | | | DosGetSeg
- | | |
- | | -------- discardable
- | |
- | ----------- if shareable, may
- | be reduced in size
- | (version 1.1)
- |
- ----------------------------- reserved
-
-
- The "may be reduced in size" meaning of bit 3 is the only thing new
- here. This description for bit 3 first turned up in the IBM Tech Ref
- for OS/2 1.1. We didn't have any information about this prior to
- receiving the final printed Tech Ref, unfortunately.
-
-
- Page 220, 2nd paragraph under the subhead "Discardable Segments", 3rd
- sentence: the current versions of OS/2 (1.0 and 1.1) do NOT discard
- segments before swapping nondiscardable segments; the two types are
- lumped together and discarded or swapped on an LRU basis. This may
- change in future versions however.
-
-
- Page 233, last paragraph, 1st sentence, the situation with
- DosKillProcess is actually somewhat more complex than the description
- here. A DosKillProcess issued against any SPECIFIC process ID (i.e.
- with the "action code" = 1) will work regardless of whether or not
- the target process is "orphaned." However, a DosKillProcess with
- action code = 0 will ignore descendant processes that are orphaned.
-
-
- Page 240, 2nd full paragraph (starting with "The pathname must..."),
- REPLACE the last two sentences of this paragraph with the following
- text:
-
- "In OS/2 version 1.0, the initial process in a session inherits
- an empty environment, and its current disk and directory are
- the root directory of the boot drive. In OS/2 version 1.1,
- the environment, current disk, and current drive of the first
- process in a new session are under the control of the parent
- process."
-
-
- Page 240, last paragraph on the page, first sentence, change "The
- other parameters..." to "Other parameters..."
-
-
- Page 244, 4th full paragraph on the page, 4th line, change
-
- "... search for EXE, COM, and BAT files..."
-
- to
-
- "... search for COM, EXE, and CMD files..."
-
-
- Page 288, third bulleted item, change
-
- "Each record in a queue is a separately allocated..."
-
- to
-
- "Each record in a queue can be a separately allocated..."
-
-
- Page 298, figure 13-14, 5th line of the listing (not counting blank
- lines), an important comma got dropped! The line should look like:
-
- "(unsigned, int), unsigned long far *, unsigned far *, int, int);"
-
-
- Page 303, last line on the page, change
-
- "...because they have a special call gate that..."
-
- to
-
- "...because they reside in segments with a special
- attribute that lets..."
-
-
-
- Page 320, figure 15-4, 5th line of the listing,
-
- "cseg" should be "csec"
-
- (this doesn't really affect anything in the listing luckily)
-
-
- Page 364, figure 17-14, the info for 8" disks (which is for
- historical interest only) got all confused here. It should be
-
- 0FDH 8", 2-sided, single-density
-
- 0FEH 8", 1-sided, single-density
- 8", 1-sided, double-density
-
- Yes, it is strange that they assigned the same medium ID byte to
- both single- and double-density 1-sided 8" disks. But that's the
- facts. The disk driver was expected to try and read a new disk
- in double-density first, then fall back to single-density if the
- read failed.
-
-
- Page 392, last paragraph, if you use the sequence VerifyAccess then
- Lock as described here, you must be sure to use the non-blocking form
- of the Lock call. This is because when you use the blocking Lock,
- you are explicitly allowing the possibility of a context switch, so
- the result of the previous VerifyAccess call could become invalid
- before the Lock operation completes. Alternative strategies would be
- either (1) blocking-Lock then VerifyAccess, or (2) VerifyAccess,
- blocking-Lock, then reconfirm the VerifyAccess.
-
-
- Page 490, last little grey box on the left, "functions" is misspelled
-
-
- (added 2/6/89)
- Page 502, entry for DosAllocHuge, in description of the 5th parameter,
- replace the line
-
- "3-15 Reserved (0)"
-
- with
-
- "3 If segment is shared, it may be reduced in size
- with DosReallocHuge (version 1.1 and later)
- 4-15 Reserved (0)"
-
-
- (added 2/6/89)
- Page 503, entry for DosAllocSeg, in description of the 3rd parameter,
- replace the line
-
- "3-15 Reserved (0)"
-
- with
-
- "3 If segment is shared, it may be reduced in size
- with DosReallocSeg (version 1.1 and later)
- 4-15 Reserved (0)"
-
-
-
- Page 545, additional info on DosPTrace for OS/2 1.1 became available
- to me after the book went to the printer.
-
- In the first bulleted note, add the codes
-
- 11H Thread status
- 12H Map read-only memory alias
- 13H Map read/write memory alias
- 14H Unmap memory alias
-
- In the 2nd bulleted note, add the codes
-
- -10 thread termination
- -11 asynchronous stop
- -12 new process
- -13 alias free
-
-
- Page 550, entry for DosQHandType, change the description of the
- third parameter to:
-
- "PTR WORD If handle type = 1 (device), receives the
- attribute word from the header of the
- corresponding device driver; if handle type
- = 2 (pipe), receives pipe type (0 = normal,
- 1 = read-only)"
-
-
- Page 551, 3rd parameter for DosQNmPipeInfo, should be
-
- WORD Length of buffer to receive pipe information
-
- i.e. the "PTR WORD" should be "WORD"
-
-
- Page 555, entry for DosReallocHuge, add a new bulleted note:
-
- "* [1.0] Shared segments can be increased but
- not decreased in size."
-
-
- Page 556, first bulleted note at the top of the page (tail end of the
- entry for DosReallocSeg) should read
-
- "* [1.0] Shared segments can be increased but
- not decreased in size."
-
- i.e. add a "[1.0]" icon to the bulleted note.
-
-
- Page 569, notes for DosStartSession, first bulleted note on this
- page, REPLACE with the following:
-
- "[1.0] The environment of the initial process in the child
- session is empty; that is, it consists of a pair of zero
- bytes. The parent's handles, current disk, and current
- directory are not inherited."
-
-
- Page 599, entry for VioGetBuf, remove the "[FAPI]" icon from the
- function header. This function is FAPI in OS/2 version 1.0 but not
- in version 1.1.
-
-
- Page 611, entry for VioScrLock, the "No PM" icon is missing from the
- header for this function.
-
-
- Page 617, entry for VioShowBuf, remove the "[FAPI]" icon from the
- function header. This function is FAPI in OS/2 version 1.0 but not
- in version 1.1.
-
-
- Page 672, 2nd bulleted note for Lock, see the discussion above for
- page 392.
-
-
- Page 692, 1st bulleted note for VerifyAccess, see the discussion
- above for page 392.
-
-
- Page 723, 2nd table on the page, next to last line, missing left
- parenthesis... should look like
-
- "(if bit 15 = 0)"
-
-
-
- ----------------------------------------------------------------------
-
- I would be grateful if readers would bring any other errors they
- notice to my attention so I can add them to this list and fix them in
- subsequent printings.
- --- Ray Duncan
-
- My electronic mail addresses are:
-
- CompuServe 72406,1577 or 72241,52
- MCI Mail lmi
- BIX rduncan
-
- ----------------------------------------------------------------------
-
-