| Welcome, Guest |
You have to register before you can post on our site.
|
| Forum Statistics |
» Members: 273
» Latest member: mindlin
» Forum threads: 1,085
» Forum posts: 6,486
Full Statistics
|
| Online Users |
There are currently 49 online users. » 0 Member(s) | 46 Guest(s) Applebot, Bing, Google
|
| Latest Threads |
location of heap manageme...
Forum: Help & Support
Last Post: boriel
2026-03-07, 12:13 AM
» Replies: 1
» Views: 212
|
non-paged supervisor code...
Forum: Help & Support
Last Post: sdo303
2026-02-20, 06:38 PM
» Replies: 8
» Views: 686
|
How to open fuse as an ex...
Forum: How-To & Tutorials
Last Post: Duefectu
2026-02-09, 01:52 PM
» Replies: 3
» Views: 1,062
|
Old zxbasic game errors
Forum: Help & Support
Last Post: boriel
2025-11-09, 11:52 AM
» Replies: 7
» Views: 1,671
|
Error: Undefined GLOBAL l...
Forum: Help & Support
Last Post: ardentcrest
2025-11-04, 05:46 PM
» Replies: 3
» Views: 808
|
A Fast(er) Plot Routine f...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-30, 03:16 PM
» Replies: 2
» Views: 928
|
Hall of Fame - Include fo...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-28, 03:48 PM
» Replies: 0
» Views: 473
|
[SOLVED] Array layout bug...
Forum: Bug Reports
Last Post: Zoran
2025-10-25, 05:48 PM
» Replies: 2
» Views: 942
|
3DOS Commands?
Forum: Help & Support
Last Post: boriel
2025-10-06, 02:54 PM
» Replies: 3
» Views: 1,105
|
CLS/Fade out ASM Sub-rout...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-05, 03:39 PM
» Replies: 2
» Views: 835
|
|
|
| Bit shift bug. (*solved*) |
|
Posted by: britlion - 2012-11-17, 04:16 PM - Forum: Bug Reports
- Replies (5)
|
 |
Bit shift by 0, when 0 is from a variable=0, which is incorrect!
Code: DIM num as uByte=1
DIM num2 as uByte=0
PRINT num
PRINT (num<<0)
PRINT (num<<num2)
All three lines should read "1"
|
|
|
| Print String Bug (*solved*) |
|
Posted by: britlion - 2012-11-12, 11:41 PM - Forum: Bug Reports
- Replies (14)
|
 |
Confirmed - this demonstrates it. zxb 1.3.0-s928
Code: DIM score as uLong
SUB displayScore(amount as ulong)
ink 2
dim a$ as string
a$="000000"+STR$(amount)
print at 12,12;a$(LEN a$-7 TO);"#"
END SUB
FOR score= 0 to 1000000 step 10
displayScore(score)
NEXT score
Should print a string, followed by a # - but the # ends up printing OVER the prior string, not after it and then on the next line and all over the place - the printed string seems to print beyond where it should. Seems to work on some numbers - so perhaps it's a STR$ bug? Though I think I've seen it on non STR$ stuff.
I just spent ages recompiling Berksman trying to find where on earth it was printing blank data across half the screen - It was the print line above! Not my fault!
|
|
|
| Not so much a bug, as slow! |
|
Posted by: britlion - 2012-11-11, 05:05 PM - Forum: Bug Reports
- Replies (24)
|
 |
This program was posted on the WOS forums:
Code: For x=-100 To 100
For y=-100 To 100
If (x/2-25)*(x/2-25)+(y-50)*(y-50)<200 Or (x/2+25)*(x/2+25)+(y-50)*(y-50)<200 then plot x+100,96-y
Next y
Next x
And if run as is, takes about 9 seconds in Basic, I think.
As ZX Basic:
Code: FUNCTION t() as uLong
asm
DI
LD DE,(23674)
LD D,0
LD HL,(23672)
EI
end asm
end function
DIM x,y as integer
DIM time as uLONG
time=t()
For x=-100 To 100
For y=-100 To 100
If (x/2-25)*(x/2-25)+(y-50)*(y-50)<200 Or (x/2+25)*(x/2+25)+(y-50)*(y-50)<200 then plot x+100,96-y
END IF
Next y
Next x
time=t()-time
print CAST(float,time)/50
It takes 53 seconds!
|
|
|
| Label as a string var |
|
Posted by: oblo - 2012-11-06, 09:56 PM - Forum: ZX Basic Compiler
- Replies (3)
|
 |
