Shop OBEX P1 Docs P2 Docs Learn Events
WAITVID Z Result misleading Explanation — Parallax Forums

WAITVID Z Result misleading Explanation

Hello again, I got another question where experienced Propeller users could help me out.

In the Manual 1.2 the opcode table for the assembly WAITVID instruction specifies the Z Result as
D+S=0
what also gets shown in Concise Truth Table, with
D = $0000_0002 (=>2), S = $FFFF_FFFE (=> -2)

In the opcode Explanation on the otherhand they tell
"If the WZ effect is specified, the Z flag will be set (1) if the Colors and Pixels are equal."

Is this an additional condition or is it just wrong explained because the absolute value of D and S are equal so that R can be zero....

Right now I have no own propeller board to check the behaviour and the verilog code doesn't change the z and c flags for wait commands....

Comments

  • @shiny_Bob said:
    Hello again, I got another question where experienced Propeller users could help me out.

    In the Manual 1.2 the opcode table for the assembly WAITVID instruction specifies the Z Result as
    D+S=0
    what also gets shown in Concise Truth Table, with
    D = $0000_0002 (=>2), S = $FFFF_FFFE (=> -2)

    In the opcode Explanation on the otherhand they tell
    "If the WZ effect is specified, the Z flag will be set (1) if the Colors and Pixels are equal."

    Is this an additional condition or is it just wrong explained because the absolute value of D and S are equal so that R can be zero....

    I'm pretty sure it's D+S=0. The Z flag has to come from the ALU, which can either do a subtract (=compare) or add.

    Right now I have no own propeller board to check the behaviour and the verilog code doesn't change the z and c flags for wait commands....

    It has to give it some value each cycle, it's just that for some instrcutions, there's no particular code for it and it just falls into one of the other behaviours (tip: MOVS,MOVD,MOVI and JMP(RET) will give the same C flag as CMP).

  • Thank you very much !

Sign In or Register to comment.