NASM/love is blind

3.16.2014

there was a program on the internet written entirely using NASM pseudo-op “db”.

for example, the following programs identical bit patterns I the .bin file output and therefore are equivalent:

Program 1:

[BITS 16]
ORG 0x7C00

jmp $

times 510 – ($ – $$) db 0
dw 0xAA55

Program 2:

[BITS 16]
ORG 0x7C00

;jmp $
dw 0xfeeb

times 510 – ($ – $$) db 0
dw 0xAA55

 

Leave a comment