Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
(10-05-2021, 06:58 PM)boriel Wrote: Yes, I was referring to DEF ADD.
It seems you wanted to copy memory from one place to another.

You could do it with:
FOR i = 1 to 128
   POKE 16384 + i , PEEK 25000 + i

Not sure if this would be fast enough, but compiling with -O3 or -O4 and measuring the speed will give you a hint.
DEF ADD cannot be used because variables are static, not dynamic in compiled BASIC and this var is not used at all.
But probably there's a workaround that can be admitted in the contest. Shy

Also, please, please,  Angel I'd like to add DEFCC compatibility in PRINT (not sure if you read my private msg?).
If you could tell me more about it (I couldn't find much info), I'll be gratetul.

Sorry but I did not look at the private message I just saw it now Smile

The only thing I know about the DEFCC is what I told you

In principle, this variable is updated every time a print is made with the first memory address of the X Y coordinates of the next position.

for example if you do in the original zx spectrum  print at 0,0;

the variable will have the value 16384 that corresponds to the address of the first byte of the character that we would print in 0,0

If you do print at 0,0; "A"

the variable has the value of 16416 which is the same that if you had made print at 1,0;

that is, it is the first address of the next byte where the cursor is  because there is no coma (  ;  )  the end of the print go to next line

the variable points to the next first address of the down char

If you do it with any other address, it updates the same.

The variable will point to the first address where it will start printing next time you print

In this link

you have all zx spectrum dissasembly with a lot of explanations

And in this link

you have more info about this variable and the routines that updates it 

You must only go to the last link and follow the links PO_FETCH that reads the variable


Messages In This Thread
BASIC FROGGER - by maeloterkim - 10-04-2021, 10:14 PM
RE: BASIC FROGGER - by boriel - 10-05-2021, 05:41 PM
RE: BASIC FROGGER - by maeloterkim - 10-05-2021, 06:38 PM
RE: BASIC FROGGER - by boriel - 10-05-2021, 06:58 PM
RE: BASIC FROGGER - by maeloterkim - 10-05-2021, 07:43 PM
RE: BASIC FROGGER - by boriel - 11-15-2021, 11:02 PM

Forum Jump:

Users browsing this thread: 2 Guest(s)