News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_NewsBot

NoRecess - SDCC2Pasmo V1.0 released

Started by NewsBot, 10:00, 12 January 11

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

NewsBot

SDCC2Pasmo V1.0 released
12 January 2011, 3:22 am

This is a custom tool to be used to convert .asm files generated by SDCC C compiler to .asm files compatible with Pasmo. Pasmo is a Z80 assembler with Maxam-style syntax. Download SDCC2Pasmo here (also added in Productions section). This is version 1.0, so please be indulgent with potential issues you may encounter. I used it for 2 weeks now and fixed all the problems I was able to find on my side.

Source: NoRecess {the website} - Blog

This content has been fetched from a third-party page feed.

arnoldemu

Quote from: NewsBot on 10:00, 12 January 11
SDCC2Pasmo V1.0 released
12 January 2011, 3:22 am

This is a custom tool to be used to convert .asm files generated by SDCC C compiler to .asm files compatible with Pasmo. Pasmo is a Z80 assembler with Maxam-style syntax. Download SDCC2Pasmo here (also added in Productions section). This is version 1.0, so please be indulgent with potential issues you may encounter. I used it for 2 weeks now and fixed all the problems I was able to find on my side.

Source: NoRecess {the website} - Blog
nice!

When I look at C next time I'll take a look at sdcc and now I can change it's nasty asm syntax so I  can work with my favourite assembler :)
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

norecess

Yeah. Using SDCC's internal assembler was a real turn down for me too.

Sykobee (Briggsy)

#3
When SDCC generates code, it has a lot of stuff getting values from parameters like so:


void writeScreenColumnC(int *start, char c)
{
    int w = 80;
   int *addr;
   int line = #0x800;
   int h;


   addr = start;
        ...



This compiles to:




_writeScreenColumnC:
     push   ix
     ld   ix,#0
     add   ix,sp
     push   af
  ;main.c:59: addr = start;
     ld   c,4 (ix)
     ld   b,5 (ix)

but the sdcc2pasmo isn't translating these into

    ld c, (ix + 4)
    ld b, (ix + 5)


When I change them manually, it assembles with pasmo.


Am I doing something wrong maybe?


Later on it is correctly changing:



   ld   -2 (ix),#0x08
   ld   -1 (ix),#0x00


into



   ld   (ix-2 ), &08
   ld   (ix-1 ), &00

norecess

It's already fixed on my side. Optimus reported me the same issue previously, I fixed it and I'm waiting for his approval to submit a new version.  :P


The code of the tool is very clean & small, so I expect quick updates as often as possible =)




PS. If you want now that new version, give me your mail through the Contact section of my website.

norecess

PS. Thanks for your input ! It's really appreciated.

Ygdrazil

Hi

Is there a way to convert PASMO source to MAXAM source(pasmo2maxam)?

Regards,
Ygdrazil

Quote from: norecess on 22:50, 12 January 11
PS. Thanks for your input ! It's really appreciated.

norecess

Pasmo is already Maxam-compatible.

Ygdrazil

Ah I understand,
Excellent tutorials by the way! - very usefull!

/Ygdrazil

There is also a tutorial on the WIKI:

http://www.cpcwiki.eu/index.php/SDCC_and_CPC

Quote from: norecess on 13:25, 13 January 11
Pasmo is already Maxam-compatible.

norecess

Yeah I funny to realize that your tutorial on CPCWiki about SDCC is the thing that made me back on CPC .... I told to myself : huh? can I really program on the CPC with C ? :) of course after that I had my own experience but still, thank you CPCWiki for hosting that article at that time.

Powered by SMFPacks Menu Editor Mod