From
Southern Bear
→
To
All
16 September 2006
Hello, Jukov
ld HL,#0014
ld (#5C42),HL
ld A,1
ld (#5C44),A
From
Southern Bear
→
To
All
16 September 2006
Hello, Jukov
ld HL,#0014
ld (NEW_PPC),HL
ld A,1
ld (NS_PPS),A
From
Southern Bear
→
To
All
16 September 2006
Hello, Darkman007
kind of pretending
From
Southern Bear
→
To
All
16 September 2006
Hello, Jukov
Nobody guessed. Do you really think that I wrote here without checking?
File: next_ln0.PNG http://zx.pk.ru/attachment.php?attachmentid=3783
File: next_ln1.PNG http://zx.pk.ru/attachment.php?attachmentid=3784
From
Vladimir Tugai
→
To
All
16 September 2006
Hello Southern Bear
What, do you think they are so smart? :biggrin:
From
Konstantin Zhukov
→
To
All
16 September 2006
Hello Southern Bear
}{a-ha-ha. Well, you guessed wrong. In fact, you only need to change one variable -
CHADD 23645 (this points to the next character to be interpreted). It is necessary
so that it points to the carriage return character on line 20. Then everything will be
tip-top.
From
Konstantin Zhukov
→
To
All
16 September 2006
Hello Southern Bear
Thank you. Found an error. The problem was that I had to write
a universal procedure - so that when calling it from any line, the transition will be to
next line. My first option was:
ld hl,(#5c42)
inc hl
ld (#5c42),hl
xor a
ld (#5c44),a
ret
But as it turned out now, the variable 5C42 did not contain the line number with
RANDOMIZE, and the line number from which the program was launched. Therefore several
times the second line of the program was executed. Correct:
ld hl,(#5c45)
inc hl
ld (#5c42),hl
ld a,1
ld (#5c44),a
ret
From
Georgy Rossinsky
→
To
All
1 October 2006
Hello, Jukov
Juk> Let's say we have two lines:
Juk> 1 PRINT "AAAA"
Juk> 5 PRINT "BBBB"
Juk> 10 RANDOMIZE USR 30000; PRINT; "A"
Juk> 20 PRINT "B"
Juk>
Juk> At address 30000 you need to place a procedure that would transmit
Juk> control immediately to line 20. I tried increasing it by one
Juk> system variable NEW PPC, and PPC to zero. But for some reason
Juk> line 5 was executed several times, although there was no hint of a loop even
Juk> no. I tried it through 1B7D, as described in ZX/Review 94/2, but the same
Juk> glitch.
Look at any of my loaders.
http://zxaaa.untergrund.net/RIP.html
There, the defense is rich on the topic of transition in BASIC between lines, operators and
RETURN.
For example, performing BASIC after REM
Everything is achieved by substituting system variables and addresses on the RETURN stack.