Weil .Net mich weder in VB noch C# code kompilieren lässt mit welchem ich Bits in nem Byte Rotieren kann, einfach in msil gebaut und passt.
Entspricht ca folgendem c# code.
[Only registered and activated users can see links. Click Here To Register...]
compilieren wie immer mit
Code:
.assembly BitShifter {}
.module BitShifter.dll
.namespace Converter
{
.class public auto ansi BitShifter extends [mscorlib]System.Object {
.method public static uint8 RotateLeft(uint8 'value', uint32 count) cil managed
{
ldarg.0
ldarg.1
ldc.i4.s 7
and
shl
ldarg.0
ldc.i4.s 8
ldarg.1
sub
ldc.i4.s 7
and
shr.un
or
ret
}
.method public static uint8 RotateRight(uint8 'value', uint32 count) cil managed
{
ldarg.0
ldarg.1
ldc.i4.s 7
and
shr.un
ldarg.0
ldc.i4.s 8
ldarg.1
sub
ldc.i4.s 7
and
shl
or
ret
}
}
}
[Only registered and activated users can see links. Click Here To Register...]
compilieren wie immer mit
Viel Spaß damit ;)Quote:
ilasm source.il /dll /output=BitShifter.dll