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

 
  IDE bug?
Posted by: slenkar - 02-13-2011, 05:06 AM - Forum: Bug Reports - Replies (3)

I tried the program UDG.bas in the examples folder.

When I try to change the BIN values and run the program one of the numbers is removed from each BIN statement,

e.g.
0 DATA BIN 1111,BIN 1011,BIN 1011,BIN 1011,BIN 1011,BIN 1011,BIN 1011,BIN 1111
becomes:
DATA BIN 111,BIN 011,BIN 011,BIN 011,BIN 011,BIN 011,BIN 011,BIN 111

Print this item

  How to create and draw graphics
Posted by: slenkar - 02-13-2011, 03:59 AM - Forum: Help & Support - Replies (21)

What is the best way to draw graphics to the screen e.g. UDG or other method

How do you get sprites from the sprite editor into the basic program?

Print this item

  New beta release 1.2.7r2058
Posted by: boriel - 02-12-2011, 03:33 PM - Forum: Bug Reports - Replies (3)

Okay, a new beta release with Lbound() and UBound() functions implemented. This is a final release candidate. So, please, give it a try.
Also fixes an internal bug (but not critical), with the backend.

See LBound() and UBound() for usage. These functions allow to get the number of the dimensions of a given array (passing 0 as 2nd parameter), and also the lower and upper bounds of its dimensions.

They're not very useful yet, but will be when dynamic arrays are implemented. :wink:

Download:
<!-- m --><a class="postlink" href="http://www.boriel.com/files/zxb">http://www.boriel.com/files/zxb</a><!-- m -->

Update: The wiki has been *vandalized* Cry I've managed to clean it up. Also have put some documentation on Lbound() and Ubound() (see reserved keywords)

Print this item

  New beta release 1.2.7r2021
Posted by: boriel - 02-01-2011, 08:28 AM - Forum: Bug Reports - Replies (30)

Okay, a new beta release with a *critical* fix and two interesting optimizations :!:

  • ! The string parameters byVal (the default) in functions incorrecly managed causing crashes sometimes. Fixed.
  • ! Some other bugs in the Intermediate code has been fixed. And string management a bit optimized (faster and less memory used)
  • + Added a String.bas libray with MID$, LEFT$, RIGHT$, InStr and StrPos.
  • * The ZX Basic preprocessor has been *entirely* rewritten (refactored). It now allows true multivariate macros as cpp does (Thus allowing function inlining, etc).

Please, test needed :!: The compiler has undergone *deep changes* with this update.
You can download (as always) from <!-- m --><a class="postlink" href="http://www.boriel.com/files/zxb">http://www.boriel.com/files/zxb</a><!-- m -->

Print this item

  New beta release 1.2.7r1866
Posted by: boriel - 12-16-2010, 09:40 AM - Forum: Bug Reports - Replies (4)

Okay, a new beta release with a fix and two interesting optimizations :!:

  • ! The optimizer could hang under rare circumstances. Fixed.
  • ! The csrlin() routine had a bug reporting sometimes the wrong position (this also affected Input() library which uses it). Fixed.

  • + Every BEEP command always took 21 bytes. Now it only takes 11 bytes and it's faster (good for sound effects) if only constant numbers are used. So beep <num1>, <num2> is much optimized.
  • DRAW routine has been improved for speed. Now it's 200% faster (aprox.) and takes only 150 bytes more.
  • PLOT, DRAW & CIRCLE now uses SCREEN_ADD positioning => you can "DRAW" at part of the memory pointed by this internal variable.

To do:
  • If several constant beeps (BEEP <num1>, <num2>) are specified one after another, they will be "compressed" and played with a beep sequencer. So every beep in the sequence takes only 4 bytes.
  • A new library routine is in preparation: polyline, which draws a sequence of lines to coords Xn, Yn:
    Code:
    REM A list of coords (Unsigned Bytes)
    DIM CoordList(10, 2) as UByte = { {1, 1}, {3, 100}, {20, 80}, ... _
                            ... ' More coord lists
                         {128, 189}}

    REM Draws a polilyne of 10 coordinates, taking coord 0 as the 1st one
    REM The 2nd 0 is mondatory, but useless here.
    PolyLine(10, @CoordList(0, 0))
  • UBound and LBound soon to come (for getting the Upper and Lower bound of arrays).
    Code:
    DIM a(2 To 5, 1 TO 8) as Byte

    PRINT Ubound(a, 1) : REM prints 2
    PRINT LBound(a, 2) : REM prints 8
  • Variable parameters function calls, like in FreeBasic or C
    Code:
    Function Avg(n as uByte, ...)
        ...
    End Function

    PRINT Avg(3, 2.5, 3.6, 7.8)
    PRINT Avg(5, 1, 4, 5, 7, 9)
    This way, function AVG can receive any numbers of parameters of any type.
Meanwhile, you can download 1.2.7-r1866 here, as always: <!-- m --><a class="postlink" href="http://www.boriel.com/files/zxb">http://www.boriel.com/files/zxb</a><!-- m -->

Print this item

  SE Basic support
Posted by: cheveron - 12-11-2010, 11:25 PM - Forum: Wishlist - Replies (7)

Hi!

Thanks for the kind words on WoSF about SE Basic. It would be really cool if the compiler could:

* support the extra commands present in SE Basic

and also

* create code that runs with the SE Basic ROM used.

Happy to give whatever support you require to achieve one or both of these if you're interested.

Cheers!

-Andrew

Print this item

  Version 1.2.6 released!
Posted by: boriel - 12-10-2010, 09:48 PM - Forum: ZX Basic Compiler - Replies (4)

This release is just 1.2.6-r1812 renamed. I think it's quite stable now, and if new bugs are found, they will be fixed on 1.2.7.
So, those interested, please, download from: <!-- m --><a class="postlink" href="http://www.boriel.com/files/zxb">http://www.boriel.com/files/zxb</a><!-- m -->
This version finally implements bitwise operations (bAND, bOR, bXOR, bNOT) on any interger types (8, 16 and 32 bits). 8)

Thanks to Britlion, apenao, LCD, LTee, programandala & carloscomputer again (and maybe others, please priv. msg. me). They've detected many bugs again, but now I've started to use TDD (Unit Testing) to avoid already-fixed bugs to be reintroduced. Like the previous version, this one fixes so many that some parts has been completely rewritten. If you use any older version, do please upgrade to this one immediately. This version could be considered as another "Service Pack Update".

Changes since v.1.2.5
===================================
Assembler:

  • + The assembler now supports ALIGN <integer> directive
  • + Added support for checking out of memory in runtime.
  • + Added support for checking BREAK in runtime (--enable-break)
  • + Added support for Subscript Out of Range in runtime (--debug-memory)
  • + Added support for --strict-boolean (0 or 1) values (--debug-array)
  • + Added suport for 8 bit bitwise bAND, bOR, bXOR, bNOT operations.
  • + Added print64 by Britlion library routine, and Mojon Twins FourSpriter version (more to come).
Compiler:
  • + Added support for logical XOR (if A XOR B then...)
  • + Bitwise bAND, bOR, bXOR, bNOT finally added for 8, 16 and 32 bits
  • ! Fixed a bug in RANDOMIZE which wasn't updating the seed correctly.
  • ! Fixed a pragma typo in POS.bas library wich lead to errors.
  • ! Fixed a bug in STR$, VAL, CHR$ and CODE which could crash the program.
  • ! Fixed a bug in string comparison
  • ! Fixed 2 more bugs in the peephole optimizer (-O3) which could crash the program.
  • ! Fixed some syntax bugs. PI() and RND() are now allowed.
    Calling functions with no parenthesis is either.
  • ! Fixed a parser bug in which empty WHILE / DO .. LOOP loops crashed the compiler. Fixed.
  • ! Array access has been optimized for speed. Now faster.
  • ! For loops have been slightly optimized.
  • ! MEM_FREE heap routine has been slightly optimized.

  • * The print* intermediate code instructions have been removed and converted to routines.
  • * Lot of code refactoring, and moved to the standard trunk/tag/branches SVN repository scheme.
  • * String expresions now are standarized (like any other data type).
  • * TDD: Begin to create unitary tests cases for the compiler.

Print this item

  New beta release 1.2.6r1762
Posted by: boriel - 11-30-2010, 10:39 AM - Forum: Bug Reports - Replies (7)

This is a new beta version (released a minute ago :!Smile. Basically this is has *somewhat deep changes* in the code. So need you to test them, if possible, please :oops:

This release is needed in order to start the 2.0 branch. I also contains the print42 (fixed) and print64 by britlion, plus a fourspriter of MojonTwins (subdirectory /mj). Other graphic libraries posted here will be also included on later releases. But need more testing.

Download at <!-- m --><a class="postlink" href="http://www.boriel.com/files/zxb">http://www.boriel.com/files/zxb</a><!-- m --> as always...

Print this item

  PRINT in FUNCTION causes Crash (*solved*)
Posted by: LCD - 11-27-2010, 03:16 PM - Forum: Bug Reports - Replies (4)

Hi Boriel, In my latest game using PRINT in a FUNCTION causes Crash. If I REM out it, it works. Two builds before it was working perfectly, so maybe a reintroduced bug?
I'm sending you the complete source via PM.

Print this item

  Add more library functions
Posted by: britlion - 11-23-2010, 11:59 PM - Forum: Wishlist - Replies (6)

Cool stuff.

I've added it as a code patch to the wiki library section. Are there any others in there, like LCD's proportional print routine or the nascent maths library section that you think are worth calling part of the include pack?

Print this item