more optimization

This commit is contained in:
K. Lange 2018-03-06 15:22:05 +09:00 committed by Kevin Lange
parent 792c5dc0e9
commit 2e3279350e
2 changed files with 8 additions and 3 deletions

View File

@ -9,12 +9,11 @@ image.iso: stuff/boot/boot.sys
xorriso -as mkisofs -R -J -c boot/bootcat -b boot/boot.sys -no-emul-boot -boot-load-size 4 -o image.iso stuff
cstuff.o: cstuff.c
${KCC} -c -o cstuff.o cstuff.c
${KCC} -c -Os -o cstuff.o cstuff.c
boot.o: boot.s
yasm -f elf -o $@ $<
stuff/boot/boot.sys: boot.o cstuff.o link.ld
${KLD} -T link.ld -o $@ boot.o cstuff.o
#objcopy -j .text -O binary temp.elf $@

View File

@ -1,3 +1,5 @@
#define __DEBUG__
#ifdef __DEBUG__
unsigned short * textmemptr = (unsigned short *)0xB8000;
static void placech(unsigned char c, int x, int y, int attr) {
unsigned short *where;
@ -38,11 +40,15 @@ static void clear() {
}
}
}
#else
#define print(...)
#define clear()
#endif
int kmain() {
clear();
print("ToaruOS-NIH Bootloader v0.1\n\n");
print("Doing stuff.\n");
print("Scanning ATA devices.\n");
while (1);
}