Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to index page
Thread view  Board view
RayeR

Homepage

CZ,
02.12.2024, 17:48
 

Alternative for M$ CP/M assembler M80 & L80 for DOS/Win32? (Users)

Hi, do you know some assembler for 8080 CPU that knows Microsoft CP/M assembler M80 a linker L80 syntax and runs under DOS or Win32 (or Linux)?
I'd like to recompile some old sources but e.g. Telemark Assembler 3.2 for 8080 doesn't know the syntax. Source is quite large to complete rewrite...

---
DOS gives me freedom to unlimited HW access.

DosWorld

02.12.2024, 20:52

@ RayeR
 

Alternative for M$ CP/M assembler M80 & L80 for DOS/Win32?

> linker L80 syntax and runs under DOS or Win32 (or Linux)?

File format for CP/M object files is (imho) too obscure, ~0.001% chance to find it. IMHO.

May be some 8080+CP/M emulator help you.

PS: This is in D-lang for modern arch:

https://github.com/ibara/a80
https://github.com/ibara/l80

L80 (clone?) sources:
https://github.com/ibara/l80/blob/main/l80.c

---
Make DOS great again!
Make Russia small again!

RayeR

Homepage

CZ,
03.12.2024, 00:04

@ DosWorld
 

Alternative for M$ CP/M assembler M80 & L80 for DOS/Win32?

I don't need a linker to produce CP/M executables. The compiled source should run bare betal, just produce binary and burn it to EPROM. I know that one way is to run old compiler for CP/M under emulator but I'm looking if there's possibility to run some tools native under DOS/W32... Or if there's some translator that can transform old ASM source file to some syntax suitable for newer assembler.

---
DOS gives me freedom to unlimited HW access.

Rugxulo

Homepage

Usono,
03.12.2024, 05:42

@ RayeR
 

Alternative for M$ CP/M assembler M80 & L80 for DOS/Win32?

> I don't need a linker to produce CP/M executables. The compiled source
> should run bare betal, just produce binary and burn it to EPROM. I know
> that one way is to run old compiler for CP/M under emulator but I'm looking
> if there's possibility to run some tools native under DOS/W32... Or if
> there's some translator that can transform old ASM source file to some
> syntax suitable for newer assembler.

CP/M-ish claims to have "a classic CP/M syntax assembler and linker for cross-compiling ancient source" (among other things).

I have not tested ntvcm emulator yet in DOS (needs OpenWatcom v2 C++ to build). His MWATCOM.BAT builds it for DOS.

I'm actually curious to test Gordon Eubanks' BASIC-E (public domain).

Rugxulo

Homepage

Usono,
03.12.2024, 08:09

@ Rugxulo
 

Alternative for M$ CP/M assembler M80 & L80 for DOS/Win32?

> I'm actually curious to test Gordon Eubanks'
> BASIC-E (public domain).

[image]

DosWorld

03.12.2024, 11:09

@ Rugxulo
 

Alternative for M$ CP/M assembler M80 & L80 for DOS/Win32?

> Gordon Eubanks' BASIC-E (public domain).

Can you, please, share sources?

---
Make DOS great again!
Make Russia small again!

Rugxulo

Homepage

Usono,
06.12.2024, 05:43

@ DosWorld
 

Alternative for M$ CP/M assembler M80 & L80 for DOS/Win32?

> > Gordon Eubanks' BASIC-E
> (public domain).
>
> Can you, please, share sources?

The Wikipedia article linked to an old ASCII manual, which had binaries but no sources. In some CP/M User Group archive online, I found some sources, but they're in PL/M. (And just to get that you need DELBR.COM and UNARC.COM for the *.ark files or similar tools.)

The obvious gripe with BASIC-E is that it reads data lines only up to end of line or comma. So that's weirdly unhelpful.

There are other small BASICs, e.g. p2c's Chipmunk Basic (in C), Nils M. Holm's 12k BASIC (for 8086/DOS), or Scott Moore's BASIC (in old Pascal).

In other news on the CP/M side, it seems XPL0 works under NTVCM but DXForth does not.

RayeR

Homepage

CZ,
03.12.2024, 16:54
(edited by RayeR, 03.12.2024, 17:07)

@ Rugxulo
 

Alternative for M$ CP/M assembler M80 & L80 for DOS/Win32?

> I have not tested ntvcm
> emulator yet in DOS (needs OpenWatcom v2 C++ to build). His MWATCOM.BAT
> builds it for DOS.

Maybe. Could you share compiled binary for DOS? (there's no releases on github). I could try compile under OWC at home later this night...

But I still would prefer some x86 crosscompiler if existed any. I belive that in old DOS days when was transition from 8-bit CP/M systems to x86 there should exist some PC tools for development targeting old 8-bit systems...

---
DOS gives me freedom to unlimited HW access.

Ruud

Homepage

Heerlen - NL,
03.12.2024, 19:43

@ RayeR
 

Alternative for M$ CP/M assembler M80 & L80 for DOS/Win32?

> But I still would prefer some x86 crosscompiler if existed any.

If interested, I wrote my own assembler, Multi-Processor-Assembler, And just today I finished the part for the 8080. It is written in Free Pascal and the sources are free. You can get them, and a binary for Windows, by emailing me.

A small problem: I use my own syntax. But on request of some friends I adapted my assembler to accept the original Motorola syntax for the 6809 en TI's syntax for the TMS7000 series. All I need is some sources and their binaries, no HEX files.

---
--

With Kind regards, Ruud Baltissen

http://www.baltissen.org

RayeR

Homepage

CZ,
04.12.2024, 04:11

@ Ruud
 

Alternative for M$ CP/M assembler M80 & L80 for DOS/Win32?

You can try to compile e.g. this old source in assembler M80:
http://sapi.cz/sapi/data/m40f_asm.php

---
DOS gives me freedom to unlimited HW access.

RayeR

Homepage

CZ,
04.12.2024, 06:20
(edited by RayeR, 04.12.2024, 07:00)

@ RayeR
 

Alternative for M$ CP/M assembler M80 & L80 for DOS/Win32?

Well, I compiled the NTVCM. It required updating my OpenWatcom toolchain. Also my mingw64/g++-8.1.0 seems to be too old to know advanced c++ features...

I found some assembler in sample directory AZTEC\AS.COM and try to compile required source, got some errors but not too much like witn another 8080 asm...


L:\NTVCM\AZTEC>..\NTVCMDOS.EXE AS.COM MON4.ASM
8080 Assembler Vers. 1.06D
ERROR: Syntax error., line 2
ERROR: Multilply defined symbol CPM, line 18
ERROR: Syntax error., line 18
ERROR: Multilply defined symbol SP1, line 83
ERROR: Syntax error., line 83
ERROR: Multilply defined symbol CPM, line 90
ERROR: Syntax error., line 90
ERROR: Syntax error., line 91
ERROR: Multilply defined symbol ENDIF, line 92
ERROR: Syntax error., line 93
ERROR: Syntax error., line 94
ERROR: Multilply defined symbol ENDIF, line 95
ERROR: Multilply defined symbol CPM, line 210
ERROR: Syntax error., line 210
ERROR: Syntax error., line 211
ERROR: Multilply defined symbol ELSE, line 212
ERROR: Syntax error., line 213
ERROR: Multilply defined symbol ENDIF, line 214
ERROR: Multilply defined symbol NOT, line 336
ERROR: Syntax error., line 336
ERROR: Multilply defined symbol ELSE, line 371
ERROR: Multilply defined symbol ENDIF, line 386
ERROR: Multilply defined symbol ENDIF, line 466
ERROR: Multilply defined symbol CPM, line 502
ERROR: Syntax error., line 502
ERROR: Multilply defined symbol ELSE, line 508
ERROR: Multilply defined symbol ENDIF, line 541
ERROR: Syntax error., line 673
ERROR: Syntax error., line 739
ERROR: Syntax error., line 740
ERROR: Syntax error., line 741
ERROR: Syntax error., line 742
ERROR: Syntax error., line 743
ERROR: Syntax error., line 744
ERROR: Syntax error., line 745
ERROR: Syntax error., line 746
ERROR: Syntax error., line 747
ERROR: Syntax error., line 748
ERROR: Multilply defined symbol SP1A, line 841
ERROR: Syntax error., line 841
ERROR: Multilply defined symbol MINUS, line 842
ERROR: Multilply defined symbol EQUAL, line 845
ERROR: Multilply defined symbol QUES, line 848
ERROR: Multilply defined symbol ENDIF, line 851
ERROR: Syntax error., line 898
ERROR: Syntax error., line 899
ERROR: Multilply defined symbol ELSE, line 900
ERROR: Multilply defined symbol ENDIF, line 902
ERROR: Multilply defined symbol NOT, line 932
ERROR: Syntax error., line 932
ERROR: Multilply defined symbol ENDIF, line 935
ERROR: Multilply defined symbol SP1A, line 1147
ERROR: Syntax error., line 1147
ERROR: Multilply defined symbol IOCHK, line 1150
ERROR: Multilply defined symbol IOSET, line 1156
ERROR: Multilply defined symbol ENDIF, line 1159
ERROR: Syntax error., line 1461
ERROR: Syntax error., line 1470
ERROR: Syntax error., line 1551
ERROR: Syntax error., line 1556
ERROR: IF is undefined, line 1564
ERROR: $ is undefined, line 1564
ERROR: LOW is undefined, line 1564
ERROR: BOEND is undefined, line 1564
ERROR: BIEND is undefined, line 1564
MON4.ASM: 65 errors.

---
DOS gives me freedom to unlimited HW access.

RayeR

Homepage

CZ,
04.12.2024, 20:06
(edited by RayeR, 04.12.2024, 23:10)

@ RayeR
 

Alternative for M$ CP/M assembler M80 & L80 for DOS/Win32?

> Well, I compiled the NTVCM. It required updating my OpenWatcom toolchain.
> Also my mingw64/g++-8.1.0 seems to be too old to know advanced c++
> features...

Hm, even with latest mingw I'm unable to compile NTVCM for windows.


gcc version 14.2.0 (i686-win32-dwarf-rev0, Built by MinGW-Builds project)
C:\NTVCM>mg.bat
In file included from ntvcm.cxx:44:
./djltrace.hxx: In member function 'void CDJLTrace::Trace(const char*, ...)':
./djltrace.hxx:220:41: error: '_getpid' was not declared in this scope; did you mean '_getcwd'?
  220 |                              (unsigned) _getpid() );
                              _getcwd


