home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mega Top 1
/
os2_top1.zip
/
os2_top1
/
APPS
/
PROG
/
PASCAL
/
SPEED2
/
DOC
/
FAQ.DOC
< prev
next >
Wrap
Text File
|
1994-10-06
|
76KB
|
1,894 lines
Chemnitz, Oct 1994
by: Rene Nürnberger
Answers to bug reports and faq's for SPEED-Pascal/2 for OS/2
------------------------------------------------------------
Answered by the author
----------------------
Actual release: SPEED-Pascal/2 for OS/2 Beta III (Oct 94)
Copyright (C) & (P) Vision Software Chemnitz /GERMANY
c/o DMV-Verlag
Redaktion toolbox
z.Hd. Herrn R. Nürnberger
Gruber Str. 46a
D-85586 Poing
Germany
Fax: xx49-8121-769-199
or (better) via CompuServe 72662,2052
This Beta Release III is distributed by the german "toolbox" magazine.
Special thanks to Jörg Braun and Wolfhard Rinke for all their help.
This is no shareware, no public domain, no freeware, no cripple ware
but a service of the German toolbox mag. (We do not pac'th!).
This is a fully functional beta version of SPEED-Pascal/2,
the only object oriented 32 bit pascal compiler for OS/2.
The final version (shipped about Jan/Feb '95) will cost about
$100 or DM 150. Some limitations and bugs of this beta version will
then be corrected. Especially a full english/german help will be
supported. English/German handbooks are of course part of this
final release. Further the final release will provide libraries for
accessing the OS/2 DLL's without having to reverse the parameters as
it is in this Beta and a context sensitive help for the IDE.
All programs and sources in this archive are copyrighted. Commerical
use and publication are strictly prohibited. You may use SPEED-Pascal/2
only for private purposes. Modification, decompilation and reengineering
of the executables is prohibited. You may not change the copyright notices
in the sources.
You may use, copy and redistribute the programs and sources in this archive
if all files are unmodified. But you may not ship this program with any
commerical programs.
Please mail bug reports and suggestions to the author (via CIS 72662,2052) !
Bugfixes and Updates will be placed into the German OS/2 User forum:
GO OS2UGER
For a detailed list of the corrected bugs in this version see BUGREPOR.ENG
(english) or BUGREPOR.GER (german).
To all users:
SPEED-Pascal/2 is the work of one single programmer (it's me).
Thank you for your interest and bug reporting !!!
I am a student of informatik and do "some" programming in
my sparetime or whenever I don't want to go to the
university... (UUUH)
I hope this Beta III removes most of the errors you detected.
For some reason there still can be errors, because I can
(of course) not test anything. Please keep the good work
and send more bug reports so Speed-OS/2 will get better and
better !!!
Does anybody know details about the OS/2 DosDebug API function
(especially setting breakpoints and debug PM-Applications) and
the IBM debugger format ???? The IBM redbooks and whitepapers
give not enough information and it would be nice if the
IDE could have an integrated debugger like the BP-IDE.
This is in OS/2 no problem, because the DosDebug API provides
debugging support - but nobody seems to know details...
Please help !! ( A little source file in C would be nice )
Does anybody know if it's somehow possible to call 32 Bit API
functions with PASCAL calling convention (Paremeters from
left to right onto the stack) since all API's
and PM-Functions use IBM _System calling convention. With the
16 Bit API's this is possible but not with the 32 Bit
calls !? This would be very helpful.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Question:
---------
I have downloaded speedos2. Looks good. Hope you are able to have
English help as well. I have an error to report.
While scrolling a text window (two windows were open) ...
Access violation at 000170d3 speed.exe 0001:70d3
P1=00000001 P2=0009fffc P3=X P4=X
EAX=00000e80 EBX=0000001d ECX=001fd783 EDX=000036a0
ESI=0009fffc EDI=000a0e7c
DS=00000053 DSACC=0000d0f3 DSLIM=1bffffff
ES=00000053 ESACC=0000d0f3 ESLIM=1bffffff
FS=0000150b FSACC=000000f3 FSLIM=00000030
GS=00000000 GSACC=xxxxxxxx GSLIM=xxxxxxxx
CS:EIP=5b:000170d3 CSACC=d0df CSLIM=1bffffff
SS:ESP=53:00023980 SSACC=d0f3 SSLIM=1bffffff
EBP=23986
FLG=12602
Hope that helps
HURRA !!!
Answer:
HURRA !!!
This problem seems to be corrected in the new Beta Release III
which runs completely under OS/2. However there still can be
some errors (??).
English help will be supported in the final version (shipped about
Jan/Feb '95) for about $100 or DM 150.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Question:
Wie lange haben wir auf diesen Pascal 32-bit Compiler gewartet!!!
Ich bin vom ersten Eindruck begeistert; besonders die
TurboPascal-Kompatibilitaet ist zu begruessen!
Für mich besonders wichtig ist das Anlegen von riesigen Datenfeldern.
(z.B. 3000x3000xInteger). Leider habe ich das bisher mit SpeedPascal
nicht hinbekommen. Mit den 16-bit Compilern (IBM Pascal/2 bzw.
BorlandPascalOS2-Patch) kann man Arrays dieser Groesse nur mit Tricks
erreichen. Ich hatte nun gehofft, da_ bei einem 32-bit Pascal solche
Einschraenkungen nicht mehr gelten. Habe ich etwas falsch gemacht
oder ist das fuer die Beta-Version doch etwas zu viel?
Wieso sollte eine Deklaration wie:
TestArray : Array[1..2000, 1..2000] Of Integer;
nicht funktionieren? Eine 64k-Beschraenkung gibt es doch nicht mehr!
Frank Schwedler
internet: ngg05@rz.uni-kiel.d400.de
mausnet: frank_schwedler@ki.maus.de
Answer:
Das ist tatsächlich ein Bug von SPEED-Pascal/2. In der Beta
Version III ist dieser Fehler behoben.
Wie auch immer: Da SPEED-Pascal/2 ALLE Variablen mit festen Werten vor-
belegt (0 oder sonst einen sinnvollen Wert) und mit in das EXE
File schreibt, ist es nicht sinnvoll ein größeres Array als globale
Variable zu definieren. Das Ergebnis wäre eine immens große EXE Datei
und eine inakzeptable Compiliergeschwindigkeit. Viel eleganter ist
es das Array als dynamische Variable zu vereinbaren etwa wie folgt:
TYPE
TestArray=Array[1..2000, 1..2000] Of Integer;
VAR pArr:^TestArray;
BEGIN
New(pArr);
{... some code ... z.B. pArr^[1000,1000]:=2;}
Dispose(pArr);
END.
Damit nutzen Sie den Heap von Speed-OS/2 und das Limit ist 512 MB !
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Question:
i've tried making the SpeedOS2 work. No go. It compiled-- maybe I
haven't got the compilation options right-- but trying to run this
program through PAS.PAS resulted in the DOS session hanging:
program Test;
begin
writeln('Hello.');
end.
I look forward to discussing this with you when you get back.
Answer:
I could not find out the error, on my system the program is compiled
and executed correctly. Maybe there's some other reason for this
error. However try compile with the new Beta III as I did.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Question:
On my system, the Vision IDE shuts down if I press page down. It
also only loads/shows part of a loaded file.
This could be because I'm running at 1024x768.
On both this and the previous system I've noticed that you have
certain differences from the Borland product, in terms of notation.
For example,
inherited.AMethod;
I can think of a lot of reasons why the changes might be easier to
implement, but I guess what I'm curious about is, are you going to
try for greater Borland compatibility?
More ramblings as they occur to me. By the way, I _really_ like the
magazine. Vas ist "dasselbe"?
Oh, and are you planning to have a VDE to go with this? You know, a
Delphi/VB type interface.
Answer:
In the actual Beta III the inherited call is now possible in both
ways -- Inherited AMethod (like Borland) and Inherited.AMethod (more
understandable I think).
At the meantime I cannot test your IDE bug because of terrible
hardware at my side (URRGH). Of course the reason can be your
1024x768 mode but I cannot test because I only have 640x480
standard VGA. This will change in a few weeks...
But try with the new beta III because the IDE was rewritten.
In the future a connection to Delphi is planned, especially a
library compatible to Delphi's "VCL" (Borlands new OWL).
By the way: "dasselbe" means "the same as".
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Question:
I was very excited when I heard of your 32-bit object oriented
Pascal compiler because I prefer to program in Pascal when I can
and I prefer to program for OS/2 when I can. After trying the
compiler for a few days I am quite impressed but there are several
problems which prevent me from being able to use the compiler
for any serious work as it stands.
The first catagory of problems are features of standard pascal that
are missing:
1. WITH statements do not seem to work. The following segment will
not compile:
Var R : Record A,B : Word; End;
Begin
With R Do A := 1;
End;
2. Sets do not work correctly. The following declaration would not
compile:
Var S : Set of Byte;
3. No real numbers of any sort seem to be supported.
These missing features or problems are very important to me and I
would not be able to use a Pascal that did not include them.
The second catagory of problems have to do with the Object Oriented
extensions.
1. The special syntaxes New(P,<constructor>) and
Dispose(P,<destructor>) are not supported.
Although I would use the compiler without this it is extremely
convienient and ought to be supported.
2. Virtual destructors are a necessity for practical
object oriented programming.
3. The following program will not compile for some reason.
(*****************************)
Program Tmp;
Type
PObj = ^TObj;
TObj = Object
Constructor Init;
Destructor Done;
Procedure Test; virtual;
End;
Constructor TObj.Init;
Begin
End;
Destructor TObj.Done;
Begin
End;
Procedure TObj.Test;
Begin
End;
Var O : TObj;
Begin
O.Init;
O.Done;
End.
The third catagory are inconsistancies with Turbo Pascal extensions.
These may not cause me to not use the compiler but having them
fixed would allow the use of many of my existing units.
1. Strings seem to be only implemented as null-terminated strings.
This will break many pieces of code which rely on the 0th byte
being a length byte.
2. Pointer arithmetic on PChars doesn't seem to work.
3. <PChar Var> := @<Array of Characters> doesn't work.
4. Inline assembly does not recognize local variables and
parameters.
Finally, I found a few appearent bugs.
1. This nested procedure gives an error:
(******************)
Program Tmp;
Procedure One;
Var A : LongInt;
Procedure Two;
Begin
A := 1;
End;
Begin
Two;
End;
Begin
One;
End.
(******************)
2. This value type cast gives an error:
Var L : LongInt;
Begin
L := LongInt(1);
End;
I hope I don't sound too critical. I just think this could be
a very useful service if some of these things are fix and/or
changed. I work with Pascal in my full time job and excersize
if to it's limits. Although I would not use this compiler at
work, obviously, I still have a large number of units
and programs which I can use to test the compiler if the above
are changed.
Please feel free to e-mail me if you need any clarification.
Eric Blood
eblood!tlizard@wicat.com or
eblood@wicat.com if the first doesn't work for you.
P.S. I find that having to press a key after an error message is
annoying and I'm not sure what the use of it is.
P.P.S. Are there any plans for a debugger? If not will you at
least be able to write a symbol table in some format so that
IPMD could be used or so that gdb (the gnu debugger) could
be modified to work with Pascal programs?
----------------------------------------------------------------
Eric Blood Telephone: 1-801-377-7708
tlizard!eblood@wicat.com Address: 625 N 600 W #5
Provo, UT 84601
Subject: SPDos2
Answer:
OOPS ! - What a bug report !!!!
First catagory:
1. It's done ! The WITH statement is now implemented in Speed-OS/2.
2. The Set Types are exteded now to SET OF BYTE and SET OF CHAR.
3. In the actual beta III real types (REAL,DOUBLE,EXTENDED)
are now supported plus the correspondending functions
(sin,cos,....).
4. Nested proedures are currently not implemented... Sorry !
Second catagory:
1. The Borland typical New(<P>,constructor) and Dispose(<P>,
destructor) are not supported under Speed-OS/2 since Speed
automatically allocates the space for a object when
calling the constructor or releases memory when calling the
destructor. By the way: The new Borland compiler "Delphi"
does it in the same way.
For the same reason it is not needed to declare a pointer to
an object, simply type:
Program Tmp;
Type
TObj = Object
Constructor Init;
Destructor Done;
Procedure Test; virtual;
End;
Constructor TObj.Init;
Begin
End;
Destructor TObj.Done;
Begin
End;
Procedure TObj.Test;
Begin
End;
Var O : TObj;
Begin
O.Init;
O.Done;
End.
2. Virtual destructors are included in the actual Beta III.
3. See above.
Third catagory:
1. Strings are implemented in the Turbo-Pascal manner (0th Byte
holds the length) as standard type STRING and as C-like
0-terminated Strings as standard type PString.
The type STRING includes both because it has the length of
the string in the first byte AND is terminated by a "0"-Byte
since you use the standard string functions and no inline
assembler.
2. The PChar type now defined as a pointer to PString.
3. See under 2.
4. When using inline assembler you can change parameters when
you place a '$' before the parameter name.
f.e.
PROCEDURE Test(VAR a:BYTE);
VAR b:LONGWORD;
BEGIN
ASM
MOV EDI,$a
MOVB [EDI+0],0
MOVD $b,0
END;
END;
In the current beta III a debugger support for the IPMD
debugger is (partial) included. It is planned to integrate the
debugger into the IDE as Borland does.
Does anybody know details about the OS/2 DosDebug function
(especially setting breakpoints and debug PM-Applications) and
the IBM debugger format ????
5. The wrong typescast is corrected in the new Beta III.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Question:
Hi Rene,
You'll probably get flooded with requests by now. I've just
downloaded SPDos2. Nice work! I can't wait for the IDE to be fully
functional. I like the idea for the compiler to be Turbo Pascal
compatible. Thanks for your efforts, it is appreciated!
Here are some of the observations I've made while playing around
with SPDos2, I'm marking the relevant code with ">>", btw, if
there is more than one version available, I used
"SPEED-Pascal/2 for OS/2 V 1.0 (Beta) Demo Version (1994)":
-------------------------------------------------------------------
- SPDos2 doesn't understand/handle Arrays of Arrays yet:
Fatal compiler error:No more index registers in:36,1 ()
HexArr[1] := HexByte Shr 4;
HexArr[2] := HexByte And $0F;
>> RetStr := HexDigits[HexArr[1]] + HexDigits[HexArr[2]] +
RetStr;
----------------------------------------------------------------------
- In quite a number of my Turbo Pascal progs I use the "Port"
command, what is the eqivalent for SPDos2?
Fatal compiler error:Undefined identifier in:58,14 (PORT)
>> Port[IoAddr + $406] := ECNTRL_SAPROM Or ECNTRL_THIN;
------------------------------------------------------------------------
- Formatting for variable writes would be a nice adition
Fatal compiler error: ) expected in:13,14 ()
>> WriteLn(Hour:3, Min:3, Sec:3, Sec100:3);
---------------------------------------------------------------------
- How do you call .dll's from SPDos2? I'd like to do some network
programming.
If you can help me with this one, I can send you some more info on
this, if required. The .dll's I'd like to use was created either with
Watcom C or CSet/2.
---------------------------------------------------------------------
- Some .doc's would be nice, helpfull for more effective testing etc.
---------------------------------------------------------------------
Thanks for the good work, looking for a 32-bit Pascal compiler (+OS/2 Pascal)
for a long time.
Anton Opperman
itbaop@pukrs7.puk.ac.za
Nice job!!!
Answer:
Thank you for your interest.
1. The "Array of Array" problem is corrected in the new Beta III.
2. The Port command is not available under Speed-OS/2 because OS/2
does not allow direct access to the hardware and accessing ports
is a protected operation in protected mode causing a "General
protection fault". You have to acces your ports via OS/2 API
functions. Does anybody know more about accessing ports with
OS/2 API's ??
Maybe in the next beta release I implement the Port command !
3. Formatting for variable writes is included in the actual beta III.
4. To use third party DLL's with Speed-OS/2 you have to know the
DLL-name and the ordinal number of the DLL-function. Recognize that
you have to write the parameterlist from right to left when using
functions compiled with a C Compiler because PASCAL pushes the
parameters from left to right and C from right to left (URRRGH).
For example you want to use the C function TEST(int a,b) declared
in the DLL TestDll.DLL under ordinal number 100. (You can view the
ordinal number with IBM's EXEHDR or the Shareware EXEMAP)
--> Resulting program:
PROGRAM MyTest;
I-----This is important !
IMPORTS I
PROCEDURE Test(b,a:INTEGER):TestDll index 100;
END;
BEGIN
Test(1,2); {Call the DLL function}
END;
If you use DLL's created with Speed-OS/2 you have to replace
"IMPORTS" with "IMPORTS PASCAL" since these functions use the
PASCAL calling convention. In this case you don't have trouble
with the parameterlist !
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Question:
Das Program ist noch nicht vollich fertig, es funktioniert aber
ziemlich gut.
Wass noch fehlt:
* Floating-point (Reals / Doubles)
* Die ODD Funktion
* Einfaches multi-threading-Verfahren
* Procedural types
* Virtual Destructors !!!
* Conditional Defines {$ELSE} {$IFNDEF}
* Random Zahlen
* Identifier chopping (ermöglicht längere identifiers)
Es ist moglich um in eine Dos-session ein OS/2 program zu starten,
statt der meldung "This program ..." ist es für den Stub auch
möglich sich selbst als OS/2 program zu starten!!
Entdeckte "Bugs":
* Das QSORT.PAS beispiel (bei Borland Pascal mitgeliefert)
kompiliert nicht. Speed Pascal endet mit "Runtime Error 216"
(General Protection Fault)
* ABS(-5) liefert 251 oder -5 (umgebungsabhängig)
I:=-5;
I:=ABS(I); liefert (korrekt) 5.
* Es ist nicht erlaubt um in verschiedene Units
Konstanten/Types mit die gleiche Name zu definieren.
* Typecasting hat noch einige Fehler:
VAR C:CHAR;
I:INTEGER;
CHAR('A') <--- "Missing )"
CHAR(C) <--- "Illegal Instruction MOV"
WORD(I) <--- "Illegal Instruction MOV"
* Die VIRTUAL Definition ist nicht wie bei Borland Pascal und
es ist buggy bei inherite Objekten.
* "Type PString=^String;" la"sst sich nicht kompilieren:
"END expected"
* "Const MaxHeapSize: Word = 655360 div 16;" liefert
"Range Check Error", aber 655360 div 16 ist nur 40960!
* "Const Einschalten = True;" liefert "Type conflict in ..."
* "With RecordVar do Begin" liefert ein Fehler
* UNIT Test;
INTERFACE
....
....
IMPLEMENTATION
END.
ist nicht erlaubt, Speed Pascal braucht ein BEGIN-statment.
* UNIT Test;
INTERFACE
Procedure Dummy(Parameter : Word); ----+ parameter
| prolongation
IMPLEMENTATION |
|
Procedure Dummy; <---+
Begin |
If Parameter=1 then ...... <---+
End;
Begin
End.
ist nicht erlaubt.
* TMONITORPOSITION = record
fPosition : Word;
index : Word; <---- Fehler ??? Nicht bei Borland...
pbInBuf : Longint;
offOutBuf : Word;
end;
Dieses kompiliert nicht.
* Die CONCAT Funktion ist nicht austauschbar mit der Borland
Variante: S4:=Concat(S1,s2,s3);
* Die RESET Prozedure ist nicht austauschbar mit der Borland
Variante
* TCharSet = set of Char;
Dieses ist nicht erlaubt.
* "No more index-registers"
procedure Teilen(Source:string;var Dest:Array[1..40] of string);
var Counter,WordCounter:integer;
begin
{....}
for Counter:=1 to length(Source) do
begin
{.....}
if Source[Counter]<>#32 then
Dest[WordCounter]:=Dest[WordCounter]+Source[Counter];
end;
{....}
end;
Answer:
* Floating point Typen werden nun unterstützt
* Das QSort Programm läßt sich nun compilieren wenn die in Speed
nicht erlaubte verschachtelte Prozedur aufgelöst wird !
* Die ODD Funktion ist nun implementiert
* einfache Prozeduren zum Starten und Behandeln von Threads sind nun
in der Unit DOS definiert.
* Prozedurtypen sind zur Zeit nicht implementiert.
* Virtuelle Destruktoren sind nun verfügbar
* Die Conditional Defines {$ELSE},{$IFDEF},{$DEFINE},{$UNDEF},
{$IFNDEF}) sind nun implementiert
* Random Zahlen sind nun implementiert
* Identifier chopping ist zur Zeit nicht verfügbar
* Ein OS/2 Programm von einer DOS-Session aus zu Starten ist
generell nicht möglich.
* Typen und Konstanten müssen eindeutig sein. Bei Verwendung in Units
müssen die Typen/Konstanten im Implementation Teil vereinbart
werden und sind dann nur für diese Unit gültig. Dies funktioniert
mit der neuen Beta III.
* Die Fehler im TypeCasting sind behoben
* Die Virtual Funktion ist nun analog zu Borland Pascal. Ein Inherited
Aufruf ruft IMMER die Methode eines Elternobjektes auf !
* Der Typ PString selbst ist in Speed-OS/2 ein Standarddatentyp und
entspricht einen Null terminierten String wie in C. (kein Zeiger !)
Verwenden Sie einen anderen Variablennamen !
* Der Bug in den typisierten Konstanten ist behoben
* Der Fehler in der Konstantendefinition ist behoben
* Der WITH Befehl ist nun endlich verfügbar !
* Ein BEGIN Statement muß in Speed für das Hauptprogramm immer
angegeben werden.
* Exportierte Prozeduren/Funktionen müssen in der Implementation
wieder komplett angegeben werden.
* "Index" ist in Speed-OS/2 ein reserviertes Word und darf deshalb
nicht als Variablenname verwendet werden.
* Die CONCAT Funktion ist nun Borland kompatibel
* Die Reset/Rewrite Prozedur ist nun Borland kompatibel
* Set Typen sind nun erweitert worden
* Das Problem der Indexregister ist behoben
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Question:
Die generierte Code ist ziemlich schnell, aber einige Optimierungen
sind noch immer möglich.
(die nächste Beispiele enthalten Code generiert durch Speed Pascal)
* MOVZX AX,AL (generiert durch Speed Pascal) [3 Clockcycles]
ist träger als "MOV AH,0" oder "XOR AH,AH" [1 Clockcycle]
oder "AND AX,0FFh"
Im algemeinen:
Ein "MOV + AND" ist oft schneller als "MOVZX"
* Speed Pascal nützt (wie Borland Pascal) Systemcalls für
Stringfunktionen, direct einfu"gen ist aber viel schneller!
(Das Program wird aber grösser, vielleicht ist eine
Compilerswitch ein gutes Idee)
* Eine For-loop mit einem festen Anfangspunkt liefert
MOVD <counter> , immediate constant
MOV EAX , <counter>
CMP EAX , <maximum>
<conditional jump>
Dieses kann ersetzt werden mit
MOVD <counter> , immediate
MOV EAX , immediate ; <-- dieses ist vielleicht überflu"ssig
CMP <maximum> , immediate ; Als Maximum auch eine Constante ist,
<conditional jump> ; ist die Compare u"berflu"ssig.
^^^^^^^^^^^^^^^ ;
(Die conditional Jump ist geändert!)
Algemeiner:
Es hat oft Vorteile um Constanten durchzufuhren, weil
1) eine nächste Instruktion oft überflüssig /
Vorkalkuliert / Besser optimiert werden kann
2) die erste Instruktion (oft MOV EAX,imm) überflüssig
worden kann
* Eine For-loop (mit festes Ende-Zahl) generierte diese Code:
MOV AX,$T
CMP AX,1023
JGE !L37
INC AX
MOV $T,AX
Aber
CMP $T,1023
JGE !L37
INC $T
hat die gleiche Auswirkung.
* Speed Pascal kann diese Code generieren
MOV $I,AX
MOV AX,$I <--- Sehr u"berflu"ssig!!!
* Intel(tm) sagt (über die MOVSX Instruktion) in das
Pentium(tm) Handbuch:
Est hat Vorteile um "MOVSX" zu ersetzen durch eine
MOV-Instruction und eine Sign-Extend-Instruction (zB CBW).
Dieses kostet gleich viele Clockcycles aber die zweite Instruction
kann oft gleichzeitig mit eine andere Instruktion laufen.
[ Dieses ist nur korrekt für Pentium Machinen]
* Intel sagt u"ber die MUL-Instruktion:
Multiplizieren mit einer positiven Konstante kann zehr oft optimiert
werden durch eine Serie von Bitshifts und ADDs. Für eine
Pentium-Machine ist das Break-Even-Punkt einen Zahl mit 8 gesetzte
Bits, für eine 486-Machine einen Zahl mit 6 Bits.
Ebenso:
Multiplizieren mit einige Konstanten kann auch mit eine erweiterte
LEA-Instruktion implementiert werden:
MUL EAX,5 --> LEA EAX,[EAX*4+EAX]
* " SUB ESP,6
SUB ESP,257 "
SUB ESP,263 kann natürlich auch, und ist schneller.
* "Instruction-scheduling for the Pentium-superscalar architecture"
wäre sicher ein schönes detail.. (Und nicht so schwierig zu
implementieren, Ich habe es schon mal getan)
Greetings,
Arjan van de Ven
Burg.Schafratstr.38
5427 SR Boekel
The Netherlands
arjan@stack.urc.tue.nl
Answer:
Einige Ihrer Anmerkungen habe ich in den Compiler integriert,
andere waren aufgrund der Parserarchitektur nicht möglich oder
zu aufwendig. Es ist klar das ein Compiler nie einen optimalen
Code erzeugen kann. Die vielen Optimierungen wie sie bei
C-Compilern üblich sind sind sowieso nicht implementiert und wären
auch viel zu aufwendig.
Vielen Dank trotzdem !
Der Compilerschalter {$Z+} generiert nun inline code für
Stringzuweisungen. {$Z-} ruft die normalen Bibliotheksroutinen
auf.
Die FOR-Anwesiung wurde entsprechend ihren Anmerkungen teilweise
optimiert.
MOVZX wird nun teilweise durch einen MOV und eine XOR Operration
ersetzt.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Question:
Fm: Christian Fridgen [100271,3301]
To: R. Nurnberger [72662,2052]
Hi,
ich habe heute mal den Speed 386 Compiler von der Toolbox CD
installiert. Leider erkennt OS/2 das Programm PASOS2.EXE nicht als
Programm. Beim Starten erscheint lediglich der Einstellungsdialog
und unter Sitzung sind alle Punkte deaktiviert und auser Fenster
beim Beenden schliessen ist nichts markiert. Wie kann ich denn
dieses Programm starten (auser in der DOS Box) ? Vor allem, wie soll
ich es in die Kommandozeile eines Editors einbinden. Wenn ich es
daruber starte, erscheint immer die Meldung 'Programm kann nicht
gestartet werden, es mus sich um ein OS/2 oder DOS Programm handeln'.
Der Start aus der DOS-Box funktioniert ubrigens einwandfrei.
CIAO Christian
Answer:
Die Version welche Sie erworben haben ist wahrscheinlich die DOS
Demo Version. Diese ist nur in der DOS-Box lauffähig und nicht
direkt unter OS/2.
Die neue Beta III ist ein vollständiges OS/2 Programm. Die
enthaltenen Kommandozeilenversionen können Sie auch in einen
Editor einbinden ! Beachten Sie dabei daß sich alle benötigten
DLL's im DLL-Suchpfad oder im Programmpfad befinden das OS/2
das Programm sonst nicht startet sondern den Einstellungsdialog
anzeigt.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Question:
Here are a number of other observations I have made.
They are not all bugs, but they are things which may cause
problems (or irritations) to Pascal programmers who are used to
the "Turbo" (including StonyBrook Pascal+) dialect.
I would suppose that a large number of your target audience will
consist of these people, and it may be a good idea to try and
accommodate them in some way. My suggestion, if you are bent on
diverging from the Turbo standard, is to create a special unit
called TP_COMPAT (or something like that) which contains clones of
some of the things that are in Borland Pascal. I believe that
source code compatibility with Borland Pascal is vital to the
acceptance of an PC Pascal. This is one reason for example, why
StonyBrook Pascal+ has a much larger market share than other
"real" Pascal implementations (such as TopSpeed, Metaware, and
Salford).
These are just some suggestions. It is obviously up to you to do
as you think best. Now, for some of my other observations.
1. The way of declaring function prototypes which import
from DLLs - you have to put a ":" before the DLL's name.
Turbo uses ";". Is there any reason why the two cannot be
accepted by the compiler?
Also, the compiler chokes when it comes across the word
"FAR". Can it not just ignore it? (at least if you provide
a Turbo compatibility mode, it should just ignore it).
2. There is a BEEP on compiler errors. The beep is annoying.
Can you not provide an option for disabling it?
3. With the Reset() and ReWrite() procedures, a second argument
is necessary. This will throw a lot of Turbo Pascal programs.
Could the second argument be optional? (I appreciate that this
might be a very difficult thing to achieve - it is not that
important).
4. The word "ABSOLUTE" is not recognised. Can the compiler just
ignore it, instead of giving an error?
5. With the Halt() procedure, an argument is necessary. Does this
need to be so?
6. The letter "@" is not allowed for specifying the address of
a variable or a procedure. Maybe you can implement this.
7. "Set of Char" constants are not accepted;
e.g.
Const
Fred : Set of Char = ['F','r','e','d'];
Is there any reason why this is not acceptable?
8. Type checking: when a string is entered into a "byte"
variable, there is no run-time error - it just converts into
garbage.
9. Missing types: e.g. Reals.
I appreciate that Speed/2 is still in early beta - and this is
why I am taking the time to file this report. The product is
already very good, and seems to be the most promising Pascal
compiler for OS/2. It can obviously be improved, and this is my
point. Catering for the zillions of Turbo Pascal programmers is
one way of getting yourself an instant large market, into
which Borland seems to have no intention of entering. If all the
old DOS Turbo Pascal programs can be converted into 32-bit OS/2
programs by simple recompiling, or with only minor changes to the
source code (e.g., those which can be catered for by a few IFDEFs)
then the sky is the limit.
This is all obviously on the assumption that you *do* want to
cater for Turbo Pascal programmers. This is probably a
presumptuous idea on my part, especially since Turbo Pascal
is arguably not Pascal at all (more like Modula 2). If I am wrong
and you are not concerned about catering for Turbo Pascal
programmers, then you can probably ignore most of the observations
I have made above.
The Chief
Dr. Abimbola Olowofoyeku (The African Chief)
Keele University, England (and The Great Elephant)
Email: laa12@keele.ac.uk or, chief@mep.com
Voice: +44 782 621111 Fax : +44 782 583228
"As for the wheels, it was said to them in my hearing, 'O Wheel.'"
Answer:
You're right. Turbo Pascal Compatibility is very important to me.
Thank you for your hints !
1. The Compiler accepts now both ';' and ':' before the DLL's
name when importing function prototypes from DLL's.
The keywords "FAR" and "NEAR" are now ignored.
2. Now there is an option in the IDE to disable beeps.
3. The Reset and Rewrite Procedures are now Borland compatible.
4. The keyword "ABSOLUTE" is not implemented. Programs written
with this keyword must be rewritten because in OS/2 a variable
cannot have an absolute position (Protected mode uses virtual
memory).
5. The "Halt" procedure is now Borland compatible.
6. On my System the "@" operator works fine. Please send the program
that caused the error !
7. Set constants will be extended in future betas
8. OOPS. This is terrible. I've corrected it.
9. Real types (REAL,DOUBLE,EXTENDED) are now supported.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Question:
Folgendes Programm sollte von jedem 32-Bit-Compiler problemlos
geschluckt werden:
------------------
PROGRAM BigMem;
CONST
theSize=100000;
VAR
MyArray:Array[1..theSize] OF Byte;
Count:LongInt;
BEGIN
FOR Count := 1 TO theSize DO
MyArray[Count] := 3;
WriteLN('Fertig!')
END.
--------------------
Dummerweise verabschiedet sich der Compiler hinter dem Zugriff
auf das Array. Macht man das Array kleiner als 64 KB, so
funktioniert es.
Ich bin Programmierer bei einer kleinen Computerfirma in der Nähe
von Münster und arbeite dort an einem Projekt
(Bildübertragungssystem auf ISDN-Basis) in Borland Pascal unter
DOS, das unter einem echten Multitaskingsystem wie OS/2
deutlich besser laufen würde. Daher habe ich sehr großes Interesse
daran, möglichst bald eine brauchbare Version dieses Compilers
in die Hand zu bekommen. Ich würde mich deshalb gerne als Tester
für weitere Betaversionen zur Verfügung stellen.
Sie erreichen mich tagsüber bei ruc Computer/Presence Technology,
Sendenhorster Straße 32, 48312 Drensteinfurt, Tel. 02508-9001
Ciao, Matthias
----
Matthias Heidbrink
Pastorsesch 35
48159 Münster
Germany
Tel. +49-251-216188
E-Mail: Matthias_Heidbrink@ms.maus.de
or mh@ms3.maus.westfalen.de
Answer:
Das Problem ist in der neuen Beta III behoben.
Wie auch immer: Da SPEED-Pascal/2 ALLE Variablen mit festen Werten vor-
belegt (0 oder sonst einen sinnvollen Wert) und mit in das EXE
File schreibt, ist es nicht sinnvoll ein größeres Array als globale
Variable zu definieren. Das Ergebnis wäre eine immens große EXE Datei
und eine inakzeptable Compiliergeschwindigkeit. Viel eleganter ist
es das Array als dynamische Variable zu vereinbaren etwa wie folgt:
PROGRAM BigMem;
CONST
theSize=100000;
TYPE
TMyArray=Array[1..theSize] OF Byte;
VAR
MyArray:^TMyArray;
Count:LongInt;
BEGIN
New(MyArray);
FOR Count := 1 TO theSize DO MyArray^[Count] := 3;
Dispose(MyArray);
WriteLN('Fertig!')
END.
Damit nutzen Sie den Heap von Speed-OS/2 und das Limit ist 512 MB !
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Question:
Das folgende Programm erzeugte einen
==>Fatal compiler error:Internal error in:14,1 (No more registers)
------snip------snip------snip------snip------snip
program test1;
function factorial(n:integer):integer;
var e,i:integer;
begin
e:=1;
for i:=2 to n do e:=e*i;
factorial:=e;
end;
function Binomial(n,k:integer):integer;
var tmp1 : integer;
begin
Binomial:=factorial(n) div (factorial(k)*factorial(n-k));
end;
begin
writeln(Binomial(4,2));
end.
------snip------snip------snip------snip------snip
Erst als ich die Zeile 14 in
tmp1:=factorial(k)*factorial(n-k);
Binomial:=factorial(n) div tmp1;
geändert hatte, gelang die Compilation fehlerfrei.
================================================================
Es schien mir, daß der Datentyp set noch nicht implementiert ist.
Jedenfalls habe ich kein einziges Programm, das Mengen benutzt zum
laufen bekommen.
Des weiteren fiel mir auf, daß der new-operator total anders als in
TurboPascal funktioniert. Ich kenne mich mit Standard-Pascals nicht
besonders gut aus aber es wäre schon schön, wenn auch die
Methode von TP unterstützt würde, da die meisten User von
Speed-Pascal doch früher sicher in TP programmiert haben (ich
jedenfalls).
Oops... So ebend bin ich beim Schreiben der mail durch eine
allgemeine Schutzausnahme unterbrochen worden
Sie wurde durch ein kleines SpeedPascal-Programm ausgelöst. Das
beste wird sein, ich schicke es gleich mal mit:
-----snip-----snip-----snip-----snip-----snip
program test2;
var F:text;
begin
assign(f,'test2.txt');
rewrite(f, 128);
writeln(f, 'Das ist ein kleiner Test');
close(f);
end.
-----snip-----snip-----snip-----snip-----snip
Ich weiß zwar nicht, wozu der zweite Parameter da ist (in TP ist es
die Recordsize --die ist aber nur bei untypisierten Dateien
zulässig) aber deshalb muß ja das System nicht gleich so brutal
abstürzen.
Wie auch immer, mit rewrite(f,1) hat es dann geklappt.
Typisierte Files (außer Textfiles) scheinen ja wohl auch noch nicht
implementiert zu sein (oder wie muß ich die vereinbaren?).
Zum Schluß noch eine allgemeine Anfrage: Gibt es eine Mailingliste,
auf der ich den Fortschritt der Bugfixes bzw der eingereichten Bugs
mitverfolgen kann? Ich habe nämlich leider keinen
Compuserve-Zugang.
Das wars...
Grüße aus Dresden
--
Christian Pech Telephone: (0351)-4030408
pech@virgo.sax.de Address: Südhöhe 87
pech@rmhs1.urz.tu-dresden.de 01217 Dresden
(pech@pandora.sax.de)
Answer:
OOPS !
Beide Programme laufen unter der neuen Beta III ohne Probleme.
Der zweite Parameter in Reset/Rewrite ist tatsächlich die Recordgröße
und jetzt optional. Wird er bei Textdateien trotzdem angegeben
wird er ignoriert.
Typisierte Dateien (außer Text) sind zur Zeit nicht implementiert.
Leider habe ich selbst auch keinen Compuserve Zugang, alle Anfragen
laufen über das Magazin "toolbox". Eine komplette Liste der in
dieser Version behobenen Bugs finden Sie jedoch in der Datei
'BUGREPOR.GER'.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Question:
To:DMV-Verlag
Redaktion toolbox
z.Hd. Herrn R. Nurnberger
Fax: +49-8121-769-199
From Soren Ager
Kronprinsensgade 88 2tv
6700 Esbjerg
Denmark
Hi!
I have downloaded your "SPEED-Pascal/2 for OS/2 2.1", it is
looking good, I am looking forward to the finished program!
During my testing of the compiler, I found the follwing things
that is possible in Turbo Pascal but not in SPEED-Pascal/2:
1) Can't have local typed CONST's
2) Can't have typed CONST's like:
CONST
Hex : Array[0..15] of Char = '01234567890ABCDEF';
3) Can't typecast in Write/WriteLn:
VAR
p : Pointer;
BEGIN
WriteLn(Word(p^))
END.
4) Must have a PROGRAM statement
5) There is no Randomize and Random
6) There is no XOR operator
7) Can't use ranges with IN:
IF Ch IN ['A'..'Z'] then WriteLn('Uppercase char');
8) Can't use include files:
{$I INCLUDE.PAS}
9) Can't use {$ELSE}
Greetings
Soren Ager
Answer:
1. Local typed CONST's are currently not implemented
2. statement currently not implemented
3. statement currently not implemented
4. A PROGRAM statement is a "MUST" in Speed
5. Randomize and Random are now available
6. The XOR operator is now available
7. Ranges with IN operator are now possible
8. Include files are currently not implemented
9. {$ELSE},{$DEFINE},{$IFDEF} and so on are now included
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Question:
Thanks for your note regarding MVS features in Pascal.
The features in question are in general not operating system or
hardware specific. They are language extensions that IBM added
to VS Pascal to make it a more robust programming language.
For example, the following reserved words have been added:
ASSERT
CONTINUE
DEF
LEAVE
OTHERWISE
RANGE
REF
RETURN
SPACE - allows a data structure to start anywhere on a stream of
bytes
STATIC
XOR
There are numerous additional functions, and some additional data
types, particularly for string handling.
For complete details, you might try finding IBM manual SC26-4320,
"VS Pascal Language Reference". (If you can't find a copy, let me
know and I'll see if I can find a copy. It may be easier for me
to order a copy here in the U.S.)
Metaware's now discontinued Pascal has an optional Pascal VS mode.
We have considered purchasing a license for the OS/2 run-time
library source, but for several reasons this is not an attractive
option. We would much prefer to purchacse a compiler that is
actively being maintained and developed.
In addition to Pascal VS syntax, we would like a compiler that:
- generates 32 bit flat memory model code
- is usable with a symbolic debugger
- is usable with an execution profiler for performance analysis
- and of course runs under OS/2
Sandy
Answer:
I'm really sorry... But going to VS-Pascal would destroy parts of
the Borland Pascal compatibility since lots of new keywords would
be nessesary.
But some hints for porting your VS-Pascal Sources to SPEED-Pascal/2:
* REF replace with VAR and locate in INTERFACE section
* STATIC replace with VAR
* OTHERWISE replace with ELSE
* RETURN replace with EXIT
* ASSERT replace with IF <Expression> THEN RunError(<Nr>);
* CONTINUE use labels instead
* LEAVE use labels instead
* XOR is now included within SPEED-Pascal
* VALUE replace with CONST <Var>:<Type>=<Value>
It's obvious that most of the changes can be made automatically by
simply replacing the keywords. This can be done with the IDE
command "Replace".
In the current beta III the compiler supports partial the IPMD
debugger. The "partial" is because I don't have the complete
description of the IPMD debugger format (32 Bit codeview format)
Does anybody know more about this ????????
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Question:
If your product is making millions every year, then an internet
address is a good idea. If not, it is not worth it. The internet
is full of wierdos, and all they want is something free.
Now, about the "serious" bug: I have just discovered that the
TSearchRec record used for FindFirst() and FindNext() has some
rather big problems.
1. there is no way to get the name of the file: there is something
called "achName", which is presume is the name of the file, but this
is declared as an array[0..255] of BYTE (which does not make any
sense to me). I changed it to an array[0..255] of CHAR - and that is
a bit better, but it leaves strange characters in the filename, and
loses the first character of the filename.
2. as far as "Turbo" compatibility goes, the TSearchRec record is
all wrong;
In Turbo, you have a field called "name" - in Speed, it is called
"achName", and declared in a strange way. This incompatibility in
the name of the field ("name" vs "achName" seems to be gratuitous
and unnecessary). Secondly, in Turbo, you have a field called
"attr". In Speed, it is called "attrFile" - why this unnecessary
difference?
3. The IDE and its editor have many bugs - I suppose you are aware
of this.
For example, the Del key does nothing, and you cannot use
backspace to scroll back up a line; pressing PgDn often causes the
IDE to terminate without warning.
4. But more importantly, the compiler *should* stop parsing the
source code when it reaches an "End."
The Speed compiler does not - this causes problems for people like
me who like to write things beyond the "End." line. Also, the editor
does many strange things to a file when you use it to save a file.
I have resorted to using another editor for this purpose.
I will write to you again when I have more reports.
Regards.
The Chief
Dr. Abimbola Olowofoyeku (The African Chief)
Keele University, England (and The Great Elephant)
Email: laa12@keele.ac.uk or, chief@mep.com
Voice: +44 782 621111 Fax : +44 782 583228
--------------------------------------------------------------------
"As for the wheels, it was said to them in my hearing, 'O Wheel.'"
Answer:
Hi Chief !
I'm sorry but I didn't made money with Speed-OS/2 till today. But
I hope when the product is finished I'll make millions and millions
(HAHAHA).
1. OOPS. This is strange, but it's because I copied the format
of the TSearchRec from the OS/2 Toolkit. In the new version
the TSearchRecord is compatible to Borland !
2. See above
3. I hope these problems are blasted away in the new Beta III IDE !
4. Keep on writing your comments beyound the "End.". It now
will work fine !
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Question:
Anregungen zu Speed386 fur OS/2
Dietmar Mair100417,2715
Anregungen zu Speed-Pacal/2 für OS/2
Ich habe eine Version Deines Compilers durch die Zeitschrift TOOLBOX
erhalten.
Bei Testen ist mir folgendes aufgefallen.
1. Bei der Programmierung von Objekten sollt es moglich sein:
a) auch Destruktoren als "virtual" zu deklarieren
b) innerhalb einer Objekthirarchie an Methoden mit gleichem Namen
unterschiedliche Parameter zu Ubergeben
2. Wenn man beim Durchblattern eines Dokumentes auf die Pfeile fur
Rollen Klickt und die Maustaste festhalt wird offensichtlich die
Zeilennummer inkrementiert. Die Bildschirmanzeige wird aber erst
aktualisiert, wenn die Maustaste wieder losgelassen wird. Das
erschwert die Suche nach bestimmten Textpassagen erheblich. Die
zustandige Methode sollte bei jedem Durchlauf auch eine Message
senden, die das Aktualisieren der Anzeige bewirkt.
Dadurch wurde der Bildschirm dann Zeilenweise gerollt.
3. Der Compiler gibt bei Fehlermeldungen teilweise falsche Verweise
auf die Textstelle im Quelltext zuruck. (meist eine Zeile tiefer und
einige Spalten versetzt)
Grundsatzlich finde ich den Compiler sehr gelungen. Ich freue mich
speziell daruber, das sich jemand um die Entwicklung eines
Pascal- Compilers für OS/2 kümmert.
Answer:
1.
a) Destruktoren sind nun auch virtuell möglich
b) Dies ist jetzt implementiert, die Methoden dürfen aber nicht
als VIRTUAL definiert sein (analog zu Turbo Pascal)
2. In der Beta III IDE ist dieses Problem behoben.
3. Dies ist in der Beta III behoben
---------------------------------------------------------------------------
---------------------------------------------------------------------------
Question:
Soren Ager 76560,272
Jörg Braun
Hi Jörg 1
I have now played a bit more with the program, I have found the
following additional Things:
IDE:
----
- When creating a new file, a lot of spaces is added to the end
of the file - this gives errors when trying to compile the
new program
- Would be nice if lines could be longer than 127 characters
- F6 jumps to windows that is minimized
Pascal compiler
---------------
- It is not possible to write variables to text files:
PROGRAM test;
VAR
Out:TEXT;
a:LONGINT;
BEGIN
a:=1;
Assign(Out,'Test.Log');
Rewrite(Out,1);
Writeln(Out,a); <<- Gives compiler error
Close(Out);
END;
- It would be nice if it was possible to use Dynamic methods - then
Object-PM could be changed to look more like OWL:
PROCEDURE WMCreate(VAR Msg:TMessage);VIRTUAL wm_First+wm_Create;
Resource Compiler
-----------------
- Can't handle TAB characters in the .RC file
- Can't compile .RC files created with Borland Resource workshop
for PM
Greetings
Answer:
At first thank you for your intensive bug reporting. It seems
you are dealing a lot of time with SPEED-Pascal/2.
Now to your bugs:
IDE:
----
- The problem of the spaces at the end of files is now corrected.
I changed the editor a little bit. Hope that I didn't built
in more bugs...
- Lines can now be up to 250 characters long (that should be
always enough)
- I think that F6 jumps to minimized windows isn't too critical.
It also can be a nice feature when having lots of windows
minimized - so I didn't change that.
Pascal Compiler
---------------
- In the current Beta III variable writes (both real and fixed
numbers) is now possible
- OOPS. Dynamic methods in SPEED-PASCAL/2 ? This WAS a nice problem
and I spend a whole night implementing that - but it's done.
Resource Compiler
-----------------
- The problem of TAB characters is corrected in the new BETA III
- For creating resources use the SPEED-Resource Editor. Although
it isn't completed it will be in the Final release.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
Question:
Hi Jörg !
Thanks for the Beta Version of Speed-Pascal V1.0 for OS/2 (Sept 94)
it is looking great !
After playing around a bit with the program, I have found the
following things:
Install program
---------------
- Can't install in 'C:\OS2PROG\SPEED' IF 'C:\OS2PROG' don't exist
IDE
---
- Reserved words found in comments are highlighted
- In the Search/Browse globals dialog the columns are not aligned
- IF I load the included INSTALL.PAS file and search for
'InstallDir' and chooses Search again 2 times, it will write
an 'a' before the found text. Using Search again hereafter will
not find anything, it just highlights randomly.
- The following keystrokes are not supported:
Ctrl+Left/Right Arrow =Next/Previous word
Ctrl+Home/End =Top/Bottom of text
Ctrl+Y =Delete line
Ctrl+K R =Read block from file
Shift+Arrows =Mark text
- SHL in assembler block are highlighted
- When marking lines with Ctrl+K B and Ctrl+K K one line too much
is highlighted
- If you have more than one file open and you minimize the whole
editor the windows will be tiled when you brings the editor to
the front again.
- When doing a search the found text is copied into the clipboard
- When using Shift+DEL and you have only marked part of a line
the whole line is deleted
Pascal compiler
---------------
- Can't have the same procedure/function name in inherited objects
without being VIRTUAL
TYPE
Base=OBJECT
PROCEDURE Test;
END;
New=OBJECT(Base)
PROCEDURE Test;
END;
- There is no XOR operator
- Can't use ranges with IN: IF Ch IN ['A'..'Z'] THEN Upper:=TRUE;
- Turbo Pascal defines a DLL (Library) like a program, where
Speed defines it as a unit (requering INTERFACE etc.)
- DESTRUCTORS can't be virtual
- It would be nice if it was possible to call 16 Bit DLL's
(VIO.MOU,KBD etc)
- The reversing of parameters to call DLL's are very confusing,
especialy if you are comparing your code to some C code or
API documentation. I think it would be smarter either to
always just reverse the parameters or make two IMPORT
keywords (IMPORT/IMPORTCCALL) or make another keyword to use
after the definition of the procedure
FUNCTION DosBeep(F,D:LONGINT):LONGWORD:'DOSCALLS' Index 286;CCALL;
- Can't use include files
- No support for variant records
VRec=RECORD
CASE Integer OF
0:(i:Integer);
1:(a,b:BYTE);
END;
- It would be nice if the compiler could be more Turbo compatibe
this would allow us to use some of our old routines with minimal
changes ({$IFDEF SPEED}) in both DOS and OS/2 programs. As it is
now we have to make a copy of the files, and change it - as there
is so many Speed does differently.
Greetings
Soren
Answer:
Oh - you again ? I'm very impressed of your bug reporting !
Install program
---------------
- The bug is now corrected since the Installation program
was partial rewritten.
IDE
---
- The highlighting of reserved words in comments and ASM statements
will probably be removed in the Final version.
- The aligning of the Symbols in the Search/Browse dialog will
probably be removed in the Final version
- The problem when searching words is corrected
- The following keystrokes are now additionally available:
Ctrl+Left/Right arrow = Next/Previous word
Ctrl+Home/End = Top/Bottom of text
Ctrl-Y = Delete line (same a Ctrl+Z)
Shift+Arrows = Select text
- The problem when selecting text is corrected in the new BETA III.
- The windows are no longer tiled when sizing the window. The
reason for doing so was that you have to tile the windows after
some sizing operations because you havn't access to the windows
since they are invisible or partial covered by the Application
window. Now this problem is here again !
- The text is not copied to the OS/2 clipboard, only to the
Editor's internal clipboard. I think this isn't too critical.
- The problem using Shift+Del will probably be corrected in the
final version of SPEED-Pascal/2.
Pascal Compiler
---------------
- Inherited functions (cant be VIRTUAL) are now supported and
allow to define a method with the same name and the same
or different parameterlist as it is defined in the parent
object(s).
- The XOR operator is now supported
- The ranges in the IN operator are now supported
- The definition for a DLL is now Turbo Pascal compatible.
- Destructors can now be VIRTUAL.
- Support for 16 Bit DLL's is probably part of the final version.
- The reversing of parameters when calling DLL's is a result of
the implementation of the OS/2 DLL's. Since all 32 Bit OS/2
DLL's use C-calling convention there is no way (or ?) to call
these functions as Pascal functions.
The problem is that C-Functions expect the parameters from right
to left where Pascal does it from left to right. Also a C-
Function does not clean up the stack as Pascal does.
The only solution I see is to pack the DLL functions into a
SPEED-Library and there convert the parameters (means repushing
them onto the stack - speed slows down). These libraries will
be part of the Final version.
- Sorry. There are no plans to implement Include files yet.
- Variant records are now supported but only in the from
CASE <Name> OF, where <Name> is a type name.
- I always try to make Speed more Turbo compatible. Help me and
find out more things that are different since I cannot test
anything ! Thank you for your interest !
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Question:
From: Christian Pech <pech@virgo.sax.de>
Hi there...
Erst mal vielen Dank für die neue Beta. Sie funktioniert nun
schon sehr viel besser als die erste Demo (ich habe einen ersten
BP-2000-Zeiler von mir zum compilieren gebracht (leider noch
nicht zum Laufen)).
Hier nun meine neuesten Erfahrungen:
1.) Das folgende Programm bringt den Compiler durcheinander (IDE
verabschiedet sich kommentarlos):
program test;
type ptest=^test;
test=integer;
var a:ptest;
begin
new(a);
dispose(a);
end.
Das Problem hängt nach meinen Erfahrungen mit dem Namen des
Programmes zusammen. Es tritt nur dann auf, wenn es eine
Typ-Vereinbarung der Form <TypName>=^<ProgName> gibt.
Der Hänger passiert beim ersten Zugriff auf eine Variable
dieses Typs (in diesem Fall bei new(a)).
2.)
Variantenrecords funktionieren nicht. Das ist nicht allzu
störend, da ich sie in normale records umwandeln konnte
(Typumwandlungen via Variantenrecords sind sowieso ätzend)
3.)
const x:Real=0.1; funktioniert nicht.
4.)
Read funktioniert nicht auf text Dateien
5.)
VAL finktioniert nicht mit Real Variablen. In der Hilfe steht
das zwar drinnen; Das läßt mich aber befürchten, daß das nicht
mehr geändert werden soll (Bitte Bitte auch für Real
implementieren !).
6.)
ABS hat noch einen Bug dazu bekommen. Es will nicht mit Real
Zahlen (der Compiler meint, daß Real kein numerischer Typ ist).
Soweit erstmal zum Compiler, nun zur IDE:
1.)
Der Replace Dialog reagiert wunderlich auf TAB (erst nach
zweimaligen Drücken von TAB ist der Cursor im Replace with
Feld).
2.)
Steht beim Suchen nach einem String dieser String in der
aktuellen Zeile (nach dem Cursor), so wird er nicht gefunden.
Das ist besonders lästig, wenn der Suchbegriff in einer Zeile
mehrmals auftritt.
3.)
Einigemale hat mir der Editor ein paar wunderliche Zeichen in
meinen Quelltext hineingezaubert (z.B. irgendwo irgendeinen
Buchstaben eingesetzt). Dieser Fehler war leider nicht
reproduzierbar.
4.)
Daß Alt-F4 das aktuelle Editorfenster und nicht die IDE
schließ würde ich als Bug bezeichnen, da im Kontextmenü
die Tastenkombination eindeutig zum Schließen der IDE
bestimmt ist.
5.)
Wenn mehrere Files geöffnet sind, ich die IDE zum Symbol
verkleinere, ich dann die IDE wieder auf normale Größe
bringe, sind alle Fenster so dargestellt, als hätte ich
gerade 'Tile' aus dem 'Window' Menü ausgeführt.
6.)
Im RUN-Menü funktioniert der Punkt Parameters nicht
Das wars für die IDE.
Jetzt noch ein kleiner Bug unter 'was sonst noch passiert':
1.)
Beim PMEdit Beispiel sind im Tool Bar die Knöpfe zum
Öffnen und Schließen von Dateien vertauscht.
Nun noch einige Bemerkungen zu Sachen, die ich vermisst habe bzw.
die ich mir wünsche:
1.)
Das Markieren von Text sollte auch mit SHIFT+Cursortasten
funktionieren.
2.)
Wenn ich beim Öffnen einer Datei (in der IDE) das Verzeichnis
wechsle, sollte das nicht das mit ChangeDir eingestellte
Verzeichnis ändern. In meinem Verständnis fungiert das mit
ChangeDir eingestellte Verzeichnis als Standardverzeichnis
für alle File Dialoge. Kurz und bündig: Es sollte wie in der
BP-IDE funktionieren.
3.)
Die Tastenkombination Strg-Pos1 (Springen zum Beginn der Datei)
und Strg-Ende (Springen zum Ende der Datei) habe ich sehr
vermißt.
4.)
Die IDE sollte eine Liste der geöffneten Dateien führen (wie
bei BP-IDE; wird dort mit Alt-0 aufgerufen).
5.)
Im File Menü solltendie 5 zuletzt geöffneten Dateien direkt
zur Auswahl stehen (wie bei WinWord z.B.)
6.)
Der aktuelle Zustand der IDE sollte speicherbar sein, damit
man beim Öffnen der IDE nicht immer erst alle Quelldateien
vom Hand öffnen muß.
7.)
Es wäre schön, wenn man nach dem Öffnen eines Projektes noch
eine Möglichkeit hätte, einzelne bzw. alle Quelldateien
dieses Projektes zu Öffnen (z.B. über eine Listbox, in der
alle zum Projekt gehörigen Quelldateien aufgeführt sind).
Das wars eigentlich auch schon...
Wenn ich noch was finden sollte melde ich mich.
Viele Grüße aus Dresden
Christian Pech (pech@virgo.sax.de)
Answer:
Erstmal viele Grüße aus Chemnitz nach Dresden und vielen Dank
für den ausführlichen Bug-Report.
Nun zu den einzelnen Fehlern:
1.)
Die Konstruktion <TypName>=^<ProgName> funktioniert in der
neuen Beta III.
2.)
Obwohl ich Typumwandlungen über Variantenrecords auch
schrecklich finde sind Variantenrecords jetzt trotzdem
implementiert, allerdings nur in der Form CASE <Name> OF,
wobei <Name> ein Typname ist.
3.)
Typisierte Real Konstanten sind jetzt zulässig.
4.)
READ ist zur Zeit für Textdateien nicht implementiert.
ReadLn funktioniert jedoch. Bis zur Vollversion (Jan/Feb '95)
wird dieser Bug behoben sein.
5.)
VAL für Real Variablen wurde einfach "vergessen" und ist nun
realisiert.
6.)
ABS sollte jetzt keinen Bug mehr haben, auch die früher
gemeldeten Fehler wurden beseitigt.
Nun zur IDE:
1.)
Der Replace Dialog verhält sich jetzt wir erwartet.
2.)
Das Suchen nach Strings wurde völlig überarbeitet und sollte
jetzt funktionieren.
3.)
Diesen Fehler konnte ich nicht reproduzieren. Falls er nochmals
auftaucht versuchen Sie bitte herauszufinden unter welchen
Bedingungen (Anzahl der geöffneten Dateien, letzte
Editoroperation). Diese Fehler sind im allgemeinen die
"miesesten" weil schwer zu entdecken.
4.)
Dieser Bug wird in der Vollversion behoben sein.
5.)
Das 'Tile' der Fenster wurde deshalb eingebaut da es vorkommen
kann das nach Größenänderungen der IDE eventuell einige Fenster
nicht oder nur teilweise sichtbar sind (z.B. Titelleiste
verdeckt). Da 'Tile' nach diesen Operationen nun entfernt ist
tritt dieses Problem wieder auf (kann aber durch ein manuelles
'Tile' behoben werden).
6.)
Der 'Parameters' Befehl ist nun aktiviert.
'Was sonst noch passiert' ?
1.)
Der Fehler im PMEdit Beispiel ist behoben (Wer weiß wo ich
da gerade meinen Kopf hatte...)
Nun zu Ihren Anmerkungen:
1.)
Das Markieren von Text funktioniert nun auch mit SHIFT+Cursor-
tasten.
2.)
Im Menü 'Options - Preferences - Editor' existiert ein
Schalter der bestimmt, ob die IDE nach dem Öffnen einer
Datei das Verzeichnis wechselt ('Change dir on open').
Übrigens gibt es diesen Schalter auch in der BP-IDE...
3.)
Strg-Pos1 (Textbeginn) und Strg-End (Textende) funktionieren
jetzt.
4.)
Die IDE führt nun analog zur BP-IDE eine Liste der geöffneten
Dateien (auch über Alt-0 oder über Menü 'Window - List'
aktivierbar).
5.)
Im File Menü stehen jetzt die 6 (!) zuletzt geöffneten Dateien
direkt zur Auswahl, da nach meinen Erfahrungen mit der BP-IDE
sowieso immer gerade die Datei fehlt die man gerade braucht...
6.)
Dies wird in der Vollversion verfügbar sein.
7.)
Leider gilt das gleiche wie unter Punkt 6...