macOS xterm-256color fish 212 views

This is a demonstration of the first module I’ve ported to C as a 32bit/64bit source.

The SystemBell responds to the Service_ExternalBell service, and triggers a bell through the sound system with a SoundChannels SWI call. It’s not complicated, and it’s not meant to be - the abstraction allows other clients to replace the bell, and by demonstrating this port from the assembler it shows that this doesn’t have to be hard.

The code was written in C in the standard way. Then it was built for 32bit RISC OS. This works - and is demonstrated here. The working code was then compiled and run in 64bit RISC OS. It worked approximately the first time - a small bug in the CMunge code was triggered, but easily fixed.

The demonstration here builds and loads each module, then triggers them by making the *echo <7> trigger the bell. As the SoundChannels debug is enabled, this prints out the sound that was triggered, and (on my system) the MIDI system outputs a beep (as that’s where the sound is routed in RISC OS Pyromaniac).

1 module done.