I trying to enter this program from a book by Tim Hartnell, but have come across an interesting problem. As you can see there's 2 - line 2's?!
Is this a typo?
Is this a typo?
Re: Is this a typo?
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Re: Is this a typo?
So how do I go about entering this into my zx?
I know how to get the line 0, but how do I get the 2 line 2's?
I know how to get the line 0, but how do I get the 2 line 2's?
Re: Is this a typo?
Hi,
You can't enter lines without poking the line data index.
You had to renum the type-ins lines or move extra lines:
Then Line 2 is protected from the LIST/EDIT command.
"LIST 2" will point to the first LET line.
You can't enter lines without poking the line data index.
You had to renum the type-ins lines or move extra lines:
Code: Select all
1 REM BLACKJACK
2 GOSUB 7999
3 LET B$="..."
7999 LET BET=100
8000 ...
9998 SAVE "BLACKJACK"
9999 RUN
"LIST 2" will point to the first LET line.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Re: Is this a typo?
I dryed to type it...
A RUN save the program, but stop after the "LET BET=100" command. (0/2)!
The gosub line can't be deleted, edited or launched.
It's a bug?
No...
Just move extra lines to the proper location, and the game will init the Variables.
The program can't launch the initialization routine. Before RUN, type "2 GOSUB 8000"
In fact, the GOSUB line is use to set all fixed variables (A$= card face) to set the VARS memory segment for the first launch.
RUN
BREAK (space)
DELETE 8000-9000
2 LET BET=100
GOTO 1 (to save the program and the variables memory room)
You had to delete all lines beatween 8000 to 9000 to free memory room.
But a RUN will clear the A$ values, and A$ will be lost.
The init process 8000 to 9000 is slow, and can be execute once.
This is why the author chose not to run this part of the program each time.
A RUN save the program, but stop after the "LET BET=100" command. (0/2)!
The gosub line can't be deleted, edited or launched.
It's a bug?

Just move extra lines to the proper location, and the game will init the Variables.
The program can't launch the initialization routine. Before RUN, type "2 GOSUB 8000"
In fact, the GOSUB line is use to set all fixed variables (A$= card face) to set the VARS memory segment for the first launch.
RUN
BREAK (space)
DELETE 8000-9000
2 LET BET=100
GOTO 1 (to save the program and the variables memory room)
You had to delete all lines beatween 8000 to 9000 to free memory room.
But a RUN will clear the A$ values, and A$ will be lost.
The init process 8000 to 9000 is slow, and can be execute once.
This is why the author chose not to run this part of the program each time.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)