Ok, I need I really simple bootsector program for NASM. I have one for the magic assembler and for MASM. However, I have to use NASM(figures). Can someone write me one or tell me where I can get one. I want it to be really simple no printing to the screen or anything, just boot and hang.
Thanks
Jesse
Comments
---begin------
ORG 0
hang: JMP hang
TIMES 510-($-$$) DB 0
DW 0xAA55
---finish-----
The ORG and TIMES stuff is to make sure the made file will be 510 bytes long (its NASM syntax)
the DW puts the hex values AA55 at the end.. Older BIOS'es check this.. if its there then BIOS knows its a valid boot sector. I have noticed that newer computers don't bother to check.
the JMP explains itself
so after compiling you have a file which is exactly 512 bytes long (the size of a sector on a diskette)
now all you gotta do is write the file to the first sector of the diskette... i use a program called FDVOL
Thanks
Jesse
: Here ya go...
: ---begin------
: ORG 0
: hang: JMP hang
: TIMES 510-($-$$) DB 0
: DW 0xAA55
: ---finish-----
: The ORG and TIMES stuff is to make sure the made file will be 510 bytes long (its NASM syntax)
: the DW puts the hex values AA55 at the end.. Older BIOS'es check this.. if its there then BIOS knows its a valid boot sector. I have noticed that newer computers don't bother to check.
: the JMP explains itself
: so after compiling you have a file which is exactly 512 bytes long (the size of a sector on a diskette)
: now all you gotta do is write the file to the first sector of the diskette... i use a program called FDVOL