Questions tagged [dos]

A family of disk-based operating systems (Disk Operating System) for mainframes and minicomputers in the 1960s and 1970s, and subsequently IBM PCs and compatibles of the 1980s and 1990s, including MS-DOS. DO NOT USE THIS TAG FOR QUESTIONS ABOUT THE WINDOWS COMMAND PROMPT! Instead, use the [windows], [batch-file], [windows-console], and/or [cmd] tags. For questions about denial-of-service (DoS) attacks, use [denial-of-service].

DOS (Disk Operating System) is a generic name for the simplest possible operating system that can handle a disk. Examples abound from the 1950s onwards, from all major manufacturers. IBM and Digital Equipment Corporation (among others) supplied a DOS as a bootstrap operating system used to generate larger ones.

The best known and most commonly used examples of DOS are for the IBM PCs and compatibles of the 1980s and 1990s. Members of this family include Microsoft's MS-DOS, IBM's PC-DOS, Digital Research's DR-DOS, Novell DOS, FreeDOS, and others.

Between enthusiasts and legacy environments, there remains a high level of interest in MS-DOS systems and applications, whether running on real vintage hardware or under a virtual machine such as DOSBox. Programming questions about DOS are on-topic for Stack Overflow. Other types of questions should be directed to Retrocomputing.

Early consumer versions of Windows (1.x, 2.x, 3.x, the 9x series, up to Windows Millennium) were built atop of or partially based upon MS-DOS. Windows NT, Windows XP, and later do not use MS-DOS. Since modern versions of Windows are not based on DOS, questions about the Windows command prompt and batch scripts should not use this tag. Instead, use the tags , , , and/or .

Another common usage of this acronym is for denial-of-service attacks. This is generally spelled with a lowercase "o" (DoS), and is not related to the operating system DOS. For these questions, use the tag . A tag also exists for distributed denial-of-service attacks.

2768 questions
17
votes
1 answer

How does DOS load a program into memory?

What steps does MS-DOS take to load a COM or EXE file into memory? Are there still references online as to how this happens? The best I can think of is possibly referring to dosbox source.
Nick Sonneveld
  • 3,356
  • 6
  • 39
  • 48
17
votes
2 answers

Why I am getting "Echo is on" when trying to print a variable in batch

I tring to excute a simple batch file scripts : echo %1 set var = %1 echo %var% When I am running it in XP, it is giving me expected output, but When I am running it in Vista or windows 7, I am getting "Echo is On" when trying to print (echo)…
Rahul J
  • 199
  • 1
  • 1
  • 7
16
votes
2 answers

Batch copy only modified files

I have two folders (say Source and Working). Now within these, there are 100s of other files/folders. Now, the folder Source gets updated periodically (i.e. some files/folders may change or get added). I am trying to keep both the folders in…
copenndthagen
  • 49,230
  • 102
  • 290
  • 442
16
votes
9 answers

C compiler for MS-DOS

I have installed MS-DOS 6.22 on a VirtualBox virtual machine, everything is working well, the purpose of doing that is to compile a program written in the C language that displays and edits bits in the (virtual) RAM. However, I need a way to install…
Tarek
  • 1,904
  • 2
  • 18
  • 36
15
votes
2 answers

What is The Memory Address of Character Table In DOS?

What is the address of character table in DOS where we can create new fonts and symbols by manipulating the pixels of the each character? I know to change it with BIOS interrupts, but I only need the memory address of the character table in dos for…
user776475
  • 151
  • 4
15
votes
4 answers

Checking if a key is down in MS-DOS (C/C++)

Yes, I mean real MS-DOS, not Windows' cmd.exe shell console. Is there a way to check if a key is down in MS-DOS, analogically to the GetAsyncKeyState() function in WinAPI? Currently I'm using kbhit() and getch(), but it's really slow, has a delay…
CrizerPL
  • 287
  • 2
  • 11
15
votes
5 answers

Is there a clean way to prevent windows.h from creating a near & far macro?

Deep down in WinDef.h there's this relic from the segmented memory era: #define far #define near This obviously causes problems if you attempt to use near or far as variable names. Any clean workarounds? Other then renaming my variables?
hyperlogic
  • 7,525
  • 7
  • 39
  • 32
14
votes
3 answers

Porting Autodesk Animator Pro to be cross platform

a previous relevant question from me is here Reverse Engineering old paint programs I have set up my base of operations here: http://animatorpro.org wiki coming soon. Okay, so now I have a 300,000 line legacy MSDOS codebase. It's sort of a "be…
Breton
  • 15,401
  • 3
  • 59
  • 76
13
votes
4 answers

How can I clear the screen without having to fill it

Does an interrupt service routine exist to help me clear the screen of the terminal? Will it work on windows?
kettlepot
  • 10,574
  • 28
  • 71
  • 100
13
votes
3 answers

What is the DOS equivalent of 1>/dev/null?

I want to suppress the output of my script running under DOS, similar to the following under a *nix environment: $ command 1>/dev/null How can I do this?
Zaid
  • 36,680
  • 16
  • 86
  • 155
13
votes
3 answers

Is it possible to multiply by an immediate with mul in x86 Assembly?

I am learning assembly for x86 using DosBox emulator. I am trying to perform multiplication. I do not get how it works. When I write the following code: mov al, 3 mul 2 I get an error. Although, in the reference I am using, it says in…
user2192774
  • 3,807
  • 17
  • 47
  • 62
12
votes
6 answers

Batch file to execute all files in a folder

I need a batch files the launches all files in a given folder (in this case it is c:\macros\day). I've tried the following, but it doesn't seem to do anything. for /f %i in ('C:\macros\Day /b') DO command %i
sifuhall
  • 415
  • 2
  • 5
  • 9
12
votes
2 answers

Reverse Engineering old paint programs

I've got a couple of really old MSDos based paint programs. They work on palette indexed image buffers. They have a number of spectacular shape drawing tools, brushes and effects that simply do not exist in any modern paint program- Particularly not…
Breton
  • 15,401
  • 3
  • 59
  • 76
12
votes
1 answer

Why does DOS set the SP register to 0xFFFE after loading a .COM file?

On the wikpedia page about .COM files https://en.wikipedia.org/wiki/COM_file it reads: .COM files in DOS set all x86 segment registers to the same value and the SP (stack pointer) register to 0xFFFE, thus the stack begins at the very top of the…
nadder
  • 193
  • 6
12
votes
1 answer

Multiple do commands in a for loop: Echoing a string to a file and then redirecting to the command window

I am trying to write a batch file to iteratively execute a fortran compiled executable. Normally one would go to the windows command prompt, type 'Model.exe'. This would bring up a dos command window asking the user to type a required file name…
Ben Williams
  • 123
  • 1
  • 1
  • 5