From 569a11e64f91a1296de3d962755b1056eba4071c Mon Sep 17 00:00:00 2001 From: Abdur-Rahman Mansoor Date: Wed, 12 Jun 2024 18:02:32 -0400 Subject: [PATCH] add lib.asm --- drivers/nvme/lib.asm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 drivers/nvme/lib.asm 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