#: 6108 S3/Languages
13-Aug-90 21:31:09
Sb: #6106-F$CpyMem Question
Fm: James Jones 76257,562
To: Zack Sessions 76407,1524
Depends on how they're laid out in memory--though actually, that's only true if
you do something rather sleazy. The non-sleazy way is to recall that A is the
most significant byte of D, B the least significant (do me a favor and don't
tell Ms. Methvin that I didn't say "more significant" and "less significant"
even though only two things were being compared, OK? ), so if you cast
your char * to an int, do something like
regs.rg_a = ((int) cp) >> 8; regs.rg_b = ((int) cp) & 0xff;
to get what you're after.
|