18.11.2014 Views

The Microcontroller Idea Book - Jan Axelson's Lakeview Research

The Microcontroller Idea Book - Jan Axelson's Lakeview Research

The Microcontroller Idea Book - Jan Axelson's Lakeview Research

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 14<br />

Listing 14-2. Simulates BASIC-52’s PROG and PROG1-6 commands, for<br />

systems with BASIC-52 in external memory or systems that do not use the PGM<br />

PULSE signal. Adapted and reprinted with permission from Micromint.<br />

8990 END<br />

9000 PRINT “Press ’P’ to copy the current BASIC program to<br />

RAM at 8000h.”<br />

9010 PRINT “Press ’Q’ to quit.”<br />

9020 G=GET<br />

9030 G=GET : IF G=0 THEN 9030<br />

9040 IF (G80.AND.G112) THEN END<br />

9050 XBY(8010H)=55H<br />

9060 FOR X=200H TO (200H+LEN)<br />

9070 XBY(X+7E11H)=XBY(X)<br />

9080 NEXT X<br />

9090 PRINT “Press a number from 1 to 6 to do PROG1-PROG6.”<br />

9100 PRINT “Press ’Q’ to quit.”<br />

9110 G=GET<br />

9120 G=GET : IF G=0 THEN 9120<br />

9130 IF (G54) THEN END<br />

9140 XBY(8000H)=G<br />

9150 XBY(8001H)=INT(RCAP2/256)<br />

9160 XBY(8002H)=RCAP2-(XBY(8001H)*256)<br />

9170 IF G

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!