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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 268
» Latest member: WestPac
» Forum threads: 950
» Forum posts: 5,983

Full Statistics

Online Users
There are currently 52 online users.
» 0 Member(s) | 51 Guest(s)
Google

Latest Threads
Testing a variable within...
Forum: Help & Support
Last Post: boriel
Yesterday, 11:19 AM
» Replies: 1
» Views: 11
Frogger 50
Forum: Gallery
Last Post: boriel
01-23-2022, 08:21 PM
» Replies: 2
» Views: 47
snake game
Forum: Gallery
Last Post: boriel
01-21-2022, 08:23 PM
» Replies: 1
» Views: 37
Problem with compiling ga...
Forum: Help & Support
Last Post: boriel
12-29-2021, 10:02 PM
» Replies: 1
» Views: 159
ZXBC to target 128K BIOS ...
Forum: Help & Support
Last Post: RandomiserUsr
12-28-2021, 01:42 PM
» Replies: 2
» Views: 209
ORG 60000 - LEN(compiled ...
Forum: ZX Basic Compiler
Last Post: Ljg701
12-03-2021, 02:00 PM
» Replies: 1
» Views: 302
BASIC FROGGER
Forum: Gallery
Last Post: boriel
11-15-2021, 11:02 PM
» Replies: 5
» Views: 1,118
Conditional operator?
Forum: Wishlist
Last Post: einar
11-01-2021, 09:12 PM
» Replies: 8
» Views: 5,473
for without next error
Forum: Help & Support
Last Post: maeloterkim
10-12-2021, 04:15 PM
» Replies: 3
» Views: 648
Debugging
Forum: Help & Support
Last Post: boriel
10-11-2021, 12:45 PM
» Replies: 7
» Views: 4,111

 
  Testing a variable within a range
Posted by: worcestersource - 01-27-2022, 08:14 PM - Forum: Help & Support - Replies (1)

Hello!

I was wondering if there was a better way of testing whether a variable was within a range.

So instead of:

Code:
IF a > 0 and a < 30 then...

There was a neater and/or more memory efficient method? These sorts of tricks that can help us eke out every last drop out of zxbasic. Smile

Cheers,


Steve

Print this item

Big Grin Frogger 50
Posted by: Jbizzel - 01-23-2022, 02:53 PM - Forum: Gallery - Replies (2)

OK, I've been at it again. 

FROGGER 50

Changes:

Cool loading screen
Music - Cars by Gary Newman (Get it???)
New BeeperFX sound routines
The original boasted as many UDG as is possible - now there are even more!
Changes to the graphics
re compiled in ZX Basic
Many code tweaks, changes and improvements

keys are 1,9,0 - I couldn't bring myself to change them.




https://www.spectrumcomputing.co.uk/foru...f=3&t=6287

[Image: Frog.jpg]

Print this item

  snake game
Posted by: Jbizzel - 01-21-2022, 06:06 PM - Forum: Gallery - Replies (1)

He is a game I made while leaning ZX basic

It has 5 levels of speed and some nice beeper tracks Smile

SNAKE game

[Image: 0037666-load-1.scr&border=0]

Print this item

  Problem with compiling game
Posted by: retrofan - 12-29-2021, 03:03 PM - Forum: Help & Support - Replies (1)

On the spectrumcomputing forum we are struggling to compile a frogger basic game with Boriel Compiler.
https://spectrumcomputing.co.uk/forums/v...=21&t=6057
We have made some progress (in .bas file), but the game is still far from fully functional.

Any help would be welcome...



Attached Files
.zip   frogger_cass50.zip (Size: 4.96 KB / Downloads: 45)
Print this item

  ZXBC to target 128K BIOS ROM
Posted by: RandomiserUsr - 12-27-2021, 02:54 PM - Forum: Help & Support - Replies (2)

Very quick question,

 could ZXBC target a 128K BIOS ROM in the asm compile routines?

I'm expecting a "no" 

thanks 
Smile Smile

Print this item

  ORG 60000 - LEN(compiled code)
Posted by: zarsoft - 12-03-2021, 09:54 AM - Forum: ZX Basic Compiler - Replies (1)

Hi
I want to put the code on top memory.
How do I know the length of the compiled code?

Print this item

  for without next error
Posted by: maeloterkim - 10-10-2021, 02:22 PM - Forum: Help & Support - Replies (3)

Hi

I found that if i dont write a  next in a for the compiler only says "error: Unexpected end of file"

pointing to the LAST LINE  of the program

if i only have a few lines is "easy" to find the error

but if i have 2000 or more lines is a crazy thing to find the error

Can the compiler add a rule to search if every FOR have a NEXT and throw the error  "for without next" ?

This way is more easy to find the error in a BIG program with a lot of lines

You can look the example code



''EXAMPLE CODE WITH EXPLAINED ERROR

dim example as uByte = 0

for example = 0 to 10

    print example

'' THE NEXT MUST GO HERE IN LINE 9 but the compiler logically dont know that
'' BUT Can the compiler say  "error: for without next"
'' instead of "19: error: Unexpected end of file" ?
'' because if we have 2000 or more lines
'' and we dont know what happens
'' is a crazy thing search that error


print "end of program"

Print this item

  BASIC FROGGER
Posted by: maeloterkim - 10-04-2021, 10:14 PM - Forum: Gallery - Replies (5)

After all the hacking questions about the compiler i ended the game and is presented to bytemanicos contest

The game is BASIC FROGGER

Enjoy the attached file basicFrogg.tap



Attached Files
.tap   basicFrogg.tap (Size: 45.91 KB / Downloads: 5)
Print this item

  not updating the DF CC variable
Posted by: maeloterkim - 10-01-2021, 08:46 AM - Forum: Help & Support - Replies (3)

Hi

In the original ZX spectrum basic when you PRINT something the variable DF CC is updated with the screen position

for example the next program must print 16384 that is the first position of the screen

but the only answer always with every diferent position is 16448

this means that the print routine is not updating the DF CC variable like the original ROM

Is this a bug?

You can try this program and change the coordinates of the first print 0,0

Code:
dim myScreen as uInteger

print at 0,0; 
myScreen = peek (uInteger, 23684)  '' 23684 = DFCC = Must be screen position after every print
print at 10,10; myScreen

Print this item

  zx0 compression corruption on decompressing
Posted by: RandomiserUsr - 09-29-2021, 06:50 PM - Forum: Bug Reports - Replies (3)

Since zxbc.py 1.15.3-beta9 the following is causing screen corruption

dzx0Standard(@Pic1, 16384)

Pic1:
asm
incbin "pic1.scr.zx0"
end asm

The same thing happens for text uncompressing.

See attachments for all of the files.

The same code works fine on 1.15.2 stable

Thanks

.zip   zx0picbug.zip (Size: 2.75 KB / Downloads: 101)

Print this item