On 3/15/2013 10:27 AM, Ed Jaffe wrote:
Has anyone thought this through already and come up with what the
mnemonics should be?

I'm noticing that the most often used mnemonics after subtract seem to
be JP and JNP. For example:

L     Rx,yyyyy
S     Rx,zzzzz
JP    label1   jump if processing needed

and

L     Rx,yyyyy
S     Rx,zzzzz
JNP   label2   jump if no processing needed

According to PoOp, after SUBTRACT LOGICAL and SUBTRACT LOGICAL WITH
BORROW...

Resulting Condition Code:
0  --
1  Result not zero; borrow
2  Result zero; no borrow
3  Result not zero; no borrow

I'm thinking we could implement a very literal interpretation of the CC
values:

JNZNB - jump if not zero, no borrow (BRC 1)
JZOB  - jump if zero or borrow      (BRC 6)

and those code fragments would become:

L     Rx,yyyyy
SL    Rx,zzzzz
JNZNB label1   jump if processing needed

and

L     Rx,yyyyy
SL    Rx,zzzzz
JZOB  label2   jump if no processing needed

... OR try make the unsigned math mnemonics analogous to their signed
counterparts (and possibly more programmer friendly):

JPSL  - jump "positive" after subtract logical     (BRC 1)
JNPSL - jump "not positive" after subtract logical (BRC 6)

resulting in:

L     Rx,yyyyy
SL    Rx,zzzzz
JPSL  label1   jump if processing needed

and

L     Rx,yyyyy
SL    Rx,zzzzz
JNPSL label2   jump if no processing needed

Still wondering what others have done in this space...

--
Edward E Jaffe
Phoenix Software International, Inc
831 Parkview Drive North
El Segundo, CA 90245
http://www.phoenixsoftware.com/

Reply via email to