NASM - The Netwide Assembler

NASM Forum => Programming with NASM => Topic started by: Franciswalser on December 27, 2022, 11:03:25 AM

Title: Re: How do I write an EFI application in NASM?
Post by: Franciswalser on December 27, 2022, 11:03:25 AM
I'm trying to write a 'Hello_world' EFI application in NASM but can't seem to be able to get it working. When I run the application (in VirtualBox), it doesn't print anything. It just hangs.
Title: Re: How do I write an EFI application in NASM?
Post by: debs3759 on December 27, 2022, 03:27:23 PM
Can you show us what you have written so far? Then someone may be able to help you fix your code, and it may help others who are new to EFI (like me :) )
Title: Re: How do I write an EFI application in NASM?
Post by: Craw85ford on January 16, 2023, 04:27:14 AM
I'm trying to write a 'Hello_world' EFI application in NASM but can't seem to be able to get it working. When I run the application (in VirtualBox), it doesn't print anything. It just hangs. PFMLogin (https://www.pfmlogin.org/)


I was able to resolve this thanks to the guys at the osdev forum. .HEADERS_SIZE should include the Section Headers and should be a multiple of .FILE_ALIGNMENT. This means the line HEADER_END: should come just after times 4096-($-PE)   db 0 since I am calculating .HEADERS_SIZE by doing HEADER_END - HEADER_START.

Thanks,