I have the Source direct from Dr. Scherrer shared "Software Tools Archive", if that is what you are looking for.
It was released into the public Domain and was sent to BITSAVERS for Uploading by Al.
Larry
Do you have a specific computer system that was known to use the RATFOR by Supersoft?The source code of the RATFOR preprocessor for the Model 4 TRS-80 is missing. The executable file is incompatible with CP/M. The RATFOR program is presented there as a library in the rel format. I tried to extract the RATFOR modules into separate files
That might narrow down the global searches.
In the TRS-80 Model 4 area of Humongous CP/M Archive there are the following files:
[quote]
ratfor20.zip
Pass Paramters to RATFOR (19xx)(Author Unknown)[MAC].zip
RATFOR Compiler and Applications (19xx)(Author Unknown)[DSK].zip
RatFor Z-80 Disassembler v1.1.1 (1982)(James Beard)[CMD].zip
RatFor Z-80 Disassembler v1.1.1 (1987)(James Beard)[CMD].zip
[/quote]
Larry
суббота, 1 января 2022 г. в 02:25:21 UTC+3, ldkr...@gmail.com:and compile the executable for CP/M. But it didn't work out for me. I tried to adapt the source code of RATFOR programs to work with libraries in the rel format. I partially succeeded, but it is difficult to fix the code that depends on another operating
Do you have a specific computer system that was known to use the RATFOR by Supersoft?
That might narrow down the global searches.
In the TRS-80 Model 4 area of Humongous CP/M Archive there are the following files:
[quote]
ratfor20.zip
Pass Paramters to RATFOR (19xx)(Author Unknown)[MAC].zip
RATFOR Compiler and Applications (19xx)(Author Unknown)[DSK].zip
RatFor Z-80 Disassembler v1.1.1 (1982)(James Beard)[CMD].zip
RatFor Z-80 Disassembler v1.1.1 (1987)(James Beard)[CMD].zip
[/quote]
LarryThe source code of the RATFOR preprocessor for the Model 4 TRS-80 is missing. The executable file is incompatible with CP/M. The RATFOR program is presented there as a library in the rel format. I tried to extract the RATFOR modules into separate files
AndreyOn https://github.com/nikitinprior/RELTOASM:
пятница, 31 декабря 2021 г. в 18:40:21 UTC+3, ldkr...@gmail.com:of functions and versions of different vendors were not compatible with each other.
I have the Source direct from Dr. Scherrer shared "Software Tools Archive", if that is what you are looking for.
It was released into the public Domain and was sent to BITSAVERS for Uploading by Al.
Larry
Many companies have released their own versions of the RATFOR preprocessor. Despite the general similarity, they differed in some details. The values of constants and their names could differ. Each vendor of the RATFOR preprocessor provided its own set
Thanks for the suggestion, but I'm interested in the RATFOR preprocessor implementation released by SuperSoft for CP/M or MSDOS.
Andrey
Am 12/31/2021 04:56 PM, Андрей Никитин schrieb:set of functions and versions of different vendors were not compatible with each other.
пятница, 31 декабря 2021 г. в 18:40:21 UTC+3, ldkr...@gmail.com:
I have the Source direct from Dr. Scherrer shared "Software Tools Archive", if that is what you are looking for.
It was released into the public Domain and was sent to BITSAVERS for Uploading by Al.
Larry
Many companies have released their own versions of the RATFOR preprocessor. Despite the general similarity, they differed in some details. The values of constants and their names could differ. Each vendor of the RATFOR preprocessor provided its own
Thanks for the suggestion, but I'm interested in the RATFOR preprocessor implementation released by SuperSoft for CP/M or MSDOS.
Andrey
Some files are in rlee peter's cp/m archive:
/rlee/M/MORROW/BACKUPS/M10/D1/
-rwxr-xr-x 1 martin users 36864 Apr 10 1999 LIBRARYS.REL
-rwxr-xr-x 1 martin users 8320 Apr 10 1999 LISTREL.COM
-rwxr-xr-x 1 martin users 640 Apr 10 1999 LISTREL.DOC
-rwxr-xr-x 1 martin users 4864 Apr 10 1999 LOADER.COM
-rwxr-xr-x 1 martin users 17152 Apr 10 1999 MLIB.REL
-rwxr-xr-x 1 martin users 9472 Apr 10 1999 PATCHREL.COM
-rwxr-xr-x 1 martin users 1280 Apr 10 1999 PATCHREL.DOC
-rwxr-xr-x 1 martin users 1152 Apr 10 1999 RATDEFS.RAT
-rwxr-xr-x 1 martin users 36736 Apr 10 1999 RATFOR.COM
-rwxr-xr-x 1 martin users 18048 Apr 10 1999 RATFOR.FOR
-rwxr-xr-x 1 martin users 17408 Apr 10 1999 RATFOR.RAT
-rwxr-xr-x 1 martin users 128 Apr 10 1999 README.RAT
I have the source code of the preprocessor RATFOR for the SuperSoft fortran compiler under CP/M. However, one or more included files are missing. Maybe someone has them?
Andrey
| TOKEN == LEXDO | TOKEN == LEXDIGITS | INT1(TOKEN) == INT1('[[') ) [188,189c188,189
IF ( INT1(TOKEN) == INT1(']') )223c223
IF ( INT1(LEXTYP(SP)) == INT1('[[') )
IF ( INT1(LEXTYP(SP)) == INT1('[[') ) RETURN282c282
IF (LEX1 == INT1(';') | LEX1 == INT1('[[') | LEX1 == INT1(']') ) BREAK343c343
IF (K1!=INT1(' ') & K1!=INT1(TAB)) BREAK747c747
IF (KHAR(GCBUF,1)!=INT1('('))809c809
IF (KHAR(INBUF,1)!=INT1('%')) BREAK855c855
3 IF (KHAR(INBUF,I+1) != INT1('='))862c862
4
вторник, 11 января 2022 г. в 09:11:30 UTC+3, Martin:
Am 12/30/2021 05:47 PM, Андрей Никитин schrieb:
I have the source code of the preprocessor RATFOR for the SuperSoft fortran compiler under CP/M. However, one or more included files are missing. Maybe someone has them?
Andrey
It didn't look very difficult to create a small replacemtnt for
the missing "FCOMMON.FOR".
So after a few hours collecting variable types and dimensions,
here is my first version:
FCOMMON.FOR:
==== 8< =====
IMPLICIT INTEGER (A-Z)
CHARACTER*1000 SCRAT
CHARACTER*1000 GCBUF
CHARACTER*1000 FORSTK(10)
CHARACTER*1000 DTEXT
CHARACTER*1000 DNAMES
INTEGER BRKSTK(10)
INTEGER FORLEN(10)
LOGICAL EOFL
COMMON SCRAT,GCBUF,LGCBUF,
1 DTEXT,LDTEXT,DNAMES,LDNAMS,
1 BRKPTR,BRKSTK,
1 FORPTR,FORSTK,FORLEN,
1 INFIL,OUTFIL,
1 REASHR,LABEL,ERRCNT,EOFL
==== 8< =====
But this was not enough, whatever I tried, the resulting
executable failed with a lot of errors.
And hera began the funny part, placing WRITEs into the code
and looking whats going on.
I finally spotted the problem, a very silly type conversion problem.
In short, the compiler needs to do some form of padding when processing INTERGER*1 types, a byte sized short integer type often used to hold single characters.
Single quoted one-character constants were padded whith BLANK (32)
whereas function results (KHAR!) were padded with NULL (0).
The explicit conversion function INT1 also is used in some places,
it was very confusing at first.
Placing INT1 around every single character constant was enough to fix
the code:
$ diff RATFOR0.RAT RATFOR0.RAT
178c178
< | TOKEN == LEXDO | TOKEN == LEXDIGITS | INT1(TOKEN) == '[[' ) [
---
| TOKEN == LEXDO | TOKEN == LEXDIGITS | INT1(TOKEN) == INT1('[[') ) [188,189c188,189
< IF ( INT1(TOKEN) == ']' )
< IF ( INT1(LEXTYP(SP)) == '[[' )
---
IF ( INT1(TOKEN) == INT1(']') )223c223
IF ( INT1(LEXTYP(SP)) == INT1('[[') )
< IF ( INT1(LEXTYP(SP)) == '[[' ) RETURN
---
IF ( INT1(LEXTYP(SP)) == INT1('[[') ) RETURN282c282
< IF (LEX1 == ';' | LEX1 == '[[' | LEX1 == ']' ) BREAK
---
IF (LEX1 == INT1(';') | LEX1 == INT1('[[') | LEX1 == INT1(']') ) BREAK343c343
< IF (K1!=' ' & K1!=TAB) BREAK
---
IF (K1!=INT1(' ') & K1!=INT1(TAB)) BREAK747c747
< IF (KHAR(GCBUF,1)!='(')
---
IF (KHAR(GCBUF,1)!=INT1('('))809c809
< IF (KHAR(INBUF,1)!='%') BREAK
---
IF (KHAR(INBUF,1)!=INT1('%')) BREAK855c855
< 3 IF (KHAR(INBUF,I+1) != '=')
---
3 IF (KHAR(INBUF,I+1) != INT1('='))862c862
< 4 IF (KHAR(INBUF,I+1) != '=')
---
4 IF (KHAR(INBUF,I+1) != INT1('='))869c869
< 5 IF (KHAR(INBUF,I+1) != '=')
---
5 IF (KHAR(INBUF,I+1) != INT1('='))877c877
< IF (KHAR(INBUF,K) == '!')
---
IF (KHAR(INBUF,K) == INT1('!'))879c879
< ELSE IF (KHAR(INBUF,I+1) != '=')
---
ELSE IF (KHAR(INBUF,I+1) != INT1('='))886c886
< 7 IF (KHAR(INBUF,I+1) == '&')
---
7 IF (KHAR(INBUF,I+1) == INT1('&'))892c892
< 8 IF (KHAR(INBUF,I+1) == '|')
---
8 IF (KHAR(INBUF,I+1) == INT1('|'))
These are the commands I used to build the preprocessor.
The two step "loader /h" + "sssload" helps to spot
the data areas inside the code.
ratforSSS/SUPERSOFT RATFOR TRANSLATOR VER. 4.1.
INPUT FILE? RATFOR.RAT
OUTPUT FILE? RATFOR.FOR
INCLUDING FILE: RATDEFS.RAT
TRANSLATING SUBROUTINE ADDTO(LSCRAT,GCBUF,I)
TRANSLATING INTEGER FUNCTION BYFILL(BUF,I)
TRANSLATING INTEGER FUNCTION KEYLUK(STR)
TRANSLATING CHARACTER*1000 FUNCTION LOOKUP(STRING)
TRANSLATING SUBROUTINE PARSE
TRANSLATING SUBROUTINE UNSTAK(SP,LEXTYP,LABVAL,TOKEN)
TRANSLATING INTEGER FUNCTION LEX(LEXSTR)
TRANSLATING SUBROUTINE DEFST
TRANSLATING SUBROUTINE INCLST
TRANSLATING SUBROUTINE IFCODE(LAB)
TRANSLATING SUBROUTINE WHILEC(LAB)
TRANSLATING SUBROUTINE WHILES(LAB)
TRANSLATING SUBROUTINE OTHERC(LEXSTR)
TRANSLATING SUBROUTINE REPCOD(LAB)
TRANSLATING SUBROUTINE UNTILS(LAB,UN)
TRANSLATING SUBROUTINE FORCOD(LAB)
TRANSLATING CHARACTER*80 FUNCTION CLAUSE(STRING)
TRANSLATING SUBROUTINE FORS(LAB)
TRANSLATING SUBROUTINE DOCODE(LAB)
TRANSLATING SUBROUTINE PUSH(LAB)
TRANSLATING SUBROUTINE DOSTAT(LAB)
TRANSLATING SUBROUTINE EXIT(CODE)
TRANSLATING INTEGER FUNCTION LABGEN(EXTRA)
TRANSLATING SUBROUTINE EATUP(LSCRAT)
TRANSLATING SUBROUTINE BALPAR(LSCRAT,DOSPLT)
TRANSLATING SUBROUTINE ERROR(IAR)
TRANSLATING SUBROUTINE READCD(BUF)
for ratfor ;dCOPYRIGHT (C) 1983 SMALL SYSTEMS SERVICES INC.
loader ratfor/h/l,mlibSSS/SUPERSOFT LINKING LOADER VER 3.2
COPYRIGHT 1983 SMALL SYSTEMS SERVICES INC
does not work fine.I think that actually solving this problem is not as easy as it seems.sssload ratfor
1. You needed to make corrections to the source code of the RATFOR.RAT preprocessor. This fact suggests that the source code of the FCOMMON file.FOR is not restored quite correctly.
2, Although the modified file is processed by the preprocessor RATFOR.COM and compiled by the program FOR.COM without error messages, there is no certainty that the output after compilation creates the correct relocatable object file RATFOR.REL.
3. Next, you create an image of the executable file as a file in hexadecimal format with the extension .HEX., and not immediately as a binary file with the extension .COM.
I couldn't generate the executable file directly.
4. Then you create an executable file from a hexadecimal image. Outwardly, I managed it as well as you. However, the size of the executable file was 53 KB, instead of 37 KB in the original executable file. And most importantly, the newly created file
Your work on restoring the FCOMMON.FOR file is not entirely correct, since it does not lead to the creation of a properly working preprocessor program.
Andrey
Am 12/30/2021 05:47 PM, Андрей Никитин schrieb:
I have the source code of the preprocessor RATFOR for the SuperSoft fortran compiler under CP/M. However, one or more included files are missing. Maybe someone has them?
Andrey
It didn't look very difficult to create a small replacemtnt for
the missing "FCOMMON.FOR".
So after a few hours collecting variable types and dimensions,
here is my first version:
FCOMMON.FOR:
==== 8< =====
IMPLICIT INTEGER (A-Z)
CHARACTER*1000 SCRAT
CHARACTER*1000 GCBUF
CHARACTER*1000 FORSTK(10)
CHARACTER*1000 DTEXT
CHARACTER*1000 DNAMES
INTEGER BRKSTK(10)
INTEGER FORLEN(10)
LOGICAL EOFL
COMMON SCRAT,GCBUF,LGCBUF,
1 DTEXT,LDTEXT,DNAMES,LDNAMS,
1 BRKPTR,BRKSTK,
1 FORPTR,FORSTK,FORLEN,
1 INFIL,OUTFIL,
1 REASHR,LABEL,ERRCNT,EOFL
==== 8< =====
But this was not enough, whatever I tried, the resulting
executable failed with a lot of errors.
And hera began the funny part, placing WRITEs into the code
and looking whats going on.
I finally spotted the problem, a very silly type conversion problem.
In short, the compiler needs to do some form of padding when processing INTERGER*1 types, a byte sized short integer type often used to hold
single characters.
Single quoted one-character constants were padded whith BLANK (32)
whereas function results (KHAR!) were padded with NULL (0).
The explicit conversion function INT1 also is used in some places,
it was very confusing at first.
Placing INT1 around every single character constant was enough to fix
the code:
$ diff RATFOR0.RAT RATFOR0.RAT
178c178
< | TOKEN == LEXDO | TOKEN == LEXDIGITS | INT1(TOKEN) == '[[' ) [
---
| TOKEN == LEXDO | TOKEN == LEXDIGITS | INT1(TOKEN) == INT1('[[') ) [188,189c188,189
< IF ( INT1(TOKEN) == ']' )
< IF ( INT1(LEXTYP(SP)) == '[[' )
---
IF ( INT1(TOKEN) == INT1(']') )223c223
IF ( INT1(LEXTYP(SP)) == INT1('[[') )
< IF ( INT1(LEXTYP(SP)) == '[[' ) RETURN
---
IF ( INT1(LEXTYP(SP)) == INT1('[[') ) RETURN282c282
< IF (LEX1 == ';' | LEX1 == '[[' | LEX1 == ']' ) BREAK
---
IF (LEX1 == INT1(';') | LEX1 == INT1('[[') | LEX1 == INT1(']') ) BREAK343c343
< IF (K1!=' ' & K1!=TAB) BREAK
---
IF (K1!=INT1(' ') & K1!=INT1(TAB)) BREAK747c747
< IF (KHAR(GCBUF,1)!='(')
---
IF (KHAR(GCBUF,1)!=INT1('('))809c809
< IF (KHAR(INBUF,1)!='%') BREAK
---
IF (KHAR(INBUF,1)!=INT1('%')) BREAK855c855
< 3 IF (KHAR(INBUF,I+1) != '=')
---
3 IF (KHAR(INBUF,I+1) != INT1('='))862c862
< 4 IF (KHAR(INBUF,I+1) != '=')
---
4 IF (KHAR(INBUF,I+1) != INT1('='))869c869
< 5 IF (KHAR(INBUF,I+1) != '=')
---
5 IF (KHAR(INBUF,I+1) != INT1('='))877c877
< IF (KHAR(INBUF,K) == '!')
---
IF (KHAR(INBUF,K) == INT1('!'))879c879
< ELSE IF (KHAR(INBUF,I+1) != '=')
---
ELSE IF (KHAR(INBUF,I+1) != INT1('='))886c886
< 7 IF (KHAR(INBUF,I+1) == '&')
---
7 IF (KHAR(INBUF,I+1) == INT1('&'))892c892
< 8 IF (KHAR(INBUF,I+1) == '|')
---
8 IF (KHAR(INBUF,I+1) == INT1('|'))
These are the commands I used to build the preprocessor.
The two step "loader /h" + "sssload" helps to spot
the data areas inside the code.
ratforSSS/SUPERSOFT RATFOR TRANSLATOR VER. 4.1.
INPUT FILE? RATFOR.RAT
OUTPUT FILE? RATFOR.FOR
INCLUDING FILE: RATDEFS.RAT
TRANSLATING SUBROUTINE ADDTO(LSCRAT,GCBUF,I)
TRANSLATING INTEGER FUNCTION BYFILL(BUF,I)
TRANSLATING INTEGER FUNCTION KEYLUK(STR)
TRANSLATING CHARACTER*1000 FUNCTION LOOKUP(STRING)
TRANSLATING SUBROUTINE PARSE
TRANSLATING SUBROUTINE UNSTAK(SP,LEXTYP,LABVAL,TOKEN)
TRANSLATING INTEGER FUNCTION LEX(LEXSTR)
TRANSLATING SUBROUTINE DEFST
TRANSLATING SUBROUTINE INCLST
TRANSLATING SUBROUTINE IFCODE(LAB)
TRANSLATING SUBROUTINE WHILEC(LAB)
TRANSLATING SUBROUTINE WHILES(LAB)
TRANSLATING SUBROUTINE OTHERC(LEXSTR)
TRANSLATING SUBROUTINE REPCOD(LAB)
TRANSLATING SUBROUTINE UNTILS(LAB,UN)
TRANSLATING SUBROUTINE FORCOD(LAB)
TRANSLATING CHARACTER*80 FUNCTION CLAUSE(STRING)
TRANSLATING SUBROUTINE FORS(LAB)
TRANSLATING SUBROUTINE DOCODE(LAB)
TRANSLATING SUBROUTINE PUSH(LAB)
TRANSLATING SUBROUTINE DOSTAT(LAB)
TRANSLATING SUBROUTINE EXIT(CODE)
TRANSLATING INTEGER FUNCTION LABGEN(EXTRA)
TRANSLATING SUBROUTINE EATUP(LSCRAT)
TRANSLATING SUBROUTINE BALPAR(LSCRAT,DOSPLT)
TRANSLATING SUBROUTINE ERROR(IAR)
TRANSLATING SUBROUTINE READCD(BUF)
for ratfor ;dCOPYRIGHT (C) 1983 SMALL SYSTEMS SERVICES INC.
loader ratfor/h/l,mlibSSS/SUPERSOFT LINKING LOADER VER 3.2
COPYRIGHT 1983 SMALL SYSTEMS SERVICES INC
sssload ratfor
вторник, 11 января 2022 г. в 16:35:27 UTC+3, Андрей Никитин:
вторник, 11 января 2022 г. в 09:11:30 UTC+3, Martin:
Am 12/30/2021 05:47 PM, Андрей Никитин schrieb:
I have the source code of the preprocessor RATFOR for the SuperSoft fortran compiler under CP/M. However, one or more included files are missing. Maybe someone has them?
Andrey
It didn't look very difficult to create a small replacemtnt for
the missing "FCOMMON.FOR".
So after a few hours collecting variable types and dimensions,
here is my first version:
FCOMMON.FOR:
==== 8< =====
IMPLICIT INTEGER (A-Z)
CHARACTER*1000 SCRAT
CHARACTER*1000 GCBUF
CHARACTER*1000 FORSTK(10)
CHARACTER*1000 DTEXT
CHARACTER*1000 DNAMES
INTEGER BRKSTK(10)
INTEGER FORLEN(10)
LOGICAL EOFL
COMMON SCRAT,GCBUF,LGCBUF,
1 DTEXT,LDTEXT,DNAMES,LDNAMS,
1 BRKPTR,BRKSTK,
1 FORPTR,FORSTK,FORLEN,
1 INFIL,OUTFIL,
1 REASHR,LABEL,ERRCNT,EOFL
==== 8< =====
But this was not enough, whatever I tried, the resulting
executable failed with a lot of errors.
And hera began the funny part, placing WRITEs into the code
and looking whats going on.
I finally spotted the problem, a very silly type conversion problem.
In short, the compiler needs to do some form of padding when processing INTERGER*1 types, a byte sized short integer type often used to hold single characters.
Single quoted one-character constants were padded whith BLANK (32) whereas function results (KHAR!) were padded with NULL (0).
The explicit conversion function INT1 also is used in some places,
it was very confusing at first.
Placing INT1 around every single character constant was enough to fix the code:
$ diff RATFOR0.RAT RATFOR0.RAT
178c178
< | TOKEN == LEXDO | TOKEN == LEXDIGITS | INT1(TOKEN) == '[[' ) [
---
| TOKEN == LEXDO | TOKEN == LEXDIGITS | INT1(TOKEN) == INT1('[[') ) [188,189c188,189
< IF ( INT1(TOKEN) == ']' )
< IF ( INT1(LEXTYP(SP)) == '[[' )
---
IF ( INT1(TOKEN) == INT1(']') )223c223
IF ( INT1(LEXTYP(SP)) == INT1('[[') )
< IF ( INT1(LEXTYP(SP)) == '[[' ) RETURN
---
IF ( INT1(LEXTYP(SP)) == INT1('[[') ) RETURN282c282
< IF (LEX1 == ';' | LEX1 == '[[' | LEX1 == ']' ) BREAK
---
IF (LEX1 == INT1(';') | LEX1 == INT1('[[') | LEX1 == INT1(']') ) BREAK343c343
< IF (K1!=' ' & K1!=TAB) BREAK
---
IF (K1!=INT1(' ') & K1!=INT1(TAB)) BREAK747c747
< IF (KHAR(GCBUF,1)!='(')
---
IF (KHAR(GCBUF,1)!=INT1('('))809c809
< IF (KHAR(INBUF,1)!='%') BREAK
---
IF (KHAR(INBUF,1)!=INT1('%')) BREAK855c855
< 3 IF (KHAR(INBUF,I+1) != '=')
---
3 IF (KHAR(INBUF,I+1) != INT1('='))862c862
< 4 IF (KHAR(INBUF,I+1) != '=')
---
4 IF (KHAR(INBUF,I+1) != INT1('='))869c869
< 5 IF (KHAR(INBUF,I+1) != '=')
---
5 IF (KHAR(INBUF,I+1) != INT1('='))877c877
< IF (KHAR(INBUF,K) == '!')
---
IF (KHAR(INBUF,K) == INT1('!'))879c879
< ELSE IF (KHAR(INBUF,I+1) != '=')
---
ELSE IF (KHAR(INBUF,I+1) != INT1('='))886c886
< 7 IF (KHAR(INBUF,I+1) == '&')
---
7 IF (KHAR(INBUF,I+1) == INT1('&'))892c892
< 8 IF (KHAR(INBUF,I+1) == '|')
---
8 IF (KHAR(INBUF,I+1) == INT1('|'))
These are the commands I used to build the preprocessor.
The two step "loader /h" + "sssload" helps to spot
the data areas inside the code.
ratforSSS/SUPERSOFT RATFOR TRANSLATOR VER. 4.1.
INPUT FILE? RATFOR.RAT
OUTPUT FILE? RATFOR.FOR
INCLUDING FILE: RATDEFS.RAT
TRANSLATING SUBROUTINE ADDTO(LSCRAT,GCBUF,I)
TRANSLATING INTEGER FUNCTION BYFILL(BUF,I)
TRANSLATING INTEGER FUNCTION KEYLUK(STR)
TRANSLATING CHARACTER*1000 FUNCTION LOOKUP(STRING)
TRANSLATING SUBROUTINE PARSE
TRANSLATING SUBROUTINE UNSTAK(SP,LEXTYP,LABVAL,TOKEN)
TRANSLATING INTEGER FUNCTION LEX(LEXSTR)
TRANSLATING SUBROUTINE DEFST
TRANSLATING SUBROUTINE INCLST
TRANSLATING SUBROUTINE IFCODE(LAB)
TRANSLATING SUBROUTINE WHILEC(LAB)
TRANSLATING SUBROUTINE WHILES(LAB)
TRANSLATING SUBROUTINE OTHERC(LEXSTR)
TRANSLATING SUBROUTINE REPCOD(LAB)
TRANSLATING SUBROUTINE UNTILS(LAB,UN)
TRANSLATING SUBROUTINE FORCOD(LAB)
TRANSLATING CHARACTER*80 FUNCTION CLAUSE(STRING)
TRANSLATING SUBROUTINE FORS(LAB)
TRANSLATING SUBROUTINE DOCODE(LAB)
TRANSLATING SUBROUTINE PUSH(LAB)
TRANSLATING SUBROUTINE DOSTAT(LAB)
TRANSLATING SUBROUTINE EXIT(CODE)
TRANSLATING INTEGER FUNCTION LABGEN(EXTRA)
TRANSLATING SUBROUTINE EATUP(LSCRAT)
TRANSLATING SUBROUTINE BALPAR(LSCRAT,DOSPLT)
TRANSLATING SUBROUTINE ERROR(IAR)
TRANSLATING SUBROUTINE READCD(BUF)
for ratfor ;dCOPYRIGHT (C) 1983 SMALL SYSTEMS SERVICES INC.
loader ratfor/h/l,mlibSSS/SUPERSOFT LINKING LOADER VER 3.2
COPYRIGHT 1983 SMALL SYSTEMS SERVICES INC
does not work fine.I think that actually solving this problem is not as easy as it seems.sssload ratfor
1. You needed to make corrections to the source code of the RATFOR.RAT preprocessor. This fact suggests that the source code of the FCOMMON file.FOR is not restored quite correctly.
2, Although the modified file is processed by the preprocessor RATFOR.COM and compiled by the program FOR.COM without error messages, there is no certainty that the output after compilation creates the correct relocatable object file RATFOR.REL.
3. Next, you create an image of the executable file as a file in hexadecimal format with the extension .HEX., and not immediately as a binary file with the extension .COM.
I couldn't generate the executable file directly.
4. Then you create an executable file from a hexadecimal image. Outwardly, I managed it as well as you. However, the size of the executable file was 53 KB, instead of 37 KB in the original executable file. And most importantly, the newly created file
Your work on restoring the FCOMMON.FOR file is not entirely correct, since it does not lead to the creation of a properly working preprocessor program.
AndreyPerhaps your final version of FCOMMON.FOR is different from the first one? In fact, there are errors during compilation, but they are not displayed on the screen, but are located in the listing file.
Errors are just in the content area of the included file.
If the final version of FCOMMON.FOR is different, please post it.
Andrey
вторник, 11 января 2022 г. в 17:01:56 UTC+3, Андрей Никитин:
вторник, 11 января 2022 г. в 16:35:27 UTC+3, Андрей Никитин:
вторник, 11 января 2022 г. в 09:11:30 UTC+3, Martin:
Am 12/30/2021 05:47 PM, Андрей Никитин schrieb:
I have the source code of the preprocessor RATFOR for the SuperSoft fortran compiler under CP/M. However, one or more included files are missing. Maybe someone has them?
Andrey
It didn't look very difficult to create a small replacemtnt for
the missing "FCOMMON.FOR".
So after a few hours collecting variable types and dimensions,
here is my first version:
FCOMMON.FOR:
==== 8< =====
IMPLICIT INTEGER (A-Z)
CHARACTER*1000 SCRAT
CHARACTER*1000 GCBUF
CHARACTER*1000 FORSTK(10)
CHARACTER*1000 DTEXT
CHARACTER*1000 DNAMES
INTEGER BRKSTK(10)
INTEGER FORLEN(10)
LOGICAL EOFL
COMMON SCRAT,GCBUF,LGCBUF,
1 DTEXT,LDTEXT,DNAMES,LDNAMS,
1 BRKPTR,BRKSTK,
1 FORPTR,FORSTK,FORLEN,
1 INFIL,OUTFIL,
1 REASHR,LABEL,ERRCNT,EOFL
==== 8< =====
But this was not enough, whatever I tried, the resulting
executable failed with a lot of errors.
And hera began the funny part, placing WRITEs into the code
and looking whats going on.
I finally spotted the problem, a very silly type conversion problem. In short, the compiler needs to do some form of padding when processing
INTERGER*1 types, a byte sized short integer type often used to hold single characters.
Single quoted one-character constants were padded whith BLANK (32) whereas function results (KHAR!) were padded with NULL (0).
The explicit conversion function INT1 also is used in some places,
it was very confusing at first.
Placing INT1 around every single character constant was enough to fix the code:
$ diff RATFOR0.RAT RATFOR0.RAT
178c178
< | TOKEN == LEXDO | TOKEN == LEXDIGITS | INT1(TOKEN) == '[[' ) [
---
| TOKEN == LEXDO | TOKEN == LEXDIGITS | INT1(TOKEN) == INT1('[[') ) [188,189c188,189
< IF ( INT1(TOKEN) == ']' )
< IF ( INT1(LEXTYP(SP)) == '[[' )
---
IF ( INT1(TOKEN) == INT1(']') )223c223
IF ( INT1(LEXTYP(SP)) == INT1('[[') )
< IF ( INT1(LEXTYP(SP)) == '[[' ) RETURN
---
IF ( INT1(LEXTYP(SP)) == INT1('[[') ) RETURN282c282
< IF (LEX1 == ';' | LEX1 == '[[' | LEX1 == ']' ) BREAK
---
IF (LEX1 == INT1(';') | LEX1 == INT1('[[') | LEX1 == INT1(']') ) BREAK343c343
< IF (K1!=' ' & K1!=TAB) BREAK
---
IF (K1!=INT1(' ') & K1!=INT1(TAB)) BREAK747c747
< IF (KHAR(GCBUF,1)!='(')
---
IF (KHAR(GCBUF,1)!=INT1('('))809c809
< IF (KHAR(INBUF,1)!='%') BREAK
---
IF (KHAR(INBUF,1)!=INT1('%')) BREAK855c855
< 3 IF (KHAR(INBUF,I+1) != '=')
---
3 IF (KHAR(INBUF,I+1) != INT1('='))862c862
< 4 IF (KHAR(INBUF,I+1) != '=')
---
4 IF (KHAR(INBUF,I+1) != INT1('='))869c869
< 5 IF (KHAR(INBUF,I+1) != '=')
---
5 IF (KHAR(INBUF,I+1) != INT1('='))877c877
< IF (KHAR(INBUF,K) == '!')
---
IF (KHAR(INBUF,K) == INT1('!'))879c879
< ELSE IF (KHAR(INBUF,I+1) != '=')
---
ELSE IF (KHAR(INBUF,I+1) != INT1('='))886c886
< 7 IF (KHAR(INBUF,I+1) == '&')
---
7 IF (KHAR(INBUF,I+1) == INT1('&'))892c892
< 8 IF (KHAR(INBUF,I+1) == '|')
---
8 IF (KHAR(INBUF,I+1) == INT1('|'))
These are the commands I used to build the preprocessor.
The two step "loader /h" + "sssload" helps to spot
the data areas inside the code.
ratforSSS/SUPERSOFT RATFOR TRANSLATOR VER. 4.1.
INPUT FILE? RATFOR.RAT
OUTPUT FILE? RATFOR.FOR
INCLUDING FILE: RATDEFS.RAT
TRANSLATING SUBROUTINE ADDTO(LSCRAT,GCBUF,I)
TRANSLATING INTEGER FUNCTION BYFILL(BUF,I)
TRANSLATING INTEGER FUNCTION KEYLUK(STR)
TRANSLATING CHARACTER*1000 FUNCTION LOOKUP(STRING)
TRANSLATING SUBROUTINE PARSE
TRANSLATING SUBROUTINE UNSTAK(SP,LEXTYP,LABVAL,TOKEN)
TRANSLATING INTEGER FUNCTION LEX(LEXSTR)
TRANSLATING SUBROUTINE DEFST
TRANSLATING SUBROUTINE INCLST
TRANSLATING SUBROUTINE IFCODE(LAB)
TRANSLATING SUBROUTINE WHILEC(LAB)
TRANSLATING SUBROUTINE WHILES(LAB)
TRANSLATING SUBROUTINE OTHERC(LEXSTR)
TRANSLATING SUBROUTINE REPCOD(LAB)
TRANSLATING SUBROUTINE UNTILS(LAB,UN)
TRANSLATING SUBROUTINE FORCOD(LAB)
TRANSLATING CHARACTER*80 FUNCTION CLAUSE(STRING)
TRANSLATING SUBROUTINE FORS(LAB)
TRANSLATING SUBROUTINE DOCODE(LAB)
TRANSLATING SUBROUTINE PUSH(LAB)
TRANSLATING SUBROUTINE DOSTAT(LAB)
TRANSLATING SUBROUTINE EXIT(CODE)
TRANSLATING INTEGER FUNCTION LABGEN(EXTRA)
TRANSLATING SUBROUTINE EATUP(LSCRAT)
TRANSLATING SUBROUTINE BALPAR(LSCRAT,DOSPLT)
TRANSLATING SUBROUTINE ERROR(IAR)
TRANSLATING SUBROUTINE READCD(BUF)
for ratfor ;dCOPYRIGHT (C) 1983 SMALL SYSTEMS SERVICES INC.
loader ratfor/h/l,mlibSSS/SUPERSOFT LINKING LOADER VER 3.2
COPYRIGHT 1983 SMALL SYSTEMS SERVICES INC
file does not work fine.I think that actually solving this problem is not as easy as it seems. 1. You needed to make corrections to the source code of the RATFOR.RAT preprocessor. This fact suggests that the source code of the FCOMMON file.FOR is not restored quite correctly.sssload ratfor
2, Although the modified file is processed by the preprocessor RATFOR.COM and compiled by the program FOR.COM without error messages, there is no certainty that the output after compilation creates the correct relocatable object file RATFOR.REL.
3. Next, you create an image of the executable file as a file in hexadecimal format with the extension .HEX., and not immediately as a binary file with the extension .COM.
I couldn't generate the executable file directly.
4. Then you create an executable file from a hexadecimal image. Outwardly, I managed it as well as you. However, the size of the executable file was 53 KB, instead of 37 KB in the original executable file. And most importantly, the newly created
Your work on restoring the FCOMMON.FOR file is not entirely correct, since it does not lead to the creation of a properly working preprocessor program.
AndreyPerhaps your final version of FCOMMON.FOR is different from the first one? In fact, there are errors during compilation, but they are not displayed on the screen, but are located in the listing file.
Errors are just in the content area of the included file.
If the final version of FCOMMON.FOR is different, please post it.
AndreyI apologize. I created the FCOMMON.FOR file incorrectly. After fixing it, everything worked.
Andrey
In fact, Fortran had significant limitations compared to subsequent programming languages. However, even complex system programs were
written on it, for example, the PL/M compiler for the i8080 processor. Implementations of the Fortran IV compiler for CP/M are great and should
be known to modern programmers.
MartinNevada Fortran, compilers of these companies are able to work with object files and form a program from several files, including libraries. It's almost like on big computers. At the present time, on toy computers with limited memory, it was possible to
Fortran was the first programming language that I managed to learn and subsequently write programs in it, and even in the Fortran IV version. For CP/M, I know two versions of the compiler. These are Microsoft's F80 and SuperSoft's sss Fortran. Unlike
I am very grateful to you for restoring the FCOMMON.FOR file for the RATFOR preprocessor from SuperSoft. Another program has been restored, the source code of which has been partially lost for several decades. In those early days, the RATFORpreprocessor was in demand and represented a convenient extension of the capabilities of standard Fortran.
In fact, Fortran had significant limitations compared to subsequent programming languages. However, even complex system programs were written on it, for example, the PL/M compiler for the i8080 processor. Implementations of the Fortran IV compiler forCP/M are great and should be known to modern programmers.
Once again, I thank you for recreating the lost included file and I apologize that it was not the first time I managed to compile the program.
Regards
Andrey
Can you guys make then end result available somewhere, thanks.
Can you guys make then end result available somewhere, thanks.
Cool, thanks for the link. And the SuperSoft compiler is available somewhere too?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 293 |
Nodes: | 16 (2 / 14) |
Uptime: | 215:55:54 |
Calls: | 6,620 |
Calls today: | 2 |
Files: | 12,169 |
Messages: | 5,317,557 |