In SX Microcontrollers, SX/B Compiler and SX-Key Tool, amiller wrote: I use macros before and after my lookup tables to spit out warnings if the table gets shifted in memory past the top half of the page. They just examine the current addr and check for top half of page. Something like this... _pc_check MACRO 0 IF ($ & $100) ERROR 'ERROR!! ADD PC,W instruction at invalid addr' ENDIF ENDM _retw_check MACRO 0 if (( $ & $1ff ) > $101 ) ERROR 'RETW data table not at top of code page.' ENDIF ENDM I use a lot of conditional assembler/compiler directives that require my code to be as page independent as possible. These macros keep me from spending hours hunting down this type of table/page placement error. I keep these macros in the same include file as my _mode and _ back macros, and register/mode definitions. I hope this helps, -AGM- ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=116812#m123002 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)