Shop OBEX P1 Docs P2 Docs Learn Events
(resolved) instruction question — Parallax Forums

(resolved) instruction question

SeairthSeairth Posts: 2,474
edited 2020-06-12 14:36 in Propeller 2
@cgracey, note these two entries in the spreadsheet:

NOT D,{#}S {WC/WZ/WCZ} EEEE 0110001 CZI DDDDDDDDD SSSSSSSSS Get !S into D. D = !S. C = !S[31]. *
NOT D {WC/WZ/WCZ} EEEE 0110001 CZ0 DDDDDDDDD DDDDDDDDD Get !D into D. D = !D. C = !D[31]. *

In the first entry, is the "#" required for S? In other words, should it be:

NOT D,#S {WC/WZ/WCZ} EEEE 0110001 CZ1 DDDDDDDDD SSSSSSSSS Get !S into D. D = !S. C = !S[31]. *

Or is the {#} a mistake and this instruction actually re-purposes the immediate flag to switch between S and D registers for the second operand? In which case, this would be correct:

NOT D,S {WC/WZ/WCZ} EEEE 0110001 CZ1 DDDDDDDDD SSSSSSSSS Get !S into D. D = !S. C = !S[31]. *

EDIT: Never mind. I wasn't thinking about this clearly, obviously. :) The original instructions are correct. It's just that the aliased version is the equivalent of doing "NOT D, D". While I guess you could also do "NOT D, #D", it wouldn't make much sense.

Comments

  • AribaAriba Posts: 2,690
    I think this just means, that you can write:
            not myreg
    
    instead of:
            not myreg,myreg
    
    and the Assembler will fill the source field with the same reg as destination field for you.

    Andy
Sign In or Register to comment.