Hi all
Long time no see around here :oops: but now I'm getting some free time to spend with ZX Basic, so I hope to come more often 
In fact, I have a question: I want to store a label name in a variable, in order to do GOSUBs using a var, not fixed names. I made this code so far, but it fails with the message 'identifier 'eti$' is a var, not a label':
Code: #INCLUDE <keys.bas>
paper 0: border 0: ink 7: cls
dim eti$
eti$="l01"
while 1=1
if Multikeys(KEY1)<>0 then
eti$="l01"
gosub eti$
elseif Multikeys(KEY2)<>0 then
eti$="l02"
gosub eti$
elseif Multikeys(KEY3)<>0 then
eti$="l03"
gosub eti$
end If
end While
l01:
print at 0,0;ink 1;"ESTAS EN LA ETI1";
RETURN
l02:
print at 0,0;ink 2;"ESTAS EN LA ETI2";
RETURN
l03:
print at 0,0;ink 3;"ESTAS EN LA ETI3";
RETURN
Can be it done or what I'm asking is impossible right now? Note that I'm asking for a string, not numbers.
Thanks and regards
|
|
|
| Default Strings |
|
Posted by: compiuter - 2012-11-05, 11:07 AM - Forum: Wishlist
- Replies (1)
|
 |
I don“t know about the default strings, but old compilers had options to select string length, my question is about effect of retail length of strings. Example: DefaultShort=8 chars DefaultLong=32 chars.
What do you think of this?
|
|
|
| Some glitches (*solved*) |
|
Posted by: LCD - 2012-10-13, 08:38 PM - Forum: Bug Reports
- Replies (12)
|
 |
So, I found some glitches again.
1. In Optimisation modes when procedures (e.g. dummy procedures for ASM containers as used in BeepFX) are not called, ZXBC shows a warning that procedures are not used, but exit with exitcode 1 (Error).
2. Assigning part of String variables do not work. Compiler says, Variable is not Array, but in Sinclair BASIC it works. This example changes string "Test188" to "Tezt188".
Code: 10 LET a$="Test188"
20 PRINT a$(3)
30 LET a$(3)="z"
40 PRINT a$
3. This crases the Spectrum when compiled:
|
|
|
| DIM var ... AT @address (*solved*) |
|
Posted by: LCD - 2012-10-11, 09:56 PM - Forum: Bug Reports
- Replies (7)
|
 |
Hi Boriel.
The Address of a label or variable is afaik a constant (@label/@variable), so I wonder why it is not possible to use it in the DIM:
Code: DIM variable AS UINTEGER AT @label
is rejected by the compiler.
I understand why it would reject variables, even if this would be useful, but @labels or @variablenames should be IMHO not rejected. I just noticed the saved space when using DIMed variable to a adress and then equation label=variable over POKE UINTEGER @label,value. Used this technique in "Yumiko in the haunted Mansion" to read and write frames counter system variable. This made a lot stuff simpler.
|
|
|
| Randomize problem? (*solved*) |
|
Posted by: na_th_an - 2012-09-27, 11:52 AM - Forum: Bug Reports
- Replies (7)
|
 |
I've searched the forums about this issue but I haven't found anything.
I gather that RANDOMIZE uses the timer to seed the variable, doesn't it? So this program, depending on the time I take to press the key, should render different numbers. Well, the result is always 6.
Code: Print "PRESS KEY": Pause 0
Randomize
Let a = Int (Rnd * 10)
Print a
If I try...
Code: '''
Dim a as uByte
Dim b as uByte
Print "PRESS KEY": Pause 0
b = Peek 23672
Print "FRAMES LSB IS "; b
Randomize b
let a = Int (Rnd * 10)
Print a
The result is always 0, no matter which value is in b. This shouldn't be!
I'm using 1.2.9-s888
|
|
|
|