Hmmm... That is bad.... :? If the screen stays black that most likely means that mod doesn't work at all.

There are two possibilities:
* The return value of fpc_mod_longint gets lost somehow. Perhaps we did something wrong with the "bx lr" somehow (I'm an apprentice at ARM assembler :think: )
* fpc_mod_longint overwrites a register that it isn't allowed to overwrite causing the loops to end prematurely or something.

We need to find out which situation is the case, otherwise ne need to have Florian a look at the assembler code, he's a bit more experienced here.

Regarding fpc_mod_qword, no, it should calculate the modulo between 64-bit unsigned numbers compared to the modulo between 32-bit signed numbers. Code designed for one calculation does not automagically work for the other...

What kind of exe size did you get with smartlinking?