flat assembler
Message board for the users of flat assembler.
Index
> Main > 256 1Byte register for write to mem address Goto page 1, 2 Next |
Author |
|
Fastestcodes 27 Jun 2022, 08:40
Registers:
X00: 00h X01: 01h ... XFE: feh XFF: ffh mov [0000000000000000],X80 or x0000000000000000X80 |
|||
27 Jun 2022, 08:40 |
|
Overclick 27 Jun 2022, 09:12
You cannot write from memory to memory directly. Have to use real registers.
|
|||
27 Jun 2022, 09:12 |
|
Roman 27 Jun 2022, 12:26
What is register X00 ?
mov [000],X00 Its mean this ? mov [000],0 digit |
|||
27 Jun 2022, 12:26 |
|
Fastestcodes 27 Jun 2022, 12:52
We need 256 1Byte register. Unfortunatelly we have less reg.
mov al,20h mov ah,40h mov bl,60h mov bh,80h mov cl,a0h mov ch,c0h mov dl,e0h mov dh,ffh mov [00000001],dh mov [00000002],dl... 9 color pictures .Background color is 00h. |
|||
27 Jun 2022, 12:52 |
|
Overclick 27 Jun 2022, 12:57
U can use xmm/mmx/r8-15 to extend your wishes
Also you can use some Roman's macro ideas for auto registers query |
|||
27 Jun 2022, 12:57 |
|
Overclick 27 Jun 2022, 13:04
Also each register can be 8 bit shifted to hold full size data on it
|
|||
27 Jun 2022, 13:04 |
|
revolution 27 Jun 2022, 15:40
Overclick wrote: You cannot write from memory to memory directly. Code: push [mem] pop [mem] movsb mov [mem],imm |
|||
27 Jun 2022, 15:40 |
|
Overclick 27 Jun 2022, 18:16
It is not the same. You need extra operations to set up that "copy" at your own. rsi rdi rsp
|
|||
27 Jun 2022, 18:16 |
|
revolution 27 Jun 2022, 18:47
You don't need any registers for
Code: mov dword[0x12345678],0x56789abc |
|||
27 Jun 2022, 18:47 |
|
macomics 27 Jun 2022, 18:52
You still need a rip
|
|||
27 Jun 2022, 18:52 |
|
Overclick 27 Jun 2022, 18:58
Quote:
It is not the data section. It is not the data at all. It is constant fixed to one instruction |
|||
27 Jun 2022, 18:58 |
|
macomics 27 Jun 2022, 19:22
Overclick wrote:
Although the commands themselves are selected using the command pointer register. But how do registers differ from memory cells? the absence of a numeric address or being in the processor (ALU). But memory is also not being directly read from banks right now. It is also now all in the processor - in the cache. |
|||
27 Jun 2022, 19:22 |
|
revolution 27 Jun 2022, 19:26
In 32-bit code EIP is not a register you can access anyway, right? But wait, what does jmp do?
Code: jmp label ; mov eip, label |
|||
27 Jun 2022, 19:26 |
|
macomics 27 Jun 2022, 19:40
revolution wrote: In 32-bit code EIP is not a register you can access anyway, right? But wait, what does jmp do? Code: add eip, imm Code: the absence of a numeric address or being in the processor (ALU) |
|||
27 Jun 2022, 19:40 |
|
FlierMate1 28 Jun 2022, 07:10
Overclick wrote: You cannot write from memory to memory directly. Have to use real registers. I think you mean we cannot do this: Code: mov dword [_len1], dword [_len2] |
|||
28 Jun 2022, 07:10 |
|
Fastestcodes 01 Jul 2022, 12:51
Overclick wrote: U can use xmm/mmx/r8-15 to extend your wishes How can we write single Byte to/from mm0/xmm0? |
|||
01 Jul 2022, 12:51 |
|
Furs 01 Jul 2022, 13:18
macomics wrote: If you do not understand this statement, then this is sarcasm. Numeric register addresses are set directly in commands - implicitly. So this is also a memory. |
|||
01 Jul 2022, 13:18 |
|
macomics 01 Jul 2022, 13:22
Everything is somewhat different. The memory for applications is in the processor's cache after the OS is loaded. And this means that all manipulations are carried out inside the processor.
|
|||
01 Jul 2022, 13:22 |
|
Overclick 01 Jul 2022, 16:00
Quote:
Via regular registers Code: movzx eax,byte[mem] movd xmm0,eax ... movq rax,xmm0 mov byte[mem],al You may pack a group before moving for best utilization as xmm provided for group operations anyway. Also you can use PEXTRB (SSE4.1) for single byte extraction, Last edited by Overclick on 01 Jul 2022, 16:06; edited 2 times in total |
|||
01 Jul 2022, 16:00 |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.