13.07.2015 Views

CJ2 CPU Unit Software User's Manual - CIP ETI

CJ2 CPU Unit Software User's Manual - CIP ETI

CJ2 CPU Unit Software User's Manual - CIP ETI

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

AppendicesInstruction Mnemonic Code Symbol/Operand Function LocationDATAENCODERDMPX@DMPXExecutioncondition077 Output RequiredDMPX(077) Finds the location of the first or last ON bit within the sourceword (or 16-word range), and writes that value to theSspecified digit (or byte) in the result word.RC16-to-4 bit conversionFinds leftmost bitC(Highest bit address)S: 1st source wordR: Result wordl=1 (ConvertC: Control word2 words.)16-to-4 bit decoding(Location of leftmostbit (m) is writ-ten to R.)R256-to-8 bit conversionCLeftmost bitl=0 (Convert one 16-word range.)Leftmost bitRightmost bitn=2 (Start with digit 2.)A-1 Instruction Functions AppASCII CON-VERTASC@ASCRFinds leftmost bit(Highest bit address)256-to-8 bit decoding(The location of the leftmost bit in the16-word range (m) is written to R.)n=1 (Start with byte 1.)086 Output RequiredASC(086) Converts 4-bit hexadecimal digits in the source wordinto their 8-bit ASCII equivalents.SDiDiFirst digit to convertDA-1-10 Conversion InstructionsS: Source wordDi: DigitdesignatorD: 1st destinationwordNumber ofdigits (n+1)Left (1)Right (0)ASCII TO HEXHEX@HEX162Converts up to 4 bytes of ASCII data in the source word toOutput RequiredHEX(162)their hexadecimal equivalents and writes these digits in theSspecified destination word.DiC: 0021DDiFirst byte to convertS: 1st source wordDi: Digit designatorLeft (1) Right (0)D: DestinationwordNumber of digits (n+1)First digit to write<strong>CJ2</strong> <strong>CPU</strong> <strong>Unit</strong> <strong>Software</strong> User’s <strong>Manual</strong>A-31

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!