Hi! > Is there a way to add code to make old QB45-compiled programs aware of fdapm?
Design-wise, the point is rather behaving in a way that fdapm will understand, but not explicitly telling things to fdapm... > A simple INKEY$ sends the computer use from 3%-4% to 100%! According to the help of PowerBasic (sorry, first search result) www.powerbasic.com/support/help/pbcc/inkey_function.htm INKEY$ does not do much: It checks whether a key is in the buffer and then immediately returns, either with or without key. PowerBasic also allows gathering mouse events that way, which I find exotic. http://www.qbasicstation.com/index.php?c=t_adv&t=106 sounds quite similar. I think it is not the INKEY$ which uses 100% CPU but the fact that you probably do something as fast as possible between the moments where you check for a key? Unless you actually wanted to do that, use a call that WAITS for a key and then returns it. For example you could use INPUT$(1) and wait for exactly one key: www.qbasicstation.com/index.php?c=t_adv&t=107 Alternatively, you could explicitly sleep / wait for a short time each time when an INKEY$ call returned nothing and you (but not fdapm) knows that you are actually just idle, waiting for some key to be pressed. That way, FDAPM and others may be able to know that your program is NOT busy with anything but is just waiting for a keypress and will be able to put the CPU in idle state. In the case of virtual machines, "idle CPU" means that the virtual machine will use less processing time on your real CPU in the host operating system :-) > there is a newer FreeBASIC, but I can't compile some sources inside FB Note that FreeBASIC has some command line option to switch it to a more QuickBasic style syntax, as far as I remember. Eric ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user