Commit c90df8df09daa1cbffca1751eaf7feaf12d94955
1 parent
8a46b123
--no commit message
Showing
6 changed files
with
250 additions
and
210 deletions
Makefile
@@ -3,7 +3,7 @@ TARGETS = floppy.img boot.bin | @@ -3,7 +3,7 @@ TARGETS = floppy.img boot.bin | ||
3 | 3 | ||
4 | boot.bin: boot.asm | 4 | boot.bin: boot.asm |
5 | nasm boot.asm -f bin -o boot.bin | 5 | nasm boot.asm -f bin -o boot.bin |
6 | - dd if=boot.bin of=floppy.img bs=512 | 6 | + dd if=boot.bin of=floppy.img bs=512 count=1 conv=notrunc |
7 | 7 | ||
8 | floppy.img: | 8 | floppy.img: |
9 | dd if=/dev/zero of=floppy.img bs=512 count=2880 | 9 | dd if=/dev/zero of=floppy.img bs=512 count=2880 |
bochsout
1 | -00000000000i[ ] Bochs x86 Emulator 2.4.6 | ||
2 | -00000000000i[ ] Build from CVS snapshot, on February 22, 2011 | ||
3 | -00000000000i[ ] Compiled at Jun 8 2013, 05:16:39 | 1 | +00000000000i[ ] Bochs x86 Emulator 2.6.2 |
2 | +00000000000i[ ] Built from SVN snapshot on May 26, 2013 | ||
3 | +00000000000i[ ] Compiled on Mar 30 2014 at 00:00:38 | ||
4 | 00000000000i[ ] System configuration | 4 | 00000000000i[ ] System configuration |
5 | 00000000000i[ ] processors: 1 (cores=1, HT threads=1) | 5 | 00000000000i[ ] processors: 1 (cores=1, HT threads=1) |
6 | 00000000000i[ ] A20 line support: yes | 6 | 00000000000i[ ] A20 line support: yes |
7 | +00000000000i[ ] IPS is set to 4000000 | ||
7 | 00000000000i[ ] CPU configuration | 8 | 00000000000i[ ] CPU configuration |
9 | +00000000000i[ ] SMP support: yes, quantum=16 | ||
8 | 00000000000i[ ] level: 6 | 10 | 00000000000i[ ] level: 6 |
9 | -00000000000i[ ] SMP support: no | ||
10 | -00000000000i[ ] APIC support: yes | 11 | +00000000000i[ ] APIC support: xapic |
11 | 00000000000i[ ] FPU support: yes | 12 | 00000000000i[ ] FPU support: yes |
12 | 00000000000i[ ] MMX support: yes | 13 | 00000000000i[ ] MMX support: yes |
13 | 00000000000i[ ] 3dnow! support: no | 14 | 00000000000i[ ] 3dnow! support: no |
14 | 00000000000i[ ] SEP support: yes | 15 | 00000000000i[ ] SEP support: yes |
15 | 00000000000i[ ] SSE support: sse2 | 16 | 00000000000i[ ] SSE support: sse2 |
16 | -00000000000i[ ] XSAVE support: no | 17 | +00000000000i[ ] XSAVE support: no |
17 | 00000000000i[ ] AES support: no | 18 | 00000000000i[ ] AES support: no |
18 | 00000000000i[ ] MOVBE support: no | 19 | 00000000000i[ ] MOVBE support: no |
20 | +00000000000i[ ] ADX support: no | ||
19 | 00000000000i[ ] x86-64 support: yes | 21 | 00000000000i[ ] x86-64 support: yes |
20 | 00000000000i[ ] 1G paging support: no | 22 | 00000000000i[ ] 1G paging support: no |
21 | -00000000000i[ ] VMX support: no | 23 | +00000000000i[ ] MWAIT support: yes |
24 | +00000000000i[ ] AVX support: no | ||
22 | 00000000000i[ ] Optimization configuration | 25 | 00000000000i[ ] Optimization configuration |
23 | -00000000000i[ ] RepeatSpeedups support: yes | ||
24 | -00000000000i[ ] Trace cache support: yes | ||
25 | -00000000000i[ ] Fast function calls: yes | 26 | +00000000000i[ ] RepeatSpeedups support: no |
27 | +00000000000i[ ] Fast function calls: no | ||
28 | +00000000000i[ ] Handlers Chaining speedups: no | ||
26 | 00000000000i[ ] Devices configuration | 29 | 00000000000i[ ] Devices configuration |
27 | -00000000000i[ ] ACPI support: yes | ||
28 | 00000000000i[ ] NE2000 support: yes | 30 | 00000000000i[ ] NE2000 support: yes |
29 | 00000000000i[ ] PCI support: yes, enabled=yes | 31 | 00000000000i[ ] PCI support: yes, enabled=yes |
30 | 00000000000i[ ] SB16 support: yes | 32 | 00000000000i[ ] SB16 support: yes |
31 | 00000000000i[ ] USB support: yes | 33 | 00000000000i[ ] USB support: yes |
32 | -00000000000i[ ] VGA extension support: vbe | ||
33 | -00000000000i[MEM0 ] allocated memory at 0xb4188008. after alignment, vector=0xb4189000 | 34 | +00000000000i[ ] VGA extension support: vbe |
35 | +00000000000i[MEM0 ] allocated memory at 0x7ff291e01010. after alignment, vector=0x7ff291e02000 | ||
34 | 00000000000i[MEM0 ] 32,00MB | 36 | 00000000000i[MEM0 ] 32,00MB |
35 | 00000000000i[MEM0 ] mem block size = 0x00100000, blocks=32 | 37 | 00000000000i[MEM0 ] mem block size = 0x00100000, blocks=32 |
36 | -00000000000i[MEM0 ] rom at 0xfffe0000/131072 ('/usr/share/bochs/BIOS-bochs-latest') | ||
37 | -00000000000i[MEM0 ] rom at 0xc0000/41472 ('/usr/share/bochs/VGABIOS-lgpl-latest') | ||
38 | -00000000000i[ ] lt_dlhandle is 0xa4bcbd8 | ||
39 | -00000000000i[PLGIN] loaded plugin libbx_cmos.so | ||
40 | -00000000000i[ ] lt_dlhandle is 0xa4bd1f8 | ||
41 | -00000000000i[PLGIN] loaded plugin libbx_dma.so | ||
42 | -00000000000i[ ] lt_dlhandle is 0xa4bd830 | ||
43 | -00000000000i[PLGIN] loaded plugin libbx_pic.so | ||
44 | -00000000000i[ ] lt_dlhandle is 0xa4bdd28 | ||
45 | -00000000000i[PLGIN] loaded plugin libbx_pit.so | ||
46 | -00000000000i[ ] lt_dlhandle is 0xa4be368 | ||
47 | -00000000000i[PLGIN] loaded plugin libbx_vga.so | ||
48 | -00000000000i[ ] lt_dlhandle is 0xa4be768 | 38 | +00000000000i[MEM0 ] rom at 0xfffe0000/131072 ('/usr/local/share/bochs/BIOS-bochs-latest') |
39 | +00000000000i[ ] lt_dlhandle is 0xd57760 | ||
49 | 00000000000i[PLGIN] loaded plugin libbx_hdimage.so | 40 | 00000000000i[PLGIN] loaded plugin libbx_hdimage.so |
50 | -00000000000i[ ] lt_dlhandle is 0xa4becf8 | ||
51 | -00000000000i[PLGIN] loaded plugin libbx_floppy.so | ||
52 | -00000000000i[ ] lt_dlhandle is 0xa4bf4c8 | ||
53 | -00000000000i[PLGIN] loaded plugin libbx_soundmod.so | ||
54 | -00000000000i[ ] lt_dlhandle is 0xa4bfa58 | 41 | +00000000000i[ ] lt_dlhandle is 0xd58220 |
55 | 00000000000i[PLGIN] loaded plugin libbx_pci.so | 42 | 00000000000i[PLGIN] loaded plugin libbx_pci.so |
56 | -00000000000i[ ] lt_dlhandle is 0xa4c0168 | 43 | +00000000000i[ ] lt_dlhandle is 0xd58b10 |
57 | 00000000000i[PLGIN] loaded plugin libbx_pci2isa.so | 44 | 00000000000i[PLGIN] loaded plugin libbx_pci2isa.so |
58 | -00000000000i[ ] lt_dlhandle is 0xa4c07c8 | 45 | +00000000000i[ ] lt_dlhandle is 0xd59650 |
46 | +00000000000i[PLGIN] loaded plugin libbx_usb_uhci.so | ||
47 | +00000000000i[ ] lt_dlhandle is 0xd5bcf0 | ||
59 | 00000000000i[PLGIN] loaded plugin libbx_usb_common.so | 48 | 00000000000i[PLGIN] loaded plugin libbx_usb_common.so |
60 | -00000000000i[ ] lt_dlhandle is 0xa4c0d18 | ||
61 | -00000000000i[PLGIN] loaded plugin libbx_unmapped.so | ||
62 | -00000000000i[ ] lt_dlhandle is 0xa4c11a8 | ||
63 | -00000000000i[PLGIN] loaded plugin libbx_biosdev.so | ||
64 | -00000000000i[ ] lt_dlhandle is 0xa4c1778 | ||
65 | -00000000000i[PLGIN] loaded plugin libbx_speaker.so | ||
66 | -00000000000i[ ] lt_dlhandle is 0xa4c1c60 | ||
67 | -00000000000i[PLGIN] loaded plugin libbx_extfpuirq.so | ||
68 | -00000000000i[ ] lt_dlhandle is 0xa4c2190 | ||
69 | -00000000000i[PLGIN] loaded plugin libbx_gameport.so | ||
70 | -00000000000i[ ] lt_dlhandle is 0xa4c2680 | ||
71 | -00000000000i[PLGIN] loaded plugin libbx_pci_ide.so | ||
72 | -00000000000i[ ] lt_dlhandle is 0xa4c2cc0 | 49 | +00000000000i[ ] lt_dlhandle is 0xd5c690 |
73 | 00000000000i[PLGIN] loaded plugin libbx_acpi.so | 50 | 00000000000i[PLGIN] loaded plugin libbx_acpi.so |
74 | -00000000000i[ ] lt_dlhandle is 0xa4c3300 | 51 | +00000000000i[ ] lt_dlhandle is 0xd5d080 |
52 | +00000000000i[PLGIN] loaded plugin libbx_cmos.so | ||
53 | +00000000000i[ ] lt_dlhandle is 0xd5d9a0 | ||
54 | +00000000000i[PLGIN] loaded plugin libbx_dma.so | ||
55 | +00000000000i[ ] lt_dlhandle is 0xd5e420 | ||
56 | +00000000000i[PLGIN] loaded plugin libbx_pic.so | ||
57 | +00000000000i[ ] lt_dlhandle is 0xd5ed10 | ||
58 | +00000000000i[PLGIN] loaded plugin libbx_pit.so | ||
59 | +00000000000i[ ] lt_dlhandle is 0xd5f790 | ||
60 | +00000000000i[PLGIN] loaded plugin libbx_floppy.so | ||
61 | +00000000000i[ ] lt_dlhandle is 0xd60470 | ||
62 | +00000000000i[PLGIN] loaded plugin libbx_vga.so | ||
63 | +00000000000i[ ] lt_dlhandle is 0xd5fea0 | ||
75 | 00000000000i[PLGIN] loaded plugin libbx_ioapic.so | 64 | 00000000000i[PLGIN] loaded plugin libbx_ioapic.so |
76 | -00000000000i[ ] lt_dlhandle is 0xa4c38c0 | 65 | +00000000000i[ ] lt_dlhandle is 0xd61670 |
77 | 00000000000i[PLGIN] loaded plugin libbx_keyboard.so | 66 | 00000000000i[PLGIN] loaded plugin libbx_keyboard.so |
78 | -00000000000i[ ] lt_dlhandle is 0xa4c3ed0 | 67 | +00000000000i[ ] lt_dlhandle is 0xd62050 |
79 | 00000000000i[PLGIN] loaded plugin libbx_harddrv.so | 68 | 00000000000i[PLGIN] loaded plugin libbx_harddrv.so |
80 | -00000000000i[ ] lt_dlhandle is 0xa4d5b38 | ||
81 | -00000000000i[PLGIN] loaded plugin libbx_serial.so | ||
82 | -00000000000i[ ] lt_dlhandle is 0xa4d6678 | ||
83 | -00000000000i[PLGIN] loaded plugin libbx_parallel.so | 69 | +00000000000i[ ] lt_dlhandle is 0xd61330 |
70 | +00000000000i[PLGIN] loaded plugin libbx_pci_ide.so | ||
71 | +00000000000i[PLGIN] init_dev of 'pci' plugin device by virtual method | ||
72 | +00000000000i[DEV ] i440FX PMC present at device 0, function 0 | ||
73 | +00000000000i[PLGIN] init_dev of 'pci2isa' plugin device by virtual method | ||
74 | +00000000000i[DEV ] PIIX3 PCI-to-ISA bridge present at device 1, function 0 | ||
75 | +00000000000i[PLGIN] init_dev of 'cmos' plugin device by virtual method | ||
84 | 00000000000i[CMOS ] Using local time for initial clock | 76 | 00000000000i[CMOS ] Using local time for initial clock |
85 | -00000000000i[CMOS ] Setting initial clock to: Fri Mar 28 20:48:54 2014 (time0=1396036134) | 77 | +00000000000i[CMOS ] Setting initial clock to: Sun Mar 30 01:31:04 2014 (time0=1396139464) |
78 | +00000000000i[PLGIN] init_dev of 'dma' plugin device by virtual method | ||
86 | 00000000000i[DMA ] channel 4 used by cascade | 79 | 00000000000i[DMA ] channel 4 used by cascade |
80 | +00000000000i[PLGIN] init_dev of 'pic' plugin device by virtual method | ||
81 | +00000000000i[PLGIN] init_dev of 'pit' plugin device by virtual method | ||
82 | +00000000000i[PLGIN] init_dev of 'floppy' plugin device by virtual method | ||
87 | 00000000000i[DMA ] channel 2 used by Floppy Drive | 83 | 00000000000i[DMA ] channel 2 used by Floppy Drive |
88 | 00000000000i[FDD ] fd0: 'floppy.img' ro=0, h=2,t=80,spt=18 | 84 | 00000000000i[FDD ] fd0: 'floppy.img' ro=0, h=2,t=80,spt=18 |
89 | -00000000000i[PCI ] 440FX Host bridge present at device 0, function 0 | ||
90 | -00000000000i[PCI ] PIIX3 PCI-to-ISA bridge present at device 1, function 0 | ||
91 | -00000000000i[VGA ] interval=50000 | ||
92 | -00000000000i[MEM0 ] Register memory access handlers: 0x00000000000a0000 - 0x00000000000bffff | ||
93 | -00000000000i[MEM0 ] Register memory access handlers: 0x00000000e0000000 - 0x00000000e0ffffff | ||
94 | -00000000000i[VGA ] VBE Bochs Display Extension Enabled | ||
95 | -00000000000i[PLGIN] init_dev of 'unmapped' plugin device by virtual method | ||
96 | -00000000000i[PLGIN] init_dev of 'biosdev' plugin device by virtual method | ||
97 | -00000000000i[PLGIN] init_dev of 'speaker' plugin device by virtual method | ||
98 | -00000000000i[SPEAK] Failed to open /dev/console: Resource temporarily unavailable | ||
99 | -00000000000i[SPEAK] Deactivating beep on console | ||
100 | -00000000000i[PLGIN] init_dev of 'extfpuirq' plugin device by virtual method | ||
101 | -00000000000i[PLGIN] init_dev of 'gameport' plugin device by virtual method | ||
102 | -00000000000i[PLGIN] init_dev of 'pci_ide' plugin device by virtual method | ||
103 | -00000000000i[PCI ] PIIX3 PCI IDE controller present at device 1, function 1 | 85 | +00000000000i[PLGIN] init_dev of 'vga' plugin device by virtual method |
86 | +00000000000i[MEM0 ] Register memory access handlers: 0x0000000a0000 - 0x0000000bffff | ||
87 | +00000000000i[VGA ] interval=200000 | ||
88 | +00000000000i[MEM0 ] Register memory access handlers: 0x0000e0000000 - 0x0000e0ffffff | ||
89 | +00000000000i[BXVGA] VBE Bochs Display Extension Enabled | ||
90 | +00000000000i[XGUI ] test_alloc_colors: 16 colors available out of 16 colors tried | ||
91 | +00000000000i[XGUI ] font 8 wide x 16 high, display depth = 24 | ||
92 | +00000000000i[MEM0 ] rom at 0xc0000/41472 ('/usr/local/share/bochs/VGABIOS-lgpl-latest') | ||
104 | 00000000000i[PLGIN] init_dev of 'acpi' plugin device by virtual method | 93 | 00000000000i[PLGIN] init_dev of 'acpi' plugin device by virtual method |
105 | -00000000000i[PCI ] ACPI Controller present at device 1, function 3 | 94 | +00000000000i[DEV ] ACPI Controller present at device 1, function 3 |
106 | 00000000000i[PLGIN] init_dev of 'ioapic' plugin device by virtual method | 95 | 00000000000i[PLGIN] init_dev of 'ioapic' plugin device by virtual method |
107 | 00000000000i[IOAP ] initializing I/O APIC | 96 | 00000000000i[IOAP ] initializing I/O APIC |
108 | -00000000000i[MEM0 ] Register memory access handlers: 0x00000000fec00000 - 0x00000000fec00fff | 97 | +00000000000i[MEM0 ] Register memory access handlers: 0x0000fec00000 - 0x0000fec00fff |
98 | +00000000000i[IOAP ] IOAPIC enabled (base address = 0xfec00000) | ||
109 | 00000000000i[PLGIN] init_dev of 'keyboard' plugin device by virtual method | 99 | 00000000000i[PLGIN] init_dev of 'keyboard' plugin device by virtual method |
110 | -00000000000i[KBD ] will paste characters every 1000 keyboard ticks | 100 | +00000000000i[KBD ] will paste characters every 400 keyboard ticks |
111 | 00000000000i[PLGIN] init_dev of 'harddrv' plugin device by virtual method | 101 | 00000000000i[PLGIN] init_dev of 'harddrv' plugin device by virtual method |
112 | 00000000000i[HD ] Using boot sequence floppy, none, none | 102 | 00000000000i[HD ] Using boot sequence floppy, none, none |
113 | 00000000000i[HD ] Floppy boot signature check is enabled | 103 | 00000000000i[HD ] Floppy boot signature check is enabled |
114 | -00000000000i[PLGIN] init_dev of 'serial' plugin device by virtual method | ||
115 | -00000000000i[SER ] com1 at 0x03f8 irq 4 | 104 | +00000000000i[PLGIN] init_dev of 'pci_ide' plugin device by virtual method |
105 | +00000000000i[DEV ] PIIX3 PCI IDE controller present at device 1, function 1 | ||
106 | +00000000000i[PLGIN] init_dev of 'unmapped' plugin device by virtual method | ||
107 | +00000000000i[PLGIN] init_dev of 'biosdev' plugin device by virtual method | ||
108 | +00000000000i[PLGIN] init_dev of 'speaker' plugin device by virtual method | ||
109 | +00000000000i[PLGIN] init_dev of 'extfpuirq' plugin device by virtual method | ||
116 | 00000000000i[PLGIN] init_dev of 'parallel' plugin device by virtual method | 110 | 00000000000i[PLGIN] init_dev of 'parallel' plugin device by virtual method |
117 | 00000000000i[PAR ] parallel port 1 at 0x0378 irq 7 | 111 | 00000000000i[PAR ] parallel port 1 at 0x0378 irq 7 |
112 | +00000000000i[PLGIN] init_dev of 'serial' plugin device by virtual method | ||
113 | +00000000000i[SER ] com1 at 0x03f8 irq 4 | ||
114 | +00000000000i[PLGIN] init_dev of 'gameport' plugin device by virtual method | ||
115 | +00000000000i[PLGIN] init_dev of 'iodebug' plugin device by virtual method | ||
116 | +00000000000i[PLGIN] init_dev of 'usb_uhci' plugin device by virtual method | ||
117 | +00000000000i[DEV ] Experimental USB UHCI present at device 1, function 2 | ||
118 | +00000000000i[UHCI ] USB UHCI initialized | ||
119 | +00000000000i[PLGIN] register state of 'pci' plugin device by virtual method | ||
120 | +00000000000i[PLGIN] register state of 'pci2isa' plugin device by virtual method | ||
121 | +00000000000i[PLGIN] register state of 'cmos' plugin device by virtual method | ||
122 | +00000000000i[PLGIN] register state of 'dma' plugin device by virtual method | ||
123 | +00000000000i[PLGIN] register state of 'pic' plugin device by virtual method | ||
124 | +00000000000i[PLGIN] register state of 'pit' plugin device by virtual method | ||
125 | +00000000000i[PLGIN] register state of 'floppy' plugin device by virtual method | ||
126 | +00000000000i[PLGIN] register state of 'vga' plugin device by virtual method | ||
118 | 00000000000i[PLGIN] register state of 'unmapped' plugin device by virtual method | 127 | 00000000000i[PLGIN] register state of 'unmapped' plugin device by virtual method |
119 | 00000000000i[PLGIN] register state of 'biosdev' plugin device by virtual method | 128 | 00000000000i[PLGIN] register state of 'biosdev' plugin device by virtual method |
120 | 00000000000i[PLGIN] register state of 'speaker' plugin device by virtual method | 129 | 00000000000i[PLGIN] register state of 'speaker' plugin device by virtual method |
121 | 00000000000i[PLGIN] register state of 'extfpuirq' plugin device by virtual method | 130 | 00000000000i[PLGIN] register state of 'extfpuirq' plugin device by virtual method |
131 | +00000000000i[PLGIN] register state of 'parallel' plugin device by virtual method | ||
132 | +00000000000i[PLGIN] register state of 'serial' plugin device by virtual method | ||
122 | 00000000000i[PLGIN] register state of 'gameport' plugin device by virtual method | 133 | 00000000000i[PLGIN] register state of 'gameport' plugin device by virtual method |
123 | -00000000000i[PLGIN] register state of 'pci_ide' plugin device by virtual method | 134 | +00000000000i[PLGIN] register state of 'iodebug' plugin device by virtual method |
135 | +00000000000i[PLGIN] register state of 'usb_uhci' plugin device by virtual method | ||
124 | 00000000000i[PLGIN] register state of 'acpi' plugin device by virtual method | 136 | 00000000000i[PLGIN] register state of 'acpi' plugin device by virtual method |
125 | 00000000000i[PLGIN] register state of 'ioapic' plugin device by virtual method | 137 | 00000000000i[PLGIN] register state of 'ioapic' plugin device by virtual method |
126 | 00000000000i[PLGIN] register state of 'keyboard' plugin device by virtual method | 138 | 00000000000i[PLGIN] register state of 'keyboard' plugin device by virtual method |
127 | 00000000000i[PLGIN] register state of 'harddrv' plugin device by virtual method | 139 | 00000000000i[PLGIN] register state of 'harddrv' plugin device by virtual method |
128 | -00000000000i[PLGIN] register state of 'serial' plugin device by virtual method | ||
129 | -00000000000i[PLGIN] register state of 'parallel' plugin device by virtual method | 140 | +00000000000i[PLGIN] register state of 'pci_ide' plugin device by virtual method |
130 | 00000000000i[SYS ] bx_pc_system_c::Reset(HARDWARE) called | 141 | 00000000000i[SYS ] bx_pc_system_c::Reset(HARDWARE) called |
131 | 00000000000i[CPU0 ] cpu hardware reset | 142 | 00000000000i[CPU0 ] cpu hardware reset |
132 | -00000000000i[APIC0] allocate APIC id=0 (MMIO enabled) to 0x00000000fee00000 | ||
133 | -00000000000i[CPU0 ] CPUID[0x00000000]: 00000003 756e6547 6c65746e 49656e69 | ||
134 | -00000000000i[CPU0 ] CPUID[0x00000001]: 00000f23 00000800 00002000 07cbfbff | 143 | +00000000000i[APIC0] allocate APIC id=0 (MMIO enabled) to 0x0000fee00000 |
144 | +00000000000i[CPU0 ] CPU[0] is the bootstrap processor | ||
145 | +00000000000i[CPU0 ] CPUID[0x00000000]: 00000005 756e6547 6c65746e 49656e69 | ||
146 | +00000000000i[CPU0 ] CPUID[0x00000001]: 00000633 00010800 00002008 1fcbfbff | ||
135 | 00000000000i[CPU0 ] CPUID[0x00000002]: 00410601 00000000 00000000 00000000 | 147 | 00000000000i[CPU0 ] CPUID[0x00000002]: 00410601 00000000 00000000 00000000 |
136 | 00000000000i[CPU0 ] CPUID[0x00000003]: 00000000 00000000 00000000 00000000 | 148 | 00000000000i[CPU0 ] CPUID[0x00000003]: 00000000 00000000 00000000 00000000 |
137 | 00000000000i[CPU0 ] CPUID[0x00000004]: 00000000 00000000 00000000 00000000 | 149 | 00000000000i[CPU0 ] CPUID[0x00000004]: 00000000 00000000 00000000 00000000 |
138 | -00000000000i[CPU0 ] CPUID[0x00000007]: 00000000 00000000 00000000 00000000 | 150 | +00000000000i[CPU0 ] CPUID[0x00000005]: 00000040 00000040 00000003 00000020 |
139 | 00000000000i[CPU0 ] CPUID[0x80000000]: 80000008 00000000 00000000 00000000 | 151 | 00000000000i[CPU0 ] CPUID[0x80000000]: 80000008 00000000 00000000 00000000 |
140 | -00000000000i[CPU0 ] CPUID[0x80000001]: 00000000 00000000 00000001 2a100800 | 152 | +00000000000i[CPU0 ] CPUID[0x80000001]: 00000000 00000000 00000101 2a100000 |
141 | 00000000000i[CPU0 ] CPUID[0x80000002]: 20202020 20202020 20202020 6e492020 | 153 | 00000000000i[CPU0 ] CPUID[0x80000002]: 20202020 20202020 20202020 6e492020 |
142 | 00000000000i[CPU0 ] CPUID[0x80000003]: 286c6574 50202952 69746e65 52286d75 | 154 | 00000000000i[CPU0 ] CPUID[0x80000003]: 286c6574 50202952 69746e65 52286d75 |
143 | 00000000000i[CPU0 ] CPUID[0x80000004]: 20342029 20555043 20202020 00202020 | 155 | 00000000000i[CPU0 ] CPUID[0x80000004]: 20342029 20555043 20202020 00202020 |
156 | +00000000000i[CPU0 ] CPUID[0x80000005]: 01ff01ff 01ff01ff 40020140 40020140 | ||
144 | 00000000000i[CPU0 ] CPUID[0x80000006]: 00000000 42004200 02008140 00000000 | 157 | 00000000000i[CPU0 ] CPUID[0x80000006]: 00000000 42004200 02008140 00000000 |
145 | 00000000000i[CPU0 ] CPUID[0x80000007]: 00000000 00000000 00000000 00000000 | 158 | 00000000000i[CPU0 ] CPUID[0x80000007]: 00000000 00000000 00000000 00000000 |
146 | 00000000000i[CPU0 ] CPUID[0x80000008]: 00003028 00000000 00000000 00000000 | 159 | 00000000000i[CPU0 ] CPUID[0x80000008]: 00003028 00000000 00000000 00000000 |
147 | -00000000000i[PLGIN] reset of 'unmapped' plugin device by virtual method | ||
148 | -00000000000i[PLGIN] reset of 'biosdev' plugin device by virtual method | ||
149 | -00000000000i[PLGIN] reset of 'speaker' plugin device by virtual method | ||
150 | -00000000000i[PLGIN] reset of 'extfpuirq' plugin device by virtual method | ||
151 | -00000000000i[PLGIN] reset of 'gameport' plugin device by virtual method | ||
152 | -00000000000i[PLGIN] reset of 'pci_ide' plugin device by virtual method | 160 | +00000000000i[PLGIN] reset of 'pci' plugin device by virtual method |
161 | +00000000000i[PLGIN] reset of 'pci2isa' plugin device by virtual method | ||
162 | +00000000000i[PLGIN] reset of 'cmos' plugin device by virtual method | ||
163 | +00000000000i[PLGIN] reset of 'dma' plugin device by virtual method | ||
164 | +00000000000i[PLGIN] reset of 'pic' plugin device by virtual method | ||
165 | +00000000000i[PLGIN] reset of 'pit' plugin device by virtual method | ||
166 | +00000000000i[PLGIN] reset of 'floppy' plugin device by virtual method | ||
167 | +00000000000i[PLGIN] reset of 'vga' plugin device by virtual method | ||
153 | 00000000000i[PLGIN] reset of 'acpi' plugin device by virtual method | 168 | 00000000000i[PLGIN] reset of 'acpi' plugin device by virtual method |
154 | 00000000000i[PLGIN] reset of 'ioapic' plugin device by virtual method | 169 | 00000000000i[PLGIN] reset of 'ioapic' plugin device by virtual method |
155 | 00000000000i[PLGIN] reset of 'keyboard' plugin device by virtual method | 170 | 00000000000i[PLGIN] reset of 'keyboard' plugin device by virtual method |
156 | 00000000000i[PLGIN] reset of 'harddrv' plugin device by virtual method | 171 | 00000000000i[PLGIN] reset of 'harddrv' plugin device by virtual method |
157 | -00000000000i[PLGIN] reset of 'serial' plugin device by virtual method | 172 | +00000000000i[PLGIN] reset of 'pci_ide' plugin device by virtual method |
173 | +00000000000i[PLGIN] reset of 'unmapped' plugin device by virtual method | ||
174 | +00000000000i[PLGIN] reset of 'biosdev' plugin device by virtual method | ||
175 | +00000000000i[PLGIN] reset of 'speaker' plugin device by virtual method | ||
176 | +00000000000e[SPEAK] Failed to open /dev/console: Permission denied | ||
177 | +00000000000e[SPEAK] Deactivating beep on console | ||
178 | +00000000000i[PLGIN] reset of 'extfpuirq' plugin device by virtual method | ||
158 | 00000000000i[PLGIN] reset of 'parallel' plugin device by virtual method | 179 | 00000000000i[PLGIN] reset of 'parallel' plugin device by virtual method |
159 | -00000003305i[BIOS ] $Revision: 1.257 $ $Date: 2011/01/26 09:52:02 $ | ||
160 | -00000318042i[KBD ] reset-disable command received | ||
161 | -00000447872i[VBIOS] VGABios $Id: vgabios.c,v 1.75 2011/10/15 14:07:21 vruppert Exp $ | ||
162 | -00000447943i[VGA ] VBE known Display Interface b0c0 | ||
163 | -00000447975i[VGA ] VBE known Display Interface b0c5 | ||
164 | -00000450900i[VBIOS] VBE Bios $Id: vbe.c,v 1.64 2011/07/19 18:25:05 vruppert Exp $ | ||
165 | -00000771016i[BIOS ] Starting rombios32 | ||
166 | -00000771454i[BIOS ] Shutdown flag 0 | ||
167 | -00000772038i[BIOS ] ram_size=0x02000000 | ||
168 | -00000772459i[BIOS ] ram_end=32MB | ||
169 | -00000813018i[BIOS ] Found 1 cpu(s) | ||
170 | -00000828866i[BIOS ] bios_table_addr: 0x000fb928 end=0x000fcc00 | ||
171 | -00000828960i[PCI ] 440FX PMC write to PAM register 59 (TLB Flush) | ||
172 | -00001156657i[PCI ] 440FX PMC write to PAM register 59 (TLB Flush) | ||
173 | -00001484585i[P2I ] PCI IRQ routing: PIRQA# set to 0x0b | ||
174 | -00001484604i[P2I ] PCI IRQ routing: PIRQB# set to 0x09 | ||
175 | -00001484623i[P2I ] PCI IRQ routing: PIRQC# set to 0x0b | ||
176 | -00001484642i[P2I ] PCI IRQ routing: PIRQD# set to 0x09 | ||
177 | -00001484652i[P2I ] write: ELCR2 = 0x0a | ||
178 | -00001485423i[BIOS ] PIIX3/PIIX4 init: elcr=00 0a | ||
179 | -00001493095i[BIOS ] PCI: bus=0 devfn=0x00: vendor_id=0x8086 device_id=0x1237 class=0x0600 | ||
180 | -00001495370i[BIOS ] PCI: bus=0 devfn=0x08: vendor_id=0x8086 device_id=0x7000 class=0x0601 | ||
181 | -00001497484i[BIOS ] PCI: bus=0 devfn=0x09: vendor_id=0x8086 device_id=0x7010 class=0x0101 | ||
182 | -00001497708i[PIDE ] new BM-DMA address: 0xc000 | ||
183 | -00001498323i[BIOS ] region 4: 0x0000c000 | ||
184 | -00001500350i[BIOS ] PCI: bus=0 devfn=0x0b: vendor_id=0x8086 device_id=0x7113 class=0x0680 | ||
185 | -00001500579i[ACPI ] new irq line = 11 | ||
186 | -00001500591i[ACPI ] new irq line = 9 | ||
187 | -00001500616i[ACPI ] new PM base address: 0xb000 | ||
188 | -00001500630i[ACPI ] new SM base address: 0xb100 | ||
189 | -00001500658i[PCI ] setting SMRAM control register to 0x4a | ||
190 | -00001664751i[CPU0 ] Enter to System Management Mode | ||
191 | -00001664761i[CPU0 ] RSM: Resuming from System Management Mode | ||
192 | -00001828782i[PCI ] setting SMRAM control register to 0x0a | ||
193 | -00001837532i[BIOS ] MP table addr=0x000fba00 MPC table addr=0x000fb930 size=0xd0 | ||
194 | -00001839346i[BIOS ] SMBIOS table addr=0x000fba10 | ||
195 | -00001842501i[BIOS ] Firmware waking vector 0x1ff00cc | ||
196 | -00001847425i[BIOS ] ACPI tables: RSDP addr=0x000fbb30 ACPI DATA addr=0x01ff0000 size=0x1f18 | ||
197 | -00001847461i[PCI ] 440FX PMC write to PAM register 59 (TLB Flush) | ||
198 | -00001848185i[BIOS ] bios_table_cur_addr: 0x000fbb54 | ||
199 | -00014041548i[BIOS ] Booting from 0000:7c00 | ||
200 | -00097000000p[SDL ] >>PANIC<< POWER button turned off. | ||
201 | -00097000000i[CPU0 ] CPU is in real mode (active) | ||
202 | -00097000000i[CPU0 ] CS.d_b = 16 bit | ||
203 | -00097000000i[CPU0 ] SS.d_b = 16 bit | ||
204 | -00097000000i[CPU0 ] EFER = 0x00000000 | ||
205 | -00097000000i[CPU0 ] | RAX=0000000000000000 RBX=0000000000000000 | ||
206 | -00097000000i[CPU0 ] | RCX=0000000000090000 RDX=0000000000000000 | ||
207 | -00097000000i[CPU0 ] | RSP=000000000000ffd2 RBP=0000000000000000 | ||
208 | -00097000000i[CPU0 ] | RSI=00000000000e7c0b RDI=000000000000ffac | ||
209 | -00097000000i[CPU0 ] | R8=0000000000000000 R9=0000000000000000 | ||
210 | -00097000000i[CPU0 ] | R10=0000000000000000 R11=0000000000000000 | ||
211 | -00097000000i[CPU0 ] | R12=0000000000000000 R13=0000000000000000 | ||
212 | -00097000000i[CPU0 ] | R14=0000000000000000 R15=0000000000000000 | ||
213 | -00097000000i[CPU0 ] | IOPL=0 id vip vif ac vm rf nt of df if tf sf ZF af PF cf | ||
214 | -00097000000i[CPU0 ] | SEG selector base limit G D | ||
215 | -00097000000i[CPU0 ] | SEG sltr(index|ti|rpl) base limit G D | ||
216 | -00097000000i[CPU0 ] | CS:0000( 0004| 0| 0) 00000000 0000ffff 0 0 | ||
217 | -00097000000i[CPU0 ] | DS:0000( 0005| 0| 0) 00000000 0000ffff 0 0 | ||
218 | -00097000000i[CPU0 ] | SS:0000( 0005| 0| 0) 00000000 0000ffff 0 0 | ||
219 | -00097000000i[CPU0 ] | ES:0000( 0005| 0| 0) 00000000 0000ffff 0 0 | ||
220 | -00097000000i[CPU0 ] | FS:0000( 0005| 0| 0) 00000000 0000ffff 0 0 | ||
221 | -00097000000i[CPU0 ] | GS:0000( 0005| 0| 0) 00000000 0000ffff 0 0 | ||
222 | -00097000000i[CPU0 ] | MSR_FS_BASE:0000000000000000 | ||
223 | -00097000000i[CPU0 ] | MSR_GS_BASE:0000000000000000 | ||
224 | -00097000000i[CPU0 ] | RIP=0000000000007c1d (0000000000007c1d) | ||
225 | -00097000000i[CPU0 ] | CR0=0x60000010 CR2=0x0000000000000000 | ||
226 | -00097000000i[CPU0 ] | CR3=0x00000000 CR4=0x00000000 | ||
227 | -00097000000i[CPU0 ] 0x0000000000007c1d>> jmp .-2 (0x00007c1d) : EBFE | ||
228 | -00097000000i[CMOS ] Last time is 1396036158 (Fri Mar 28 20:49:18 2014) | ||
229 | -00097000000i[ ] restoring default signal behavior | ||
230 | -00097000000i[CTRL ] quit_sim called with exit code 1 | 180 | +00000000000i[PLGIN] reset of 'serial' plugin device by virtual method |
181 | +00000000000i[PLGIN] reset of 'gameport' plugin device by virtual method | ||
182 | +00000000000i[PLGIN] reset of 'iodebug' plugin device by virtual method | ||
183 | +00000000000i[PLGIN] reset of 'usb_uhci' plugin device by virtual method | ||
184 | +00000000000i[XGUI ] Mouse capture off | ||
185 | +00000000000i[XGUI ] Mouse capture off | ||
186 | +00000000000i[MEM0 ] allocate_block: block=0x0 used 0x1 of 0x20 | ||
187 | +00000004661i[BIOS ] $Revision: 11545 $ $Date: 2012-11-11 09:11:17 +0100 (So, 11. Nov 2012) $ | ||
188 | +00000318044i[KBD ] reset-disable command received | ||
189 | +00000320816i[BIOS ] Starting rombios32 | ||
190 | +00000321250i[BIOS ] Shutdown flag 0 | ||
191 | +00000321845i[BIOS ] ram_size=0x02000000 | ||
192 | +00000322266i[BIOS ] ram_end=32MB | ||
193 | +00000362765i[BIOS ] Found 1 cpu(s) | ||
194 | +00000376952i[BIOS ] bios_table_addr: 0x000fa448 end=0x000fcc00 | ||
195 | +00000704749i[PCI ] i440FX PMC write to PAM register 59 (TLB Flush) | ||
196 | +00001032676i[P2I ] PCI IRQ routing: PIRQA# set to 0x0b | ||
197 | +00001032695i[P2I ] PCI IRQ routing: PIRQB# set to 0x09 | ||
198 | +00001032714i[P2I ] PCI IRQ routing: PIRQC# set to 0x0b | ||
199 | +00001032733i[P2I ] PCI IRQ routing: PIRQD# set to 0x09 | ||
200 | +00001032743i[P2I ] write: ELCR2 = 0x0a | ||
201 | +00001033509i[BIOS ] PIIX3/PIIX4 init: elcr=00 0a | ||
202 | +00001041225i[BIOS ] PCI: bus=0 devfn=0x00: vendor_id=0x8086 device_id=0x1237 class=0x0600 | ||
203 | +00001043495i[BIOS ] PCI: bus=0 devfn=0x08: vendor_id=0x8086 device_id=0x7000 class=0x0601 | ||
204 | +00001045604i[BIOS ] PCI: bus=0 devfn=0x09: vendor_id=0x8086 device_id=0x7010 class=0x0101 | ||
205 | +00001045833i[PIDE ] new BM-DMA address: 0xc000 | ||
206 | +00001046450i[BIOS ] region 4: 0x0000c000 | ||
207 | +00001048452i[BIOS ] PCI: bus=0 devfn=0x0a: vendor_id=0x8086 device_id=0x7020 class=0x0c03 | ||
208 | +00001048656i[UHCI ] new base address: 0xc020 | ||
209 | +00001049273i[BIOS ] region 4: 0x0000c020 | ||
210 | +00001049399i[UHCI ] new irq line = 9 | ||
211 | +00001051284i[BIOS ] PCI: bus=0 devfn=0x0b: vendor_id=0x8086 device_id=0x7113 class=0x0680 | ||
212 | +00001051517i[ACPI ] new irq line = 11 | ||
213 | +00001051529i[ACPI ] new irq line = 9 | ||
214 | +00001051558i[ACPI ] new PM base address: 0xb000 | ||
215 | +00001051572i[ACPI ] new SM base address: 0xb100 | ||
216 | +00001051600i[PCI ] setting SMRAM control register to 0x4a | ||
217 | +00001215691i[CPU0 ] Enter to System Management Mode | ||
218 | +00001215701i[CPU0 ] RSM: Resuming from System Management Mode | ||
219 | +00001379719i[PCI ] setting SMRAM control register to 0x0a | ||
220 | +00001394653i[BIOS ] MP table addr=0x000fa520 MPC table addr=0x000fa450 size=0xc8 | ||
221 | +00001396409i[BIOS ] SMBIOS table addr=0x000fa530 | ||
222 | +00001396467i[MEM0 ] allocate_block: block=0x1f used 0x2 of 0x20 | ||
223 | +00001398604i[BIOS ] ACPI tables: RSDP addr=0x000fa650 ACPI DATA addr=0x01ff0000 size=0xf72 | ||
224 | +00001401801i[BIOS ] Firmware waking vector 0x1ff00cc | ||
225 | +00001403599i[PCI ] i440FX PMC write to PAM register 59 (TLB Flush) | ||
226 | +00001404327i[BIOS ] bios_table_cur_addr: 0x000fa674 | ||
227 | +00001531944i[VBIOS] VGABios $Id: vgabios.c,v 1.75 2011/10/15 14:07:21 vruppert Exp $ | ||
228 | +00001532015i[BXVGA] VBE known Display Interface b0c0 | ||
229 | +00001532047i[BXVGA] VBE known Display Interface b0c5 | ||
230 | +00001534972i[VBIOS] VBE Bios $Id: vbe.c,v 1.64 2011/07/19 18:25:05 vruppert Exp $ | ||
231 | +00001600001i[XGUI ] charmap update. Font Height is 16 | ||
232 | +00014040325i[BIOS ] Booting from 0000:7c00 | ||
233 | +00014400001i[XGUI ] charmap update. Font Height is 16 | ||
234 | +00172500000p[XGUI ] >>PANIC<< POWER button turned off. | ||
235 | +00172500000i[CPU0 ] CPU is in real mode (active) | ||
236 | +00172500000i[CPU0 ] CS.mode = 16 bit | ||
237 | +00172500000i[CPU0 ] SS.mode = 16 bit | ||
238 | +00172500000i[CPU0 ] EFER = 0x00000000 | ||
239 | +00172500000i[CPU0 ] | EAX=00001000 EBX=00000000 ECX=00090000 EDX=00000000 | ||
240 | +00172500000i[CPU0 ] | ESP=0000ffde EBP=00000000 ESI=000e7c0b EDI=00000400 | ||
241 | +00172500000i[CPU0 ] | IOPL=0 id vip vif ac vm rf nt of df if tf sf ZF af PF cf | ||
242 | +00172500000i[CPU0 ] | SEG sltr(index|ti|rpl) base limit G D | ||
243 | +00172500000i[CPU0 ] | CS:0000( 0004| 0| 0) 00000000 0000ffff 0 0 | ||
244 | +00172500000i[CPU0 ] | DS:0000( 0005| 0| 0) 00000000 0000ffff 0 0 | ||
245 | +00172500000i[CPU0 ] | SS:0000( 0005| 0| 0) 00000000 0000ffff 0 0 | ||
246 | +00172500000i[CPU0 ] | ES:1000( 0005| 0| 0) 00010000 0000ffff 0 0 | ||
247 | +00172500000i[CPU0 ] | FS:0000( 0005| 0| 0) 00000000 0000ffff 0 0 | ||
248 | +00172500000i[CPU0 ] | GS:0000( 0005| 0| 0) 00000000 0000ffff 0 0 | ||
249 | +00172500000i[CPU0 ] | EIP=00007c8e (00007c8e) | ||
250 | +00172500000i[CPU0 ] | CR0=0x60000010 CR2=0x00000000 | ||
251 | +00172500000i[CPU0 ] | CR3=0x00000000 CR4=0x00000000 | ||
252 | +00172500000i[CMOS ] Last time is 1396139507 (Sun Mar 30 01:31:47 2014) | ||
253 | +00172500000i[XGUI ] Exit | ||
254 | +00172500000i[CTRL ] quit_sim called with exit code 1 |
bochsrc.txt renamed to bochsrc
boot.asm
@@ -8,92 +8,107 @@ | @@ -8,92 +8,107 @@ | ||
8 | ;GREY 0x7 | 8 | ;GREY 0x7 |
9 | ;DARK_GREY 0x8 | 9 | ;DARK_GREY 0x8 |
10 | ;LIGHT_BLUE 0x9 | 10 | ;LIGHT_BLUE 0x9 |
11 | -;LIGHT_GREEN 0xA | 11 | +;LIGHT_GREEN 0xA |
12 | ;LIGHT_CYAN 0xB | 12 | ;LIGHT_CYAN 0xB |
13 | ;LIGHT_RED 0xC | 13 | ;LIGHT_RED 0xC |
14 | -;LIGHT_MAGENTA 0xD | ||
15 | -;LIGHT_BROWN 0xE | 14 | +;LIGHT_MAGENTA 0xD |
15 | +;LIGHT_BROWN 0xE | ||
16 | ;WHITE 0xF | 16 | ;WHITE 0xF |
17 | 17 | ||
18 | [BITS 16] | 18 | [BITS 16] |
19 | [org 0x7C00] | 19 | [org 0x7C00] |
20 | 20 | ||
21 | -JMP short Start | 21 | +JMP short Start |
22 | 22 | ||
23 | -str: db 'THE GAME ',0x00 | ||
24 | - | ||
25 | - | ||
26 | - | ||
27 | -Start: | ||
28 | - XOR ax, ax | ||
29 | - MOV ds, ax | ||
30 | - CALL clear_screen | ||
31 | - PUSH 2 ; num | ||
32 | - PUSH 2 ; offset | ||
33 | - ;CALL print_sector ; (offset, num) | ||
34 | - ;ADD esp, 12 | ||
35 | - for_start_0: | ||
36 | - MOV si,str | ||
37 | - CALL print_string | ||
38 | - ;JMP for_start_0 | ||
39 | - JMP $ | 23 | +str: db 'THE GAME ',0x00 |
40 | 24 | ||
41 | clear_screen: | 25 | clear_screen: |
26 | + PUSH ax | ||
42 | MOV al, 02h ; Setting the graphical mode 80x25(text) | 27 | MOV al, 02h ; Setting the graphical mode 80x25(text) |
43 | - MOV ah, 00h ; Code of the function of changing video mode | ||
44 | - INT 10h ; Call interruption | 28 | + MOV ah, 00h ; Code of the function of changing video mode |
29 | + INT 10h ; Call interruption | ||
30 | + POP ax | ||
45 | RETN | 31 | RETN |
46 | 32 | ||
47 | print_string: ; Expects null terminated message in si | 33 | print_string: ; Expects null terminated message in si |
48 | - ;MOV bl,0x00 | 34 | + PUSH ax |
49 | for_print_string_0: | 35 | for_print_string_0: |
50 | MOV al,[si] | 36 | MOV al,[si] |
51 | - OR al,al | ||
52 | - JZ .end | 37 | + OR al,al |
38 | + JZ end_for_print_string_0 | ||
53 | INC si | 39 | INC si |
54 | CALL print_char | 40 | CALL print_char |
55 | - ;INCL bl | ||
56 | JMP for_print_string_0 | 41 | JMP for_print_string_0 |
57 | - .end: | 42 | + end_for_print_string_0: |
43 | + POP ax | ||
58 | RETN | 44 | RETN |
59 | 45 | ||
60 | print_sector: | 46 | print_sector: |
61 | PUSH ebp | 47 | PUSH ebp |
62 | - MOV ebp, esp | 48 | + MOV ebp, esp |
63 | PUSH ax | 49 | PUSH ax |
64 | PUSH bx | 50 | PUSH bx |
65 | PUSH cx | 51 | PUSH cx |
66 | PUSH dx | 52 | PUSH dx |
67 | - MOV al, [12 + ebp] | ||
68 | - MOV cl, [8 + ebp] | 53 | + MOV al, [6 + ebp] ; num |
54 | + MOV cl, [8 + ebp] ; offset | ||
69 | MOV ah, 2 | 55 | MOV ah, 2 |
70 | - MOV ch, 0 | ||
71 | - MOV dh, 0 | ||
72 | - INT 0x13 | ||
73 | - POP dx | ||
74 | - POP cx | ||
75 | - POP bx | ||
76 | - POP ax | ||
77 | - MOV esp, ebp | ||
78 | - POP ebp | 56 | + XOR ch, ch |
57 | + XOR dx,dx | ||
58 | + INT 0x13 | ||
59 | + MOV di, 512 | ||
60 | + XOR ah, ah | ||
61 | + IMUL di, ax | ||
62 | + XOR si, si | ||
63 | + for_print_sector_0: | ||
64 | + CMP si, di | ||
65 | + JZ end_for_print_sector_0 | ||
66 | + MOV al,[es:si] | ||
67 | + OR al, al | ||
68 | + JZ end_print_char_0 | ||
69 | + CALL print_char | ||
70 | + end_print_char_0: | ||
71 | + INC si | ||
72 | + JMP for_print_sector_0 | ||
73 | + end_for_print_sector_0: | ||
74 | + POP dx | ||
75 | + POP cx | ||
76 | + POP bx | ||
77 | + POP ax | ||
78 | + MOV esp, ebp | ||
79 | + POP ebp | ||
79 | RETN | 80 | RETN |
80 | 81 | ||
81 | print_char: | 82 | print_char: |
82 | - PUSH ebp | ||
83 | - MOV ebp, esp | ||
84 | PUSH ax | 83 | PUSH ax |
85 | PUSH bx | 84 | PUSH bx |
86 | MOV ah,0x0E ; Specifies that we want to write a character to the screen | 85 | MOV ah,0x0E ; Specifies that we want to write a character to the screen |
87 | MOV bl,0x02 ; Specifies output text color. Not required, but useful to know | 86 | MOV bl,0x02 ; Specifies output text color. Not required, but useful to know |
88 | MOV bh,0x00 ; Page number. Leave this alone. | 87 | MOV bh,0x00 ; Page number. Leave this alone. |
89 | INT 0x10 ; Signal video interrupt to BIOS | 88 | INT 0x10 ; Signal video interrupt to BIOS |
90 | - POP bx | ||
91 | - POP ax | ||
92 | - MOV esp,ebp | ||
93 | - POP ebp | 89 | + POP bx |
90 | + POP ax | ||
94 | RETN | 91 | RETN |
95 | 92 | ||
96 | -TIMES 510 - ($ - $$) db 0 | 93 | +Start: |
94 | +XOR ax, ax | ||
95 | +MOV ds, ax | ||
96 | +MOV ax, 0x1000 | ||
97 | +MOV es, ax | ||
98 | +XOR bx, bx | ||
99 | +CALL clear_screen | ||
100 | +PUSH 2 ; num | ||
101 | +PUSH 2 ; offset | ||
102 | +CALL print_sector ; (offset, num) | ||
103 | +ADD esp, 12 | ||
104 | +for_start_0: | ||
105 | + MOV si,str | ||
106 | + CALL print_string | ||
107 | + ;JMP for_start_0 | ||
108 | + JMP $ | ||
109 | + | ||
110 | + | ||
111 | +TIMES 510 - ($ - $$) db 0 | ||
97 | DW 0xAA55 | 112 | DW 0xAA55 |
98 | 113 | ||
99 | 114 |
boot.bin
No preview for this file type
floppy.img
No preview for this file type