mirror of
https://github.com/limine-bootloader/limine
synced 2025-01-19 02:59:26 +03:00
34 lines
420 B
Plaintext
34 lines
420 B
Plaintext
global memcpy32to64
|
|
memcpy32to64:
|
|
push ebp
|
|
mov ebp, esp
|
|
|
|
push esi
|
|
push edi
|
|
|
|
push 0x28
|
|
call .p1
|
|
.p1:
|
|
add dword [esp], .mode64 - .p1
|
|
retfd
|
|
|
|
bits 64
|
|
.mode64:
|
|
mov rdi, [rbp + 8]
|
|
mov rsi, [rbp + 16]
|
|
mov rcx, [rbp + 24]
|
|
rep movsb
|
|
|
|
push 0x18
|
|
call .p2
|
|
.p2:
|
|
add qword [rsp], .mode32 - .p2
|
|
retfq
|
|
|
|
bits 32
|
|
.mode32:
|
|
pop edi
|
|
pop esi
|
|
pop ebp
|
|
ret
|