Applesoft - CALL and Peek
by ?


Q. - When typing an Applesoft listing into my ADAM computer some very weird things happen, such as; CALL 12345 --> it seems to "kill" the computer, I'm locked out of it and the only way to get it back is to reboot the Smartbasic tape needless to say anything in memory at the time is lost. Also: 10 for x=1 to 40 --> the computer consistently returns ILLEGAL STATEMENT what's wrong? lastly; How come the "EXEC" command doesn't work on the ADAM? Coleco claims to be Applesoft compatible and EXEC is an Applesoft command?
Glen Myres, Rochelle

A. - First of all, the ADAM and APPLE are similar in many ways yet VERY different. With the CALL statement; this statement is used to access a machine language subroutine from basic, but the CALL has to go to certain memory location, here's where one of many differences come to play. ADAM and APPLE have their respective memory mapped out differently, in other words APPLE'S location to read the keyboard is PEEK(-16384) where as ADAM's is PEEK(-651) get the point ? Any program (APPLESOFT) that refers to specific memory locations is not going to run right on the ADAM. As for the line statement, ADAM is very picky about spaces between parts of line listings I know the APPLE is relatively intolerant of this and all I can say is read the Smartbasic manual to greater detail and learn where ADAM wants its spaces. The EXEC command was not given to ADAM, why, I don't know. Many people have resented this little exclusion as EXEC was a very useful command to have. Perhaps in the future Image Microcorp will publish a small Assembly Language program to correct this.

Back to Top