Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

I am the wandering glitch -- catch me if you can.


computers / comp.os.cpm / Re: Restored F80 compiler code for CP/M

Re: Restored F80 compiler code for CP/M

<dbc19c89-b6f0-44fd-ad85-ce6f38984fccn@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=3130&group=comp.os.cpm#3130

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:a05:620a:15cc:: with SMTP id o12mr3523105qkm.152.1644490220346;
Thu, 10 Feb 2022 02:50:20 -0800 (PST)
X-Received: by 2002:a9d:6e84:: with SMTP id a4mr2683322otr.43.1644490220020;
Thu, 10 Feb 2022 02:50:20 -0800 (PST)
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Thu, 10 Feb 2022 02:50:19 -0800 (PST)
In-Reply-To: <63e3e006-aaa5-4c6c-b30e-6677fca14b8cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23c4:83:c100:a410:ac67:7a2f:a87c;
posting-account=7LAplAoAAAByKIXUc8acNTC_dUp06kdO
NNTP-Posting-Host: 2a00:23c4:83:c100:a410:ac67:7a2f:a87c
References: <f43c18e5-8a15-4d72-aee2-16c8d73b1683n@googlegroups.com>
<stutki$17d4$1@gioia.aioe.org> <27945747-c7af-4d94-a7e3-88ffe6654057n@googlegroups.com>
<stvu15$1e67$1@gioia.aioe.org> <8ea6a9b3-0136-4cf7-a04a-a507b20964a2n@googlegroups.com>
<17baef60-7c86-43e6-8853-ecc11826e335n@googlegroups.com> <55927551-7d75-4326-adc0-edd700b62e2fn@googlegroups.com>
<eb5d9061-18b1-4383-8b45-5b3d7c617415n@googlegroups.com> <9c45051a-fe6f-4068-a6ba-4b14eab009bbn@googlegroups.com>
<63e3e006-aaa5-4c6c-b30e-6677fca14b8cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <dbc19c89-b6f0-44fd-ad85-ce6f38984fccn@googlegroups.com>
Subject: Re: Restored F80 compiler code for CP/M
From: ogde...@gmail.com (ogd...@gmail.com)
Injection-Date: Thu, 10 Feb 2022 10:50:20 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 194
 by: ogd...@gmail.com - Thu, 10 Feb 2022 10:50 UTC

On Thursday, 10 February 2022 at 10:07:01 UTC, ogd...@gmail.com wrote:
> On Thursday, 10 February 2022 at 10:00:10 UTC, ogd...@gmail.com wrote:
> > On Wednesday, 9 February 2022 at 17:00:51 UTC, nikiti...@gmail.com wrote:
> > > среда, 9 февраля 2022 г. в 19:47:20 UTC+3, Андрей Никитин:
> > > > среда, 9 февраля 2022 г. в 19:02:30 UTC+3, ogd...@gmail.com:
> > > > > On Wednesday, 9 February 2022 at 15:12:37 UTC, nikiti...@gmail.com wrote:
> > > > > > среда, 9 февраля 2022 г. в 11:29:27 UTC+3, dxforth:
> > > > > > > On 9/02/2022 18:50, Udo Munk wrote:
> > > > > > > > dxforth schrieb am Mittwoch, 9. Februar 2022 um 00:16:37 UTC+1:
> > > > > > > >> Thanks for your work. AFAIK the last official F80 release was version 3.44
> > > > > > > >> dated 10-Dec-81. Seems unlikely MS would still been involved with CP/M in 1985.
> > > > > > > >
> > > > > > > > Microsoft still was involved in CP/M in 1985, for example:
> > > > > > > >
> > > > > > > > A>d:mbas529
> > > > > > > > BASIC-85 Rev. 5.29
> > > > > > > > [CP/M Version]
> > > > > > > > Copyright 1985-1986 ? by Microsoft
> > > > > > > > Created: 28-Jul-85
> > > > > > > > 34872 Bytes free
> > > > > > > > Ok
> > > > > > > That would be the one that's byte identical to
> > > > > > >
> > > > > > > BASIC-80 Rev. 5.21
> > > > > > > [CP/M Version]
> > > > > > > Copyright 1977-1981 (C) by Microsoft
> > > > > > > Created: 28-Jul-81
> > > > > > >
> > > > > > > except for sign-on string? And what is a 'BASIC-85' anyway - 1985?
> > > > > > > >
> > > > > > > > Don't know about F80.
> > > > > > The F80 package for the TRS-80 ("FORTRAN-80 Ver. 3.4 Copyright 1978, 79, 80 (C) By Microsoft" Created: 01-Dec-80 produce Z80-mnemonics.
> > > > > >
> > > > > > Possibly Disassembled FORTRAN-80 Ver. 3.4 Copyright 1978, 79, 80 (C) By Microsoft Created: 19-Feb-85 was adapted for CP/M from it.
> > > > > >
> > > > > > If someone has the opportunity to test the work of this compiler on TRS-80 or in the emulator, please do so.
> > > > > >
> > > > > > To do this, compile the following small program and execute it.
> > > > > >
> > > > > > A>type V2.for
> > > > > > C 234567
> > > > > > DIMENSION K(5)
> > > > > > DO 10 I=1,3
> > > > > > K(I)=100+I
> > > > > > 10 CONTINUE
> > > > > > WRITE(1,100) K(1),K(2),K(3),K(4),K(5)
> > > > > > 100 FORMAT(1X,5 I7)
> > > > > > END
> > > > > >
> > > > > > A>V2 (compiled with F80 v3.44 "Created: 10-Dec-81")
> > > > > >
> > > > > > 101 102 103 0 0
> > > > > >
> > > > > > A>V2 (compiled with F80 v3.4 "Created: 19-Feb-85") ***
> > > > > >
> > > > > > 0 101 102 103 0
> > > > > >
> > > > > > *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** writes the value expected BUT puts it into the WRONG slot!
> > > > > >
> > > > > > Please report the results. If there is no error in the TRS-80 version, then I will compare these programs and look for an error in the CP/M version.
> > > > > >
> > > > > > Andrey
> > > > > Andrey
> > > > > Have you tried linking the 3.44 libraries with code generated by v3.4. It is possible that the bug lies in the libraries.
> > > > > As to the TRS-80 version, it may be the same core compiler with modified I/O routines to adapt it to run on the TRS80 and some minor changes to emit z80 code names.
> > > > >
> > > > > Mark
> > > > Mark
> > > > The error is in the compiler.
> > > > When compiling with the listing option, there is a string that is different from the listing generated by the correct compiler. I used the library from the compiler kit with an error.
> > > > FORTRAN-80 Ver. 3.4 Copyright 1978, 79, 80 (C) By Microsoft
> > > > BYTES: 36777
> > > > Created: 19-Feb-85 ;Created: 10-Dec-81
> > > > 1 C234567 ;1 C234567
> > > > 2 DIMENSION K(2) ;2 DIMENSION K(2)
> > > > 3 DO 10 I=1,2 ;3 DO 10 I=1,2
> > > > ***** 0000' LD BC,$$L ;***** 0000' LXI B,$$L
> > > > ***** 0003' JP $INIT ;***** 0003' JMP $INIT
> > > > 4 K(I)=I ;4 K(I)=I
> > > > ***** 0006' LD HL,0001 ;***** 0006' LXI H,0001
> > > > ***** 0009' LD (I),HL ;***** 0009' SHLD I
> > > > 5 10 CONTINUE ;5 10 CONTINUE
> > > > ***** 000C' LD HL,(I) ;***** 000C' LHLD I
> > > > ***** 000F' ADD HL,HL ;***** 000F' DAD H
> > > > ***** 0010' LD DE,K ;***** 0010' LXI D,K-0002 <== ERROR
> > > > ***** 0013' ADD HL,DE ;***** 0013' DAD D
> > > > ***** 0014' LD (T:000000),HL ;***** 0014' SHLD T:000000
> > > > ***** 0017' LD HL,(I) ;***** 0017' LHLD I
> > > > ***** 001A' EX DE,HL ;***** 001A' XCHG
> > > > ***** 001B' LD HL,(T:000000) ;***** 001B' LHLD T:000000
> > > > ***** 001E' LD (HL),E ;***** 001E' MOV M,E
> > > > ***** 001F' INC HL ;***** 001F' INX H
> > > > ***** 0020' LD (HL),D ;***** 0020' MOV M,D
> > > > 6 WRITE(1,100) K(1),K(2) ;6 WRITE(1,100) K(1),K(2)
> > > > ***** 0021' LD HL,(I) ;***** 0021' LHLD I
> > > > ***** 0024' INC HL ;***** 0024' INX H
> > > > ***** 0025' LD A,02 ;***** 0025' MVI A,02
> > > > ***** 0027' SUB L ;***** 0027' SUB L
> > > > ***** 0028' LD A,00 ;***** 0028' MVI A,00
> > > > ***** 002A' SBC H ;***** 002A' SBB H
> > > > ***** 002B' JP P,0009' ;***** 002B' JP 0009'
> > > > ***** 002E' LD DE,100L ;***** 002E' LXI D,100L
> > > > ***** 0031' LD HL,[01 00 00 00] ;***** 0031' LXI H,[01 00 00 00]
> > > > ***** 0034' CALL $W2 ;***** 0034' CALL $W2
> > > > 7 100 FORMAT(1X,2I3) ;7 100 FORMAT(1X,2I3)
> > > > ***** 0037' LD DE,K ;***** 0037' LXI D,K
> > > > ***** 003A' LD HL,[01 00 00 00] ;***** 003A' LXI H,[01 00 00 00]
> > > > ***** 003D' LD A,02 ;***** 003D' MVI A,02
> > > > ***** 003F' CALL $I0 ;***** 003F' CALL $I0
> > > > ***** 0042' LD DE,K+0002 ;***** 0042' LXI D,K+0002
> > > > ***** 0045' LD HL,[01 00 00 00] ;***** 0045' LXI H,[01 00 00 00]
> > > > ***** 0048' LD A,02 ;***** 0048' MVI A,02
> > > > ***** 004A' CALL $I0 ;***** 004A' CALL $I0
> > > > ***** 004D' CALL $ND ;***** 004D' CALL $ND
> > > > 8 END ;8 END
> > > > ***** 0050' CALL $EX ;***** 0050' CALL $EX
> > > > ***** 0053' 01 00 00 00 ;***** 0053' 01 00 00 00
> > > >
> > > > Program Unit Length=0057 (87)
> > > > Bytes
> > > > Data Area Length=0011 (17) Bytes
> > > >
> > > > Andrey
> > > Mark
> > >
> > > Based on date, it is most likely that a CP/M version was made from the TRS-80 version.
> > >
> > > Andrey
> > Andrey
> > I have versions 3.36, 3.4 and 3.44 for CP/M all copyrighted from 1978. The TRS80 was only delivered in Nov 1977, and CP/M was well established by then. This would suggest that the CP/M version was probably the original version.
> >
> > On a separate note, was the TRS80 version for its own DOS or for its version of CP/M, which loaded programs higher in memory. I am aware that the Basic compiler had a version for the TRS80 version of CP/M, so the Fortran compiler may be similar.
> > Mark
> Andrey
> I just looked at the distributed cpmio.mac source that came with F80 v3.44 and it clearly suggests the TRS80 version was probably for it's version of CP/M.
> The top of the file is
> TITLE CPMIO CONSOLE I/O ROUTINES FOR CP/M
> ENTRY $TTYIN,$TTYOT,$LNPTR,$CPMBF,$LINBF
> TANDY EQU 0
> CPMSBC EQU 0
> ;
> IF2
> .PRINTX /CPMIO/
> IFT TANDY
> .PRINTX/TANDY VERSION/
> ENDIF
> IFT CPMSBC
> .PRINTX/CPM SBC VERSION/
> ENDIF
> IFF TANDY OR CPMSBC
> .PRINTX/NORMAL CPM VERSION/
> ENDIF
> ENDIF
>
> Mark
Checking the 3.33, 3.36, 3.4 and 3.44 compilers on CP/M.
The error you highlight was only present in the 3.4 version.

What is interesting is that the 3.4 version uses Z80 mnemonics whilst the other versions use the intel ones. This suggests that Microsoft offered 8080 and z80 versions of the compiler. It is not clear whether the code generated or libraries were optimised for the z80.
Mark

SubjectRepliesAuthor
o Restored F80 compiler code for CP/M

By: Андрей Ник on Tue, 8 Feb 2022

23Андрей Никитин
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor