Parcourir la source

2.325u-int: now syscall() and die() can also display messages now

rain il y a 5 ans
Parent
commit
7a0cd05f7a
3 fichiers modifiés avec 5 ajouts et 5 suppressions
  1. 1 1
      init/head.S
  2. 0 1
      kernel/graphic.c
  3. 4 3
      kernel/int.c

+ 1 - 1
init/head.S

@@ -26,7 +26,7 @@
 /* #NO! it is BRIGHT+RED (well...) */
 /* we are in VGA mode now */
 
-#define RED $0x04
+#define RED $0x00ff0000
 
 /* 
  * arguments in long-mode: 

+ 0 - 1
kernel/graphic.c

@@ -117,7 +117,6 @@ void putc(char c, __uint32_t fg, __uint32_t bg) {
 		}
 	}
 
-
 	x += 8;
 
 	if (x >= VGA_X) {

+ 4 - 3
kernel/int.c

@@ -86,13 +86,14 @@ void set_gate(struct idt_entry *entry, char attr, char ist, void *addr) {
 
 
 void syscall(void) {
-	print(0x04, 0x00, "int #0x80: system call. \n");
-	for (;;);
+	print(0x00ff0000, 0x00, "int #0x80: system call. \n");
+
+	return;
 }
 
 
 void die(char *s, __uint64_t *rsp, char nr) {
-	print(0x04, 0x00, "int #%b: %s. \n");
+	print(0x00ff0000, 0x00, "int #%b: %s. \n");
 
 	for (;;);
 }