Re[4]: [fpc-pascal] rotating bits

2006-05-24 Thread Пётр Косаревский
With register calling convention (which is the default calling convention in FPC 2.x), it can be reduced just to: function brol(b: byte; c: byte): byte; assembler; inline; asm rolb %cl,%al end; (and similarly for all the other functions). The first parameter goes to eax, the second to

Re: Re[4]: [fpc-pascal] rotating bits

2006-05-24 Thread Jonas Maebe
On 24 mei 2006, at 16:11, Пётр Косаревский wrote: function brol(b: byte; c: byte): byte; assembler; inline; asm rolb %cl,%al end; (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 again. Tomas

Re[4]: [fpc-pascal] rotating bits

2006-05-24 Thread Пётр Косаревский
With register calling convention (which is the default calling convention in FPC 2.x), it can be reduced just to: function brol(b: byte; c: byte): byte; assembler; inline; asm rolb %cl,%al end; (and similarly for all the other functions). The first parameter goes to eax, the second to

Re: Re[4]: [fpc-pascal] rotating bits

2006-05-24 Thread Jonas Maebe
On 24 mei 2006, at 17:09, Пётр Косаревский wrote: function brol(b: byte; c: byte): byte; assembler; inline; asm rolb %cl,%al end; (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 again. Tomas Did

Re: Re[4]: [fpc-pascal] rotating bits

2006-05-24 Thread Tomas Hajny
Jonas Maebe wrote: On 24 mei 2006, at 17:09, Đ#65533;Ń#65533;Ń#65533;Ń#65533; Đ#65533;ĐžŃ#65533;Đ°Ń#65533;овŃ#65533;киК wrote: function brol(b: byte; c: byte): byte; assembler; inline; asm rolb %cl,%al end; (and similarly for all the other functions). The first parameter goes to

Re[4]: [fpc-pascal] rotating bits

2006-05-24 Thread ���� ����������� � mail.ru
L There is this page which might help some L http://www.merlyn.demon.co.uk/del-bits.htm Thank you, it was interesting. But it was not very helpful. It's interesting, that they don't seem to care much about rotating bytes or words. (Asm rotating 64-bits was fascinating!)