Author Topic: Z80 programming on the PC  (Read 5536 times)

0 Members and 1 Guest are viewing this topic.

Offline betpet

  • Creator and destroyer of bugs
  • Supporter
  • CPC664
  • *
  • Posts: 110
  • Country: gb
  • Liked: 23
  • Likes Given: 35
Z80 programming on the PC
« 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 :)
Old Amstrad CPC 6128 owner. New Amstrad CPC 464 and 6128 owner. Getting back the love!

Offline fano

  • Supporter
  • 6128 Plus
  • *
  • Posts: 835
  • Country: fr
  • Easter Egg Programmer
    • Easter Egg
  • Liked: 278
  • Likes Given: 614
Re: Z80 programming on the PC
« Reply #1 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 )
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.
"NOP" is the perfect program : short , fast and (known) bug free

Follow Easter Egg products on Facebook !

Offline betpet

  • Creator and destroyer of bugs
  • Supporter
  • CPC664
  • *
  • Posts: 110
  • Country: gb
  • Liked: 23
  • Likes Given: 35
Re: Z80 programming on the PC
« Reply #2 on: 22:47, 27 April 09 »
Hi betpet from RR ?

The one and only :D

cheers for the tips.  I'll try with WinAPE
Old Amstrad CPC 6128 owner. New Amstrad CPC 464 and 6128 owner. Getting back the love!

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2275
  • Likes Given: 3478
Re: Z80 programming on the PC
« Reply #3 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.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline betpet

  • Creator and destroyer of bugs
  • Supporter
  • CPC664
  • *
  • Posts: 110
  • Country: gb
  • Liked: 23
  • Likes Given: 35
Re: Z80 programming on the PC
« Reply #4 on: 12:00, 28 April 09 »
Thanks!  Do you have an links for those tools?
Old Amstrad CPC 6128 owner. New Amstrad CPC 464 and 6128 owner. Getting back the love!

Offline voXfReaX

  • CPC664
  • ***
  • Posts: 100
  • Country: gr
    • Benediction
  • Liked: 31
  • Likes Given: 40
Re: Z80 programming on the PC
« Reply #5 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/

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!

we speak,
voXfReaX



Offline Executioner

  • Supporter
  • 6128 Plus
  • *
  • Posts: 783
  • Country: au
  • WinAPE Developer
    • WinAPE
  • Liked: 392
  • Likes Given: 60
Re: Z80 programming on the PC
« Reply #6 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!

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.

Offline Axelay

  • 6128 Plus
  • ******
  • Posts: 585
  • Country: au
  • Liked: 383
  • Likes Given: 87
Re: Z80 programming on the PC
« Reply #7 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!

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1016
  • Likes Given: 926
Re: Z80 programming on the PC
« Reply #8 on: 22:28, 15 June 09 »
Shouldn't this work?
Code: [Select]
org #8000
run #8200
write direct "a:code.bin"
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Offline Executioner

  • Supporter
  • 6128 Plus
  • *
  • Posts: 783
  • Country: au
  • WinAPE Developer
    • WinAPE
  • Liked: 392
  • Likes Given: 60
Re: Z80 programming on the PC
« Reply #9 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.

Offline Axelay

  • 6128 Plus
  • ******
  • Posts: 585
  • Country: au
  • Liked: 383
  • Likes Given: 87
Re: Z80 programming on the PC
« Reply #10 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.  ::)

Offline Executioner

  • Supporter
  • 6128 Plus
  • *
  • Posts: 783
  • Country: au
  • WinAPE Developer
    • WinAPE
  • Liked: 392
  • Likes Given: 60
Re: Z80 programming on the PC
« Reply #11 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