flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution
Code: macro defineBitMap [bit] { common local .bit,.byte .bit=1 .byte=0 forward if bit <> 0 .byte=.byte+.bit end if .bit=.bit+.bit if .bit>255 db .byte .byte=0 .bit=1 end if common if .bit>1 db .byte end if } |
|||
![]() |
|
edfed
it's ok, cool, tanks a lot revolution.
da ,Define A(1) bit or maybe,... bit? bit 0,1,0,0,1,1,0,0 it works with this: Code: da 0,0,1,1,0,0,1,1,0,0,0,0,1,1,1,1,0,1,0,1,0,1,0,1,0,0,0,1,1,1 dd 111000101010101111000011001100b it generates two identical dwords. |
|||
![]() |
|
hopcode
cool,
![]() I have written different of these bit packers. one is here http://board.flatassembler.net/topic.php?t=9905 but not really improved as my new ones, that i cannot find at the moment using reverse instead of forward is more WYSIWYG but not dd/dw packed Code: macro defineBitMap [bit] { common local .bit,.byte .bit=1 .byte=0 reverse if bit <> 0 .byte=.byte+.bit end if .bit=.bit+.bit if .bit>255 db .byte .byte=0 .bit=1 end if common if .bit>1 db .byte end if } |
|||
![]() |
|
Borsuc
Pretty clever mask-handling revolution, but the name '.bit' is confusing seeing as the parameter is already called 'bit'... maybe '.mask' or '.pos' or '.index' or something would have been more clear at first sight (took me a while to figure it out).
![]() _________________ Previously known as The_Grey_Beast |
|||
![]() |
|
edfed
it works, and i am happy!
edfed! |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.