0

My issue is that I cannot change each bits of my pointer

my function has the same synopsis of memset

I don't know where I'm wrong thanks for helping

void *changEachBits(void *, int , size_t)

[BITS 64]

global changEachBits

section .text

changEachBits:
        push rbp
        mov rbp, rsp
        xor rcx, rcx

cdn_loop:
        cmp rcx, rdx
        jz end
        mov [rdi + rcx], rsi
        inc rcx
        jmp cdn_loop
end:
        mov rax, rcx
        mov rsp, rbp
        pop rbp
        ret
4

1 回答 1

1

Try mov byte [rdi + rcx], rsi You should check that indeed the emitted opcodes treat your array as byte array

于 2013-03-30T23:22:02.063 回答