diff --git a/iceOS.iso b/iceOS.iso new file mode 100644 index 0000000..4311141 Binary files /dev/null and b/iceOS.iso differ diff --git a/isodir/boot/grub/grub.cfg b/isodir/boot/grub/grub.cfg new file mode 100644 index 0000000..11f924c --- /dev/null +++ b/isodir/boot/grub/grub.cfg @@ -0,0 +1,7 @@ +set timeout = 0 +set default = 0 + +menuentry "iceOS" { + multiboot2 /boot/iceOS.bin + boot +} diff --git a/isodir/boot/iceOS.bin b/isodir/boot/iceOS.bin new file mode 100755 index 0000000..bec8ff8 Binary files /dev/null and b/isodir/boot/iceOS.bin differ diff --git a/kernel/cpu/ports.asm b/kernel/cpu/ports.asm index 271c44a..0d9a86e 100644 --- a/kernel/cpu/ports.asm +++ b/kernel/cpu/ports.asm @@ -16,6 +16,6 @@ outb: ret inb: - mov dx, [esp] + mov dx, [esp + 4] in al, dx ret \ No newline at end of file diff --git a/kernel/drivers/timer.c b/kernel/drivers/timer.c index 78746b3..5375cac 100644 --- a/kernel/drivers/timer.c +++ b/kernel/drivers/timer.c @@ -12,6 +12,7 @@ static void timer_callback(registers_t regs) { uint8_t buf[8]; itoa(tick, buf, 10); kprint((uint8_t*)"Time: "); + uitoa(tick, buf, 10); kprint((uint8_t*)buf); kprint((uint8_t*)"\n"); diff --git a/kernel/libc/string.c b/kernel/libc/string.c index 1670b35..7cb8c57 100644 --- a/kernel/libc/string.c +++ b/kernel/libc/string.c @@ -52,7 +52,7 @@ uint8_t *uitoa(uint32_t val, uint8_t *buf, uint32_t radix) { uint32_t start = i; uint32_t x = val; - if(radix == 10) { + if(radix == 16) { buf[i++] = '0'; buf[i++] = 'x'; start = i; @@ -67,7 +67,7 @@ uint8_t *uitoa(uint32_t val, uint8_t *buf, uint32_t radix) { } while(x /= radix); uint8_t *s = buf+start; - uint8_t *e = buf+(i+1); + uint8_t *e = buf+(i-1); while(s < e) { uint8_t t = *s;