12-17-2010, 06:29 PM
LCD Wrote:That's right!LTee Wrote:Seems to be working fine, although I do get a "input.bas:38: warning: Empty loop" message every time I compile my code. Is that anything to worry about?It is just a warning, not a error. Its just saying: Your code does not do anything.

LCD Wrote:If you make a procedure and do not use it, you will get warnings too, because procedures that are not used, are a waste of time and ressources. :mrgreen:Yes, but even more: if the computer warns you about unused functions & procedures it also means it won't compile them in the final program to save space :wink: This way, when you include a .BAS library unused functions won't be included. I also will put a #pragma to disable warnings on this. Even more, to reduce compile time, i'm thinking in creaing .obj / .lib files. What do you think?
Quote:@Boriel: Any example how SCREEN_ADD can be used?SCREEN_ADDR is defined in the <cls.asm> module, and included by default if PRINT, PLOT, CIRCLE, DRAW are used since all of them use this var (the cls.asm routine is fast and really small, just two LDIR sequences, so including it worths the hassle). To use SCREEN_ADDR, you can create your own function or macro. I was thinking in defining it in a .BAS library, like a simple macro (better than a function), but the macro processor zxbpp.py is not ready for that then :oops: So a Fasctall Function is enough:
Code:
SUB FASTCALL SetScreenAddr(x AS Uinteger)
ASM
ld (SCREEN_ADDR), hl
END ASM
END SUB

+2 and newer Spectrum models can map the SCREEN output to another location with an OUT to 7FFDh So you can draw there and use it.
You can also draw in another hidden RAM location and later dump it with a memcopy / memove (see .BAS library).