[fpc-pascal] rotating bits
XHajT03 at mbox.vol.cz
Wed May 24 18:24:06 CEST 2006
Jonas Maebe wrote:
> On 24 mei 2006, at 17:09, Đ�Ń�Ń�Ń�
>>> function brol(b: byte; c: byte): byte; assembler; inline;
>>> rolb %cl,%al
>>> (and similarly for all the other functions). The first parameter
>>> goes to
>>> eax, the second to ecx, and the result is supposed to be in eax
>> Did you test it?
>> It does not work for me (one-liner).
>> ("result" line does not seem to be needed, but calling conventions
>> used seem to be somewhat different).
> First parameter is in eax, second in edx (third one is ecx)
Yes, of course, sorry for confusion... :-( Anyway, loading of the first
parameter can be still skipped (and the stack frame is probably not useful
in this case either). So you'd get:
function brol(b: byte; c: byte): byte; assembler; nostackframe;
More information about the fpc-pascal