Looking at the BASIC code on that website, I noticed they used peek and poke. MJD's
PeekPoke module for Perl provides peek and poke functions. I don't know if it would work, but you might be able to adapt that BASIC code to Perl code using
PeekPoke. Just a thought...