home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / pascal / 8033 < prev    next >
Encoding:
Internet Message Format  |  1993-01-11  |  2.2 KB

  1. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!spool.mu.edu!think.com!enterpoop.mit.edu!eru.mt.luth.se!lunic!sunic!dkuug!diku!terra
  2. From: terra@diku.dk (Morten Welinder)
  3. Newsgroups: comp.lang.pascal
  4. Subject: BP7 -- three more bugs.
  5. Message-ID: <1993Jan11.131449.5107@odin.diku.dk>
  6. Date: 11 Jan 93 13:14:49 GMT
  7. Sender: terra@embla.diku.dk
  8. Organization: Department of Computer Science, U of Copenhagen
  9. Lines: 71
  10.  
  11. Bug report -- BP7, Tools menu.
  12. Bug report -- BP7, Overflow check, bytevar*number.
  13. Bug report -- BP7, FPU-Emulator.
  14.  
  15. The following has been sent to bugs@borland and the Internet
  16. newsgroup comp.lang.pascal.
  17.  
  18.  
  19.  
  20. 1. Tools menu -- garbage in error message, missing argument.
  21. -----------------------------------------------------------
  22.  
  23. The menu formatting characters "~" show up in error message boxes from
  24. the tools menu. Example: "Turbo P~r~ofiler."
  25.  
  26. The tools are called with one argument missing -- Primary.Exe -- when
  27. the primary program has not been compiled since the Ide was loaded.
  28.  
  29.  
  30.  
  31. 2. Overflow check wrong for bytevar*number.
  32. ------------------------------------------
  33.  
  34. The code
  35.  
  36. {$Q+}
  37. Var Target: Byte;
  38. Begin
  39.   Target:=4;
  40.   Write(Target*9000);
  41. End.
  42.  
  43. writes some negative number. The generated code is
  44.  
  45.     ...
  46.     Jnc    @@over
  47.     Call    System.Overflow
  48. @@over: Cwd
  49.     Call    System.WriteInt
  50.     ...
  51.  
  52. The "Cwd" shows that the result of "Target*9000" is an integer. However,
  53. "Jnc" should have been "Jno" in that case. It's is not known whether
  54. correct pascal code may produce wrong error messages.
  55.  
  56.  
  57.  
  58. 3. The linker and FPU-emulator are in conflict concerning 386.
  59. -------------------------------------------------------------
  60.  
  61. The standalone assembler accepts the code
  62.  
  63.     Emul
  64.     P386
  65.     P387
  66.     Fld    [Dword Ptr Fs:0]
  67.  
  68. and generates an "emulation fixup." The linker of BP7 however ignores
  69. the fixup! The result is code that will run perfectly when a coprocessor
  70. is present, hang if not.
  71.  
  72. The emulator does not support "Fs:", "Gs:", and 32-adressing. Either it
  73. should or the linker should reject the object file.
  74.  
  75.  
  76.  
  77. -- 
  78. ------------------------------------------------------------------------
  79. Visit the lyrics archive at ftp.cs.uwp (mirrored to nic.funet.fi, a site
  80. in Finland). All kinds of lyrics available -- upload "yours" and join.
  81. ------------------------------------------Morten Welinder, terra@diku.dk
  82.