Again SVI-3x8

Page 5/6
1 | 2 | 3 | 4 | | 6

By Manuel

Ascended (13315)

Manuel's picture

13-03-2017, 22:19

Yeah, you need the latest build, as I just added that command to make a proper distinction between SVI and non-SVI.

I'll study your changes... Looks like the token list is not different after all?

By NYYRIKKI

Enlighted (4621)

NYYRIKKI's picture

13-03-2017, 22:40

Manuel wrote:

I'll study your changes... Looks like the token list is not different after all?

I added an offset to use the same table for both machines.

By Manuel

Ascended (13315)

Manuel's picture

13-03-2017, 23:26

Yeah, I just found out you compensate in line 111, right?

More questions:
- why the check on token being 0x00 in line 99? The for loop already stops if the token is 0x0000. Isn't that enough? Ah, I see it was already in the original code on line 129... but then:
- Wouldn't line 98 already output that 0x00 if it indeed matters? I suggest to put that line 98 beore line 105.
- Isn't the 'decode' variable actually a boolean flag to decode or not? But then I don't undestand you set it to '2' at some point... You start with '1' and do a "XOR 1" (so make it 0, right?) when you encounter a double quote. But why set it to 2 if you encounter a REM? How does it ever get back to 1 then?
- what's line 118 doing exactly?
- You only add the #, but not the !... but isn't that only happening in BASIC when the numbers are large enough? See screenshot:

- when testing on SVI, I got "INKEY$" instead of "SPRITE"...
- a ":" before a REM is not shown.

By NYYRIKKI

Enlighted (4621)

NYYRIKKI's picture

13-03-2017, 23:57

Manuel wrote:

Yeah, I just found out you compensate in line 111, right?
- when testing on SVI, I got "INKEY$" instead of "SPRITE"...

I tried, but it seems that there are even more differences... I made too many assumptions... it starts to look like we need two tables after all... I have to look deeper in to this some other time.

Quote:

- why the check on token being 0x00 in line 99? The for loop already stops if the token is 0x0000. Isn't that enough? Ah, I see it was already in the original code on line 129... but then:
- Wouldn't line 98 already output that 0x00 if it indeed matters? I suggest to put that line 98 beore line 105.

We try to break from "while {true}"
98 < 105 ?? What you mean?

Quote:

- Isn't the 'decode' variable actually a boolean flag to decode or not? But then I don't undestand you set it to '2' at some point... You start with '1' and do a "XOR 1" (so make it 0, right?) when you encounter a double quote. But why set it to 2 if you encounter a REM? How does it ever get back to 1 then?

Right... It will get back to 1 on start of next line... the XOR will not put it back to 1 anymore... and that is the whole trick.

Quote:

- what's line 118 doing exactly?
- a ":" before a REM is not shown.

Yes there was a bug, it is now fixed.

Quote:

- You only add the #, but not the !... but isn't that only happening in BASIC when the numbers are large enough? See screenshot:

Ah, didn't think of that... Fixd, please download again.

By NYYRIKKI

Enlighted (4621)

NYYRIKKI's picture

14-03-2017, 00:09

Quote:
Quote:

- why the check on token being 0x00 in line 99? The for loop already stops if the token is 0x0000. Isn't that enough? Ah, I see it was already in the original code on line 129... but then:
- Wouldn't line 98 already output that 0x00 if it indeed matters? I suggest to put that line 98 beore line 105.

We try to break from "while {true}"
98 < 105 ?? What you mean?

Ah, now I understand... I output 0x0 instead of ""... but if I move the routine I duplicate last output, so even worse... adding set t "" is needed. (Updated)

By Manuel

Ascended (13315)

Manuel's picture

14-03-2017, 00:15

Does this version gets the numbers from that screenshot right in all cases? E.g. line 40? No E... still a #.

By NYYRIKKI

Enlighted (4621)

NYYRIKKI's picture

14-03-2017, 00:53

I'm pretty sure it does... (I think you got the logic upside down in your head)

By Manuel

Ascended (13315)

Manuel's picture

14-03-2017, 22:19

Also fun: type in BASIC:
10 A=1E-4
LIST in BASIC:
10 A=1E-04
listing script output:
10 A=0.0001

By NYYRIKKI

Enlighted (4621)

NYYRIKKI's picture

15-03-2017, 12:04

Ok you win... It is not 100% Smile but I'm not planning to fix it since TCL has no parameter for that. Smile

By Manuel

Ascended (13315)

Manuel's picture

15-03-2017, 23:03

It doesn't? Did you check for 'scientific notation' in the format command? Smile

Page 5/6
1 | 2 | 3 | 4 | | 6
My MSX profile