Lazarus

Programming => General => Topic started by: julkas on August 01, 2019, 05:24:10 pm

Title: [CLOSED] TP/BP compatibility
Post by: julkas on August 01, 2019, 05:24:10 pm
What is best approach for  TP (turbo Pascal)/BP compatibility fu1 or  fu2
Code: Pascal  [Select][+][-]
  1. program ide;
  2. {$mode tp}
  3. type
  4.   prec = ^rec;
  5.   rec = record
  6.     a: longint;
  7.   end;
  8. function fu1(var x: rec): longint;
  9. begin
  10. end;
  11. function fu2(x: prec): longint;
  12. begin
  13. end;
  14. begin
  15. end.
Title: Re: TP/BP compatibility
Post by: 440bx on August 01, 2019, 05:30:51 pm
What is best approach for  TP (turbo Pascal)/BP compatibility fu1 or  fu2
As far as compatibility goes, I think they should be the same.

I believe most people would prefer fu1 over fu2 because explicit pointer dereferencing is not necessary (the compiler does it for you.)
Title: Re: TP/BP compatibility
Post by: Thaddy on August 01, 2019, 07:33:18 pm
Except when passing nil, that is.
Title: Re: TP/BP compatibility
Post by: 440bx on August 01, 2019, 07:47:44 pm
Except when passing nil, that is.
Good point.  fu2 allows nil whereas fu1 doesn't.  That's a consideration that may matter depending on what the function is supposed to do. 

As far as compatibility, I don't think it makes any difference.
Title: Re: TP/BP compatibility
Post by: julkas on August 02, 2019, 08:31:53 am
Except when passing nil, that is.
Good point.  fu2 allows nil whereas fu1 doesn't.  That's a consideration that may matter depending on what the function is supposed to do. 

