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.
ZX81 Program query.
Forum rules
This is designed to be a simple set of questions and answers - please no general chit chat in here - keep it focused to help new users!
This is designed to be a simple set of questions and answers - please no general chit chat in here - keep it focused to help new users!
-
- Posts: 108
- Joined: Mon May 23, 2011 2:10 pm
- Location: A bit north of Cardiff, Wales.
- Contact:
Re: ZX81 Program query.
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.
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.
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.
Rich Mellor
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module
Also Involved in:
Icephorm
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module
Also Involved in:
Icephorm
Re: ZX81 Program query.
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
Siggi
My ZX81 web-server: online since 2007, running since dec. 2020 using ZeddyNet hardware
http://zx81.ddns.net/ZxTeaM
http://zx81.ddns.net/ZxTeaM
Re: ZX81 Program query.
Hee hee - yes, that would work, but what about the unprintable characters? It all depends what the poster is trying to achieve ![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
Rich Mellor
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module
Also Involved in:
Icephorm
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module
Also Involved in:
Icephorm
Re: ZX81 Program query.
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.
I will have a look to see if a machine code loader is in there first.