CompuServe Messages

C's

#: 1773 S1/SoftwareForum unknown
    14-Dec-85 21:02:52
Sb: #1745-C's
Fm: GARY SARFF 70167,2216
To: Bob Perez 76003,102

This message turned up in search, but its forum couldn’t be identified from the original transcript, so it may not be linked into its thread.

The problem was CthaThe problem was that I was trying to access code generated by the Icon interpreter and 32 bit addresses may not have been aligned on word boundaries since Icon uses a lot of 1 byte opcodes. So there was C code to take care of that problem and if it checked and found the address was odd it would move the 4 bytes to an integer variable 1 byte at a time. Either the compiler would complain about different types of pointers if I left them both pointer to char, or if (as I did) I heeded its warning and changed one to pointer to int (cast it rather) then it chopped the address for me. Seems I couldn't win and I just choose the wrong alternative is all. As for the &x – &y, yes it should be 32 bits and I can't see how the answer could be 65432 for &y-&x and 104 for &x-&y unless it was doing 16 bit arithmetic, it looks to me very much like the "wrap-around" in 16 bits from -1, even if one of the address was large enough to cause this, and they weren't I printed them too, with the %d specification and they were both 200 thousand something I would think it would have said something like 2 billion if it was wrapping in 32 bits. Anyway. I didn't know Lattice was a new compiler on the Amiga, I just assumed it was a port of some other version of the compiler, say their 68000 version for the Mac or something. I just read in Unix World that Lattice has signed an agreement with SAS institute to put the Lattice C compiler onto the IBM 370 series computers. Supposedly compatible with IBM-pc code too. Its a small world.