x86, 8051: added a paddingLength method, returns the number of bytes used up by padding, starting at a position in a buffer.