On 10/26/22 11:50 PM, John R. Hogerhuis wrote:
On Wed, Oct 26, 2022 at 4:57 PM Ken Pettit <[email protected] <mailto:[email protected]>> wrote:You have to make it a negative number by subtracting it from 65536: 20 H$="0123456789ABCDEF": D=VARPTR(H$)+1:IFPEEK(D+1)>127THENC=65536-256*PEEK(D+1)-PEEK(D)ELSEC=PEEK(D)+256*PEEK(D+1) Thanks! Makes sense. Pity about the conditional.
Yep. And actually, that should have been C=256*PEEK(D+1)+PEEK(D) - 65536, otherwise it is just a different positive value.
Ken
