SDCC2Pasmo V1.0 released (http://www.norecess.net/1/post/2011/01/sdcc2pasmo-v10-released.html)
12 January 2011, 3:22 am
This is a custom tool to be used to convert .asm files generated by SDCC (http://sdcc.sourceforge.net/) C compiler to .asm files compatible with Pasmo (http://www.arrakis.es/~ninsesabe/pasmo/). Pasmo is a Z80 assembler with Maxam-style syntax. Download SDCC2Pasmo here (http://www.norecess.net/sdcc2pasmo.html) (also added in Productions (http://www.norecess.net/productions.html) 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 (http://www.norecess.net/index.html)
Quote from: NewsBot on 10:00, 12 January 11
SDCC2Pasmo V1.0 released (http://www.norecess.net/1/post/2011/01/sdcc2pasmo-v10-released.html)
12 January 2011, 3:22 am
This is a custom tool to be used to convert .asm files generated by SDCC (http://sdcc.sourceforge.net/) C compiler to .asm files compatible with Pasmo (http://www.arrakis.es/%7Eninsesabe/pasmo/). Pasmo is a Z80 assembler with Maxam-style syntax. Download SDCC2Pasmo here (http://www.norecess.net/sdcc2pasmo.html) (also added in Productions (http://www.norecess.net/productions.html) 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 (http://www.norecess.net/index.html)
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 :)
Yeah. Using SDCC's internal assembler was a real turn down for me too.
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
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.
PS. Thanks for your input ! It's really appreciated.
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.
Pasmo is already Maxam-compatible.
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 (http://www.cpcwiki.eu/index.php/SDCC_and_CPC)
Quote from: norecess on 13:25, 13 January 11
Pasmo is already Maxam-compatible.
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.