hello.c 619 Bytes
#define DEV_CNSLE_TX_INTR            0x01 /* intr enable / state bits */
#define DEV_CNSLE_RX_INTR            0x02
 
typedef unsigned int DevRegister;
typedef struct DevConsoleRegisters {
	DevRegister intr_status;      /* r: intr state / w: intr enable */
	DevRegister data;             /* r: current char / w: send char */
} DevConsoleRegisters;

#define K1BASE	(0xA0000000)

main(int argc, char* argv) {
    volatile DevConsoleRegisters* console = (DevConsoleRegisters*)(K1BASE+0x01e01000);
    const char* s = "hello world\r\n";
    char* p;

    for(p = s; *p; p++) {
    	console->data = *p;
    }
    for(;;) ;
}