dwelch67 / raspberrypi

Raspberry Pi ARM based bare metal examples
2.71k stars 486 forks source link

Coroutines in ARM Assembly #34

Open tcwan opened 6 years ago

tcwan commented 6 years ago

Hi, I've sort of kept a :star: on your projects since I'm interested in ARM Assembly Language programming, and was wondering if anyone's interested in a coroutines implementation in ARM Assembly language. All my searches for ARM Assembly implementation of coroutines have come up empty.

I ported it from in4lio's implementation to ARM Assembly. The files are MIT Licensed.

You can find arm-stddef.h and enum-asm.h via the provided links.

I have not tested it for interworking so I can't say that it will work correctly for ARM-Thumb and Thumb-ARM calls as is. The main sticking point is that I'm not sure if the Linker will replace the direct BL calls with BLX calls automatically or not.