When I run the program, the console pops up fine and lets me type stuff in. (I do have display status = engage; in the directors period.) But as soon as I press enter, it goes to the "sad" subroutine every time. So the console input is failing. What might cause this? Since this happens at the very beginning of the program, I'm guessing it has to be something in one of the included libraries' preambles. Any idea? I could really use console input to debug some eye-candy I'm working on. Thanks, ---Kris
Okay, so I've found something. It works as long as I: 1) Change "on listen success" from "happy" to "proceed". It doesn't like the jump to a label for whatever reason. 2) Include the library "/data/heap/connect/mgrab" in my program. Simply including it does the trick, so it must be because of that library's preambles:
[heap . f init] = false;
[heap . p init] = null;
[heap . p alloc] = alloc;
[heap . p free] = free;
[heap . p defrag] = defrag;
[heap . p dyns] = dyns;
[heap . p nodyns] = nodyns;
If I do both these things, it works fine. If I do only one, I either get garbage in the location pointed to by [KString], or the conin.s listen procedure fails.
I have another question: What is [breakpoint]? I see it used in the console input output example (linoleum\examples\user_interface\console_io.txt).
Okay, I think I've solved mystery number one. It has to do with the new convention of... junctions!
The "/arch/cpu/base" library gives junction functionality. A junction will either go nowhere, or jump to a specified label. This is useful if you want to set the place to go. "junction: proceed;" will jump nowhere, but "junction: mylabel [breakpoint];" will go to "mylabel". The [breakpoint] sets a flag passed to the junction telling it to go to mylabel. NOTE: "junction: mylabel;" is invalid and will not jump to mylabel! I don't know what it will do, but I've only experienced chaos when I make that mistake.
The "console_io" example included with lino 2 is a perfect example of a junction. You see the breakpoint in the source code. The function with the junction in it is contained in the "conin" library. (hmi/conin)