In SX Microcontrollers, SX/B Compiler and SX-Key Tool, g_daubach wrote: Nick, due to its structure, it is impossible that the SX can overwrite program memory. The SX has a so-called Harward structure where program memory and data memory both have separate address and data busses. Program memory is 12 bits wide, and data memory is 8 bits wide. There is one instruction (IREAD) which allows to read data from program memory but there is no instruction allowing to write into program memory. Besides this, program memory is flash memory which can only be written to with a special external hardware mode but not via the internal busses. When an instruction has IND as parameter, like with CLR IND, this means that the FSR contains the full memory address, and not only the pages. So, the FSR can address memory from $00 up to $FF. When clearing program memory, it is important not to touch any memory address from $00 up to $07 (SX20/28) or $09 (SX48) as special registers are mapped into this address range. This is why the code contains the sb fsr.4 and setb fsr.3 instructions. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=312678#m312688 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)