⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 krnl.lst

📁 一个类linux的dos下开发的操作系统.
💻 LST
📖 第 1 页 / 共 5 页
字号:
c0000569:	20 65 78             	and    %ah,0x78(%ebp)
c000056c:	63 65 70             	arpl   %sp,0x70(%ebp)
c000056f:	74 69                	je     c00005da <_fault+0x6>
c0000571:	6f                   	outsl  %ds:(%esi),(%dx)
c0000572:	6e                   	outsb  %ds:(%esi),(%dx)
c0000573:	00 64 69 76          	add    %ah,0x76(%ecx,%ebp,2)
c0000577:	69 64 65 20 65 72 72 	imul   $0x6f727265,0x20(%ebp,2),%esp
c000057e:	6f 
c000057f:	72 00                	jb     c0000581 <.ef+0x13e>
c0000581:	45                   	inc    %ebp
c0000582:	78 63                	js     c00005e7 <_fault+0x13>
c0000584:	65                   	gs
c0000585:	70 74                	jo     c00005fb <_fault+0x27>
c0000587:	69 6f 6e 20 23 25 75 	imul   $0x75252320,0x6e(%edi),%ebp
c000058e:	20 00                	and    %al,(%eax)
c0000590:	28 25 73 29 20 00    	sub    %ah,0x202973
c0000596:	69 6e 20 6b 65 72 6e 	imul   $0x6e72656b,0x20(%esi),%ebp
c000059d:	65                   	gs
c000059e:	6c                   	insb   (%dx),%es:(%edi)
c000059f:	20 6d 6f             	and    %ch,0x6f(%ebp)
c00005a2:	64 65 2e 0a 00       	or     %cs:%fs:%gs:(%eax),%al
c00005a7:	53                   	push   %ebx
c00005a8:	79 73                	jns    c000061d <_fault+0x49>
c00005aa:	74 65                	je     c0000611 <_fault+0x3d>
c00005ac:	6d                   	insl   (%dx),%es:(%edi)
c00005ad:	20 68 61             	and    %ch,0x61(%eax)
c00005b0:	6c                   	insb   (%dx),%es:(%edi)
c00005b1:	74 65                	je     c0000618 <_fault+0x44>
c00005b3:	64 0a 00             	or     %fs:(%eax),%al
c00005b6:	69 6e 20 75 73 65 72 	imul   $0x72657375,0x20(%esi),%ebp
c00005bd:	20 6d 6f             	and    %ch,0x6f(%ebp)
c00005c0:	64 65 3b 20          	cmp    %fs:%gs:(%eax),%esp
c00005c4:	74 61                	je     c0000627 <_fault+0x53>
c00005c6:	73 6b                	jae    c0000633 <_fault+0x5f>
c00005c8:	20 25 75 20 6b 69    	and    %ah,0x696b2075
c00005ce:	6c                   	insb   (%dx),%es:(%edi)
c00005cf:	6c                   	insb   (%dx),%es:(%edi)
c00005d0:	65 64 0a 00          	or     %fs:%gs:(%eax),%al

