Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Best way to put UDG in my program ?
#3
Hi Boriel, thanks for the help first of all. It's very strange what's going on. This is what I originally had in my program. For the UDGs
I put this in at the start of my BASIC listing
Code:
ASM

LD HL, 65368
LD DE, DATA
LD B,56      <-- I have 7 characters
LOOP:
LD A,(DATA)
LD (HL),A
INC HL
INC DE
DEC B
JR NZ,LOOP
DATA:
DEFB udg 1
DEFB udg 2
etcc...

END ASM
This causes the Speccy show me a black screen when I run it or It crashes, If I change the B to 32 and only have 4 udgs everything is fine! I tried the example you mention from SNAKE.BAS and something else strange happens. Line goes like this for
7 udg chars
DIM udg(6,7) AS UINTEGER =>{{UDG1},{UDG2},...{UDG7}}
POKE UINTEGER 23675,@udg(0,0)
when I tried this in my program all the graphics looked weird as if every second row was drawn but the program didn't crash.
What do you guys use for debugging btw? I just tend to delete lines till works again or do lots of PRINT statements Big Grin
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)