mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-12-10 14:23:31 +01:00
34 lines
1.1 KiB
NASM
34 lines
1.1 KiB
NASM
|
;------------------------------------------------------------------------------
|
||
|
; @file
|
||
|
; Copyright (C) 2020, vit9696. All rights reserved.
|
||
|
;
|
||
|
; All rights reserved.
|
||
|
;
|
||
|
; This program and the accompanying materials
|
||
|
; are licensed and made available under the terms and conditions of the BSD License
|
||
|
; which accompanies this distribution. The full text of the license may be found at
|
||
|
; http://opensource.org/licenses/bsd-license.php
|
||
|
;
|
||
|
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||
|
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||
|
;------------------------------------------------------------------------------
|
||
|
|
||
|
BITS 64
|
||
|
DEFAULT REL
|
||
|
|
||
|
SECTION .text
|
||
|
|
||
|
;------------------------------------------------------------------------------
|
||
|
; UINT32
|
||
|
; EFIAPI
|
||
|
; AsmIncrementUint32 (
|
||
|
; IN volatile UINT32 *Value
|
||
|
; );
|
||
|
;------------------------------------------------------------------------------
|
||
|
global ASM_PFX(AsmIncrementUint32)
|
||
|
ASM_PFX(AsmIncrementUint32):
|
||
|
mov eax, 1
|
||
|
lock xadd dword [rcx], eax
|
||
|
inc eax
|
||
|
ret
|