Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

What is RETW instruction used for in PIC ?

Status
Not open for further replies.

coolchip

Full Member level 2
Joined
Nov 17, 2003
Messages
125
Helped
1
Reputation
2
Reaction score
2
Trophy points
1,298
Activity points
1,109
What is RETW instruction used for in PIC ?

Thanks !
 

RETW in PIC

Strange enough I didn't find it anywhere in the datasheet !!
 

Re: RETW in PIC

I have not come across a RETW instruction... Could it be the RETLW instruction that you're referring to? Or, could it be a pseudo instruction that someone created using the define directive?

Regards, Mike
 

Re: RETW in PIC

Most probably RETLW xx, which means RETURN from a CALL with W loaded with value "xx".

Intended for table read routines, useful for debugging where, depending what was the xx value you knew where the action was passing through after acertain CALL:
 

Re: RETW in PIC

The instruction is RETLW is mostly used when doing look-up tables in PIC assembly. You call the table address with CALL instruction, at the table address you place an instruction that adds an offset to the PCL to get the correct RETLW from the table and return with that value in the W register.
Good Luck
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top