[resolved][puzzle] If a tree falls ...

... let me rephrase that: If tj[n]z has the wr flag set is dst written to or not? Setting the flag doesn't seem to have a discernible effect on dst so how would you dis/prove that wr isn't simply ignored for this instruction?
Comments
sent a solution to you by PM
Andy
As pr my previous PM I have now verified that my suggested solution works.
CogSaver
CON _CLKMODE = XTAL1 +PLL8X _XINFREQ = 6_000_000 PUB BB '...Insert other need startup code (serial/VGA etc)... COGNEW(@PSTRT,0) DAT PSTRT ORG 0 PLOOP SUB PVAL,#1 SUB OVAL,#1 SUB OVAL,PVAL nr,wz,wc if_ne JMP DONE0 TJNZ PVAL,#PLOOP wr DONE0 '... 'Insert code to output PVAL, and OVAL '... FOREVR JMP FOREVR OVAL LONG $00010000 PVAL LONG $00010000
CON _CLKMODE = XTAL1 +PLL16X _XINFREQ = 6_000_000 PUB BB '...Insert other need startup code (serial/VGA etc)... COGNEW(@PSTRT,0) DAT PSTRT ORG 0 PLOOP SUB PVAL,#1 SUB OVAL,#1 SUB OVAL,PVAL nr,wz,wc if_ne JMP DONE0 TJNZ PVAL,#PLOOP wr DONE0 '... 'Insert code to output PVAL, and OVAL. '... JMP PSTRT OVAL LONG 0 PVAL LONG 0
Run time before first result at 96MHz is about 12Minutes.-Phil
-Phil
*With "two" exceptions: I think I just figured out the answer to the puzzle.
The 6-bit PASM opcodes are grouped into 8 groups of 8. Each group treats the result, carry and zero bits in a similar fashion, but there are many exceptions. djnz, tjz and tjnz fall into the same group of 8, and yes, they do have unique opcodes. I was just speculating that these three instructions may be implemented by the same chunk of logic.
I got that, but your post triggered something I've thinking about for awhile which is, "Why don't they share opcodes? Then we could have djz, and there would be an opcode freed up for something else."
-Phil
You have me curious, do tell.
Dave, your nice rocket avatar is no longer burning away gently with my latest up date to firefox on Debian. It's manically flashing on and off instead.
Not your fault of course, it's just going to be really annoying until a fix is found.
Incidentally, you said Run time before first result at 96MHz is about 12Minutes. Did you get a result or is/was that pure speculation?
movd label:,#0
label: TJNZ PVAL,#PLOOP wr
test label:,mask wz
As usual, for the terminally curious:
movi ctra, #%0_11111_000 ' LOGIC always, moving target mov frqa, #1 ' non-null increment tjnz phsa, #$+1 wr ' instruction under test mov temp, phsa ' temp = f(wr)
-Phil