<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[Boriel Basic Forum - Wishlist]]></title>
		<link>https://forum.boriel.com/</link>
		<description><![CDATA[Boriel Basic Forum - https://forum.boriel.com]]></description>
		<pubDate>Tue, 30 Jun 2026 16:45:21 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[Exit from more than one level]]></title>
			<link>https://forum.boriel.com/showthread.php?tid=2623</link>
			<pubDate>Fri, 18 Apr 2025 14:50:07 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.boriel.com/member.php?action=profile&uid=2327">Zoran</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.boriel.com/showthread.php?tid=2623</guid>
			<description><![CDATA[Sometimes we need exit not only from innermost loop, but also from some outer loop (sometimes more than two levels).<br />
<br />
As a workaround I use "do" in the outer loop and "while 1" in the inner, just to be able to use "exit do" or "exit while":<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>do
   ' some code
   while 1
      ' some code

      if somecondition then
         exit do ' exit from two levels
      end if

      ' some code...
      if someothercondition then
         exit while ' exit inner loop only
      end if

      ' some code...
   end while

    ' some code...
loop</code></div></div><br />
When exit from more than two levels is needed, there is no other way but to put a label and use "goto". It would be much more elegant if we could exit from more levels directly. For example, "exit do do" or "exit do do do" would exit from two or three levels of "do". I'm not sure that "exit for for for" or "exit while while" is needed; supporting "do" loop only is probably quite enough -- "do" loop is the most powerful and you can easily write any loop as a "do" loop.<br />
<br />
What do you think?]]></description>
			<content:encoded><![CDATA[Sometimes we need exit not only from innermost loop, but also from some outer loop (sometimes more than two levels).<br />
<br />
As a workaround I use "do" in the outer loop and "while 1" in the inner, just to be able to use "exit do" or "exit while":<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>do
   ' some code
   while 1
      ' some code

      if somecondition then
         exit do ' exit from two levels
      end if

      ' some code...
      if someothercondition then
         exit while ' exit inner loop only
      end if

      ' some code...
   end while

    ' some code...
loop</code></div></div><br />
When exit from more than two levels is needed, there is no other way but to put a label and use "goto". It would be much more elegant if we could exit from more levels directly. For example, "exit do do" or "exit do do do" would exit from two or three levels of "do". I'm not sure that "exit for for for" or "exit while while" is needed; supporting "do" loop only is probably quite enough -- "do" loop is the most powerful and you can easily write any loop as a "do" loop.<br />
<br />
What do you think?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[String functions]]></title>
			<link>https://forum.boriel.com/showthread.php?tid=2581</link>
			<pubDate>Fri, 13 Dec 2024 21:15:55 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.boriel.com/member.php?action=profile&uid=2201">baltasarq</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.boriel.com/showthread.php?tid=2581</guid>
			<description><![CDATA[I've found myself writing these functions:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>' Duplicates the string for times times.
' For instance, MultiPlyStr( "0", 3 ) ' -&gt; "000"
' times must be between 1 and 127
function MultiplyStr(ByVal s as string, ByVal times as byte) as string
    dim toret as string = ""
    
    if times &gt; 0
        for i = 1 to times
            toret = toret + s
        next
    end if
    
    return toret
end function


' Returns a formatted string with the number n
' and enough preceding chars (the ch parameter),
' so that the length of the string is w or more.
' for instance, FormatStr(15, 4, "0") ' -&gt; "0015"
' w must be between 1 and 127.
function FormatStr(ByVal n as integer, ByVal w as byte, ByVal ch as string) as string
    dim toret as string = str( n )
    dim len_prefix as byte = w - len( toret )
    
    return MultiplyStr( ch( 0 ), len_prefix ) + toret
end function


sub testMultiplyStr()
    print("'0' * -1: '" + MultiplyStr("0", -1) + "'")
    print("'0' * 0: '" + MultiplyStr("0", 0) + "'")
    print("'0' * 1: '" + MultiplyStr("0", 1) + "'")
    print("'0' * 2: '" + MultiplyStr("0", 2) + "'")
    print("'0' * 3: '" + MultiplyStr("0", 3) + "'")
    print("'0' * 4: '" + MultiplyStr("0", 4) + "'")
    print("'0' * 5: '" + MultiplyStr("0", 5) + "'")
end sub

sub testFormatStr()
    print("fmt(1, '0', -1): '" + FormatStr(1, -1, "0") + "'")  
    print("fmt(1, '0',  0): '" + FormatStr(1, 0, "0") + "'")  
    print("fmt(1, '0',  1): '" + FormatStr(1, 1, "0") + "'")
    print("fmt(1, '0',  2): '" + FormatStr(1, 2, "0") + "'")
    print("fmt(1, '0',  3): '" + FormatStr(1, 3, "0") + "'")
end sub</code></div></div>Would it be of interest to incorporate <span style="font-style: italic;" class="mycode_i">MultiplyStr()</span> and <span style="font-style: italic;" class="mycode_i">FormatStr()</span> to ZXBasic?<br />
I can prepare a PR if there is interest.]]></description>
			<content:encoded><![CDATA[I've found myself writing these functions:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>' Duplicates the string for times times.
' For instance, MultiPlyStr( "0", 3 ) ' -&gt; "000"
' times must be between 1 and 127
function MultiplyStr(ByVal s as string, ByVal times as byte) as string
    dim toret as string = ""
    
    if times &gt; 0
        for i = 1 to times
            toret = toret + s
        next
    end if
    
    return toret
end function


' Returns a formatted string with the number n
' and enough preceding chars (the ch parameter),
' so that the length of the string is w or more.
' for instance, FormatStr(15, 4, "0") ' -&gt; "0015"
' w must be between 1 and 127.
function FormatStr(ByVal n as integer, ByVal w as byte, ByVal ch as string) as string
    dim toret as string = str( n )
    dim len_prefix as byte = w - len( toret )
    
    return MultiplyStr( ch( 0 ), len_prefix ) + toret
end function


sub testMultiplyStr()
    print("'0' * -1: '" + MultiplyStr("0", -1) + "'")
    print("'0' * 0: '" + MultiplyStr("0", 0) + "'")
    print("'0' * 1: '" + MultiplyStr("0", 1) + "'")
    print("'0' * 2: '" + MultiplyStr("0", 2) + "'")
    print("'0' * 3: '" + MultiplyStr("0", 3) + "'")
    print("'0' * 4: '" + MultiplyStr("0", 4) + "'")
    print("'0' * 5: '" + MultiplyStr("0", 5) + "'")
end sub

sub testFormatStr()
    print("fmt(1, '0', -1): '" + FormatStr(1, -1, "0") + "'")  
    print("fmt(1, '0',  0): '" + FormatStr(1, 0, "0") + "'")  
    print("fmt(1, '0',  1): '" + FormatStr(1, 1, "0") + "'")
    print("fmt(1, '0',  2): '" + FormatStr(1, 2, "0") + "'")
    print("fmt(1, '0',  3): '" + FormatStr(1, 3, "0") + "'")
end sub</code></div></div>Would it be of interest to incorporate <span style="font-style: italic;" class="mycode_i">MultiplyStr()</span> and <span style="font-style: italic;" class="mycode_i">FormatStr()</span> to ZXBasic?<br />
I can prepare a PR if there is interest.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[From Forum]]></title>
			<link>https://forum.boriel.com/showthread.php?tid=2528</link>
			<pubDate>Thu, 07 Dec 2023 14:54:05 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.boriel.com/member.php?action=profile&uid=207">zarsoft</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.boriel.com/showthread.php?tid=2528</guid>
			<description><![CDATA[Email notifications from the Forum come from "Forum".<br />
<br />
WICH FORUM?!<br />
<br />
Can you change <br />
Forum &lt;forum@boriel.com&gt;<br />
To<br />
Boriel Forum &lt;forum@boriel.com&gt;<br />
or<br />
ZX BASIC Forum &lt;forum@boriel.com&gt;<br />
<br />
or something like that?<br />
<br />
<br />
Thanks.]]></description>
			<content:encoded><![CDATA[Email notifications from the Forum come from "Forum".<br />
<br />
WICH FORUM?!<br />
<br />
Can you change <br />
Forum &lt;forum@boriel.com&gt;<br />
To<br />
Boriel Forum &lt;forum@boriel.com&gt;<br />
or<br />
ZX BASIC Forum &lt;forum@boriel.com&gt;<br />
<br />
or something like that?<br />
<br />
<br />
Thanks.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[TAP be gone]]></title>
			<link>https://forum.boriel.com/showthread.php?tid=2473</link>
			<pubDate>Sat, 29 Jul 2023 09:01:40 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.boriel.com/member.php?action=profile&uid=207">zarsoft</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.boriel.com/showthread.php?tid=2473</guid>
			<description><![CDATA[I wish ".tap" not to appear in the name of the recorded bytes.<br />
<br />
"Game.tap" CODE 32768,12345<br />
should be<br />
"Game" CODE 32768,12345<br />
<br />
".tap" already appears in the file name.<br />
It does not need to appear again in the recorded block header.]]></description>
			<content:encoded><![CDATA[I wish ".tap" not to appear in the name of the recorded bytes.<br />
<br />
"Game.tap" CODE 32768,12345<br />
should be<br />
"Game" CODE 32768,12345<br />
<br />
".tap" already appears in the file name.<br />
It does not need to appear again in the recorded block header.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[VAL incomplete]]></title>
			<link>https://forum.boriel.com/showthread.php?tid=2427</link>
			<pubDate>Sat, 24 Jun 2023 11:54:29 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.boriel.com/member.php?action=profile&uid=207">zarsoft</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.boriel.com/showthread.php?tid=2427</guid>
			<description><![CDATA[In ZX SPECTRUM:<br />
<br />
LET x = 2<br />
PRINT VAL "2*x"<br />
<br />
Prints 4<br />
<br />
But on the compiler gives 0<br />
<br />
How about adding variables from "a" to "z" in VAL?]]></description>
			<content:encoded><![CDATA[In ZX SPECTRUM:<br />
<br />
LET x = 2<br />
PRINT VAL "2*x"<br />
<br />
Prints 4<br />
<br />
But on the compiler gives 0<br />
<br />
How about adding variables from "a" to "z" in VAL?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[CLEAR]]></title>
			<link>https://forum.boriel.com/showthread.php?tid=2339</link>
			<pubDate>Sat, 04 Mar 2023 15:46:58 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.boriel.com/member.php?action=profile&uid=207">zarsoft</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.boriel.com/showthread.php?tid=2339</guid>
			<description><![CDATA[How do I clean an ARRAY?<br />
<br />
I would like to use the function CLEAR.<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>VAR A(3) TYPE INTEGER

PROCEDURE CLEAR (v)
FOR i = ADDRESS(v) TO ADDRESS(v)+SIZE(v)-1
  POKE i,0
NEXT i
END PROCEDURE

PROCEDURE Clean
CLEAR A
END PROCEDURE

PROCEDURE Test
LET A(1) = 1
PRINT A(1)
Clean
PRINT A(1)
END PROCEDURE</code></div></div>]]></description>
			<content:encoded><![CDATA[How do I clean an ARRAY?<br />
<br />
I would like to use the function CLEAR.<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>VAR A(3) TYPE INTEGER

PROCEDURE CLEAR (v)
FOR i = ADDRESS(v) TO ADDRESS(v)+SIZE(v)-1
  POKE i,0
NEXT i
END PROCEDURE

PROCEDURE Clean
CLEAR A
END PROCEDURE

PROCEDURE Test
LET A(1) = 1
PRINT A(1)
Clean
PRINT A(1)
END PROCEDURE</code></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[REPEAT UNTIL (solved)]]></title>
			<link>https://forum.boriel.com/showthread.php?tid=2252</link>
			<pubDate>Mon, 28 Nov 2022 18:54:26 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.boriel.com/member.php?action=profile&uid=207">zarsoft</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.boriel.com/showthread.php?tid=2252</guid>
			<description><![CDATA[Hi<br />
<br />
I'd like to use the Pascal mode because it's simpler:<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>REPEAT
    [&lt;sentences&gt;]
UNTIL &lt;condition&gt;</code></div></div><br />
<br />
<br />
<br />
I dont like to use:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>DO
    [&lt;sentences&gt;]
LOOP UNTIL &lt;condition&gt;</code></div></div>]]></description>
			<content:encoded><![CDATA[Hi<br />
<br />
I'd like to use the Pascal mode because it's simpler:<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>REPEAT
    [&lt;sentences&gt;]
UNTIL &lt;condition&gt;</code></div></div><br />
<br />
<br />
<br />
I dont like to use:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>DO
    [&lt;sentences&gt;]
LOOP UNTIL &lt;condition&gt;</code></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[print42() to allow CR chr$(13)]]></title>
			<link>https://forum.boriel.com/showthread.php?tid=1374</link>
			<pubDate>Fri, 03 Sep 2021 23:16:16 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.boriel.com/member.php?action=profile&uid=799">RandomiserUsr</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.boriel.com/showthread.php?tid=1374</guid>
			<description><![CDATA[Trying to use CHR&#36;(13) in print42() and it is ignored - could this be implemented please?<br />
<br />
<br />
Thanks]]></description>
			<content:encoded><![CDATA[Trying to use CHR&#36;(13) in print42() and it is ignored - could this be implemented please?<br />
<br />
<br />
Thanks]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[struggle on using/implementing sprite libraries]]></title>
			<link>https://forum.boriel.com/showthread.php?tid=1262</link>
			<pubDate>Wed, 25 Aug 2021 20:02:16 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.boriel.com/member.php?action=profile&uid=187">nitrofurano</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.boriel.com/showthread.php?tid=1262</guid>
			<description><![CDATA[since a long time i was thinking how simple or possible would be using sprite engines/libraries on zxbasic-compiler (just like those used on z88dk and so on)<br />
<br />
so i started to try this (very glitchy and inefficient, as the code shows... <img src="https://forum.boriel.com/images/smilies/biggrin.png" alt="Big Grin" title="Big Grin" class="smilie smilie_4" />  )<br />
<br />
(wsad or cursors for moving)<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>ink 1
border 1:ink 5:bright 1: paper 1: cls

sub putudgsprite(txp1 as uinteger,typ1 as uinteger,tad1 as uinteger)
  poke uinteger &#36;5C7B,tad1+(7-(typ1 mod 8))+(txp1 mod 8)*32
  print at int(typ1/8),int(txp1/8);"&#92;A&#92;C"
  print at 1+int(typ1/8),int(txp1/8);"&#92;B&#92;D"
  end sub

yo=0:xo=0
putudgsprite(xo,yo,@udg01)
x1=128:y1=128

do
  cn1=((255-(in 64510)) band 2)/2 bor ((255-(in 65022)) band 2) bor ((255-(in 65022)) band 1)*4 bor ((255-(in 65022)) band 4)*2 :'- wsad
  cn2=((255-(in 61438)) band 8)/8 bor ((255-(in 61438)) band 16)/8 bor ((255-(in 63486)) band 16)/4 bor ((255-(in 61438)) band 4)*2 :'-7658
  cn0=cn1 bor cn2
  x1=x1-((cn0 band 4)/4)
  x1=x1+((cn0 band 8)/8)
  y1=y1-((cn0 band 1)/1)
  y1=y1+((cn0 band 2)/2)
  over 1  
  putudgsprite(xo,yo,@udg01)
  xo=x1:yo=y1
  putudgsprite(x1,y1,@udg01)
  pause 1
  loop

do:loop

udg01:
asm
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %11111111
defb %11111111
defb %11111111
defb %11111111
defb %11111111
defb %11111111
defb %11111111
defb %11111111

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %01111111
defb %01111111
defb %01111111
defb %01111111
defb %01111111
defb %01111111
defb %01111111
defb %01111111

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %10000000
defb %10000000
defb %10000000
defb %10000000
defb %10000000
defb %10000000
defb %10000000
defb %10000000

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %00111111
defb %00111111
defb %00111111
defb %00111111
defb %00111111
defb %00111111
defb %00111111
defb %00111111

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %11000000
defb %11000000
defb %11000000
defb %11000000
defb %11000000
defb %11000000
defb %11000000
defb %11000000

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %00011111
defb %00011111
defb %00011111
defb %00011111
defb %00011111
defb %00011111
defb %00011111
defb %00011111

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %11100000
defb %11100000
defb %11100000
defb %11100000
defb %11100000
defb %11100000
defb %11100000
defb %11100000

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %00001111
defb %00001111
defb %00001111
defb %00001111
defb %00001111
defb %00001111
defb %00001111
defb %00001111

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %11110000
defb %11110000
defb %11110000
defb %11110000
defb %11110000
defb %11110000
defb %11110000
defb %11110000

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %00000111
defb %00000111
defb %00000111
defb %00000111
defb %00000111
defb %00000111
defb %00000111
defb %00000111

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %11111000
defb %11111000
defb %11111000
defb %11111000
defb %11111000
defb %11111000
defb %11111000
defb %11111000

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %00000011
defb %00000011
defb %00000011
defb %00000011
defb %00000011
defb %00000011
defb %00000011
defb %00000011

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %11111100
defb %11111100
defb %11111100
defb %11111100
defb %11111100
defb %11111100
defb %11111100
defb %11111100

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %00000001
defb %00000001
defb %00000001
defb %00000001
defb %00000001
defb %00000001
defb %00000001
defb %00000001

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %11111110
defb %11111110
defb %11111110
defb %11111110
defb %11111110
defb %11111110
defb %11111110
defb %11111110

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

end asm</code></div></div><br />
so, any idea of using "true" sprites instead of that attempt above? <img src="https://forum.boriel.com/images/smilies/biggrin.png" alt="Big Grin" title="Big Grin" class="smilie smilie_4" />]]></description>
			<content:encoded><![CDATA[since a long time i was thinking how simple or possible would be using sprite engines/libraries on zxbasic-compiler (just like those used on z88dk and so on)<br />
<br />
so i started to try this (very glitchy and inefficient, as the code shows... <img src="https://forum.boriel.com/images/smilies/biggrin.png" alt="Big Grin" title="Big Grin" class="smilie smilie_4" />  )<br />
<br />
(wsad or cursors for moving)<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>ink 1
border 1:ink 5:bright 1: paper 1: cls

sub putudgsprite(txp1 as uinteger,typ1 as uinteger,tad1 as uinteger)
  poke uinteger &#36;5C7B,tad1+(7-(typ1 mod 8))+(txp1 mod 8)*32
  print at int(typ1/8),int(txp1/8);"&#92;A&#92;C"
  print at 1+int(typ1/8),int(txp1/8);"&#92;B&#92;D"
  end sub

yo=0:xo=0
putudgsprite(xo,yo,@udg01)
x1=128:y1=128

do
  cn1=((255-(in 64510)) band 2)/2 bor ((255-(in 65022)) band 2) bor ((255-(in 65022)) band 1)*4 bor ((255-(in 65022)) band 4)*2 :'- wsad
  cn2=((255-(in 61438)) band 8)/8 bor ((255-(in 61438)) band 16)/8 bor ((255-(in 63486)) band 16)/4 bor ((255-(in 61438)) band 4)*2 :'-7658
  cn0=cn1 bor cn2
  x1=x1-((cn0 band 4)/4)
  x1=x1+((cn0 band 8)/8)
  y1=y1-((cn0 band 1)/1)
  y1=y1+((cn0 band 2)/2)
  over 1  
  putudgsprite(xo,yo,@udg01)
  xo=x1:yo=y1
  putudgsprite(x1,y1,@udg01)
  pause 1
  loop

do:loop

udg01:
asm
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %11111111
defb %11111111
defb %11111111
defb %11111111
defb %11111111
defb %11111111
defb %11111111
defb %11111111

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %01111111
defb %01111111
defb %01111111
defb %01111111
defb %01111111
defb %01111111
defb %01111111
defb %01111111

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %10000000
defb %10000000
defb %10000000
defb %10000000
defb %10000000
defb %10000000
defb %10000000
defb %10000000

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %00111111
defb %00111111
defb %00111111
defb %00111111
defb %00111111
defb %00111111
defb %00111111
defb %00111111

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %11000000
defb %11000000
defb %11000000
defb %11000000
defb %11000000
defb %11000000
defb %11000000
defb %11000000

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %00011111
defb %00011111
defb %00011111
defb %00011111
defb %00011111
defb %00011111
defb %00011111
defb %00011111

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %11100000
defb %11100000
defb %11100000
defb %11100000
defb %11100000
defb %11100000
defb %11100000
defb %11100000

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %00001111
defb %00001111
defb %00001111
defb %00001111
defb %00001111
defb %00001111
defb %00001111
defb %00001111

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %11110000
defb %11110000
defb %11110000
defb %11110000
defb %11110000
defb %11110000
defb %11110000
defb %11110000

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %00000111
defb %00000111
defb %00000111
defb %00000111
defb %00000111
defb %00000111
defb %00000111
defb %00000111

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %11111000
defb %11111000
defb %11111000
defb %11111000
defb %11111000
defb %11111000
defb %11111000
defb %11111000

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %00000011
defb %00000011
defb %00000011
defb %00000011
defb %00000011
defb %00000011
defb %00000011
defb %00000011

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %11111100
defb %11111100
defb %11111100
defb %11111100
defb %11111100
defb %11111100
defb %11111100
defb %11111100

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %00000001
defb %00000001
defb %00000001
defb %00000001
defb %00000001
defb %00000001
defb %00000001
defb %00000001

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

defb %11111110
defb %11111110
defb %11111110
defb %11111110
defb %11111110
defb %11111110
defb %11111110
defb %11111110

defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000
defb %00000000

end asm</code></div></div><br />
so, any idea of using "true" sprites instead of that attempt above? <img src="https://forum.boriel.com/images/smilies/biggrin.png" alt="Big Grin" title="Big Grin" class="smilie smilie_4" />]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[LRIM/RTRIM/TRIM built in functions]]></title>
			<link>https://forum.boriel.com/showthread.php?tid=1153</link>
			<pubDate>Sun, 01 Aug 2021 10:00:06 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.boriel.com/member.php?action=profile&uid=799">RandomiserUsr</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.boriel.com/showthread.php?tid=1153</guid>
			<description><![CDATA[It would be handy to have a <br />
<br />
LTRIM<br />
RTRIM<br />
TRIM<br />
<br />
functions built in to ZXB<br />
<br />
I know you could right one but I wonder if there is a faster way to be compiled?<br />
<br />
thanks]]></description>
			<content:encoded><![CDATA[It would be handy to have a <br />
<br />
LTRIM<br />
RTRIM<br />
TRIM<br />
<br />
functions built in to ZXB<br />
<br />
I know you could right one but I wonder if there is a faster way to be compiled?<br />
<br />
thanks]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Spectrum BASIC Dialects]]></title>
			<link>https://forum.boriel.com/showthread.php?tid=974</link>
			<pubDate>Mon, 31 Aug 2020 16:22:24 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.boriel.com/member.php?action=profile&uid=717">Dorogusha</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.boriel.com/showthread.php?tid=974</guid>
			<description><![CDATA[Support for common dialects can be implemented.<br />
In the librares (modules).<br />
<br />
48 BASIC<br />
128 BASIC (Where is PLAY &amp; SPECTRUM ?)<br />
+3 BASIC<br />
TR-DOS<br />
<br />
PRO-DOS<br />
Laser BASIC<br />
Mega BASIC<br />
Beta BASIC<br />
Softek IS<br />
Softek FP<br />
<br />
<br />
In many cases it is not necessary to follow a strict syntax such as "REM S, A, x, y" (from Softek IS)". And use more correct syntax. But the compiler must understand all synonyms and correct them by prompting the programmer. In turn, the programmer can choose any synonyms, including leaving it as it is.<br />
It is not necessary to use the words LET and SUB in the program, but it is advisable when declaring ...<br />
It is permissible to use signs that an object belongs to a particular type (using letters !,%, &#36; Or color), as well as an statement to a particular library (to understand where it came from).<br />
The programmer can add his own new statements, functions, libraries, synonyms (i.e. own syntax). But all of them, of course, must be described by the programmer.]]></description>
			<content:encoded><![CDATA[Support for common dialects can be implemented.<br />
In the librares (modules).<br />
<br />
48 BASIC<br />
128 BASIC (Where is PLAY &amp; SPECTRUM ?)<br />
+3 BASIC<br />
TR-DOS<br />
<br />
PRO-DOS<br />
Laser BASIC<br />
Mega BASIC<br />
Beta BASIC<br />
Softek IS<br />
Softek FP<br />
<br />
<br />
In many cases it is not necessary to follow a strict syntax such as "REM S, A, x, y" (from Softek IS)". And use more correct syntax. But the compiler must understand all synonyms and correct them by prompting the programmer. In turn, the programmer can choose any synonyms, including leaving it as it is.<br />
It is not necessary to use the words LET and SUB in the program, but it is advisable when declaring ...<br />
It is permissible to use signs that an object belongs to a particular type (using letters !,%, &#36; Or color), as well as an statement to a particular library (to understand where it came from).<br />
The programmer can add his own new statements, functions, libraries, synonyms (i.e. own syntax). But all of them, of course, must be described by the programmer.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[SELECT/CASE ... END SELECT]]></title>
			<link>https://forum.boriel.com/showthread.php?tid=973</link>
			<pubDate>Wed, 26 Aug 2020 15:55:29 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.boriel.com/member.php?action=profile&uid=709">Neurox66</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.boriel.com/showthread.php?tid=973</guid>
			<description><![CDATA[Hi,<br />
I would like to see  available on the ZX Basic the control flow statements SELECT/CASE ... END SELECT<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>Select Case Answer&#36;
    Case "YES"
        ...
    Case "NO"
        ...
    Case "MAYBE"
        ...
    Default
        ...
End Select</code></div></div><br />
Thanks,<br />
Paolo]]></description>
			<content:encoded><![CDATA[Hi,<br />
I would like to see  available on the ZX Basic the control flow statements SELECT/CASE ... END SELECT<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>Select Case Answer&#36;
    Case "YES"
        ...
    Case "NO"
        ...
    Case "MAYBE"
        ...
    Default
        ...
End Select</code></div></div><br />
Thanks,<br />
Paolo]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[WindowScrollUp (x1, y1, x2, y2, num_chars)]]></title>
			<link>https://forum.boriel.com/showthread.php?tid=966</link>
			<pubDate>Fri, 17 Jul 2020 22:41:52 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.boriel.com/member.php?action=profile&uid=659">.fito.</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.boriel.com/showthread.php?tid=966</guid>
			<description><![CDATA[hola compañero.<br />
<br />
primero decirte que tu herramienta zxb es una maravilla y le está dando una nueva vida al spectrum.<br />
<br />
He estado practicando con las funciones scrollup, scrolldown, ...left, right de pixel a pixel y son una maravilla.<br />
<br />
Sé que tienes otras prioridades, tal como dijiste en otro hilo, pero yo te pediría implementar un windowscroll que desplaze al menos un cuadro (x1,y1,x2,y2) en las 4 direcciones, con atributos incluidos. Estoy con un juego que requiere scroll y me ayudaría muchísimo a tener un scroll en buenas condiciones y estoy seguro de que muchas personas lo están esperando para sus creaciones. Imagino que otras personas apoyarán mi petición.<br />
<br />
mil gracias.<br />
<br />
<br />
Dejo por aquí una traducción de andar por casa por respeto a todo el mundo:<br />
<br />
Hello mate.<br />
<br />
first tell you that your zxb tool is a wonder and it is giving a new life to the spectrum (and what I am is / was from amstrad).I know you have other priorities, as you said in another thread, but I would ask you to implement a windowscroll that moves at least one box (x1, y1, x2, y2) in all 4 directions, with attributes included? I am with a scroll type game and it would help me a lot to have a scroll in good condition and I am sure that many people are waiting for it. I imagine other people will support my request.<br />
<br />
thank you.]]></description>
			<content:encoded><![CDATA[hola compañero.<br />
<br />
primero decirte que tu herramienta zxb es una maravilla y le está dando una nueva vida al spectrum.<br />
<br />
He estado practicando con las funciones scrollup, scrolldown, ...left, right de pixel a pixel y son una maravilla.<br />
<br />
Sé que tienes otras prioridades, tal como dijiste en otro hilo, pero yo te pediría implementar un windowscroll que desplaze al menos un cuadro (x1,y1,x2,y2) en las 4 direcciones, con atributos incluidos. Estoy con un juego que requiere scroll y me ayudaría muchísimo a tener un scroll en buenas condiciones y estoy seguro de que muchas personas lo están esperando para sus creaciones. Imagino que otras personas apoyarán mi petición.<br />
<br />
mil gracias.<br />
<br />
<br />
Dejo por aquí una traducción de andar por casa por respeto a todo el mundo:<br />
<br />
Hello mate.<br />
<br />
first tell you that your zxb tool is a wonder and it is giving a new life to the spectrum (and what I am is / was from amstrad).I know you have other priorities, as you said in another thread, but I would ask you to implement a windowscroll that moves at least one box (x1, y1, x2, y2) in all 4 directions, with attributes included? I am with a scroll type game and it would help me a lot to have a scroll in good condition and I am sure that many people are waiting for it. I imagine other people will support my request.<br />
<br />
thank you.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Geany support]]></title>
			<link>https://forum.boriel.com/showthread.php?tid=954</link>
			<pubDate>Wed, 17 Jun 2020 19:28:36 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.boriel.com/member.php?action=profile&uid=129">britlion</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.boriel.com/showthread.php?tid=954</guid>
			<description><![CDATA[Not to diss Boride in any way, because it's awesome, but I use Geany already for other things, and was wondering if anyone had given thought to adding a zxb plugin?<br />
<br />
Never made one, so it could be trivial, or a pain!]]></description>
			<content:encoded><![CDATA[Not to diss Boride in any way, because it's awesome, but I use Geany already for other things, and was wondering if anyone had given thought to adding a zxb plugin?<br />
<br />
Never made one, so it could be trivial, or a pain!]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[spectrum next compatibility]]></title>
			<link>https://forum.boriel.com/showthread.php?tid=922</link>
			<pubDate>Sun, 01 Mar 2020 01:56:52 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.boriel.com/member.php?action=profile&uid=204">ardentcrest</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.boriel.com/showthread.php?tid=922</guid>
			<description><![CDATA[Will we see Zx basic compiler compatible with the next????]]></description>
			<content:encoded><![CDATA[Will we see Zx basic compiler compatible with the next????]]></content:encoded>
		</item>
	</channel>
</rss>