Author Topic: Cross Assembly  (Read 2569 times)

0 Members and 1 Guest are viewing this topic.

Offline kelp7

  • CPC664
  • ***
  • Posts: 123
  • Country: gb
    • Sharp MZ-80A Secrets
  • Liked: 31
  • Likes Given: 56
Cross Assembly
« on: 09:34, 11 February 16 »
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

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2278
  • Likes Given: 3478
Re: Cross Assembly
« Reply #1 on: 09:39, 11 February 16 »
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

Offline PulkoMandy

  • 464 Plus
  • *****
  • Posts: 410
  • Country: fr
  • Liked: 334
  • Likes Given: 3
Re: Cross Assembly
« Reply #2 on: 09:50, 11 February 16 »
I am quite happy with vasm and vlink (vasm portable and retargetable assembler). Windows binaries here: AJ/freem's Neo-Geo Development Page
AJ/freem's Neo-Geo Development Page

Offline kelp7

  • CPC664
  • ***
  • Posts: 123
  • Country: gb
    • Sharp MZ-80A Secrets
  • Liked: 31
  • Likes Given: 56
Re: Cross Assembly
« Reply #3 on: 11: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.

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2278
  • Likes Given: 3478
Re: Cross Assembly
« Reply #4 on: 11:11, 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

Offline kelp7

  • CPC664
  • ***
  • Posts: 123
  • Country: gb
    • Sharp MZ-80A Secrets
  • Liked: 31
  • Likes Given: 56
Re: Cross Assembly
« Reply #5 on: 13:59, 11 February 16 »
Well, yes, but you know what I mean :) Still trying to develop new stuff for my Sharp :)

Offline kelp7

  • CPC664
  • ***
  • Posts: 123
  • Country: gb
    • Sharp MZ-80A Secrets
  • Liked: 31
  • Likes Given: 56
Re: Cross Assembly
« Reply #6 on: 14:55, 11 February 16 »
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?

Offline EgoTrip

  • 6128 Plus
  • ******
  • Posts: 1.058
  • Country: gl
    • http://egochip.blogspot.co.uk/
  • Liked: 704
  • Likes Given: 301
Re: Cross Assembly
« Reply #7 on: 15:08, 11 February 16 »
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
EgoTrip's Stuff
EgoTrip's Stuff

Offline kelp7

  • CPC664
  • ***
  • Posts: 123
  • Country: gb
    • Sharp MZ-80A Secrets
  • Liked: 31
  • Likes Given: 56
Re: Cross Assembly
« Reply #8 on: 17:32, 11 February 16 »
Thanks ! :)

Offline FloppySoftware

  • CPC6128
  • ****
  • Posts: 243
  • Country: es
  • The best team: Amstrad PCW, CP/M, and the Z80 cpu.
    • Floppy Software
  • Liked: 234
  • Likes Given: 171
Re: Cross Assembly
« Reply #9 on: 18:47, 11 February 16 »
Zmac assembler for Windows is a good option.

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

Offline Alcoholics Anonymous

  • CPC664
  • ***
  • Posts: 51
  • Country: ca
  • Liked: 44
  • Likes Given: 0
Re: Cross Assembly
« Reply #10 on: 05:25, 12 February 16 »

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]

Offline PulkoMandy

  • 464 Plus
  • *****
  • Posts: 410
  • Country: fr
  • Liked: 334
  • Likes Given: 3
Re: Cross Assembly
« Reply #11 on: 09:46, 12 February 16 »
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!)

Offline kelp7

  • CPC664
  • ***
  • Posts: 123
  • Country: gb
    • Sharp MZ-80A Secrets
  • Liked: 31
  • Likes Given: 56
Re: Cross Assembly
« Reply #12 on: 11:04, 12 February 16 »
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.


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.

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2278
  • Likes Given: 3478
Re: Cross Assembly
« Reply #13 on: 11:35, 12 February 16 »
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

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.255
  • Country: fr
  • Liked: 1195
  • Likes Given: 177
Re: Cross Assembly
« Reply #14 on: 12:50, 12 February 16 »
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.0 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

Offline Alcoholics Anonymous

  • CPC664
  • ***
  • Posts: 51
  • Country: ca
  • Liked: 44
  • Likes Given: 0
Re: Cross Assembly
« Reply #15 on: 19:08, 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.
« Last Edit: 19:16, 12 February 16 by Alcoholics Anonymous »