Start with the example from MSDN article CListBox::GetSelItems
I hope, a simple sorting algorithm won't be a problem for a programmer being able to program with Assembler for hardware!