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

 
  Vim users
Posted by: slenkar - 02-21-2011, 10:57 PM - Forum: Help & Support - Replies (1)

I can highlight the syntax but how do people use the zxb.exe compiler with vim?

Print this item

  compiler error (*solved*)
Posted by: slenkar - 02-21-2011, 12:00 AM - Forum: Bug Reports - Replies (3)

i tried a simple program:

print "l"

and here is the output

Building file - wars.bas...
DOS: C:\Boriel Tm\ZX Basic Compiler\zxb.exe -T -B -a wars.bas
Traceback (most recent call last):
File "zxb.py", line 310, in <module>
File "zxb.py", line 244, in main
File "zxbtrad.pyc", line 1285, in traverse
File "zxbparser.pyc", line 823, in __get_type
AttributeError: 'SymbolSENTENCE' object has no attribute '_type'

Print this item

  Good song
Posted by: slenkar - 02-19-2011, 07:35 PM - Forum: Off-Topic - No Replies

<!-- m --><a class="postlink" href="http://www.youtube.com/watch?v=Wg7l2wKb3aA">http://www.youtube.com/watch?v=Wg7l2wKb3aA</a><!-- m -->

Print this item

  Apotheosis
Posted by: slenkar - 02-19-2011, 03:35 AM - Forum: Off-Topic - No Replies

Its quite cool to program a spectrum, because I owned one when I was 7 until the age of about 11 and I gave up on understanding Basic

Print this item

  Rnd help please
Posted by: slenkar - 02-18-2011, 07:47 PM - Forum: Help & Support - Replies (5)

heres my code

Code:
POKE Uinteger 23675, @MyUdgBlock
randomize
BORDER 7 : PAPER 7 : INK 0 : CLS
  PRINT AT 3,13 ; PAPER 1 ; INK 7 ; "BattleField"
  PRINT AT 5,9 ; PAPER 7 ; INK 0 ; "Q - Up"
  PRINT AT 6,9 ; PAPER 7 ; INK 0 ; "A - Down"
  PRINT AT 7,9 ; PAPER 7 ; INK 0 ; "O - Left"
  PRINT AT 8,9 ; PAPER 7 ; INK 0 ; "P - Right"
  PRINT AT 9,9 ; PAPER 7 ; INK 0 ; "M - Select"

  PRINT AT 10,3 ; PAPER 7 ; INK 0 ; "You have to select units"
  PRINT AT 11,3 ; PAPER 7 ; INK 0 ; "to fight the enemy units"
  PRINT AT 15,3 ; PAPER 7 ; INK 0 ; "Press any key to start"

60  LET j$ = INKEY$
  IF j$ = "" THEN GOTO 60: END IF

  Function byterndrange (first As uByte, last As uByte) As uByte
    return Rnd * (last - first) + first
End Function
paper 4
cls
  BORDER 4: INK 0
  
for x=0 to 200
plot  byterndrange(0,255),byterndrange(0,192)
next



Dim BlueFactoryX (6) as uByte
Dim BlueFactoryY (6) as uByte
For x =0 to 5
BlueFactoryX(x)  = byterndrange(1,9)
BlueFactoryY(x)  = byterndrange(1,24)
Next

dim RedFactoryX (6) as uByte
dim RedFactoryY (6) as uByte

For x =0 to 5
RedFactoryX(x)  = byterndrange(28,32)
RedFactoryY(x)  = byterndrange(1,24)
Next


drawFactories()

sub drawFactories()
for x =0 to 5
ink 1
print at BlueFactoryX(x), BlueFactoryY(x); CHR$(144)
ink 2
print at RedFactoryX(x), RedFactoryY(x); CHR$(144)

next
End sub


STOP : REM Avoid execution to enter this zone
MyUdgBlock: REM a simple Label; @Label returns it's memory address
ASM
incbin "factory.BIN"
END ASM

When I draw random dots the rnd function works fine,
but when I draw factories at random positions it doesnt turn out right

I am trying to draw the red ones on the right side of the screen but they end up on the left
the blue ones are all over the screen

Print this item

  compilador separado
Posted by: sindecencia - 02-18-2011, 04:13 PM - Forum: Wishlist - Replies (12)

Hola Boriel
Perdona que escriba en español, pero mi inglés es malísimo.

Más o menos lo que te dije por twitter. Ya que la versión compatible con Sinclair Basic no sería muy útil, sí que se podrías sacar una versión extendida más simple. Se que es mucho trabajo y no te vas a poner después de 2 años, pero ya que es una idea te la comento.
-Quitar el tipo Float Point y todas las rutinas asociadas.
-Simplificar el parser. Por ejemplo impidiendo etiquetas con números y obligar los dos puntos detrás.
-Nuevas librerías de sprites: puedes usar las mismas del z88dk.
-Usar un modo de compilación que no dependa de la ROM. Para este modo los programas serán más largos pero por ejemplo puedes hacer juegos compatibles con interfaz 2.
-Permitir compilar en los primeros 16K. Esto es útil para juegos en cartucho o para usar los modos especiales del +2a y +3.
-Usar el doble buffer. Esto es para modelos +2a y +3 que disponen de video shadow (creo que puedes alternar la página 5 y la 7 como memoria de video)

