Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!spool.mu.edu!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!isgate!krafla!tryggvie From: tryggvie@rhi.hi.is (Tryggvi Edwald) Newsgroups: comp.os.msdos.programmer Subject: Question on TC++ and Eckel's article on multitasking in "Comp. Lang." Message-ID: <3028@krafla.rhi.hi.is> Date: 7 Apr 91 22:26:57 GMT Organization: University of Iceland Lines: 28 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!