Page 1 of 1

ZX80 4K ROM inverse characters

Posted: Sat Jan 20, 2018 7:11 pm
by Shaun_B
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.

Re: ZX80 4K ROM inverse characters

Posted: Wed Jan 24, 2018 3:01 pm
by vwbz80a
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?
:?: :P

Re: ZX80 4K ROM inverse characters

Posted: Wed Jan 24, 2018 3:35 pm
by Moggy
It's ZX80 BASIC not ZX81/TS1000 BASIC which lacks the TLS function.

Re: ZX80 4K ROM inverse characters

Posted: Wed Jan 24, 2018 3:46 pm
by vwbz80a
trying to edit 1002 in EightyOne :
i get 1002 LET A$=TL ["S"] $(A$) [L]

:roll: :cry:

Re: ZX80 4K ROM inverse characters

Posted: Wed Jan 24, 2018 4:11 pm
by vwbz80a
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.. :lol:

Re: ZX80 4K ROM inverse characters

Posted: Wed Jan 24, 2018 4:35 pm
by vwbz80a
well, what do you know it does run......... on a zx80!!!! :lol: :lol:

Re: ZX80 4K ROM inverse characters

Posted: Wed Jan 24, 2018 9:50 pm
by Shaun_B
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.

Re: ZX80 4K ROM inverse characters

Posted: Wed Jan 24, 2018 10:52 pm
by vwbz80a
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.