...
This commit is contained in:
19
src/CLI/Runtime/nub_memset.s
Normal file
19
src/CLI/Runtime/nub_memset.s
Normal file
@@ -0,0 +1,19 @@
|
||||
.intel_syntax noprefix
|
||||
.section .text
|
||||
|
||||
# func nub_memset(destination: ^u8, value: i8, count: u64): ^u8
|
||||
.global nub_memset
|
||||
nub_memset:
|
||||
push rdi
|
||||
mov rcx, rdx
|
||||
mov al, sil
|
||||
test rcx, rcx
|
||||
jz memset_done
|
||||
memset_loop:
|
||||
mov BYTE PTR [rdi], al
|
||||
inc rdi
|
||||
dec rcx
|
||||
jnz memset_loop
|
||||
memset_done:
|
||||
pop rax
|
||||
ret
|
||||
Reference in New Issue
Block a user