lods instruction patch by edmcman, from:
https://gist.github.com/edmcman/4979395f6fb656631b82