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

📄 peripheral_test.objdump

📁 基于fpga和sopc的用VHDL语言编写的EDA的32位Nios CPU嵌入式系统及其DMA设计俄罗斯方块游戏机
💻 OBJDUMP
📖 第 1 页 / 共 5 页
字号:
UARTISRContext gC = {0,-1};

void MyUARTISR(int context)
	{
  80023a:	17 78       	save %sp,0x17
  80023c:	11 33       	mov %l1,%i0
	UARTISRContext *c = (UARTISRContext *)context;

	int status;
	int rxChar;

	status = c->uart->np_uartstatus;
  80023e:	10 b4       	ldp %l0,[%l1,0x0]
  800240:	42 b0       	ldp %g2,[%l0,0x2]
	rxChar = c->uart->np_uartrxdata;
  800242:	18 b0       	ldp %i0,[%l0,0x0]

	c->uart->np_uartstatus = 0;	// clear the interrupt condition
  800244:	01 34       	movi %g1,0x0
  800246:	41 a0       	stp [%l0,0x2],%g1

	if(status & np_uartstatus_rrdy_mask)	// character arrived?
  800248:	e2 54       	skp1 %g2,0x7
  80024a:	0b 80       	br 800262 <MyUARTISR+0x28>
  80024c:	00 30       	nop
		printf("(%02x)",rxChar);	// we can printf from ISR! woo hoo!
  80024e:	11 9a       	pfx %hi(0x4220)
  800250:	88 35       	movi %o0,0xc
  800252:	04 98       	pfx %hi(0x80)
  800254:	08 6c       	movhi %o0,0x0
  800256:	d9 98       	pfx %hi(0x1b20)
  800258:	c1 37       	movi %g1,0x1e
  80025a:	02 98       	pfx %hi(0x40)
  80025c:	01 6c       	movhi %g1,0x0
  80025e:	e1 7f       	call %g1
  800260:	09 33       	mov %o1,%i0
	c->rxChar = rxChar;			// save the character for later use.
  800262:	58 7e       	fill8 %r0,%i0
  800264:	01 98       	pfx %hi(0x20)
  800266:	11 7e       	st8d [%l1],%r0
	}
  800268:	df 7f       	ret
  80026a:	a0 7d       	restore

0080026c <DoUARTEnableInterruptHandler>:

void DoUARTEnableInterruptHandler(void)
	{
  80026c:	17 78       	save %sp,0x17
	printf("\n\n\n");
  80026e:	11 9a       	pfx %hi(0x4220)
  800270:	88 36       	movi %o0,0x14
  800272:	04 98       	pfx %hi(0x80)
  800274:	08 6c       	movhi %o0,0x0
  800276:	d9 98       	pfx %hi(0x1b20)
  800278:	d0 37       	movi %l0,0x1e
  80027a:	02 98       	pfx %hi(0x40)
  80027c:	10 6c       	movhi %l0,0x0
  80027e:	f0 7f       	call %l0
  800280:	00 30       	nop
	printf("The UART interrupt will print out the hex code for\n");
  800282:	11 9a       	pfx %hi(0x4220)
  800284:	08 37       	movi %o0,0x18
  800286:	04 98       	pfx %hi(0x80)
  800288:	08 6c       	movhi %o0,0x0
  80028a:	f0 7f       	call %l0
  80028c:	00 30       	nop
	printf("each received character, without affecting the\n");
  80028e:	13 9a       	pfx %hi(0x4260)
  800290:	88 35       	movi %o0,0xc
  800292:	04 98       	pfx %hi(0x80)
  800294:	08 6c       	movhi %o0,0x0
  800296:	f0 7f       	call %l0
  800298:	00 30       	nop
	printf("the operation of the main thread.\n\n");
  80029a:	14 9a       	pfx %hi(0x4280)
  80029c:	88 37       	movi %o0,0x1c
  80029e:	04 98       	pfx %hi(0x80)
  8002a0:	08 6c       	movhi %o0,0x0
  8002a2:	f0 7f       	call %l0
  8002a4:	00 30       	nop
	printf("This will remain in effect until you choose the\n");
  8002a6:	16 9a       	pfx %hi(0x42c0)
  8002a8:	08 34       	movi %o0,0x0
  8002aa:	04 98       	pfx %hi(0x80)
  8002ac:	08 6c       	movhi %o0,0x0
  8002ae:	f0 7f       	call %l0
  8002b0:	00 30       	nop
	printf("Disable Interrupt Handler menu option.\n\n");
  8002b2:	17 9a       	pfx %hi(0x42e0)
  8002b4:	88 36       	movi %o0,0x14
  8002b6:	04 98       	pfx %hi(0x80)
  8002b8:	08 6c       	movhi %o0,0x0
  8002ba:	f0 7f       	call %l0
  8002bc:	00 30       	nop


	// To "enable interrupts" for the UART,
	// we do two things.

	// 1. Install a "user ISR" using our library,
	//    on all three UART trap numbers.

	gC.uart = (np_uart *)na_uart1;
  8002be:	4e 9a       	pfx %hi(0x49c0)
  8002c0:	10 34       	movi %l0,0x0
  8002c2:	04 98       	pfx %hi(0x80)
  8002c4:	10 6c       	movhi %l0,0x0
  8002c6:	48 98       	pfx %hi(0x900)
  8002c8:	11 34       	movi %l1,0x0
  8002ca:	04 98       	pfx %hi(0x80)
  8002cc:	11 6e       	movhi %l1,0x10
  8002ce:	11 a0       	stp [%l0,0x0],%l1
	nr_installuserisr(na_uart1_irq,MyUARTISR,(long)&gC);
  8002d0:	08 36       	movi %o0,0x10
  8002d2:	08 98       	pfx %hi(0x100)
  8002d4:	a9 37       	movi %o1,0x1d
  8002d6:	02 98       	pfx %hi(0x40)
  8002d8:	09 6c       	movhi %o1,0x0
  8002da:	d3 98       	pfx %hi(0x1a60)
  8002dc:	e1 35       	movi %g1,0xf
  8002de:	02 98       	pfx %hi(0x40)
  8002e0:	01 6c       	movhi %g1,0x0
  8002e2:	e1 7f       	call %g1
  8002e4:	0a 32       	mov %o2,%l0

	// 2. Enable interrupts for every condition on the UART for iRrdy only.
	//    We want the normal TxChar routines to behave.

		{
		np_uart *uart;

		uart = na_uart1;
		uart->np_uartcontrol = np_uartcontrol_irrdy_mask;
  8002e6:	e1 48       	bgen %g1,0x7
  8002e8:	61 a4       	stp [%l1,0x3],%g1
		}

	// That's all.
	}
  8002ea:	df 7f       	ret
  8002ec:	a0 7d       	restore

