Re: 32 bit and 64 bit---- doubt

2008-09-29 Thread SK malik
 32 bit. app

1) The addresses are limited to 32 bit(can be more in some cases). The
address space is limited to this value.
2) It will run on both 32 bit OS and 64 bit OS(64 bit OS can run 32 bit
apps)
3) A pointer is of 4 bytes.
4) some other differences wrt to other data types

 64bit app:

1) the address are limited to 2^64 ( theoretically)
2) It will run only on 64 bit OS
3) A pointer is of 64 bits(8 bytes)

BTW, Integer is always 4 bytes.
2 byte integers are history. Very few people use turbo C compiler nowadays.
gcc is the way to go.

-Sri


On Mon, Sep 29, 2008 at 12:42 PM, nidhi mittal <[EMAIL PROTECTED]>wrote:

> Hi all
> its a very basic ques may be for many of you .but i have this confusion
> from long that is.
> when we say this application is 32 bit application or 64 bit what do we
> mean by that
>  is it processor which is 32 bit or 64 bit
> or the OS which is is 32 bit or 64 bit
> or what ?
>
> 2. Does it have some relation that in windows in C language int size is 2
> bytes in linux gcc it is 4 bytes
> i mean any relation of word size with it ??
> --
> Thanks & Regards
> Nidhi
>



-- 
SK Malik


Re: 32 bit and 64 bit---- doubt

2008-09-29 Thread Bernd Petrovitsch
On Mon, 2008-09-29 at 19:35 +0530, Sunil wrote:
[...]
> Not sure if it does the same thing, Turbo C on windows shows
> sizeof(int) == 2.

On DOS-6.22 or so?
Yes, that maybe.

Bernd
-- 
Firmix Software GmbH   http://www.firmix.at/
mobil: +43 664 4416156 fax: +43 1 7890849-55
  Embedded Linux Development and Services



--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: 32 bit and 64 bit---- doubt

2008-09-29 Thread Pranav Peshwe
On Mon, Sep 29, 2008 at 5:46 PM, Bernd Petrovitsch <[EMAIL PROTECTED]> wrote:

> On Mon, 2008-09-29 at 17:38 +0530, Pranav Peshwe wrote:
> > On Mon, Sep 29, 2008 at 2:38 PM, Bernd Petrovitsch <[EMAIL PROTECTED]>
> > wrote:
>
> > 
> >  2. Does it have some relation that in windows in C language int
> size
> >
> > According to the C standard, sizeof(int) is the native register
> width.
> > And that is basically defined by the CPU. So if sizeof(int) == 2,
> you
> > probably have some 16bit microcontroller.
> >
> > Or, you are running an x86 processor in virtual 8086 mode. For eg.
> > running a DOS app under  Linux or Windows.
> >
> > Kindly CMIIW.
>
> Is that actually possible?
> And with which toolchain?
>

Yes, AFAIK.
Windows supports running apps in VM86 mode out of the box. If Nidhi got
sizeof(int) == 2, then it probably might have been done in Turbo C/C++ which
runs in VM86 mode on windows.
On linux, there are DOSEmu and DOSBox.  Both worked well for me. I had
played Doom 2 on DOSBox :)

Best regards,
Pranav
http://pranavsbrain.peshwe.com


Re: 32 bit and 64 bit---- doubt

2008-09-29 Thread Sunil
On Mon, Sep 29, 2008 at 5:46 PM, Bernd Petrovitsch <[EMAIL PROTECTED]> wrote:

> On Mon, 2008-09-29 at 17:38 +0530, Pranav Peshwe wrote:
> > On Mon, Sep 29, 2008 at 2:38 PM, Bernd Petrovitsch <[EMAIL PROTECTED]>
> > wrote:
>
> > 
> >  2. Does it have some relation that in windows in C language int
> size
> >
> > According to the C standard, sizeof(int) is the native register
> width.
> > And that is basically defined by the CPU. So if sizeof(int) == 2,
> you
> > probably have some 16bit microcontroller.
> >
> > Or, you are running an x86 processor in virtual 8086 mode. For eg.
> > running a DOS app under  Linux or Windows.
> >
> > Kindly CMIIW.
>
> Is that actually possible?
> And with which toolchain?
>
>Bernd
> --
> Firmix Software GmbH   http://www.firmix.at/
> mobil: +43 664 4416156 fax: +43 1 7890849-55
>  Embedded Linux Development and Services
>
>
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to [EMAIL PROTECTED]
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>
Not sure if it does the same thing, Turbo C on windows shows sizeof(int) ==
2.

-- 
Sunil.


Re: 32 bit and 64 bit---- doubt

2008-09-29 Thread Bernd Petrovitsch
On Mon, 2008-09-29 at 17:38 +0530, Pranav Peshwe wrote:
> On Mon, Sep 29, 2008 at 2:38 PM, Bernd Petrovitsch <[EMAIL PROTECTED]>
> wrote:

>  
>  2. Does it have some relation that in windows in C language int size
> 
> According to the C standard, sizeof(int) is the native register width.
> And that is basically defined by the CPU. So if sizeof(int) == 2, you
> probably have some 16bit microcontroller.
> 
> Or, you are running an x86 processor in virtual 8086 mode. For eg.
> running a DOS app under  Linux or Windows.
> 
> Kindly CMIIW.

