more optimization
This commit is contained in:
parent
792c5dc0e9
commit
2e3279350e
3
Makefile
3
Makefile
@ -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 $@
|
||||
|
||||
|
8
cstuff.c
8
cstuff.c
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user