On Wed, 21 Mar 2001 07:33:39 MST, you wrote: >Bob Ammerman wrote: >If you value your time at all: run to buy an ICD! > > >OK...I agree, just need to see if the boss does too...I'm supposed to be= smart >enuf to not need it! If you're smart enough not to need an ICD, you shouldn't be working for someone who doesn't think a $99 investement is worthwhile! >Reading over the specs, it targets the chips I am using (how lucky am I = for >that?), so the question begs to be asked...if my target assembly has the >16F874, can I not build my own ICD? I thought someone had done this, = since it >simply interfaces to MPLAB. Yes=20 >Of course its probably not that simple is it? It never is... > >But I have to go back...why isnt this working? I did a call to a = display >routine in page 2, set the bits...didnt do ANY calls or goto's in the = called >routine yet it won't work. Come on...this should be simple right? Of = course >once I get the ICD it will be obvious no doubt. Remember that the bits are page preselect, not select. They determine where the upper address bits come from on call and gotos only.=20 Return addresses are pushed with the full address, but the bits are NOT restored to PCLATH on return.=20 e.g.=20 =46rom page 0=20 CALL PAGE1CODE ; if this is omitted, the next call or goto will go to page 1, probably into the weeds. PAGE1CODE =20 RETURN. =20 What I usually do is this, which avoids having to remember which page each routine is in. for routines called more than once it is fairly code-efficient. =20 Page 0 :=20 call routine1 call routine2 errorlevel -306 ; suppress warnings so we only see 'real' ones routine1 goto p1routine1 routine2 goto p1routine2 errorlevel +306 ; re-enable warnings to see unintentional cross-page ------------------------PAGE 1=20 p1routine1 goto page1exit p1routine2 goto page1exit page1exit=20 return =20 -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body