AnsweredAssumed Answered

Window preferences -- Can't insert ASM templates -- two approaches attempted

Question asked by MikeSmithCanada on Aug 17, 2013
Latest reply on Aug 21, 2013 by NormY

Trying to set up the following template for an assembly code stub

 

     .section program;

    .global ${ASMfunctionName};

 

//  TODO Modify next line to show how to call from C++

//  extern C void ${cursor} ${ASMfunctionName) { ${cursor} ${inPar1Type} ${inPar1Name}

//                                      $${inPar1Name} passed in R0

#define ${inPar1Name}_R0 R0

 

${ASMfunctionName}:

// TODO -- Warning message expected if stub less that 4 instructions

// TODO -- Insert code

${ASMfunctionName}.END:    RTS;

 

When saved as ASM_LEAF_STUB_VOID_PASS_INT -- you can only insert if the file extension is .c or .cpp and not .asm

 

The available contexts are C / C++,  Comment and Doc comment no assembly

 

Attempt workaround -- set context to Comment

Generate .c file then type

 

// ASM_ cntrl-space -- inserts

// /*  Author: smithmr 2013-08-17

*

*   ${ASMfunctioName}

*/  etc --

 

the // /* problem can be fixed by changing the template

 

Try same approach inside file with extension .asm

Type /*  --  Interesting -- inside a .asm file -- the editor will not let you type /* -- although you can insert  /* comment */ via cut-and paste

 

// ASM cntrl_space does not work to insert a template inside .asm file

IGNORE the /* insertion problem -- That appears to be my API that is blocking the insertion of /* as the problem disappears when I remove the .jar file for Eclipse / dropins in CCES directory

Outcomes