From: pito <pi...@vo...> - 2010-09-07 06:42:54
|
Hi Matthias and co., I'd like to ask how to start working with assembler in amforth. This might be of general interest, therefore HOW TO. The example could be the timer int routine: : tick_isr _one timer 2@ d+ timer 2! ; which does "timer = timer + 1" where timer is double integer. I've seen usart routines and Lubos' routines in asm, however generaly the Q: 1. is there any recommended structure or frame for writing assembler words 1a. is there any recomemnded structure or frame for writing assembler interrupt handlers 2. how the data from data stack (or from return stack) are passed to assembler 3. how the data are passed from asm. back to data stack or return stack 4. how the external variables (defined as words) are accessed from assembler 5. how the data stack is duped or droped from assembler 6. what shall be poped and pushed in asm. routine (when entering and leaving it) 7. how the asm return stack is handled (imagine we need nested calls in asm) 8. how the ram, eprom can be accessed from asm 9. how the asm code shall be compiled (? via LP's asm or via avrasm.) Thanks, Pito |