Shop OBEX P1 Docs P2 Docs Learn Events
WRLONG and RDLONG — Parallax Forums

WRLONG and RDLONG

jazzedjazzed Posts: 11,803
edited 2009-05-08 15:32 in Propeller 1
It appears the only difference between WRLONG and RDLONG is the R bit in the ZCRI field. Same goes for the other instructions for byte/word access.

Question is: If one constructs an instruction like "WRLONG· dst, src NR"·wouldn't it just result in a "RDLONG dst, src"·?

Doing this in PASM causes an error, so the only way to do it is by hand ... not that I'm advocating such a hack, but for interepreting "machine code" it is important to know the answer.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve


Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230

Comments

  • AleAle Posts: 2,363
    edited 2009-05-08 15:24
    Yes they are implemented like that. (Like and and test). It saves a slot if the "effect" is not usable. you may argue that it could be useful to sync to the HUB but there are alternatives. The arguments are in the same position too, dest is always in COG src is always in HUB.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-05-08 15:30
    Yes, the only difference between WRLONG and RDLONG is the R bit and writing "RDLONG ... NR" is the same as "WRLONG" if the Propeller Tool were to allow it. It probably was done this way to save an extra opcode and some instruction decoding logic.
  • jazzedjazzed Posts: 11,803
    edited 2009-05-08 15:32
    Thanks guys [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve


    Propalyzer: Propeller PC Logic Analyzer
    http://forums.parallax.com/showthread.php?p=788230
Sign In or Register to comment.