1 %include "PrintLib.inc" 2 3 org 07c00h 4 ;org 0100h 5 mov ax,cs 6 mov ds,ax 7 mov es,ax 8 9 mov ah,10h 10 mov al,03h 11 mov bl,01h 12 int 10h 13 14 PrintString BootMessage,LenOfBootMessage,display_mode_2,0h,(ATTR_BLACK<<4)|ATTR_GREEN,0000h 15 16 hlt ;停机 17 18 19 BootMessage: db "Dreamix Starting Please wait..." 20 LenOfBootMessage equ $-BootMessage 21 22 times 510-($-$) db 0 23 dw 0xaa55 |
1 %ifndef PrintLib 2 %define PrintLib 3 4 ;此宏在实模式下使用,属于BIOS子功能调用 5 6 ;显示模式 7 %define display_mode_1 00h ;字符串只包含字符码,显示之后不更新光标位置,属性值在BL中 8 %define display_mode_2 01h ;字符串只包含字符码,显示之后更新光标位置,属性值在BL中 9 %define display_mode_3 02h ;字符串包含字符码及其属性值,显示之后不更新光标位置 10 %define display_mode_4 03h ;字符串包含字符码及其属性值,显示之后更新光标位置 11 12 ;背景及字体格式属性值 13 %define ATTR_BLACK 0h 14 %define ATTR_BLUE 01h 15 %define ATTR_GREEN 02H 16 %define ATTR_PURPLE 03h 17 %define ATTR_RED 04h 18 %define ATTR_MAGENTA 05h 19 %define ATTR_BROWN 06h 20 %define ATTR_GREYISH 07h 21 %define ATTR_GREY 08h 22 %define ATTR_LIGHTBLUE 09h 23 %define ATTR_LIGHTGREEN 0Ah 24 %define ATTR_LIGHTPURPLE 0Bh 25 %define ATTR_LIGHTRED 0Ch 26 %define ATTR_LIGHTMAGENTA 0Dh 27 %define ATTR_YELLOW 0Eh 28 %define ATTR_WHITE 0Fh 29 30 ;参数: 1.要显示的字符串标号 2.要显示的字符串的长度值 31 ; 3.显示模式 32 ; 4.视频页号 33 ; 5.当显示模式选3和4时为0h,否则需要背景和字符的格式属性值 34 ; 6.显示的列和行 35 %macro PrintString 6 36 37 push ax 38 push bp 39 push cx 40 push bx 41 push dx 42 43 mov ax,%1 44 mov bp,ax 45 mov cx,%2 46 mov ax,01300h + %3 47 mov bx,%4 + %5 48 mov dx,%6 49 int 10h 50 51 pop dx 52 pop bx 53 pop cx 54 pop bp 55 pop ax 56 %endmacro 57 58 %endif |
Offset 0 1 2 3 4 5 6 7 8 9 A B C D E F00000000 8C C8 8E D8 8E C0 B4 10 B0 03 B3 01 CD 10 50 55 ???????.°.?.?.PU 00000010 51 53 52 B8 2C 7C 89 C5 B9 1F 00 B8 01 13 BB 02 QSR?,|‰??..?..?. 00000020 00 BA 00 00 CD 10 5A 5B 59 5D 58 F4 44 72 65 61 .?..?.Z[Y]X?Drea 00000030 6D 69 78 20 53 74 61 72 74 69 6E 67 20 50 6C 65 mix Starting Ple 00000040 61 73 65 20 77 61 69 74 2E 2E 2E 00 00 00 00 00 ase wait........ 00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 000000A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 000000B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 000000C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 000000D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 000000E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 000000F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 000001A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 000001B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 000001C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 000001D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 000001E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 000001F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA ..............U? |
<bochs:3> disassemble 0x7c00 0x7c30 00007c00: ( ): mov ax, cs ; 8cc8 00007c02: ( ): mov ds, ax ; 8ed8 00007c04: ( ): mov es, ax ; 8ec0 00007c06: ( ): mov ah, 0x10 ; b410 00007c08: ( ): mov al, 0x3 ; b003 00007c0a: ( ): mov bl, 0x1 ; b301 00007c0c: ( ): int 0x10 ; cd10 00007c0e: ( ): push ax ; 50 00007c0f: ( ): push bp ; 55 00007c10: ( ): push cx ; 51 00007c11: ( ): push bx ; 53 00007c12: ( ): push dx ; 52 00007c13: ( ): mov ax, 0x2c ; b82c00 00007c16: ( ): mov bp, ax ; 89c5 00007c18: ( ): mov cx, 0x1f ; b91f00 00007c1b: ( ): mov ax, 0x1301 ; b80113 00007c1e: ( ): mov bx, 0x2 ; bb0200 00007c21: ( ): mov dx, 0x0 ; ba0000 00007c24: ( ): int 0x10 ; cd10 00007c26: ( ): pop dx ; 5a 00007c27: ( ): pop bx ; 5b 00007c28: ( ): pop cx ; 59 00007c29: ( ): pop bp ; 5d 00007c2a: ( ): pop ax ; 58 00007c2b: ( ): hlt ; f4 00007c2c: ( ): inc sp ; 44 00007c2d: ( ): jb .+0x7c94 ; 7265 00007c2f: ( ): popa ; 61 |
<bochs:7> info registers eax 0xfffaa55 268413525 ecx 0xa0001 655361 edx 0x0 0 ebx 0x0 0 esp 0xfffe 0xfffe ebp 0x0 0x0 esi 0xa070 41072 edi 0xffde 65502 eip 0x7c00 0x7c00 eflags 0x82 130 cs 0x0 0 ss 0x0 0 ds 0x0 0 es 0x0 0 fs 0x0 0 gs 0x0 0 |
<bochs:5> disassemble 0x7c00 0x7c30 00007c00: ( ): mov ax, cs ; 8cc8 00007c02: ( ): mov ds, ax ; 8ed8 00007c04: ( ): mov es, ax ; 8ec0 00007c06: ( ): mov ah, 0x10 ; b410 00007c08: ( ): mov al, 0x3 ; b003 00007c0a: ( ): mov bl, 0x1 ; b301 00007c0c: ( ): int 0x10 ; cd10 00007c0e: ( ): push ax ; 50 00007c0f: ( ): push bp ; 55 00007c10: ( ): push cx ; 51 00007c11: ( ): push bx ; 53 00007c12: ( ): push dx ; 52 00007c13: ( ): mov ax, 0x7c2c ; b82c7c 00007c16: ( ): mov bp, ax ; 89c5 00007c18: ( ): mov cx, 0x1f ; b91f00 00007c1b: ( ): mov ax, 0x1301 ; b80113 00007c1e: ( ): mov bx, 0x2 ; bb0200 00007c21: ( ): mov dx, 0x0 ; ba0000 00007c24: ( ): int 0x10 ; cd10 00007c26: ( ): pop dx ; 5a 00007c27: ( ): pop bx ; 5b 00007c28: ( ): pop cx ; 59 00007c29: ( ): pop bp ; 5d 00007c2a: ( ): pop ax ; 58 00007c2b: ( ): hlt ; f4 00007c2c: ( ): inc sp ; 44 00007c2d: ( ): jb .+0x7c94 ; 7265 00007c2f: ( ): popa ; 61 |