home *** CD-ROM | disk | FTP | other *** search
-
-
- This file came off the Night Modulator BBS in San Jose, California. The
- author is anonymous. I've never had any troubles with anything like it, so
- I don't know how accurate this report is. Microsoft C 4.0+ and MASM 5.0+ both
- have problems with the RAW mode in the CON driver (so does Turbo Pascal 4.0)
- that work similar to what this guy's second report seems to do.
-
- Dave Williams
-
-
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-
- The following describes two bugs I have encountered in CED V1.0D:
-
-
- 1. Be careful not to press the backspace key when input and/or output
- is redirected! (The result will be a system crash!)
-
- 2. The second bug is a subtle one (all examples refer to Microsoft C
- V3+):
-
- a. You're running a program that uses CED to read strings from the
- keyboard. (This is what happens with the "cgets" function.)
-
- b. Your program traps Control-Break (and Control-C) interrupts. (This
- is the purpose of the "signal" function.)
-
- c. Instead of the usual process of merely setting an interrupt flag and
- returning to DOS, your Control-Break interrupt routine retains control
- and continues the execution of your program, a perfectly legal DOS
- procedure. (Your program might use the "longjmp" function.)
-
- d. You press Control-Break (or Control-C) during the time that CED is
- actually performing input.
-
- Normally, your Control-Break interrupt routine would expect to find all
- of its registers restored by DOS. However, CED sets up its own
- registers before calling DOS while it is building an input line,
- including (unfortunately) the Stack Segment register. As a result, you
- must reload ALL registers before continuing. (Of course, there's no
- problem if you simply return to DOS, but then you have no way to abort
- the CED operation!)
-
- Unfortunately, many high-level languages assume that the Stack Segment
- register will be intact - and they make no attempt to restore it,
- regardless of the program memory model. So if you continue execution
- instead of returning to DOS, the result will be a system crash.
-
- (There IS a way to fixup the Stack Segment register in Microsoft C V3+,
- but it requires a VERY sophisticated assembly language routine.)
-
-
- NOTE: These are unfortunate bugs in an otherwise excellent program -
- there ARE ways to avoid both problems!
-