📄 boot_fd.lst
字号:
1 [BITS 16]
2 [ORG 0x7C00]
3
4 00000000 EB3C jmp Entry
5 00000002 90 nop
6
7 00000003 4E55434C45555330 OEM_ID db "NUCLEUS0"
8 0000000B 0002 BytesPerSector dw 0x0200
9 0000000D 01 SectorsPerCluster db 0x01
10 0000000E 0100 ReservedSectors dw 0x0001
11 00000010 02 TotalFATs db 0x02
12 00000011 E000 MaxRootEntries dw 0x00E0
13 00000013 400B TotalSectorsSmall dw 0x0B40
14 00000015 F0 MediaDescriptor db 0xF0
15 00000016 0900 SectorsPerFAT dw 0x0009
16 00000018 1200 SectorsPerTrack dw 0x0012
17 0000001A 0200 NumHeads dw 0x0002
18 0000001C 00000000 HiddenSectors dd 0x00000000
19 00000020 00000000 TotalSectorsLarge dd 0x00000000
20 00000024 00 DriveNumber db 0x00
21 00000025 00 Flags db 0x00
22 00000026 29 Signature db 0x29
23 00000027 0DD001C0 VolumeID dd 0xC001D00D
24 0000002B 4E55434C455553424F- VolumeLabel db "NUCLEUSBOOT"
25 00000034 4F54
26 00000036 4641543132202020 SystemID db "FAT12 "
27
28 Entry:
29 ; code located at 0000:7C00, adjust segment registers
30 0000003E EA[4300]0000 jmp 0x0000:_Start
31
32 _Start:
33 00000043 FA cli
34 00000044 8CC8 mov ax, cs
35 00000046 8ED8 mov ds, ax
36 00000048 8EC0 mov es, ax
37 0000004A 8EE0 mov fs, ax
38 0000004C 8EE8 mov gs, ax
39 0000004E 8816[2400] mov [DriveNumber],dl ; Use drive number passed from BIOS
40 ; create stack
41 00000052 8ED0 mov ss, ax
42 00000054 BCF8FF mov sp, 0xFFF8
43 00000057 FB sti
44 ; post message
45 00000058 BE[C501] mov si, msgLoading
46 0000005B E8CF00 call DisplayMessage
47 LOAD_ROOT:
48 ; compute size of root directory and store in 慶x
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -