TIP: Click on subject to list as thread! ANSI
echo: cis.languages
to: Zack Sessions 76407,1524
from: James Jones 76257,562
date: 1990-08-13 21:31:09
subject: #6106-F$CpyMem Question

#: 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.

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.