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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 258
» Latest member: manuelzo75
» Forum threads: 1,074
» Forum posts: 6,434

Full Statistics

Online Users
There are currently 206 online users.
» 0 Member(s) | 203 Guest(s)
Applebot, Bing, Google

Latest Threads
.tap file code not execut...
Forum: Help & Support
Last Post: Zoran
04-28-2025, 10:59 AM
» Replies: 4
» Views: 319
Exit from more than one l...
Forum: Wishlist
Last Post: Duefectu
04-23-2025, 10:06 PM
» Replies: 3
» Views: 300
put small ASM programs li...
Forum: How-To & Tutorials
Last Post: Zoran
04-18-2025, 02:02 PM
» Replies: 6
» Views: 1,600
Creating +3 Menus - Loadi...
Forum: Help & Support
Last Post: merlinkv
04-16-2025, 02:08 PM
» Replies: 6
» Views: 554
Randomize not very random...
Forum: Help & Support
Last Post: Zoran
04-08-2025, 10:40 AM
» Replies: 4
» Views: 893
Scope rules
Forum: Bug Reports
Last Post: Zoran
04-04-2025, 09:46 AM
» Replies: 2
» Views: 328
Using constants not allow...
Forum: Bug Reports
Last Post: baltasarq
03-19-2025, 10:00 PM
» Replies: 8
» Views: 1,066
404 page not found
Forum: Documentation
Last Post: boriel
03-08-2025, 07:16 PM
» Replies: 5
» Views: 2,886
Spectrum keywords codes
Forum: Bug Reports
Last Post: boriel
03-08-2025, 11:00 AM
» Replies: 1
» Views: 419
ZXodus][Engine
Forum: ZX Basic Compiler
Last Post: boriel
02-19-2025, 11:43 PM
» Replies: 69
» Views: 213,808

 
  6ch AY Sara by Fleetwood Mac
Posted by: emook - 09-27-2017, 11:05 PM - Forum: Gallery - No Replies

A little demo I've done using ZXBC and a bunch of other brilliant stuff :

zx7 / rcs eainar saukas
putchars by britlion
vtii sergy bulba
google for images
boriel
and loads of others....

https://www.youtube.com/watch?v=mK7lOyqpN9g

Print this item

  Custom Fonts with ASM defb
Posted by: Duefectu - 09-12-2017, 12:26 PM - Forum: ZX Basic Compiler - Replies (3)

Hola:

Quiero utilizar un set de caracteres personalizados que tengo en formato defb, pero no encuentro como hacerlo funcionar:

Code:
REM Fuente personalizada
POKE UINTEGER 23606,@Fuente-256

SUB Fuente()
  ASM
    defb 0,128,128,64,23,.........
    defb ...
  END ASM
END SUB

Que estoy haciendo mal?

Gracias por vuestra ayuda!

Print this item

  New version 1.6.10 released!
Posted by: boriel - 09-06-2017, 09:10 AM - Forum: ZX Basic Compiler - Replies (8)

Well, long time I don't announce new releases here (usually goes to Facebook or twitter).
This one is version 1.6.10 which includes:

- Lots of fixes and better stability
- Faster and better asm code generated
- Added UART library for ZX Uno (uses UART for communication. Wifi coming soon)
- Added Radastan Mode PRINT, DRAW, LINE, CIRCLE, FILL and other primitives
- Finally, arrays of pointer to labels, lIke DIM a(1 TO 3) => {@label 1, @label2 + 3, @label5 }
- New powerful statements ON .. GOTO, ON .. GOSUB

Download it here: <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Archive">http://www.boriel.com/wiki/en/index.php ... IC:Archive</a><!-- m -->

Print this item

  Using Visual Studio Code with Boriel's ZX Basic and ZX Next
Posted by: emook - 08-21-2017, 07:18 PM - Forum: How-To & Tutorials - Replies (3)

Hi,

I've recently been using Visual Studio Code which I've configured to use the ZXBasic syntax highlighter, set up one push compilation, then runs my code in ZXsarUX.

Have a look at the video below :

https://www.youtube.com/watch?v=TUnhkHkXF7k

Any questions ask away!

Smile

Print this item

  Best way to put UDG in my program ?
Posted by: ivanb303 - 08-05-2017, 12:40 PM - Forum: Help & Support - Replies (11)

Hi

I'm trying to write a kind of space shooter from scratch, i kind of wrote it in Sinclair BASIC first and in there I use UDGs
in the usual way by POKEing the usual UDG area at 65368. How do I do this in Boriel ZX ? It didn't like me doing it manually
causing random crashes and giving me "Out of Memory" when I tried to use inline ASM call. Thanks Smile

Print this item

  Recent Examples
Posted by: jonesypeter - 08-03-2017, 04:00 PM - Forum: Help & Support - Replies (6)

Hi,

Can I ask if there are recent examples programs or tutorials for ZX BASIC? I'm accustomed to Sinclair BASIC and would like to convert some Spectrum Programs, but I'm also interested in the extra capabilities that ZX BASIC provides and linking to sprite toolkits and the Game Engines like BiFrost.

The Sample Programs section of the Wiki seems a little short on content and very simplistic.

https://zxbasic.readthedocs.io/en/docs/sample_programs/

I have tried reading through the reserved words and for example clicking on the SCREEN Keyword (replacement for SCREEN$):

https://zxbasic.readthedocs.io/en/docs/l...en/#screen

Comes up with 'There is currently no text in this page.'

I looked at the Programming Tutorials section:

https://zxbasic.readthedocs.io/en/docs/t...#tutorials

There is a very old partly completed PacMan tutorial, and a couple of tutorials in Spanish.

Sorry if this post sounds negative, it's certainly not meant to be. I'm just struggling to find resources.

Thanks

Print this item

  how to pack and unpack a string?
Posted by: slenkar - 08-01-2017, 02:21 PM - Forum: How-To & Tutorials - Replies (4)

could anyone write a guide on how to pack and unpack a string using something like aplib or megalz?

Print this item

  errors upon compilation
Posted by: slenkar - 07-28-2017, 06:43 PM - Forum: Bug Reports - Replies (2)

when using the stable version:
/root/Downloads/zxbasic/zxb.py -t -a -B /root/Downloads/zxbasic/examples/colors.bas (in directory: /root/Downloads/zxbasic/examples)
Traceback (most recent call last):
File "/root/Downloads/zxbasic/zxb.py", line 12, in <module>
from six import StringIO
ImportError: No module named six
Compilation failed.


the most recent version of ZXBASIC:
python /root/Downloads/zxbasic/zxb.py -t -a -B /root/Downloads/zxbasic/examples/colors.bas (in directory: /root/Downloads/zxbasic/examples)
Traceback (most recent call last):
File "/root/Downloads/zxbasic/zxb.py", line 14, in <module>
import api.debug
File "/root/Downloads/zxbasic/api/debug.py", line 10, in <module>
from .config import OPTIONS
File "/root/Downloads/zxbasic/api/config.py", line 20, in <module>
from . import global_
File "/root/Downloads/zxbasic/api/global_.py", line 21, in <module>
from .constants import TYPE
File "/root/Downloads/zxbasic/api/constants.py", line 175
NAME_TYPES = {cls.TYPE_NAMES[x]: x for x in cls.TYPE_NAMES}
^
SyntaxError: invalid syntax
Compilation failed.


is it because my version of python is incompatible? its 2.6.4

EDIT -
using python3 works:
python3 /root/Downloads/zxbasic/zxb.py -t -a -B /root/Downloads/zxbasic/examples/colors.bas (in directory: /root/Downloads/zxbasic/examples)
Compilation finished successfully.

Print this item

  Iterate through characters of a string?
Posted by: slenkar - 07-28-2017, 06:21 PM - Forum: Help & Support - Replies (1)

How does someone get each character of a string?

(im trying to do wordwrap for a large string)

oh I got the word wrap working now:

Code:
dim printwidth=28

Let a$="PART 1 Bruce Hall, a slightly built youth 16 years of age, fair haired and blue eyed, stood 4' 8 in shoes and despite that slight assistance still could not see over the brick wall behind which he believed stood a flying machine. At least that was what he'd overheard two delivery boys discussing outside the local butchers shop."

REM pRINT a(1 to 10)
dim stringpos as integer
stringpos=0
dim lines as integer
dim sentenceEnd as integer
while stringpos<len(a)
sentenceEnd=stringpos+printwidth

if sentenceEnd<len(a) then

FOR stringposIter=sentenceEnd TO stringpos STEP -1
if code(a(stringposIter to stringposIter))=code(" ") then

print at lines,0;a(stringpos to stringposIter)

stringpos=stringposIter
exit for
end if
next

end if

if sentenceEnd>len(a) then
print at lines,0;a(stringpos to sentenceEnd)
exit while
end if

lines=lines+1

wend
is there an escape code for carriage return or newline?

Print this item

  Where does Boriel assemble to?
Posted by: ivanb303 - 07-17-2017, 01:57 AM - Forum: Help & Support - Replies (3)

So this is like an etch-o-sketch but It doesn't like the screen grabbing part. This all works fine in Sinclair BASIC. I'm guessing the picture data collides with Boriel's compiled code. I'm also guessing that Boriel decides where to inline ASM sections. Can you explicitly tell Boriel where to assemble to ?

Code:
#include <fastPlot.bas>

DIM cx,cy,x,y,cl  AS UINTEGER

10 REM The variables
20 LET cx=128: LET cy=80: LET x=cx: LET y=cy:LET cl=0: INK 0
30 INK cl: fastPlot(x,y)
100 IF INKEY$="a" AND x>=0 THEN LET x=x-1: END IF
120 IF INKEY$="s" AND x<=255 THEN LET x=x+1: END IF
130 IF INKEY$="o" AND y<=175 THEN LET y=y+1: END IF
150 IF INKEY$="k" AND y>=0 THEN LET y=y-1: END IF
160 IF INKEY$="f" THEN PRINT AT 0,0;"Frame grabbed!": grabScreen(): END IF
170 IF INKEY$="g" THEN PRINT AT 0,0;"Frame pasted!": CLS : dumpScreen() : END IF
180 IF INKEY$="n" AND cl>=0 THEN LET cl=cl-1: END IF
190 IF INKEY$="m" AND cl<=7 THEN LET cl=cl+1: END IF

200 GO TO 30

SUB grabScreen()
ASM

LD HL,16384
LD DE,51200
LD BC,6912
LDIR
RET
END ASM
END SUB

SUB dumpScreen()
ASM

LD HL,51200
LD DE,16384
LD BC,6912
LDIR
RET
END ASM
END SUB

What i found strange also was that sometimes it seems to work fine, and sometimes it doesn't. Pressing f button does the frame grab
but FUSE freezes, the border goes blue and you might get garbled stuff at bottom of screen.

Print this item