![]() |
why is there 2 halt on waitretrace macro? - Printable Version +- Forum (https://www.boriel.com/forum) +-- Forum: Compilers and Computer Languages (https://www.boriel.com/forum/forumdisplay.php?fid=12) +--- Forum: ZX Basic Compiler (https://www.boriel.com/forum/forumdisplay.php?fid=11) +---- Forum: Help & Support (https://www.boriel.com/forum/forumdisplay.php?fid=16) +---- Thread: why is there 2 halt on waitretrace macro? (/showthread.php?tid=1407) |
why is there 2 halt on waitretrace macro? - maeloterkim - 09-09-2021 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 RE: why is there 2 halt on waitretrace macro? - boriel - 09-10-2021 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 \ And use yours ![]() |