Recent

Author Topic: Compile a very old Pascal Source with FPC  (Read 10440 times)

Bart

  • Hero Member
  • *****
  • Posts: 5275
    • Bart en Mariska's Webstek
Re: Compile a very old Pascal Source with FPC
« Reply #15 on: September 20, 2018, 02:28:01 pm »
What does P-K4 mean?
The program does not seem to recognize e.g. A2A4, which if I am correct moves the pawn at A2 to A4.

Bart

tr_escape

  • Sr. Member
  • ****
  • Posts: 432
  • sector name toys | respect to spectre
    • Github:
Re: Compile a very old Pascal Source with FPC
« Reply #16 on: September 20, 2018, 03:29:18 pm »
Hello,

I think table explanation is here:

http://www.andreadrian.de/schach/


J-G

  • Hero Member
  • *****
  • Posts: 953
Re: Compile a very old Pascal Source with FPC
« Reply #17 on: September 20, 2018, 03:37:24 pm »
What does P-K4 mean?
Pawn to King 4
Quote from: Bart
The program does not seem to recognize e.g. A2A4, which if I am correct moves the pawn at A2 to A4.
That is a similar move (P-QR4) but in a different reference frame that only came about when Chess programs came to the PC.

Rows on the board are 'numbered' and columns are 'lettered' so P-K4 would be E2E4

Your earlier question :
Code: Pascal  [Select][+][-]
  1. What the hell does P-KK4 mean?
I think is incorrectly stated. It means Pawn to King's Knight 4 but the convention (as I understand it) would be P-KN4  using 'N' for Knight so as to avoid the potential confusion between King & Knight. That would be G2G4.

FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

rvk

  • Hero Member
  • *****
  • Posts: 6111
Re: Compile a very old Pascal Source with FPC
« Reply #18 on: September 20, 2018, 04:02:41 pm »
One would need to know the "descriptive notation"  :D
https://en.wikipedia.org/wiki/Descriptive_notation

toaopeter

  • Newbie
  • Posts: 4
Re: Compile a very old Pascal Source with FPC
« Reply #19 on: September 20, 2018, 07:54:20 pm »
To my knowledge this is worldwide the first time to be able to compile this program with fpc on current hardware. This really is preservation of computer chess history. Great work.

tr_escape

  • Sr. Member
  • ****
  • Posts: 432
  • sector name toys | respect to spectre
    • Github:
Re: Compile a very old Pascal Source with FPC
« Reply #20 on: September 20, 2018, 08:48:59 pm »
To my knowledge this is worldwide the first time to be able to compile this program with fpc on current hardware. This really is preservation of computer chess history. Great work.

Of course good but now days mostly people  wants to more colorful, powerful, 3dful (minecraft & similar except) , cloud-ful and graphical software.
« Last Edit: September 20, 2018, 08:52:24 pm by tr_escape »

rvk

  • Hero Member
  • *****
  • Posts: 6111
Re: Compile a very old Pascal Source with FPC
« Reply #21 on: September 20, 2018, 09:23:38 pm »
The last news about this software is can be found in that repo maybe someone would like to edit for more graphical (!) usage...
Of course good but now days mostly people  wants to more colorful, powerful, 3dful (minecraft & similar except) , cloud-ful and graphical software.
Yep. But even old code might be easily translated to look fancier.

You can take the source of "Simple chess GUI" and merge it with this code to make a complete Windows-chess program.

The links in the Lazarus Application Gallery are dead but the code in the topic above stil works perfectly with the current Lazarus (just change the target to what you want because it is set to Linux as default).

MSABC

  • New Member
  • *
  • Posts: 43
Re: Compile a very old Pascal Source with FPC
« Reply #22 on: September 20, 2018, 11:01:24 pm »
Don't know if this helps:

Some when in the last millennium I ported a program from a Pascal for PDP to Turbo-Pascal for DOS. It took me a long time to realize that the old PDP-Pascal implicitly initialized all numerical variable with zero. Turbo-Pascal didn't. That 'feature' was actually used by the program.

Maybe there is a similar issue with the "old" chess-code.


Bart

  • Hero Member
  • *****
  • Posts: 5275
    • Bart en Mariska's Webstek
Re: Compile a very old Pascal Source with FPC
« Reply #23 on: September 20, 2018, 11:23:55 pm »
Running the program and repeatedly entering GO, will crash the program after a while:
Code: [Select]
GO
 GO
   MY MOVE - N-N1.
