I am learning 16-bit assembly program language, which is taken as the base of 32-bit  assembly language!
Posted on 2005-03-26 08:26:46 by photon
I wouldn't call that two different languages. You only have to watch out for stack instructions, which depend on the stack segment size, and other instructions with implicit operands that use the default address size unless otherwise specified. All other instructions are written in the same way and produce the same operation (unless the assembler is very strange and different)
Posted on 2005-03-26 14:08:23 by Sephiroth3
Is there anyone using 16-bit assembly language to program?

Very few programs are now written in 16-bit assembly (or any other programming language for that matter). They would be very specialized programs such as drivers or boot programs.

Ordinary 16-bit programs will not run under modern operating systems. You would generally need to boot your computer in DOS. Even hardware manufacturers may now make it difficult to access some (or all) of their hardware with 16-bit code.

Although learning 16-bit assembly could be used as a base for later learning 32-bit assembly, I compare it to learning how to use an abacus before learning how to use an electronic calculator. I always wonder why some teachers are still teaching 16-bit assembly.

32-bit assembly has many more instructions available, in addition to being able to use 32-bit registers which adds a lot more flexibility for arithmetic operations.

Posted on 2005-03-26 22:05:22 by Raymond
I have a question, I had read all a great amount of theory for 16-bits. Said that using DOS is slow and using totally BIOS int is faster,
Is still the Intel Hardware Pentium series, still permit us to manipulate the BIOS int? I still need 16-bits for a controller or something else,
and in future I don't want to use software, better the hardware interruptions.
Posted on 2005-03-26 23:42:18 by Xor Stance
Thanks for your meanful replies!
Posted on 2005-03-30 23:33:47 by photon
Ordinary 16-bit programs will not run under modern operating systems.

Hi Raymond,

Did you try the DOSBox emulator? It can run many old 16-bit applications under Windows Xp.

Posted on 2005-03-31 04:19:04 by Vortex
16-bit code is used for some embedded systems, some of them use 186 CPU's. But then again that is not PC programming, for PC's though 16-bit is rarely used, I started with it though, it really helps but it is not necessary to learn it at first.
Posted on 2005-03-31 10:56:21 by x86asm
I'm learning also Masm32, HLA read 3 weeks ago stood in a chapter of talking, I don't remember, 16-bits I think you're using Masm.


I got stubborn last year not noted that Microsoft has given a reference and a guide or tutorial, with all the instructions. Until MichaelW told me
about it, I didn't knew that it was that.

Not only as I base I would like to use it, for me it's still useful because I'm a "time changer" of the best qualities of products.
Posted on 2005-04-02 11:13:53 by Xor Stance
Did you try the DOSBox emulator? It can run many old 16-bit applications under Windows Xp.

I have WinXP on my latest box and I can run 16-bit programs without any emulator. And, WinXP doesn't have to reload itself when I exit such programs. However, on the same box, I also have a partition with Win98SE which needs to reload itself when I exit from some of the 16-bit programs. :O

Posted on 2005-04-02 20:58:06 by Raymond
there is no advantage in the 20 bit addressing:

here is how to get the 32bit address:

segment register (ds,es etc) -> to eax
shift by 4 bits (multiply with 16)

add the offset (usually bx/si/di register) to eax

xor eax,eax
and ebx,&h0000ffff
mov eax,ds
shl eax,4
add eax,ebx

now you have a 20bit address in eax

just to show indeed it is "20bit programming"

it is an relict of MSDOS times.

now, one way is to use 32bit address registers for the program flow, and convert down to 20bit for memory access.

this can make sense for MSDOS programs, to get better understandable source (most machines are 386/above)

but who writes MSDOS programs nowadays?

i wrote a tetris implementation for MSDOS, a few years ago...

however, you do not say if you mean the 8086 processor. :)
Posted on 2005-04-03 06:48:41 by akidd86