flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
macomics 08 May 2023, 06:29
The rep prefix only works with string commands movs/stos/lods/ins/outs.
|
|||
![]() |
|
FlierMate2 08 May 2023, 07:09
And also, rep scas.
|
|||
![]() |
|
macomics 08 May 2023, 07:44
FlierMate2 wrote: And also, rep scas. The cmps/scas commands use the prefixes repe/repne/repnz/repz. Although in fact repe/repz is the same prefix as rep Code: use16 rep cmpsb repe cmpsb repne cmpsb Code: ~ $ fasm main.asm -m 64 flat assembler version 1.73.30 (64 kilobytes memory) 1 passes, 6 bytes. ~ $ hexdump -C main.bin 00000000 f3 a6 f3 a6 f2 a6 |......| |
|||
![]() |
|
bitRAKE 08 May 2023, 16:40
minor change makes "rep add":
Code: mov ecx, 11 mov eax, text mov bl, 48 @@: add [eax+ecx], bl loop @B Code: mov ecx, [length] ; dynamic jecxz skip mov eax, text mov bl, 48 @@: add [eax+ecx-1], bl loop @B skip: |
|||
![]() |
|
revolution 09 May 2023, 04:13
macomics wrote: Although in fact repe/repz is the same prefix as rep |
|||
![]() |
|
DimonSoft 10 May 2023, 09:43
revolution wrote:
While it might work well with all known processors, is it documented anywhere so that it could be relied upon? |
|||
![]() |
|
macomics 10 May 2023, 10:10
DimonSoft wrote:
IntelSDM-Vol. 2B 4-555 wrote: REP/REPE/REPZ/REPNE/REPNZ—Repeat String Operation Prefix AMD 24594—Rev. 3.33—November 2021 page 12 wrote: 1.2.6 Repeat Prefixes |
|||
![]() |
|
DimonSoft 10 May 2023, 14:10
macomics, I’m afraid your quotations don’t really answer my question. I’ve read a lot of times and have re-read again before posting the article from Intel SDM. But neither it, nor the quotation from AMD SDM give any clue about repe/repne both being equal to plain rep. That’s what I’m concerned about in revolution’s suggestion.
|
|||
![]() |
|
Roman 10 May 2023, 15:30
POPCNT strange and useless command.
Show how bits equal\set to 1 The same result if value =0x01000000 or value =0x00000001 Funny. |
|||
![]() |
|
macomics 10 May 2023, 16:18
DimonSoft wrote: macomics, I’m afraid your quotations don’t really answer my question. I’ve read a lot of times and have re-read again before posting the article from Intel SDM. But neither it, nor the quotation from AMD SDM give any clue about repe/repne both being equal to plain rep. That’s what I’m concerned about in revolution’s suggestion. What revolution is talking about is rather experimental data, but there really is nothing about it in the manuals. On the contrary, there are clearly listed commands and prefixes to them. Intel SDM wrote: F3 REX.W 6E REP OUTS DX, r/m8* ZO Valid N.E. Output RCX bytes from [RSI] to port DX. If I'm not mistaken, then in REX there is only 1 bit defining a r/m8, and in the sequence of the command there is not even a byte mod-r/m-reg |
|||
![]() |
|
revolution 10 May 2023, 19:29
DimonSoft wrote:
|
|||
![]() |
|
Roman 25 May 2023, 09:13
Modern cpu have many virtual registers.
How many can do parallel execute modern cpu rep scabs or stosb ? Code: mov ecx,7 mov edi,txt mov al,'1' //symbol rep stosb mov ecx,7 mov edi,txt+7 mov al,'5' //symbol rep stosb mov ecx,7 mov edi,txt+14 mov al,'9' //symbol rep stosb |
|||
![]() |
|
l4m2 01 Jun 2023, 09:04
macomics wrote:
Nowadays a lot of instructions with F2/F3 have different meaning and 66 no longer mean 16-bit switch |
|||
![]() |
|
macomics 01 Jun 2023, 09:58
l4m2 wrote: Nowadays a lot of instructions with F2/F3 have different meaning and 66 no longer mean 16-bit switch |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.