code improvement two loops and a buffer >> one loop no buffer

tbillion:
also if im not mistaken

8 * 200 = 1600 bytes...

Integers are two bytes each.