Pasmo - Z80 ZX Spectrum Assembler

Find Tips and tricks on how to better use the Zeus IDE. Feel free to post your own tips but please do not post bug reports, feature requests or questions here.
Post Reply
jussij
Site Admin
Posts: 2488
Joined: Fri Aug 13, 2004 5:10 pm

Pasmo - Z80 ZX Spectrum Assembler

Post by jussij » Sun Apr 30, 2017 5:24 am

1. Download the pasmo 0.5.3 zip file found here: http://pasmo.speccy.org/

2. Extract the contents of that zip file to any folder.

Then either add that folder to the PATH environment variable or alternatively copy the pasmo.exe file to this folder location:

Code: Select all

C:\Program Files (x86)\Zeus\zGNU\
This works because Zeus automatically adds that folder to the PATH environment variable.

You can test the setup using the Zeus, Tools, Dos Command Line menu and running the pasmo.exe command line.

Running that command should result in this output:

Code: Select all

Pasmo v. 0.5.3 (C) 2004-2005 Julian Albo

Usage:

	pasmo [options] source object [symbol]

See the README file for details.
As the output suggests there is a readme file that contains information about how to use the assembler.

There is some document found at this link: http://pasmo.speccy.org/pasmodoc.html

3. Create a new z80 Document Type as follows:

a. Use the Zeus Options, Documents Types menu and create a new z80 Document Type using these details.

Code: Select all

Extension: z80;asm
Description: z80 Document Type
b. In the Compiler section define this compiler command line:

Code: Select all

pasmo -v "$fn" "$fb.bin"
That command line will assembles the currently active file and create a resulting bin file.

The -v is the pasmo verbose option and the $fn and $fb are Zeus command line tags.

Change the command line to suit and refer to the Zeus help menu for details of more Zeus tags.
c. In the Colors section set a color scheme for the document type.

d. Then in the Keywords section:

i. Download this simple text file containing z80 reserved works: http://www.zeusedit.com/z300/z80.txt

Import that file as the Reserved words.

These keywords where sourced from here: http://www.z80.info/z80syntx.htm

ii. Set the line comment character to be:

Code: Select all

;

iii. Set the literal character to be:

Code: Select all

'

Change any other these Keyword settings to suit.

4. Create the following hello.asm test file and with this file open in Zeus, use the Options, Set Document Type menu and set the document type to be z80. This will only need to be done the one time.

Code: Select all

org #6000
TXT_OUTPUT    EQU #BB5A
KM_WAIT_CHAR    EQU #BB06

LD A, 'H'
CALL TXT_OUTPUT
LD A, 'e'
CALL TXT_OUTPUT
LD A, 'l'
CALL TXT_OUTPUT
LD A, 'l'
CALL TXT_OUTPUT
LD A, 'o'
CALL TXT_OUTPUT
LD A, ' '
CALL TXT_OUTPUT
LD A, 'w'
CALL TXT_OUTPUT
LD A, 'o'
CALL TXT_OUTPUT
LD A, 'r'
CALL TXT_OUTPUT
LD A, 'l'
CALL TXT_OUTPUT
LD A, 'd'
CALL TXT_OUTPUT

CALL KM_WAIT_CHAR

RET
5. Test the setup by using the Compiler, Compile menu to assemble the hello.asm file.

Running that command should result in this verbose output:

Code: Select all

Loading file: c:\Temp\hello.asm in 0
Finished loading file: c:\Temp\hello.asm in 30
Entering pass 1
Pass 1 finished
Entering pass 2
Pass 2 finished
And the creation of the hello.bin file:

Code: Select all

 Directory of D:\Temp

30/04/2017  02:49 PM               401 hello.asm
30/04/2017  03:24 PM                59 hello.bin
Cheers Jussi

Post Reply
kuchnie warszawa opinie

Who is online

Users browsing this forum: No registered users and 1 guest