Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Vector table in assembler.

2005-03-21 by Henry Carl Ott

At 02:21 PM 3/21/2005, you wrote:



>For speed, I need to have a bunch of operations that I would normally loop,
>set up in straightline code.
>I also need to control how many of these operations that I execute, by
>varying the entry point.
>
>I seem to remember a way to implement vectored jumps, but I can't think
>what it was offhand.
>
>Each entry might be 6-10 instructions, and there may be 256 of them, so
>whatever it is, needs to not use rjmps.
>Definitely trading codespace for speed here!, and one of the few places
>where I'm likely to use a macro.


ijmp?

i do something like this:
                 add     zl,ax25_rx_count
                 adc     zh,zero                 ; if a carry from low 
order add it in
                 ijmp

;--- jump table
rx_jmp: rjmp    rx_flag                 ;0 flag
                 rjmp    rx_add_5                ;1 zero stuff, add five 
ones toss zero
                 rcall   rx_add_1                ;2 11110
                 rcall   rx_add_1                ;3 1110
                 rcall   rx_add_1                ;4 110
                 rcall   rx_add_1                ;5 10
                 rjmp    rx_add_0                ;6 0
                 rjmp    rx_flush                ; error, too soon

-carl

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.