2019-07-22 14:41:50 +02:00
|
|
|
; The OS/K Team licenses this file to you under the MIT license.
|
|
|
|
; See the LICENSE file in the project root for more information.
|
|
|
|
|
2019-08-14 09:52:39 +02:00
|
|
|
;
|
|
|
|
; void memcpy(void *, const void *, int)
|
|
|
|
;
|
|
|
|
memcpy:
|
2019-09-07 16:45:03 +02:00
|
|
|
mov ecx, ax2
|
2019-08-14 09:52:39 +02:00
|
|
|
jrcxz .r
|
|
|
|
|
|
|
|
.l:
|
2019-09-07 16:45:03 +02:00
|
|
|
sub edx, ax2, ecx
|
|
|
|
mov b[ax0+edx], b[ax1+edx]
|
2019-08-14 09:52:39 +02:00
|
|
|
loop .l
|
|
|
|
|
|
|
|
.r:
|
|
|
|
ret
|
|
|
|
|
|
|
|
;
|
|
|
|
; void memzero(void *, int)
|
|
|
|
;
|
|
|
|
memzero:
|
2019-09-07 16:45:03 +02:00
|
|
|
mov ecx, ax1
|
2019-08-14 09:52:39 +02:00
|
|
|
jrcxz .r
|
|
|
|
|
|
|
|
.l:
|
2019-08-14 20:23:05 +02:00
|
|
|
nul b[ax0]
|
2019-08-21 16:57:32 +02:00
|
|
|
inc ax0
|
2019-08-14 09:52:39 +02:00
|
|
|
loop .l
|
|
|
|
|
|
|
|
.r:
|
|
|
|
ret
|
|
|
|
|
2019-07-22 14:41:50 +02:00
|
|
|
|