NASM - The Netwide Assembler
NASM Forum => Programming with NASM => Topic started by: Olsonist on April 14, 2015, 06:24:35 PM
-
I have a 2K block of code. I'm adding code at the beginning and aligning addresses to 16 byte boundaries. That much is standard.
However I'd like to have one 16 byte block at the end, the last 16 bytes.
Any clean trick come to mind?
-
Labeled block at the end of code or data:
At the end write:
myblock: times 512 db 0
Or
align 16
myblock: times 512 db 0
-
So that requires me to manually figure out how many bytes to skip and that's pretty much what I thought I'd have to do. Is it possible to ASSERT that I've done everything correctly? So if I add some instructions to the head of the 2k that the assembler would barf an error saying I'd forgotten the tail end.