[an error occurred while processing this directive]
|
1. SPRU 103f
присутсвуют такие слова:
"Interrupt routines do not know whether the stack pointer is even or odd. Therefore,
the compiler issues these instructions to save the registers and align the
stack pointer.
PSHM ST0 ; first save off all other registers
. . .
PSHM SP ; push the SP
ANDM #0FFFEH,*(SP) ; align to even boundary"
Что за выравнивания стэка в подпрограмме прерываний? Нужно ли SP помещать в стек при вызове прерывания?
2. Зачем нужна инструкция FRAME? Допустим здесь при вызове функции.
callee: ; entry point to the function
PSHM AR6 ; save AR6
PSHM AR7 ; save AR7
FRAME #–15 ; allocate frame and argument block
... ; body of the function
FRAME #15 ; deallocate the frame and argument block
POPM AR7 ; restore AR7
POPM AR6 ; restore AR6
RET ; return
Спасибо.
E-mail: info@telesys.ru