Happy Holidays

TechTools will close
for the Holidays on
Friday, December 19th
at 5:00 p.m.

We will reopen for the
New Year on
Monday, January 5th
at 9:00 a.m.

New DV3400

Auto Memory Compression for Maximum Sampling

SALES:
972-272-9392
FAX:
972-494-5814
EMAIL:
»Sales
»Support
»IT Department

TechTools products also available at:
United States Canada Japan
RET, RETFI, RETW

 

RET                        Return from subroutine


Words:        1        Cycles:        2                Affects:        none

 

Operation:        The next stack value is moved into the program counter. On '5x devices, W is cleared to 0.

 

Coding:        '5x        RETLW        0

       'xx        RETURN

 

 

RETI                        Return from Interrupt


Words:        1        Cycles:        2                Affects:        none

 

Operation:        The next stack value is moved into the program counter.  Interrupts are enabled by setting the Global Interrupt Enable bit, GIE (INTCON.7).

 

Coding:        'xx        RETFIE

 

 

RETW        literal1,literal2,...      Assemble RET’s which load W with literal data


Words:        ?        Cycles:        2 per RETLW        Affects:        none

 

Operation:        A list of RET’s with literal data in the W area is assembled, which can be accessed by JMP PC+W or JMP W instructions. This is useful for lookup tables.

 

Coding:        RETLW        literal1

       (RETLW        literal2)

       (RETLW        ...)

 

Example:        jmp        pc+w        ;Jump to byte at location pc+w

 

       retw        00100011b        ;Return with w holding appropriate

       retw        00h,01h,02h,03h        ;value

       retw        â€™Enter cycle count’