To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcxOpen lugnet.robotics.rcx in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / 1767
  librcx & interrupt handler
 
Hi everyone, I am trying to use librcx (URL) to write light (in code size) programs for RCX, and up till now it works fine, but i'd like to begin using interrupts. I'd like to set my own handler for the interrupts. For example, an interrupt handler (...) (22 years ago, 26-Aug-02, to lugnet.robotics.rcx)
 
  Re: librcx & interrupt handler
 
(...) How much info do you want about all this? Specific questions are good if this does not get at what you are wondering about. The interrupt vectors at the end of rom.h are the ones to play with. The true interrupt vectors are in ROM, as are a (...) (22 years ago, 27-Aug-02, to lugnet.robotics.rcx)
 
  Re: librcx & interrupt handler
 
Hello, First, thanx for your answer, I'll be looking at the code and link you mentioned, today, it may very well answer the question I have... (...) everyone, (...) (URL) (...) programs for RCX, and up till now it works (...) like to set my own (...) (22 years ago, 28-Aug-02, to lugnet.robotics.rcx)
 
  Re: librcx & interrupt handler
 
(...) The ROM already supports a buffer size of 1 if that is enough for you. The ROM receives a message asynchronously into that buffer, and you can check it whenever you like and respond accordingly. The code I linked to should help you with buffer (...) (22 years ago, 28-Aug-02, to lugnet.robotics.rcx)
 
  Re: librcx & interrupt handler
 
hi, I have another question about interrupt handlers. I would like to know how (if it is possible) I could call the ROM OCIA handler. The reason is that I would like to execute a small task periodicaly but if I simply redirect the OCIA handler (...) (22 years ago, 29-Aug-02, to lugnet.robotics.rcx)
 
  Re: librcx & interrupt handler
 
(...) You can do this in C. ((void(*)(void))0x36ab)(); (void(*)(void)) is a cast to make 0x36ab a pointer to a void function with no parameters. You then take that and use it as a function. You still have to be careful about register usage and use (...) (22 years ago, 29-Aug-02, to lugnet.robotics.rcx)
 
  Re: librcx & interrupt handler
 
Hi (...) i thought of that... but it seemed too easy... (...) here's what I wrote, and so far it seems to work proprly (tell me if I'm wrong): #include <timer.h> #include <null.h> #include <irq.h> static char _timer_data[64]; #define save_reg() (...) (22 years ago, 30-Aug-02, to lugnet.robotics.rcx)

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR