flat assembler
Message board for the users of flat assembler.

Index > Main > 64 vs 32 bit programming?

Author
Thread Post new topic Reply to topic
shultzjr



Joined: 16 Aug 2009
Posts: 1
shultzjr
please forgive the beginner like questions since I am not really an asm programmer but I am interested.

1. is it possible to write a program/os in only 64 bit mode?

2. how does one find the limitations of the hardware on a machine, like VT capability and size of physical ram.

3. can assembler be "generalized" like C for other arch's? I suspect no but thought I would ask anyway.

thank you,
charles......
Post 16 Aug 2009, 07:47
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17279
Location: In your JS exploiting you and your system
revolution
1. yes

2. this is hardware dependant, check your mobo and expansion card manuals, but there are BIOS calls that can provide basic mobo information.

3. no, it has to be ported to work with different instruction sets.
Post 16 Aug 2009, 07:57
View user's profile Send private message Visit poster's website Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt
2. Also, CPUID gives you loads of info about the CPU instruction set and features. And if your programming in windows then there are a number of functions that give you info about ram, video and sound capabilities, motherboard info, etc.
Post 16 Aug 2009, 09:22
View user's profile Send private message Reply with quote
Azu



Joined: 16 Dec 2008
Posts: 1160
Azu
revolution wrote:
1. yes
I thought the CPU starts out in compatibility mode, so that 32bit OS can load? So doesn't the first part need to be 32bit before entering long mode? Confused
Post 16 Aug 2009, 19:44
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17279
Location: In your JS exploiting you and your system
revolution
Azu wrote:
I thought the CPU starts out in compatibility mode, so that 32bit OS can load? So doesn't the first part need to be 32bit before entering long mode? Confused
Actually the CPU starts in real mode and only the boot loader needs to know that. The original question is about "program/os", so the answer is correct to say yes.
Post 16 Aug 2009, 20:34
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4237
Location: 2018
edfed
another question, can i acces 64bit registers with 32bit only x code?
Post 20 Sep 2009, 20:59
View user's profile Send private message Visit poster's website Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
edfed, no I don't think you can (unless you count MMX or Mac OS X's weird 32-bit hybrid kernel that can run 64-bit apps somehow).
Post 20 Sep 2009, 22:00
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.