home *** CD-ROM | disk | FTP | other *** search
/ Internet Surfer 2.0 / Internet Surfer 2.0 (Wayzata Technology) (1996).iso / pc / textfile / faqs / msds_faq / diff1 next >
Encoding:
Internet Message Format  |  1992-12-26  |  16.9 KB

  1. Xref: bloom-picayune.mit.edu comp.os.msdos.programmer:18887 news.answers:4710
  2. Path: bloom-picayune.mit.edu!enterpoop.mit.edu!eru.mt.luth.se!lunic!sunic!mcsun!uknet!doc.ic.ac.uk!agate!ames!sun-barr!cs.utexas.edu!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!ncoast!brown
  3. From: brown@NCoast.ORG (Stan Brown)
  4. Newsgroups: comp.os.msdos.programmer,news.answers
  5. Subject: comp.os.msdos.programmer FAQ diffs
  6. Message-ID: <msdos-faq-diff.921220@NCoast.ORG>
  7. Date: 20 Dec 92 20:04:33 GMT
  8. Expires: Thu, 14 Jan 1993 20:04:33 GMT
  9. References: none
  10. Followup-To: comp.os.msdos.programmer
  11. Organization: Oak Road Systems, Cleveland Ohio USA
  12. Lines: 269
  13. Approved: news-answers-request@MIT.Edu
  14.  
  15. Archive-name: msdos-programmer-faq/diff1
  16. Last-modified: 20 December 1992
  17.  
  18.  
  19. As the FAQ list is quite long, I'm posting diffs for those of you who
  20. already have copies of last month's edition (dated 15 November).  If you
  21. want the complete list, don't worry:  I'm posting it at about the same
  22. time but as a separate thread:  look for "comp.os.msdos.programmer FAQ
  23. part" in the Subject line.
  24.  
  25. As usual, I've omitted trivial diffs, those involving only formatting
  26. and punctuation, and those that show renumbered Qs with no text change.
  27.  
  28. Key:  "-" lines were in last month's FAQ list; "+" lines are in this
  29. month's.  Line numbers are approximate only.
  30.  
  31. -  67>    207. What's the difference between .COM and .EXE formats?
  32. +  67>    207. What's the format of an .OBJ file?
  33. +  68>    208. What's the format of an .EXE header?
  34. +  69>    209. What's the difference between .COM and .EXE formats?
  35.  
  36. -  91>    407. What's the format of an .EXE header?
  37. -  92>    408. What's the format of an .OBJ file?
  38. +  96>    410. What's the format of .OBJ, .EXE., .COM files?
  39.  
  40. + 176>New contributors this month:  Paul Ducklin, Mike Iarrobino, Duncan
  41. + 177>Murdoch, Anders Thulin, Curt Tilmes, rujo@extern.uio.no
  42.  
  43. - 260>    Readership report for Oct 92" in news.lists shows 40,000 readers of
  44. - 261>    this newsgroup worldwide.
  45. + 265>    Readership report for Nov 92" in news.lists shows 42,000 readers of
  46. + 266>    this newsgroup worldwide.  Traffic was 1090.7 Kbytes (exclusive of
  47. + 267>    crossposts), comprised in 611 articles.
  48.  
  49. - 314>      notices here.
  50. + 320>      notices to comp.os.msdos.programmer.
  51.  
  52. - 327>    - comp.binaries.ibm.pc.archives used to explain how to use the
  53. - 328>      archive sites, especially garbo and Simtel; but the archive
  54. - 329>      managers have stopped posting notices of uploads.  There is a vote
  55. - 330>      (through 7 December 1992) on creating a moderated group,
  56. - 331>      comp.archives.msdos.announce, to replace it.  In the meantime, you
  57. - 332>      can subscribe to upload announcements by sending mail containing
  58. - 333>      the text line "subscribe msdos-ann" and no signature to
  59. - 334>      listserv@tacom-emh1.army.mil.
  60. + 333>    - comp.binaries.msdos.announce (moderated) explains how to use the
  61. + 334>      archive sites, especially garbo and Simtel, and lists files
  62. + 335>      uploaded to them.  Discussions belong in comp.binaries.msdos.d,
  63. + 336>      which replaced comp.binaries.ibm.pc.archives.
  64.  
  65. + 351>    - Turbo Vision is a mailing list, not a newsgroup; send email to
  66. + 352>      listserv@vtvm1.cc.vt.edu if you want to subscribe.
  67.  
  68. + 522>Q207. What's the format of an .OBJ file?
  69. + 524>    Here's what I've been told, though I have verified any of these
  70. + 525>    references myself:
  71. + 527>    - base .OBJ format:  Intel's document number #121748-001, {8086
  72. + 528>      Relocatable Object Module Formats}.  (Note however that both
  73. + 529>      Microsoft and Borland formats have extended the .OBJ format.)
  74. + 531>    - Microsoft-specific .OBJ formats:  a "Microsoft OMF Specification"
  75. + 532>      (document number ??), as well as a section in the MS-DOS
  76. + 533>      encyclopedia.
  77. + 535>    - A "tutorial on the .OBJ format" comes with the VAL experimental
  78. + 536>      linker, which is VAL-LINK.ARC in PD1:<MSDOS.PGMUTL> at Simtel.
  79. + 538>    If you have specific references, either to fpt-able documents or to
  80. + 539>    published works (author, title, order number or ISBN), please email
  81. + 540>    them to brown@ncoast.org for inclusion in the next edition of this
  82. + 541>    list.
  83. + 543>Q208. What's the format of an .EXE header?
  84. + 545>    See pages 349-350 of {PC Magazine}'s June 30, 1992 issue (xi:12) for
  85. + 546>    the old and new formats.  For a more detailed layout, look under INT
  86. + 547>    21 function 4B in Ralf Brown's interrupt list.  Ralf Brown's list
  87. + 548>    includes extensions for Borland's TLINK and Borland debugger info.
  88.  
  89. - 528>    ISBN 1-55615-329-5.  Ralf Brown's interrupt list also documents the
  90. - 529>    .EXE header (including extensions by Borland's TLINK) at INT 21
  91. - 530>    function 4B, including New Executable and Linear Executable formats.
  92. + 553>    ISBN 1-55615-329-5.
  93.  
  94. - 517>Q207. What's the difference between .COM and .EXE formats?
  95. - 519>    To oversimplify:  a .COM file is a direct image of core, and an .EXE
  96. - 520>    file will undergo some further relocation when it is run (and so it
  97. - 521>    begins with a relocation header).  A .COM file is limited to 64K for
  98. - 522>    all segments combined, but an .EXE file can have as many segments as
  99. - 523>    your linker will handle and be as large as RAM can take.
  100. + 555>Q209. What's the difference between .COM and .EXE formats?
  101. + 557>    To oversimplify:  a .COM file is a direct image of core, and an .EXE
  102. + 558>    file will undergo some further relocation when it is run (and so it
  103. + 559>    begins with a relocation header).  A .COM file is limited to 64K for
  104. + 560>    all segments combined, but an .EXE file can have as many segments as
  105. + 561>    your linker will handle and be as large as RAM can take.
  106. + 563>    The actual file extension doesn't matter.  DOS knows that a file
  107. + 564>    being loaded is in .EXE format if its first two bytes are MZ or ZM;
  108. + 565>    otherwise it is assumed to be in .COM format.  For instance, I am
  109. + 566>    told that DR-DOS 6.0's COMMAND.COM is in .EXE format.
  110.  
  111. - 915>Q407. What's the format of an .EXE header?
  112. - 917>    See pages 349-350 of {PC Magazine}'s June 30, 1992 issue (xi:12) for
  113. - 918>    the old and new formats.  For a more detailed layout, look under INT
  114. - 919>    21 function 4B in Ralf Brown's interrupt list.
  115. - 921>Q408. What's the format of an .OBJ file?
  116. - 923>    I have seen a reference to Intel's document number #121748-001,
  117. - 924>    {8086 Relocatable Object Module Formats}, which covers the Intel
  118. - 925>    .OBJ format.  However, both Microsoft and Borland formats differ
  119. - 926>    from the base Intel format.  If you have specific references, either
  120. - 927>    to fpt-able documents or to published works (author, title, order
  121. - 928>    number or ISBN), please email them to brown@ncoast.org for inclusion
  122. - 929>    in the next edition of this list.
  123.  
  124. - 957>Q410. How can I read, create, change, or delete the volume label?
  125. - 959>    You can't do it using the more modern DOS functions (3C, 41, 43),
  126. - 960>    but the older FCB-oriented directory functions will do the job.
  127. - 961>    Specifically, you need to allocate a 64-byte buffer and a 41-byte
  128. - 962>    extended FCB (file control block).  Call INT 21 AH=1A to find out
  129. - 963>    whether there is a volume label.  If there is, AL will return 0 and
  130. - 964>    you can change the label using DOS function 17 or delete it using
  131. - 965>    DOS function 13.  If there is no volume label, function 1A will
  132. - 966>    return FF and you can create a label by using function 16.
  133. - 968>    The following MSC 7.0 code worked for me, where the parameter is 0
  134. + 977>Q408. How can I read, create, change, or delete the volume label?
  135. + 979>    In DOS 5.0 (and, I believe, in 4.0 as well), there are actually two
  136. + 980>    volume labels: one, the traditional one, is an entry in the root
  137. + 981>    directory of the disk; and the other is in the boot record along
  138. + 982>    with the serial number (see next Q).  The DIR and VOL commands
  139. + 983>    report the traditional label; the LABEL command reports the
  140. + 984>    traditional one but changes both of them.
  141. + 986>    In DOS 4.0 and later, use INT 21 function 69 to access the boot
  142. + 987>    record's serial number and volume label together; see the next Q.
  143. + 989>    Assume that by "volume label" you mean the traditional one, the one
  144. + 990>    that DIR and VOL display.  Though it's a directory entry in the root
  145. + 991>    directory, you can't change it using the newer DOS file-access
  146. + 992>    functions (3C, 41, 43); instead, use the old FCB-oriented directory
  147. + 993>    functions.  Specifically, you need to allocate a 64-byte buffer and
  148. + 994>    a 41- byte extended FCB (file control block).  Call INT 21 AH=1A to
  149. + 995>    find out whether there is a volume label.  If there is, AL returns 0
  150. + 996>    and you can change the label using DOS function 17 or delete it
  151. + 997>    using DOS function 13.  If there's no volume label, function 1A will
  152. + 998>    return FF and you can create a label via function 16.  Important
  153. + 999>    points to notice are that ? wildcards are allowed but * are not; the
  154. +1000>    volume label must be space filled not null terminated.
  155. +1002>    The following MSC 7.0 code worked for me in DOS 5.0; the functions
  156. +1003>    it uses have been around since DOS 2.0.  The function parameter is 0
  157.  
  158. - 971>    root directory for volume labels.  This code should work for DOS
  159. - 972>    2.0+, though I tested it only under DOS 5.0.  (I don't know what
  160. - 973>    happens with networked drives.)
  161. - 975>    Important points to notice are that ? wildcards are allowed but *
  162. - 976>    are not; the volume label must be space filled not null-terminated.
  163. +1006>    root directory for volume labels.  (I didn't try to change the
  164. +1007>    volume label of any networked drives.)
  165. +1009>    // Requires DOS.H, STDIO.H, STRING.H
  166.  
  167. -1023>Q411. How can I get the disk serial number?
  168. +1055>Q409. How can I get the disk serial number?
  169.  
  170. +1061>    This function also gets and sets the volume label, but it's the
  171. +1062>    volume label in the boot record, not the volume label that a DIR
  172. +1063>    command displays.  See the preceding Q.
  173. +1065>Q410. What's the format of .OBJ, .EXE., .COM files?
  174. +1067>    Please see section 2, "Compile and link".
  175.  
  176. -1256>    I'm outside my expertise on this one, but in November 1992 Jamshid
  177. -1257>    Afshar (jamshid@emx.utexas.edu) kindly supplied the following:
  178. +1296>    I'm outside my expertise on this one, but in late 1992 Jamshid
  179. +1297>    Afshar (jamshid@emx.utexas.edu) kindly supplied the following, which
  180. +1298>    incorporates some corrections agreed with Duncan Murdoch (dmurdoch@
  181. +1299>    mast.queensu.ca).  If you have any corrections or comments, please
  182. +1300>    send them to both the above addresses.
  183.  
  184. -1260>    1. Use XMS memory (don't bother with EMS).  There are some libraries
  185. -1261>    available at Simtel to access XMS.  The disadvantage is that you
  186. +1303>    1. Use XMS or EMS memory.  XMS is preferable in most cases, but
  187. +1304>    some machines won't provide it.  There are some libraries available
  188. +1305>    at Simtel to access XMS or EMS.  The disadvantage is that you
  189.  
  190. -1268>    program will run on even 286s.
  191. -1270>    2. Program under MS Windows.  MS Windows functions as a DOS extender
  192. -1271>    (see #3).  Borland/Turbo C++ 3.0 includes EasyWin [and Microsoft
  193. -1272>    C/C++ 7.0 has QuickWin --ed.] which is a library that automatically
  194. -1273>    lets you compile your current code using C/C++ standard input or
  195. -1274>    <conio.h>'s gotoxy() into a MS Windows program so your code can
  196. -1275>    immediately allocate many MBs of memory (Windows enhanced mode even
  197. -1276>    does virtual memory).  The disadvantage of MS Windows is that any
  198. -1277>    one object (e.g., a single malloc( )) is still restricted to 64K
  199. -1278>    (unless you want to mess with huge pointers in Windows).
  200. -1280>    3. Use a DOS extender.  This is definitely the best solution from
  201. -1281>    the programmer's standpoint.  You just allocate as much memory as
  202. -1282>    you need using malloc( ) or `new' and you don't have to worry about
  203. -1283>    any 64K limits.  It doesn't require source code changes and unlike
  204. -1284>    option #1 your code is portable and not obsolete in a few months.
  205. -1285>    Your options for this solution are:
  206. -1287>    - Buy PharLap's DOS extender (286 or 386 version) that works with
  207. -1288>      BC++ 3.0+ (just requires a relink).  Note, the BC++ 3.1 upgrade
  208. -1289>      came with PharLap "lite".
  209. -1291>    - Get the GNU (free,copylefted) gcc 2.1 compiler/extender that was
  210. -1292>      ported to MS-DOS and runs on 386 machines (supports C and C++).
  211. -1293>      FTP to barnacle.erc.clarkson.edu and get pub/msdos/djgpp/readme.
  212. -1295>    - Wait for Borland's DOS extender package (in BC++ 4.0) that is
  213. -1296>      supposed to be released at the end of this year.  I believe MS is
  214. -1297>      also doing the same.  Zortech 3.0 comes with a DOS extender, but I
  215. -1298>      wouldn't recommend the product.
  216. -1300>    4. This option doesn't really count since it's not a solution in
  217. +1312>    program will easily run on even 286s.
  218. +1314>    2.  Program under MS Windows.  MS Windows functions as a 16-bit DOS
  219. +1315>    Extender (see #3).  Borland/Turbo C++ 3.x includes EasyWin [and
  220. +1316>    Microsoft C/C++ 7.0 has QuickWin --ed.] which is a library that
  221. +1317>    automatically lets you compile your current code using C/C++
  222. +1318>    standard input or <conio.h> into a MS Windows program so your code
  223. +1319>    can immediately allocate many MBs of memory (Windows enhanced mode
  224. +1320>    even does virtual memory).  The disadvantage is that like any 16-bit
  225. +1321>    Extender a single malloc() is restricted to 64K (unless you want to
  226. +1322>    mess with huge pointers in Windows).  Also, EasyWin's screen output
  227. +1323>    is significantly slower than a DOS character-mode program's and you
  228. +1324>    must of course run the program from Windows.
  229. +1326>    3.  Use a 16-bit or 32-bit DOS Extender.  This is definitely the
  230. +1327>    best solution from the programmer's standpoint.  You just allocate
  231. +1328>    as much memory as you need using malloc() or 'new'.  A 16-bit
  232. +1329>    Extender still has 16-bit ints and restricts arrays to 64K, but a
  233. +1330>    32-bit Extender has 32-bits ints (which makes porting a lot of UNIX
  234. +1331>    code easier) so there are no 64K limits.  A 32-bit Extender requires
  235. +1332>    a 32-bit compiler and the program will not run on 286s.  Some
  236. +1333>    Extenders also do virtual memory.  Using an Extender doesn't require
  237. +1334>    source code changes and unlike option #1 your code is portable and
  238. +1335>    not obsolete in a few months.  Your options for this solution are:
  239. +1337>    - Buy PharLap's 16-bit Extender that works with BC++ 3.0+ and MSC
  240. +1338>      (just requires a relink).  Note, the BC++ 3.1 upgrade came with
  241. +1339>      PharLap "lite".  Pharlap's 32-bit Extender works with 32-bit
  242. +1340>      compilers like [?]
  243. +1342>    - Get the GNU (free,copylefted) gcc 2.x compiler which DJ Delorie
  244. +1343>      ported from UNIX and which uses his 32-bit Extender.  It supports
  245. +1344>      C and C++, but the Extender is VCPI which means neither the
  246. +1345>      compiler nor programs it produces will run in a DOS session under
  247. +1346>      Windows.  FTP to barnacle.erc.clarkson.edu and get
  248. +1347>      pub/msdos/djgpp/readme.
  249. +1349>    - Get a 32-bit compiler or one that comes with a DOS Extender.
  250. +1350>      Zortech comes with 16-bit and a 32-bit Extenders (no debugger for
  251. +1351>      32-bit programs, but Flashtek sells one).  Watcom also makes a C
  252. +1352>      [and C++?] 32-bit compiler.  [If anyone else has products or plans
  253. +1353>      to announce, please let me know.]
  254. +1355>    - Buy Borland Pascal 7.0.  It includes a 16 bit royalty-free DOS
  255. +1356>      extender using the same interface as MS Windows.  It functions
  256. +1357>      under a DPMI server like Windows or QDPMI from Quarterdeck, and
  257. +1358>      also provides its own server which you can distribute with your
  258. +1359>      programs.
  259. +1361>    4.  This option doesn't really count since it's not a solution in
  260.  
  261. -1302>    OS/2 2.0 or UNIX (or Win32/NT when it comes out).  Borland is
  262. -1303>    putting its OS/2 compiler into beta now.  OS/2 is doing well (and it
  263. -1304>    runs DOS or Windows programs).  BC++ for OS/2 should also be a
  264. -1305>    success and there should be a good upgrade path from current Borland
  265. -1306>    compilers.
  266. +1363>    OS/2 2.0 or UNIX (or NT when it comes out).  I believe Win32 will
  267. +1364>    allow you to write 32-bit Windows programs.  [can someone fill me in
  268. +1365>    on what exactly Win32 is?]
  269.  
  270. -1605>    In PD1:<MSDOS.PGMUTL> at Simtel you'll find RCS55.ZIP.  I haven't
  271. +1664>    In PD1:<MSDOS.PGMUTL> at Simtel you'll find RCS56DOS.ZIP.  I haven't
  272.  
  273. -1607>    utility, but is limited to one-character extensions on filenames (no
  274. -1608>    .CPP).  A correspondent wrote that he has an RCS port to DOS that is
  275. -1609>    not limited to one-character extensions, but he doesn't remember
  276. -1610>    where he got it.  Anyone have a verified archive site?
  277. +1666>    utility, and is no longer limited to one-character extensions on
  278. +1667>    filenames (so .CPP and .BAS are fine).
  279.  
  280. (end of diffs for comp.os.msdos.programmer FAQ)
  281. -- 
  282. Stan Brown, Oak Road Systems                      brown@Ncoast.ORG
  283. Cleveland, Ohio, USA
  284.