(10-01-2021, 08:46 AM)maeloterkim Wrote: Hi
In the original ZX spectrum basic when you PRINT something the variable DF CC is updated with the screen position
for example the next program must print 16384 that is the first position of the screen
but the only answer always with every diferent position is 16448
this means that the print routine is not updating the DF CC variable like the original ROM
Is this a bug?
You can try this program and change the coordinates of the first print 0,0
Code:dim myScreen as uInteger
print at 0,0;
myScreen = peek (uInteger, 23684) '' 23684 = DFCC = Must be screen position after every print
print at 10,10; myScreen
Yes, it does not update it. I will make to update it. PRINT is not using the ROM, but tries hard to mimic ROMS behavior (at the expense of memory and speed), for compatibility's sake.
I will add this feature. Not sure how this variable works.
Also, I don't see the point of this (other than porting a BASIC program to ZX Basic compiler).
It seems you're using "tricks" and "hacks" to speed up an interpreted BASIC program, and this is not the case. ZX Basic creates machine code binaries, not BASIC programs for ZX Spectrum and they are very different. You should get rid of these tricks to achieve higher speed (i.e. the DEFADD trick I answered in another post).