[fpc-devel] New targets for FPC - Windows Phone 8 and Flash

Sergio Flores relfos at gmail.com
Sat Jul 5 14:25:21 CEST 2014


Sven, I know about this wiki page, and in theory this would be what I
needed.
But if you read it, you'll see that once you reach the interesting parts,
you only find TODO...
Basically the person who wrote this only wrote a intro to it and sadly
never finished the rest.

One thing that is missing is very important is talking about generation of
code to be passed to the target assembler. I don't know about FPC so I
don't know if this is something separated into various phases, and if there
is some kind of intermediate language involved like in LLVM or something.
The Flash VM arch is not a general cpu, as it contains some higher level
opcodes, like opcodes to supporting class inheritance (essential to inherit
from builtin Flash classes).

Dmitry, indeed converting Pascal to Actionscript is an alternative solution.
I talked about supporting Flash directly with FPC because I've seen that
efforts were made into supporting JVM, which is also a VM similar to Flash
(albeit JVM is probably more complex).

Adobe added some features to the Flash VM in order to support C++
compilation via their Alchemy compiler, mainly stuff to support pointers
and dynamic allocation/deallocation. This stuff is also necessary for
Pascal if we want to support the full language instead of just a subset.
And I'm not sure if all of those features are exposed in Actionscript,
I'lll look into it, right now I'm avaliating the best way to target this
platform using Pascal.

Regarding Windows Phone 8, it is not exactly necessary to test it with a
real phone, as emulators do exist. I investigated more into this, Microsoft
does supply a arm assembler that generates .obj files, so I'll try to see
if arm assembler generated by FPC can be directly passed to this assembler.
I do not know yet if it is possible to make a WP8 app entirely in assembler.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20140705/8f89467f/attachment.html>


More information about the fpc-devel mailing list