diff --git a/drivers/nvme/lib.asm b/drivers/nvme/lib.asm new file mode 100644 index 0000000..2eb60e7 --- /dev/null +++ b/drivers/nvme/lib.asm @@ -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