GO
 GO
   MY MOVE - P-QB5.
GO
 GO
Runtime error 201 at $0040758F
  $0040758F  SEARCH,  line 2727 of chess05gnu.pas
  $0040B2A2  MYMOVE,  line 3627 of chess05gnu.pas
  $0040C5FD  main,  line 4026 of chess05gnu.pas
  $00413EC1

And running it in gdb gives:
Code: [Select]
Program exited with code 0311.
(gdb) bt
No stack.

So, no help there.

Bart
« Last Edit: September 20, 2018, 11:27:48 pm by Bart »

tr_escape

  • Sr. Member
  • ****
  • Posts: 432
  • sector name toys | respect to spectre
    • Github:
Re: Compile a very old Pascal Source with FPC
« Reply #24 on: September 21, 2018, 07:22:59 am »
In windows I tried to GO and PR it is worked.

Code: Text  [Select][+][-]
  1. IN
  2.  IN
  3.  ENTER MOVE OR TYPE GO.
  4. GO
  5.  GO
  6.    MY MOVE - P-K4.
  7. PR
  8.  PR
  9.  
  10.  8 rnbqkbnr
  11.  7 pppppppp
  12.  6 --------
  13.  5 --------
  14.  4 ----P---
  15.  3 --------
  16.  2 PPPP-PPP
  17.  1 RNBQKBNR
  18. GO
  19.  GO
  20.    MY MOVE - N-KR3.
  21. PR
  22.  PR
  23.  
  24.  8 rnbqkb-r
  25.  7 pppppppp
  26.  6 -------n
  27.  5 --------
  28.  4 ----P---
  29.  3 --------
  30.  2 PPPP-PPP
  31.  1 RNBQKBNR
  32. GO
  33.  GO
  34.    MY MOVE - Q-R5.
  35. PR
  36.  PR
  37.  
  38.  8 rnbqkb-r
  39.  7 pppppppp
  40.  6 -------n
  41.  5 -------Q
  42.  4 ----P---
  43.  3 --------
  44.  2 PPPP-PPP
  45.  1 RNB-KBNR
  46. GO
  47.  GO
  48.  DRAWN.
  49. PR
  50.  PR
  51.  
  52.  8 rnbqkb-r
  53.  7 pppppppp
  54.  6 -------n
  55.  5 -------Q
  56.  4 ----P---
  57.  3 --------
  58.  2 PPPP-PPP
  59.  1 RNB-KBNR
  60.  
  61.  

tr_escape

  • Sr. Member
  • ****
  • Posts: 432
  • sector name toys | respect to spectre
    • Github:
Re: Compile a very old Pascal Source with FPC
« Reply #25 on: September 21, 2018, 08:00:52 am »
The last news about this software is can be found in that repo maybe someone would like to edit for more graphical (!) usage...
Of course good but now days mostly people  wants to more colorful, powerful, 3dful (minecraft & similar except) , cloud-ful and graphical software.
Yep. But even old code might be easily translated to look fancier.

You can take the source of "Simple chess GUI" and merge it with this code to make a complete Windows-chess program.

The links in the Lazarus Application Gallery are dead but the code in the topic above stil works perfectly with the current Lazarus (just change the target to what you want because it is set to Linux as default).

I download source code it is working after some edit for platform but there is a bug when exiting.
It is usable maybe both project can conbine.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Compile a very old Pascal Source with FPC
« Reply #26 on: September 21, 2018, 10:59:26 pm »
Running the program and repeatedly entering GO, will crash the program after a while:
Code: [Select]
GO
 GO
   MY MOVE - N-N1.
GO
 GO
   MY MOVE - P-QB5.
GO
 GO
Runtime error 201 at $0040758F
  $0040758F  SEARCH,  line 2727 of chess05gnu.pas
  $0040B2A2  MYMOVE,  line 3627 of chess05gnu.pas
  $0040C5FD  main,  line 4026 of chess05gnu.pas
  $00413EC1

And running it in gdb gives:
Code: [Select]
Program exited with code 0311.
(gdb) bt
No stack.

So, no help there.

Bart
RTE doesn't always generates signals understood by gdb, from which you can bt. That's why the RTL can generate stacktrace on its own, in this case: range check error on line 2727.

 

TinyPortal © 2005-2018