Date : Mon, 04 Jun 1984 16:44:00 MST
From : Kevin Kenny <Kenny@his-phoenix-multics.arpa>
Subject: Turbo Pascal bug
In the CP/M-80 implementation of Turbo Pascal, the examples given in the
manual for processing the CP/M command line DON'T WORK.
Consider:
procedure foo;
var cmdline : string [127] absolute $80;
begin
WriteLn (cmdline)
end.
This works correctly for commands up to 32 bytes in length. Beyond
that, the command line is filled with rubbish by the time the user
program gets control. Seems the Borland folk use that space for a jump
table and some other miscellaneous material. They know about the bug --
"we're working on it."
It doesn't look as if it would be too difficult to patch a generated COM
file to grab the command line at initialization time and stash it
somewhere safe. I may try that one of these times, if they don't come
up with a fix quickly.
My opinion of Turbo just dropped about three notches [to very good, from
superb :-) ].
Note that this is just the 8-bit version; the 16-bit versions can use
``absolute CSeg:$80'' and it works just fine.
k**2
Kenny.OSNI%PCO@CISL