Uhm... well, according wiht your suggestions I have tryied to save r1 value:Originally Posted by dmantione
[pascal]
mov r8, r1
swi #0x060000
mov r0, r1
mov r1, r8
[/pascal]
I don't really know if this is a suitable way to save and restore r1 value, however it does not work at all
Looking at this doc I have tryied to tell to fpc compiler which register is affected by fpc_mod_longint function:
[pascal]
function fpc_mod_longint(n,z: longint):longint; compilerproc; assembler; [public, alias: 'FPC_MOD_LONGINT'];
asm
swi #0x060000
mov r0, r1
end['r0','r1','r2','r3'];
[/pascal]
or even
[pascal]
function fpc_mod_longint(n,z: longint):longint; compilerproc; [public, alias: 'FPC_MOD_LONGINT'];
begin
asm
swi #0x060000
mov r0, r1
end;
end;
[/pascal]
...but no way. What a headache!! :fuzzy:
Bookmarks