0 Replies - 1388 Views - Last Post: 03 November 2008 - 06:33 PM

#1 captainhampton   User is offline

  • Jawsome++;
  • member icon

Reputation: 15
  • View blog
  • Posts: 548
  • Joined: 17-October 07

68K Shift Operations

Posted 03 November 2008 - 06:33 PM

Description: A showcase of the how to perform the shift operations for the 68K
*-----------------------------------------------------------
* Program    :68K SHIFT OPERATIONS
* Written by :captainhampton
* Date       :
* Description:68K SHIFT OPERATIONS
*-----------------------------------------------------------
START	ORG	$1000

	LSL	#4,D0		shift contents of D0 4 places left logically
	LSR	#4,D0		shift contents of D0 4 places right logically
	ASL	#4,D0		shift contents of D0 4 places left arithmatically
	ASR	#4,D0		shift contents of D0 4 places right arithmatically
	
	;**Initial contents of D0**	**Operation**	**Final Contents of D0**
	
	;11001100			LSL.B #1,D0	10011000			
	;11001100			LSR.B #1,D0	01100110
	;
	;11001100			ASL.B #1,D0	10011000
	;11001100			ASR.B #1,D0	11100110
	;
	;1010111100001100		ASR.W #3,D0	1111010111100001
	;0011100001111101		ASR.W #4,D0	0000001110000111
	;
	;11001110			ROL.B #1,D0	10011101
	;11001110			ROR.B #1,D0	01100111
	;11110000			ROL.B #2,D0	11000011


	MOVE.B	#9,D0
	TRAP	#15		Halt Simulator

	END	START



Is This A Good Question/Topic? 0
  • +

Page 1 of 1