From: terra@diku.dk (Morten Welinder)
Newsgroups: comp.lang.pascal
Subject: BP7 -- five more bugs
Keywords: BP7, bugs
Date: 7 Jan 93 15:30:55 GMT
Organization: Department of Computer Science, U of Copenhagen

Bug report -- BP7, autosaving.
Bug report -- BP7, Syntax highlighting of "forward".
Bug report -- BP7, Basm, Bound
Bug report -- TD, assembler, incorrect code generation.
Bug report -- TD, single step.

The following has been sent to bugs@borland and the Internet
newsgroup comp.lang.pascal.


1. Autosaving of editor files fails under certain conditions.
------------------------------------------------------------

First load the file "Test.Pas" and enter "Begin end." in it. Save.
Set primary file to "Test.Pas" and compile. Now load another file,
say "Bug.", and make some changes. Press Ctrl-F9 to run the test
program. Since recompilation is not needed "Bug." IS NOT SAVED.

Aside from loosing changes this poses a problem when the file in
question is used by the program.


2. Syntax highlighting fails for "forward".
------------------------------------------

"Forward" is highlighted as a reserved identifier. It isn't.


3. BASM does not allow word sized second operand for Bound.
----------------------------------------------------------

The following is illegal in Basm:
{$G+}
Begin
  Asm Bound Ax,[Word Ptr Es:Si]
  End;
End.
This is Tasm syntax. Changing "Word" to "Dword" makes all go well,
but that's Masm syntax.


4. The assembler of Turbo Debugger has a large number of bugs.
-------------------------------------------------------------

The assembler can be expected to work correctly for the 8086
instruction set only. The disassembler works though so one is warned
when the assembler fails. In generel 32 bit addressing and
operandless fpu instructions fail. Try assembling the following
(with language=Asm):

Instruction                         Remark
------------------------------------------------------------------------
Bound    Ax,[Cs:100]                Cs: is ignored.
Bound    Eax,[100]                  Op32 prefix is ignored.
Bound    Ax,[Esi]                   Strange operand appears.
Shld     [Esi],Eax,1                1 is changed to 0.
Sub      [Byte ptr Esi],1           1 is changed to 0.
Jecxz    100                        System crashed, (Td386 reports
                                    an exception 0Dh)
Bt       [Dword ptr Esi],1fh        1fh is changed to 0, Dword to Word.
Fucom    <anything>                 Always reports "invalid operand(s)".
Fucomp   <anything>                 Always reports "invalid operand(s)".
Fucompp  <anything>                 Always reports "invalid operand(s)".
Fxch                                Doesn't work without explicit op.
Fcom                                Generates an Fcomp instruction.
                                    [Fadd now correctly generates a
                                    Faddp instruction, but Fcom should
                                    not add the p suffix.]
Fcomp                               Generates an Fcompp instruction.
Add      Ax,[Cs:Esi+4*Edi]          Is not allowed though both
                                    "[Cs:Edi]" and "[Esi+4*Edi]" are.
Lock Add Cs:[Esi+2*Edi+11111111],   Produces garbage error message.
         22222222
Lock Add Cs:[Esi+2*Edi+11111111],22 Produces "Path not found"!


5. Turbo Debugger fails to single step Into, Bound, Idiv, and Div.
-----------------------------------------------------------------

Alt-F7 is supposed to single step but fails when the above instructions
generate exceptions. Also Ctrl-F cannot be used to find the handlers.


------------------------------------------------------------------------
Visit the lyrics archive at ftp.cs.uwp (mirrored to nic.funet.fi, a site
in Finland). All kinds of lyrics available -- upload "yours" and join.
------------------------------------------Morten Welinder, terra@diku.dk
-- 
------------------------------------------------------------------------
Visit the lyrics archive at ftp.cs.uwp (mirrored to nic.funet.fi, a site
in Finland). All kinds of lyrics available -- upload "yours" and join.
------------------------------------------Morten Welinder, terra@diku.dk
Newsgroups: comp.lang.pascal