Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New beta release 1.2.7r1866
#5
LCD Wrote:
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? Smile
It is just a warning, not a error. Its just saying: Your code does not do anything.
That's right! Idea But here the loop is necessary to wait for a key press in the input loop. :roll: I will put a #pragma option to disable warnings an the like if you expect them and know your code is OK.
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
A very simple function indeed! Since Fastcall functions gets their 1st argument directly in HL, we're done with a single asm line. Anyway, this feature is *really* beta, and untested. Confusedhock: So I expect it to fail when SCREEN_ADDR != defaul 16384 value.
+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).
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)