BackupGGCode / writeos

Write Your Own OS with Free and Open Source Software (Chinese)
1 stars 1 forks source link

第三章图3.6中代码第一行缺失代码 #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
第三章图3.6中代码第一行缺失代码。
原文:
83 .code32
84      mov     $(SelectorVideo), %ax
85      mov     %ax, %gs                /* Video segment selector(dest) */
86
87      movl    $((80 * 10 + 0) * 2), %edi
88      movb    $0xC, %ah               /* 0000: Black Back 1100: Red Front */
89      movb    $’P’, %al
90
91      mov     %ax, %gs:(%edi)
92
93      /* Stop here, infinate loop. */
94      jmp     .
95
96 /* Get the length of 32-bit segment code. */
97 .set     SegCode32Len, . - LABEL_SEG_CODE32

修改后应该是:
82 LABEL_SEG_CODE32:          <--------------------- 
添加这一行,和第97行呼应
83 .code32
84      mov     $(SelectorVideo), %ax
85      mov     %ax, %gs                /* Video segment selector(dest) */
86
87      movl    $((80 * 10 + 0) * 2), %edi
88      movb    $0xC, %ah               /* 0000: Black Back 1100: Red Front */
89      movb    $’P’, %al
90
91      mov     %ax, %gs:(%edi)
92
93      /* Stop here, infinate loop. */
94      jmp     .
95
96 /* Get the length of 32-bit segment code. */
97 .set     SegCode32Len, . - LABEL_SEG_CODE32

Original issue reported on code.google.com by yaolei135@gmail.com on 14 Nov 2008 at 2:45

GoogleCodeExporter commented 9 years ago
Fixed in SVN revision r60.

Original comment by solrex on 23 Nov 2008 at 3:04