Problem with SPASM assembler

73 views
Skip to first unread message

Zbig

unread,
May 30, 2022, 1:34:14 PMMay 30
to
Hello,
I downloaded spasm.zip assembler/linker from the site
http://www.cpm.z80.de/emulate.html , but I met a problem I'm
unable to solve: although spasm.exe generates .obj file, the slink.exe
linker _always_ complains FILE READ ERROR and it deletes .obj file
I tried to use to create final .com file.

Perhaps somebody can make any tip, how to use slink.exe to make it work?
Maybe some docs are available (the package contains just short readme)?

I work within FreeDOS environment

Zbig

unread,
May 30, 2022, 3:40:06 PMMay 30
to
OK, I guess I traced the problem.
Example of proper use: „slink test=test.obj”.

So not just „slink test.obj” neither „slink test.com=test.obj”. Only like the above.

Martin

unread,
May 30, 2022, 4:05:22 PMMay 30
to
Using DOSEMU, I can confirm that.


SPASM.EXE works.
SLINK.EXE does nothing ???

Btw, I used the following example.

hello.asm
==== 8< ====
org 100h

lxi d,hello
mvi c,9
call 5
ret

hello: db 13,10,'Hello world!$'
==== 8< ====

So, these two programs are clearly *NOT*
very usable, if you want to run them as
cross development tools.


But if you want to use these programms for historical
reasons and have the possibility to run them natively
or under an emulator, there is a solution!

Cut off the first 4480 bytes and name them .COM.
Both are then running fine under any CP/M emulator!


So, assembling, linking and running the example...

A>spasm hello

-------------------------------------------
SPASM - Single Pass Assembler under CP/M-80
Version 2.06 (C) Copyright 1986,87,88,89,90
All rights reserved -- by: Harris Landsberg
-------------------------------------------


0 error(s) encountered

A>slink hello=hello

-------------------------------------------
SLINK - Object Code File Linker for CP/M-80
Version 2.07 (C) Copyright 1986,87,88,89
All rights reserved -- by: Harris Landsberg
-------------------------------------------

CODE START: 0100
CODE SIZE: 0018
DATA START: 0118
HEAP START: 0118
WRITTEN: 0.125K

A>hello

Hello world!


Have fun!
Martin

Martin

unread,
May 30, 2022, 4:13:10 PMMay 30
to
Thanks, that works!

Tried out several combinations, just not this mixed one...


Martin

unread,
May 30, 2022, 4:35:46 PMMay 30
to
UPDATE:
Slightly older versions of SPASM and SLINK, *with* documentation and
with the library manager "SLIB" are in

<http://www.retroarchive.org/cpm/cdrom/CPM/UTILS/ASMUTL/SPASM201.LBR>

Zbig

unread,
May 30, 2022, 5:11:29 PMMay 30
to
> UPDATE:
> Slightly older versions of SPASM and SLINK, *with* documentation and
> with the library manager "SLIB" are in
>
> <http://www.retroarchive.org/cpm/cdrom/CPM/UTILS/ASMUTL/SPASM201.LBR>
Thank you! :) We can combine one decent package from the two.

Randy McLaughlin

unread,
May 30, 2022, 5:39:35 PMMay 30
to
Unless you have a specific need for an odd assembler why use one?


Randy

Zbig

unread,
May 30, 2022, 6:05:37 PMMay 30
to
I wanted to practice some 8080 assembly even before I select and install full-featured CP/M emulator for DOS. And even later it may be practical to have cross-assembly ability.

dxforth

unread,
May 30, 2022, 11:34:27 PMMay 30
to
On 31/05/2022 08:05, Zbig wrote:
> I wanted to practice some 8080 assembly even before I select and install full-featured CP/M emulator for DOS. And even later it may be practical to have cross-assembly ability.

Only slightly more complicated is CP/M Executor but with the advantage
you can run native CP/M binaries.

http://hp.vector.co.jp/authors/VA000084/

p.s. the 'command dest=source' syntax applies to most DRI tools.

dxforth

unread,
May 31, 2022, 2:18:49 AMMay 31
to
On 31/05/2022 03:34, Zbig wrote:
> Hello,
> I downloaded spasm.zip assembler/linker from the site
> http://www.cpm.z80.de/emulate.html

When it says "with attached MS-DOS emulator" that's literally correct.
I found that removing the first $1180 bytes of SPASM.EXE and saving as
a COM it worked fine under CP/M. Checking with an existing DRI ASM
file it only complained about the 'TITLE' directive. I didn't test
further. While the author appears to have put a lot of work into
SPASM I can't say I ever heard of it before this.

Zbig

unread,
May 31, 2022, 4:58:32 AMMay 31
to
> Only slightly more complicated is CP/M Executor but with the advantage
> you can run native CP/M binaries.
>
> http://hp.vector.co.jp/authors/VA000084/
>
> p.s. the 'command dest=source' syntax applies to most DRI tools.

Thank you, I'll try that.
Reply all
Reply to author
Forward
0 new messages