mov esi, [items]
Since when?
Look at your code. Where does
items
get set to
numitmes
?
In all seriousness, if you want to learn assembler, then I'd strongly suggest you dump the c stuff completely and use a "pure" assembler solution. I'd also suggest that you need a much better programming background before you even think of learning assembler as your question history does not show that you are thinking about your own code: you are asking questions that anyone with a reasonable background in coding should be able to work out, even if they don't know assembler!