c00005d4 <_fault>:
_fault():
main.c:267
/*****************************************************************************
*****************************************************************************/
task_t *fault(volatile regs_t regs)
{
	static const char *msg[] =
	{
		"divide error", "debug exception", "NMI", "INT3",
		"INTO", "BOUND exception", "invalid opcode", "no coprocessor",
		"double fault", "coprocessor segment overrun",
			"bad TSS", "segment not present",
		"stack fault", "GPF", "page fault", "??",
		"coprocessor error", "alignment check", "??", "??",
		"??", "??", "??", "??",
		"??", "??", "??", "??",
		"??", "??", "??", "??"
		"IRQ0", "IRQ1", "IRQ2", "IRQ3",
		"IRQ4", "IRQ5", "IRQ6", "IRQ7",
		"IRQ8", "IRQ9", "IRQ10", "IRQ11",
		"IRQ12", "IRQ13", "IRQ14", "IRQ15",
		"syscall"
	};
	task_t *ret_val;

/* return old value of _curr_task to asm code,
so it can determine if a task-switch occurred */
	ret_val = _curr_task;
c00005d4:	55                   	push   %ebp
c00005d5:	89 e5                	mov    %esp,%ebp
c00005d7:	83 ec 14             	sub    $0x14,%esp
c00005da:	53                   	push   %ebx
c00005db:	8b 1d 2c cc 00 c0    	mov    0xc000cc2c,%ebx
main.c:268
	switch(regs.which_int)
c00005e1:	8b 45 38             	mov    0x38(%ebp),%eax
c00005e4:	83 f8 20             	cmp    $0x20,%eax
c00005e7:	74 37                	je     c0000620 <_fault+0x4c>
c00005e9:	77 0a                	ja     c00005f5 <_fault+0x21>
c00005eb:	83 f8 0e             	cmp    $0xe,%eax
c00005ee:	74 11                	je     c0000601 <_fault+0x2d>
c00005f0:	e9 7d 00 00 00       	jmp    c0000672 <_ERR>
c00005f5:	83 f8 21             	cmp    $0x21,%eax
c00005f8:	74 3c                	je     c0000636 <_fault+0x62>
c00005fa:	83 f8 30             	cmp    $0x30,%eax
c00005fd:	74 51                	je     c0000650 <_fault+0x7c>
c00005ff:	eb 71                	jmp    c0000672 <_ERR>
main.c:272
	{
/* page fault */
		case 0x0E:
			if(page_fault(_curr_task, regs.err_code) != 0)
c0000601:	8b 45 3c             	mov    0x3c(%ebp),%eax
c0000604:	83 c4 f8             	add    $0xfffffff8,%esp
c0000607:	50                   	push   %eax
c0000608:	53                   	push   %ebx
c0000609:	e8 a2 1c 00 00       	call   c00022b0 <_page_fault>
c000060e:	83 c4 10             	add    $0x10,%esp
c0000611:	85 c0                	test   %eax,%eax
c0000613:	75 5d                	jne    c0000672 <_ERR>
main.c:274
				goto ERR;
			break;
c0000615:	e9 0c 01 00 00       	jmp    c0000726 <_ERR+0xb4>
c000061a:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
main.c:277
/* timer (IRQ 0) */
		case 0x20:
			blink();
c0000620:	e8 7b 05 00 00       	call   c0000ba0 <_blink>
main.c:278
			timer_irq(regs.eip);
c0000625:	8b 45 40             	mov    0x40(%ebp),%eax
c0000628:	83 c4 f4             	add    $0xfffffff4,%esp
c000062b:	50                   	push   %eax
c000062c:	e8 a3 fd ff ff       	call   c00003d4 <_timer_irq>
main.c:279
			break;
c0000631:	e9 f0 00 00 00       	jmp    c0000726 <_ERR+0xb4>
main.c:282
/* keyboard (IRQ 1) */
		case 0x21:
			kbd_irq();
c0000636:	e8 31 0f 00 00       	call   c000156c <_kbd_irq>
main.c:283
			outportb(0x20, 0x20);
c000063b:	83 c4 f8             	add    $0xfffffff8,%esp
c000063e:	6a 20                	push   $0x20
c0000640:	6a 20                	push   $0x20
c0000642:	e8 a9 29 00 00       	call   c0002ff0 <_outportb>
main.c:284
			break;
c0000647:	e9 da 00 00 00       	jmp    c0000726 <_ERR+0xb4>
c000064c:	8d 74 26 00          	lea    0x0(%esi,1),%esi
main.c:287
/* int 30h (syscall) */
		case SYSCALL_INT:
			if(syscall(_curr_task, &regs))
c0000650:	83 c4 f8             	add    $0xfffffff8,%esp
c0000653:	8d 45 08             	lea    0x8(%ebp),%eax
c0000656:	50                   	push   %eax
c0000657:	53                   	push   %ebx
c0000658:	e8 1b 1f 00 00       	call   c0002578 <_syscall>
c000065d:	83 c4 10             	add    $0x10,%esp
c0000660:	85 c0                	test   %eax,%eax
c0000662:	0f 84 be 00 00 00    	je     c0000726 <_ERR+0xb4>
main.c:288
				schedule();
c0000668:	e8 17 fd ff ff       	call   c0000384 <_schedule>
main.c:289
			break;
c000066d:	e9 b4 00 00 00       	jmp    c0000726 <_ERR+0xb4>

c0000672 <_ERR>:
main.c:292
/* anything else */
		default:
ERR:			kprintf("Exception #%u ", regs.which_int);
c0000672:	8b 45 38             	mov    0x38(%ebp),%eax
c0000675:	83 c4 f8             	add    $0xfffffff8,%esp
c0000678:	50                   	push   %eax
c0000679:	68 81 05 00 c0       	push   $0xc0000581
c000067e:	e8 bd fb ff ff       	call   c0000240 <_kprintf>
main.c:293
			if(regs.which_int <= sizeof(msg) / sizeof(char *))
c0000683:	8b 45 38             	mov    0x38(%ebp),%eax
c0000686:	83 c4 10             	add    $0x10,%esp
c0000689:	83 f8 30             	cmp    $0x30,%eax
c000068c:	77 1b                	ja     c00006a9 <_ERR+0x37>
main.c:294
				kprintf("(%s) ", msg[regs.which_int]);
c000068e:	8b 45 38             	mov    0x38(%ebp),%eax
c0000691:	83 c4 f8             	add    $0xfffffff8,%esp
c0000694:	8b 04 85 40 52 00 c0 	mov    0xc0005240(,%eax,4),%eax
c000069b:	50                   	push   %eax
c000069c:	68 90 05 00 c0       	push   $0xc0000590
c00006a1:	e8 9a fb ff ff       	call   c0000240 <_kprintf>
c00006a6:	83 c4 10             	add    $0x10,%esp
main.c:296
/* oops, it happened in kernel mode */
			if((regs.cs & 3) == 0)
c00006a9:	8b 45 44             	mov    0x44(%ebp),%eax
c00006ac:	a9 03 00 00 00       	test   $0x3,%eax
c00006b1:	75 2c                	jne    c00006df <_ERR+0x6d>
main.c:298
			{
				kprintf("in kernel mode.\n");
c00006b3:	83 c4 f4             	add    $0xfffffff4,%esp
c00006b6:	68 96 05 00 c0       	push   $0xc0000596
c00006bb:	e8 80 fb ff ff       	call   c0000240 <_kprintf>
main.c:299
				dump_regs(&regs);
c00006c0:	83 c4 f4             	add    $0xfffffff4,%esp
c00006c3:	8d 45 08             	lea    0x8(%ebp),%eax
c00006c6:	50                   	push   %eax
c00006c7:	e8 74 22 00 00       	call   c0002940 <_dump_regs>
main.c:300
				panic("System halted\n");
c00006cc:	83 c4 20             	add    $0x20,%esp
c00006cf:	83 c4 f4             	add    $0xfffffff4,%esp
c00006d2:	68 a7 05 00 c0       	push   $0xc00005a7
c00006d7:	e8 84 fb ff ff       	call   c0000260 <_panic>
main.c:301
			}
c00006dc:	83 c4 10             	add    $0x10,%esp
main.c:303
/* else user mode fault: kill the task */
			kprintf("in user mode; task %u killed\n",
c00006df:	8b 0d 2c cc 00 c0    	mov    0xc000cc2c,%ecx
c00006e5:	83 c4 f8             	add    $0xfffffff8,%esp
c00006e8:	81 e9 30 cc 00 c0    	sub    $0xc000cc30,%ecx
c00006ee:	89 c8                	mov    %ecx,%eax
c00006f0:	c1 e0 05             	shl    $0x5,%eax
c00006f3:	01 c8                	add    %ecx,%eax
c00006f5:	c1 e0 05             	shl    $0x5,%eax
c00006f8:	01 c8                	add    %ecx,%eax
c00006fa:	89 c2                	mov    %eax,%edx
c00006fc:	c1 e2 0f             	shl    $0xf,%edx
c00006ff:	01 d0                	add    %edx,%eax
c0000701:	c1 e0 05             	shl    $0x5,%eax
c0000704:	01 c8                	add    %ecx,%eax
c0000706:	f7 d8                	neg    %eax
c0000708:	c1 f8 02             	sar    $0x2,%eax
c000070b:	50                   	push   %eax
c000070c:	68 b6 05 00 c0       	push   $0xc00005b6
c0000711:	e8 2a fb ff ff       	call   c0000240 <_kprintf>
main.c:305
				_curr_task - _tasks);
			sys_exit(_curr_task, -1);
c0000716:	83 c4 f8             	add    $0xfffffff8,%esp
c0000719:	6a ff                	push   $0xffffffff
c000071b:	a1 2c cc 00 c0       	mov    0xc000cc2c,%eax
c0000720:	50                   	push   %eax
c0000721:	e8 2a 1c 00 00       	call   c0002350 <_sys_exit>
main.c:308
			break;
	}
	return ret_val;
c0000726:	89 d8                	mov    %ebx,%eax
c0000728:	8b 5d e8             	mov    0xffffffe8(%ebp),%ebx
c000072b:	89 ec                	mov    %ebp,%esp
c000072d:	5d                   	pop    %ebp
c000072e:	c3                   	ret    

c000072f <.ef>:
main.c:309
}
c000072f:	90                   	nop    

