2021-05-10 00:12:43 +02:00
|
|
|
format ELF
|
|
|
|
section '.text' executable
|
|
|
|
public memset
|
|
|
|
|
|
|
|
memset:
|
2022-04-20 21:07:54 +02:00
|
|
|
push edi
|
|
|
|
mov edi, [esp+8]
|
|
|
|
mov eax, [esp+12]
|
|
|
|
mov ecx, [esp+16]
|
|
|
|
jecxz .no_set
|
|
|
|
cld
|
|
|
|
rep stosb
|
2021-05-10 00:12:43 +02:00
|
|
|
.no_set:
|
2022-04-20 21:07:54 +02:00
|
|
|
mov eax, [esp+8]
|
|
|
|
pop edi
|
|
|
|
ret
|