xor cx,cx
mov eax, "____"
mov cl, [ebx].PSCB
bt cx, 1
jnc @F
mov al, "6"
@@: bt cx, 2
jnc @F
mov ah, "7"
@@: rol eax, 16
bt cx, 3
jnc @F
mov al, "8"
@@: bt cx, 4
jnc @F
mov ah, "9"
@@: ror eax, 16
mov [edi], eax
add edi, 4

mov cl, " "
mov [edi], cl
inc edi


This works for bit 1, 2 and 3 but for bit 4, this doesn't work, even though I've set the fourth bit (double and quad checked this :rolleyes: ) it will not replace the last "_" with "9" (in fact it doesn't replace anything but my happy peacefull mind to a not so happy peace full mind... :) ).
Posted on 2002-09-12 12:58:27 by scientica
Remember bit count is zero based. :)
Posted on 2002-09-12 15:25:50 by bitRAKE
It is?, the pdf I looked into didn't say this. :(
It works perfectly now. Thanks, (I'll take a look in the Volume 2 instead of the pdf next time...) :)
Posted on 2002-09-13 08:16:53 by scientica