Skip to main content
nooshin_1382
Associate III
August 28, 2016
Question

Write An assembly code in spcstudio

  • August 28, 2016
  • 1 reply
  • 859 views
Posted on August 28, 2016 at 10:08

Hi

I want to write some asm instruction in Spc studio but i don't know how can i write these instructions.

if there is exist any sample please let me know about this sample.

Thanks

With Best Regards

Nazerian Vanima
    This topic has been closed for replies.

    1 reply

    Erwan YVIN
    ST Technical Moderator
    August 29, 2016
    Posted on August 29, 2016 at 17:08

    Hello Vanima ,

    The samples are in HAL (*.c , *.s files) in components directories

    #if CORE_SUPPORTS_IVORS
    /* The core supports IVOR registers, the kernel requires IVOR4 and IVOR10
    and the initialization is performed here.*/
    #ifdef __ghs__
    asm (
    ''e_li %r3, %lo(_IVOR4) \t
    ''
    ''mtIVOR4 %r3 \t
    ''
    ''e_li %r3, %lo(_IVOR10) \t
    ''
    ''mtIVOR10 %r3''
    );
    #else
    asm volatile (
    ''e_li %%r3, _IVOR4@l \t
    ''
    ''mtIVOR4 %%r3 \t
    ''
    ''e_li %%r3, _IVOR10@l \t
    ''
    ''mtIVOR10 %%r3''
    : : : 
    ''memory''
    );
    #endif
    #endif

    All CPUs are compatible with the Power Architecture VLE instruction set, which supportssome code size reduction. Best regards Erwan
    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.