Page 2 of 2

Re: wtf main.py and boot.py empty?!

Posted: Mon Nov 12, 2018 7:38 pm
by NikolaiE
I just found out, that you can write inline assembler.

I start to like it.

Re: wtf main.py and boot.py empty?!

Posted: Mon Nov 12, 2018 8:18 pm
by Roberthh
You may also look at the viper code emitter. According to my experience, the generated assembler code is about twice as long as assembler code you would write, and takes twice the time, but is still way faster than bytecode, and you can use symbolic variables and the control structures of Python, like loops, if's, ... So you can decide to use viper for complex code and assembly for simply code needing the highest speed. I used that approach in my SSD1963 driver in the file TFT_io.py: https://github.com/robert-hh/SSD1963-TF ... or-PyBoard

Re: wtf main.py and boot.py empty?!

Posted: Thu Nov 15, 2018 9:17 am
by pythoncoder
Other examples of inline assembler may be found in these digital filter scripts.