Well, I fixed it by adding
#ifdef _WIN32
#include <process.h>
#endif

to both .cxx files. Now I have also win32 NTVCM binary. So I step further to compile the monitor source. It complains about:
Origin below loader memory, move anyway(Y or N)?n
I chose n and got some intel HEX file. So I'll see if it works...


C:\NTVCM\CPMTOOLS>..\NTVCM.EXE M80 =MON40F.MAC/N

No Fatal error(s)

C:\NTVCM\CPMTOOLS>..\NTVCM.EXE L80 MON40F/P:0/D:4000,MON40F/N/X/Y/E

Link-80  3.44  09-Dec-81  Copyright (c) 1981 Microsoft

Data    4000    4000    <    0>
Program 0000    4400    <17408>

36656 Bytes Free
[0000   4000       67]
Origin below loader memory, move anyway(Y or N)?n

C:\DATA\____SAPI\NTVCM\CPMTOOLS>dir MON4*
04.12.2024  22:47            41 984 MON40F.HEX
04.12.2024  20:58            38 021 MON40F.MAC
04.12.2024  22:47             2 560 MON40F.REL
04.12.2024  22:47               128 MON40F.SYM
               4 File(s)         82 693 bytes

---
DOS gives me freedom to unlimited HW access.

Rugxulo

Homepage

Usono,
05.12.2024, 04:52

@ RayeR
 

Alternative for M$ CP/M assembler M80 & L80 for DOS/Win32?

> > Well, I compiled the NTVCM. It required updating my OpenWatcom
> toolchain.

I did mention it needed v2. I have not tested much since I'm not directly familiar with CP/M.

> > Also my mingw64/g++-8.1.0 seems to be too old to know advanced c++
> > features...

G++ 8.x should be circa 2018, so it can't be "too old" (IMHO). I would be surprised if he is using C++17 or newer.

However, be careful of what the default dialect used is. You may have to override it manually. (For comparison, upcoming GCC 15 has C23 as default, since that was just published/finalized, or more likely their "gnu23" variant.)

> Hm, even with latest mingw I'm unable to compile NTVCM for windows.
>
> Well, I fixed it by adding
> #ifdef _WIN32
> #include <process.h>
> #endif

IIRC, MingW [sic] is not supported anymore, most people use MingW-w64. I looked at one of them (for something a while back) but balked at the 500 MB download and Win10 suggested minimum requirement. Granted, that covers a lot of ground (popular libraries and tools), but meh.

> So I step further to compile the monitor source.

I forgot about Alfred Arnold's AS cross-assembler. (In fairness, I haven't used most of these tools and don't have direct experience, so I'm little help.)

RayeR

Homepage

CZ,
05.12.2024, 08:01

@ Rugxulo
 

Alternative for M$ CP/M assembler M80 & L80 for DOS/Win32?

