Hello, Eric. It looks like I am a couple years late in finding your question, but I may have some information (if not a solution) in the event that you're still interested.
First of all, your program is correct, as best I can tell, and it runs fine in Apple Pascal v1.3 on my Apple IIc (with or...