I am trying to make my own simple 3D rendering engine in assembly totally from scratch. So I run it from DOS, switch to 32-bit PM and all that stuff....
Finally I got working transformations with projection and wire-frame rendering but I got really trivial problem. After rendering my scene the LFB needs to be cleared so next frame I can draw there again.
But using rep stosd
or simple mov-loop
cycle is really slow and my FPS drops literally to 10 from 60+.
I am using high resolution 1280x1024 pixels with 4 bytes per pixel so I need to set 1280*1024=1310720 dwords = 5242880 bytes to zero starting at address 0xFC000000.
Is there any way to tell memory to erase itself instantly? (I want to keep that resolution)