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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 259
» Latest member: JasonSmirl
» Forum threads: 1,073
» Forum posts: 6,437

Full Statistics

Online Users
There are currently 329 online users.
» 0 Member(s) | 326 Guest(s)
Bing, Google, Yandex

Latest Threads
Strange Happenings
Forum: Bug Reports
Last Post: boriel
05-23-2025, 09:15 AM
» Replies: 4
» Views: 930
.tap file code not execut...
Forum: Help & Support
Last Post: Zoran
04-28-2025, 10:59 AM
» Replies: 4
» Views: 1,225
Exit from more than one l...
Forum: Wishlist
Last Post: Duefectu
04-23-2025, 10:06 PM
» Replies: 3
» Views: 989
put small ASM programs li...
Forum: How-To & Tutorials
Last Post: Zoran
04-18-2025, 02:02 PM
» Replies: 6
» Views: 2,751
Creating +3 Menus - Loadi...
Forum: Help & Support
Last Post: merlinkv
04-16-2025, 02:08 PM
» Replies: 6
» Views: 1,650
Randomize not very random...
Forum: Help & Support
Last Post: Zoran
04-08-2025, 10:40 AM
» Replies: 4
» Views: 1,736
Scope rules
Forum: Bug Reports
Last Post: Zoran
04-04-2025, 09:46 AM
» Replies: 2
» Views: 876
Using constants not allow...
Forum: Bug Reports
Last Post: baltasarq
03-19-2025, 10:00 PM
» Replies: 8
» Views: 2,226
404 page not found
Forum: Documentation
Last Post: boriel
03-08-2025, 07:16 PM
» Replies: 5
» Views: 3,696
Spectrum keywords codes
Forum: Bug Reports
Last Post: boriel
03-08-2025, 11:00 AM
» Replies: 1
» Views: 773

 
  Spectrum BASIC Dialects
Posted by: Dorogusha - 08-31-2020, 04:22 PM - Forum: Wishlist - Replies (3)

Support for common dialects can be implemented.
In the librares (modules).

48 BASIC
128 BASIC (Where is PLAY & SPECTRUM ?)
+3 BASIC
TR-DOS

PRO-DOS
Laser BASIC
Mega BASIC
Beta BASIC
Softek IS
Softek FP


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.
It is not necessary to use the words LET and SUB in the program, but it is advisable when declaring ...
It is permissible to use signs that an object belongs to a particular type (using letters !,%, $ Or color), as well as an statement to a particular library (to understand where it came from).
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.

Print this item

  SELECT/CASE ... END SELECT
Posted by: Neurox66 - 08-26-2020, 03:55 PM - Forum: Wishlist - Replies (2)

Hi,
I would like to see  available on the ZX Basic the control flow statements SELECT/CASE ... END SELECT

Code:
Select Case Answer$
    Case "YES"
        ...
    Case "NO"
        ...
    Case "MAYBE"
        ...
    Default
        ...
End Select

Thanks,
Paolo

Print this item

  Dynamic Interrupt Routine
Posted by: emook - 08-17-2020, 11:56 PM - Forum: How-To & Tutorials - Replies (6)

A simple dynamic IM routine, it will automatically find the nearest suitable IM jump from, ie you can compile at any address. Best to keep below $C000 if you have any paging plans. 

Code:
dim bx as ubyte

Sub SetUpIM()
asm
    di
    ld hl,IMvect
    ld de,IMvect+1
    ld bc,257
    ld a,h
    ld i,a
    ld (hl),a
    ldir
    ld h,a : ld l, a : ld a,$c3 : ld (hl),a : inc hl
    ld de,._ISR : ld (hl),e : inc hl : ld (hl),d
    IM 2
    ei
end asm
end sub


Sub fastcall ISR()

    asm
    push af : push bc : push hl : push de : push ix : push iy
    ex af,af'
    push af : exx
    
    end asm
    
    MyCustomIM()
    
    asm
    
    exx : pop af
    ex af,af'
    pop iy : pop ix : pop de : pop hl : pop bc : pop af
    ei
    'jp 56 uncomment for running with basic
    end asm

end sub

sub MyCustomIM()

    bx = bx + 1 BAND 7 : border bx

end sub

SetUpIM()
'stop uncomment for running in basic

Do
    For y  = 0 to 20
        print at y,0; "testing .... ";bx 
    next y
Loop

ISR()     ' call to ensure ISR doesn't get optimized!

Imtable:
ASM
    ALIGN 256
    IMvect:
    defs 257,0
end asm

Print this item

  WindowScrollUp (x1, y1, x2, y2, num_chars)
Posted by: .fito. - 07-17-2020, 10:41 PM - Forum: Wishlist - Replies (3)

hola compañero.

primero decirte que tu herramienta zxb es una maravilla y le está dando una nueva vida al spectrum.

He estado practicando con las funciones scrollup, scrolldown, ...left, right de pixel a pixel y son una maravilla.

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.

