That did it
1. int instead of short for most of the block
2. Sheldon Leemon's book says
while Lattice C's manual says
Thank You for talking this through with me
Regarding #1, early GEM C sample code typically used what they called "portability macros" so that instead of "int" or "short" you used "WORD" which would be defined in a compiler-specific way in a header file.
#2 doesn't really matter unless you're directly accessing the data via the pointer.