🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #215

Bug in BCC 3.0 ( also 3.1 ? )

#215
From: stern
Date: Tue, 04 Aug 1992 11:37
36 lines
1072 bytes
/*
    BC 3.0 ( Also 3.1 ? )

    This program gives a bad result when Jump Optimization is on

    Correct result:                   00000001
                                      00000102
                                      00010203
                                      01020304

    When Jump Optimization is on:     00010001
                                      00020102
                                      00030203
                                      00040304
*/





#include <stdio.h>


void main()
{
unsigned long data = 0;
unsigned char i;

for (i=1; i < 5; i++) { data = (data << 8) ^ (unsigned long) i;
                        printf( "%08lx\n", data );
                      }
}



--  Marc Stern  <stern@mble.philips.be>
Technical Details
Message-ID: <1992Aug4.113741.194@mble.philips.be>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!ub4b!mble.philips.be!stern

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!ub4b!mble.philips.be!stern
From: stern@mble.philips.be
Newsgroups: comp.os.msdos.programmer
Subject: Bug in BCC 3.0 ( also 3.1 ? )
Message-ID: <1992Aug4.113741.194@mble.philips.be>
Date: 4 Aug 92 11:37:41 MEWT
Organization: MBLE , Brussels, Belgium
Lines: 36