Re: help with line input

by Mercury (no login)


> Is there any way that i can still use line input?

No. LINE INPUT works in one way and one way only. It gets a line of text from the user, and only relinquishes control of the processor after the user hits Enter. It unfortunately doesn't feature any kind of parameters to control its behavior so that it will allow other things to go on processing while it does its job. One possible way would be to hook the timer tick interrupt so that whatever background processing you need done is completed during the interrupt cycle, however this is not only tricky but it too may fail, as LINE INPUT might stop certain interrupts from occurring while it executes.

>Also, isn't it possible to execute more than one step at the same time with a multi-core processor?

This IS possible, but not for QBASIC. As DOS wasn't designed as a threaded OS, any parallel threading that occurs will be happening within your actual CPU. This is below your program's level of awareness, as well as that of DOS, and will therefore be invisible to your code. If you're running QBASIC and/or your program under some flavor of Windows then it will be handling the multi-threading, but alas this would still be transparent to your code.

Posted on Mar 8, 2012, 6:55 PM

Respond to this message   

Return to Index

 Copyright © 1999-2018 Network54. All rights reserved.   Terms of Use   Privacy Statement