Re: A86: What do these do?!?


[Prev][Next][Index][Thread]

Re: A86: What do these do?!?




JBrett wrote:
> I have never really taken the time to learn what the commands: rl, or,
> xor, and sla. Could someone please tell me what these do?
> Jbrett
> tbarwick@esn.net

rl = rotate left...
example ( rl h  =  all bits in h moved one bit to the left and bit 7 is put in
			the carry flag.  Carry Flag is put into bit 0 i think)
or = or 2 bytes together
example:
	ld a, %00001111
	or %11110000
	(now a = %11111111)

xor = negated or
example:
	ld a, %11000111
	or %11110000
	(now a = %00110111)

sla = Shift Left Arithmetic (similar to rotate commands but the bits aren't rotated
			     just shifted.)
example:
	ld a, %11000111
	sla a
	(now a = %10001110)

-- 
Tercero	 --  Email: mailto:tercero@busprod.com

"The stone the builders rejected has become the capstone;"
			--Psalms 118:22
"Everyone who falls on that stone will be broken to pieces,
but he on whom it falls will be crushed."
			--Luke 20:18


References: