Well... The problem was really mod function
I have found that gba bios embeds some math functions; among these, a mod function. This is my implementation:
[pascal]
function modulus(number: s32; denom: s32): s32; assembler;
asm
swi #0x060000
mov r0, r1
bx lr
end;
[/pascal]

Now, changing my previous code:

[pascal]
program fillscreen_fpc;

{...cut...}

function modulus(number: s32; denom: s32): s32; assembler;
asm
swi #0x060000
mov r0, r1
bx lr
end;


begin
DISPCNT^ := $403;
for i:=0 to 159 do
for j:=0 to 239 do
VideoBuffer[j + 240 * i] := modulus(i * j, 31);
end.
[/pascal]

all works fine and the speed is similar to gpc and gcc :thumbup: