VOGONS

Common searches


Breaking Without Killing DOSBox

Topic actions

  • This topic is locked. You cannot reply or edit posts.

First post, by Gene Wirchenko

User metadata
Rank Member
Rank
Member

How does breaking work if you simply want to interrupt something within DOSBox without killing DOSBox?

For example, if running a program in GW-BASIC under DOSBox, how does one interrupt the program without killing DOSBox? Under MS_DOS, this would be <Ctrl-Break>, but that does not work under DOSBox.

Sincerely,

Gene Wirchenko

Reply 2 of 19, by mhaigler@aol.com

User metadata
Rank Newbie
Rank
Newbie

Qbix,

PLEASE consider making this a priority at some point! I know it's an interrupt hassle, but Ctrl-break is the only way to interrupt debugging with a lot of old programming languages. It's also used in a few games.

Actually, it is the ONLY thing about DOSbox that keeps me chained to Windows. (Otherwise I'm perfectly happy in Ubuntu!)

Thanks,
MH
PS - Anyone stumbled onto a TSR to work around? (..besides installing MSDos 6.22?)

Reply 3 of 19, by ADDiCT

User metadata
Rank Oldbie
Rank
Oldbie

DOSBox is a DOS game emulator primarily. It's not a PC emulator, or a DOS emulator. If you want to have "real" DOS functions, setup a virtual machine with a MS-DOS install.

And i want to see the game that relies on CTRL-C or CTRL-BREAK.

Reply 8 of 19, by ADDiCT

User metadata
Rank Oldbie
Rank
Oldbie

Don't know about VMWare, but when using plain images (no compression), you can copy files to/from an image with WinImage. I'm using this a lot with Qemu, for example. Having the ability to mount dirs would be much more convenient, of course.

Reply 9 of 19, by mhaigler@aol.com

User metadata
Rank Newbie
Rank
Newbie

Ha ha!

So just for kicks I installed both MSDOS6.22 and FreeDos (images under DOSBox), but STILL no Ctrl-Break. So is DOS-Box blocking the interrupt call somehow? Just curious.

By the way, I realize DOSBox is made for gaming, and I use it for that and LOVE IT! But I have also had great success using it for MANY DOS programs (like Turbo Pascal, and a music printing program I love, old word processors, and even an old version of DataCAD, a nice drafting program). DOSBox works flawlessly with all of them! So even though the intent is for gaming, it doesn't change the fact that DOSBox is simply the best, tightest, and easiest to use DOS shell out there, for ANY purpose. So it just seems logical to me that it would be great to improve it further, even if the gain is only loosely applicable to the gaming world.

All the best, and thanks for a wonderful gift to those of us trapped in the past.
MH

PS - I also installed BOCHS and it TOO doesn't allow Ctrl-Break. The only way it works is with icky NTVDM under XP.

Reply 11 of 19, by IIGS_User

User metadata
Rank Oldbie
Rank
Oldbie
mhaigler@aol.com wrote:

PS - I also installed BOCHS and it TOO doesn't allow Ctrl-Break. The only way it works is with icky NTVDM under XP.

Virtual PC has a menu item called "Enter Ctrl-Alt-Del" which leads this command to the emulated machine.

Klimawandel.

Reply 13 of 19, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I have a little trick for those interested: use Ctrl-ScrollLock, it behaves like Ctrl-Break with many BASIC interpreters running within DOSBox. It works with GW-BASIC, BASICA (often bundled with compatible DOSes like Compaq's), QBasic, QuickBasic, and possibly other development "workbench" interfaces.

The reason this works is a little complicated, so only read on if you're interested in knowing. DOSBox does not have true Ctrl-Break handling like real DOS, which is a combination of hardware and software interrupts and internal flags. However, the DOS Ctrl-Break handler is only a default handler that all starts with INT 9, the keyboard hardware interrupt. Many of the program development apps hook INT 9 and intercept keys before DOS sees them, so they can do their own processing. After all, the DOS default behavior for Ctrl-Break is to terminate the app, and that is often not what is wanted. The INT 9 handler code looks for the Control key being depressed by checking the shift status byte in BIOS data, and then reads scancodes from the keyboard data port 60h. The scancode for ScrollLock is 46h, and the scancode for Ctrl-Break is a 2-byte "escaped" sequence of E0h 46h, where E0h is the escape code. It seems the handler routines are often not very rigorous in their processing of the escape code, and just drop it, so Ctrl-ScrollLock ends up working the same as Ctrl-Break.

A lucky break for us! 😉

Reply 14 of 19, by Gene Wirchenko

User metadata
Rank Member
Rank
Member
ripsaw8080 wrote:

I have a little trick for those interested: use Ctrl-ScrollLock, it behaves like Ctrl-Break with many BASIC interpreters running within DOSBox. It works with GW-BASIC, BASICA (often bundled with compatible DOSes like Compaq's), QBasic, QuickBasic, and possibly other development "workbench" interfaces.

Thank you. That works nicely.

Sincerely,

Gene Wirchenko

Reply 19 of 19, by y23

User metadata
Rank Newbie
Rank
Newbie

Nikolay Nikolov ( nickysn ) - 2010-05-09
has made a dosbox-kbd-ctrlbreak.patch

http://sourceforge.net/tracker/?func=detail&a … 551&atid=467234

I love DOSBOX to pieces (the sound is great!),
but me too needs the precious CTL-BRK functionality 🙁

I will donate to qbix79, "Dos user word of honour" !