Reverse and inverse scrolly.

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
Post Reply
Shaun_B
Posts: 474
Joined: Wed Apr 22, 2009 10:22 am

Reverse and inverse scrolly.

Post by Shaun_B »

Hi guys,

Here's a way of reversing a string (I put a method of inversing the characters as well in there):
zx81day.png
zx81day.png (14.16 KiB) Viewed 3031 times
To inverse each character, you can do it in one line, link this:

Code: Select all

LET A=CODE A$(X)+(128*(CODE A$(X)<=127))-(128*(CODE A$(X)>=128))
Then you simply:

Code: Select all

LET MYSTR$=MYSTR$+CHR$ A
Thanks to Dr Beep for help.

The assembly at the top is Bean's disable break routine here.

Regards,

Shaun.
Last edited by Shaun_B on Mon Mar 06, 2017 6:41 pm, edited 1 time in total.
User avatar
XavSnap
Posts: 1941
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: Reverse and inverse scrolly.

Post by XavSnap »

Thanks to Dr Beed for help.
Dr Beep!
:D

ASM reversed chars.:

Code: Select all

http://www.sinclairzxworld.com/viewtopic.php?f=5&t=2239
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Shaun_B
Posts: 474
Joined: Wed Apr 22, 2009 10:22 am

Re: Reverse and inverse scrolly.

Post by Shaun_B »

I'm generally only interested in high level languages but thanks for the hint.

If I knew anything about low-level stuff I would suggest a simple OR would convert normal ZX81 chars to inversed equivalent, but I don't.

Regards,

Shaun.
User avatar
XavSnap
Posts: 1941
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: Reverse and inverse scrolly.

Post by XavSnap »

:?
Ok!
Sorry form my low-level.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Shaun_B
Posts: 474
Joined: Wed Apr 22, 2009 10:22 am

Re: Reverse and inverse scrolly.

Post by Shaun_B »

No problems with low level, I just don't get it really, so sorry for my dumbness.

Regards,

Shaun.
Post Reply