flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Roman 23 Aug 2023, 10:22
Code: align 16 fann3 db '98 ','2 4 ','1163','7770' ;simple text tSpaces db 16 dup(32) ttAa db 16 dup(1) ttAa2 db 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 ;1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 xmmpos db 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 outTxt db 16 dup(0) movaps xmm1,dqword [fann3] movaps xmm0,xmm1 pcmpeqb xmm0,dqword [tSpaces] ;get all spaces xmm0 pand xmm0,dqword [ttAa] ;in mask set all FF to 1 ;pxor xmm0,dqword [ttAa2] paddb xmm0,dqword [xmmpos] ;mask = 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F pshufb xmm1,xmm0 movaps dqword [outTxt],xmm1 ;xmm1= '98 2244111637770' text ;must be text '982411637770' |
|||
![]() |
|
Roman 25 Aug 2023, 07:52
Avx512
vpcompressb can do this. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.