[cc65] More assignments and typecasting questions

Date view Thread view Subject view

From: Shawn Jefferson (sjefferson_at_sd62.bc.ca)
Date: 2002-07-23 18:19:55


Well, here's another one:

Say I have my struct pointer:

HDTABLE_T *hdtable;

And I want to assign these two variables with the high and low byte of the pointer:

unsigned char hdt_lo, hdt_hi;

How do I do this:

hdt_lo = hdtable % 256;
hdt_hi = hdtable / 256;

Thanks,
Shawn



----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2002-07-23 18:21:10 CEST