Closed GoogleCodeExporter closed 9 years ago
第三章图3.7中代码开头部分缺失注释。 原代码: 22 /* Global Descriptor Table */ 23 LABEL_GDT: Descriptor 0, 0, 0 24 LABEL_DESC_CODE32: Descriptor 0, (SegCode32Len - 1), (DA_C + DA_32) 25 LABEL_DESC_VIDEO: Descriptor 0xB8000, 0xffff, DA_DRW 26 27 .set GdtLen, (. - LABEL_GDT) /* GDT Length */ 28 29 GdtPtr: .2byte (GdtLen - 1) /* GDT Limit */ 30 .4byte 0 /* GDT Base */ 31 32 /* GDT Selector */ 33 .set SelectorCode32, (LABEL_DESC_CODE32 - LABEL_GDT) 34 .set SelectorVideo, (LABEL_DESC_VIDEO - LABEL_GDT) 35 36 /* Program starts here. */ 37 LABEL_BEGIN: 38 mov %cs, %ax /* Move code segment address(CS) to data segment */ 39 mov %ax, %ds /* register(DS), ES and SS. Because we have */ 40 mov %ax, %es /* embedded .data section into .code section in */ 41 mov %ax, %ss /* the start(metioned in the NOTE above). */ 修改后应该是: <-------------------下面的注释是为了和第41行呼应 17 /* NOTE! Wenbo-20080512: Actually here we put the normal .data section into 18 the .code section. For application SW, it is not allowed. However, we are 18 writting an OS. That is OK. Because there is no OS to complain about 19 that behavior. :) */ 20 21 /* Global Descriptor Table */ 22 /* Global Descriptor Table */ 23 LABEL_GDT: Descriptor 0, 0, 0 24 LABEL_DESC_CODE32: Descriptor 0, (SegCode32Len - 1), (DA_C + DA_32) 25 LABEL_DESC_VIDEO: Descriptor 0xB8000, 0xffff, DA_DRW 26 27 .set GdtLen, (. - LABEL_GDT) /* GDT Length */ 28 29 GdtPtr: .2byte (GdtLen - 1) /* GDT Limit */ 30 .4byte 0 /* GDT Base */ 31 32 /* GDT Selector */ 33 .set SelectorCode32, (LABEL_DESC_CODE32 - LABEL_GDT) 34 .set SelectorVideo, (LABEL_DESC_VIDEO - LABEL_GDT) 35 36 /* Program starts here. */ 37 LABEL_BEGIN: 38 mov %cs, %ax /* Move code segment address(CS) to data segment */ 39 mov %ax, %ds /* register(DS), ES and SS. Because we have */ 40 mov %ax, %es /* embedded .data section into .code section in */ 41 mov %ax, %ss /* the start(metioned in the NOTE above). */
Original issue reported on code.google.com by yaolei135@gmail.com on 14 Nov 2008 at 2:51
yaolei135@gmail.com
代码第41行metioned存在拼写错误
Original comment by yaolei135@gmail.com on 14 Nov 2008 at 2:59
Fixed in SVN revision r60.
Original comment by solrex on 23 Nov 2008 at 3:05
solrex
Original issue reported on code.google.com by
yaolei135@gmail.com
on 14 Nov 2008 at 2:51