Unios,只有引导部分:
代码与注释如下,来源已标明(希望作者原谅我随意加注释,红色的注释是我加的):
/****************************************************************/
/* set to 16 bit mode (80x86 begin in real mode) text
section to 0 */
.code16
.text
.org 0x00
.global _start
_start:
mov $0x07C0,%ax /*BIOS自动读取MBR,并将这512B的数据放置于偏移7c00H处,只要这512B以55AA结束*/
mov %ax,%ds /*就把这作为代码段了*/
call booting
xor %dx,%dx /* test if dx == 0 */
call working
call idleloop
ret
/*打印信息并回车*/
booting:
mov $boot,%si
call message
call nl
ret
message:
cld &nbs

如果有一天我的眼睛瞎了,我也失去了一切,我会做到像他一样吗?