Adding two lines to an x86 assembly

I am currently working on assignment in AT & T Assembly, and now I need to add two lines:

message: .asciz "String 1"
before: .asciz "String 2"

I really don't know how to do this or how to start. I already searched the Internet, but I could not find useful information. I think I need to manually copy the characters of the second line to the end of the first line, but I'm not sure about that.

Can someone explain to me how to do this? :)

+5
source share
2 answers

. , - , . C ++, nul ( ) . , , , , ( ) . C .

, , asm , , . , , . , , , . , , , , . .

, . , , .

, , , , . , , .
+2

, . , 16 , 32 64 . , , 0- .

, , -, :

, "movsd", shr ecx, 2 , 4 , movsb. , :

mov     edi, dest
mov     esi, string_address
mov     ecx, string_length
mov     eax, ecx
shr     ecx, 2
repne movsd
mov     cl, al
and     cl, 3
repne movsb ; esi and edi move along the addresses as they copy, meaning they are already set correctly here
  • ( edi , , , )
  • ( , edi )
  • 0.

, , , , .

+5

All Articles