Is that actually possible?
And with which toolchain?

Bernd
-- 
Firmix Software GmbH   http://www.firmix.at/
mobil: +43 664 4416156 fax: +43 1 7890849-55
  Embedded Linux Development and Services



--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: 32 bit and 64 bit---- doubt

2008-09-29 Thread Pranav Peshwe
On Mon, Sep 29, 2008 at 2:38 PM, Bernd Petrovitsch <[EMAIL PROTECTED]> wrote:

>
> 

>
> > 2. Does it have some relation that in windows in C language int size
>
> According to the C standard, sizeof(int) is the native register width.
> And that is basically defined by the CPU. So if sizeof(int) == 2, you
> probably have some 16bit microcontroller.


Or, you are running an x86 processor in virtual 8086 mode. For eg. running a
DOS app under  Linux or Windows.

Kindly CMIIW.

Best regards,
Pranav
http://pranavsbrain.peshwe.com


Re: 32 bit and 64 bit---- doubt

2008-09-29 Thread Bernd Petrovitsch
On Mon, 2008-09-29 at 12:42 +0530, nidhi mittal wrote:
> Hi all 
> its a very basic ques may be for many of you .but i have this
> confusion from long that is.
> when we say this application is 32 bit application or 64 bit what do
> we mean by that 
>  is it processor which is 32 bit or 64 bit

Primarily it is that.

> or the OS which is is 32 bit or 64 bit

Secondarily that too. But x86_64/amd64/em64t/intel64 has x86
compatibility (and Sparc64 for Sparc perhaps too).
So can install and run a 64bit kernel and run the whole userspace
compiled for 64bit. Or you can run only 32bit apps/libs in userspace on
64bit kernel (because your apps do not need > 4GB address space but you
have 64GB RAM in your hardware).

> or what ?

Basically yes. But x86/64/AMD64/EM64T/... can run x86 32bit apps too (if
the necessary libs are installed).

> 2. Does it have some relation that in windows in C language int size

According to the C standard, sizeof(int) is the native register width.
And that is basically defined by the CPU. So if sizeof(int) == 2, you 
probably have some 16bit microcontroller.
And at least for WinNT and XP, sizeof(int) == 4 on "normal PCs" BTW.

>  is 2 bytes in linux gcc it is 4 bytes
> i mean any relation of word size with it ??

Yup.

Bernd
-- 
Firmix Software GmbH   http://www.firmix.at/
mobil: +43 664 4416156 fax: +43 1 7890849-55
  Embedded Linux Development and Services



--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: 32 bit and 64 bit---- doubt

2008-09-29 Thread Kalpesh Rathod
Apart from these, following wiki link best describes what makes an
architecture as 64 bit.

http://en.wikipedia.org/wiki/64-bit

On Mon, Sep 29, 2008 at 1:22 PM, pradeep singh <[EMAIL PROTECTED]>wrote:

> On Mon, Sep 29, 2008 at 12:42 PM, nidhi mittal <[EMAIL PROTECTED]>
> wrote:
> > Hi all
> > its a very basic ques may be for many of you .but i have this confusion
> from
> > long that is.
> > when we say this application is 32 bit application or 64 bit what do we
> mean
> > by that
> >  is it processor which is 32 bit or 64 bit
> > or the OS which is is 32 bit or 64 bit
> > or what ?
>
> It means the application can access 2^32 bits of memory i.e 4gigs.And
> this means a 64 bit application needs a 64 bit kernel atleast, which
> will run on a 64 bit processor. Aliter a 32 bit application can run on
> top of either 32 or 64 bit kernel. And a 32 bit kernel can run atop a
> 32 bit processor or 64 but processor.
>
> > 2. Does it have some relation that in windows in C language int size is 2
> > bytes in linux gcc it is 4 bytes
>
> No such restriction for C in windows. It is still 4 bytes.
>
> > i mean any relation of word size with it ??
> word size is 32 bits on both Windows and Linux.
>
> Cu,
>--Pradeep
> > --
> > Thanks & Regards
> > Nidhi
> >
>
>
>
> --
> play the game
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to [EMAIL PROTECTED]
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>


Re: 32 bit and 64 bit---- doubt

2008-09-29 Thread pradeep singh
On Mon, Sep 29, 2008 at 12:42 PM, nidhi mittal <[EMAIL PROTECTED]> wrote:
> Hi all
> its a very basic ques may be for many of you .but i have this confusion from
> long that is.
> when we say this application is 32 bit application or 64 bit what do we mean
> by that
>  is it processor which is 32 bit or 64 bit
> or the OS which is is 32 bit or 64 bit
> or what ?

It means the application can access 2^32 bits of memory i.e 4gigs.And
this means a 64 bit application needs a 64 bit kernel atleast, which
will run on a 64 bit processor. Aliter a 32 bit application can run on
top of either 32 or 64 bit kernel. And a 32 bit kernel can run atop a
32 bit processor or 64 but processor.

> 2. Does it have some relation that in windows in C language int size is 2
> bytes in linux gcc it is 4 bytes

No such restriction for C in windows. It is still 4 bytes.

> i mean any relation of word size with it ??
word size is 32 bits on both Windows and Linux.

Cu,
--Pradeep
> --
> Thanks & Regards
> Nidhi
>



-- 
play the game

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