Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!uunet!mcsun!hp4nl!eutrc3!tuewsd!wsinpp From: wsinpp@lso.win.tue.nl (Peter Peters) Newsgroups: comp.lang.pascal Subject: TP BUG Keywords: TP,BUG,WINDOWS Message-ID: <822@tuewsd.lso.win.tue.nl> Date: 24 Jan 90 09:46:43 GMT Organization: Eindhoven University of Technology, The Netherlands Lines: 87 Fellow TP pascal users, I did some more testing on the window bug I claimed to have found. The next program will show what I've come up with so far. Any comments (about the problem) are welcome.... Peter. ----------------------------------------------------------------- {$define test} Program BugAgain; (* * Demonstrate a bug which was present in TP 3.x (I patched it there) * Was corrected in TP 4.x and seems to be present again in TP 5.x *) Uses Dos,Crt; Const Xloc = 10; Yloc = 10; Width = 5; Height = 1; (* This is a troublesome value !!! *) Var i : Word; R : Registers; Begin ClrScr; For i := 1 To 80*24-1 Do Write('-'); Window(Xloc,Yloc,Xloc-1+Width,Yloc-1+Height); ClrScr; For i := 1 To Width-1 Do Write('a'); (* * Here comes trouble... * somewhere in the next write('a'), scrolling is done via the bios * INT 10h with register AX set to $0601. The $01 in register AL is * the number of empty lines to move in. * Apparently this goes wrong as can be shown by replacing the * write('a') statement by the alternative piece of code. * Watch what happens when this window scrolls !!! *) {$ifdef test} Write('a'); {$else} (* * This is an exact functional copy of what the TP compiler generates * to scroll a window up !! *) R.ax:=$0601; R.bh:=TextAttr; R.cx:=WindMin; R.dx:=WindMax; Intr($10,R); {$endif} (* * Now this could be called : * * 1 - a bios bug. * 2 - a TP bug. * * Scrolling up a 1 line window should be the same as clearing it !. * If all bios-es are like the one in my machine, (showing the same * erroneous scroll in the example above) I tend to calling this a * TP bug, because they (Borland) should have known this bios-"feature" *) End. --------------------------------------------------------------------- -- | Peter Peters | UUCP : wsinpp@lso.win.tue.nl | | Eindhoven University of Technology (TUE) | SURF : heithe5::wsdcpp | | Dept. of Mathematics and Computer Science | VHF : PA0PPE | | Disclaimer : I said WHAT ??? | TUE : HG 8.86 tst. 4283 |