Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
-
Shaun_B
- Posts: 451
- Joined: Wed Apr 22, 2009 10:22 am
Post
by Shaun_B » Sat Jan 20, 2018 7:11 pm
This routine works with most characters; it uses A$ as the string to be output in inverse characters, as follows:
Code: Select all
10 LET A$="DONKEYSOFT MMXVIII ZX80 4K ROM"
20 GO SUB 1000
30 STOP
1000 REM INVERSE ROUTINE
1001 PRINT CHR$(CODE(A$)+128);
1002 LET A$=TL$(A$)
1003 IF NOT A$="" THEN GO TO 1001
1004 PRINT
1005 RETURN
Enjoy 4K ROM BASIC
Shaun.
-
vwbz80a
- Posts: 31
- Joined: Wed Nov 29, 2017 2:35 pm
Post
by vwbz80a » Wed Jan 24, 2018 3:01 pm
Shaun_B wrote: ↑Sat Jan 20, 2018 7:11 pm
This routine works with most characters; it uses A$ as the string to be output in inverse characters, as follows:
Code: Select all
10 LET A$="DONKEYSOFT MMXVIII ZX80 4K ROM"
20 GO SUB 1000
30 STOP
1000 REM INVERSE ROUTINE
1001 PRINT CHR$(CODE(A$)+128);
1002 LET A$=TL$(A$)
1003 IF NOT A$="" THEN GO TO 1001
1004 PRINT
1005 RETURN
Enjoy 4K ROM BASIC
Shaun.
Shaun,
1002 LET A$=TL$(A$)
Does not run on my TS 1000.
What do you think is the problem?

-
Moggy
- Posts: 1874
- Joined: Wed Jun 18, 2008 2:00 pm
Post
by Moggy » Wed Jan 24, 2018 3:35 pm
It's ZX80 BASIC not ZX81/TS1000 BASIC which lacks the TLS function.
-
vwbz80a
- Posts: 31
- Joined: Wed Nov 29, 2017 2:35 pm
Post
by vwbz80a » Wed Jan 24, 2018 3:46 pm
trying to edit 1002 in EightyOne :
i get
1002 LET A$=TL ["S"] $(A$) [L]

-
vwbz80a
- Posts: 31
- Joined: Wed Nov 29, 2017 2:35 pm
Post
by vwbz80a » Wed Jan 24, 2018 4:11 pm
Moggy wrote: ↑Wed Jan 24, 2018 3:35 pm
It's ZX80 BASIC not ZX81/TS1000 BASIC which lacks the TLS function.
Moogy,
thanks, will save me time..

-
vwbz80a
- Posts: 31
- Joined: Wed Nov 29, 2017 2:35 pm
Post
by vwbz80a » Wed Jan 24, 2018 4:35 pm
well, what do you know it does run......... on a zx80!!!!

-
Shaun_B
- Posts: 451
- Joined: Wed Apr 22, 2009 10:22 am
Post
by Shaun_B » Wed Jan 24, 2018 9:50 pm
Hi,
Yes, it's much easier to produce inversed characters on the Sinclair ZX81 so this is for the ZX80 only. However, if you want to inverse a string from an un-inversed string in ZX81, the principles are about the same (take the character code and add 128 to it).
Thanks,
Shaun.
-
vwbz80a
- Posts: 31
- Joined: Wed Nov 29, 2017 2:35 pm
Post
by vwbz80a » Wed Jan 24, 2018 10:52 pm
Shaun_B wrote: ↑Wed Jan 24, 2018 9:50 pm
Hi,
Yes, it's much easier to produce inversed characters on the Sinclair ZX81 so this is for the ZX80 only. However, if you want to inverse a string from an un-inversed string in ZX81, the principles are about the same (take the character code and add 128 to it).
Thanks,
Shaun.
Thumbs up Shaun.