Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 262
» Latest member: AnthonyGaxia
» Forum threads: 1,075
» Forum posts: 6,440

Full Statistics

Online Users
There are currently 106 online users.
» 0 Member(s) | 104 Guest(s)
Bing, Yandex

Latest Threads
Красивые букетики
Forum: News
Last Post: AnthonyGaxia
Yesterday, 04:00 AM
» Replies: 0
» Views: 24
Printing with FZX
Forum: Help & Support
Last Post: boriel
07-17-2025, 09:08 PM
» Replies: 1
» Views: 371
Strange Happenings
Forum: Bug Reports
Last Post: boriel
05-23-2025, 09:15 AM
» Replies: 4
» Views: 2,540
.tap file code not execut...
Forum: Help & Support
Last Post: Zoran
04-28-2025, 10:59 AM
» Replies: 4
» Views: 2,719
Exit from more than one l...
Forum: Wishlist
Last Post: Duefectu
04-23-2025, 10:06 PM
» Replies: 3
» Views: 2,274
put small ASM programs li...
Forum: How-To & Tutorials
Last Post: Zoran
04-18-2025, 02:02 PM
» Replies: 6
» Views: 5,276
Creating +3 Menus - Loadi...
Forum: Help & Support
Last Post: merlinkv
04-16-2025, 02:08 PM
» Replies: 6
» Views: 3,702
Randomize not very random...
Forum: Help & Support
Last Post: Zoran
04-08-2025, 10:40 AM
» Replies: 4
» Views: 3,442
Scope rules
Forum: Bug Reports
Last Post: Zoran
04-04-2025, 09:46 AM
» Replies: 2
» Views: 1,959
Using constants not allow...
Forum: Bug Reports
Last Post: baltasarq
03-19-2025, 10:00 PM
» Replies: 8
» Views: 4,750

 
  ¿Qué tutorial se me recomienda para empezar a usar ZXBasic?
Posted by: Turriano - 10-14-2018, 04:39 PM - Forum: How-To & Tutorials - Replies (1)

Y ya puestos a pedir, si puede ser en español mejor B-)

---------------------------------------------------------------------------------

And already put to ask, if it can be in Spanish better B-)

Print this item

  bug on "if", "end if", etc.?
Posted by: nitrofurano - 09-30-2018, 12:15 PM - Forum: Help & Support - Replies (1)

when trying to compile this code on 1.8.8:

Code:
dim i as ubyte
i=3
if i>2 then:
  print "3>2"
  end if
do:loop

i get this error message when compiling
Code:
endifbug.bas:5: Syntax Error. Unexpected token 'IF' <IF>

on other few tests i tried, the same happened on "end if"

Print this item

  bug on --org command line argv, missing hex address support
Posted by: nitrofurano - 09-29-2018, 11:03 AM - Forum: Bug Reports - Replies (2)

Since always i used hex values on --org command line argument (zxb.py), it always worked until few months ago - like:
zxb.py code.bas --org=0xC000

Now, since it stopped working, i had to fix all the code i had to something like:
zxb.py code.bas --org=$((0xC000))
(i only tested it on Ubuntu GNU/Linux - i have no idea how fine it works on other operating systems and distributions)

i have no idea what caused that... perhaps some code cleanup on ZX-Basic Compiler? or something else?

Print this item

  bug on mod (*solved*)
Posted by: nitrofurano - 09-29-2018, 10:36 AM - Forum: Bug Reports - Replies (1)

since few months ago i noticed some weird behaviour from mod operand

Code:
dim i as uinteger
cls
do
for i=0 to 65535
print at 9,9;chr$( 48+(i mod 10) )
print at 9,8;chr$( 48+(int(i/10) mod 10) )
print at 9,7;chr$( 48+(int(i/100) mod 10) )
print at 9,6;chr$( 48+(int(i/1000) mod 10) )
print at 9,5;chr$( 48+(int(i/10000) mod 10) )
next
loop

as happened months ago, it is supposed to display a number on screen ranging from 0 to 65535, but the result gets totally messy
(tested on version 1.8.5 now, the result is as messy as 1.6.12)

Print this item

  Looking for an Inkey$ routine.
Posted by: ardentcrest - 09-16-2018, 12:54 AM - Forum: Help & Support - Replies (12)

I'm thinking of re-doing my spectranet client but I need a good inkey$ input routine. the one I have ether misses keys presses or does multi letters.

