Cycling through every 24bit (16^6 or 2^24) colour. Making this convoluted is the conversion of decimal numbers 10-15 to A-F (hex). If it was 1-9 only, the code would be much simpler. Nonetheless I've achieved it fairly efficiently I think. Run in turbo mode.