59 lines
2.3 KiB
NASM
59 lines
2.3 KiB
NASM
; Define Fat12 header
|
|
bdb_oem: db 'MSWIN4.1' ; ignore
|
|
bdb_bytes_per_sector: dw 200h ; = 512d
|
|
bdb_sectors_per_cluster: db 01h ; sector = cluster
|
|
bdb_reserved_sectors: dw 01h
|
|
bdb_fat_count: db 02h ; We've got a fat1 and fat2
|
|
bdb_dir_entries_count: dw 0E0h ; Maximum number of root directory entries
|
|
bdb_total_sectors: dw 0B40h ; = 2880d
|
|
bdb_media_descriptor_type: db 0F0h ; ignore
|
|
bdb_sectors_per_fat: dw 09h
|
|
bdb_sectors_per_track: dw 12h ; = 18d
|
|
bdb_number_of_heads: dw 02h ; top and bottom of the floppy disk
|
|
bdb_hidden_sectors: dd 0 ; ignore
|
|
bdb_large_sector_count: dd 0 ; total sector count for fat32 (0 for fat12 or fat16)
|
|
|
|
; extended boot record
|
|
ebr_drive_number: db 0 ; ignore
|
|
db 0 ; ignore
|
|
ebr_signature: db 29h ; boot signature, indicates that the next three fields are present (0x29)
|
|
ebr_volume_id: db 12h, 34h, 56h, 78h ; unique id for volume tracking
|
|
ebr_volume_label: db 'CRAWOS0.0.6' ; must be 11 bytes
|
|
ebr_system_id: db 'FAT12 ' ; must be 8 bytes
|
|
|
|
|
|
fat12_file_name: db ' ' ; 11 free bytes to store a filename in
|
|
boot_message: db 'OK] Kernel successfully loaded!\n\n', 0
|
|
user_input: times 20 db 0
|
|
prompt_length: db 20
|
|
prompt: db 'sh > ', 0
|
|
help_string: db 'HELP', 0
|
|
clear_string: db 'CLEAR', 0
|
|
reboot_string: db 'REBOOT', 0
|
|
pong_string: db 'PONG', 0
|
|
cat_string: db 'CAT', 0
|
|
ls_string: db 'LS', 0
|
|
help_text: db 'This is for Cowards:\n"LS" to list the directory,\n"CAT" to output the contents of a file,\n"HELP" for this helpful text,\n"CLEAR" to clear the screen,\n"REBOOT" or esc to reboot\n', 0
|
|
command_result_text: db 'You typed: ', 0
|
|
unknown_command: db 'Error: Unkown Command..\n ', 0
|
|
|
|
; Disk operations
|
|
disk_read_fail: db 'Error: Could not read disk\n', 0
|
|
file_not_found: db 'File not found\n', 0
|
|
too_long_filename: db 'Filename too long for Fat12\n', 0
|
|
file_found: db 'File found\n', 0
|
|
loading_root: db 'Loading root diretory\n', 0
|
|
read_only: db 'Read Only', 0 ; 1
|
|
hidden: db ' Hidden ', 0 ; 2
|
|
system: db ' System ', 0 ; 4
|
|
volume: db ' Volume ', 0 ; 8
|
|
directory: db 'Directory', 0 ; 10
|
|
archive: db ' Archive ', 0 ; 20
|
|
file_name_length: db 0
|
|
file_cluster: dw 0
|
|
file_length: dd 0
|
|
read_write_flag: db 02
|
|
empty_byte: db 0
|
|
empty_word: dw 0
|
|
empty_dword: dd 0
|