From c90df8df09daa1cbffca1751eaf7feaf12d94955 Mon Sep 17 00:00:00 2001 From: Imanol-Mikel Barba Sabariego Date: Sun, 30 Mar 2014 00:16:03 +0000 Subject: [PATCH] --- Makefile | 2 +- bochsout | 346 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------------------------------------------------------------------------------------------------------- bochsrc | 9 +++++++++ bochsrc.txt | 8 -------- boot.asm | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------- boot.bin | Bin 512 -> 0 bytes floppy.img | Bin 512 -> 0 bytes 7 files changed, 257 insertions(+), 217 deletions(-) create mode 100644 bochsrc delete mode 100644 bochsrc.txt diff --git a/Makefile b/Makefile index fe69654..8a72960 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ TARGETS = floppy.img boot.bin boot.bin: boot.asm nasm boot.asm -f bin -o boot.bin - dd if=boot.bin of=floppy.img bs=512 + dd if=boot.bin of=floppy.img bs=512 count=1 conv=notrunc floppy.img: dd if=/dev/zero of=floppy.img bs=512 count=2880 diff --git a/bochsout b/bochsout index 6019e6b..07dea98 100644 --- a/bochsout +++ b/bochsout @@ -1,230 +1,254 @@ -00000000000i[ ] Bochs x86 Emulator 2.4.6 -00000000000i[ ] Build from CVS snapshot, on February 22, 2011 -00000000000i[ ] Compiled at Jun 8 2013, 05:16:39 +00000000000i[ ] Bochs x86 Emulator 2.6.2 +00000000000i[ ] Built from SVN snapshot on May 26, 2013 +00000000000i[ ] Compiled on Mar 30 2014 at 00:00:38 00000000000i[ ] System configuration 00000000000i[ ] processors: 1 (cores=1, HT threads=1) 00000000000i[ ] A20 line support: yes +00000000000i[ ] IPS is set to 4000000 00000000000i[ ] CPU configuration +00000000000i[ ] SMP support: yes, quantum=16 00000000000i[ ] level: 6 -00000000000i[ ] SMP support: no -00000000000i[ ] APIC support: yes +00000000000i[ ] APIC support: xapic 00000000000i[ ] FPU support: yes 00000000000i[ ] MMX support: yes 00000000000i[ ] 3dnow! support: no 00000000000i[ ] SEP support: yes 00000000000i[ ] SSE support: sse2 -00000000000i[ ] XSAVE support: no +00000000000i[ ] XSAVE support: no 00000000000i[ ] AES support: no 00000000000i[ ] MOVBE support: no +00000000000i[ ] ADX support: no 00000000000i[ ] x86-64 support: yes 00000000000i[ ] 1G paging support: no -00000000000i[ ] VMX support: no +00000000000i[ ] MWAIT support: yes +00000000000i[ ] AVX support: no 00000000000i[ ] Optimization configuration -00000000000i[ ] RepeatSpeedups support: yes -00000000000i[ ] Trace cache support: yes -00000000000i[ ] Fast function calls: yes +00000000000i[ ] RepeatSpeedups support: no +00000000000i[ ] Fast function calls: no +00000000000i[ ] Handlers Chaining speedups: no 00000000000i[ ] Devices configuration -00000000000i[ ] ACPI support: yes 00000000000i[ ] NE2000 support: yes 00000000000i[ ] PCI support: yes, enabled=yes 00000000000i[ ] SB16 support: yes 00000000000i[ ] USB support: yes -00000000000i[ ] VGA extension support: vbe -00000000000i[MEM0 ] allocated memory at 0xb4188008. after alignment, vector=0xb4189000 +00000000000i[ ] VGA extension support: vbe +00000000000i[MEM0 ] allocated memory at 0x7ff291e01010. after alignment, vector=0x7ff291e02000 00000000000i[MEM0 ] 32,00MB 00000000000i[MEM0 ] mem block size = 0x00100000, blocks=32 -00000000000i[MEM0 ] rom at 0xfffe0000/131072 ('/usr/share/bochs/BIOS-bochs-latest') -00000000000i[MEM0 ] rom at 0xc0000/41472 ('/usr/share/bochs/VGABIOS-lgpl-latest') -00000000000i[ ] lt_dlhandle is 0xa4bcbd8 -00000000000i[PLGIN] loaded plugin libbx_cmos.so -00000000000i[ ] lt_dlhandle is 0xa4bd1f8 -00000000000i[PLGIN] loaded plugin libbx_dma.so -00000000000i[ ] lt_dlhandle is 0xa4bd830 -00000000000i[PLGIN] loaded plugin libbx_pic.so -00000000000i[ ] lt_dlhandle is 0xa4bdd28 -00000000000i[PLGIN] loaded plugin libbx_pit.so -00000000000i[ ] lt_dlhandle is 0xa4be368 -00000000000i[PLGIN] loaded plugin libbx_vga.so -00000000000i[ ] lt_dlhandle is 0xa4be768 +00000000000i[MEM0 ] rom at 0xfffe0000/131072 ('/usr/local/share/bochs/BIOS-bochs-latest') +00000000000i[ ] lt_dlhandle is 0xd57760 00000000000i[PLGIN] loaded plugin libbx_hdimage.so -00000000000i[ ] lt_dlhandle is 0xa4becf8 -00000000000i[PLGIN] loaded plugin libbx_floppy.so -00000000000i[ ] lt_dlhandle is 0xa4bf4c8 -00000000000i[PLGIN] loaded plugin libbx_soundmod.so -00000000000i[ ] lt_dlhandle is 0xa4bfa58 +00000000000i[ ] lt_dlhandle is 0xd58220 00000000000i[PLGIN] loaded plugin libbx_pci.so -00000000000i[ ] lt_dlhandle is 0xa4c0168 +00000000000i[ ] lt_dlhandle is 0xd58b10 00000000000i[PLGIN] loaded plugin libbx_pci2isa.so -00000000000i[ ] lt_dlhandle is 0xa4c07c8 +00000000000i[ ] lt_dlhandle is 0xd59650 +00000000000i[PLGIN] loaded plugin libbx_usb_uhci.so +00000000000i[ ] lt_dlhandle is 0xd5bcf0 00000000000i[PLGIN] loaded plugin libbx_usb_common.so -00000000000i[ ] lt_dlhandle is 0xa4c0d18 -00000000000i[PLGIN] loaded plugin libbx_unmapped.so -00000000000i[ ] lt_dlhandle is 0xa4c11a8 -00000000000i[PLGIN] loaded plugin libbx_biosdev.so -00000000000i[ ] lt_dlhandle is 0xa4c1778 -00000000000i[PLGIN] loaded plugin libbx_speaker.so -00000000000i[ ] lt_dlhandle is 0xa4c1c60 -00000000000i[PLGIN] loaded plugin libbx_extfpuirq.so -00000000000i[ ] lt_dlhandle is 0xa4c2190 -00000000000i[PLGIN] loaded plugin libbx_gameport.so -00000000000i[ ] lt_dlhandle is 0xa4c2680 -00000000000i[PLGIN] loaded plugin libbx_pci_ide.so -00000000000i[ ] lt_dlhandle is 0xa4c2cc0 +00000000000i[ ] lt_dlhandle is 0xd5c690 00000000000i[PLGIN] loaded plugin libbx_acpi.so -00000000000i[ ] lt_dlhandle is 0xa4c3300 +00000000000i[ ] lt_dlhandle is 0xd5d080 +00000000000i[PLGIN] loaded plugin libbx_cmos.so +00000000000i[ ] lt_dlhandle is 0xd5d9a0 +00000000000i[PLGIN] loaded plugin libbx_dma.so +00000000000i[ ] lt_dlhandle is 0xd5e420 +00000000000i[PLGIN] loaded plugin libbx_pic.so +00000000000i[ ] lt_dlhandle is 0xd5ed10 +00000000000i[PLGIN] loaded plugin libbx_pit.so +00000000000i[ ] lt_dlhandle is 0xd5f790 +00000000000i[PLGIN] loaded plugin libbx_floppy.so +00000000000i[ ] lt_dlhandle is 0xd60470 +00000000000i[PLGIN] loaded plugin libbx_vga.so +00000000000i[ ] lt_dlhandle is 0xd5fea0 00000000000i[PLGIN] loaded plugin libbx_ioapic.so -00000000000i[ ] lt_dlhandle is 0xa4c38c0 +00000000000i[ ] lt_dlhandle is 0xd61670 00000000000i[PLGIN] loaded plugin libbx_keyboard.so -00000000000i[ ] lt_dlhandle is 0xa4c3ed0 +00000000000i[ ] lt_dlhandle is 0xd62050 00000000000i[PLGIN] loaded plugin libbx_harddrv.so -00000000000i[ ] lt_dlhandle is 0xa4d5b38 -00000000000i[PLGIN] loaded plugin libbx_serial.so -00000000000i[ ] lt_dlhandle is 0xa4d6678 -00000000000i[PLGIN] loaded plugin libbx_parallel.so +00000000000i[ ] lt_dlhandle is 0xd61330 +00000000000i[PLGIN] loaded plugin libbx_pci_ide.so +00000000000i[PLGIN] init_dev of 'pci' plugin device by virtual method +00000000000i[DEV ] i440FX PMC present at device 0, function 0 +00000000000i[PLGIN] init_dev of 'pci2isa' plugin device by virtual method +00000000000i[DEV ] PIIX3 PCI-to-ISA bridge present at device 1, function 0 +00000000000i[PLGIN] init_dev of 'cmos' plugin device by virtual method 00000000000i[CMOS ] Using local time for initial clock -00000000000i[CMOS ] Setting initial clock to: Fri Mar 28 20:48:54 2014 (time0=1396036134) +00000000000i[CMOS ] Setting initial clock to: Sun Mar 30 01:31:04 2014 (time0=1396139464) +00000000000i[PLGIN] init_dev of 'dma' plugin device by virtual method 00000000000i[DMA ] channel 4 used by cascade +00000000000i[PLGIN] init_dev of 'pic' plugin device by virtual method +00000000000i[PLGIN] init_dev of 'pit' plugin device by virtual method +00000000000i[PLGIN] init_dev of 'floppy' plugin device by virtual method 00000000000i[DMA ] channel 2 used by Floppy Drive 00000000000i[FDD ] fd0: 'floppy.img' ro=0, h=2,t=80,spt=18 -00000000000i[PCI ] 440FX Host bridge present at device 0, function 0 -00000000000i[PCI ] PIIX3 PCI-to-ISA bridge present at device 1, function 0 -00000000000i[VGA ] interval=50000 -00000000000i[MEM0 ] Register memory access handlers: 0x00000000000a0000 - 0x00000000000bffff -00000000000i[MEM0 ] Register memory access handlers: 0x00000000e0000000 - 0x00000000e0ffffff -00000000000i[VGA ] VBE Bochs Display Extension Enabled -00000000000i[PLGIN] init_dev of 'unmapped' plugin device by virtual method -00000000000i[PLGIN] init_dev of 'biosdev' plugin device by virtual method -00000000000i[PLGIN] init_dev of 'speaker' plugin device by virtual method -00000000000i[SPEAK] Failed to open /dev/console: Resource temporarily unavailable -00000000000i[SPEAK] Deactivating beep on console -00000000000i[PLGIN] init_dev of 'extfpuirq' plugin device by virtual method -00000000000i[PLGIN] init_dev of 'gameport' plugin device by virtual method -00000000000i[PLGIN] init_dev of 'pci_ide' plugin device by virtual method -00000000000i[PCI ] PIIX3 PCI IDE controller present at device 1, function 1 +00000000000i[PLGIN] init_dev of 'vga' plugin device by virtual method +00000000000i[MEM0 ] Register memory access handlers: 0x0000000a0000 - 0x0000000bffff +00000000000i[VGA ] interval=200000 +00000000000i[MEM0 ] Register memory access handlers: 0x0000e0000000 - 0x0000e0ffffff +00000000000i[BXVGA] VBE Bochs Display Extension Enabled +00000000000i[XGUI ] test_alloc_colors: 16 colors available out of 16 colors tried +00000000000i[XGUI ] font 8 wide x 16 high, display depth = 24 +00000000000i[MEM0 ] rom at 0xc0000/41472 ('/usr/local/share/bochs/VGABIOS-lgpl-latest') 00000000000i[PLGIN] init_dev of 'acpi' plugin device by virtual method -00000000000i[PCI ] ACPI Controller present at device 1, function 3 +00000000000i[DEV ] ACPI Controller present at device 1, function 3 00000000000i[PLGIN] init_dev of 'ioapic' plugin device by virtual method 00000000000i[IOAP ] initializing I/O APIC -00000000000i[MEM0 ] Register memory access handlers: 0x00000000fec00000 - 0x00000000fec00fff +00000000000i[MEM0 ] Register memory access handlers: 0x0000fec00000 - 0x0000fec00fff +00000000000i[IOAP ] IOAPIC enabled (base address = 0xfec00000) 00000000000i[PLGIN] init_dev of 'keyboard' plugin device by virtual method -00000000000i[KBD ] will paste characters every 1000 keyboard ticks +00000000000i[KBD ] will paste characters every 400 keyboard ticks 00000000000i[PLGIN] init_dev of 'harddrv' plugin device by virtual method 00000000000i[HD ] Using boot sequence floppy, none, none 00000000000i[HD ] Floppy boot signature check is enabled -00000000000i[PLGIN] init_dev of 'serial' plugin device by virtual method -00000000000i[SER ] com1 at 0x03f8 irq 4 +00000000000i[PLGIN] init_dev of 'pci_ide' plugin device by virtual method +00000000000i[DEV ] PIIX3 PCI IDE controller present at device 1, function 1 +00000000000i[PLGIN] init_dev of 'unmapped' plugin device by virtual method +00000000000i[PLGIN] init_dev of 'biosdev' plugin device by virtual method +00000000000i[PLGIN] init_dev of 'speaker' plugin device by virtual method +00000000000i[PLGIN] init_dev of 'extfpuirq' plugin device by virtual method 00000000000i[PLGIN] init_dev of 'parallel' plugin device by virtual method 00000000000i[PAR ] parallel port 1 at 0x0378 irq 7 +00000000000i[PLGIN] init_dev of 'serial' plugin device by virtual method +00000000000i[SER ] com1 at 0x03f8 irq 4 +00000000000i[PLGIN] init_dev of 'gameport' plugin device by virtual method +00000000000i[PLGIN] init_dev of 'iodebug' plugin device by virtual method +00000000000i[PLGIN] init_dev of 'usb_uhci' plugin device by virtual method +00000000000i[DEV ] Experimental USB UHCI present at device 1, function 2 +00000000000i[UHCI ] USB UHCI initialized +00000000000i[PLGIN] register state of 'pci' plugin device by virtual method +00000000000i[PLGIN] register state of 'pci2isa' plugin device by virtual method +00000000000i[PLGIN] register state of 'cmos' plugin device by virtual method +00000000000i[PLGIN] register state of 'dma' plugin device by virtual method +00000000000i[PLGIN] register state of 'pic' plugin device by virtual method +00000000000i[PLGIN] register state of 'pit' plugin device by virtual method +00000000000i[PLGIN] register state of 'floppy' plugin device by virtual method +00000000000i[PLGIN] register state of 'vga' plugin device by virtual method 00000000000i[PLGIN] register state of 'unmapped' plugin device by virtual method 00000000000i[PLGIN] register state of 'biosdev' plugin device by virtual method 00000000000i[PLGIN] register state of 'speaker' plugin device by virtual method 00000000000i[PLGIN] register state of 'extfpuirq' plugin device by virtual method +00000000000i[PLGIN] register state of 'parallel' plugin device by virtual method +00000000000i[PLGIN] register state of 'serial' plugin device by virtual method 00000000000i[PLGIN] register state of 'gameport' plugin device by virtual method -00000000000i[PLGIN] register state of 'pci_ide' plugin device by virtual method +00000000000i[PLGIN] register state of 'iodebug' plugin device by virtual method +00000000000i[PLGIN] register state of 'usb_uhci' plugin device by virtual method 00000000000i[PLGIN] register state of 'acpi' plugin device by virtual method 00000000000i[PLGIN] register state of 'ioapic' plugin device by virtual method 00000000000i[PLGIN] register state of 'keyboard' plugin device by virtual method 00000000000i[PLGIN] register state of 'harddrv' plugin device by virtual method -00000000000i[PLGIN] register state of 'serial' plugin device by virtual method -00000000000i[PLGIN] register state of 'parallel' plugin device by virtual method +00000000000i[PLGIN] register state of 'pci_ide' plugin device by virtual method 00000000000i[SYS ] bx_pc_system_c::Reset(HARDWARE) called 00000000000i[CPU0 ] cpu hardware reset -00000000000i[APIC0] allocate APIC id=0 (MMIO enabled) to 0x00000000fee00000 -00000000000i[CPU0 ] CPUID[0x00000000]: 00000003 756e6547 6c65746e 49656e69 -00000000000i[CPU0 ] CPUID[0x00000001]: 00000f23 00000800 00002000 07cbfbff +00000000000i[APIC0] allocate APIC id=0 (MMIO enabled) to 0x0000fee00000 +00000000000i[CPU0 ] CPU[0] is the bootstrap processor +00000000000i[CPU0 ] CPUID[0x00000000]: 00000005 756e6547 6c65746e 49656e69 +00000000000i[CPU0 ] CPUID[0x00000001]: 00000633 00010800 00002008 1fcbfbff 00000000000i[CPU0 ] CPUID[0x00000002]: 00410601 00000000 00000000 00000000 00000000000i[CPU0 ] CPUID[0x00000003]: 00000000 00000000 00000000 00000000 00000000000i[CPU0 ] CPUID[0x00000004]: 00000000 00000000 00000000 00000000 -00000000000i[CPU0 ] CPUID[0x00000007]: 00000000 00000000 00000000 00000000 +00000000000i[CPU0 ] CPUID[0x00000005]: 00000040 00000040 00000003 00000020 00000000000i[CPU0 ] CPUID[0x80000000]: 80000008 00000000 00000000 00000000 -00000000000i[CPU0 ] CPUID[0x80000001]: 00000000 00000000 00000001 2a100800 +00000000000i[CPU0 ] CPUID[0x80000001]: 00000000 00000000 00000101 2a100000 00000000000i[CPU0 ] CPUID[0x80000002]: 20202020 20202020 20202020 6e492020 00000000000i[CPU0 ] CPUID[0x80000003]: 286c6574 50202952 69746e65 52286d75 00000000000i[CPU0 ] CPUID[0x80000004]: 20342029 20555043 20202020 00202020 +00000000000i[CPU0 ] CPUID[0x80000005]: 01ff01ff 01ff01ff 40020140 40020140 00000000000i[CPU0 ] CPUID[0x80000006]: 00000000 42004200 02008140 00000000 00000000000i[CPU0 ] CPUID[0x80000007]: 00000000 00000000 00000000 00000000 00000000000i[CPU0 ] CPUID[0x80000008]: 00003028 00000000 00000000 00000000 -00000000000i[PLGIN] reset of 'unmapped' plugin device by virtual method -00000000000i[PLGIN] reset of 'biosdev' plugin device by virtual method -00000000000i[PLGIN] reset of 'speaker' plugin device by virtual method -00000000000i[PLGIN] reset of 'extfpuirq' plugin device by virtual method -00000000000i[PLGIN] reset of 'gameport' plugin device by virtual method -00000000000i[PLGIN] reset of 'pci_ide' plugin device by virtual method +00000000000i[PLGIN] reset of 'pci' plugin device by virtual method +00000000000i[PLGIN] reset of 'pci2isa' plugin device by virtual method +00000000000i[PLGIN] reset of 'cmos' plugin device by virtual method +00000000000i[PLGIN] reset of 'dma' plugin device by virtual method +00000000000i[PLGIN] reset of 'pic' plugin device by virtual method +00000000000i[PLGIN] reset of 'pit' plugin device by virtual method +00000000000i[PLGIN] reset of 'floppy' plugin device by virtual method +00000000000i[PLGIN] reset of 'vga' plugin device by virtual method 00000000000i[PLGIN] reset of 'acpi' plugin device by virtual method 00000000000i[PLGIN] reset of 'ioapic' plugin device by virtual method 00000000000i[PLGIN] reset of 'keyboard' plugin device by virtual method 00000000000i[PLGIN] reset of 'harddrv' plugin device by virtual method -00000000000i[PLGIN] reset of 'serial' plugin device by virtual method +00000000000i[PLGIN] reset of 'pci_ide' plugin device by virtual method +00000000000i[PLGIN] reset of 'unmapped' plugin device by virtual method +00000000000i[PLGIN] reset of 'biosdev' plugin device by virtual method +00000000000i[PLGIN] reset of 'speaker' plugin device by virtual method +00000000000e[SPEAK] Failed to open /dev/console: Permission denied +00000000000e[SPEAK] Deactivating beep on console +00000000000i[PLGIN] reset of 'extfpuirq' plugin device by virtual method 00000000000i[PLGIN] reset of 'parallel' plugin device by virtual method -00000003305i[BIOS ] $Revision: 1.257 $ $Date: 2011/01/26 09:52:02 $ -00000318042i[KBD ] reset-disable command received -00000447872i[VBIOS] VGABios $Id: vgabios.c,v 1.75 2011/10/15 14:07:21 vruppert Exp $ -00000447943i[VGA ] VBE known Display Interface b0c0 -00000447975i[VGA ] VBE known Display Interface b0c5 -00000450900i[VBIOS] VBE Bios $Id: vbe.c,v 1.64 2011/07/19 18:25:05 vruppert Exp $ -00000771016i[BIOS ] Starting rombios32 -00000771454i[BIOS ] Shutdown flag 0 -00000772038i[BIOS ] ram_size=0x02000000 -00000772459i[BIOS ] ram_end=32MB -00000813018i[BIOS ] Found 1 cpu(s) -00000828866i[BIOS ] bios_table_addr: 0x000fb928 end=0x000fcc00 -00000828960i[PCI ] 440FX PMC write to PAM register 59 (TLB Flush) -00001156657i[PCI ] 440FX PMC write to PAM register 59 (TLB Flush) -00001484585i[P2I ] PCI IRQ routing: PIRQA# set to 0x0b -00001484604i[P2I ] PCI IRQ routing: PIRQB# set to 0x09 -00001484623i[P2I ] PCI IRQ routing: PIRQC# set to 0x0b -00001484642i[P2I ] PCI IRQ routing: PIRQD# set to 0x09 -00001484652i[P2I ] write: ELCR2 = 0x0a -00001485423i[BIOS ] PIIX3/PIIX4 init: elcr=00 0a -00001493095i[BIOS ] PCI: bus=0 devfn=0x00: vendor_id=0x8086 device_id=0x1237 class=0x0600 -00001495370i[BIOS ] PCI: bus=0 devfn=0x08: vendor_id=0x8086 device_id=0x7000 class=0x0601 -00001497484i[BIOS ] PCI: bus=0 devfn=0x09: vendor_id=0x8086 device_id=0x7010 class=0x0101 -00001497708i[PIDE ] new BM-DMA address: 0xc000 -00001498323i[BIOS ] region 4: 0x0000c000 -00001500350i[BIOS ] PCI: bus=0 devfn=0x0b: vendor_id=0x8086 device_id=0x7113 class=0x0680 -00001500579i[ACPI ] new irq line = 11 -00001500591i[ACPI ] new irq line = 9 -00001500616i[ACPI ] new PM base address: 0xb000 -00001500630i[ACPI ] new SM base address: 0xb100 -00001500658i[PCI ] setting SMRAM control register to 0x4a -00001664751i[CPU0 ] Enter to System Management Mode -00001664761i[CPU0 ] RSM: Resuming from System Management Mode -00001828782i[PCI ] setting SMRAM control register to 0x0a -00001837532i[BIOS ] MP table addr=0x000fba00 MPC table addr=0x000fb930 size=0xd0 -00001839346i[BIOS ] SMBIOS table addr=0x000fba10 -00001842501i[BIOS ] Firmware waking vector 0x1ff00cc -00001847425i[BIOS ] ACPI tables: RSDP addr=0x000fbb30 ACPI DATA addr=0x01ff0000 size=0x1f18 -00001847461i[PCI ] 440FX PMC write to PAM register 59 (TLB Flush) -00001848185i[BIOS ] bios_table_cur_addr: 0x000fbb54 -00014041548i[BIOS ] Booting from 0000:7c00 -00097000000p[SDL ] >>PANIC<< POWER button turned off. -00097000000i[CPU0 ] CPU is in real mode (active) -00097000000i[CPU0 ] CS.d_b = 16 bit -00097000000i[CPU0 ] SS.d_b = 16 bit -00097000000i[CPU0 ] EFER = 0x00000000 -00097000000i[CPU0 ] | RAX=0000000000000000 RBX=0000000000000000 -00097000000i[CPU0 ] | RCX=0000000000090000 RDX=0000000000000000 -00097000000i[CPU0 ] | RSP=000000000000ffd2 RBP=0000000000000000 -00097000000i[CPU0 ] | RSI=00000000000e7c0b RDI=000000000000ffac -00097000000i[CPU0 ] | R8=0000000000000000 R9=0000000000000000 -00097000000i[CPU0 ] | R10=0000000000000000 R11=0000000000000000 -00097000000i[CPU0 ] | R12=0000000000000000 R13=0000000000000000 -00097000000i[CPU0 ] | R14=0000000000000000 R15=0000000000000000 -00097000000i[CPU0 ] | IOPL=0 id vip vif ac vm rf nt of df if tf sf ZF af PF cf -00097000000i[CPU0 ] | SEG selector base limit G D -00097000000i[CPU0 ] | SEG sltr(index|ti|rpl) base limit G D -00097000000i[CPU0 ] | CS:0000( 0004| 0| 0) 00000000 0000ffff 0 0 -00097000000i[CPU0 ] | DS:0000( 0005| 0| 0) 00000000 0000ffff 0 0 -00097000000i[CPU0 ] | SS:0000( 0005| 0| 0) 00000000 0000ffff 0 0 -00097000000i[CPU0 ] | ES:0000( 0005| 0| 0) 00000000 0000ffff 0 0 -00097000000i[CPU0 ] | FS:0000( 0005| 0| 0) 00000000 0000ffff 0 0 -00097000000i[CPU0 ] | GS:0000( 0005| 0| 0) 00000000 0000ffff 0 0 -00097000000i[CPU0 ] | MSR_FS_BASE:0000000000000000 -00097000000i[CPU0 ] | MSR_GS_BASE:0000000000000000 -00097000000i[CPU0 ] | RIP=0000000000007c1d (0000000000007c1d) -00097000000i[CPU0 ] | CR0=0x60000010 CR2=0x0000000000000000 -00097000000i[CPU0 ] | CR3=0x00000000 CR4=0x00000000 -00097000000i[CPU0 ] 0x0000000000007c1d>> jmp .-2 (0x00007c1d) : EBFE -00097000000i[CMOS ] Last time is 1396036158 (Fri Mar 28 20:49:18 2014) -00097000000i[ ] restoring default signal behavior -00097000000i[CTRL ] quit_sim called with exit code 1 +00000000000i[PLGIN] reset of 'serial' plugin device by virtual method +00000000000i[PLGIN] reset of 'gameport' plugin device by virtual method +00000000000i[PLGIN] reset of 'iodebug' plugin device by virtual method +00000000000i[PLGIN] reset of 'usb_uhci' plugin device by virtual method +00000000000i[XGUI ] Mouse capture off +00000000000i[XGUI ] Mouse capture off +00000000000i[MEM0 ] allocate_block: block=0x0 used 0x1 of 0x20 +00000004661i[BIOS ] $Revision: 11545 $ $Date: 2012-11-11 09:11:17 +0100 (So, 11. Nov 2012) $ +00000318044i[KBD ] reset-disable command received +00000320816i[BIOS ] Starting rombios32 +00000321250i[BIOS ] Shutdown flag 0 +00000321845i[BIOS ] ram_size=0x02000000 +00000322266i[BIOS ] ram_end=32MB +00000362765i[BIOS ] Found 1 cpu(s) +00000376952i[BIOS ] bios_table_addr: 0x000fa448 end=0x000fcc00 +00000704749i[PCI ] i440FX PMC write to PAM register 59 (TLB Flush) +00001032676i[P2I ] PCI IRQ routing: PIRQA# set to 0x0b +00001032695i[P2I ] PCI IRQ routing: PIRQB# set to 0x09 +00001032714i[P2I ] PCI IRQ routing: PIRQC# set to 0x0b +00001032733i[P2I ] PCI IRQ routing: PIRQD# set to 0x09 +00001032743i[P2I ] write: ELCR2 = 0x0a +00001033509i[BIOS ] PIIX3/PIIX4 init: elcr=00 0a +00001041225i[BIOS ] PCI: bus=0 devfn=0x00: vendor_id=0x8086 device_id=0x1237 class=0x0600 +00001043495i[BIOS ] PCI: bus=0 devfn=0x08: vendor_id=0x8086 device_id=0x7000 class=0x0601 +00001045604i[BIOS ] PCI: bus=0 devfn=0x09: vendor_id=0x8086 device_id=0x7010 class=0x0101 +00001045833i[PIDE ] new BM-DMA address: 0xc000 +00001046450i[BIOS ] region 4: 0x0000c000 +00001048452i[BIOS ] PCI: bus=0 devfn=0x0a: vendor_id=0x8086 device_id=0x7020 class=0x0c03 +00001048656i[UHCI ] new base address: 0xc020 +00001049273i[BIOS ] region 4: 0x0000c020 +00001049399i[UHCI ] new irq line = 9 +00001051284i[BIOS ] PCI: bus=0 devfn=0x0b: vendor_id=0x8086 device_id=0x7113 class=0x0680 +00001051517i[ACPI ] new irq line = 11 +00001051529i[ACPI ] new irq line = 9 +00001051558i[ACPI ] new PM base address: 0xb000 +00001051572i[ACPI ] new SM base address: 0xb100 +00001051600i[PCI ] setting SMRAM control register to 0x4a +00001215691i[CPU0 ] Enter to System Management Mode +00001215701i[CPU0 ] RSM: Resuming from System Management Mode +00001379719i[PCI ] setting SMRAM control register to 0x0a +00001394653i[BIOS ] MP table addr=0x000fa520 MPC table addr=0x000fa450 size=0xc8 +00001396409i[BIOS ] SMBIOS table addr=0x000fa530 +00001396467i[MEM0 ] allocate_block: block=0x1f used 0x2 of 0x20 +00001398604i[BIOS ] ACPI tables: RSDP addr=0x000fa650 ACPI DATA addr=0x01ff0000 size=0xf72 +00001401801i[BIOS ] Firmware waking vector 0x1ff00cc +00001403599i[PCI ] i440FX PMC write to PAM register 59 (TLB Flush) +00001404327i[BIOS ] bios_table_cur_addr: 0x000fa674 +00001531944i[VBIOS] VGABios $Id: vgabios.c,v 1.75 2011/10/15 14:07:21 vruppert Exp $ +00001532015i[BXVGA] VBE known Display Interface b0c0 +00001532047i[BXVGA] VBE known Display Interface b0c5 +00001534972i[VBIOS] VBE Bios $Id: vbe.c,v 1.64 2011/07/19 18:25:05 vruppert Exp $ +00001600001i[XGUI ] charmap update. Font Height is 16 +00014040325i[BIOS ] Booting from 0000:7c00 +00014400001i[XGUI ] charmap update. Font Height is 16 +00172500000p[XGUI ] >>PANIC<< POWER button turned off. +00172500000i[CPU0 ] CPU is in real mode (active) +00172500000i[CPU0 ] CS.mode = 16 bit +00172500000i[CPU0 ] SS.mode = 16 bit +00172500000i[CPU0 ] EFER = 0x00000000 +00172500000i[CPU0 ] | EAX=00001000 EBX=00000000 ECX=00090000 EDX=00000000 +00172500000i[CPU0 ] | ESP=0000ffde EBP=00000000 ESI=000e7c0b EDI=00000400 +00172500000i[CPU0 ] | IOPL=0 id vip vif ac vm rf nt of df if tf sf ZF af PF cf +00172500000i[CPU0 ] | SEG sltr(index|ti|rpl) base limit G D +00172500000i[CPU0 ] | CS:0000( 0004| 0| 0) 00000000 0000ffff 0 0 +00172500000i[CPU0 ] | DS:0000( 0005| 0| 0) 00000000 0000ffff 0 0 +00172500000i[CPU0 ] | SS:0000( 0005| 0| 0) 00000000 0000ffff 0 0 +00172500000i[CPU0 ] | ES:1000( 0005| 0| 0) 00010000 0000ffff 0 0 +00172500000i[CPU0 ] | FS:0000( 0005| 0| 0) 00000000 0000ffff 0 0 +00172500000i[CPU0 ] | GS:0000( 0005| 0| 0) 00000000 0000ffff 0 0 +00172500000i[CPU0 ] | EIP=00007c8e (00007c8e) +00172500000i[CPU0 ] | CR0=0x60000010 CR2=0x00000000 +00172500000i[CPU0 ] | CR3=0x00000000 CR4=0x00000000 +00172500000i[CMOS ] Last time is 1396139507 (Sun Mar 30 01:31:47 2014) +00172500000i[XGUI ] Exit +00172500000i[CTRL ] quit_sim called with exit code 1 diff --git a/bochsrc b/bochsrc new file mode 100644 index 0000000..7f44ba9 --- /dev/null +++ b/bochsrc @@ -0,0 +1,9 @@ +megs: 32 +#romimage: file=/usr/local/bochs/1.4.1/BIOS-bochs-latest, address=0xf0000 +#vgaromimage: /usr/local/bochs/1.4.1/VGABIOS-elpin-2.40 +floppya: 1_44=floppy.img, status=inserted +boot: a +log: bochsout +mouse: enabled=0 +display_library: x, options="gui_debug" +#display_library: x diff --git a/bochsrc.txt b/bochsrc.txt deleted file mode 100644 index dfe1bfd..0000000 --- a/bochsrc.txt +++ /dev/null @@ -1,8 +0,0 @@ -megs: 32 -#romimage: file=/usr/local/bochs/1.4.1/BIOS-bochs-latest, address=0xf0000 -#vgaromimage: /usr/local/bochs/1.4.1/VGABIOS-elpin-2.40 -floppya: 1_44=floppy.img, status=inserted -boot: a -log: bochsout -mouse: enabled=0 -display_library: sdl diff --git a/boot.asm b/boot.asm index e34a0d2..1411fe8 100644 --- a/boot.asm +++ b/boot.asm @@ -8,92 +8,107 @@ ;GREY 0x7 ;DARK_GREY 0x8 ;LIGHT_BLUE 0x9 -;LIGHT_GREEN 0xA +;LIGHT_GREEN 0xA ;LIGHT_CYAN 0xB ;LIGHT_RED 0xC -;LIGHT_MAGENTA 0xD -;LIGHT_BROWN 0xE +;LIGHT_MAGENTA 0xD +;LIGHT_BROWN 0xE ;WHITE 0xF [BITS 16] [org 0x7C00] -JMP short Start +JMP short Start -str: db 'THE GAME ',0x00 - - - -Start: - XOR ax, ax - MOV ds, ax - CALL clear_screen - PUSH 2 ; num - PUSH 2 ; offset - ;CALL print_sector ; (offset, num) - ;ADD esp, 12 - for_start_0: - MOV si,str - CALL print_string - ;JMP for_start_0 - JMP $ +str: db 'THE GAME ',0x00 clear_screen: + PUSH ax MOV al, 02h ; Setting the graphical mode 80x25(text) - MOV ah, 00h ; Code of the function of changing video mode - INT 10h ; Call interruption + MOV ah, 00h ; Code of the function of changing video mode + INT 10h ; Call interruption + POP ax RETN print_string: ; Expects null terminated message in si - ;MOV bl,0x00 + PUSH ax for_print_string_0: MOV al,[si] - OR al,al - JZ .end + OR al,al + JZ end_for_print_string_0 INC si CALL print_char - ;INCL bl JMP for_print_string_0 - .end: + end_for_print_string_0: + POP ax RETN print_sector: PUSH ebp - MOV ebp, esp + MOV ebp, esp PUSH ax PUSH bx PUSH cx PUSH dx - MOV al, [12 + ebp] - MOV cl, [8 + ebp] + MOV al, [6 + ebp] ; num + MOV cl, [8 + ebp] ; offset MOV ah, 2 - MOV ch, 0 - MOV dh, 0 - INT 0x13 - POP dx - POP cx - POP bx - POP ax - MOV esp, ebp - POP ebp + XOR ch, ch + XOR dx,dx + INT 0x13 + MOV di, 512 + XOR ah, ah + IMUL di, ax + XOR si, si + for_print_sector_0: + CMP si, di + JZ end_for_print_sector_0 + MOV al,[es:si] + OR al, al + JZ end_print_char_0 + CALL print_char + end_print_char_0: + INC si + JMP for_print_sector_0 + end_for_print_sector_0: + POP dx + POP cx + POP bx + POP ax + MOV esp, ebp + POP ebp RETN print_char: - PUSH ebp - MOV ebp, esp PUSH ax PUSH bx MOV ah,0x0E ; Specifies that we want to write a character to the screen MOV bl,0x02 ; Specifies output text color. Not required, but useful to know MOV bh,0x00 ; Page number. Leave this alone. INT 0x10 ; Signal video interrupt to BIOS - POP bx - POP ax - MOV esp,ebp - POP ebp + POP bx + POP ax RETN -TIMES 510 - ($ - $$) db 0 +Start: +XOR ax, ax +MOV ds, ax +MOV ax, 0x1000 +MOV es, ax +XOR bx, bx +CALL clear_screen +PUSH 2 ; num +PUSH 2 ; offset +CALL print_sector ; (offset, num) +ADD esp, 12 +for_start_0: + MOV si,str + CALL print_string + ;JMP for_start_0 + JMP $ + + +TIMES 510 - ($ - $$) db 0 DW 0xAA55 diff --git a/boot.bin b/boot.bin index 2f838b6..65fc8cf 100644 Binary files a/boot.bin and b/boot.bin differ diff --git a/floppy.img b/floppy.img index 2f838b6..f3f3765 100644 Binary files a/floppy.img and b/floppy.img differ -- libgit2 0.22.2