Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Thread Closed: Question not sufficiently explained

???
12/19/03 22:28
Read: times


 
#61079 - RE: asm programming
Responding to: ???'s previous message
hi,
what do you mean with "interupt loops"? Do you mean ISR (Interrupt Service Routine)?
The answer needs more details explained. For example, which compiler do you use?
At main, you should put "JMP INT_ROUTINE" at appropriate address (0x03, 0x0B, 0x13, 0x1B etc - these addresses are known as "interrupts` vectors") and write own service routine anywhere in your program.
Most assemble compilers allow to put both jump and ISR anywhere inside your program text. For example, using Keil, you are able to do something like:
; any code here; even main(), wow! (=
; define JUMP to subroutine of timer 1
CSEG AT 0x1B
LJMP ISR_T1
; put any other segments here
isr_t1_cseg SEGMENT CODE
            RSEG isr_t1_cseg
            USING 1 ; register bank if needs
ISR_T1:
; the code of your ISR created
In fact, by this way you have not limited to type any part of program code anywhere. The linker will put all the code parts at places where they should be (by its mean ;)
In example above, AT keyword says to linker that this code segment must be placed at indicated address. RSEG just ask linker to create relative segment in anywhere of program memory. Is it clean?

cu

List of 8 messages in thread
TopicAuthorDate
asm programming            01/01/70 00:00      
   RE: asm programming            01/01/70 00:00      
      RE: asm programming            01/01/70 00:00      
         RE: asm programming            01/01/70 00:00      
   RE: asm programming            01/01/70 00:00      
   RE: asm programming            01/01/70 00:00      
      Barking at a tree ?            01/01/70 00:00      
   RE: asm programming            01/01/70 00:00      

Back to Subject List