Good..
This is becoming a reference wiky
ZX80 comparators with negative ressults...
Re: ZX80 comparators with negative ressults...
Ernesto
ZX80 USA, ZX81UK, ZX Spectrum, ZX Spectrum+, ZX Spectrum 128+ UK, ZX Spectrum +2/A, Sinclair QL, CZ1000, CZ1500, CZ2000, CZ1000Plus, CZ1500Plus, CZ Spectrum, CZ Spectrum Plus, TK83, TK85, TK90X, TK95. TS2068. And more to come
ZX80 USA, ZX81UK, ZX Spectrum, ZX Spectrum+, ZX Spectrum 128+ UK, ZX Spectrum +2/A, Sinclair QL, CZ1000, CZ1500, CZ2000, CZ1000Plus, CZ1500Plus, CZ Spectrum, CZ Spectrum Plus, TK83, TK85, TK90X, TK95. TS2068. And more to come
- 1024MAK
- Posts: 5332
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
Re: ZX80 comparators with negative ressults...
As expected, both a Radio Shack TRS-80 Model 100 Portable computer running Microsoft BASIC. And an Amstrad NC200 computer running Z80 BBC BASIC (by R.T.Russel), produce the same results as Microsoft BASIC on a Commodore 64 or PET and Acorn 6502 BASIC.
Mark
Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Autumn is here. Bye bye summer 2024...
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Autumn is here. Bye bye summer 2024...
Re: ZX80 comparators with negative ressults...
I assume it's because false is all bits zero #00000000 = 0.
And it's true if all bits are one #11111111 = -1.
And it's true if all bits are one #11111111 = -1.
- 1024MAK
- Posts: 5332
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
Re: ZX80 comparators with negative ressults...
When using Integer variables and where OR and AND are bit wise operators, yes.
Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Autumn is here. Bye bye summer 2024...
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Autumn is here. Bye bye summer 2024...
Re: ZX80 comparators with negative ressults...
I know this is about BASIC comparators but just as pointer for anyone using older versions of Toddy Forth it should be noted that whilst true is represented by -1 in these versions, the new Toddy Forth 79 represents true as 1 as does FIF81 and is not an error on these Forths' part.