CPCWiki forum

General Category => Programming => Topic started by: betpet on 22:33, 27 April 09

Title: Z80 programming on the PC
Post by: betpet on 22:33, 27 April 09
I'm trying to get to grips with Z80 and was wondering if there was an interpreter or something available?  The tho8ughts of using my Amstrad emulator to write code does send a shiver down my spine a little. 

If not, do you guys have any tips on what i should do to get started?  I'm assuming a copy of maxam is a must :)
Title: Re: Z80 programming on the PC
Post by: fano on 22:45, 27 April 09
Hi betpet from RR ?

Programming on WinAPE is great and uses MAXAM syntax.It is great for debugging (and for live develloping).
If you don't want to work in ASM , there is a C compiler for crossdev : z88dk (http://www.z88dk.org (http://www.z88dk.org/) )
On a real CPC, i was using DAMS, it is light and debuguer.Never tried MAXAM on real CPC so i can not say about it.
Title: Re: Z80 programming on the PC
Post by: betpet on 22:47, 27 April 09
Hi betpet from RR ?

The one and only :D

cheers for the tips.  I'll try with WinAPE
Title: Re: Z80 programming on the PC
Post by: arnoldemu on 11:40, 28 April 09
I'm trying to get to grips with Z80 and was wondering if there was an interpreter or something available?  The tho8ughts of using my Amstrad emulator to write code does send a shiver down my spine a little. 

If not, do you guys have any tips on what i should do to get started?  I'm assuming a copy of maxam is a must :)
I use crimson editor for writing the code.
I use pasmo for the assembler.
And cpcxfsw and other tools for building the dsk/cdt image.
Title: Re: Z80 programming on the PC
Post by: betpet on 12:00, 28 April 09
Thanks!  Do you have an links for those tools?
Title: Re: Z80 programming on the PC
Post by: voXfReaX on 00:20, 10 June 09
Thanks!  Do you have an links for those tools?

Hello!

I just saw that old post that was unanswered!

For pasmo, http://www.arrakis.es/~ninsesabe/pasmo/ (http://www.arrakis.es/%7Eninsesabe/pasmo/)

Winape has a built in assembler also! You might wanna try it!!!

For dsk image -> CPC disk and vice versa, you can use CPCDiskXP. It is download-able here (http://www.cpcmania.com/)!

we speak,
voXfReaX


Title: Re: Z80 programming on the PC
Post by: Executioner on 09:39, 10 June 09
Winape has a built in assembler also! You might wanna try it!!!

For dsk image -> CPC disk and vice versa, you can use CPCDiskXP. It is download-able here (http://www.cpcmania.com/)!

Also, if you have a 3.5" or 5.25" drive on both your CPC and PC, you can tell WinAPE the format and use write direct to write the assembler output files directly to the floppy for use in a real CPC.
Title: Re: Z80 programming on the PC
Post by: Axelay on 19:56, 15 June 09
Also, if you have a 3.5" or 5.25" drive on both your CPC and PC, you can tell WinAPE the format and use write direct to write the assembler output files directly to the floppy for use in a real CPC.
That reminds me.  Is it possible with write direct to add both a load and execution address to the output file?  I cant find any mention of it in the help, and if I use:
write direct "a:output.bin,&8000,&8200"
I get a file with execution address &8000, but a &0000 load address, and trying to guess what else the syntax might be hasn't really worked!
Title: Re: Z80 programming on the PC
Post by: Devilmarkus on 22:28, 15 June 09
Shouldn't this work?
Code: [Select]
org #8000
run #8200
write direct "a:code.bin"
Title: Re: Z80 programming on the PC
Post by: Executioner on 08:22, 16 June 09
That reminds me.  Is it possible with write direct to add both a load and execution address to the output file?  I cant find any mention of it in the help, and if I use:
write direct "a:output.bin,&8000,&8200"
I get a file with execution address &8000, but a &0000 load address, and trying to guess what else the syntax might be hasn't really worked!

As mentioned by Markus, the load address is determined by the current code generation address (org instruction). You can add the execution address as a parameter or use the run instruction as he's done.

eg.

org #4000
write direct "a:test.bin",#6000

would provide a load address of #4000 and exec address of #6000.
Title: Re: Z80 programming on the PC
Post by: Axelay on 12:51, 16 June 09
Thanks guys.  My problem was putting write direct before the org instruction.  Dont know why I didn't try that.  ::)
Title: Re: Z80 programming on the PC
Post by: Executioner on 05:41, 17 June 09
Thanks guys.  My problem was putting write direct before the org instruction.  Dont know why I didn't try that.  ::)

I've been guilty of doing the same thing, and then being confused by the zero load address. :o