Welcome, Guest |
You have to register before you can post on our site.
|
Online Users |
There are currently 378 online users. » 0 Member(s) | 376 Guest(s) Bing, Google
|
Latest Threads |
.tap file code not execut...
Forum: Help & Support
Last Post: Zoran
04-28-2025, 10:59 AM
» Replies: 4
» Views: 189
|
Exit from more than one l...
Forum: Wishlist
Last Post: Duefectu
04-23-2025, 10:06 PM
» Replies: 3
» Views: 258
|
put small ASM programs li...
Forum: How-To & Tutorials
Last Post: Zoran
04-18-2025, 02:02 PM
» Replies: 6
» Views: 1,521
|
Creating +3 Menus - Loadi...
Forum: Help & Support
Last Post: merlinkv
04-16-2025, 02:08 PM
» Replies: 6
» Views: 512
|
Randomize not very random...
Forum: Help & Support
Last Post: Zoran
04-08-2025, 10:40 AM
» Replies: 4
» Views: 414
|
Scope rules
Forum: Bug Reports
Last Post: Zoran
04-04-2025, 09:46 AM
» Replies: 2
» Views: 287
|
Using constants not allow...
Forum: Bug Reports
Last Post: baltasarq
03-19-2025, 10:00 PM
» Replies: 8
» Views: 1,014
|
404 page not found
Forum: Documentation
Last Post: boriel
03-08-2025, 07:16 PM
» Replies: 5
» Views: 2,852
|
Spectrum keywords codes
Forum: Bug Reports
Last Post: boriel
03-08-2025, 11:00 AM
» Replies: 1
» Views: 395
|
ZXodus][Engine
Forum: ZX Basic Compiler
Last Post: boriel
02-19-2025, 11:43 PM
» Replies: 69
» Views: 213,483
|
|
|
The sound effect thread |
Posted by: worcestersource - 02-19-2022, 12:03 AM - Forum: How-To & Tutorials
- Replies (3)
|
 |
Hello everyone,
I thought this would be a nifty place to pop some routines to make sound effects without resorting to asm.
Code: sub soundBwop()
dim x, y as uByte
do until x = 255
out 254, (y * 8)
let y = x
do until y > 239
let y = y + 16
loop
let x = x + 1
loop
end sub
Which makes a nice 'bwop' sound. it'll also change your border colour, so add the border value to the out statement to stop it changing colour. For example, for the a blue border:
Code: out 254, (y * 8) + 1
You can play around with this, such as changing the 16 for an 8, or making y count down so the loop duration gets longer each time.
Steve
|
|
|
Testing a variable within a range |
Posted by: worcestersource - 01-27-2022, 08:14 PM - Forum: Help & Support
- Replies (11)
|
 |
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. 
Cheers,
Steve
|
|
|
|