<div dir="ltr"><div><div><div>Sven, I know about this wiki page, and in theory this would be what I needed.<br>But if you read it, you'll see that once you reach the interesting parts, you only find TODO...<br></div>Basically the person who wrote this only wrote a intro to it and sadly never finished the rest.<br>
</div><div><br></div><div>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.<br>
</div><div>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).<br></div><div><br>Dmitry, indeed converting Pascal to Actionscript is an alternative solution.<br>
</div>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).<br><br></div><div>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.<br>
</div><div>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.<br><br></div><div>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.<br>
</div><div>I do not know yet if it is possible to make a WP8 app entirely in assembler.<br></div></div>