I am a beginner reading <art of assembly languager(DOS version)>.(Because I want to learn pure assembly but windows version use HLA) Programs in that book are writen for real mode. So I wonder if my programs will run OK after I have leart that book. Or do I have to set a DOS in my computer?
Posted on 2004-07-14 02:01:16 by dislimit
DOS emulator is already set in your computer, its name is NTVDM. Most 16bit programs written for real mode DOS work well in Command Prompt window.

You can:
* use BIOS functions (INT 10h, INT 16h, INT 33h)
* use DOS functions (INT 21h)
* allocate XMS memory
* hook your own interrupt handlers

You cannot
* directly access arbitrary I/O port with IN and OUT
* call Windows API functions

You should not
* write directly to videomemory
* read well-known I/O ports (61h, 3F8h etc)
this may work but the emulation is slower then using higher level functions.

Realmode programs which switch the video to graphic mode will work in fullscreen only for basic videomodes 640*480*16 or 320*200*256.
Programs which depend on exact timing (sound generators) may not work correctly.

After you have written your DOS HelloWorld program, why not to continue with Windows console programs? It is easier in assembler and more useful.
Posted on 2004-07-14 05:20:19 by vit$oft
Thanks a lot!
I really want to write programs which can run in Windows console. That's why I asked this question.
Posted on 2004-07-14 06:40:20 by dislimit