Newbie help!

Amstrad CPC and NC systems
Post Reply
MrZammler
New member
Posts: 2
Joined: Sat Mar 28, 2009 12:15 pm

Newbie help!

Post by MrZammler »

Hi,

I'm trying to run a simple hello world, but I'm having some troubles.

First of all, everything is done in Linux. I've setup z88dk and it seems to work (i.e. produces binaries). I've taken the simple hello world app, and compiled it with:

Code: Select all

zcc +cpc -lndos -create-app hello.c
This gave 2 files: a.cpc and a.bin

I then created an empty dsk with dskform (part of dsklib):

Code: Select all

dskform -format cpcsys test.dsk
and using cpcfs from: http://code.google.com/p/cpcsdk/wiki/cpcfs I did this:

Code: Select all

cpcfs test.dsk p 0:A.CPC
Then I load up Arnold, and loaded the dsk. CAT shows me the file is there.

I then tried running it with:

Code: Select all

memory &5fff
  load "a.cpc",&6000
  call &6000
but nothing happens. I just get a Ready prompt again.

The code is:

Code: Select all

#include <stdio.h>

main()
{
                printf("%cHello world!\n",12);
}
The only thing that seems to change is when I do a zcc +cpcansi, when run, the screen clears and I can see something but the cpc resets immediately.

I'm thinking it might be something with regards to transfering the .cpc to dsk, but I'm not sure what's wrong.

Any help would be greatly appreciated,
thanks!
MrZammler
New member
Posts: 2
Joined: Sat Mar 28, 2009 12:15 pm

Post by MrZammler »

http://www.z88dk.org/forum/viewtopic.php?id=2632

This helped, should have searched first!!! :mad::mad::mad::mad:
Post Reply