diff --git a/debug/boot.txt b/debug/boot.txt index 429323f..976530d 100644 --- a/debug/boot.txt +++ b/debug/boot.txt @@ -1,6 +1,7 @@ target remote localhost:1234 set disassembly-flavor att +symbol-file ./system/realmode/setup.sym set architecture i8086 -break *0x7c00 +break *0x90200 cont -clear *0x7c00 +clear *0x90200 diff --git a/debug/config.bochs b/debug/config.bochs index b3425b0..1af61a4 100644 --- a/debug/config.bochs +++ b/debug/config.bochs @@ -6,3 +6,4 @@ ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14 ata0-master: type=disk, mode=flat, translation=auto, path="./final/harddisk.img.final", cylinders=0, heads=0, spt=0, biosdetect=auto, model="Generic 1234" cpu: count=1, ips=20000000 mouse: enabled=1 +display_library: wx, options="gui_debug" diff --git a/debug/debug.sh b/debug/debug.sh index 6d23cfd..a1d3c5c 100755 --- a/debug/debug.sh +++ b/debug/debug.sh @@ -11,16 +11,16 @@ tmux splitw -v -p 50 tmux send-keys -t 5 "gdb --init-command=./debug/gdbinit -x $1" Enter tmux send-keys -t 3 "telnet 127.0.0.1 6666" Enter -tmux send-keys -t 5 "dashboard stack -output /dev/pts/6" Enter +tmux send-keys -t 5 "dashboard stack -output /dev/pts/4" Enter tmux send-keys -t 5 "dashboard threads -output /dev/null" Enter -tmux send-keys -t 5 "dashboard assembly -output /dev/pts/5" Enter -tmux send-keys -t 5 "dashboard registers -output /dev/pts/3" Enter -tmux send-keys -t 5 "dashboard expressions -output /dev/pts/8" Enter -tmux send-keys -t 5 "dashboard memory -output /dev/pts/8" Enter -tmux send-keys -t 5 "dashboard source -output /dev/pts/5" Enter -tmux send-keys -t 5 "dashboard history -output /dev/pts/10" Enter +tmux send-keys -t 5 "dashboard assembly -output /dev/pts/3" Enter +tmux send-keys -t 5 "dashboard registers -output /dev/pts/2" Enter +tmux send-keys -t 5 "dashboard expressions -output /dev/pts/6" Enter +tmux send-keys -t 5 "dashboard memory -output /dev/pts/6" Enter +tmux send-keys -t 5 "dashboard source -output /dev/pts/3" Enter +tmux send-keys -t 5 "dashboard history -output /dev/pts/7" Enter tmux send-keys -t 5 "dashboard threads -output /dev/null" Enter -tmux send-keys -t 5 "dashboard stack -output /dev/pts/6" Enter +tmux send-keys -t 5 "dashboard stack -output /dev/pts/4" Enter tmux new-window -t $session:1 -n scratch tmux select-window -t $session:0 tmux attach-session -t $session diff --git a/debug/system.txt b/debug/system.txt index af4026d..d423fb4 100644 --- a/debug/system.txt +++ b/debug/system.txt @@ -1,7 +1,8 @@ target remote localhost:1234 -set disassembly-flavor intel +set disassembly-flavor att set architecture i386 -symbol-file ./system/realmode/setup.sym +symbol-file ./system/system.sym +break start break system.c:50 cont clear system.c:50 diff --git a/final/harddisk.img.xz b/final/harddisk.img.xz index e71fb3c..d8eedbc 100644 Binary files a/final/harddisk.img.xz and b/final/harddisk.img.xz differ diff --git a/final/makeimage b/final/makeimage index 15b78b2..4cb10eb 100755 --- a/final/makeimage +++ b/final/makeimage @@ -8,7 +8,7 @@ echo ${lo} losetup -P ${lo} harddisk.img mkfs.ext2 ${lo}p1 mount ${lo}p1 /mnt -grub-install --no-floppy --install-modules="biosdisk part_msdos ext2 configfile normal linux vbe png gfxmenu video video_colors video_cirrus video_fb" --boot-directory=/mnt/boot ${lo} --target=i386-pc +grub-install --no-floppy --install-modules="biosdisk part_msdos ext2 configfile normal linux16 vbe png gfxmenu video video_colors video_cirrus video_fb" --boot-directory=/mnt/boot ${lo} --target=i386-pc echo -en "\ insmod ext2 insmod biosdisk @@ -22,7 +22,7 @@ set timeout=4\n\ set default=0\n\ menuentry "cos2000" {\n\ set root=(hd0,1)\n\ -linux /boot/system.sys\n +linux16 /boot/system.sys\n boot\n\ }" > /mnt/boot/grub/grub.cfg umount /mnt diff --git a/system/realmode/makefile b/system/realmode/makefile index 6e5e81b..946239d 100644 --- a/system/realmode/makefile +++ b/system/realmode/makefile @@ -1,5 +1,5 @@ -GCC=gcc -O0 -g -nostdinc -ffreestanding -fno-builtin -Wall -w -I ../../include -m16 -fomit-frame-pointer -fno-pie -no-pie -mno-mmx -mno-sse -mno-80387 -mno-fp-ret-in-387 -c -ASM=gcc -m16 -fomit-frame-pointer -fno-pie -no-pie -mno-mmx -mno-sse -mno-80387 -mno-fp-ret-in-387 -D__ASSEMBLY__ -I ../ -I ../../include -c -o +GCC=gcc -O0 -g -nostdinc -ffreestanding -fno-builtin -Wall -w -I ../../include -march=i386 -m16 -fomit-frame-pointer -fno-pie -no-pie -mno-mmx -mno-sse -mno-80387 -mno-fp-ret-in-387 -c +ASM=gcc -m16 -march=i386 -fomit-frame-pointer -fno-pie -no-pie -mno-mmx -mno-sse -mno-80387 -mno-fp-ret-in-387 -D__ASSEMBLY__ -I ../ -I ../../include -c -o LINK=ld -m elf_i386 -n CONVERT=dos2unix INDENT=indent -nhnl -l75 -ppi3 -ts8 -bls -nbc -di8 -nbad -nbap -nsob -i8 -bl -bli0 -ncdw -nce -cli8 -cbi0 -npcs -cs -saf -sai -saw -nprs -lp -npsl diff --git a/system/realmode/setup.c b/system/realmode/setup.c index 7c8a57d..df7eea4 100644 --- a/system/realmode/setup.c +++ b/system/realmode/setup.c @@ -354,6 +354,7 @@ void initpmode(u32 offset) void main(void) { showstr("Chargement de COS2000 - mode reel"); +waitchar(); /* initparams(); */ initmemory(); initkeyboard();