Shop OBEX P1 Docs P2 Docs Learn Events
RETI1 = CALLD INB,IRET1 WCZ syntax question — Parallax Forums

RETI1 = CALLD INB,IRET1 WCZ syntax question

Since INB is a read only register what does the write to D (INB) actually try to do?
Regards and Thanks
Bob (WRD)

Comments

  • Since the P2 doesn't have an NR flag like P1, writing to INB is just a way to prevent overwriting a useful cog location.

  • So does P2 just write out to the address and since there is no write enable(not sure how it works on the databus) nothing receives address written too.
    The NR flag (No write I assume) drops the write enable ?
    Regards
    Bob (WRD)

  • AJLAJL Posts: 517
    edited 2021-10-07 23:18

    @"Bob Drury" said:
    So does P2 just write out to the address and since there is no write enable(not sure how it works on the databus) nothing receives address written too.

    Yes

    The NR flag (No write I assume) drops the write enable ?

    The P1 had a WR flag, and the NR effect meant that this flag was suppressed in instructions that would normally write a result. P2 doesn't have such a flag, so other techniques are required. One option for discarding a result is to set a read-only register (like INA or INB) as the destination register.

    Regards
    Bob (WRD)

    Regards,
    Anthony, (AJL)

Sign In or Register to comment.