News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Cross Assembly

Started by kelp7, 08:34, 11 February 16

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kelp7

Hi all,


I hope you might be able to help with this query. I have a little problem which I want to overcome with my Z80 computer (note : Not an Amstrad, but please don't let that put you off answering the question  ;D ). There is no cross-development system for it. I was wondering if there was a decent cross development system for the Z80 machines that runs in Windows which you could recommend? I would ideally need one which outputs a file containing the binary of the Z80 machine code instructions which I could then add my own tape headers to for my particular Z80 computer. Otherwise I suppose I could knock up a program which would take away any specific tape/disk headers that the cross development system puts into the file and then add my own. Any help is very VERY much appreciated!!


Cheers
kelp

arnoldemu

pasmo can assemble a z80 file without a header.
Pasmo, ensamblador Z80 / Z80 assembler

There may be other assemblers that do the same.

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

PulkoMandy

I am quite happy with vasm and vlink (vasm portable and retargetable assembler). Windows binaries here: AJ/freem's Neo-Geo Development Page

kelp7

Thank you both ! Do really appreciate your help, I know I pop up from time to time with things un-Amstrad but this is really helpful.

arnoldemu

Quote from: kelp7 on 10:08, 11 February 16
Thank you both ! Do really appreciate your help, I know I pop up from time to time with things un-Amstrad but this is really helpful.
it has a z80 ;)
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

kelp7

Well, yes, but you know what I mean :) Still trying to develop new stuff for my Sharp :)

kelp7

Actually, on this topic : I just looked at pasmo to begin with and looks very nice but I guess you must make the .asm file yourself. Are there any decent Windows-based Z80 editors out there? Anything that will highlight obvious syntax errors automatically etc?

EgoTrip

Dunno if its quite what you are looking for but you can define your own language in Notepad++ and that will highlight any syntax errors. It doesn't come with Z80 defined, but someone might have created their own definition. I might look into that myself actually.

And indeed after a quick search, Octoate.de has one Z80 Assembly syntax highlighting for Notepad++ | The Amstrad CPC news portal

kelp7


FloppySoftware

Zmac assembler for Windows is a good option.

zmac - Z-80 Macro Cross Assembler
floppysoftware.es < NEW URL!!!
cpm-connections.blogspot.com.es

Alcoholics Anonymous


You've got plenty of options already but another one is z80asm in z88dk (not to be confused with gnu's z80asm, which is a more basic assembler).  It works equally well in windows or linux.

The bonus is z88dk also comes with more than 1000 assembly subroutines that do everything from floating point to C++ STL-like containers to data compression to small subroutines for ascii <-> text conversion, which you can optionally use.  You can also mix your asm with C code if you want using either sdcc or sccz80 as C compiler.

There is also a mechanism for modifying binaries to create target-specific file formats using an included utility called "appmake".  Appmake already does things like create tap files for various different machines which sounds like something you are doing.

zmac, vasm, gnu's binutils and z88dk's z80asm are all modern assemblers in that they have linkers and are section-aware.  Of other assemblers, pasmo has a lot of nice features too.


Notepad++ syntax highlighting for z80asm:   z88dk forums / Notepad++ Z80 Language Definition
z88dk install:  temp:front [z88dk]

PulkoMandy

For syntax highlighting, I think Crimson Editor used to be popular, but it seems to have disappeared now.


Another option is to use Vim, or the easier to use Cream (Cream :: a modern configuration of the Vim text editor), with the z80 plugins from cpcsdk: GitHub - cpcsdk/vim-z80-democoding: VIM configuration to allow fast and easy z80


It is a bit unfortunate that no one added z80 support to WUDSN - 8-bit are enough - WUDSN IDE yet (hint, hint!)

kelp7

Quote from: Alcoholics Anonymous on 04:25, 12 February 16There is also a mechanism for modifying binaries to create target-specific file formats using an included utility called "appmake".  Appmake already does things like create tap files for various different machines which sounds like something you are doing.


Thanks, yes that's what I'll need to do. I would imagine it's a very long shot to think that appmake will include a tape header format for a Sharp MZ machine but I will take a look. As for more C related stuff, I'm far more familiar with BASIC and assembly than C :) but thanks very much for the further suggestions.

arnoldemu

I use a mixture of editors.

scite under linux
notepad++ under windows
slickedit on mac.

All of these do some kind of syntax highlighting just like the others do. I actually prefer notepad++ default syntax highlighting for asm, some other "themes" can be a bit too heavy on the number of colours used.

In the end the choice is yours of which tools you use. I use the tools I mention just because i am comfortable with them and have used them for a while, others are more comfortable with other tools.

All are good and will do what you need :)
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Targhan

I use SJAsmPlus, love it and full-featured.
For the editor, I used, in this order:
- PsPad: easy to configure, very good.
- Eclipse: not so easy to configure, but works nicely. I had to use Ant script, it slowed down quite a bit the compilation.
- Komodo Edit: fast, easy to configure, very customizable (I created some cool scripts to find labels all over the place, get the address of labels by clicking on it, etc.).


Trg.Aks
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

Alcoholics Anonymous

#15
Quote from: kelp7 on 10:04, 12 February 16

Thanks, yes that's what I'll need to do. I would imagine it's a very long shot to think that appmake will include a tape header format for a Sharp MZ machine but I will take a look.

It seems there is :)  SourceForge.net Repository - [z88dk] Contents of /z88dk/src/appmake/mz.c

You can see options by running "appmake +mz -h"

I see some documentation on appmake for mz80 here:  platform:sharpmz [z88dk]  but it's sparse and I don't personally know much about the target.

Quote
As for more C related stuff, I'm far more familiar with BASIC and assembly than C :) but thanks very much for the further suggestions.

That's ok.  The library is assembly language, not C, and can be used from assembly language easily.  It's the single largest repository of z80 code available.  Anyway just so you're aware.

Powered by SMFPacks Menu Editor Mod