Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 08-01-2007, 09:49 PM   #1
Senior Member
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
16 bit assembly good for ?

Is 16 bit assembly used anymore except boot loaders. Is it still used for kernel development. Ive been looking around trying to learn assembly and its a bit confusing as there are 16bit 32bit and then diffrent syntax Intel at&t.

I would love to hear the thoughts of some of you that know this language.
Old 08-02-2007, 01:06 AM   #2
Senior Member
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
I can't claim to "know this language." I did do a very little 8086 assembler way back when, way before there was any talk of "32 bit." But from what I've read, I'm pretty sure it is not used in the kernel except for possibly very special cases of when the kernel is starting up or shutting down. (I have an old machine where I had to specify the kernel go into 16 bit, aka "real mode" before it turned the computer off. Otherwise, because of a BIOS limitation, the computer crashed instead of turning off!)

"Real mode" (a misnomer if ever there was one -- unreal mode would be more accurate!) is basically the old 8086 architecture. It is, IMHO, a horrible architecture that should never have been created. It is incapable of most of the things you take for granted, such as one process not being able to access another processes address space. And addressing is limited to 64K (yes, kilo) chunks defined by "segment registers." Study it if you like, but these days it is probably only used in these very limited circumstances.
Old 08-02-2007, 07:58 AM   #3
Dox Systems - Brian
Registered: Nov 2006
Posts: 344

Rep: Reputation: 31
I did quite a bit of assembly programming in the 8088 through 486 days. However, I don't really understand your question... Some of the directives to the assembler are different depending on who wrote it, but other than that it's all pretty much the same. Only *real* differences between 16-bit real mode and 32-bit protected mode is memory management. Unless you're writing the memory management code yourself, there's not much different to worry about anyways.
Old 08-02-2007, 02:50 PM   #4
Senior Member
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Original Poster
Rep: Reputation: 87
Ahh thanks for the replies I found a really good reference and I see what you mean now about not bing much diffrent. I decided however to learn using NASM instead of gas however but they are basically the same thing anyway just diffrent way of setting variables.
Old 08-03-2007, 01:30 PM   #5
Registered: Jun 2004
Location: PA
Distribution: Fedora (latest git kernel)
Posts: 458

Rep: Reputation: 30
16-bits is only used on startup for x86 (intel architecture), because the cpu starts up in real-mode. I think (?) when the kernel starts (when the bootloader jumps to the start address of the kernel) its in 32-bit.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux + 64 bit = any good? dr_zayus69 Linux - Software 1 06-03-2007 08:37 AM
good ide for writing at&t (as) assembly programs? redwing26 Programming 1 02-20-2006 01:05 AM
64-bit Assembly Compiler for Linux? ace_bandit_1 Linux - Software 1 05-13-2005 03:52 PM
Assembly Language on 64 Bit systems Sleevy Programming 1 09-06-2004 01:58 AM
Good Assembly Books jinksys Programming 3 01-29-2004 03:41 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:10 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration