Sign in to follow this  
godsenddeath

a few assembly questions

Recommended Posts

i'm working through some x86 assembly, and i've got a couple of simple questions 1: what are the fundamental differences between binary(COM) and executable(EXE) files, what are the things i should consider when writing one or the other in regards to layout, needed sections,etc...? 2:are all BIOS interrupts availible when writing and running assembly in windows?(Vista 32bit) 3:pertaining to the first question, COM files use the flat memory model right? therefore no care is needed when it comes to segments? other than the memory limit, are there any other difference? thanks

Share this post


Link to post
Share on other sites
1. COM files don't have a header - It just starts with the first instruction to be executed. COM files are limited to under 64K total. EXE files are a lot more complex and don't have the 64K limit.

2. Not really. The NT-based windows kernels pretty much prevent you from using any of the BIOS stuff directly. However, you might be able to access that kind of stuff in a kernel mode driver. I'm no expert on drivers, so I can't say for sure.

3. COM files put everything in a single segment. So it feels a lot like flat memory model even if it's not exactly the same.

4. Just a convention I guess. The format is ancient, so there may have been a reason.

5. They both mean the same thing, but you usually only see 0x in C-based languages, and the 'h' suffix in assembly language.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this