Page 1 of 1

ZX81 Program query.

Posted: Thu Oct 06, 2011 7:11 pm
by spilldig
Don't know if anyone can help on this one ?
I am trying to write the first part of a programme which starts
0 rem etc etc etc val print etc etc etc
The problem being that the line just carries on but the print commands only normally come on at the start of a newline,so how do they get the print commands on part way through one line ?

Any help would be gratefully appreciated.

Re: ZX81 Program query.

Posted: Thu Oct 06, 2011 8:28 pm
by zx80nut
Hi.
What you are seeing is "embeded" machine code that has been entered into a program via a loader, and not using the keyboard.

Normally, when a program is entered you create the first line such as
1 REM 0000000000000000000000

Then, the program (say, in a magazine) would then have a loader routine which is run to poke the machine code values into this REM statement.
When listed, the BASIC interpreter sees the control characters, some of which are BASIC reserved words and converts the poked code to a BASIC keyword, which is meaningless to read.

So, you don't enter those keywords directly, but poke in the values that are listed elsewhere.
If you are just looking at an existing listing after the pokes have taken place, then it is not possible to directly type it back in as you see it. You will need to poke the bytes as originally done.

Regards.

Grant.

Re: ZX81 Program query.

Posted: Thu Oct 06, 2011 8:41 pm
by RWAP
Yes - Grant is correct here - if you don't have the machine code loader, then you are lost, as various characters will not display correctly in the REMark statement either, such as CHR$(67) to CHR$(111) so ther is no way of knowing what the original byte value was.

Re: ZX81 Program query.

Posted: Thu Oct 06, 2011 8:43 pm
by siggi
To get the keyword "PRINT" somewhere in the middle of a REM line, you could also enter first the keyword THEN (SHIFT 3). After the keyword "THEN" the keyword "PRINT" could be entered just like at the beginning of a line. Then go back to the keyword THEN, delete it, and you have what you want ...

Siggi

Re: ZX81 Program query.

Posted: Thu Oct 06, 2011 8:48 pm
by RWAP
Hee hee - yes, that would work, but what about the unprintable characters? It all depends what the poster is trying to achieve :D

Re: ZX81 Program query.

Posted: Fri Oct 07, 2011 5:02 pm
by spilldig
Thank's to you all for the replies to this one.
I will have a look to see if a machine code loader is in there first.