Print this item

  compilador separado
Posted by: sindecencia - 02-18-2011, 04:07 PM - Forum: Wishlist - Replies (4)

[trans]ES[/trans]
Hola Boriel
Perdona que escriba en español, pero mi inglés es malísimo.

Más o menos lo que te dije por twitter. Ya que la versión compatible con Sinclair Basic no sería muy útil, sí que se podrías sacar una versión extendida más simple. Se que es mucho trabajo y no te vas a poner después de 2 años, pero ya que es una idea te la comento.
-Quitar el tipo Float Point y todas las rutinas asociadas.
-Simplificar el parser. Por ejemplo impidiendo etiquetas con números y obligar los dos puntos detrás.
-Nuevas librerías de sprites: puedes usar las mismas del z88dk.
-Usar un modo de compilación que no dependa de la ROM. Para este modo los programas serán más largos pero por ejemplo puedes hacer juegos compatibles con interfaz 2.
-Permitir compilar en los primeros 16K. Esto es útil para juegos en cartucho o para usar los modos especiales del +2a y +3.
-Usar el doble buffer. Esto es para modelos +2a y +3 que disponen de video shadow (creo que puedes alternar la página 5 y la 7 como memoria de video)

Print this item

  Problems with -Z option (*solved*)
Posted by: LTee - 02-18-2011, 01:36 PM - Forum: Bug Reports - Replies (18)

I seem to be having some weird problems with this latest version.

If I'm compiling without the -Z flag (which provides the extra Speccy stuff like ATTR) then it keeps complaining about "illegal preprocessor characters" in REM statements and doesn't compile. Specifically it seems to be punctuation which is throwing it out - ?, !, etc.

If I do use -Z (or strip those characters out of the REM statements) then it seems to be a coin-toss as to whether I get a workable program or not. Many of my files are compiling to very small TZXs which load and run but do nothing at all (in those cases the compilation seems suspiciously fast).

As a test, I make a simple program like this:

Code:
print "hello world"

If I compile with:
zxb.py test.bas -T -B -a

... then I get a working TZX.

But if I compile with:
zxb.py test.bas -T -B -a -Z

... I get a TZX that loads but does nothing.

If I make the file:
Code:
rem test!
print "hello world"

... then without -Z compilation fails, with -Z compilation succeeds but the program does nothing.


Is anyone else having similar issues? I'm using the Python-based version of 2077 (from the zip) with Python 2.7.1.

Print this item

  compiler error (*solved*)
Posted by: slenkar - 02-15-2011, 04:44 AM - Forum: Bug Reports - Replies (8)

im using the latest beta build

here is my source:

Code:
BORDER 7 : PAPER 7 : INK 0 : CLS
  PRINT AT 3,13 ; PAPER 1 ; INK 7 ; "BattleField"
  PRINT AT 5,9 ; PAPER 7 ; INK 0 ; "Q - Up"
  PRINT AT 6,9 ; PAPER 7 ; INK 0 ; "A - Down"
  PRINT AT 7,9 ; PAPER 7 ; INK 0 ; "O - Left"
  PRINT AT 8,9 ; PAPER 7 ; INK 0 ; "P - Right"
  PRINT AT 9,9 ; PAPER 7 ; INK 0 ; "M - Select"

  PRINT AT 10,3 ; PAPER 7 ; INK 0 ; "You have to select units"
  PRINT AT 11,3 ; PAPER 7 ; INK 0 ; "to fight the enemy units"
  PRINT AT 15,3 ; PAPER 7 ; INK 0 ; "Press any key to start"

60  LET j$ = INKEY$
  IF j$ = "" THEN GOTO 60: END IF

cls
Dim BlueFactoryX (6) as uByte
Dim BlueFactoryY (6) as uByte

for x =1 to 6
BlueFactoryX(x)  = byterndrange(1,30)
BlueFactoryY(x)  = byterndrange(1,30)
next

drawFactories()

function drawFactories()
for x =1 to 6
print at BlueFactoryX(x), BlueFactoryY(x); "O"
next
end function

Function byterndrange (first As uByte, last As uByte) As uByte
    return Rnd * (last - first) + first
End Function

here is the error message when I compile:



Quote:Traceback (most recent call last):
File "zxb.py", line 309, in <module>
File "zxb.py", line 242, in main
File "zxbtrad.pyc", line 316, in traverse
File "zxbtrad.pyc", line 1202, in traverse
File "zxbtrad.pyc", line 217, in emmit_let_left_part
TypeError: bad operand type for unary -: 'NoneType'


also it seems that underscores are not allowed in function names, is this right?

Print this item

  Show off your creativity!
Posted by: boriel - 02-14-2011, 11:25 PM - Forum: Gallery - Replies (54)

Have you created a game or a program with ZX BASIC? Want to show off what you are able to??
Just put here a screenshot (and optionally a .tap or .tzx file) so people can try your game or program.
You needn't to put the source code (so keep your secrets with you) :!:

The only requisite is that your program must be created using ZX BASIC (and optionally other tools). Idea

Print this item