VOGONS

Common searches


First post, by Magstriker

User metadata
Rank Newbie
Rank
Newbie

Hello,

Serious apologies if this question has been answered elsewhere but I have scoured the internet and have not found one. If it has been asked please direct me to the solution before closing this thread.

Anyway, my friend has DOSBOX 0.74-3 installed on windows 10 with it booting off a hard disk image running MS-DOS 6.22. I am aware that many of DOSBOX's functions do not work once booted into a disk image but my friend wants to have that same auto-quit functionality like the dosbox.exe -exit "program path" feature. Is it possible to tell DOSBOX to quit within this MS-DOS 6.22 environment? Is there some known way to crash this version of dosbox to get it to quit that way? I would prefer to not force him to download a fork of dosbox since he gets frustrated somewhat easily, but emailing him a small batch, com or exe file to inject into his disk image would be nice since he already installed a bunch of games to the image already.

I have tried the -exit command to no avail.
I have attempted to use ACPI shutdown calls with some old assembly programs to no avail.
I have read all FAQs and wikis for DOSBOX, googled around and have asked in some discord servers to no avail.

Thank you in advance.

Last edited by Magstriker on 2019-08-30, 05:42. Edited 1 time in total.

Reply 4 of 5, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie
Magstriker wrote:

Will that key combination work if I simulate the key presses inside DOS6.22 with some old dos programs or is that picked up externally?

That's for DOSBox itself.

The following ASM #1 and #2 code snippet will shutdown DOSBox within itself.

;ASM #1
jmp far f000:fff0

;ASM #2
mov al, 01h
out 92h, al

Reply 5 of 5, by Magstriker

User metadata
Rank Newbie
Rank
Newbie

Okay. Thank you for the code. I have compiled this and both methods work. Both methods appear to vary in speed, but I will test on my own to find the best method for me. For those interested in compiling this yourself do the following:

1. Startup any version of DOS or DOS prompt.
2. Run DEBUG (DOSBox does not include this by default. I believe Windows XP has DEBUG but I could be wrong. DEBUG is covered under the default PATH so you can run it from anywhere.)
3. Type the following (It is the memory location you will start writing code to. It is 100 here because .COM files need the offset to be 100 for whatever reason.):

a 100

4. For ASM1 type only the jmp line, for ASM2 type the mov and out lines in that order. Also with DEBUG all numbers are hex by default so be sure to remove the 'h' letters from ASM2. There is no need for using both methods in the same program. Just make one program for each and try both:

jmp far f000:fff0
mov al, 01
out 92, al

5. The next blank line you get press enter again to drop back to the - prompt and type the following:

r cx

6. Subtract 100 from the number after the colon on the blank line(This is how many bytes to write out. The number you subtract 100 from ought to be less than 110 for ASM1, 2, or both. Therefore, type:

Some single digit number, not the words you are reading right now.
n filename.com
w
q

7. You are done! The file will be saved to your current directory. For reference, the n command gives the program a name (do not forget the 8.3 name limits and the file being made is going to be a .COM file), the w command writes our code to a file by that name, and the q command quits DEBUG.

Share and Enjoy! I have attached the compiled .COM files for those not interested in compiling it themselves in all combinations of the above two methods.

Attachments

  • Filename
    Compiled COM Files.zip
    File size
    573 Bytes
    Downloads
    11 downloads
    File license
    Fair use/fair dealing exception