Thanks Frank for your response!
I have been reading OSDev's articles of UEFI, as well as the bare bones article (but that's with C, not asm).
The main thing I've been looking at is
https://github.com/BrianOtto/nasm-uefi, which is a successful implementation.
For the moment, I have copied a bit of his code, but I would like to not just copy it so that I understand what is happening.
I don't use linkers, because it's only one file, and I believe I don't need a header file (though I could be wrong).
I have managed to make a .o file, a .obj file, and a .bin file from this code, so I know that it definitely compiles. And in theory it should work, because all it does is retrieve the variables from the UEFI, and then return back to the UEFI. (Not like traditional BIOS, where the application can't give control back to the BIOS)
There is a script on Brian Otto's Github (in link above) that copies the file onto an emulated VHS and runs it off that, but that doesn't give me an EFI file. The other thing I've been looking at is
https://forum.nasm.us/index.php?topic=2191.0. However, I don't understand the code in the OP's (of that thread) solution at all, and according to another user on the thread, it doesn't work (though that may be 32 bit vs 64 bit, or the other error the user points out).
My issue is how to compile the code so that it becomes an EFI file.
I hope this helps!