Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
why is there 2 halt on waitretrace macro?
#1
why is there 2 halt on waitretrace macro?

i found in the library this waitretrace macro in the  retrace.bas  file

REM simple WaitRetrace macro

#ifndef waitretrace
#define waitretrace 'REM Retrace \
asm \
halt \
halt \
end asm

#endif


Is not better put only one halt for better timer control of the programmer?

if there was only one halt is more easy to control

with one halt we can do

waitretrace  ->  only 1 halt  1/50 seconds

2 halt      -> 2/50seconds
waitretrace   
waitretrace    

N halt    -> N/50seconds
for i = 1 to N
   waitretrace
next i
Reply
#2
For what I know, you have to do 2 HALT's to ensure the ray trace is at the end of the screen.
But if you see that macro, it won't override yours if you already define your own!
So, simply define:
Code:
#define waitretrace \
asm \
halt \
end asm

And use yours Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)