008002ee <DoUARTDisableInterruptHandler>:

void DoUARTDisableInterruptHandler(void)
	{
  8002ee:	17 78       	save %sp,0x17
	np_uart *uart;

	// 1. Disable the UART's control bits for interrupts
	uart = na_uart1;
  8002f0:	48 98       	pfx %hi(0x900)
  8002f2:	10 34       	movi %l0,0x0
  8002f4:	04 98       	pfx %hi(0x80)
  8002f6:	10 6e       	movhi %l0,0x10
	uart->np_uartcontrol = 0;
  8002f8:	01 34       	movi %g1,0x0
  8002fa:	61 a0       	stp [%l0,0x3],%g1

	// 2. Remove our User ISR's
	nr_installuserisr(na_uart1_irq,0,0);
  8002fc:	08 36       	movi %o0,0x10
  8002fe:	09 34       	movi %o1,0x0
  800300:	d3 98       	pfx %hi(0x1a60)
  800302:	e1 35       	movi %g1,0xf
  800304:	02 98       	pfx %hi(0x40)
  800306:	01 6c       	movhi %g1,0x0
  800308:	e1 7f       	call %g1
  80030a:	0a 34       	movi %o2,0x0

	printf("\n\n\nUART interrupt has been disabled.\n\n");
  80030c:	19 9a       	pfx %hi(0x4320)
  80030e:	08 34       	movi %o0,0x0
  800310:	04 98       	pfx %hi(0x80)
  800312:	08 6c       	movhi %o0,0x0
  800314:	d9 98       	pfx %hi(0x1b20)
  800316:	c1 37       	movi %g1,0x1e
  800318:	02 98       	pfx %hi(0x40)
  80031a:	01 6c       	movhi %g1,0x0
  80031c:	e1 7f       	call %g1
  80031e:	00 30       	nop
	}
  800320:	df 7f       	ret
  800322:	a0 7d       	restore

00800324 <rGetChar>:


// --------------------------------------------
/* rGetChar()
   return either the last character stashed
   by the UART interrupt, *or* whatever nr_uart_rxchar
   gives us. This, because the UART ISR will
   stash characters before nr_uart_rxchar can see 'em.

	2002-11-22	dspitzer	call nm_printf_rxchar instead of nr_uart_rxchar
 */

extern void *gReturnToMonitor;		// set by main. Any <RETURN> exits...

