view bootpack.c @ 2:461420da09c6

harib01d
author mir3636
date Fri, 12 Oct 2018 17:56:57 +0900
parents 1a23828953f2
children
line wrap: on
line source

extern void _io_hlt(void);
extern void _write_mem8(int addr, int data);

void HariMain(void) {
    int i;
    char *p;

    for (i = 0xa0000; i <= 0xaffff; i++) { // iはVRAMのメモリを示している
        p = (char *) i;
        *p = i & 0x0f; // AND計算によって下4桁の値を代入している
    }

    for (;;) {
        _io_hlt(); //これでnasmfunc.asmのio_hltが実行される
    }

}