I had a quick look and agreed for a learning exercise this would be fantastic and given you have two existing examples to compare with it would be possible to work it out and learn some C at the same time and even if you did not know C; You would be able to hack it together without much brain taxing.