Wot's wrong with this!
Posted: Fri May 20, 2005 5:43 am
Hi all
Could anybody tell me what is wrong with this boot sector.
;;;OS Boot
org 0x7c00
use16
begin: jmp Start
nop
OEM_ID: db '********'
BytesPerSector: dw 0x0200
SectorsPerCluster: db 0x01
ReservedSectors: dw 0x0001
TotalFATS: db 0x02
MaxRootEntries: dw 0x0e00
TotalSectors: dw 0x0b40
MediaDesciptor: db 0xf0
SectorsPerFAT: dw 0x0009
SectorsPerTrack: dw 0x0012
SidesOnDisk: dw 0x0002
HiddenSectors: dd 0x00000000
TotalSectorsLarge: dd 0x00000000
DriveNumber: db 0x00
Flags: db 0x00
Signature: db 0x29
VolumeID: dd 0xffffffff
VolumeLabel: db '************'
SystemID: db 'FAT12 '
Start:
xor ax,ax
cli
mov ss,ax
mov sp,0x7c00
mov ss,ax
sti
;;;Do some basic checks
;;See if we have an AMD x64
;;;See if we have VBE v3.0
mov ax,0x4f02
mov bx,0x003f
int 0x10
mov si,STitle
call WriteStr
;;;Display graphics card memory
;;;Display useable memory above 1 meg - memory required for the display
Self: jmp Self
WriteChar:
mov ah,0x0e
int 0x10
ret
WriteStr:
mov al,byte[si]
call WriteChar
inc si
cmp byte[si],0x00
je Exit1
jmp WriteStr
Exit1: ret
STitle: db 'Just a test!!',0x00
rb begin+512-2-$
BootSig: dw 0xaa55
Could just be WinXp but when I try to get info from the 'dir' command everything is displayed except that it says there is no
volume label ???
Could anybody tell me what is wrong with this boot sector.
;;;OS Boot
org 0x7c00
use16
begin: jmp Start
nop
OEM_ID: db '********'
BytesPerSector: dw 0x0200
SectorsPerCluster: db 0x01
ReservedSectors: dw 0x0001
TotalFATS: db 0x02
MaxRootEntries: dw 0x0e00
TotalSectors: dw 0x0b40
MediaDesciptor: db 0xf0
SectorsPerFAT: dw 0x0009
SectorsPerTrack: dw 0x0012
SidesOnDisk: dw 0x0002
HiddenSectors: dd 0x00000000
TotalSectorsLarge: dd 0x00000000
DriveNumber: db 0x00
Flags: db 0x00
Signature: db 0x29
VolumeID: dd 0xffffffff
VolumeLabel: db '************'
SystemID: db 'FAT12 '
Start:
xor ax,ax
cli
mov ss,ax
mov sp,0x7c00
mov ss,ax
sti
;;;Do some basic checks
;;See if we have an AMD x64
;;;See if we have VBE v3.0
mov ax,0x4f02
mov bx,0x003f
int 0x10
mov si,STitle
call WriteStr
;;;Display graphics card memory
;;;Display useable memory above 1 meg - memory required for the display
Self: jmp Self
WriteChar:
mov ah,0x0e
int 0x10
ret
WriteStr:
mov al,byte[si]
call WriteChar
inc si
cmp byte[si],0x00
je Exit1
jmp WriteStr
Exit1: ret
STitle: db 'Just a test!!',0x00
rb begin+512-2-$
BootSig: dw 0xaa55
Could just be WinXp but when I try to get info from the 'dir' command everything is displayed except that it says there is no
volume label ???