tryggvie@rhi.hi.is (Tryggvi Edwald) (04/08/91)
Hi. In "Computer Language", vol. 8, number 2 (February 1991) there is an article on Multitasking, "Taking Control to Task" by Bruce Eckel. I typed the whole thing in, in order to study multitasking and C++, killing two birds with one stone, so to speak (not subjects to be mixed carelessly for beginners like me-). The code contains at least two relatively obvious typographical errors; near the end of tasker.hpp an ":" has become ";" in the definition of scheduler, and in tasker.cpp "new char" has become "newchar". I found that the program doesn't work when compiled with the Large or Huge memory models (the longjmp doesn't seem to longjump), while a Small model compile produces a plausible run. (I left the Overlay switch OFF). What I would like to know, is this: WHY does the code behave so differently depending on the memory model? Is this something so obvious that I shouldn't ask, and does not merit a warning in the article? I would appreciate any explanation of this, if anyone cares to give me a slice of his time. Thanks. Tryggvi Edwald, te@ejs.is, ICELAND If one doesn't ask, how can one learn? - read the manual? Preposterous thought!