1. A method of transferring a program which operates a computing processor to determine data relating to the movements of a pen-shaped device having a tip, end on a surface, said computing processor, under control of said program performing the steps of: detecting acceleration data provided in a pen shaft Xs, Ys, Zs coordinate system where a pen shaft axis is the Zs axis and converting the acceleration data to a gravity coordinate system having a Z axis in a gravity acceleration direction, detecting whether said pen-shaped device is in a state of handwriting or non-handwriting, calculating an initial inclination angle of said pen shaft in said gravity coordinate system when said pen shaft is in a state of non-handwriting, calculating an inclination angle variation amount in accordance with the angular velocities around the respective axes of said pen shaft coordinates X.sub.s, Y.sub.s and Z.sub.s based on data generated from gyroscopes connected to a said pen shaft which occurs when said pen shaft is in a state of handwriting, calculating a handwriting gravity coordinate system inclination angle, on the basis of said gravity coordinate initial inclination angle and said gravity coordinate system inclined angle variation amount, converting said pen shaft coordinate system acceleration to acceleration in the gravity coordinate system acceleration, on the basis of said handwriting gravity coordinate inclination angle, and calculating the movement direction and the movement distance or the pen's tip end in accordance with the acceleration in said gravity coordinate system, and storing said calculated movement direction and movement distance in a storage apparatus, said method comprising the step of transmitting or receiving said program over a computer network.