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
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:
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
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).
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).