4

I trying to write in Z80 Assembler in a CP/M 2.2 Emulator (z80pack) in Debian:

A>dir
A: DUMP     COM : SDIR     COM : SUBMIT   COM : ED       COM
A: STAT     COM : BYE      COM : RMAC     COM : CREF80   COM
A: LINK     COM : L80      COM : M80      COM : SID      COM
A: WM       COM : WM       HLP : ZSID     COM : MAC      COM
A: TRACE    UTL : HIST     UTL : RESET    COM : LIB80    COM
A: HIST     COM : DDT      COM : Z80ASM   COM : CLS      COM
A: SLRNK    COM : MOVCPM   COM : ASM      COM : LOAD     COM
A: XSUB     COM : LIB      COM : PIP      COM : SYSGEN   COM
A>
A>z80asm

Z80 ASSEMBLER Copyright (C) 1983 by SLR Systems Rel. 1.30 #F10268

%STROUT EQU 9
STROUT EQ
A>Z80ASM

Z80 ASSEMBLER Copyright (C) 1983 by SLR Systems Rel. 1.30 #F10268

%A
A
A.Z80 - File Not Found Line 00000

%adc a,R
adc a,
ADC.Z80 - File Not Found Line 00000

R
R.Z80 - File Not Found Line 00000

%ORG 100h
ORG 1Command Syntax Error - Abort

A>

It just says "File Not Found" everytime I try to write a line. I looked for the manual, but it don't say how to start. Is there a especial command I should type? Because M80 (Macro-Assembler 80) also gives error in every line.

Rafa_Asp1
  • 89
  • 2
  • 8
  • I'm guessing it isn't an interactive monitor. Have you tried entering the code to be assembled into a file (.z80) and entering its name into the assembler? In any event I suspect you'll be able to save yourself a lot of grief by going the cross-assembly route. – doynax Nov 14 '15 at 21:00
  • @doynax is correct Z80ASM assembles source files. If you want to interact with the symbolic interactive debugger/monitor in Z80 you can run SID instead of Z80ASM. There is some information using SID at this [link](http://rvbelzen.tripod.com/cpm/asuthelp.htm#sid). If you wish to use Z80ASM then you can create source files like TEST.Z80 with the ED command. Instructions on using ED can be found [here](http://www.cpm.z80.de/randyfiles/DRI/ED.pdf) – Michael Petch Nov 14 '15 at 22:25

2 Answers2

4

You need to create a file containing your Z80 code called whatever.Z80, then provide whatever at the % prompt.

Hence, you can edit your code to alter your program rather than having to retype the entire code perfectly every time.

Magoo
  • 77,302
  • 8
  • 62
  • 84
0

Given your assembly source file named CONFI.Z80 this command will generate a CONFI.COM binary and a CONFI.LST program listing with a symbol list at the end:

z80asm confi/fxs

Sample run under RunCPM emulator:

A>z80asm confi/fxs

Z80ASM Copyright (C) 1983-86 by SLR Systems Rel. 1.32 #RunCPM

 CONFI/FXS
End of file Pass 1
End of file Pass 2
 0 Error(s) Detected.
 6784 Absolute Bytes. 137 Symbols Detected.

Full manual at https://oldcomputers.dyndns.org/public/pub/manuals/z80asm.pdf

Thorbjørn Ravn Andersen
  • 73,784
  • 33
  • 194
  • 347