From 6ac1506664212b4a974112fa21538121db120f0d Mon Sep 17 00:00:00 2001 From: ian Date: Sun, 25 Dec 2005 23:13:40 +0000 Subject: [PATCH] new load_tblptr macro --- detpic/common.inc | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/detpic/common.inc b/detpic/common.inc index 2bf36e3..a589da6 100644 --- a/detpic/common.inc +++ b/detpic/common.inc @@ -182,7 +182,27 @@ tblrd_postdec_fixup macro endm ;---------------------------------------- -; For setting up TBLPTR according to the picno +; For setting up TBLPTR + +load_tblptr macro value +; +; Before After +; TBLPTR* any set +; W, STATUS any undefined +; + mov_lw value & 0xff + mov_wf TBLPTRL + + mov_lw value >> 8 + mov_wf TBLPTRH + + if value > 0xffff + mov_lw value >> 16 + mov_wf TBLPTRU + else + clr_f TBLPTRU + endif + endm load_perpic_tblptr macro flash_map_base, perpic_entry_size ; -- 2.30.2