I am using

#include <input.bas>
#include <keys.bas>

Code:
MAIN:
   NETmainloop()
   gosub NETinputloop
   NETmainloop()
goto MAIN

NETinputloop:
    for timeout=0 to 1500 : next timeout
   if rowx=0 then printat64(22,0):print64(xx$+" "):goto NetJump1 : end if


   FOR ii = 0 TO rowx : printat64(22,ii):print64(chr$(peek (@MyLabel + ii))) : NEXT ii : print64(xx$+" ")

NetJump1:
   let k=code inkey$ : for timeout=0 to 1500 : next timeout
   if k>31 and k<128 then goto NetKeyPress : end if
   if k=13 then goto senddata : end if
   if k=12 then goto NetDeleteKey : end if
return

NetDeleteKey:
   if rowx=0 then goto NETinputloop : end if
   POKE (@MyLabel + (rowx-1)), 0
   let rowx = rowx - 1
return

NetKeyPress:
   if rowx=length then goto NETinputloop : end if
   POKE (@MyLabel + rowx), k
   let rowx = rowx + 1
return

senddata:
printat64(22,0):print64("                                                            ")
   POKE (@MyLabel + rowx), 13
   POKE (@MyLabel + rowx+1), 10
   poke (@MyLabel2),(rowx+2)
poke (@MyLabel2+1),0
   send2()
NETline()

for ii=0 to rowx+1 : POKE (@MyLabel + ii), 0 : next ii

let rowx=0
return


END


any hekp

Print this item

  [msx] v9990 experiences
Posted by: nitrofurano - 09-09-2018, 09:00 AM - Forum: Other Archs - No Replies

starting some experiences using Yamaha v9990 display processor - <!-- m --><a class="postlink" href="https://gitlab.com/nitrofurano/borielzxbasicexamples/tree/master/examples/z80/msx/demos/Experiences_Video9990">https://gitlab.com/nitrofurano/borielzx ... _Video9990</a><!-- m -->

Print this item

  Inconsistency in RND
Posted by: Alessandro - 08-05-2018, 06:21 PM - Forum: Help & Support - Replies (5)

If I write this simple program:

Code:
DIM u as UBYTE
10 let u =rnd*40
  print u
  pause 0
  if code inkey$=13 then stop
40 goto 10
a number between 0 and 40 will be shown at every pressing of ENTER.

However, inside of a larger program, this instruction:
Code:
DIM x AS UBYTE
...
x = rnd*40
always returns 38 when executed.

Also, the RND of the first example always returns exactly the same sequence when started afresh, at least under emulation (Spectaculator): 9, 34, 15, 7, 16, 25, 13, 37, 7, 24, 19 etc.

In the past I used a simple routine (by John Connolly) to generate random numbers. Here it is, modified to let it return values from 0 to 31:
Code:
LD A,R
AND %00011111
LD (address),A
When placed in a ZX-Basic listing as a subroutine, it will always return the first value. The only way to make it work is to assemble it elsewhere and call it from within ZX-BASIC with the usual RANDOMIZE USR call, then assign the PEEK [address] to a variable.

Print this item

  FZX support
Posted by: Alessandro - 07-31-2018, 07:11 AM - Forum: Help & Support - Replies (5)

Is there a way to implement FZX? The compiler won't accept the PRINT#4 command, whereas, for instance, HiSoftBasic will.

Print this item

  Compatibilty with windows 10
Posted by: GITTARD - 06-12-2018, 10:37 AM - Forum: Bug Reports - Replies (1)

Hi,
Are zxb, zxbasm or zxbpp applications compatible with windows 10 ?
I can not execute them.
Best regards.

Print this item

  Multiplication result greater than 255 in UINTEGER var
Posted by: LukeBord1 - 05-30-2018, 08:42 AM - Forum: Help & Support - Replies (2)

First of all, as usual, sorry if this was discussed before... at a first sight around the arguments, i didn't find a solution.

The below code works till the "32*(PEEK 32044)" multiplicaton returns a a value within 255, but why?...

Code:
REM 32043 and 32044 store line and column values
REM the routine should return the screen attr address
DIM a AS UINTEGER
a = 22528+PEEK 32043+(32*(PEEK 32044))
REM it doesn't work if the result of the multiplication exceeds 255!

Print this item