You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • And it's done. With the latest Web IDE and Espruino from GitHub, you can now do inline assembler:

    var adder = E.asm("long(long)",
    "movs    r2, #3",
    "movs    r3, #0",
    "adds    r2, r2, r0",
    "adc.w   r3, r3, r1",
    "mov r0, r2",
    "mov r1, r3",
    "bx  lr");
    ...
    >adder(2)
    =3
    

    Looks like nobody is as excited about this as me :(

    The assembler is here: https://github.com/espruino/EspruinoWebI­DE/blob/master/js/plugins/assembler.js

    It still needs a huge amount of work in order to support a usable amount of Thumb2, but it seems promising. Perhaps there's already an assembler that could be used?

    I think for fast IO this could be extremely useful - for instance the LED displays mentioned here could have a bit of assembler that bit-bashed each byte.

About

Avatar for Gordon @Gordon started