REM Statement

Post Reply
EdToo
Posts: 8
Joined: Mon Dec 18, 2023 2:12 pm

REM Statement

Post by EdToo »

Sorry if this has been asked before couldn't find an answer in the search box.

I'm playing with the Lambda 8300 emulator in Eighty One and notice that if I type for example

REM MORE MORE MORE

All the spaces are stripped out, and the OR is recorded as the keyword OR. Is this an emulator quirk, or does a real Lambda 8300 behave the same way?

I'm trying to generate Lambda compatible files, but they failed to load as I was treating REM statements like a ZX81 does.

Edit, just discovered if I change the ROM to Lambda 8300 it works correctly, it is the Lambda Colour ROM that messes up.
User avatar
mrtinb
Posts: 2004
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: REM Statement

Post by mrtinb »

The Lambda 8300 is different than ZX81 when it comes to input of code. ZX81 can only input commands from a single keypress. You cannot enter e.g. PRINT as P R I N T. The Lambda behaves differently here, as every command is spelled out. That means it has an interpreter that recognizes words like OR inside a word. When words are recognized it is translated into a keyword, and is stored in memory as a keyword.
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
User avatar
XavSnap
Posts: 2193
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.
Contact:

Re: REM Statement

Post by XavSnap »

Hi,

Try to enter : 10 PRINT "MORE MORE MORE"
And change the PRINT token to REM.
10 REM "MORE MORE MORE"

I don't know if EDIT change the line.

[EDIT]10 REM "MORE" seem ok. (without poking the BASIC command)
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
stroebeljc
Posts: 114
Joined: Thu Apr 23, 2020 6:02 am
Location: Minneapolis, MN

Re: REM Statement

Post by stroebeljc »

Interesting finding on the different Lambda ROM behaviors. This must be the way the real hardware works, as EO doesn't do anything special with the different ROM versions. It just loads the ROM file and runs it. I don't know about the pedigree of the ROM itself, but the colour version matches the ROM images pointed to here.
John
User avatar
mrtinb
Posts: 2004
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: REM Statement

Post by mrtinb »

The first version of the ROM without color support was more similar to the ZX81. However the second version of the ROM added color support, and rearranged a lot of the code, because they got sued by Sinclair for copying their code.

As you will see in the link below, the RST calls in the first version of the ROM is similar to the ZX81.

https://sinclairzxworld.com/viewtopic.php?f=16&t=3131
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
christoph
Posts: 16
Joined: Sun Mar 27, 2022 1:32 pm
Location: Oschersleben

Re: REM Statement

Post by christoph »

When I wanted a readable Rem Statement you can do also the following
10 REM (Graphics mode) <type your text here>
also
10 REM " <type your text here> " works without overwriting the PRINT statement
then everything is parsed by BASIC as you want it to be :D
Post Reply