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

📄 tetris.lst

📁 一个类linux的dos下开发的操作系统.
💻 LST
📖 第 1 页 / 共 5 页
字号:
tetris.c:333
	{
/* wait up to 200 ms for key */
		timeout = 200000L;
400003f1:	c7 05 7c 11 00 40 40 	movl   $0x30d40,0x4000117c
400003f8:	0d 03 00 
tetris.c:334
		ret_val = 0;
400003fb:	c6 45 ff 00          	movb   $0x0,0xffffffff(%ebp)
tetris.c:335
	}
400003ff:	eb 10                	jmp    40000411 <_get_key+0x3d>
tetris.c:337
	else
		(void)read(0, &ret_val, 1);
40000401:	83 c4 fc             	add    $0xfffffffc,%esp
40000404:	6a 01                	push   $0x1
40000406:	8d 45 ff             	lea    0xffffffff(%ebp),%eax
40000409:	50                   	push   %eax
4000040a:	6a 00                	push   $0x0
4000040c:	e8 2f 05 00 00       	call   40000940 <_read>
tetris.c:338
	return ret_val;
40000411:	31 c0                	xor    %eax,%eax
40000413:	8a 45 ff             	mov    0xffffffff(%ebp),%al
40000416:	89 ec                	mov    %ebp,%esp
40000418:	5d                   	pop    %ebp
40000419:	c3                   	ret    

4000041a <.ef>:
tetris.c:339
}
4000041a:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
40000420:	1b 5b 32             	sbb    0x32(%ebx),%ebx
40000423:	4a                   	dec    %edx
40000424:	1b 5b 31             	sbb    0x31(%ebx),%ebx
40000427:	3b 25 64 48 54 45    	cmp    0x45544864,%esp
4000042d:	54                   	push   %esp
4000042e:	52                   	push   %edx
4000042f:	49                   	dec    %ecx
40000430:	53                   	push   %ebx
40000431:	20 62 79             	and    %ah,0x79(%edx)
40000434:	20 41 6c             	and    %al,0x6c(%ecx)
40000437:	65                   	gs
40000438:	78 65                	js     4000049f <.ef+0x85>
4000043a:	69 20 50 61 7a 68    	imul   $0x687a6150,(%eax),%esp
40000440:	69 74 6e 6f 76 00 90 	imul   $0x90900076,0x6f(%esi,%ebp,2),%esi
40000447:	90 
40000448:	90                   	nop    
40000449:	90                   	nop    
4000044a:	90                   	nop    
4000044b:	90                   	nop    
4000044c:	90                   	nop    
4000044d:	90                   	nop    
4000044e:	90                   	nop    
4000044f:	90                   	nop    
40000450:	90                   	nop    
40000451:	90                   	nop    
40000452:	90                   	nop    
40000453:	90                   	nop    
40000454:	90                   	nop    
40000455:	90                   	nop    
40000456:	90                   	nop    
40000457:	90                   	nop    
40000458:	90                   	nop    
40000459:	90                   	nop    
4000045a:	90                   	nop    
4000045b:	90                   	nop    
4000045c:	90                   	nop    
4000045d:	90                   	nop    
4000045e:	90                   	nop    
4000045f:	90                   	nop    
40000460:	1b 5b 32             	sbb    0x32(%ebx),%ebx
40000463:	3b 25 64 48 53 6f    	cmp    0x6f534864,%esp
40000469:	66                   	data16
4000046a:	74 77                	je     400004e3 <.ef+0xc9>
4000046c:	61                   	popa   
4000046d:	72 65                	jb     400004d4 <.ef+0xba>
4000046f:	20 62 79             	and    %ah,0x79(%edx)
40000472:	20 43 68             	and    %al,0x68(%ebx)
40000475:	72 69                	jb     400004e0 <.ef+0xc6>
40000477:	73 20                	jae    40000499 <.ef+0x7f>
40000479:	47                   	inc    %edi
4000047a:	69 65 73 65 00 90 1b 	imul   $0x1b900065,0x73(%ebp),%esp
40000481:	5b                   	pop    %ebx
40000482:	34 3b                	xor    $0x3b,%al
40000484:	25 64 48 27 31       	and    $0x31274864,%eax
40000489:	27                   	daa    
4000048a:	20 61 6e             	and    %ah,0x6e(%ecx)
4000048d:	64 20 27             	and    %ah,%fs:(%edi)
40000490:	32 27                	xor    (%edi),%ah
40000492:	20 72 6f             	and    %dh,0x6f(%edx)
40000495:	74 61                	je     400004f8 <.ef+0xde>
40000497:	74 65                	je     400004fe <.ef+0xe4>
40000499:	20 73 68             	and    %dh,0x68(%ebx)
4000049c:	61                   	popa   
4000049d:	70 65                	jo     40000504 <.ef+0xea>
4000049f:	00 1b                	add    %bl,(%ebx)
400004a1:	5b                   	pop    %ebx
400004a2:	35 3b 25 64 48       	xor    $0x4864253b,%eax
400004a7:	41                   	inc    %ecx
400004a8:	72 72                	jb     4000051c <.ef+0x102>
400004aa:	6f                   	outsl  %ds:(%esi),(%dx)
400004ab:	77 20                	ja     400004cd <.ef+0xb3>
400004ad:	6b 65 79 73          	imul   $0x73,0x79(%ebp),%esp
400004b1:	20 6d 6f             	and    %ch,0x6f(%ebp)
400004b4:	76 65                	jbe    4000051b <.ef+0x101>
400004b6:	20 73 68             	and    %dh,0x68(%ebx)
400004b9:	61                   	popa   
400004ba:	70 65                	jo     40000521 <.ef+0x107>
400004bc:	00 1b                	add    %bl,(%ebx)
400004be:	5b                   	pop    %ebx
400004bf:	36 3b 25 64 48 45 73 	cmp    %ss:0x73454864,%esp
400004c6:	63 20                	arpl   %sp,(%eax)
400004c8:	6f                   	outsl  %ds:(%esi),(%dx)
400004c9:	72 20                	jb     400004eb <.ef+0xd1>
400004cb:	51                   	push   %ecx
400004cc:	20 71 75             	and    %dh,0x75(%ecx)
400004cf:	69 74 73 00 1b 5b 39 	imul   $0x3b395b1b,0x0(%ebx,%esi,2),%esi
400004d6:	3b 
400004d7:	25 64 48 50 72       	and    $0x72504864,%eax
400004dc:	65                   	gs
400004dd:	73 73                	jae    40000552 <.ef+0x138>
400004df:	20 61 6e             	and    %ah,0x6e(%ecx)
400004e2:	79 20                	jns    40000504 <.ef+0xea>
400004e4:	6b 65 79 20          	imul   $0x20,0x79(%ebp),%esp
400004e8:	74 6f                	je     40000559 <.ef+0x13f>
400004ea:	20 62 65             	and    %ah,0x65(%edx)
400004ed:	67 69 6e 00 1b 5b 38 	addr16 imul $0x3b385b1b,0(%bp),%ebp
400004f4:	3b 
400004f5:	25 64 48 20 20       	and    $0x20204864,%eax
400004fa:	20 20                	and    %ah,(%eax)
400004fc:	20 20                	and    %ah,(%eax)
400004fe:	20 20                	and    %ah,(%eax)
40000500:	20 20                	and    %ah,(%eax)
40000502:	20 20                	and    %ah,(%eax)
40000504:	20 20                	and    %ah,(%eax)
40000506:	20 20                	and    %ah,(%eax)
40000508:	20 20                	and    %ah,(%eax)
4000050a:	20 20                	and    %ah,(%eax)
4000050c:	20 20                	and    %ah,(%eax)
4000050e:	00 1b                	add    %bl,(%ebx)
40000510:	5b                   	pop    %ebx
40000511:	39 3b                	cmp    %edi,(%ebx)
40000513:	25 64 48 20 20       	and    $0x20204864,%eax
40000518:	20 20                	and    %ah,(%eax)
4000051a:	20 20                	and    %ah,(%eax)
4000051c:	20 20                	and    %ah,(%eax)
4000051e:	20 20                	and    %ah,(%eax)
40000520:	20 20                	and    %ah,(%eax)
40000522:	20 20                	and    %ah,(%eax)
40000524:	20 20                	and    %ah,(%eax)
40000526:	20 20                	and    %ah,(%eax)
40000528:	20 20                	and    %ah,(%eax)
4000052a:	20 20                	and    %ah,(%eax)
4000052c:	00 90 90 90 90 90    	add    %dl,0x90909090(%eax)
40000532:	90                   	nop    
40000533:	90                   	nop    
40000534:	90                   	nop    
40000535:	90                   	nop    
40000536:	90                   	nop    
40000537:	90                   	nop    
40000538:	90                   	nop    
40000539:	90                   	nop    
4000053a:	90                   	nop    
4000053b:	90                   	nop    
4000053c:	90                   	nop    
4000053d:	90                   	nop    
4000053e:	90                   	nop    
4000053f:	90                   	nop    
40000540:	1b 5b 32             	sbb    0x32(%ebx),%ebx
40000543:	34 3b                	xor    $0x3b,%al
40000545:	30 48 73             	xor    %cl,0x73(%eax)
40000548:	68 61 70 65 3d       	push   $0x3d657061
4000054d:	25 64 2c 20 73       	and    $0x73202c64,%eax
40000552:	68 61 70 65 25       	push   $0x25657061
40000557:	25 31 39 3d 25       	and    $0x253d3931,%eax
4000055c:	64 20 20             	and    %ah,%fs:(%eax)
4000055f:	20 00                	and    %al,(%eax)
40000561:	74 6f                	je     400005d2 <_main+0x2a>
40000563:	6f                   	outsl  %ds:(%esi),(%dx)
40000564:	20 62 69             	and    %ah,0x69(%edx)
40000567:	67 21 20             	addr16 and %esp,(%bx,%si)
4000056a:	20 00                	and    %al,(%eax)
4000056c:	90                   	nop    
4000056d:	90                   	nop    
4000056e:	90                   	nop    
4000056f:	90                   	nop    
40000570:	90                   	nop    
40000571:	90                   	nop    
40000572:	90                   	nop    
40000573:	90                   	nop    
40000574:	90                   	nop    
40000575:	90                   	nop    
40000576:	90                   	nop    
40000577:	90                   	nop    
40000578:	90                   	nop    
40000579:	90                   	nop    
4000057a:	90                   	nop    
4000057b:	90                   	nop    
4000057c:	90                   	nop    
4000057d:	90                   	nop    
4000057e:	90                   	nop    
4000057f:	90                   	nop    
40000580:	1b 5b 38             	sbb    0x38(%ebx),%ebx
40000583:	3b 25 64 48 1b 5b    	cmp    0x5b1b4864,%esp
40000589:	33 37                	xor    (%edi),%esi
4000058b:	3b 34 30             	cmp    (%eax,%esi,1),%esi
4000058e:	3b 31                	cmp    (%ecx),%esi
40000590:	6d                   	insl   (%dx),%es:(%edi)
40000591:	20 20                	and    %ah,(%eax)
40000593:	20 20                	and    %ah,(%eax)
40000595:	20 20                	and    %ah,(%eax)
40000597:	20 47 41             	and    %al,0x41(%edi)
4000059a:	4d                   	dec    %ebp
4000059b:	45                   	inc    %ebp
4000059c:	20 4f 56             	and    %cl,0x56(%edi)
4000059f:	45                   	inc    %ebp
400005a0:	52                   	push   %edx
400005a1:	1b 5b 30             	sbb    0x30(%ebx),%ebx
400005a4:	6d                   	insl   (%dx),%es:(%edi)
400005a5:	00 89 f6 55 89 e5    	add    %cl,0xe58955f6(%ecx)

400005a8 <_main>:
_main():
tetris.c:355
/*****************************************************************************
for MinGW32
*****************************************************************************/
#ifdef __WIN32__
int __main(void) { return 0; }
#endif
/*****************************************************************************
*****************************************************************************/
int main(void)
{
	unsigned char fell, new_shape, new_x, new_y;
	unsigned char shape = 0, x = 0, y = 0;
	unsigned char key;

/* re-seed the random number generator */
	srand((unsigned long)time(NULL));
400005a8:	55                   	push   %ebp
400005a9:	89 e5                	mov    %esp,%ebp
400005ab:	83 ec 1c             	sub    $0x1c,%esp
400005ae:	57                   	push   %edi
400005af:	56                   	push   %esi
400005b0:	53                   	push   %ebx
400005b1:	83 c4 f4             	add    $0xfffffff4,%esp
400005b4:	83 c4 f4             	add    $0xfffffff4,%esp
400005b7:	6a 00                	push   $0x0
400005b9:	e8 a2 03 00 00       	call   40000960 <_time>
400005be:	50                   	push   %eax
400005bf:	e8 bc 03 00 00       	call   40000980 <_srand>
tetris.c:357
/* turn off keyboard input buffering */
	(void)ioctl(0, 0, 1);
400005c4:	83 c4 20             	add    $0x20,%esp
400005c7:	83 c4 fc             	add    $0xfffffffc,%esp
400005ca:	6a 01                	push   $0x1
400005cc:	6a 00                	push   $0x0
400005ce:	6a 00                	push   $0x0
400005d0:	e8 bb 03 00 00       	call   40000990 <_ioctl>
tetris.c:359
/* banner screen */
	printf("\x1B[2J""\x1B[1;%dH""TETRIS by Alexei Pazhitnov",
400005d5:	83 c4 f8             	add    $0xfffffff8,%esp
400005d8:	6a 20                	push   $0x20
400005da:	68 20 04 00 40       	push   $0x40000420
400005df:	e8 cc 02 00 00       	call   400008b0 <_printf>
tetris.c:361
		SCN_WID * 2 + 2);
	printf("\x1B[2;%dH""Software by Chris Giese", SCN_WID * 2 + 2);
400005e4:	83 c4 20             	add    $0x20,%esp
400005e7:	83 c4 f8             	add    $0xfffffff8,%esp
400005ea:	6a 20                	push   $0x20
400005ec:	68 60 04 00 40       	push   $0x40000460
400005f1:	e8 ba 02 00 00       	call   400008b0 <_printf>
tetris.c:362
	printf("\x1B[4;%dH""'1' and '2' rotate shape", SCN_WID * 2 + 2);
400005f6:	83 c4 f8             	add    $0xfffffff8,%esp
400005f9:	6a 20                	push   $0x20
400005fb:	68 80 04 00 40       	push   $0x40000480
40000600:	e8 ab 02 00 00       	call   400008b0 <_printf>
tetris.c:363
	printf("\x1B[5;%dH""Arrow keys move shape", SCN_WID * 2 + 2);
40000605:	83 c4 20             	add    $0x20,%esp
40000608:	83 c4 f8             	add    $0xfffffff8,%esp
4000060b:	6a 20                	push   $0x20
4000060d:	68 a0 04 00 40       	push   $0x400004a0
40000612:	e8 99 02 00 00       	call   400008b0 <_printf>
tetris.c:364
	printf("\x1B[6;%dH""Esc or Q quits", SCN_WID * 2 + 2);
40000617:	83 c4 f8             	add    $0xfffffff8,%esp
4000061a:	6a 20                	push   $0x20
4000061c:	68 bd 04 00 40       	push   $0x400004bd
40000621:	e8 8a 02 00 00       	call   400008b0 <_printf>
40000626:	83 c4 20             	add    $0x20,%esp
40000629:	8d 45 ff             	lea    0xffffffff(%ebp),%eax
4000062c:	89 45 f4             	mov    %eax,0xfffffff4(%ebp)

4000062f <_NEW>:
tetris.c:366

NEW:	printf("\x1B[9;%dH""Press any key to begin", SCN_WID * 2 + 2);
4000062f:	83 c4 f8             	add    $0xfffffff8,%esp
40000632:	6a 20                	push   $0x20
40000634:	68 d3 04 00 40       	push   $0x400004d3
40000639:	e8 72 02 00 00       	call   400008b0 <_printf>
tetris.c:367
	fflush(stdout);
4000063e:	83 c4 f4             	add    $0xfffffff4,%esp
40000641:	68 98 11 00 40       	push   $0x40001198
40000646:	e8 85 02 00 00       	call   400008d0 <_fflush>
tetris.c:369
/* await key pressed */
	(void)read(0, &key, 1);
4000064b:	83 c4 20             	add    $0x20,%esp
4000064e:	83 c4 fc             	add    $0xfffffffc,%esp
40000651:	6a 01                	push   $0x1
40000653:	8b 45 f4             	mov    0xfffffff4(%ebp),%eax
40000656:	50                   	push   %eax
40000657:	6a 00                	push   $0x0
40000659:	e8 e2 02 00 00       	call   40000940 <_read>
tetris.c:371
/* erase banner */
	printf("\x1B[8;%dH""                      ", SCN_WID * 2 + 2);
4000065e:	83 c4 f8             	add    $0xfffffff8,%esp

⌨️ 快捷键说明

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