bootsect.s

来自「南京航空航天大学开发的一个类Unix和Linux的操作系统,好不好看看就知道了,」· S 代码 · 共 29 行

S
29
字号
#include "bootparam.h"#include "bios.h"/* bootsect is loaded into 0000:7c00 (not 07c0:0000), its will    load setup into SETUPSEG, then setup contiue to load kernel */	.code16	.text	cli	ljmp $0x7c0,$nextnext:	pushw %cs	popw %ss	xorw %sp,%sp	movw $SETUPSEG,%ax	movw %ax,%es	xorw %bx,%bx	movb $READ,%service	movb $DISKA,%drive	movb $0,%cyl	movb $0,%head	movb $2,%sect		/* sector count from 1 */	movb $SETUPSIZE/SECTSIZE,%nsect	int $0x13ioerr:	jc ioerr	ljmp $SETUPSEG,$0	.org 510magic: .word 0xaa55

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?