2
0
mirror of https://git.missingno.dev/kolibrios-nvme-driver/ synced 2024-12-22 22:08:47 +01:00

add lib.asm

This commit is contained in:
Abdur-Rahman Mansoor 2024-06-12 18:02:32 -04:00
parent 8f67604ddf
commit 569a11e64f

33
drivers/nvme/lib.asm Normal file
View File

@ -0,0 +1,33 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2024. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;; GNU GENERAL PUBLIC LICENSE ;;
;; Version 2, June 1991 ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
proc memset stdcall, dest:dword, val:byte, sz:dword
push edi
mov edi, [dest]
mov al, [val]
mov ecx, [sz]
rep stosb
pop edi
ret
endp
proc memcpy stdcall, dest:dword, src:dword, sz:dword
push esi edi
mov esi, [src]
mov edi, [dest]
mov ecx, [sz]
rep movsb
pop edi esi
ret
endp