📄 krnl.lst
字号:
}
/* someone called wake_up(), making us TS_RUNNABLE again. Return 0 */
return ret_val;
c000037b: 89 f0 mov %esi,%eax
c000037d: 5b pop %ebx
c000037e: 5e pop %esi
c000037f: 89 ec mov %ebp,%esp
c0000381: 5d pop %ebp
c0000382: c3 ret
c0000383 <.ef>:
main.c:188
}
c0000383: 90 nop
c0000384 <_schedule>:
_schedule():
main.c:195
/*****************************************************************************
*****************************************************************************/
void schedule(void)
{
static unsigned current;
do
c0000384: 55 push %ebp
c0000385: 89 e5 mov %esp,%ebp
main.c:197
{
current++;
c0000387: a1 04 b0 00 c0 mov 0xc000b004,%eax
c000038c: 8d 50 01 lea 0x1(%eax),%edx
c000038f: 89 15 04 b0 00 c0 mov %edx,0xc000b004
main.c:198
if(current >= MAX_TASK)
c0000395: 89 d0 mov %edx,%eax
c0000397: 83 f8 0f cmp $0xf,%eax
c000039a: 76 0a jbe c00003a6 <_schedule+0x22>
main.c:199
current = 0;
c000039c: c7 05 04 b0 00 c0 00 movl $0x0,0xc000b004
c00003a3: 00 00 00
main.c:200
_curr_task = _tasks + current;
c00003a6: a1 04 b0 00 c0 mov 0xc000b004,%eax
c00003ab: c1 e0 05 shl $0x5,%eax
c00003ae: 2b 05 04 b0 00 c0 sub 0xc000b004,%eax
c00003b4: c1 e0 02 shl $0x2,%eax
c00003b7: 8d 90 30 cc 00 c0 lea 0xc000cc30(%eax),%edx
c00003bd: 89 15 2c cc 00 c0 mov %edx,0xc000cc2c
main.c:201
} while(_curr_task->status != TS_RUNNABLE);
c00003c3: 8b 80 44 cc 00 c0 mov 0xc000cc44(%eax),%eax
c00003c9: 83 f8 01 cmp $0x1,%eax
c00003cc: 75 b9 jne c0000387 <_schedule+0x3>
c00003ce: 89 ec mov %ebp,%esp
c00003d0: 5d pop %ebp
c00003d1: c3 ret
c00003d2 <.ef>:
main.c:202
}
c00003d2: 89 f6 mov %esi,%esi
c00003d4 <_timer_irq>:
_timer_irq():
main.c:221
/*****************************************************************************
xxx - calculation of timeouts is fubar
*****************************************************************************/
static void timer_irq(unsigned long eip)
{
unsigned new_time;
// unsigned char *instr;
unsigned short i;
/* was it a real timer interrupt? */
// if(inportb(0x20) & 0x01)
// xxx - this causes page fault in kernel mode
// (does it? check again)
// instr = (unsigned char *)eip - 2;
// if(*instr != 0xCD)
{
/* decrement timeouts for tasks that have them */
for(i = 0; i < MAX_TASK; i++)
c00003d4: 55 push %ebp
c00003d5: 89 e5 mov %esp,%ebp
c00003d7 <.ef>:
c00003d7: 83 ec 10 sub $0x10,%esp
c00003d8 <.bf>:
c00003d8: ec in (%dx),%al
c00003d9: 10 31 adc %dh,(%ecx)
c00003db: c9 leave
c00003dc: 56 push %esi
c00003dd: 53 push %ebx
c00003de: bb 4c cc 00 c0 mov $0xc000cc4c,%ebx
c00003e3: 89 de mov %ebx,%esi
main.c:223
{
new_time = _tasks[i].timeout;
c00003e5: 31 d2 xor %edx,%edx
c00003e7: 66 89 ca mov %cx,%dx
c00003ea: 89 d0 mov %edx,%eax
c00003ec: c1 e0 05 shl $0x5,%eax
c00003ef: 29 d0 sub %edx,%eax
c00003f1: c1 e0 02 shl $0x2,%eax
c00003f4: 8b 14 30 mov (%eax,%esi,1),%edx
main.c:224
if(new_time == 0)
c00003f7: 85 d2 test %edx,%edx
c00003f9: 74 26 je c0000421 <.ef+0x15>
main.c:227
continue;
/* number of microseconds per timer IRQ */
new_time -= (1000000L / HZ);
c00003fb: 81 c2 f0 d8 ff ff add $0xffffd8f0,%edx
main.c:228
if(new_time > _tasks[i].timeout)
c0000401: 3b 14 18 cmp (%eax,%ebx,1),%edx
c0000404: 76 02 jbe c0000408 <.bf+0x30>
main.c:229
new_time = 0; /* underflow */
c0000406: 31 d2 xor %edx,%edx
main.c:230
_tasks[i].timeout = new_time;
c0000408: 89 14 18 mov %edx,(%eax,%ebx,1)
main.c:232
/* timeout? wake up task */
if(new_time == 0 && _tasks[i].status == TS_BLOCKED)
c000040b: 85 d2 test %edx,%edx
c000040c <.ef>:
c000040c: d2 (bad)
c000040d: 75 12 jne c0000421 <.ef+0x15>
c000040f: ba 44 cc 00 c0 mov $0xc000cc44,%edx
c0000414: 83 3c 10 02 cmpl $0x2,(%eax,%edx,1)
c0000418: 75 07 jne c0000421 <.ef+0x15>
main.c:233
_tasks[i].status = TS_RUNNABLE;
c000041a: c7 04 10 01 00 00 00 movl $0x1,(%eax,%edx,1)
main.c:221
c0000421: 66 41 inc %cx
c0000423: 66 83 f9 0f cmp $0xf,%cx
c0000427: 76 bc jbe c00003e5 <.bf+0xd>
main.c:237
}
// outportb(0x20, 0x20); /* reset 8259 chip */
}
outportb(0x20, 0x20);
c0000429: 83 c4 f8 add $0xfffffff8,%esp
c000042c: 6a 20 push $0x20
c000042e: 6a 20 push $0x20
c0000430: e8 bb 2b 00 00 call c0002ff0 <_outportb>
main.c:240
/* run the scheduler, whether the interrupt was hardware (IRQ 0)
or software (INT 20h) */
schedule();
c0000435: e8 4a ff ff ff call c0000384 <_schedule>
c000043a: 8d 65 e8 lea 0xffffffe8(%ebp),%esp
c000043d: 5b pop %ebx
c000043e: 5e pop %esi
c000043f: 89 ec mov %ebp,%esp
c0000441: 5d pop %ebp
c0000442: c3 ret
c0000443 <.ef>:
main.c:241
}
c0000443: 73 79 jae c00004be <.ef+0x7b>
c0000445: 73 63 jae c00004aa <.ef+0x67>
c0000447: 61 popa
c0000448: 6c insb (%dx),%es:(%edi)
c0000449: 6c insb (%dx),%es:(%edi)
c000044a: 00 49 52 add %cl,0x52(%ecx)
c000044d: 51 push %ecx
c000044e: 31 35 00 49 52 51 xor %esi,0x51524900
c0000454: 31 34 00 xor %esi,(%eax,%eax,1)
c0000457: 49 dec %ecx
c0000458: 52 push %edx
c0000459: 51 push %ecx
c000045a: 31 33 xor %esi,(%ebx)
c000045c: 00 49 52 add %cl,0x52(%ecx)
c000045f: 51 push %ecx
c0000460: 31 32 xor %esi,(%edx)
c0000462: 00 49 52 add %cl,0x52(%ecx)
c0000465: 51 push %ecx
c0000466: 31 31 xor %esi,(%ecx)
c0000468: 00 49 52 add %cl,0x52(%ecx)
c000046b: 51 push %ecx
c000046c: 31 30 xor %esi,(%eax)
c000046e: 00 49 52 add %cl,0x52(%ecx)
c0000471: 51 push %ecx
c0000472: 39 00 cmp %eax,(%eax)
c0000474: 49 dec %ecx
c0000475: 52 push %edx
c0000476: 51 push %ecx
c0000477: 38 00 cmp %al,(%eax)
c0000479: 49 dec %ecx
c000047a: 52 push %edx
c000047b: 51 push %ecx
c000047c: 37 aaa
c000047d: 00 49 52 add %cl,0x52(%ecx)
c0000480: 51 push %ecx
c0000481: 36 00 49 52 add %cl,%ss:0x52(%ecx)
c0000485: 51 push %ecx
c0000486: 35 00 49 52 51 xor $0x51524900,%eax
c000048b: 34 00 xor $0x0,%al
c000048d: 49 dec %ecx
c000048e: 52 push %edx
c000048f: 51 push %ecx
c0000490: 33 00 xor (%eax),%eax
c0000492: 49 dec %ecx
c0000493: 52 push %edx
c0000494: 51 push %ecx
c0000495: 32 00 xor (%eax),%al
c0000497: 49 dec %ecx
c0000498: 52 push %edx
c0000499: 51 push %ecx
c000049a: 31 00 xor %eax,(%eax)
c000049c: 3f aas
c000049d: 3f aas
c000049e: 49 dec %ecx
c000049f: 52 push %edx
c00004a0: 51 push %ecx
c00004a1: 30 00 xor %al,(%eax)
c00004a3: 61 popa
c00004a4: 6c insb (%dx),%es:(%edi)
c00004a5: 69 67 6e 6d 65 6e 74 imul $0x746e656d,0x6e(%edi),%esp
c00004ac: 20 63 68 and %ah,0x68(%ebx)
c00004af: 65 63 6b 00 arpl %bp,%gs:0x0(%ebx)
c00004b3: 63 6f 70 arpl %bp,0x70(%edi)
c00004b6: 72 6f jb c0000527 <.ef+0xe4>
c00004b8: 63 65 73 arpl %sp,0x73(%ebp)
c00004bb: 73 6f jae c000052c <.ef+0xe9>
c00004bd: 72 20 jb c00004df <.ef+0x9c>
c00004bf: 65 gs
c00004c0: 72 72 jb c0000534 <.ef+0xf1>
c00004c2: 6f outsl %ds:(%esi),(%dx)
c00004c3: 72 00 jb c00004c5 <.ef+0x82>
c00004c5: 3f aas
c00004c6: 3f aas
c00004c7: 00 70 61 add %dh,0x61(%eax)
c00004ca: 67 65 20 66 61 addr16 and %ah,%gs:97(%bp)
c00004cf: 75 6c jne c000053d <.ef+0xfa>
c00004d1: 74 00 je c00004d3 <.ef+0x90>
c00004d3: 47 inc %edi
c00004d4: 50 push %eax
c00004d5: 46 inc %esi
c00004d6: 00 73 74 add %dh,0x74(%ebx)
c00004d9: 61 popa
c00004da: 63 6b 20 arpl %bp,0x20(%ebx)
c00004dd: 66 61 popaw
c00004df: 75 6c jne c000054d <.ef+0x10a>
c00004e1: 74 00 je c00004e3 <.ef+0xa0>
c00004e3: 73 65 jae c000054a <.ef+0x107>
c00004e5: 67 6d addr16 insl (%dx),%es:(%di)
c00004e7: 65 6e outsb %gs:(%esi),(%dx)
c00004e9: 74 20 je c000050b <.ef+0xc8>
c00004eb: 6e outsb %ds:(%esi),(%dx)
c00004ec: 6f outsl %ds:(%esi),(%dx)
c00004ed: 74 20 je c000050f <.ef+0xcc>
c00004ef: 70 72 jo c0000563 <.ef+0x120>
c00004f1: 65 gs
c00004f2: 73 65 jae c0000559 <.ef+0x116>
c00004f4: 6e outsb %ds:(%esi),(%dx)
c00004f5: 74 00 je c00004f7 <.ef+0xb4>
c00004f7: 62 61 64 bound %esp,0x64(%ecx)
c00004fa: 20 54 53 53 and %dl,0x53(%ebx,%edx,2)
c00004fe: 00 63 6f add %ah,0x6f(%ebx)
c0000501: 70 72 jo c0000575 <.ef+0x132>
c0000503: 6f outsl %ds:(%esi),(%dx)
c0000504: 63 65 73 arpl %sp,0x73(%ebp)
c0000507: 73 6f jae c0000578 <.ef+0x135>
c0000509: 72 20 jb c000052b <.ef+0xe8>
c000050b: 73 65 jae c0000572 <.ef+0x12f>
c000050d: 67 6d addr16 insl (%dx),%es:(%di)
c000050f: 65 6e outsb %gs:(%esi),(%dx)
c0000511: 74 20 je c0000533 <.ef+0xf0>
c0000513: 6f outsl %ds:(%esi),(%dx)
c0000514: 76 65 jbe c000057b <.ef+0x138>
c0000516: 72 72 jb c000058a <.ef+0x147>
c0000518: 75 6e jne c0000588 <.ef+0x145>
c000051a: 00 64 6f 75 add %ah,0x75(%edi,%ebp,2)
c000051e: 62 6c 65 20 bound %ebp,0x20(%ebp,2)
c0000522: 66 61 popaw
c0000524: 75 6c jne c0000592 <.ef+0x14f>
c0000526: 74 00 je c0000528 <.ef+0xe5>
c0000528: 6e outsb %ds:(%esi),(%dx)
c0000529: 6f outsl %ds:(%esi),(%dx)
c000052a: 20 63 6f and %ah,0x6f(%ebx)
c000052d: 70 72 jo c00005a1 <.ef+0x15e>
c000052f: 6f outsl %ds:(%esi),(%dx)
c0000530: 63 65 73 arpl %sp,0x73(%ebp)
c0000533: 73 6f jae c00005a4 <.ef+0x161>
c0000535: 72 00 jb c0000537 <.ef+0xf4>
c0000537: 69 6e 76 61 6c 69 64 imul $0x64696c61,0x76(%esi),%ebp
c000053e: 20 6f 70 and %ch,0x70(%edi)
c0000541: 63 6f 64 arpl %bp,0x64(%edi)
c0000544: 65 00 42 4f add %al,%gs:0x4f(%edx)
c0000548: 55 push %ebp
c0000549: 4e dec %esi
c000054a: 44 inc %esp
c000054b: 20 65 78 and %ah,0x78(%ebp)
c000054e: 63 65 70 arpl %sp,0x70(%ebp)
c0000551: 74 69 je c00005bc <.ef+0x179>
c0000553: 6f outsl %ds:(%esi),(%dx)
c0000554: 6e outsb %ds:(%esi),(%dx)
c0000555: 00 49 4e add %cl,0x4e(%ecx)
c0000558: 54 push %esp
c0000559: 4f dec %edi
c000055a: 00 49 4e add %cl,0x4e(%ecx)
c000055d: 54 push %esp
c000055e: 33 00 xor (%eax),%eax
c0000560: 4e dec %esi
c0000561: 4d dec %ebp
c0000562: 49 dec %ecx
c0000563: 00 64 65 62 add %ah,0x62(%ebp,2)
c0000567: 75 67 jne c00005d0 <.ef+0x18d>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -