Post Reply 
newRPL: [UPDATED April 27-2017] Firmware for testing available for download
11-08-2016, 08:45 PM (This post was last modified: 11-08-2016 09:01 PM by Han.)
Post: #433
RE: newRPL: [UPDATED November-08-16] Firmware for testing available for download
One of the things I would like tinker with is some of the linear algebra commands that are currently not available. I just happened to notice a few hard-coded limits in the array size (65535). Is there any reason not to use define statements so that it could easily be managed later on rather than a hard value (I suspect that perhaps memory is the limiting factor)?

EDIT: Some initial questions:

The current code base appears to keep all the code for a particular command embedded within the library as suggested by:
Code:
void sample_handler()
{

  // If the current opcode is the prolog of an object...
  if(ISPROLOG(CurOpcode)) {

     // ... issue an error, since this example library only defines a command, not
     // objects with data payload

     // Raise a "Bad Opcode" exception
     Exception=EX_BADOPCODE;
     // Indicate which instruction caused the error (given by the RPL Instruction Pointer, IPtr)
     ExceptionPointer=IPtr;
     return;
  }
     switch(OPCODE(CurOpcode))
         {
          case MYCMD:
          ...

          // Also process all mandatory opcodes
          case ....
          ...
          default:
          // Raise a "Bad Opcode" exception
          Exception=EX_BADOPCODE;
          // Indicate which instruction caused the error (pointer to by the RPL Instruction Pointer, IPtr)
          ExceptionPointer=IPtr;
          return;
         }
}

I do not see a quick way to make use of existing routines (cross-library usage). For example, if I wanted to re-use the code of MYCMD, and since it is not defined as a function, what is the proper way to call MYCMD? Would I have to mix "SysRPL" like in

Code:
const WORD const matrixeval_seco[]={
    MKPROLOG(DOCOL,5),
    MKOPCODE(LIBRARY_NUMBER,DOMATPRE),     // PREPARE EACH ELEMENT
    (CMD_OVR_EVAL),    // DO THE EVAL
    MKOPCODE(LIBRARY_NUMBER,DOMATPOST),    // POST-PROCESS RESULTS AND CLOSE THE LOOP
    MKOPCODE(LIBRARY_NUMBER,DOMATERR),     // ERROR HANDLER
    CMD_SEMI
};

Thanks ahead of time for the help.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: newRPL: [UPDATED November-08-16] Firmware for testing available for download - Han - 11-08-2016 08:45 PM



User(s) browsing this thread: 1 Guest(s)