LZ vs 2 line char$ differences

Use this section to showcase your programming examples. Or to ask members for programming suggestions
Post Reply
Daren
Posts: 58
Joined: Tue Jan 03, 2023 10:03 pm

LZ vs 2 line char$ differences

Post 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.
User avatar
Martin
Global Admin
Posts: 220
Joined: Mon Jan 02, 2023 5:18 pm

Re: LZ vs 2 line char$ differences

Post 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
Daren
Posts: 58
Joined: Tue Jan 03, 2023 10:03 pm

Re: LZ vs 2 line char$ differences

Post by Daren »

Thanks for clarifying Martin.
Post Reply