'Write an interger value to memory
Args:
- address: address to read (Int)
- value: int to write to (Int)
- intsize: force write size (Int)
Returns:
- Bool'

def write_int(self, address, value, intsize=None):

    if (not intsize):
        intsize = self.intsize()
    buf = hex2str(value, intsize).ljust(intsize, '\x00')[:intsize]
    saved = self.readmem(address, intsize)
    if (not saved):
        return False
    ret = self.writemem(address, buf)
    if (ret != intsize):
        self.writemem(address, saved)
        return False
    return True