int rGetChar(void)
	{
  800324:	17 78       	save %sp,0x17
	int result;

	if(gC.rxChar >= 0)
  800326:	4e 9a       	pfx %hi(0x49c0)
  800328:	10 34       	movi %l0,0x0
  80032a:	04 98       	pfx %hi(0x80)
  80032c:	10 6c       	movhi %l0,0x0
  80032e:	21 b0       	ldp %g1,[%l0,0x1]
  800330:	01 4e       	ext8d %g1,%l0
  800332:	28 30       	mov %o0,%g1
  800334:	08 74       	ext8s %o0,0x0
  800336:	68 7c       	sext8 %o0
  800338:	08 14       	cmpi %o0,0x0
  80033a:	e6 7e       	skps cc_ge
  80033c:	08 80       	br 80034e <rGetChar+0x2a>
  80033e:	18 31       	mov %i0,%o0
		{
		result = gC.rxChar;
		gC.rxChar = -1;
  800340:	21 34       	movi %g1,0x1
  800342:	21 7c       	neg %g1
  800344:	41 7e       	fill8 %r0,%g1
  800346:	01 98       	pfx %hi(0x20)
  800348:	10 7e       	st8d [%l0],%r0
		}
  80034a:	0c 80       	br 800364 <rGetChar+0x40>
  80034c:	00 30       	nop
	else
		{
#if nm_printf_rxchar == nr_jtag_rxchar
		result = nm_printf_rxchar( nasys_printf_uart );
  80034e:	48 98       	pfx %hi(0x900)
  800350:	08 34       	movi %o0,0x0
  800352:	04 98       	pfx %hi(0x80)
  800354:	08 6e       	movhi %o0,0x10
  800356:	f5 98       	pfx %hi(0x1ea0)
  800358:	81 35       	movi %g1,0xc
  80035a:	02 98       	pfx %hi(0x40)
  80035c:	01 6c       	movhi %g1,0x0
  80035e:	e1 7f       	call %g1
  800360:	00 30       	nop
  800362:	18 31       	mov %i0,%o0
#else
		result = nr_uart_rxchar(0);
#endif
		}

	if ( ( 13 == result ) || ( 10 == result ) )	// exit on CR or LF
  800364:	b8 15       	cmpi %i0,0xd
  800366:	e3 7e       	skps cc_ne
  800368:	05 80       	br 800374 <rGetChar+0x50>
  80036a:	00 30       	nop
  80036c:	58 15       	cmpi %i0,0xa
  80036e:	e2 7e       	skps cc_eq
  800370:	07 80       	br 800380 <rGetChar+0x5c>
  800372:	00 30       	nop
		{
		ExitPeripheralTest();
  800374:	c4 98       	pfx %hi(0x1880)
  800376:	e1 35       	movi %g1,0xf
  800378:	02 98       	pfx %hi(0x40)
  80037a:	01 6c       	movhi %g1,0x0
  80037c:	e1 7f       	call %g1
  80037e:	00 30       	nop
		}

	return result;
	}
  800380:	df 7f       	ret
  800382:	a0 7d       	restore

00800384 <DoTimerMenu>:

// Meat

void DoTimerMenu(void)
	{
  800384:	17 78       	save %sp,0x17
	np_timer *timer = na_timer1;
  800386:	49 98       	pfx %hi(0x920)
  800388:	13 34       	movi %l3,0x0
  80038a:	04 98       	pfx %hi(0x80)
  80038c:	13 6e       	movhi %l3,0x10
	char c;
	long timerPeriod = 70000000;
  80038e:	ec 98       	pfx %hi(0x1d80)
  800390:	02 34       	movi %g2,0x0
  800392:	21 98       	pfx %hi(0x420)
  800394:	82 6d       	movhi %g2,0xc

	timer->np_timerperiodh = timerPeriod >> 16;
  800396:	41 30       	mov %g1,%g2
  800398:	01 2e       	asri %g1,0x10
  80039a:	61 ac       	stp [%l3,0x3],%g1
	timer->np_timerperiodl = timerPeriod & 0xffff;
  80039c:	ec 98       	pfx %hi(0x1d80)
  80039e:	02 38       	and %g2,0x0
  8003a0:	42 ac       	stp [%l3,0x2],%g2

menu:
	MenuBegin("TIMER MENU");
  8003a2:	1a 9a       	pfx %hi(0x4340)
  8003a4:	08 35       	movi %o0,0x8
  8003a6:	04 98       	pfx %hi(0x80)
  8003a8:	08 6c       	movhi %o0,0x0
  8003aa:	b9 98       	pfx %hi(0x1720)
  8003ac:	01 36       	movi %g1,0x10
  8003ae:	02 98       	pfx %hi(0x40)
  8003b0:	01 6c       	movhi %g1,0x0
  8003b2:	e1 7f       	call %g1
  8003b4:	00 30       	nop
	MenuEntry('a',"Show Timer State");
  8003b6:	03 98       	pfx %hi(0x60)
  8003b8:	32 34       	movi %l2,0x1
  8003ba:	1a 9a       	pfx %hi(0x4340)
  8003bc:	89 36       	movi %o1,0x14
  8003be:	04 98       	pfx %hi(0x80)
  8003c0:	09 6c       	movhi %o1,0x0
  8003c2:	ba 98       	pfx %hi(0x1740)
  8003c4:	31 36       	movi %l1,0x11
  8003c6:	02 98       	pfx %hi(0x40)
  8003c8:	11 6c       	movhi %l1,0x0
  8003ca:	f1 7f       	call %l1
  8003cc:	48 32       	mov %o0,%l2
	MenuEntry('b',"Start Timer");
  8003ce:	03 98       	pfx %hi(0x60)
  8003d0:	48 34       	movi %o0,0x2
  8003d2:	1b 9a       	pfx %hi(0x4360)
  8003d4:	09 35       	movi %o1,0x8
  8003d6:	04 98       	pfx %hi(0x80)
  8003d8:	09 6c       	movhi %o1,0x0
  8003da:	f1 7f       	call %l1
  8003dc:	00 30       	nop
	MenuEntry('c',"Stop Timer");
  8003de:	03 98       	pfx %hi(0x60)
  8003e0:	68 34       	movi %o0,0x3
  8003e2:	1b 9a       	pfx %hi(0x4360)
  8003e4:	89 36       	movi %o1,0x14
  8003e6:	04 98       	pfx %hi(0x80)
  8003e8:	09 6c       	movhi %o1,0x0
  8003ea:	f1 7f       	call %l1
  8003ec:	00 30       	nop
	MenuEntry('d',"Set Timer Continuous");
  8003ee:	03 98       	pfx %hi(0x60)
  8003f0:	88 34       	movi %o0,0x4
  8003f2:	1c 9a       	pfx %hi(0x4380)
  8003f4:	09 34       	movi %o1,0x0
  8003f6:	04 98       	pfx %hi(0x80)
  8003f8:	09 6c       	movhi %o1,0x0
  8003fa:	f1 7f       	call %l1
  8003fc:	00 30       	nop
	MenuEntry('e',"Clear Timer Continuous");
  8003fe:	03 98       	pfx %hi(0x60)
  800400:	a8 34       	movi %o0,0x5
  800402:	1c 9a       	pfx %hi(0x4380)
  800404:	09 37       	movi %o1,0x18
  800406:	04 98       	pfx %hi(0x80)
  800408:	09 6c       	movhi %o1,0x0
  80040a:	f1 7f       	call %l1
  80040c:	00 30       	nop
	MenuEntry('f',"Enable Timer Interrupt");
  80040e:	03 98       	pfx %hi(0x60)
  800410:	c8 34       	movi %o0,0x6
  800412:	1d 9a       	pfx %hi(0x43a0)
  800414:	09 36       	movi %o1,0x10
  800416:	04 98       	pfx %hi(0x80)
  800418:	09 6c       	movhi %o1,0x0
  80041a:	f1 7f       	call %l1
  80041c:	00 30       	nop
	MenuEntry('g',"Disable Timer Interrupt");
  80041e:	03 98       	pfx %hi(0x60)
  800420:	f0 34       	movi %l0,0x7
  800422:	1e 9a       	pfx %hi(0x43c0)
  800424:	09 35       	movi %o1,0x8
  800426:	04 98       	pfx %hi(0x80)
  800428:	09 6c       	movhi %o1,0x0
  80042a:	f1 7f       	call %l1
  80042c:	08 32       	mov %o0,%l0
	c = MenuEnd('a','g');
  80042e:	48 32       	mov %o0,%l2
  800430:	bb 98       	pfx %hi(0x1760)
  800432:	21 34       	movi %g1,0x1
  800434:	02 98       	pfx %hi(0x40)
  800436:	01 6c       	movhi %g1,0x0
  800438:	e1 7f       	call %g1
  80043a:	09 32       	mov %o1,%l0
  80043c:	11 31       	mov %l1,%o0
  80043e:	11 74       	ext8s %l1,0x0
menuSwitch:
	switch(c)
  800440:	21 32       	mov %g1,%l1

⌨️ 快捷键说明

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