There is a facility in Eighty One to do this by dragging and dropping the text file into the display area of Eighty One but it reports your file as being to large to parse and your dimension statement looks too big as it reports out of memory with just 100 lines of code when run even with a 48k RAM chosen from the menu.
For example here are the first 100 lines of your program.
Jotto
Re: Jotto
Just ask "ENTER THE FIRST LETTER OF THE WORD WHAT I HAD TO GUESS:"
INPUT A$
LOAD A$
26x16kb= 416kb !
Just ask "ENTER THE SECOND LETTER OF THE WORD WHAT I HAD TO GUESS:"
Avoid to waste time.
And you had to erase all lines and type a GOTO to keep string values.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
- 1024MAK
- Posts: 5118
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
Re: Jotto
To use the maximum RAM for BASIC when using more than 16K bytes, you need to do:
The above values assume you have RAM all the way up to 65535 (48K or 64K of RAM).
The above POKEs and NEW puts the system variable (called RAMTOP) to point to the very top of the Z80’s memory range.
Only then enter your code.
However, just dimensioning the array alone will use up more than 44K bytes of RAM…
I think you need to use a ZX Spectrum 128, +2 or +3, or maybe a QL for this idea… Even then, with the 128K versions of the Spectrum, you will need to use some trickery with the bank switching of RAM…
Mark
Code: Select all
POKE 16388,255
POKE 16389,255
NEW
The above POKEs and NEW puts the system variable (called RAMTOP) to point to the very top of the Z80’s memory range.
Only then enter your code.
However, just dimensioning the array alone will use up more than 44K bytes of RAM…
I think you need to use a ZX Spectrum 128, +2 or +3, or maybe a QL for this idea… Even then, with the 128K versions of the Spectrum, you will need to use some trickery with the bank switching of RAM…
Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Looking forward to summer later in the year.
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Looking forward to summer later in the year.
Re: Jotto
You can use http://freestuff.grok.co.uk/zxtext2p/
But your program shows the error "program too big!"
Re: Jotto
Hi Mark & alvacam ,
The big text file can be compress to 28kb (PuCrunch and Zx7) in a single REM.
But, we had to stream all words to compare them to user choice.
The better way to "compress" it is to encode them in letters groups..
A byte for the first group "xxx" and a byte for the last group "xx" (256 ID per group = 65536 words in 512 bytes +"aaa"*? +"aa"*?)
In 10kb, around 5000 word + 2kb for the matrix string + 4 Kb for BASIC/ASM decoding...
A 16 kb RAM PACK can do that... but we had to encode the words array.
Better code multigame to validate the word... like a classic hangman.
The big text file can be compress to 28kb (PuCrunch and Zx7) in a single REM.
But, we had to stream all words to compare them to user choice.
The better way to "compress" it is to encode them in letters groups..
A byte for the first group "xxx" and a byte for the last group "xx" (256 ID per group = 65536 words in 512 bytes +"aaa"*? +"aa"*?)
In 10kb, around 5000 word + 2kb for the matrix string + 4 Kb for BASIC/ASM decoding...
A 16 kb RAM PACK can do that... but we had to encode the words array.
Better code multigame to validate the word... like a classic hangman.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Re: Jotto
While you are thinking about the ridiculous size, I loaded the new 9000+ word version on my IBM XT. While the computer was sorting out it's first guess, I went to bed. It wasn't done when i woke up, but it finally had it worked out after I got my coffee, showered and got dressed. It's 9:30 pm here now and we're now on turn 3. So exhilarating!
-sanello
Re: Jotto
Hi Sanello,
Don't read all words in the file with INPUT# or LINE INPUT#...
All your words have a fixe length (5 characters).
You should use the Random Access File process.
You had to pick up all lines and write it in a fixe dedicated file.
It will avoid reading lines to get the word ID, you will be able to target a randomized word ID)
http://www.antonis.de/qbebooks/gwbasman ... r%205.html
Write;
Read:
But you had to convert the text file in a "A" to "R" setup and open both files to read and write data.
|EDIT
While the converting process, print the ID for the first A, the first B ...
It will be helpful to only check a character from A to B, if the A character is check.
Or stop the scan if the CHR$ value is up to the checked value.
If "U"=1200 and "V"=1300, scan the ID between 1200 & 1300.
Store these values in a text file with 26 values (A=first value...)
Don't read all words in the file with INPUT# or LINE INPUT#...
All your words have a fixe length (5 characters).
You should use the Random Access File process.
You had to pick up all lines and write it in a fixe dedicated file.
It will avoid reading lines to get the word ID, you will be able to target a randomized word ID)
http://www.antonis.de/qbebooks/gwbasman ... r%205.html
Where CODE% is the word ID, it GET the cluster and set the field targeted by a (RND*9000)+140 GET #1, CODE%
50 PRINT N$
Write;
Code: Select all
5 Test$="ABCDE"
6 CODE%=1
10 OPEN "R",#1,"INFOFILE",32
20 FIELD #1, 5 AS N$
25 LSET N$=Test$
30 PUT #1, CODE%
60 CLOSE #1
Code: Select all
6 CODE%=1
10 OPEN "R",#1,"INFOFILE",32
20 FIELD #1, 5 AS N$
40 GET #1, CODE%
50 PRINT N$; " IS your word."
60 CLOSE #1
|EDIT
While the converting process, print the ID for the first A, the first B ...
It will be helpful to only check a character from A to B, if the A character is check.
Or stop the scan if the CHR$ value is up to the checked value.
If "U"=1200 and "V"=1300, scan the ID between 1200 & 1300.
Store these values in a text file with 26 values (A=first value...)
Xavier ...on the Facebook groupe : "Zx81 France"(fr)