[fpc-devel] FPC and Z80
nickysn at gmail.com
nickysn at gmail.com
Wed Jun 24 00:49:38 CEST 2020
On Tue, 2020-06-23 at 13:59 -0300, popolony2k at popolony2k.com.br wrote:
> FPC Team.
>
>
>
> Thanks a lot. Everything is working fine. I compiled my first FPC
> code (simple hello world) to MSX-DOS2 and is working fine.
>
> The only thing I realized, is something someone here wrote before,
> that is the size of generated binary (37 Kb considering this simple
> program) I really don't know what's the reason but if is something
> about future Z80 code generation optimization please let me know and
> I can help with it.
There are three areas that would improve code size:
1. Add more optimizations to the Z80 code generator
2. Add Z80-specific asm optimized RTL helpers (see e.g. the .inc files
in
https://svn.freepascal.org/svn/fpc/trunk/rtl/i386/
to see the i386 asm helpers or
https://svn.freepascal.org/svn/fpc/trunk/rtl/i8086/
for the i8086 ones. Similar ones can and should be implemented for the
Z80)
3. Rework/improve the RTL, so it provides the same functionality with
less code or allow to exclude certain features like
widestring/unicodestrings on certain platforms in order to reduce RTL
bloat.
We're working on it, but, as always, patches are welcome! :)
>
> Now I have a long path to run, that is porting my legacy code to FPC.
>
Good luck and enjoy! :)
Best regards,
Nikolay
>
>
> Thanks
>
> PopolonY2k
>
>
>
>
> Em 23/06/2020 12:53, popolony2k at popolony2k.com.br escreveu:
>
> > Hi Sven thank you.
> >
> > I had read wiki and understood the same as you explained here. Now
> > I'm using another machine based on Debian, instead my other machine
> > based on Mint and seems that worked like you wrote.
> >
> > Now I built everything and I checked these generated files on RTL
> > and compiler directories and was generated like you mentioned. I'll
> > try again on Mint.
> >
> > "(and I hope you mean OS_TARGET and not OS_VERSION
> > ;))"........you're right again - my mistake.
> >
> > Thanks a lot.
> >
> > PopolonY2k
> >
> > Em 23/06/2020 12:11, Sven Barth escreveu:
> >
> > > <popolony2k at popolony2k.com.br> schrieb am Di., 23. Juni 2020,
> > > 15:56:
> > > > Hi FPC team.
> > > >
> > > > I'm trying to compile a FPC 3.2 with support to Z80/MSXDOS, for
> > > > linux and almost everything seems to be compiling fine, because
> > > > the compiler was generated but RTL was not.
> > > >
> > > > I'm using the same build script of zxspectrum (I just changed
> > > > OS_VERSION to MSXDOS) that can be reached here
> > > > https://wiki.freepascal.org/Z80 (follow the Building
> > > > paragraph).
> > > >
> > > >
> > >
> > > As I've mentioned here:
> > > https://wiki.freepascal.org/MSX-DOS#Building_a_program
> > > A full build will fail for now (because the Sysutils unit and
> > > others are missing), but as long as you get a ppcrossz80 in the
> > > compiler directory and at least a system.a and si_prc.a in
> > > rtl/units/z80-msxdos you're all set :) (and I hope you mean
> > > OS_TARGET and not OS_VERSION ;))
> > >
> > > Regards,
> > > Sven
> > >
> >
> > _______________________________________________
> > fpc-devel maillist - fpc-devel at lists.freepascal.org
> > https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
>
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
More information about the fpc-devel
mailing list