[A83] Re: Question about interrupt


[Prev][Next][Index][Thread]

[A83] Re: Question about interrupt




> there anyway?  But if you must, then it's simple:
> 
> .org start_of_program
> 
>  ... program code ...
> 
> .org wherever_the_interrupt_handler_will_go
> 
> IntStart:
>  ...
> IntEnd:
>  
This looks nice in theory, but I tried it formerly
and I ended up with a large program filled with
zeroes to satisfy the demand of the second .org

I wanted to put my interrupt to $FE70, just above
the VAT, and TASM filled the space between then
end of the main program and the interrupt
routine with 000000000000000000... Looked cool. :)

Which means that there is no simple workaround, you
have to calculate the addresses with the
same formula every time you do a jump:

.org $9327

main:
 ...
 ret

 ...

intstart:   ; start of int routine
 ...

labelxx:
 ...

 jp labelxx+$fe70-intstart    ; in the above case

 or
 
 jr labelxx   ; however, I'd use jp, because it's faster,
              ; and speed is a crucial point in the
              ; case of interrupts

Hmm, why am I commenting? :)

PG




References: