📄 interrpt.lst
字号:
332 /* Date/Author : 10.04.1997/GA */
333 /* Parameter : */
334 /* Return : */
335 /* */
336 /**************************************************************************/
337 // Interrupt with using the register bank switch
338 //interrupt [76] using [ALTERNATE_SET] void near uart1tx_interrupt (void)
339 // Interrupt without using the register bank switch
340 // interrupt [76] void near uart1tx_interrupt (void)
341 //{
342 // Add code here
343 //}
344
345 /**************************************************************************/
346 /* */
347 /* UART1Rx interrupt routine */
348 /* Name : uart1rx_interrupt */
349 /* Date/Author : 10.04.1997/GA */
350 /* Parameter : */
351 /* Return : */
352 /* */
353 /**************************************************************************/
354 // Interrupt with using the register bank switch
355 //interrupt [80] using [ALTERNATE_SET] void near uart1rx_interrupt (void)
356 // Interrupt without using the register bank switch
357 // interrupt [80] void near uart1rx_interrupt (void)
358 //{
359 // Add code here
360 //#if defined (SAMPLE_Y2) || defined (SAMPLE_Y3)
361 //help2 = uart_1_get_synchronous_mode ();
362 //REC_STRING[j] = help2;
363 //j++;
364 //#endif /* SAMPLE_Y2, SAMPLE_Y3
365 //#if defined (SAMPLE_Y5) || defined (SAMPLE_Y6)
366 //help2 = uart_1_get_synchronous_mode ();
367 //REC_STRING[j] = help2;
368 //j++;
369 //#endif /* SAMPLE_Y5, SAMPLE_Y6
370 //}
371
372 /**************************************************************************/
373 /* */
374 /* Timer A0 - interrupt routine */
375 /* routine must be adapted to the user's needs */
376 /* */
377 /* Name : timer_a0_interrupt */
378 /* Date/Author : 14.04.1997/ST */
379 /* Parameter : */
380 /* Return : */
381 /* */
382 /**************************************************************************/
383 /* Interrupt with using the register bank switch */
384 interrupt using [ALTERNATE_SET] void near timer_a0_interrupt (void)
385 //interrupt [ 84] using [ALTERNATE_SET] void near timer_a0_interrupt (void)
386 /* Interrupt without using the register bank switch */
387 // interrupt [ 84] void near timer_a0_interrupt (void)
388 {
389 timer_100ms++;
\ 00000F C91F.... ADD.W #1,timer_100ms
390 }
\ 000013 FB REIT
\ timer_a1_interrupt:
391
392 /**************************************************************************/
393 /* */
394 /* timer A1: interrupt routine */
395 /* routine must be adapted to the user's needs */
396 /* */
397 /* Name : timer_a1_interrupt */
398 /* Date/Author : 14.04.1997/ST */
399 /* Parameter : */
400 /* Return : */
401 /* */
402 /**************************************************************************/
403 /* Interrupt with using the register bank switch */
404 interrupt using [ALTERNATE_SET] void near timer_a1_interrupt (void)
405 //interrupt [ 88] using [ALTERNATE_SET] void near timer_a1_interrupt (void)
406 /* Interrupt without using the register bank switch */
407 // interrupt [ 88] void near timer_a1_interrupt (void)
408 {
\ 000014 EB44 FSET B
409 // P4=0x02;
410 switch(state_common)
\ 000016 73F0.... MOV.W state_common,R0
\ 00001A 77500000 SUB.W #0,R0
\ 00001E 7DCE12 JLT ?0018
\ 000021 77801100 CMP.W #17,R0
\ 000025 680C JC ?0018
\ 000027 7304 MOV.W R0,A0
\ 000029 A100 ADD.W R0,R0
\ 00002B A104 ADD.W R0,A0
\ 00002D 7D0C.... JMPI.A ?0019:20[A0]
\ ..
\ ?0018:
\ 000032 F4D802 JMP.W ?0017
\ ?0001:
411 {
412 case STATE_COMMON_C0_ON:
413 PD0 = 0x01; /* set one common line to output, all others to input */
\ 000035 C701E203 MOV.B #1,994
414 P0 = 0x01; /* set this common line to high */
\ 000039 C701E003 MOV.B #1,992
415 P1 = ~port_1_c0; /* set outputs inverse to common line */
\ 00003D 0B.... MOV.B port_1_c0,R0L
\ 000040 BC NOT.B R0L
\ 000041 03E103 MOV.B R0L,993
416 P2 = ~port_2_c0;
\ 000044 0B.... MOV.B port_2_c0,R0L
\ 000047 BC NOT.B R0L
\ 000048 03E403 MOV.B R0L,996
417 P3 = ~port_3_c0;
\ 00004B 0B.... MOV.B port_3_c0,R0L
\ 00004E BC NOT.B R0L
\ 00004F 03E503 MOV.B R0L,997
418 P4 = ~port_4_c0;
\ 000052 0B.... MOV.B port_4_c0,R0L
\ 000055 BC NOT.B R0L
\ 000056 03E803 MOV.B R0L,1000
419 P5 = ~port_5_c0;
\ 000059 0B.... MOV.B port_5_c0,R0L
\ 00005C BC NOT.B R0L
\ 00005D 03E903 MOV.B R0L,1001
420 state_common = STATE_COMMON_C0_IN2;
\ 000060 75CF.... MOV.W #13,state_common
\ 0D00
421 TA1 = TIME_OFF;
\ 000066 73FF.... MOV.W TIME_OFF,904
\ 8803
422 break;
\ 00006C F4A202 JMP.W ?0000
\ ?0002:
423 case STATE_COMMON_C0_IN2:
424 PD0 = 0x0F;
\ 00006F 74CFE203 MOV.B #15,994
\ 0F
425 P0 = 0x00; /* set this common line low */
\ 000074 B7E003 MOV.B #0,992
426 P1 = 0; /* set outputs inverse to common line */
\ 000077 B7E103 MOV.B #0,993
427 P2 = 0;
\ 00007A B7E403 MOV.B #0,996
428 P3 = 0;
\ 00007D B7E503 MOV.B #0,997
429 P4 = 0;
\ 000080 B7E803 MOV.B #0,1000
430 P5 = 0;
\ 000083 B7E903 MOV.B #0,1001
431 state_common = STATE_COMMON_C0_OFF;
\ 000086 D91F.... MOV.W #1,state_common
432 TA1 = TIME_ON;
\ 00008A 73FF.... MOV.W TIME_ON,904
\ 8803
433 break;
\ 000090 F47E02 JMP.W ?0000
\ ?0003:
434
435 case STATE_COMMON_C0_OFF:
436 PD0 = 0x01;
\ 000093 C701E203 MOV.B #1,994
437 P0 = 0x00; /* set this common line low */
\ 000097 B7E003 MOV.B #0,992
438 P1 = port_1_c0; /* set outputs inverse to common line */
\ 00009A 72FF.... MOV.B port_1_c0,993
\ E103
439 P2 = port_2_c0;
\ 0000A0 72FF.... MOV.B port_2_c0,996
\ E403
440 P3 = port_3_c0;
\ 0000A6 72FF.... MOV.B port_3_c0,997
\ E503
441 P4 = port_4_c0;
\ 0000AC 72FF.... MOV.B port_4_c0,1000
\ E803
442 P5 = port_5_c0;
\ 0000B2 72FF.... MOV.B port_5_c0,1001
\ E903
443 state_common = STATE_COMMON_C0_IN;
\ 0000B8 75CF.... MOV.W #9,state_common
\ 0900
444 TA1 = TIME_OFF;
\ 0000BE 73FF.... MOV.W TIME_OFF,904
\ 8803
445 break;
\ 0000C4 F44A02 JMP.W ?0000
\ ?0004:
446 case STATE_COMMON_C0_IN:
447 PD0 = 0x0F;
\ 0000C7 74CFE203 MOV.B #15,994
\ 0F
448 P0 = 0x00; /* set this common line low */
\ 0000CC B7E003 MOV.B #0,992
449 P1 = 0; /* set outputs inverse to common line */
\ 0000CF B7E103 MOV.B #0,993
450 P2 = 0;
\ 0000D2 B7E403 MOV.B #0,996
451 P3 = 0;
\ 0000D5 B7E503 MOV.B #0,997
452 P4 = 0;
\ 0000D8 B7E803 MOV.B #0,1000
453 P5 = 0;
\ 0000DB B7E903 MOV.B #0,1001
454 state_common = STATE_COMMON_C1_ON;
\ 0000DE D92F.... MOV.W #2,state_common
455 TA1 = TIME_ON;
\ 0000E2 73FF.... MOV.W TIME_ON,904
\ 8803
456 break;
\ 0000E8 F42602 JMP.W ?0000
\ ?0005:
457
458 case STATE_COMMON_C1_ON:
459
460 PD0 = 0x02;
\ 0000EB C702E203 MOV.B #2,994
461 P0 = 0x02; /* set this common line to high */
\ 0000EF C702E003 MOV.B #2,992
462 P1 = ~port_1_c1; /* set outputs inverse to common line */
\ 0000F3 0B.... MOV.B port_1_c1,R0L
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -