Apple Personal Modem: Setting registers from Applesoft BASIC

To set the registers on the Apple Personal Modem from Applesoft BASIC, use
this program, based on a program that sends custom characters to
ImageWriters. Line 60 contains the machine language program that downloads
commands. Line 70 contains the ASCII codes for the command string.

Line 70 of this particular example makes the program set the S0 register
to 255 by sending the string ATS0=255 <RETURN>, a return the APM must have
to accept the command string in all cases.

10 D$=CHR$(4)
20 FOR I= 768 TO 773: READ J : POKE I,J : NEXT I
30 PRINT D$;"PR#2"
40 FOR I = 1 TO 9: READ J : POKE 769,J : CALL 768 : NEXT I
50 PRINT D$;"PR#0"
60 DATA 169,4,76,237,253,96
65 REM ENTER COMMANDS IN LINE 70 AS ASCII CODES
66 REM BE SURE FOLLOW COMMAND STRING WITH A RETURN (ASCII 13)
70 DATA 65,84,83,48,61,50,53,53,13

Refer to the APM manual and the ASCII code chart for more information.
Published Date: Feb 18, 2012