changeset 2:461420da09c6

harib01d
author mir3636
date Fri, 12 Oct 2018 17:56:57 +0900
parents 70754edc1f50
children 8bfcd14edc47
files bootpack.c
diffstat 1 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/bootpack.c	Wed Oct 10 18:50:50 2018 +0900
+++ b/bootpack.c	Fri Oct 12 17:56:57 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が実行される
+    }
 
 }