[ASM-ZX81] How to retrieve a floating-point value from ASM.

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
David G
Posts: 387
Joined: Thu Jul 17, 2014 7:58 am
Location: 21 North, 156 West

Re: [ASM-ZX81] How to retrieve a floating-point value from ASM.

Post by David G »

XavSnap wrote: Thu Jul 14, 2022 3:25 pmThe variable isn't set !
Before the "LET P=." the "P" value isn't set... and can't be viewed in the Vars memory room.
A PRINT P; , will give a 2/0 error report.

But, but the ROM call use a blank variable name ghosted in the Vars the keep it in memory
I am not understanding

If i enter

Code: Select all

LET P=.
then enter

Code: Select all

PRINT P
It prints 0 as expected

Does this not mean that the variable has been added by name ('P') to the
Variables zone of memory? What is meant by "ghosted" name?
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: [ASM-ZX81] How to retrieve a floating-point value from ASM.

Post by XavSnap »

Hi David,

Ghosted in the BASIC, not in the Vars if the LET command is not RUN.

Code: Select all

10 LET P=.
20 PRINT P
BASIC:
letp1.JPG
VARS after a RUN
letp2.JPG
$75= "P" character + bit 6 (+64) .
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
David G
Posts: 387
Joined: Thu Jul 17, 2014 7:58 am
Location: 21 North, 156 West

Re: [ASM-ZX81] How to retrieve a floating-point value from ASM.

Post by David G »

OK, your explanation makes sense. "ghosted" = "hidden" floating-point value. In the BASIC line it is ghosted. Yes

And when the LET statement is RUN, the BASIC system copies it from there to the Variables memory area/zone/room/place
Attachments
fig27_1.jpg
Post Reply