		ORG $0FFE						Threshold value is in $0FFE
		DAT $A						Threshold Value is $A
		DAT $7						Array Size = 7 is in $0FFF
		DAT $7, $8, $A, $15, $2E, $1, $5	Array data starts From $1000

      
		ORG $1100 + $5		Indeed, Must Be $1100 + $FF Since Max Array-Size is 255
*						$5 Is Enough For This Example

START		LDA SK, $1000		LOAD Start Address of The Array Into IX 
		LDA CD, $1100 		LOAD Next-Slot Address of The Sub-Array Into CD
		CLR B				ACC-B Keeps The Number of Processed Elements
LOOP		CMP B, <$0FFF>		Is B Equal To Array Size?
		BEQ FINISH			Finish The Program: Reached To The End Of The Array
		INC B				Increment Number Of Processed Elements
		LDA A, <SK+00> 		Load Current Array Element Into ACC-A   | OR IN A SINGLE INSTRUCTION | 
		INC SK			Set Current Element As The Next Element |     LDA A, <SK+00> + 1     |
		CMP A, <$0FFE>		Compare ACC-A With The Threshold
		BGE LOOP			If Value >= Threshold, Process The Next Array Element 
		STA A, <CD>		Else Store ACC-A As The Next Element Of Sub-Array
		INC D				Increment Next-Slot Address of The Sub-Array
		JMP LOOP			Repeat The Loop
FINISH	STA D, <$10FF> 		D Includes Number Of Stored Elements Into The Sub-Array
		KES				End The Program



