VOGONS


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 1 of 19, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

not supported currently. Nor planned.

Water flows down the stream
How to ask questions the smart way!

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 4 of 19, by bugs_bugger

User metadata
Rank Member
Rank
Member

Poorly written QBasic Games rely on Crtl-Break to exit. 😜

Reply 5 of 19, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Poorly written qbasic whatever is supposed to be run under vmware or bochs.

Reply 6 of 19, by leileilol

User metadata
Rank l33t++
Rank
l33t++

but vhds and such virtual hard disks are a hassle to handle

apsosig.png
long live PCem

Reply 7 of 19, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

File a bug report for them 😉

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 10 of 19, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

We don't raise the needed flags in our keyboard handling. So booting dos doesn't work.

Water flows down the stream
How to ask questions the smart way!

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 12 of 19, by mhaigler@aol.com

User metadata
Rank Newbie
Rank
Newbie

Ah, I thought so. Well, I'll hold out hope that someday someone more savvy than I can find a way to make it work. Just so we're clear, running MSDos or FreeDOS under DOSBox do NOT solve the ctrl-break issue.

Thanks again!
MH

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 15 of 19, by TeaRex

User metadata
Rank Member
Rank
Member

Break used to be CTRL-Scroll Lock on the XT and AT keyboards, and Pause was CTRL-Num Lock, right?

tearex

Reply 16 of 19, by speon

User metadata
Rank Newbie
Rank
Newbie

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

The only way to exit Maniac Mansion and Zak McKracken is by pressing Ctrl-C, short of force closing DOSBox, that is.

Reply 17 of 19, by TeaRex

User metadata
Rank Member
Rank
Member

The early 1990s inofficial PC port of Akalabeth (not the official one on the Ultima Collection CD) also needs CTRL-BREAK to exit.

tearex

Reply 18 of 19, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Close the window.

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" !