piclist 2001\01\10\132703a >
Thread: Anyone have a solid strategy for code that spans pages?
www.piclist.com/techref/microchip/devices.htm?key=pic
flavicon
face BY : Javi2 email (remove spam text)



I use this macro to forget cross-pages calls.
Runs ok with Microchip's boot loader in order
to re-use serial routines located in page 4.

;----- START CODE ------
; save_w is a RAM location to save W register.

Call_page MACRO adress_new, save_w
 local a = high $
 local b = high adress_new
 if a == b
  call  adress_new
 else
  movwf  save_w
  pagesel adress_new
  movf  save_w,w
  call  adress_new
  movwf  save_w
  pagesel $
  movf  save_w,w
 endif
 endm

;----- END CODE ------


Regards, Javier Martmnez.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listserv@spam@spamEraseMEmitvma.mit.edu with SET PICList DIGEST in the body


<002101c07b32$64808760$c4a599c1@mi-pc> 8bit

See also: www.piclist.com/techref/microchip/devices.htm?key=pic
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Anyone have a solid strategy for code that spans pages?

month overview.

new search...