flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Fastestcodes 10 Aug 2022, 07:37
What is the shortest? What is the fastest?
|
|||
![]() |
|
Roman 10 Aug 2022, 08:27
Fastest is bit
![]() |
|||
![]() |
|
Overclick 10 Aug 2022, 09:14
|
|||
![]() |
|
f2065 10 Aug 2022, 10:38
Fastestcodes wrote: add dh,bh Fastestcodes wrote: Shorter, faster solution? Code: and ax, 0x0101 and bx, 0x0101 and cx, 0x0101 and dx, 0x0101 shl al, 7 shl ah, 6 or al, ah shl bl, 5 or al, bl shl bh, 4 or al, bh shl cl, 3 or al, cl shl ch, 2 or al, ch shl dl, 1 or al, dl or al, dh |
|||
![]() |
|
Fastestcodes 10 Aug 2022, 10:53
Thx!
Code: mov al,1 mov ah,1 mov bl,1 mov bh,1 mov cl,1 mov ch,1 mov dl,1 mov dh,1 shl al,7 shl ah,7 shr ah,1 shl bl,7 shr bl,2 shl bh,7 shr bh,3 shl cl,7 shr cl,4 shl ch,7 shr ch,5 shl dl,7 shr dl,6 shl dh,7 shr dh,7 add ah,al add bh,bl add ch,cl add dh,dl add bh,ah add dh,ch add dh,bh mov ]edi],dh add edi,1 Last edited by Fastestcodes on 10 Aug 2022, 11:29; edited 1 time in total |
|||
![]() |
|
Tomasz Grysztar 10 Aug 2022, 11:20
Code: mov rax,0101010101010101h and rax,qword [input] mov rdx,0102040810204080h mul rdx shr rax,64-8 ; extract the result from the highest byte Fastestcodes wrote: How can I write to code window? |
|||
![]() |
|
Fastestcodes 10 Aug 2022, 11:31
Thx Tomasz!
|
|||
![]() |
|
Fastestcodes 10 Aug 2022, 12:46
F2065 code with less al use
Code: and ax,0101h and bx,0101h and cx,0101h and dx,0101h shl al, 7 shl ah, 6 shl bl, 5 shl bh, 4 shl cl, 3 shl ch, 2 shl dl, 1 or al,ah or bl,bh or cl,ch or dl,dh or al,bl or cl,dl or al,cl mov [edi],al Thx all! <3 |
|||
![]() |
|
Furs 10 Aug 2022, 13:07
Code: pext rax, rax, 0101010101010101h |
|||
![]() |
|
Roman 10 Aug 2022, 15:02
Pext cool!
|
|||
![]() |
|
Roman 10 Aug 2022, 15:11
What about Ibts?
Wikipedia write this is insert bit in string. |
|||
![]() |
|
Tomasz Grysztar 10 Aug 2022, 16:16
Roman wrote: What about Ibts? |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.