Subject: SZC ?????

From: "Marc H" <[email-masked]>
Date: Sat, 20 Oct 2012 15:15:07 -0000

I have been looking at this instruction for pretty much the first time.  I understand that this can be used as an AND of memory locations if you invert the first operand before the invocation.  My question is what use does this instruction have without the prior inversion of the source operand ??

I must be missing something as to why the engineers would create this.

Anyone have any clues ?  An example would be nice.

Thanks.

Hull

---

From: ti99_forever <[email-masked]>
Date: Sat, 20 Oct 2012 12:13:38 -0700 (PDT)

Simply to set "flag bits" in a register/memory location...
So, if you want to turn off (zero) bits 7, 3 and 1, you would use a mask of 0b1000101 with the SZC instruction.

I don't recall the syntax at the moment, but it would be something like:

SZCB @MASK,R1
.
.
.
MASK BYTE >85

(Corrections by my friends whose gray matter isn't turning black are welcome!)

Ben

>________________________________
> From: Marc H <[email-masked]>
>To: [email-masked] 
>Sent: Saturday, October 20, 2012 11:15 AM
>Subject: [TI994A] SZC ?????
> 
>------------------------------------
>
>Yahoo! Groups Links
>
>
>
>
>
>

---

From: "Michael Zapf" <[email-masked]>
Date: Sat, 20 Oct 2012 20:11:42 -0000

Blank out some bits. Supposed you have a field of flag bits in a memory word, and you want to clear some bits, you want to use a command 

"<S>et bits in the destination to <Z>ero <C>orresponding to bits set to one in the source"

The GPL status is at >837C, and its equal bit is >20. To clear it you use

LI R0,>2000
SZC R0,@>837C

Michael

---

From: Jeff White <[email-masked]>
Date: Sat, 20 Oct 2012 17:13:18 -0400

Clearing bits in memory versus setting bits with SOC.  Same mask used to affect same bits.

You could use SZC to clear a bit in R15 of a BLWP or interrupt routine to pass back a status bit condition that you define back to the caller routine.

You could use multiple bytes to mask bitmaps that you write to VDP.

Jeff White