Line 1... |
Line 1... |
/*-------------------------------------------------------------------
|
/*-------------------------------------------------------------------
|
-- TITLE: M-lite CPU test code
|
-- TITLE: Plasma CPU test code
|
-- AUTHOR: Steve Rhoads (rhoadss@yahoo.com)
|
-- AUTHOR: Steve Rhoads (rhoadss@yahoo.com)
|
-- DATE CREATED: 4/21/01
|
-- DATE CREATED: 4/21/01
|
-- FILENAME: test.c
|
-- FILENAME: test.c
|
-- PROJECT: M-lite CPU core
|
-- PROJECT: Plasma CPU core
|
-- COPYRIGHT: Software placed into the public domain by the author.
|
-- COPYRIGHT: Software placed into the public domain by the author.
|
-- Software 'as is' without warranty. Author liable for nothing.
|
-- Software 'as is' without warranty. Author liable for nothing.
|
-- DESCRIPTION:
|
-- DESCRIPTION:
|
-- The executable image of this file is used as input to the VHDL.
|
-- The executable image of this file is used as input to the VHDL.
|
--
|
--
|
Line 18... |
Line 18... |
--
|
--
|
-- The interrupt vector is set to address 0x30.
|
-- The interrupt vector is set to address 0x30.
|
--------------------------------------------------------------------*/
|
--------------------------------------------------------------------*/
|
#ifdef MLITE
|
#ifdef MLITE
|
#undef putchar
|
#undef putchar
|
// The M-lite CPU VHDL supports a virtual UART. All character writes
|
// The Plasma CPU VHDL supports a virtual UART. All character writes
|
// to address 0xffff will be stored in the file "output.txt".
|
// to address 0xffff will be stored in the file "output.txt".
|
#define putchar(C) *(volatile unsigned char*)0xffff=(unsigned char)(C)
|
#define putchar(C) *(volatile unsigned char*)0xffff=(unsigned char)(C)
|
void isr_enable(int);
|
void isr_enable(int);
|
#else
|
#else
|
#define isr_enable(A)
|
#define isr_enable(A)
|
#endif
|
#endif
|
|
|
char text[]="Testing the M-lite core.\n";
|
char text[]="Testing the Plasma core.\n";
|
char buf[20];
|
char buf[20];
|
int xyz=0xbadbeef;
|
int xyz=0xbadbeef;
|
int abc;
|
int abc;
|
|
|
char *strcpy2(char *s, const char *t)
|
char *strcpy2(char *s, const char *t)
|