Reviving old software - ARM assembler guidance needed
Robert Hampton (1923) 57 posts |
Recently I have started to dip my toe back into the world of RISC OS. My old Pi 1 is set up and working and I am hoping to upgrade to something a bit faster in the near future. As part of this, I have been looking at reviving some of my old programs, updating them for modern hardware and rereleasing them. Most of them are fairly simple BASIC desktop apps, and most of them used BLibII, a BASIC library written by Ian Palmer circa 1994 and given away on the very first Acorn User CD-ROM. This library provides the usual routines for handling the Wimp and also useful stuff for sprites, Draw files and more. So far, so good, except the Memory management library, on which most of the rest of the routines depend, contains some assembler. Last time I tried running any of my apps, on my Iyonix a decade ago, surprisingly they worked OK. A quick test on my Pi 1 with compatibility mode turned off seems to work too. However I am conscious that ARMv7 has introduced further incompatibilities and I am reluctant to just push these apps out and hope for the best. I know little about ARM assembler, and the code as provided is crunched so is not easy to read. Anyone with more ARM knowledge than me (that’s everyone) fancy having a look to see if there could be any issues? I have put the full BLibII download up at my website – it’s about 130K altogether, but if you want just the memory library it is at blib2-memory.zip and weighs in at 5K. |
Paolo Fabio Zaino (28) 1882 posts |
Hi Robert, I had no time to test it yet on more modern hardware, however (from a quick look at the ASM and code): blib2-memory looks ok to me, the ASM is suitable for 32bit ARM and RO 5 and the malloc function does generated addresses that are aligned from the memory poll. Thought the way the FNmalloc generates the aligned addresses is a bit elaborated lol could probably be made simpler, but it’s not something that will cause much perf issues I guess. So, it will probably work fine on more modern boards, have you experienced problems or are you just asking to test on more modern boards to be safe? Thanks, |
Martin Avison (27) 1494 posts |
The WiKi page gives a good indication of the main differences to watch out for. |
Robert Hampton (1923) 57 posts |
Cheers Paolo. The newest hardware I have is my old Pi 1, where it did seem to work, however it is good to know that it looks OK for the newest and best hardware. Time to get my old apps updated and into PackMan I guess! Thanks Martin for the Wiki link, I will keep it for future reference. Learning ARM assembler is one of my things to do when I get around to it, where “it” has consistently remained a fixed distance away in the future :) BLibII is an interesting piece of software. I found it useful when I was learning to program the WIMP, but it existed in that period just before the internet exploded everywhere. It was given away in PD libraries and by Acorn User, but it’s never been made available anywhere to download, as far as I know. Long shot but does anyone have an up to date contact for Ian Palmer, the original author? I have tried searching online but keep running into dead ends. |