Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Paper/Border rerun bug
#1
Code:
10 BORDER 4
20 CLS
30 PRINT AT 1,9;INK 3;"Hello World from Assi";
40 END

Hi,

The above code gives green paper with a magenta in ink in the text
message when run the second time from the BASIC loader.
Reply
#2
That's to be expected (at the moment). The code in charge of initializing the heap is within the heap free space (to save some precious bytes), thus destroyed upon first execution. A compiler flag will be added to specify "rerunable code" or not. Usually games don't return to BASIC once started. :wink: So, this will go to the TODO list (it's rather easy to implement, will try to do it this week, but I'm currently working on FOR loops).
Reply
#3
It is sometimes nessesary to return to BASIC for loading levels (from a disc system like +D).
------------------------------------------------------------
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!
Reply
#4
Quote:Usually games don't return to BASIC once started. :wink: So, this will go to the TODO list (it's rather easy to implement, will try to do it this week, but I'm currently working on FOR loops).

Thanks.

It would make it easier to mix BASIC and compiled code were the slow code
could be written in pure ZX BASIC like instuctions and such and the game
itself is compiled. In that scenario if one is redefining the keys in uncompiled
BASIC how easy would it be to pass the information to the compiled code?
Or even if one would do away with uncompiled BASIC altogether and just
compile the program in two parts, one in low memory and one in high memory,
how to pass info between the two apart from POKEing and PEEKing? Both
parts are then rerunable.
Reply
#5
Not a very good idea because independend compiled codes won't share their librarys and so there will be some double code, occypying some extra KB, and two Heap spaces.
------------------------------------------------------------
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!
Reply
#6
LCD Wrote:Not a very good idea because independend compiled codes won't share their librarys and so there will be some double code, occypying some extra KB, and two Heap spaces.
That is why memory management would be good and perhaps a linker.

Memory Management
<!-- l --><a class="postlink-local" href="http://www.boriel.com/forum/wishlist/memory-management-t621.html#p2245">wishlist/memory-management-t621.html#p2245</a><!-- l -->
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)