c0000730 <_foo>:
c0000730:	9b                   	fwait
c0000731:	2e 8d b4 26 00 00 00 	lea    %cs:0x0(%esi,1),%esi
c0000738:	00 
c0000739:	8d bc 27 00 00 00 00 	lea    0x0(%edi,1),%edi
c0000740:	1b 5b 33             	sbb    0x33(%ebx),%ebx
c0000743:	31 6d 43             	xor    %ebp,0x43(%ebp)
c0000746:	1b 5b 33             	sbb    0x33(%ebx),%ebx
c0000749:	32 6d 6f             	xor    0x6f(%ebp),%ch
c000074c:	1b 5b 33             	sbb    0x33(%ebx),%ebx
c000074f:	33 6d 73             	xor    0x73(%ebp),%ebp
c0000752:	1b 5b 33             	sbb    0x33(%ebx),%ebx
c0000755:	34 6d                	xor    $0x6d,%al
c0000757:	6d                   	insl   (%dx),%es:(%edi)
c0000758:	1b 5b 33             	sbb    0x33(%ebx),%ebx
c000075b:	35 6d 6f 1b 5b       	xor    $0x5b1b6f6d,%eax
c0000760:	33 36                	xor    (%esi),%esi
c0000762:	6d                   	insl   (%dx),%es:(%edi)
c0000763:	73 1b                	jae    c0000780 <_foo+0x50>
c0000765:	5b                   	pop    %ebx
c0000766:	33 37                	xor    (%edi),%esi
c0000768:	6d                   	insl   (%dx),%es:(%edi)
c0000769:	20 4f 53             	and    %cl,0x53(%edi)
c000076c:	20 72 65             	and    %dh,0x65(%edx)
c000076f:	6c                   	insb   (%dx),%es:(%edi)
c0000770:	65                   	gs
c0000771:	61                   	popa   
c0000772:	73 65                	jae    c00007d9 <_foo+0xa9>
c0000774:	20 31                	and    %dh,(%ecx)
c0000776:	30 20                	xor    %ah,(%eax)
c0000778:	2d 20 43 6f 70       	sub    $0x706f4320,%eax
c000077d:	79 72                	jns    c00007f1 <_foo+0xc1>
c000077f:	69 67 68 74 20 28 43 	imul   $0x43282074,0x68(%edi),%esp
c0000786:	29 20                	sub    %esp,(%eax)
c0000788:	32 30                	xor    (%eax),%dh
c000078a:	30 31                	xor    %dh,(%ecx)
c000078c:	20 43 68             	and    %al,0x68(%ebx)
c000078f:	72 69                	jb     c00007fa <_foo+0xca>
c0000791:	73 20                	jae    c00007b3 <_foo+0x83>
c0000793:	47                   	inc    %edi
c0000794:	69 65 73 65 20 3c 67 	imul   $0x673c2065,0x73(%ebp),%esp
c000079b:	65                   	gs
c000079c:	65                   	gs
c000079d:	7a 65                	jp     c0000804 <_foo+0xd4>
c000079f:	72 40                	jb     c00007e1 <_foo+0xb1>
c00007a1:	65                   	gs
c00007a2:	78 65                	js     c0000809 <_foo+0xd9>
c00007a4:	63 70 63             	arpl   %si,0x63(%eax)
c00007a7:	2e 63 6f 6d          	arpl   %bp,%cs:0x6d(%edi)
c00007ab:	3e 0a 00             	or     %ds:(%eax),%al
c00007ae:	90                   	nop    
c00007af:	90                   	nop    
c00007b0:	90                   	nop    
c00007b1:	90                   	nop    
c00007b2:	90                   	nop    
c00007b3:	90                   	nop    
c00007b4:	90                   	nop    
c00007b5:	90                   	nop    
c00007b6:	90                   	nop    
c00007b7:	90                   	nop    
c00007b8:	90                   	nop    
c00007b9:	90                   	nop    
c00007ba:	90                   	nop    
c00007bb:	90                   	nop    
c00007bc:	90                   	nop    
c00007bd:	90                   	nop    
c00007be:	90                   	nop    
c00007bf:	90                   	nop    
c00007c0:	25 75 4b 20 63       	and    $0x63204b75,%eax
c00007c5:	6f                   	outsl  %ds:(%esi),(%dx)
c00007c6:	6e                   	outsb  %ds:(%esi),(%dx)
c00007c7:	76 65                	jbe    c000082e <_foo+0xfe>

⌨️ 快捷键说明

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