Mercurial > hg > Members > mitsuki > haribote
changeset 4:8bfcd14edc47 default tip
merge
author | mir3636 |
---|---|
date | Tue, 16 Oct 2018 23:00:00 +0900 |
parents | 74b19f0bedc5 (current diff) 461420da09c6 (diff) |
children | |
files | Makefile |
diffstat | 2 files changed, 10 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Tue Oct 16 22:53:36 2018 +0900 +++ b/Makefile Tue Oct 16 23:00:00 2018 +0900 @@ -1,6 +1,7 @@ CLANG=/Users/mitsuki/workspace/llvm/CbC_build/bin/clang -target i386-pc-linux CSO=bootpack.c -OBJ=bootpack.o nasmfunc.o c/haribote-context.o +OBJ=bootpack.o nasmfunc.o +CBCOBJ=c/haribote-context.o # dependencies asmhead.bin : asmhead.asm
--- a/bootpack.c Tue Oct 16 22:53:36 2018 +0900 +++ b/bootpack.c Tue Oct 16 23:00:00 2018 +0900 @@ -3,13 +3,15 @@ void HariMain(void) { int i; - - for (i = 0xa0000; i <= 0xaffff; i++) { - _write_mem8(i,i & 0x0f); + char *p; + + for (i = 0xa0000; i <= 0xaffff; i++) { // iはVRAMのメモリを示している + p = (char *) i; + *p = i & 0x0f; // AND計算によって下4桁の値を代入している } -fin: - _io_hlt(); //これでnasmfunc.asmのio_hltが実行される - goto fin; + for (;;) { + _io_hlt(); //これでnasmfunc.asmのio_hltが実行される + } }