Please Confirm Documentation Error
pjv
Posts: 1,903
Hi All;
In the Propeller Manual V1.2 on page 298, in bullet 3 under the Concise Truth Table, the note states that C (when written) is set on a jump except in the special circumstance.
My tests show the opposite, that C gets cleared (have not tested the special circumstance)
I believe my methods and results are correct; can anyone -or Parallax- please confirm the documentation to be incorrect?
Cheers,
Peter (pjv)
In the Propeller Manual V1.2 on page 298, in bullet 3 under the Concise Truth Table, the note states that C (when written) is set on a jump except in the special circumstance.
My tests show the opposite, that C gets cleared (have not tested the special circumstance)
I believe my methods and results are correct; can anyone -or Parallax- please confirm the documentation to be incorrect?
Cheers,
Peter (pjv)
Comments
A (wr) jmpret preforms a movs before it change the pc counter.
You could type your own jmp by: jmpret dest, source nr wc
if you set dest register to known value that is higher than 511 or 0 you get the c you want.
Or if you start your code with:
Org 0
asm_entry long 0 (or long 512), both would be taken as being a nop.
you can now use your regular jump: jmp #source wc (c is set if long 0 is used above)
C= Unsigned (D < S)
Thanks ever so much for this information. It really helps me understand what is going on now. Last year Kuroneko was trying to say similar things to me, and I did not grasp what was going on..... my code was running correctly, so I did not pursue it. I think I got it now!
What a wondeful forum! Thanks again.
Cheers,
Peter (pjv)
It's not the underlying hub circuit that actually reads this r state and performs the read vs write?
There is no real cmp or test either, just nr version of sub & and.
If the prop had a CLR opcode, but it's just the assembler changing it to a mov dest,#0
I would say clr is not real either though that is pseudo-opcode common on other mcu assembler (but this is given as not being real)
Prop is the only mcu I know there I can set nr, so If I can recreate one opcode by just adding a nr to another opcode I would say one is real.
And if I built an prop assembler, that's how I would treat them and do one pass to change these to real opcodes but with nr inserted.
Plus I think it's easier to understand the props read/write rules on special registers
if you know what's really going on but the only difference is that the final write to dest field is skipped with a nr.
But pretty sure there or other ways with the same amount of code to accomplice this.
I could see that you use this as if/else kind of situation and jumping forward. (maybe $ still works?)
sub dest, #2 wz
if_z jmpret par,#lable wc nr {clear c]
code
code
lable if_nc code
Where I was being tripped up when I first posted this question was with a jmp #xx wc to prep the carry for a conditional instruction further down the line, and C was not consistent between my code and my test examples. All is well now, and I appreciate your, as well as Dave and Kuroneko's help inn clearing this up for me..... You guys sure know your stuff !
Cheers,
Peter (pjv)
org 0
code wz
negz par,#1 {let the status of z set par=1 or par= -1}
code wz
if_z jmpret par,#lable wc nr {clear or set c}
code
code
lable if_nc_z code {what have to happend above for this be true, i'm not sure:)}