/************************************************************************/
/* CQBBEL GNU CC Common Control Software / (C) Toshio MURAI 2011, 2012	*/
/*      This is Free Software;   You can redistribute this software     */
/*      and/or modify it under the terms of the GNU General Public      */
/*      License version 3, or (at your option) any later version.       */
/************************************************************************/
/*	Terribely Tricky!!!	NO compatiblity with othe C compile		*/
/*	Never change the size of both array and the location.			*/
/*	Seems to be odd and should be exchange. but this is right for GCC.	*/

extern	void start(void);
extern	void interrupt(void);
//#define	FNOP	((fp)0xe1a00000)
//#define	FJMP	((fp)0xe59ff018)
void (*const vectorTable[])(void) = {	/* GO Address 0x00000020*/
	start,			// 0x20
	0,			// 0x24
	0,			// 0x28
	0,			// 0x2C
	0,			// 0x30
	0,			// 0x34
	interrupt,		// 0x38
	0,			// 0x3C
};

#define	NOP	0xe1a00000
#define	JMP	0xe59ff018
const long int instructionTable[]= {		/* GO Address 0x00000000 TOP Address */
	JMP,	//0x00:   e59ff018        ldr     pc, [pc, #24]   ; 20 <reset_vect
	NOP,	//0x04:   e1a00000        nop                     ; (mov r0, r0)
	NOP,	//0x08:   e1a00000        nop                     ; (mov r0, r0)
	NOP,	//0x0c:   e1a00000        nop                     ; (mov r0, r0)
	NOP,	//0x10:   e1a00000        nop                     ; (mov r0, r0)
	NOP,	//0x14:   e1a00000        nop                     ; (mov r0, r0)
	JMP,	//0x18:   e59ff018        ldr     pc, [pc, #24]   ; 38 <irq_vector
	NOP,	//0x1c:   e1a00000        nop                     ; (mov r0, r0)	
};

//	.text
//	.globl vector_table
//	.org 0
//##	Exception Vector Table
//instructionTable:
//	ldr	pc,  reset_vector
//	nop
//	nop
//	nop
//	nop
//	nop
//	ldr	pc,  irq_vector
//	nop
//vectortTable:
//reset_vector:
//	.long start
//	.long 0x00
//	.long 0x00
//	.long 0x00
//	.long 0x00
//	.long 0x00
//irq_vector:
//	.long interrupt
//	.long 0x00
