02-13-2011, 10:44 AM
UDG creation is slightly different than in Sinclair BASIC. For compatibility's sake you can use POKE USR "a" and so on to create UDG, but there is a better way:
You can create a big array with your UDG data a then poke 23675 to the array address using the @ operator. E.g.:
Now you can PRINT UDG "A" using PRINT "\A". This syntax is the same ZX Basin uses.
More info on PRINTing UDG and Graphics here: <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Syntax">http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Syntax</a><!-- m -->
You can create a big array with your UDG data a then poke 23675 to the array address using the @ operator. E.g.:
Code:
10 UDGData => {0,255,0,255,0,255,0,255,0}: REM 8 bytes
20 POKE Uinteger 23675, @UDGData(0) : REM Poke UDG system variable with address of 1st element
More info on PRINTing UDG and Graphics here: <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Syntax">http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Syntax</a><!-- m -->