亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? bootsect.s

?? LINUX1.0源代碼,代碼條理清晰
?? S
字號:
!
! SYS_SIZE is the number of clicks (16 bytes) to be loaded.
! 0x7F00 is 0x7F000 bytes = 508kB, more than enough for current
! versions of linux which compress the kernel
!
#include <linux/config.h>
SYSSIZE = DEF_SYSSIZE
!
!	bootsect.s		Copyright (C) 1991, 1992 Linus Torvalds
!	modified by Drew Eckhardt
!	modified by Bruce Evans (bde)
!
! bootsect.s is loaded at 0x7c00 by the bios-startup routines, and moves
! itself out of the way to address 0x90000, and jumps there.
!
! bde - should not jump blindly, there may be systems with only 512K low
! memory.  Use int 0x12 to get the top of memory, etc.
!
! It then loads 'setup' directly after itself (0x90200), and the system
! at 0x10000, using BIOS interrupts. 
!
! NOTE! currently system is at most (8*65536-4096) bytes long. This should 
! be no problem, even in the future. I want to keep it simple. This 508 kB
! kernel size should be enough, especially as this doesn't contain the
! buffer cache as in minix (and especially now that the kernel is 
! compressed :-)
!
! The loader has been made as simple as possible, and continuos
! read errors will result in a unbreakable loop. Reboot by hand. It
! loads pretty fast by getting whole tracks at a time whenever possible.

.text

SETUPSECS = 4				! nr of setup-sectors
BOOTSEG   = 0x07C0			! original address of boot-sector
INITSEG   = DEF_INITSEG			! we move boot here - out of the way
SETUPSEG  = DEF_SETUPSEG		! setup starts here
SYSSEG    = DEF_SYSSEG			! system loaded at 0x10000 (65536).

! ROOT_DEV & SWAP_DEV are now written by "build".
ROOT_DEV = 0
SWAP_DEV = 0
#ifndef SVGA_MODE
#define SVGA_MODE ASK_VGA
#endif
#ifndef RAMDISK
#define RAMDISK 0
#endif 
#ifndef CONFIG_ROOT_RDONLY
#define CONFIG_ROOT_RDONLY 0
#endif

! ld86 requires an entry symbol. This may as well be the usual one.
.globl	_main
_main:
#if 0 /* hook for debugger, harmless unless BIOS is fussy (old HP) */
	int	3
#endif
	mov	ax,#BOOTSEG
	mov	ds,ax
	mov	ax,#INITSEG
	mov	es,ax
	mov	cx,#256
	sub	si,si
	sub	di,di
	cld
	rep
	movsw
	jmpi	go,INITSEG

go:	mov	ax,cs		
	mov	dx,#0x4000-12	! 0x4000 is arbitrary value >= length of
				! bootsect + length of setup + room for stack
				! 12 is disk parm size

! bde - changed 0xff00 to 0x4000 to use debugger at 0x6400 up (bde).  We
! wouldn't have to worry about this if we checked the top of memory.  Also
! my BIOS can be configured to put the wini drive tables in high memory
! instead of in the vector table.  The old stack might have clobbered the
! drive table.

	mov	ds,ax
	mov	es,ax
	mov	ss,ax		! put stack at INITSEG:0x4000-12.
	mov	sp,dx
/*
 *	Many BIOS's default disk parameter tables will not 
 *	recognize multi-sector reads beyond the maximum sector number
 *	specified in the default diskette parameter tables - this may
 *	mean 7 sectors in some cases.
 *
 *	Since single sector reads are slow and out of the question,
 *	we must take care of this by creating new parameter tables
 *	(for the first disk) in RAM.  We will set the maximum sector
 *	count to 18 - the most we will encounter on an HD 1.44.  
 *
 *	High doesn't hurt.  Low does.
 *
 *	Segments are as follows: ds=es=ss=cs - INITSEG,
 *		fs = 0, gs = parameter table segment
 */

	push	#0
	pop	fs
	mov	bx,#0x78		! fs:bx is parameter table address
	seg fs
	lgs	si,(bx)			! gs:si is source

	mov	di,dx			! es:di is destination
	mov	cx,#6			! copy 12 bytes
	cld

	rep
	seg gs
	movsw

	mov	di,dx
	movb	4(di),*18		! patch sector count

	seg fs
	mov	(bx),di
	seg fs
	mov	2(bx),es

	mov	ax,cs
	mov	fs,ax
	mov	gs,ax
	
	xor	ah,ah			! reset FDC 
	xor	dl,dl
	int 	0x13	

! load the setup-sectors directly after the bootblock.
! Note that 'es' is already set up.

load_setup:
	xor	dx, dx			! drive 0, head 0
	mov	cx,#0x0002		! sector 2, track 0
	mov	bx,#0x0200		! address = 512, in INITSEG
	mov	ax,#0x0200+SETUPSECS	! service 2, nr of sectors
					! (assume all on head 0, track 0)
	int	0x13			! read it
	jnc	ok_load_setup		! ok - continue

	push	ax			! dump error code
	call	print_nl
	mov	bp, sp
	call	print_hex
	pop	ax	
	
	xor	dl, dl			! reset FDC
	xor	ah, ah
	int	0x13
	jmp	load_setup

ok_load_setup:

! Get disk drive parameters, specifically nr of sectors/track

#if 0

! bde - the Phoenix BIOS manual says function 0x08 only works for fixed
! disks.  It doesn't work for one of my BIOS's (1987 Award).  It was
! fatal not to check the error code.

	xor	dl,dl
	mov	ah,#0x08		! AH=8 is get drive parameters
	int	0x13
	xor	ch,ch
#else

! It seems that there is no BIOS call to get the number of sectors.  Guess
! 18 sectors if sector 18 can be read, 15 if sector 15 can be read.
! Otherwise guess 9.

	xor	dx, dx			! drive 0, head 0
	mov	cx,#0x0012		! sector 18, track 0
	mov	bx,#0x0200+SETUPSECS*0x200  ! address after setup (es = cs)
	mov	ax,#0x0201		! service 2, 1 sector
	int	0x13
	jnc	got_sectors
	mov	cl,#0x0f		! sector 15
	mov	ax,#0x0201		! service 2, 1 sector
	int	0x13
	jnc	got_sectors
	mov	cl,#0x09

#endif

got_sectors:
	seg cs
	mov	sectors,cx
	mov	ax,#INITSEG
	mov	es,ax

! Print some inane message

	mov	ah,#0x03		! read cursor pos
	xor	bh,bh
	int	0x10
	
	mov	cx,#9
	mov	bx,#0x0007		! page 0, attribute 7 (normal)
	mov	bp,#msg1
	mov	ax,#0x1301		! write string, move cursor
	int	0x10

! ok, we've written the message, now
! we want to load the system (at 0x10000)

	mov	ax,#SYSSEG
	mov	es,ax		! segment of 0x010000
	call	read_it
	call	kill_motor
	call	print_nl

! After that we check which root-device to use. If the device is
! defined (!= 0), nothing is done and the given device is used.
! Otherwise, either /dev/PS0 (2,28) or /dev/at0 (2,8), depending
! on the number of sectors that the BIOS reports currently.

	seg cs
	mov	ax,root_dev
	or	ax,ax
	jne	root_defined
	seg cs
	mov	bx,sectors
	mov	ax,#0x0208		! /dev/ps0 - 1.2Mb
	cmp	bx,#15
	je	root_defined
	mov	ax,#0x021c		! /dev/PS0 - 1.44Mb
	cmp	bx,#18
	je	root_defined
	mov	ax,#0x0200		! /dev/fd0 - autodetect
root_defined:
	seg cs
	mov	root_dev,ax

! after that (everyting loaded), we jump to
! the setup-routine loaded directly after
! the bootblock:

	jmpi	0,SETUPSEG

! This routine loads the system at address 0x10000, making sure
! no 64kB boundaries are crossed. We try to load it as fast as
! possible, loading whole tracks whenever we can.
!
! in:	es - starting address segment (normally 0x1000)
!
sread:	.word 1+SETUPSECS	! sectors read of current track
head:	.word 0			! current head
track:	.word 0			! current track

read_it:
	mov ax,es
	test ax,#0x0fff
die:	jne die			! es must be at 64kB boundary
	xor bx,bx		! bx is starting address within segment
rp_read:
	mov ax,es
	sub ax,#SYSSEG
	cmp ax,syssize		! have we loaded all yet?
	jbe ok1_read
	ret
ok1_read:
	seg cs
	mov ax,sectors
	sub ax,sread
	mov cx,ax
	shl cx,#9
	add cx,bx
	jnc ok2_read
	je ok2_read
	xor ax,ax
	sub ax,bx
	shr ax,#9
ok2_read:
	call read_track
	mov cx,ax
	add ax,sread
	seg cs
	cmp ax,sectors
	jne ok3_read
	mov ax,#1
	sub ax,head
	jne ok4_read
	inc track
ok4_read:
	mov head,ax
	xor ax,ax
ok3_read:
	mov sread,ax
	shl cx,#9
	add bx,cx
	jnc rp_read
	mov ax,es
	add ah,#0x10
	mov es,ax
	xor bx,bx
	jmp rp_read

read_track:
	pusha
	pusha	
	mov	ax, #0xe2e 	! loading... message 2e = .
	mov	bx, #7
 	int	0x10
	popa		

	mov	dx,track
	mov	cx,sread
	inc	cx
	mov	ch,dl
	mov	dx,head
	mov	dh,dl
	and	dx,#0x0100
	mov	ah,#2
	
	push	dx				! save for error dump
	push	cx
	push	bx
	push	ax

	int	0x13
	jc	bad_rt
	add	sp, #8
	popa
	ret

bad_rt:	push	ax				! save error code
	call	print_all			! ah = error, al = read
	
	
	xor ah,ah
	xor dl,dl
	int 0x13
	

	add	sp, #10
	popa	
	jmp read_track

/*
 *	print_all is for debugging purposes.  
 *	It will print out all of the registers.  The assumption is that this is
 *	called from a routine, with a stack frame like
 *	dx 
 *	cx
 *	bx
 *	ax
 *	error
 *	ret <- sp
 *
*/
 
print_all:
	mov	cx, #5		! error code + 4 registers
	mov	bp, sp	

print_loop:
	push	cx		! save count left
	call	print_nl	! nl for readability

	cmp	cl, 5
	jae	no_reg		! see if register name is needed
	
	mov	ax, #0xe05 + 'A - 1
	sub	al, cl
	int	0x10

	mov	al, #'X
	int	0x10

	mov	al, #':
	int	0x10

no_reg:
	add	bp, #2		! next register
	call	print_hex	! print it
	pop	cx
	loop	print_loop
	ret

print_nl:
	mov	ax, #0xe0d	! CR
	int	0x10
	mov	al, #0xa	! LF
	int 	0x10
	ret

/*
 *	print_hex is for debugging purposes, and prints the word
 *	pointed to by ss:bp in hexadecmial.
*/

print_hex:
	mov	cx, #4		! 4 hex digits
	mov	dx, (bp)	! load word into dx
print_digit:
	rol	dx, #4		! rotate so that lowest 4 bits are used
	mov	ah, #0xe	
	mov	al, dl		! mask off so we have only next nibble
	and	al, #0xf
	add	al, #'0		! convert to 0-based digit
	cmp	al, #'9		! check for overflow
	jbe	good_digit
	add	al, #'A - '0 - 10

good_digit:
	int	0x10
	loop	print_digit
	ret


/*
 * This procedure turns off the floppy drive motor, so
 * that we enter the kernel in a known state, and
 * don't have to worry about it later.
 */
kill_motor:
	push dx
	mov dx,#0x3f2
	xor al, al
	outb
	pop dx
	ret

sectors:
	.word 0

msg1:
	.byte 13,10
	.ascii "Loading"

.org 498
root_flags:
	.word CONFIG_ROOT_RDONLY
syssize:
	.word SYSSIZE
swap_dev:
	.word SWAP_DEV
ram_size:
	.word RAMDISK
vid_mode:
	.word SVGA_MODE
root_dev:
	.word ROOT_DEV
boot_flag:
	.word 0xAA55

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜精品成人在线| 国产精品一区二区三区乱码| 白白色 亚洲乱淫| 国产日韩成人精品| 亚洲一区二区三区小说| 色综合久久中文字幕| 亚洲黄色免费电影| 欧美日韩一区二区三区高清| 亚洲国产日韩一区二区| 日韩欧美卡一卡二| 国产在线国偷精品免费看| 中文字幕av资源一区| 91论坛在线播放| 午夜激情一区二区| 26uuu亚洲| 91亚洲国产成人精品一区二区三| 依依成人综合视频| 欧美妇女性影城| 国产最新精品精品你懂的| 国产精品美女久久久久aⅴ国产馆| 91免费版pro下载短视频| 天堂成人免费av电影一区| www一区二区| 色天使色偷偷av一区二区| 五月天婷婷综合| 亚洲第一综合色| 精品国产一区二区精华| 欧美成人精品福利| 青草国产精品久久久久久| 欧美一三区三区四区免费在线看| 麻豆精品国产传媒mv男同| 国产精品久久毛片av大全日韩| 在线观看区一区二| 国产精品一区专区| 亚洲小少妇裸体bbw| 久久久精品免费观看| 欧美天天综合网| 粉嫩绯色av一区二区在线观看| 午夜久久久影院| 国产精品三级av| 日韩欧美黄色影院| 91国产免费看| 成人av集中营| 国内精品国产三级国产a久久| 亚洲国产日韩在线一区模特| 老鸭窝一区二区久久精品| 亚洲免费av高清| 久久久久97国产精华液好用吗| 欧美韩日一区二区三区| 欧美色视频在线观看| 福利电影一区二区| 精品亚洲免费视频| 午夜精品福利久久久| 亚洲精品免费看| 国产精品色眯眯| 久久久亚洲高清| 欧美电影免费观看完整版| 欧美军同video69gay| 色爱区综合激月婷婷| av不卡在线观看| 高清不卡一二三区| 国产一区二区伦理片| 免费在线欧美视频| 日韩不卡手机在线v区| 亚洲一二三专区| 亚洲男人的天堂一区二区| 国产精品剧情在线亚洲| 久久久99久久| 久久精品视频在线免费观看| 欧美精品一区二区三区蜜桃 | 久久9热精品视频| 亚洲成年人网站在线观看| 一区二区三区精品久久久| 亚洲视频精选在线| 亚洲天堂福利av| 亚洲欧美日韩一区二区 | 色av成人天堂桃色av| 99国产精品久久久久久久久久 | 五月综合激情网| 一区二区三区在线观看网站| 亚洲精品中文在线影院| 一区二区三区中文字幕精品精品 | 在线不卡的av| 91精品国产综合久久福利软件| 在线成人免费视频| 日韩一区二区三区免费看 | 狠狠色狠狠色综合系列| 国产精品一区一区| 豆国产96在线|亚洲| 91麻豆福利精品推荐| 欧美伊人久久久久久午夜久久久久| 欧美三级电影在线观看| 91精品国产欧美一区二区成人| 日韩欧美亚洲另类制服综合在线| 久久亚洲一级片| **性色生活片久久毛片| 亚洲国产裸拍裸体视频在线观看乱了| 日韩福利视频导航| 国产精品一区久久久久| 99久久久久久| 91精品国产aⅴ一区二区| 26uuu久久综合| 1区2区3区国产精品| 五月激情六月综合| 国产制服丝袜一区| 色先锋aa成人| 日韩精品一区二区在线| 国产精品久久看| 丝瓜av网站精品一区二区| 狠狠色综合色综合网络| 色综合中文字幕国产 | 亚洲一区在线免费观看| 亚洲chinese男男1069| 麻豆freexxxx性91精品| 国产 欧美在线| 欧美日韩国产首页| 国产欧美精品一区二区色综合| 依依成人精品视频| 久久99国产精品麻豆| 色综合中文综合网| 中文字幕在线不卡一区二区三区| 亚洲一区二区高清| 国产福利一区二区三区在线视频| 色网综合在线观看| 国产亚洲欧美激情| 日韩电影一区二区三区| 91原创在线视频| 2021中文字幕一区亚洲| 亚洲国产一区视频| 国产高清亚洲一区| 欧美日韩大陆在线| 亚洲男人天堂一区| 国产露脸91国语对白| 在线观看91av| 亚洲女同ⅹxx女同tv| 国产高清视频一区| 日韩一区二区三区免费观看| 亚洲蜜桃精久久久久久久| 国产成+人+日韩+欧美+亚洲| 日韩欧美国产一二三区| 亚洲国产精品久久久久秋霞影院 | 欧美日韩高清在线播放| 中文字幕在线不卡| 国产精品99久久久久久有的能看| 欧美精品九九99久久| 亚洲男人天堂av网| 91在线高清观看| 中文字幕一区二区三区在线播放 | 色综合欧美在线视频区| 国产精品私人自拍| 国产成人精品影院| 久久伊人蜜桃av一区二区| 美国精品在线观看| 91麻豆精品国产91久久久| 亚洲国产裸拍裸体视频在线观看乱了| 不卡一区中文字幕| 国产精品亲子伦对白| 国产成人超碰人人澡人人澡| 精品处破学生在线二十三| 精品制服美女丁香| 日韩免费看的电影| 久久99热国产| 精品福利在线导航| 狠狠色丁香婷婷综合| 精品国产髙清在线看国产毛片 | 国产91精品入口| 日本一区二区三区高清不卡| 国产精品亚洲午夜一区二区三区 | 国产综合色产在线精品| 久久欧美一区二区| 成人听书哪个软件好| 最新国产の精品合集bt伙计| 91社区在线播放| 亚洲一区二区三区四区不卡| 欧美吞精做爰啪啪高潮| 日韩av一区二区三区| 欧美变态tickle挠乳网站| 国产又粗又猛又爽又黄91精品| 国产欧美精品一区二区三区四区| 国产一区 二区| 欧美性大战久久| 亚洲图片自拍偷拍| 93久久精品日日躁夜夜躁欧美| 国产精品久久久久久久久久久免费看| 成人av中文字幕| 亚洲欧美激情视频在线观看一区二区三区| 成人动漫一区二区三区| 樱花草国产18久久久久| 欧美精品在线观看播放| 蜜桃视频在线观看一区二区| xf在线a精品一区二区视频网站| 成人一区二区三区| 一区二区三区免费看视频| 欧美精品一级二级三级| 国产永久精品大片wwwapp| 中文字幕在线不卡| 91麻豆精品国产自产在线观看一区| 国产一区二区三区av电影| 亚洲欧美日韩国产综合| 日韩一区二区中文字幕|