Accessing Reg of 89C51 with RTX51 tiny

i am stuck at problem, i tried to crate 3, out of which 2 tasks for getting i/p from user. each of two task stores 1 int to reg and third task calculate addition of two and display output at serial port..
problem: how to access register and use them? ..... NEED HELP!! if any one could tell me where to find some material on this stuff... i have already read REGFILE Compiler and linker directive ... but could'n get how to use it?

Parents
  • Why should your tasks put data into registers, and expect a different task to pick up that data from a register?

    What is wrong with using normal variables?

    Just that it isn't enough to have variables - there must be some form of handshake logic so the consumer (the task that adds the values) knows that the two producers have produced any data.

    And the two producers should be able to know if the consumer is keeping up.

    An interesting thing here - you haven't even told what operating system you have using for creating your three tasks. Or have you accidentally used the word "task" when talking about normal functions? So your program is actually sequential:

    get_input_1();
    get_input_2();
    compute_sum_of_inputs();
    

Reply
  • Why should your tasks put data into registers, and expect a different task to pick up that data from a register?

    What is wrong with using normal variables?

    Just that it isn't enough to have variables - there must be some form of handshake logic so the consumer (the task that adds the values) knows that the two producers have produced any data.

    And the two producers should be able to know if the consumer is keeping up.

    An interesting thing here - you haven't even told what operating system you have using for creating your three tasks. Or have you accidentally used the word "task" when talking about normal functions? So your program is actually sequential:

    get_input_1();
    get_input_2();
    compute_sum_of_inputs();
    

Children
More questions in this forum