[an error occurred while processing this directive]
Вручную не надо(+)
(«Телесистемы»: Конференция «Микроконтроллеры и их применение»)

миниатюрный аудио-видеорекордер mAVR

Отправлено Perec 18 декабря 2002 г. 16:53
В ответ на: Ответ: отправлено Алексей ВМ 18 декабря 2002 г. 15:13

5.24.3 Context Saving on Interrupts
The PIC processor only saves the PC on its stack whenever an interrupt occurs.Other registers and
objects must be saved in software.The PICC compiler determines which registers and objects are used
by an interrupt function and saves these appropriately.
If the interrupt routine calls other functions and these functions are defined before the interrupt
code in the same module,then any registers used by these functions will be saved as well.If the called
functions have not been seen by the compiler,a worst case scenario is assumed and all registers and
objects will be saved.

5.24.3.1 MidRange Context Saving
The code associated with interrupt functions that do not require registers or objects is placed directly
at the interrupt vector in a psect called intcode.Features and Runtime Environment
If context saving is required, this is performed by code placed in to a psect called intentry which will
be placed at the interrupt vector. Any registers or objects to be saved are done so to areas of memory
especially reserved for this purpose.

Все честно, без обмана. Сказано, что “compiler determines which registers and objects are used
by an interrupt function and saves these appropriately”, так оно и есть на самом деле. Я же привел начало кода обработки прерывания в подтверждение того, что HT ловит мышей.

> Кроме того, в конце листинга Isr нарисован кусок кода, который сам пытается что-то восстановить. Откуда?

Не проще ли показать код? Вырезать десяток строк с 0004 адреса и десяток в конце прерывания. Вместе и посмотрим.

Составить ответ  |||  Конференция  |||  Архив

Ответы



Перейти к списку ответов  |||  Конференция  |||  Архив  |||  Главная страница  |||  Содержание  |||  Без кадра

E-mail: info@telesys.ru