home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / os2 / advocacy / 10949 < prev    next >
Encoding:
Internet Message Format  |  1992-12-26  |  7.0 KB

  1. Xref: sparky comp.os.os2.advocacy:10949 comp.os.ms-windows.advocacy:3434
  2. Newsgroups: comp.os.os2.advocacy,comp.os.ms-windows.advocacy
  3. Path: sparky!uunet!mcsun!sun4nl!dutrun!donau!dutecaj.et.tudelft.nl!linstee
  4. From: linstee@dutecaj.et.tudelft.nl (Erik van Linstee)
  5. Subject: Re: FCC will proclaim Microsoft is run by Communists! : )
  6. Message-ID: <1992Dec26.121058.22647@donau.et.tudelft.nl>
  7. Sender: news@donau.et.tudelft.nl (UseNet News System)
  8. Nntp-Posting-Host: dutecaj.et.tudelft.nl
  9. Organization: Delft University of Technology, Dept. of Electrical Engineering
  10. References: <1992Dec25.102400.13417@donau.et.tudelft.nl> <1992Dec25.163338.29576@tc.cornell.edu> <1992Dec25.181732.15997@donau.et.tudelft.nl> <1992Dec25.214123.5213@tc.cornell.edu>
  11. Date: Sat, 26 Dec 1992 12:10:58 GMT
  12. Lines: 152
  13.  
  14. bai@msiadmin.cit.cornell.edu (Dov Bai-MSI Visitor) writes:
  15.  
  16. >In article <1992Dec25.181732.15997@donau.et.tudelft.nl> linstee@dutecaj.et.tudelft.nl (Erik van Linstee) writes:
  17. >>bai@msiadmin.cit.cornell.edu (Dov Bai-MSI Visitor) writes:
  18.  
  19. >Erik, as a short exercise I suggest that you take a look at the FAQ
  20. >for the msdos.programmer group and see how many of the questions
  21. >are related directly to hardware and system. You will find many.
  22.  
  23. >>No, one need not know about segment:offset. Why do you think they
  24. >>should?
  25.  
  26. >One should because some compilers (e.g. MS-C) provide _based pointers.
  27. >I think that a good programmer should know how to use them. In addition
  28. >it is related to structure packing.
  29.  
  30.  
  31. Depends of the level he is programming at.
  32. >Also, it is sometimes needed to write inline assembly and
  33. >you must be aware of the architecture. 
  34.  
  35.  
  36. Well, you are right about assembly language, but there is good
  37. reason not to use it, therefore not having to know about
  38. seg:ofs. This kind of knowledge is necessary for directly
  39. programming to the system, or even system programming, but
  40. for applications, I say not. No software engineering or programming
  41. course or whatever I have seen involves memory models. It is
  42. about algorithms and such.
  43.  
  44.  
  45. >>Yes, one needs to know what memory model to use when programming
  46. >>in C, but only to optimise results. That is a feature C provides.
  47. >                   ^^^^^^^^
  48. >And a good programmer is not supposed to optimize ? Is there
  49. >also a third category of an Optimizing Programmer -:) ?
  50.  
  51. Depends on how far you want to go. Will there really be a large
  52. penalty in performance or memory usage when a huge model is
  53. used where a compact could be used?
  54.  
  55. >>Programming in Pascal does not involve memory models. Anyway,
  56. >>choosing the memory model is no programming decision, proper
  57. >>code is not affected by memory model.
  58.  
  59. >That is not true at all. Near, far, hugh pointers are not a standard
  60. >of any language. They are compiler extensions directly related to
  61. >the segmented architecture. A good programmer is expected to know
  62. >how to use them effectively.
  63.  
  64. Well, I have not yet encountered a situation where I had to be
  65. concerned about whether a pointer was far, near or huge. Conversions
  66. are done implicitly and where they are not, it is because of a
  67. defeciency of the compiler. But don't get me wrong, I do know
  68. about architectures.
  69.  
  70.  
  71. >You cannt write a program with a data item extending 64k, without
  72. >using the huge model. But the huge model is not the default. If you
  73. >dont use it, your code may give the wrong results and you would not
  74. >know what is going on if you are not aware of the segmented architecure.
  75.  
  76. That is true, but that is a limitation of the compiler, isn't it?
  77. The compiler should be smart enough to find the right model.
  78. But, this is not what I meant to say before. I meant the programmer
  79. should just request memory and see if he gets it or not. If this
  80. always results in not whenever he requests more than 64k, that is
  81. a shame, but this is no special case over the other cases where
  82. the memory is not available for other reasons.
  83. Besides, knowing the limitations of your C or other language compiler,
  84. wouldn't you write a piece of code that solves it and can be used
  85. henceforth? Or at least ask a system programmer to do it and then
  86. use it for ever more. That would be good programming practice.
  87.  
  88. >  
  89. >>No, one can not program effectively for DOS period.
  90.  
  91. >Nonetheless there are about 90 million  DOS installed. A good programmer
  92. >is expected to program as effectively as possible. 
  93.  
  94. >>>How about the differences between 286/386 ?
  95. >>
  96. >>Well, what about them?
  97.  
  98. >(1) Memory mapping (2) An optional 32-bit programming (3) 16M memory
  99. >limit in 286 (4) flat memory model with an appropriate  DOS extender 
  100. >(5) switching time from real to protected mode considerably different.
  101.  
  102. Yes, of course, but those are not DOS programming considerations.
  103.  
  104.  
  105. >>>How about the 640k limit and how to overcome it ? Need not the 
  106. >>>programmer know about extended/expanded memory, DPMI/VCPI interfaces ?
  107. >>
  108. >>The 640k limit is of no concern. When you write an app. and you
  109. >>need memory, you request it and check if you got it. You do not
  110. >>consider if maybe the target system has a specific limit, you
  111. >>just check for any limit to be reached. 
  112.  
  113. >(1) The concern for memory is different if the memory limit is low.
  114. >(2) In shortage of memory the programmer may use overlays.
  115.  
  116. There is always the possibility of low memory. Not a special
  117. case for DOS.
  118.  
  119. >>No, a programmer needn't know about DPMI/VCPI interfaces. If he
  120. >>wants memory, he requests it, he does not generally care where it
  121. >>comes from. The DPMI/VCPI interface should be hidden from him,
  122. >>unless of course he is writing his own memory management, but
  123. >>I can't think of a reason why an application should need that.
  124.  
  125. >>>I have in front of me the second edition (1992) of the book
  126. >>>"Extending DOS - A Programmer's Guide to Protected Mode DOS" by
  127. >>>Ray Duncan. The first introductory chapter include detailed description 
  128. >>>of selectors, descriptors etc. 
  129. >>
  130. >>Protected mode DOS, where can you buy that? 
  131.  
  132. >Come now, your last few postings were to convince me that the 
  133. >programmer does _not_  need such a book. Why are you interested ?
  134.  
  135. I meant the Protected mode DOS. It isn't a regular system, is it?
  136. sO it is bound to have a very special and different approach.
  137.  
  138. >>Oh wait, it says
  139. >>Extending DOS. So it isn't part of DOS? Then it can't be of
  140. >>a DOS app. programmers concern, can it? Looks like systems programming
  141. >>to me, but I could be wrong.
  142.  
  143. >Sure, protected mode is not part of DOS. But that is the whole point:
  144. >DOS is so deficient that much of the work must be provided 
  145. >by the programmer. That is why there is no real distinction between
  146. >system and application programming for a good, efficient DOS programmer.
  147.  
  148. I disagree to a point. A good programmer should have good libraries
  149. at his disposal that overcome those deficiensies. That alliviates
  150. him of the necessity to know about the target system, if
  151. not only for portability reasons.
  152.  
  153.  
  154. >BTW: Does any body think that if a "system programmer" at MS
  155. >has written an interrupt handler for the "application" group
  156. >he must tell it to all the competitors? Is it another case of
  157. >"predatory tactics" ?
  158.  
  159. These issues are none of my concern.
  160.  
  161.  
  162. Erik van Linstee   |   Delft University of Technology   |   I'll be back ... 
  163.  
  164.