> I did mention it needed v2. I have not tested much since I'm not directly
> familiar with CP/M.

I had Version 2.0 beta Nov 1 2017

> However, be careful of what the default dialect used is. You may have to
> override it manually. (For comparison, upcoming GCC 15 has C23 as default,
> since that was just published/finalized, or more likely their "gnu23"
> variant.)

My gcc version 8.1.0 (i686-win32-sjlj-rev0, Built by MinGW-W64 project 12.5.2018) knew only -std=c++17 but didn't help:

./djltrace.hxx:216:28: error: 'mutex' was not declared in this scope
lock_guard<mutex> lock( mtx );

> IIRC, MingW [sic] is not supported anymore, most people use MingW-w64. I
> looked at one of them (for something a while back) but balked at the 500 MB
> download and Win10 suggested minimum requirement. Granted, that covers a
> lot of ground (popular libraries and tools), but meh.

Maybe he used linux as primary OS and never tried to build it under windows... my tiny patch was updated on github...

> I forgot about Alfred
> Arnold's AS cross-assembler. (In fairness, I haven't used most of
> these tools and don't have direct experience, so I'm little help.)

Just a quick test - it knows 8080 CPU but seems not understand M80 syntax - throw erros. I don't see any switch for enabling M80 compatability.

---
DOS gives me freedom to unlimited HW access.

roytam

06.12.2024, 07:25

@ Rugxulo
 

Alternative for M$ CP/M assembler M80 & L80 for DOS/Win32?

> > I don't need a linker to produce CP/M executables. The compiled source
> > should run bare betal, just produce binary and burn it to EPROM. I know
> > that one way is to run old compiler for CP/M under emulator but I'm
> looking
> > if there's possibility to run some tools native under DOS/W32... Or if
> > there's some translator that can transform old ASM source file to some
> > syntax suitable for newer assembler.
>
> CP/M-ish claims to have "a
> classic CP/M syntax assembler and linker for cross-compiling ancient
> source" (among other things).
>
> I have not tested ntvcm
> emulator yet in DOS (needs OpenWatcom v2 C++ to build). His MWATCOM.BAT
> builds it for DOS.
>
> I'm actually curious to test Gordon Eubanks'
> BASIC-E (public domain).

and there is CP/M Player
http://takeda-toshiya.my.coocan.jp/cpm/

RayeR

Homepage

CZ,
07.12.2024, 08:54

@ roytam
 

Alternative for M$ CP/M assembler M80 & L80 for DOS/Win32?

> and there is CP/M Player
> http://takeda-toshiya.my.coocan.jp/cpm/

Yeah, it works fine too. The w32 binary is a bit smaller, just 23kB over 1,7MB of NTVCM (both UPXed :) but having DOS version of NTVCM is nice (100kB)

---
DOS gives me freedom to unlimited HW access.

RayeR

Homepage

CZ,
09.12.2024, 01:30

@ Rugxulo
 

Alternative for CP/M assembler M80&L80 for DOS/Win32-solved

> CP/M-ish claims to have "a
> classic CP/M syntax assembler and linker for cross-compiling ancient
> source" (among other things).

Yes, you're right. I analyzed tools that CPMish use and found this ZMAC:
http://48k.ca/zmac.html
It has switch for 8080.

But there's one small issue. For some reason it doesn't like a label named "PO" - maybe some keyword?

ZMAC.EXE -8  MON40F.MAC
MON40F.MAC(223) : Syntax error
        JMP     PO      ; PUNCH OUTPUT <C>

MON40F.MAC(96) : Phase error - $0002 changed from $00 to $04
        JMP     COLD    ; COLD START

After I renamed the label to "POUT" both errors disappeared and I got compiled binary. I compared it to original M80 output and it the same. So I think I can use this...

---
DOS gives me freedom to unlimited HW access.

DosWorld

10.12.2024, 18:42

@ RayeR
 

Alternative for CP/M assembler M80&L80 for DOS/Win32-solved

> For some reason it doesn't like a label named
> "PO" - maybe some keyword?

Did you try “PE” ?

---
Make DOS great again!
Make Russia small again!

RayeR

Homepage

CZ,
13.12.2024, 01:52

@ DosWorld
 

Alternative for CP/M assembler M80&L80 for DOS/Win32-solved

No, I sent report to author, no reply.

---
DOS gives me freedom to unlimited HW access.

Back to index page
Thread view  Board view
22151 Postings in 2045 Threads, 396 registered users, 13 users online (0 registered, 13 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum