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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Programs for Loading Files<br />

Listing B-2 (page 4 of 4).<br />

rem Error messages and program termination<br />

3000 PRINT CR ,"Line “,LINE,” EXPECTED ’:’, FOUND<br />

’",CHR(C),"’" : END<br />

3010 PRINT CR, “Line ”, LINE, “: Unknown record type”, CH :<br />

END<br />

3020 PRINT CR, “Line ”, LINE, “: Checksum failure. Expected”,<br />

3025 PH0. ABS (CHECK - CH) : END<br />

rem Normal program exit point<br />

3030 PRINT CR, “Received an End record in line”,LINE : END<br />

3040 PRINT CR, “Line”, LINE, “: Illegal EPROM/EEPROM address<br />

:”,<br />

3050 PH0. ADDR : END<br />

3060 PRINT CR, “Line”, LINE, “: PGM error at address”,<br />

3070 ADDR = DBY (1AH) * 256 + DBY (18h) : PH0. ADDR<br />

3080 PH0. “<strong>The</strong> byte at”, address, “ is”, XBY(ADDRESS)<br />

3090 PH0. “<strong>The</strong> byte should be”,DBY (28) : END<br />

3100 PH0. CR, “Line”, LINE, “: Error writing at address”,<br />

ADDR<br />

3110 PH0. “<strong>The</strong> byte at”, addr, “ is”, XBY(ADDR)<br />

3120 PH0. “<strong>The</strong> byte should be”, XBY (I) : END<br />

REM verify CBY() read in RAM failed:<br />

3130 PH0. “<strong>The</strong> byte at”,addr," failed a verify with CBY" :<br />

END<br />

<strong>The</strong> <strong>Microcontroller</strong> <strong>Idea</strong> <strong>Book</strong> 269

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

Saved successfully!

Ooh no, something went wrong!