mil gracias.


Dejo por aquí una traducción de andar por casa por respeto a todo el mundo:

Hello mate.

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.

thank you.

Print this item

  Compiling errors
Posted by: Jodo - 07-13-2020, 02:14 PM - Forum: Help & Support - Replies (10)

Hi,

I'm trying to compile a game written wholly in Sinclair BASIC and am having trouble with this line:

10 GOTO INT (RND*4)*6+1380


It works as expected when run as Basic but the compiler gives: 'Syntax Error. Unexpected token 'INT' <INT>'

If I rewrite it to:

10 LET a=INT (RND*4)*6+1380: GOTO a

this also works fine when run as Basic but the compiler gives: 'identifier 'a' is a var, not a label'

Is there another way I could write it that would compile?

Thanks.

Print this item

  Compiling pure Sinclair Basic
Posted by: Jodo - 07-10-2020, 12:36 PM - Forum: ZX Basic Compiler - Replies (3)

Hi,
As per the subject, I'm trying to compile pure Sinclair Basic but am getting the following errors which I can't find anything about.

bwall.bas:4: Error: invalid directive #Run
bwall.bas:4: Error: illegal preprocessor character '-'

bwall.bas:68: Error: invalid directive #End
bwall.bas:68: Error: illegal preprocessor character '-'

I used this command: 'zxb bwall.bas --tzx --BASIC --autorun --sinclair --explicit' to compile
but have also tried without '--sinclair' and '--explicit' with the same results.

If anybody has any ideas I would be really appreciative. Thanks.

Print this item

  Ad Lunam Plus
Posted by: Alessandro - 07-09-2020, 03:35 PM - Forum: Gallery - Replies (3)

Ad Lunam was a proof of concept, designed to fit into the humble 48K. Here is its big brother, Ad Lunam Plus.

[Image: alp01.png]

The game is now a 128K exclusive - although I have, as for several of my other titles, considered to make a TR-DOS version which can be run on the 48K with a DivIDE/DivMMC. and ESXDOS - and features graphics for many of its sections and AY sound for national anthems and end-of-game congratulations.

[Image: alp02.png]
Will you impersonate Von Braun or Korolev?

[Image: alp04.png]
The main menu

There are other tweakings and enhancements, for instance "pilots" are now aptly called "astronauts" and "cosmonauts" and you can even see their faces when selecting them for training.

[Image: alp07.png]
Choose an ability to train John Glenn in

In the R&D section, you are now able to see pictures of what you are actually researching.

[Image: alp05.png]
Soviet research and development main menu

[Image: alp06.png]
American rockets

Facilities (previously called "structures") can also be seen now, even when they are under construction/repair.

[Image: alp10.png]
The advanced training facility is being built, while launch pad 1 hosts a rocket for a planned mission

You can now follow missions from the control room.

[Image: alp08.png]
Engines started, lift off

End-of-turn messages and communications will be shown as papers on a desktop.

[Image: alp09.png]
The president is pleased with our work

The game is currently at version 1.0 and like its predecessor is available in Italian, English and Spanish. Please report any feedback about possible bugs/strange behavior/typos etc. here or to my email address (shown in the manual).

Enjoy!

Download

Print this item

  Python warning about unused parameter
Posted by: mauvedeity - 07-06-2020, 01:59 PM - Forum: Bug Reports - Replies (1)

Hi,

When compiling programs, using zxbc.py 1.11.1, I get a python warning message:

Code:
/Users/mauvedeity/bin/zxbasic/library/print64.bas:20: warning: Parameter 'characters' is never used
I appreciate this is just a warning, but is there something that we can do about this? Many thanks.

Print this item

  Geany support
Posted by: britlion - 06-17-2020, 07:28 PM - Forum: Wishlist - Replies (1)

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?

Never made one, so it could be trivial, or a pain!

Print this item

Bug Python Errors when compiling (*solved*)
Posted by: mauvedeity - 05-24-2020, 06:31 PM - Forum: Bug Reports - Replies (3)

I'm using Boriel 1.9.8 (I think) on MacOS 10.15.4 with Python3 (version 3.7.7, installed via HomeBrew). I'm invoking Boriel thusly:

Code:
python3 ~/bin/zxbasic/zxb.py bugreport1.bas --tzx --BASIC --autorun
However, each time I try to compile, I get a bunch of Python diagnostics:
Quote:/Users/mauvedeity/bin/zxbasic/ply/lex.py:760: FutureWarning: Possible nested set at position 10
  c = re.compile('(?P<%s>%s)' % (fname, _get_regex(f)), self.reflags)
/Users/mauvedeity/bin/zxbasic/ply/lex.py:498: FutureWarning: Possible nested set at position 274
  lexre = re.compile(regex, reflags)

I still get the TZX file I asked for, but I'm wondering what I'm doing wrong here.
I've since found that I get these errors even if I invoke Boriel without any arguments.
Any suggestions? Any more information I can provide?

Print this item