As info, I needed a routine to help with sorting a byte array of integers. Going back to my TRS-80 days back in the late 70s (middle-school years), I recalled that a bubble sort routine was simply implemented. Searched for reference code and stumbled across the Rosetta Code site. I've known about Rosetta for a number of years, in the context of a coding challenge site, but hadn't considered using it as a resource for inspiration.
So, in short, if you're trying to find some inspiration for solving a coding problem, which may be common across different environs, I would encourage one to take a peek at the Rosetta Code repositories to see if something there would be of potential inspriational value. There are a large number of solutions with a plethora of languages represented therein - some are BASIC dialects - one or more of these are very likely portable to ARMbasic. This was the case for me.