TEST and INA ?
jazzed
Posts: 11,803
Maybe I haven't had enough coffee, but .... does INA work with the TEST instruction?
TIA
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
jazzed·... about·living in·http://en.wikipedia.org/wiki/Silicon_Valley
Traffic is slow at times, but Parallax orders·always get here fast 8)
'This works
mov rxbit, ina test rxbit, #2 wz ' test value & convert to bool if_z mov rxbit, #0 if_nz mov rxbit, #1
'This doesn't ????
test ina, #2 wz ' test value & convert to bool if_z mov rxbit, #0 if_nz mov rxbit, #1
TIA
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
jazzed·... about·living in·http://en.wikipedia.org/wiki/Silicon_Valley
Traffic is slow at times, but Parallax orders·always get here fast 8)
Comments
nutson·is correct.· Look at Chapter 1 for the Propeller (1:Introducing the Propeller Chip) on the first page (page 23 of the propeller manual hard copy)
There, you will find a table of registers that states that the INA, because it is a read-only register is·"...Only accessible as a Source Register (i.e. MOV DEST,SOURCE)."
Since you can't have a constant in the DEST field either, you can pre-define a variable value to use in the DEST, so your code might look something like this.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
jazzed·... about·living in·http://en.wikipedia.org/wiki/Silicon_Valley
Traffic is slow at times, but Parallax orders·always get here fast 8)
To save cycles, you should also look at the MUXNZ operator...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
jazzed·... about·living in·http://en.wikipedia.org/wiki/Silicon_Valley
Traffic is slow at times, but Parallax orders·always get here fast 8)