Author |
Topic: Interrupts (Read 839 times) |
|
Ric
New Member
member is offline


Posts: 30
|
 |
Re: Interrupts
« Reply #3 on: Jun 19th, 2016, 1:34pm » |
|
Thanks Richard,
Again for the detailed answer. You are right, I was checking eax directly on return, hence the failure.
The reason I want to access the keyboard in assembler is just to test my 3d software without dropping fps. When I have sorted it to a standard which I am happy with ,i will put a proper user interface in, in Basic.
Ric
PS. It is all just for a personal challenge. And why not, it's fun.
|
|
Logged
|
You can't succeed without failing a few times first, CHIN UP.
|
|
|
Richard Russell
Administrator
member is offline


Posts: 803
|
 |
Re: Interrupts
« Reply #4 on: Jun 19th, 2016, 3:16pm » |
|
on Jun 19th, 2016, 1:34pm, Ric wrote:| The reason I want to access the keyboard in assembler is just to test my 3d software without dropping fps. |
|
Remember that there is virtually no benefit in the frame rate exceeding about 60 fps, because the eye/brain system cannot perceive the difference. The only effect is to waste CPU time and flatten batteries prematurely! Having spent much of my career in the business of generating high-quality video I am not impressed by meaningless FPS values. 
The thing to aim for is a fixed frame rate (ideally synchronised with the display refresh) and then to take full advantage of those 16 milliseconds or so per frame to make your graphics look as nice as possible. When looked at from that viewpoint there's no need for your assembler code to test the keyboard or the mouse, just return to BASIC at the end of each frame. The effect on the overall execution time will be tiny, and the effect on the frame rate zero (so long as you are locked to the vsync).
I wonder if you've checked the CPU time used by the WORLD.BBC example program supplied with BB4W. That renders a 3D rotating sphere, texture-mapped with an image from NASA, and illuminated by a virtual sun. It runs at approaching 100 fps, is written in 100% BASIC code (even D3DLIB is all BASIC) and uses less than 1% CPU on my laptop!
Richard.
|
|
Logged
|
|
|
|
Ric
New Member
member is offline


Posts: 30
|
 |
Re: Interrupts
« Reply #5 on: Jun 22nd, 2016, 09:46am » |
|
Cheers, I'll have a look.
|
|
Logged
|
You can't succeed without failing a few times first, CHIN UP.
|
|
|
|