Shop OBEX P1 Docs P2 Docs Learn Events
Explain DIRL and OUTL for me please — Parallax Forums

Explain DIRL and OUTL for me please

StatzStatz Posts: 28
edited 2008-10-16 22:59 in BASIC Stamp
I have this code that says "LEDs VAR OUTL" and it also has something else that says "DIRL = %11111111" and "LEDs = %00000001".

Basically, what does OUTL and DIRL mean and what would be the point in having the LEDs = %00000001.

Thanks

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-10-16 22:59
    Read the section of the Stamp Basic Manual on memory allocation. OUTS and DIRS are the 16 bit registers that represent the output and direction I/O registers. There is a whole set of names (like OUTL and DIRL) that represent individual bytes, nybbles, and bits of those registers (and the input register, INS).

    As described in that same manual section, "LEDs VAR OUTL" simply defines an alternate name for OUTL that can be used in your program and means the same as OUTL (which is the least significant byte of OUTS).
    ·
Sign In or Register to comment.