1. Re: Waiting for a retrace.. again
- Posted by Pete Eberlein <xseal at HARBORSIDE.COM> Jun 29, 1997
- 656 views
I just now tried the wait_retrace code I sent and discovered that it is agonizingly slow. Panning the screen was pretty jerky using that procedure. So then I whipped out my assembly language cheat sheet and coded it in machine language. Its much faster and smoother now. I think a lot of time was lost in polling Jacques Deschenes Input procedure. Though this may not be significant on any machine better than my 486/50. ---- code begins ---- constant wait_retrace_code = { #50, -- PUSH EAX #52, -- PUSH EDX #BA,#DA,3,0,0,-- MOV EDX, 0x03DA #EC, -- IN AL, DX #24,#08, -- AND AL, 0x08 #75,#FB, -- JNZ $-5 #EC, -- IN AL, DX #24,#08, -- AND AL, 0x08 #74,#FB, -- JZ $-5 #5A, -- POP EDX #58, -- POP EAX #C3 } -- RET global atom wait_retrace wait_retrace = allocate(length(wait_retrace_code)) poke(wait_retrace, wait_retrace_code) ---- code ends ---- wait_retrace isn't a procedure anymore. it must be called using "call(wait_retrace)" Hope this helps Pete Eberlein <xseal at harborside.com>