Page 1 of 1

LZ vs 2 line char$ differences

Posted: Fri Mar 15, 2024 3:18 pm
by Daren
In the hardware section I mentioned connecting my LZ64 to my XP and transferring a OPL program from the LZ to the XP, obviously I translated it with XTRAN on LZ, and it worked just fine on the XP, almost…

The program was a modified version of my TALY snippet - a simple up down manual counter, and I had used arrow up and arrow down for the manual count, and used the relevant character $ to show these on screen. However on the XP these characters (arrow up, arrow down) are not shown correctly, and after checking the XP manual it seems that they are not part of the character set, yet strangely arrow left and right are. No bother, I just remapped to use arrow left and right, and displayed those on screen instead. That would have been the end of it, but then I went onto the COMMs program on the XP tools pak I got from Martin, and noticed that the up and down arrows are used on XP in that program :shock:

So I’m guessing they must either be undocumented but still available on XP or maybe UDGs were used to display them?

Anyway, I thought it was interesting so any comments welcome.

Re: LZ vs 2 line char$ differences

Posted: Sat Mar 16, 2024 3:17 am
by Martin
Hi Darren

Yes the XP arrows are UDG's... Here are the ones I use in (FindWord) be careful the udg routine only works on a CM/XP.

If you want to see them. Type in and translate the UDG: routine. Then the SetUDGs: (Translate) and finally type in translate an run the TestUDGs:

Code: Select all

TestUDGs:
LOCAL i%
i%=0
CLS
DO
PRINT CHR$(i%),
i%=i%+1
UNTIL i%=8
GET
RETURN

Code: Select all

SetUDGs:
udg:(0,0,10,0,0,17,14,0,0)
udg:(1,0,10,0,14,17,0,0,0)
udg:(2,0,10,0,2,4,8,0,0)
udg:(3,0,10,0,14,10,14,0,0)
udg:(4,4,14,21,4,4,4,4,0)
udg:(5,4,4,4,4,21,14,4,0)
udg:(6,4,14,21,4,21,14,4,0)
udg:(7,31,17,31,14,31,31,31,0)

Code: Select all

udg:(x%,a%,b%,c%,d%,e%,f%,g%,h%)
POKEB $180,64+x%*8
POKEB $181,a%
POKEB $181,b%
POKEB $181,c%
POKEB $181,d%
POKEB $181,e%
POKEB $181,f%
POKEB $181,g%
POKEB $181,h%

Sincerely Martin

Re: LZ vs 2 line char$ differences

Posted: Sat Mar 16, 2024 7:43 pm
by Daren
Thanks for clarifying Martin.