ZX81 Program query.

Frequently Asked Questions about the Sinclair ZX81
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!
Post Reply
spilldig
Posts: 12
Joined: Fri Oct 08, 2010 7:20 pm

ZX81 Program query.

Post by spilldig » Thu Oct 06, 2011 6:11 pm

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.

zx80nut
Posts: 107
Joined: Mon May 23, 2011 1:10 pm
Location: A bit north of Cardiff, Wales.
Contact:

Re: ZX81 Program query.

Post by zx80nut » Thu Oct 06, 2011 7:28 pm

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.

RWAP
Site Admin
Posts: 1235
Joined: Thu May 08, 2008 7:42 am
Location: Stoke-on-Trent, UK
Contact:

Re: ZX81 Program query.

Post by RWAP » Thu Oct 06, 2011 7:41 pm

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.

User avatar
siggi
Posts: 773
Joined: Thu May 08, 2008 8:30 am
Location: Dauernheim, Germany
Contact:

Re: ZX81 Program query.

Post by siggi » Thu Oct 06, 2011 7:43 pm

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
My ZX81 web-server: online since 2007
http://zx81-siggi.endoftheinternet.org/index.html

RWAP
Site Admin
Posts: 1235
Joined: Thu May 08, 2008 7:42 am
Location: Stoke-on-Trent, UK
Contact:

Re: ZX81 Program query.

Post by RWAP » Thu Oct 06, 2011 7:48 pm

Hee hee - yes, that would work, but what about the unprintable characters? It all depends what the poster is trying to achieve :D

spilldig
Posts: 12
Joined: Fri Oct 08, 2010 7:20 pm

Re: ZX81 Program query.

Post by spilldig » Fri Oct 07, 2011 4:02 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest