delorie.com/archives/browse.cgi | search |
From: | Endlisnis <s257m AT unb DOT ca> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Am I retarded -or- Why is my exe size so big?!? |
Date: | Tue, 01 Sep 1998 18:18:24 -0300 |
Organization: | NBTel Internet |
Lines: | 22 |
Message-ID: | <35EC64A0.608E33C4@unb.ca> |
References: | <Pine DOT SUN DOT 3 DOT 91 DOT 980831115955 DOT 22974E-100000 AT is> |
NNTP-Posting-Host: | fctnts13c33.nbnet.nb.ca |
Mime-Version: | 1.0 |
CC: | djgpp AT delorie DOT com |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Eli Zaretskii wrote: > DOS = (short*)(((lword)DOS>>12)&0xFFFF0)+((lword)DOS&0xFFFF); > DOS = (short*)((((lword)DOS>>12)&0xFFFF0)+((lword)DOS&0xFFFF)); Ok. I just counted brackets wrong. My intent was to have everything evaluated before being cast as a (short*). > - The second problem is that your cout line is wrong: > > cout << DOS << " should be 0xC1234\n"; > > It should say something like this instead: > > cout << hex << (lword)DOS << " should be 0xC1234\n"; Why is that wrong? It did what I expected. Wouldn't it just call: ostream& operator << (ostream&,void*); -- (\/) Endlisnis (\/) s257m AT unb DOT ca Endlisnis AT GeoCities DOT com Endlis AT nbnet DOT nb DOT ca
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |