2008-12-11 20:30:53 +00:00
|
|
|
/*
|
2006-04-26 15:08:19 +00:00
|
|
|
* Creation Date: <2003/12/19 00:20:11 samuel>
|
|
|
|
|
* Time-stamp: <2004/01/07 19:19:14 samuel>
|
2008-12-11 20:30:53 +00:00
|
|
|
*
|
2006-04-26 15:08:19 +00:00
|
|
|
* <kernel.h>
|
2008-12-11 20:30:53 +00:00
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*
|
2006-04-26 15:08:19 +00:00
|
|
|
* Copyright (C) 2003, 2004 Samuel Rydh (samuel@ibrium.se)
|
|
|
|
|
* Stefan Reinauer (stepan@openbios.org)
|
2008-12-11 20:30:53 +00:00
|
|
|
*
|
2006-04-26 15:08:19 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
|
* version 2
|
2008-12-11 20:30:53 +00:00
|
|
|
*
|
2006-04-26 15:08:19 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef _H_KERNEL
|
|
|
|
|
#define _H_KERNEL
|
|
|
|
|
|
2010-03-14 14:21:02 +00:00
|
|
|
#include "kernel/stack.h"
|
2006-04-26 15:08:19 +00:00
|
|
|
#include "asm/io.h"
|
|
|
|
|
|
2009-11-15 21:03:51 +00:00
|
|
|
/* Interrupt status */
|
|
|
|
|
#define FORTH_INTSTAT_CLR 0x0
|
|
|
|
|
#define FORTH_INTSTAT_STOP 0x1
|
|
|
|
|
#define FORTH_INTSTAT_DBG 0x2
|
|
|
|
|
|
|
|
|
|
extern volatile int interruptforth;
|
2006-04-26 15:08:19 +00:00
|
|
|
extern int enterforth( xt_t xt );
|
|
|
|
|
extern void panic(const char *error) __attribute__ ((noreturn));
|
|
|
|
|
|
2008-12-14 12:54:23 +00:00
|
|
|
extern xt_t findword(const char *s1);
|
2006-04-26 15:08:19 +00:00
|
|
|
extern void modules_init( void );
|
|
|
|
|
|
|
|
|
|
/* arch kernel hooks */
|
2010-03-25 21:14:00 +00:00
|
|
|
extern void exception(cell no);
|
2006-04-26 15:08:19 +00:00
|
|
|
|
|
|
|
|
#ifdef FCOMPILER
|
|
|
|
|
extern void include_file( const char *str );
|
|
|
|
|
extern void encode_file( const char *str );
|
|
|
|
|
extern int get_inputbyte( void );
|
2010-03-25 21:14:00 +00:00
|
|
|
extern void put_outputbyte( int c );
|
2006-04-26 15:08:19 +00:00
|
|
|
#endif
|
|
|
|
|
|
2008-11-30 13:42:11 +00:00
|
|
|
#ifndef BOOTSTRAP
|
2006-04-26 15:08:19 +00:00
|
|
|
#undef putchar
|
|
|
|
|
#undef getchar
|
|
|
|
|
|
|
|
|
|
extern int putchar( int ch );
|
|
|
|
|
extern int getchar( void );
|
2008-11-30 13:42:11 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
extern int availchar( void );
|
2006-04-26 15:08:19 +00:00
|
|
|
|
|
|
|
|
#endif /* _H_KERNEL */
|