Mail Archives: djgpp/1996/05/23/11:05:19
Xref: | news2.mv.net comp.os.msdos.djgpp:4172
|
Newsgroups: | comp.os.msdos.djgpp
|
From: | cworley AT dorite DOT iquest DOT net
|
Subject: | -finline-functions corruption
|
Message-ID: | <Drt7su.6B6@iquest.net>
|
Sender: | news AT iquest DOT net (News Admin)
|
Organization: | Maximus Network Programming Development
|
Date: | Wed, 22 May 1996 13:50:54 GMT
|
Lines: | 33
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
I have found, that when I use -finline-functions, I get this wierd
corruption. So here are the functions:
void WriteDesktop (short int Attrib)
{
short int * EAX, * EBX, ECX;
EAX = (short int *)(Base);
EBX = (short int *)(Base + 4000);
ECX = Attrib;
while (EAX < EBX) *EAX++ = ECX;
}
That works, but when I do this,
void WriteDesktop (char A, short int Attrib)
{
short int * EAX, * EBX, ECX;
EAX = (short int *)(Base);
EBX = (short int *)(Base + 4000);
ECX = Attrib + A;
while (EAX < EBX) *EAX++ = ECX;
}
It always shifts all the bits to high in either the high or low byte.
What is odd, is that this always happens when I do these type of calcs
on about 50+ screen cells, other than that, everything is fine. When done,
I plan on publishing my TUI, simular to TurboVision, but no C++, you merely
tell the library what you want, and where. So far, It handles buttons, fields
, windows, desktops, menus, and shortly forms.
Any ideas, feel free to write.
TIA Chris
- Raw text -