Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!umd5!purdue!gatech!udel!rochester!pt.cs.cmu.edu!andrew.cmu.edu!mw22+ From: mw22+@andrew.cmu.edu (Michael Alan Wertheim) Newsgroups: comp.sys.apple Subject: Re: TML Pascal help needed! Message-ID: Date: 27 Apr 88 03:04:20 GMT References: <2076@polyslo.UUCP> Organization: Carnegie Mellon Lines: 20 In-Reply-To: <2076@polyslo.UUCP> I don't have TML Pascal, but you might try this: Read an integer from the disk at the location you want to write, and store this value in the variable OldValue. Separate the integer into its components with "Low:= OldValue MOD 256; High:= OldValue DIV 256". Depending on whether the data is stored on the disk in high/low form or low/high form, do either "Low:= NewValue" or "High:= NewValue". Then, set "NewValue:= 256*High + Low", and write NewValue to the disk. This will write your value to the first byte and will write the old value of the second byte to the second byte. Michael Wertheim Carnegie Mellon University Pittsburgh, PA Arpa: mw22@andrew.cmu.edu Bitnet: mw22%andrew@cmccvb