# ***************************
# Cottontail Bootloader v0.02
# ***************************
# example cbl_conf.txt modules script
# by: Frank Millea
#
# all commands are case-sensitive
# command usage:
# 1. load [filename] [address]
# 2. version [version number]
# 3. message [message text]
# 4. pause
# 5. page_align_on
# 6. page_align_off
#
# Comments may appear anywhere, and are prefixed with a '#'. The bootloader 
# ignores all text after a comment character to the next line.
#
# The filename must be in the 8.3 format, as long filenames are currently 
# unsupported. The address is the linear address (in hex) to load the module at.
# For example, 10000 will load a module at 1000:0000. If you use "*", then the
# module will be loaded at the next byte address following the previous module.
# If it is the first module, the first available byte address (0x10000 linear)
# will be used, since the bootloader occupies the first 64KB while it loads the
# modules. The first module is the one that gets booted with a long jump to its
# location.
#
# Right before the jump is performed, the loader sets up a pointer to
# the 'mods' array, which describes which modules were loaded, and where.
# The pointer is in ES:BX. The mod_t structure is defined as follows (in order):
# - DWORD: linear start address of module
# - DWORD: size of module
# - 13-byte null-terminated character array: filename of module
# Note that the bootloader itself is always the first module. To determine
# the exact number of modules loaded, just parse this array until you come
# across a module name of "", or you exceed the max number of modules,
# which is currently 10 at the time of this writing.

version 0.02

# This should be the first declaration in the script, which tells the bootloader
# what version it should conform to.

message Welcome to the cbl_conf.txt example modules script!

# Messages may appear anywhere in the script, and are printed out to the screen
# in the order in which they are found. Messages cannot exceed 80 characters.
# If appearing on a command line, messages must have at least one space between
# themselves and the command itself. Messages are ignored inside of a message
# string.

page_align_on

# The page_align_on and page_align_off commands turn module page alignment on and
# off. If page alignment is enabled, the base address for the module will be
# aligned on a 4KB address, otherwise it won't. You can use these commands as
# much as you want, even to mix alignment and non-alignment of different modules.

load example.bin *
message Loaded example.bin successfully!

#load ata_drv.o 30000
#message ATA driver
#load flop_drv.o 38000
#message Floppy driver
#load fatfsdrv.o 3A000
#message FAT filesystem driver

#message loading apps...
#load tetris.o *
#message Tetris
#load my_game.o *
#message Game

message Done!
pause

