proc portToByte(a : int16) : array[2, char] = var buffer : array[2, char] copyMem(addr buffer[0], addr a, sizeof(int16)) echo "2" return buffer