kvisc/ka/crt/mem.k

35 lines
429 B
Plaintext

; The OS/K Team licenses this file to you under the MIT license.
; See the LICENSE file in the project root for more information.
;
; void memcpy(void *, const void *, int)
;
memcpy:
mov ecx, ax2
jrcxz .r
.l:
sub edx, ax2, ecx
mov b[ax0+edx], b[ax1+edx]
loop .l
.r:
ret
;
; void memzero(void *, int)
;
memzero:
mov ecx, ax1
jrcxz .r
.l:
nul b[ax0]
inc ax0
loop .l
.r:
ret