Notice: Trying to access array offset on value of type bool in /mnt/cpcwiki-httpdocs/includes/libs/IPSet.php on line 243

Notice: Trying to access array offset on value of type bool in /mnt/cpcwiki-httpdocs/includes/libs/IPSet.php on line 246

Notice: Trying to access array offset on value of type bool in /mnt/cpcwiki-httpdocs/includes/libs/IPSet.php on line 243

Notice: Trying to access array offset on value of type bool in /mnt/cpcwiki-httpdocs/includes/libs/IPSet.php on line 246

Notice: Trying to access array offset on value of type null in /mnt/cpcwiki-httpdocs/includes/profiler/SectionProfiler.php on line 104

Notice: Trying to access array offset on value of type null in /mnt/cpcwiki-httpdocs/includes/profiler/SectionProfiler.php on line 104

Notice: Trying to access array offset on value of type null in /mnt/cpcwiki-httpdocs/includes/profiler/SectionProfiler.php on line 105

Notice: Trying to access array offset on value of type null in /mnt/cpcwiki-httpdocs/includes/profiler/SectionProfiler.php on line 105

Notice: Trying to access array offset on value of type null in /mnt/cpcwiki-httpdocs/includes/profiler/SectionProfiler.php on line 106

Notice: Trying to access array offset on value of type null in /mnt/cpcwiki-httpdocs/includes/profiler/SectionProfiler.php on line 106
Programming:Reverse A - CPCWiki
Last modified on 18 April 2011, at 23:56

Programming:Reverse A

Revision as of 23:56, 18 April 2011 by Octoate (Talk | contribs) (layout)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This routine will return the reverse order of register A.

;
;- Reverse a
;Input:		A
;Output:	Reversed A
;Destroys:	B
;Length: 	18 bytes
;Author: 	calcmaniac84
;
ReverseA:
	ld b,a
	rrca
	rrca
	xor b
	and %10101010
	xor b
	ld b,a
	rrca
	rrca
	rrca
	rrca
	xor b
	and %01100110
	xor b
	rrca
	ret