Metropoli BBS
VIEWER: shift.asm MODE: TEXT (ASCII)
%TITLE  "Shift instruction demo"

	IDEAL
	DOSSEG
	MODEL	small
	STACK	256

	DATASEG

exitCode	DB	0	;if you want comments
operand		DB	0AAh    ; BUY the book

	CODESEG

Start:
	mov	ax,@data
	mov	ds,ax

	shl	[operand],1
	shr	[operand],1
	rol	[operand],1
	ror	[operand],1
	rcl	[operand],1
	rcr	[operand],1
	sal	[operand],1
	sar	[operand],1

Exit:
	mov	ah,04Ch
	mov	al,[exitCode]
	int 	21h

	End 	Start

[ RETURN TO DIRECTORY ]