INSTRUCTION SET

Example: Assume program counter contents have been stacked in locations 22-23.

XCHNIB: MOV RO,#23 ;MOVE '23'DEC TO REG 0

CLR A ;CLEAR ACC TO ZEROS XCHD A,@RO ;EXCHANGE BITS 0-3 OF ACC

;AND LOCATION 23 (BITS 8-11

;OF PC ARE ZEROED, ADDRESS ;REFERS TO PAGE 0)

XRL A,Rr Logical XOR Accumulator With Register Mask

1110111rrri

Data in the accumulator in EXCLUSIVE ORed with the mask contained in working register 'r'.

(A) .... (A) XOR (Rr) r=0-7

Example: XORREG: XRL A,R5 ;'XOR'ACC CONTENTS WITH ;MASK IN REG 5

XRL A,@Rr Logical XOR Accumulator With Memory Mask

111011000rl

Data in the accumulator is EXCLUSIVE ORed with the mask contained in the data memory location addressed by register 'r',bits 0-5~

(A) .... (A) XOR ((Rr))

r=0-1

Example: XORDM: MOV R1, #20H

;MOVE '20'HEX TO REG 1

XRL A,@R1

;'XOR'ACC CONTENTS WITH MASK

 

;IN LOCATION 32

XRL A,#data Logical XOR Accumulator With Immediate Mask

11 1 0 1 10 0 1 1 1 1d7 de ds d4 Id3 d2 d1 do I

This is a 2-cycle instruction. Data in the accumulator

is EXCLUSIVE ORed with an immediately'-specifiedmask.

(A) .... (A) XOR data

Example: XORID: XOR A,#HEXTEN ;XOR CONTENTS OF ACC WITH ;MASK EQUAL VALUE OF SYMBOL ;'HEXTEN'

Mnemonics copyright Intel Corporation 1976.

·0-6for 8039/8049

4-36

Page 109
Image 109
Intel mcs-48 manual XRL A,Rr Logical XOR Accumulator With Register Mask, XRL A,@Rr Logical XOR Accumulator With Memory Mask