Hogwarts Wand Docs: ../sw/kernel.h

Wand Sourcecode: ../sw/kernel.h

//
// kernel.h - kernel constants
// 
// Copyright (C) 2006  Nathan (Acorn) Pooley
// 
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// version 2 as published by the Free Software Foundation.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License (gpl.txt) for more details. 
// 
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
// 
// You can contact the author, Nathan (Acorn) Pooley, by writing
// to Nathan (Acorn) Pooley, 949 Buckeye Drive, Sunnyvale, CA  94086, USA
// or through the form at http://www.rawbw.com/~acorn/wand/feedback.html
//
#ifndef WAND_KERNEL_H_
#define WAND_KERNEL_H_
//
//
//#@DOC@ kernel constants for inclusion by c programs

//###########################################################################
//############################### DEFINES ###################################
//###########################################################################

//
// Address of header
//
#define KERNEL_HEADER_ADDR          0x0010
#define KERNEL_LOADER_BEGIN         0x3000
#define KERNEL_LOADER_NEW_KERNEL    0x4000

//
// Offsets from start of app to app entry points
//
#define KERNEL_APP_MAIN_OFFSET          0x0
#define KERNEL_APP_ISR_LOW_OFFSET       0x4
#define KERNEL_APP_ISR_HIGH_OFFSET      0x30

//
// Minimum valiod kernel version (otherwise will not work with loader)
//
#define KERNEL_MIN_VERSION              13

//###########################################################################
//############################### TYPEDEFS ##################################
//###########################################################################

typedef unsigned char KernByte;

//===========================================================================
// kernelHeader - this appears at address KERNADDR_HEADER
//===========================================================================
typedef struct kernelHeaderRec {
    KernByte    xa5;                // should be 0xa5
    KernByte    x5a;                // should be 0x5a
    KernByte    version;            // kernel version
    KernByte    pad0;               // unused
    KernByte    kk_app_main_high;   // high byte of kk_app_main
    KernByte    kk_app_main_low;    // low  byte of kk_app_main
    KernByte    pad1;               // unused
    KernByte    pad2;               // unused
} kernelHeader;



#endif // WAND_KERNEL_H_

This file Copyright (C) 2006 by Nathan (Acorn) Pooley
Go to TOP Wand page
Go to Acorn's personal webpage
Go to Hogwarts website: www.gotohogwarts.com
Snout: www.snout.org/game
Gadgets of Justice Unlimited
Snout GC (Wiki)
Snout Wiki
File created by do_doc at Wed May 30 03:23:42 PDT 2007