As far as compatibility, I don't think it makes any difference.
Ok, thanks. I am porting C code to Free Pascal. I want BP/TP compatibility (at least TP7). Original code has many functions in the following form
Code: C  [Select][+][-]
  1. obj * fun(obj * x) {
  2.   if (x == null} {
  3. ...
where obj is struct. Can I use my fu1 or not?
Title: Re: TP/BP compatibility
Post by: 440bx on August 02, 2019, 08:44:45 am
Ok, thanks. I am porting C code to Free Pascal. I want BP/TP compatibility (at least TP7). Original code has many functions in the following form
Code: C  [Select][+][-]
  1. obj * fun(obj * x) {
  2.   if (x == null} {
  3. ...
where obj is struct. Can I use my fu1 or not?
The test "if (x == NULL)" indicates that the function can accept a NULL/nil pointer, in that case, fu2 would be the better match to the C function because, fu2 allows a nil/NULL parameter as your C function currently does.

Again, as far as compatibility goes, that doesn't make any difference.

If I were you, I'd use fu2 because that way, the Pascal code will likely be completely parallel to the C code, that would not be the case if you used a declaration like fu1.

When I port C code to Pascal, except in the case of really simple programs, I normally do it in two passes.  In the first pass, I make the Pascal code as parallel to the C code as possible (that's usually fairly straightforward), once that port is working correctly then, I look at the resulting Pascal code and determine what parts of it are better re-written using Pascal features.

ETA:

where obj is struct. Can I use my fu1 or not?
The answer to that question is, yes you can, but, if you go that route, the Pascal code for C functions that accept nil as a parameter won't be "parallel".  Here is an example of passing nil to a Pascal function declared to take a "var" parameter:
Code: Pascal  [Select][+][-]
  1. type
  2.   TStruct = record
  3.     i : integer;
  4.   end;
  5.   PStruct = ^TStruct;
  6.  
  7. function a(var p : TStruct) : boolean;
  8. begin
  9.   writeln(IntToHex(ptruint(@p), 0));
  10.   result := true;
  11. end;
  12.  
  13.  
  14. begin
  15.   a(PStruct(nil)^);
  16.  
To pass nil/NULL, you have to typecast nil and dereference it (personally, I find that to be very "unclean" - see line 15), then in the function you have to test not against "p" but "@p".

IMO, if a C function accepts nil/NULL as a parameter value, it is often not the best way to declare the parameter as a "var" because it unnecessarily complicates the code.

As far as compatibility, both are compatible with BP/TP but, using "var" results in an implementation that is likely more complicated than it should be.

Title: Re: TP/BP compatibility
Post by: Thaddy on August 02, 2019, 12:07:57 pm
Small addition:
When interfacing with C code containing structures always use {$PACKRECORDS C} otherwise you will get bitten.
Title: Re: TP/BP compatibility
Post by: julkas on August 02, 2019, 05:51:20 pm
Small addition:
When interfacing with C code containing structures always use {$PACKRECORDS C} otherwise you will get bitten.
I don't use C binding (interfacing), I just traslate C source code to Pascal.
Title: Re: TP/BP compatibility
Post by: Thaddy on August 02, 2019, 05:54:44 pm
Still it might be a good idea to pack your records if you are writing a library.
In a stand-alone program it does not matter too much unless you store on file.

TP and BP alignment can be 1 or 2 bytes. Make sure you are consistent.
Title: Re: TP/BP compatibility
Post by: julkas on August 03, 2019, 03:46:37 pm
I compiled unit with Free Pascal and {$mode tp} without errors.
TP7 compiler fails on //.
So // comment not supported in TP7?

Quote
The following constructs are comments and are ignored by
the compiler:
{ Any text not containing right brace }
(* Any text not containing star/right parenthesis *)
Title: Re: TP/BP compatibility
Post by: lucamar on August 03, 2019, 06:09:59 pm
I compiled unit with Free Pascal and {$mode tp} without errors.
TP7 compiler fails on //.
So // comment not supported in TP7?

No, they aren't. C++ style comments weren't supported by any of Borland's Pascal compilers until almost the 21st century--somewhen between Delphi 3 to 5, don't remember exactly.
Title: Re: TP/BP compatibility
Post by: 440bx on August 03, 2019, 06:33:42 pm
No, they aren't. C++ style comments weren't supported by any of Borland's Pascal compilers until almost the 21st century--somewhen between Delphi 3 to 5, don't remember exactly.
It's not quite that bad.  20th century Delphi 2 supports // comments.

I'm not sure if Delphi 1 (the 16 bit version of Delphi) supported them.  I don't have a handy installation to test it.

Unfortunately, there is no support for /* */, that would allow copy/paste of comments from ported C code to Delphi/FPC.  Easy to implement too but, it won't happen.
Title: Re: TP/BP compatibility
Post by: Thaddy on August 03, 2019, 06:51:25 pm
Serious answer part:
TP/BP mode only supports {...} and even older (* .... *)
That's because it is supposed to do that. It does not recognise other modes without a modeswitch, which makes it incompatible with the original compilers.....(THINK!)
TP and BP (and ISO and Extendedpascal) mode should not contain // at all. Not part of the language.

And indeed Delphi 2 introduced single line comments.

Comics starts here:
All for the bad: curly bracket style languages are one big comment in Pascal. So they have to write comments with slashes. :P :D O:-)

They also have the divide by comment ( /# ) and comment divided (#/) option, which they miss-use for multi-line comments.
Alas, # is not an operator you can override.... <  %) %) %) >

(About the above: there is a precedent: ** which has no default implementation....why not /# and #/...?)

I am tired of typing  /#.... #/ when I can do this {...} It is the one part of Pascal where it is 100% more efficient.  :D ;) :) 8) :-X 8-) O:-)
Title: Re: TP/BP compatibility
Post by: julkas on August 03, 2019, 08:16:52 pm
Ok, so search and replace.
I found also this -  program lines have a maximum length of 126 characters.
O great old Pascal!
Who knows - why 126?
Title: Re: TP/BP compatibility
Post by: Thaddy on August 03, 2019, 09:06:59 pm
It is usually 80, not 126. That may have been a limitation of a type of terminal, just like the 80 is on CP/M, DOS and Apple IIe
Title: Re: TP/BP compatibility
Post by: Thaddy on August 03, 2019, 09:08:49 pm
Ok, so search and replace.

WHAT are you are going to search and replace? I hope only your own code to make it compatible and not the other way around!
Title: Re: TP/BP compatibility
Post by: lucamar on August 03, 2019, 11:27:00 pm
I found also this -  program lines have a maximum length of 126 characters.
O great old Pascal!
Who knows - why 126?

High(ShortInt) - one char. line separator?
Title: Re: TP/BP compatibility
Post by: julkas on August 04, 2019, 11:00:25 am
I found also this -  program lines have a maximum length of 126 characters.
O great old Pascal!
Who knows - why 126?

High(ShortInt) - one char. line separator?
You mean (2**7-1)-1? May be. Good observation.
TP7 documentation is great. I enjoy reading.
Offtopic - Why TP7 is still closed source? What is the reason?
Title: Re: TP/BP compatibility
Post by: ASerge on August 04, 2019, 12:32:33 pm
Offtopic - Why TP7 is still closed source? What is the reason?
In order of succession: Borland - CodeGear - Embarcadero, this question to the last company.
Title: Re: TP/BP compatibility
Post by: 440bx on August 04, 2019, 01:01:24 pm
Offtopic - Why TP7 is still closed source? What is the reason?
Serge is right, that question should be directed to Embarcadero (or the company who owns them.)

It occurred to me that, if Embarcadero sold the TP7 source code at a low price (ballpark $29.99), there would probably be quite a few people interested.

Title: Re: TP/BP compatibility
Post by: julkas on August 04, 2019, 03:32:18 pm
How declare unsigned DWORD integer in TP7 ?
Title: Re: TP/BP compatibility
Post by: 440bx on August 04, 2019, 03:42:09 pm
How declare unsigned DWORD integer in TP7 ?
TP7 does _not_ support unsigned 32bit integers.

To manipulate unsigned 32bit integers (which you are forced to declared as signed, since there is no alternative) you have to typecast them to pchar.  The typecast to pchar causes the code to use relational operators that consider the quantity unsigned.

Disclaimer: I know the above works with Delphi 2 because I routinely use it.  I don't remember if it works/worked with TP7.



Title: Re: TP/BP compatibility
Post by: julkas on August 04, 2019, 03:55:20 pm
How declare unsigned DWORD integer in TP7 ?
TP7 does _not_ support unsigned 32bit integers.

To manipulate unsigned 32bit integers (which you are forced to declared as signed, since there is no alternative) you have to typecast them to pchar.  The typecast to pchar causes the code to use relational operators that consider the quantity unsigned.

Disclaimer: I know the above works with Delphi 2 because I routinely use it.  I don't remember if it works/worked with TP7.
Any ready to use code?
Title: Re: TP/BP compatibility
Post by: wp on August 04, 2019, 04:00:02 pm
Living deads: ****** ... (no idea whether this site is legal).

Moderator notice: if you don't know if a link with proprietary software is legal, then don't post it.
Title: Re: TP/BP compatibility
Post by: 440bx on August 04, 2019, 04:05:08 pm
Any ready to use code?
Not TP7 code.  I don't even remember the last time I used TP7 but, I can provide an example, for instance
Code: Pascal  [Select][+][-]
  1. var
  2.   V1 : integer;
  3.   V2 : integer;
  4. ...
  5. begin
  6.   { unsigned comparison }
  7.   if pchar(V1) < pchar(V2) then <do something>
  8. end.
I know the above works with Delphi 2, I am not sure if it works with TP7.  I'd have to look at the code it generates (i.e, does it generate jl (signed) or jb (unsigned))
Title: Re: TP/BP compatibility
Post by: Thaddy on August 04, 2019, 05:28:12 pm
I believe there's no sourcecode there. It is probably a means of running one of the free versions of TP/BP from the Borland museum in DosBox.
TP/BP are orginally written in hand-optimized TASM and is quite unreadable and not even properly documented.
I saw parts of it while working at Borland during an exchange program.

Even if it was open sourced it would not be very useful.
The Borland family and children have never been self-hosted compilers like FPC is.
Note TP mode is nearly 100% able to compile real TP code. It has more options, so the other way around is not true.
Title: Re: TP/BP compatibility
Post by: julkas on August 04, 2019, 05:40:51 pm
Any ready to use code?
Not TP7 code.  I don't even remember the last time I used TP7 but, I can provide an example, for instance
Code: Pascal  [Select][+][-]
  1. var
  2.   V1 : integer;
  3.   V2 : integer;
  4. ...
  5. begin
  6.   { unsigned comparison }
  7.   if pchar(V1) < pchar(V2) then <do something>
  8. end.
I know the above works with Delphi 2, I am not sure if it works with TP7.  I'd have to look at the code it generates (i.e, does it generate jl (signed) or jb (unsigned))
See btypes unit of  Wolfgang Ehrhardt util package.
Title: Re: TP/BP compatibility
Post by: 440bx on August 04, 2019, 05:54:12 pm
See btypes unit of  Wolfgang Ehrhardt util package.
Thank you.  For the times I need unsigned 32bit integers, typecasting to pchar does the job.

I have no doubt that Wolfgang's units provide a lot more but, so far, I have rarely needed more.
Title: Re: TP/BP compatibility
Post by: julkas on August 04, 2019, 06:11:03 pm
I believe there's no sourcecode there. It is probably a means of running one of the free versions of TP/BP from the Borland museum in DosBox.
TP/BP are orginally written in hand-optimized TASM and is quite unreadable and not even properly documented.
I saw parts of it while working at Borland during an exchange program.

Even if it was open sourced it would not be very useful.
The Borland family and children have never been self-hosted compilers like FPC is.
Note TP mode is nearly 100% able to compile real TP code. It has more options, so the other way around is not true.
Its your opinion. I don't think so.
Title: Re: TP/BP compatibility
Post by: Thaddy on August 04, 2019, 06:25:22 pm
Its your opinion. I don't think so.
Prove me wrong.... You can't. End of story.

And plz do not come up with hacks that rely on compiler internals. Stick to the language supported by TP/BP.
(You could write self modifying code in TP, you are hard-pressed to do the same in FPC {$mode TP}
Title: Re: TP/BP compatibility
Post by: 440bx on August 04, 2019, 07:17:46 pm
Prove me wrong.... You can't. End of story.
...
babble
...
Even if it was open sourced it would not be very useful.
No one needs to prove you wrong, you already proved yourself wrong with this statement:

TP/BP are orginally written in hand-optimized TASM and is quite unreadable and not even properly documented.
It would be useful to show people who want to learn how to write a compiler.  It would also show that using assembler to write a compiler should only be considered for a language that is simple (and TP7 is a very simple compiler - try writing g++ in assembler.)

It is no surprise you found the code unreadable and, even less of a surprise that you didn't understand a line of it.  It's unlikely any amount of documentation would have made a difference for you.  (lobotomies are not currently considered "documentation".)


The Borland family and children have never been self-hosted compilers like FPC is.
Note TP mode is nearly 100% able to compile real TP code. It has more options, so the other way around is not true.
...
And plz do not come up with hacks that rely on compiler internals. Stick to the language supported by TP/BP.
(You could write self modifying code in TP, you are hard-pressed to do the same in FPC {$mode TP}
You have quite a talent to go off on a tangent.  There are, as you read this, 2647 Chinese individuals in the city of Beijing eating dumplings.  Do not come up with hacks like corn flour to make the dumplings, also you'd be hard pressed to steam them on a local geyser and, self eating dumplings are not part of the Chinese culture.

Title: Re: TP/BP compatibility
Post by: Thaddy on August 04, 2019, 09:06:39 pm
You have quite a talent to go off on a tangent.  There are, as you read this, 2647 Chinese individuals in the city of Beijing eating dumplings.  Do not come up with hacks like corn flour to make the dumplings, also you'd be hard pressed to steam them on a local geyser and, self eating dumplings are not part of the Chinese culture.
Yes, but I actually saw that code. And the part I saw was actually explained to me by the compiler team, which included Anders (not Chuck).
It is not easy, because it uses every optimization trick in the book - legal or not -.
The TP 1.0 compiler can easily be reverse engineered if you want. Since it has no high level dependencies or libraries apart from the DOS interrupts. Brown's interrupt table rings any bells?
That would be a good starting point for nitwits. TP/BP 7 already relied on - table based - code generators and were highly sophisticated for the time. But still just - almost, C code for the text mode IDE exists - 100% assembler.

Nowadays, basic compilers are much, much easier to write. No hoops, plain structure. That's NOT how Turbo Pascal was written. As its family members TurboBasic and Turbo C were not (they share the same start up code and soft-float code).

I was there, you were not!
Title: Re: TP/BP compatibility
Post by: 440bx on August 04, 2019, 09:54:08 pm
I was there, you were not!
Unfortunately, they didn't explain Boolean operator precedence to you.  They probably thought you knew that already. (most, probably all, computer science graduates do.)

At least you're no longer stating that having the code would not be useful.  You're making progress.
Title: Re: TP/BP compatibility
Post by: marcov on August 04, 2019, 10:59:26 pm
It would be useful to show people who want to learn how to write a compiler.

Well... I would not advise that.

Quote
  It would also show that using assembler to write a compiler should only be considered for a language that is simple (and TP7 is a very simple compiler - try writing g++ in assembler.)

The dialect is simple, but not the implementation that was obfuscated due memory and speed constraints, and it is in ASM. And I would not wish that kind of stuff upon my worst enemies, let alone unsuspecting beginners.

Really, it is only useful for minimalists and historians.

Title: Re: TP/BP compatibility
Post by: 440bx on August 04, 2019, 11:34:09 pm
It would be useful to show people who want to learn how to write a compiler.

Well... I would not advise that.
I should have added "in assembler".


The dialect is simple, but not the implementation that was obfuscated due memory and speed constraints, and it is in ASM. And I would not wish that kind of stuff upon my worst enemies, let alone unsuspecting beginners.

Really, it is only useful for minimalists and historians.
The implementation gets complicated not because of the compiler but because of having to implement a fully working IDE and a debugger in a segmented architecture on an O/S (MS-DOS) that only provides very basic services.

The command line version (no IDE, no debugger), I won't say is simple but, is not out of reach of a dedicated individual who wants to learn.

Part of what makes it interesting is that,  it is the source code of a commercially successful product. 

I do agree that, it shouldn't be the anyone's first exposure to writing a compiler. <chuckle>

Title: Re: TP/BP compatibility
Post by: julkas on August 05, 2019, 06:28:02 pm
I am trying port GUI module for embedded systems from C to Pascal and I want compatible code. Where is the problem? I can't understand.
Forum has rules, we must follow them.
Title: Re: TP/BP compatibility
Post by: 440bx on August 05, 2019, 08:40:49 pm
I am trying port GUI module for embedded systems from C to Pascal and I want compatible code.
Since this is for an embedded system, I'm fairly sure the answer to the question I'm about to ask is "no" but, just in case, does the port have to be 16bit or would it be acceptable to port it to 32bit in the process of it porting to Pascal ?

Title: Re: TP/BP compatibility
Post by: julkas on August 05, 2019, 09:01:43 pm
Original C code is here - https://github.com/achimdoebler/UGUI
Title: Re: TP/BP compatibility
Post by: PascalDragon on August 06, 2019, 09:20:43 am
I am trying port GUI module for embedded systems from C to Pascal and I want compatible code.
Since this is for an embedded system, I'm fairly sure the answer to the question I'm about to ask is "no" but, just in case, does the port have to be 16bit or would it be acceptable to port it to 32bit in the process of it porting to Pascal ?
And even if it would have to be 16-bit I'd suggest to use FPC nevertheless as it supports i8086 as well (for MSDOS, Win16 and Embedded) and allows to use the Object Pascal language features.
Title: Re: TP/BP compatibility
Post by: julkas on August 06, 2019, 09:47:28 am
I am trying port GUI module for embedded systems from C to Pascal and I want compatible code.
Since this is for an embedded system, I'm fairly sure the answer to the question I'm about to ask is "no" but, just in case, does the port have to be 16bit or would it be acceptable to port it to 32bit in the process of it porting to Pascal ?
And even if it would have to be 16-bit I'd suggest to use FPC nevertheless as it supports i8086 as well (for MSDOS, Win16 and Embedded) and allows to use the Object Pascal language features.
I use Lazarus/FPC as primary IDE.
TP/BP is still alive (whether you like it or not) ...  see - System Requirements http://www.on-time.com/rtkernel-dos.htm
Title: Re: TP/BP compatibility
Post by: Thaddy on August 06, 2019, 02:07:09 pm
TP/BP is still alive (whether you like it or not) ...  see - System Requirements http://www.on-time.com/rtkernel-dos.htm
Yes, it is even free. But be careful: TP mode is richer in  syntax than the original. You have to be careful to only use syntax that is definitely supported by the original TP if you build new code on top of rt-kernel.
Title: Re: TP/BP compatibility
Post by: PascalDragon on August 07, 2019, 09:24:50 am
I am trying port GUI module for embedded systems from C to Pascal and I want compatible code.
Since this is for an embedded system, I'm fairly sure the answer to the question I'm about to ask is "no" but, just in case, does the port have to be 16bit or would it be acceptable to port it to 32bit in the process of it porting to Pascal ?
And even if it would have to be 16-bit I'd suggest to use FPC nevertheless as it supports i8086 as well (for MSDOS, Win16 and Embedded) and allows to use the Object Pascal language features.
I use Lazarus/FPC as primary IDE.
TP/BP is still alive (whether you like it or not) ...  see - System Requirements http://www.on-time.com/rtkernel-dos.htm
I didn't write about TP/BP being alive or not, but simply that FPC provides more features.
Of course interfacing with existing TP/BP based (binary) code is a valid reason to use TP/BP. Though maybe the author of the software could be asked to make their software compatible to FPC's i8086-msdos port as well. ;)
Title: Re: TP/BP compatibility
Post by: julkas on August 24, 2019, 11:37:30 am
As I understand TP7 supports pointer arithmetic only for PChar type.
So to implement pointer arithmetic for other types I convert base type to PChar and then back. Example -
Code: Pascal  [Select][+][-]
  1. program zzz;
  2. {$X+}
  3. type
  4.   PWord = ^Word;
  5.  
  6. const
  7.   arr: array[0..3] of Word = ($FFFF, 0, $FFFF, 0);
  8. var
  9.   p: PWord;
  10.  
  11. begin
  12.   p := @arr;
  13.   (* p := p + 1; gives - Error 26: Type mismatch. *)
  14.   p := PWord(PChar(p) + SizeOf(Word));
  15.   WriteLn(p^);
  16.   ReadLn;
  17. end.
Is there other solutions? Suggestions, hints, ...
Title: Re: TP/BP compatibility
Post by: marcov on August 24, 2019, 02:22:24 pm
I use Lazarus/FPC as primary IDE.
TP/BP is still alive (whether you like it or not) ...  see - System Requirements http://www.on-time.com/rtkernel-dos.htm

Probably old. But one reference on the internet means that a product/project is alive? Well, then probably nothing is dead. Even if it is just graffiti on the walls of Pompeii
Title: Re: TP/BP compatibility
Post by: julkas on August 24, 2019, 02:35:41 pm
Well, then probably nothing is dead. Even if it is just graffiti on the walls of Pompeii
Ya. +1.
Title: Re: TP/BP compatibility
Post by: julkas on August 24, 2019, 02:59:13 pm
My approach with pointer arithmetic works (see above), but slow (DOSBOX).

Title: Re: TP/BP compatibility
Post by: julkas on August 24, 2019, 04:00:34 pm
Graffiti -
Code: Pascal  [Select][+][-]
  1. program mgtest;
  2.  
  3. {$ifdef FPC}{$mode tp}{$endif}
  4. {$ifdef VER70}{$X+}{$F+}{$endif}
  5.  
  6. uses crt, ug_fonts, ug, ug_types, graph;
  7. var
  8. gui: UG_GUI;
  9. grmode, grdriver :integer;
  10. x,y : integer;
  11.  
  12. procedure pset(x: UG_S16; y: UG_S16; c: UG_COLOR);
  13. begin
  14.   PutPixel(x, y, c);
  15. end;
  16.  
  17. begin
  18.   grdriver := DETECT;
  19. {$ifdef FPC}
  20.   initgraph(grdriver, grmode, ' ');
  21. {$endif}
  22. {$ifdef VER70}
  23.   initgraph(grdriver, grmode, 'C:\TP7\BGI');
  24. {$endif}
  25.  
  26.   UG_Init(gui, pset, getmaxx, getmaxy);
  27.   UG_SetBackcolor(black);
  28.   UG_SetForecolor(blue);
  29.  
  30.   UG_FontSelect(@FONT_8X14);
  31.   UG_PutString(100, 100, 'Hello, Pascal!');
  32.  
  33.   UG_FontSelect(@FONT_16X26);
  34.   UG_PutString(140, 140, 'Hello, Pascal!');
  35. (*
  36.   UG_DrawCircle(250, 400, 100, white);
  37.   UG_FillCircle(250, 400, 80, white);
  38. *)
  39.   UG_ConsoleSetArea(getmaxx div 2, getmaxy div 2, getmaxx, getmaxy);
  40.   UG_ConsoleSetForecolor(blue);
  41.   UG_ConsoleSetBackcolor(white);
  42.   UG_ConsolePutString('High Voltage' + #10);
  43.   UG_ConsolePutString('Rebooting...' + #10);
  44.   UG_ConsolePutString('Please, wait...');
  45.  
  46.   ReadLn;
  47.   CloseGraph;
  48. end.
Title: Re: TP/BP compatibility
Post by: julkas on August 24, 2019, 06:00:26 pm
Also, big performance drop -
Code: Pascal  [Select][+][-]
  1. type
  2.   TProc = procedure (...);
  3. procedure call(p: TProc);
  4.  
Please, advise.
It's graffiti, I know.
Title: Re: TP/BP compatibility
Post by: PascalDragon on August 25, 2019, 12:48:53 pm
I use Lazarus/FPC as primary IDE.
TP/BP is still alive (whether you like it or not) ...  see - System Requirements http://www.on-time.com/rtkernel-dos.htm

Probably old. But one reference on the internet means that a product/project is alive? Well, then probably nothing is dead. Even if it is just graffiti on the walls of Pompeii
Well, according to the date at the bottom left the website at least still appears to be updated... *shrugs*
Title: Re: TP/BP compatibility
Post by: julkas on August 27, 2019, 05:23:11 pm
How disassemble TP/BP compiled units?
Title: Re: TP/BP compatibility
Post by: marcov on September 01, 2019, 03:52:47 pm
How disassemble TP/BP compiled units?

This question belongs  in a TP/BP forum. This forum is about FPC.

Short answer: while there are some expensive reverse engineering tools, generally the consensus is that you can't
TinyPortal © 2005-2018