Jump to content

Photo

Programming Instruction Issue


1 reply to this topic

#1 BeeryMiller ONLINE  

BeeryMiller

    Dragonstomper

  • 954 posts
  • Location:Campbellsburg, KY

Posted Fri May 3, 2019 12:09 PM

OK, need to figure out how to pass a status bit back to a piece of calling code from another BLWP instruction using an XOP on the Geneve.

 

Basically, code is as follows:

 

START LWPI  >F000

ST1      BLWP @KSCAN

             JNE    NEWCODE

             JMP    ST1

NEWCODE

              Etc.............

 

KSCAN, >F020,KSCAN0

KSCAN0

               CLR  @KSTAT

               CLR  R0

                XOP  @KEY,0

                JEQ   KS2

 

                MOVB @H04,@KSTAT

                MOV   @KSTAT,R15

 

KS2         RTWP

 

 

KEY       DATA 5

H04        BYTE >04

               EVEN

 

 

My code does not seem to recognize the status bit (bit 3) is set.  Is there something I am overlooking?

 

Beery

 

 



#2 InsaneMultitasker OFFLINE  

InsaneMultitasker

    River Patroller

  • 2,467 posts

Posted Fri May 3, 2019 3:23 PM

If memory serves correctly, I think you want to reset/set the EQ bit, not the status bit.  Something like this.

 

HB20  BYTE >20

SZCB @HB20,R15  - clear the bit when you enter the routine

SOCB @HB20,R15 - set the bit before exiting, based on condition


  • RXB likes this




1 user(s) are browsing this forum

0 members, 1 guests, 0 anonymous users