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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 260
» Latest member: Jamesflina
» Forum threads: 1,075
» Forum posts: 6,435

Full Statistics

Online Users
There are currently 190 online users.
» 0 Member(s) | 188 Guest(s)
Bing, Google

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

 
  Nexting a For from an IF...THEN
Posted by: ardentcrest - 02-17-2015, 01:36 PM - Forum: Help & Support - Replies (2)

Me again Big Grin

Code:
2004 for xx=length to 1 step -1
2006    if z$(xx)=" " then next xx

Syntax Error. Unexpected token 'NEXT' <NEXT>



Why are the hard thing easy, and what should be easy hard Tongue

Print this item

  Using inkey
Posted by: ardentcrest - 01-20-2015, 02:31 PM - Forum: Help & Support - Replies (13)

Any one know how to do something like this

I'm looking to use inkey$ to create a line of text while the program is doing some other things Ie

LOOP
DO THING 1
INKEY(text string)
DO THING 2
IF ENTER PRINT(text String)
GOTO LOOP

any help on this

Print this item

  SAVE inside SUB freezes the program (*solved*)
Posted by: juanjo - 01-13-2015, 05:59 AM - Forum: Bug Reports - Replies (4)

I'm making a program to print customized labels with the ZX Printer. I was going to make load/save of label data.
The problem is when using SAVE in any of its variants inside a SUB. It freezes after saving is done, and the saved data is different from when the SAVE is done in the 'main block'.

The LOAD command does work inside a SUB.

I don't know if it has some relation to the previous bug report about SAVE:
<!-- l --><a class="postlink-local" href="http://www.boriel.com/forum/bug-reports/save-bug-solved-t858.html">bug-reports/save-bug-solved-t858.html</a><!-- l -->

Here is a little program that reproduces the error:

Code:
dim variableToSave as uinteger
variableToSave = 1234

sub saveSomething()
    ' This freezes the program AFTER saving is done
    save "test1" DATA variableToSave
    
    ' This freezes the program AFTER saving is done and shows a funny "demo"
    'save "test1" screen$
end sub

sub waitForAKey()

    while inkey$=""
    end while
    
    while inkey$<>""
    end while

end sub


print "Press any key to start save..."
waitForAKey()

saveSomething()

'This works (in the main block)
'save "test1" DATA variableToSave

print "Save done. Press any key to continue..."
waitForAKey()

' Do some random stuff (the Spectrum freezes before reaching here):
dim i as uinteger
i = 2 + 2
print "i = "; i

print "Press any key to exit..."
waitForAKey()

Print this item

  [pv1000] Simon
Posted by: nitrofurano - 01-06-2015, 02:24 PM - Forum: Other Archs - Replies (6)

the first game i'm coding for Casio PV1000, adapting a type-in code from MicroHobby magazine



Attached Files
.zip   simon_pv1000.zip (Size: 48.26 KB / Downloads: 982)
Print this item

  Array initialization bug (*solved*)
Posted by: einar - 12-23-2014, 02:28 AM - Forum: Bug Reports - Replies (8)

My next ZX BASIC game requires a lookup table for variable sized data.

The simplest solution would be something like this:

Code:
data1:
    asm
        defb 0,1,2,3,4,5
    end asm
data2:
    asm
        defb 6,7,8
    end asm
data3:
    asm
        defb 9,10,11,12
    end asm

DIM array(1 TO 3) AS UINTEGER = { @data1, @data2, @data3 }

But compiling this program using latest version of ZX BASIC (incorrectly) produces the following error messages:

Code:
prog.bas:14: Initializer expression is not constant.
prog.bas:14: Initializer expression is not constant.
prog.bas:14: Initializer expression is not constant.

Another alternative would be declaring the lookup table directly in ASM, but ZX BASIC doesn't support mapping arrays to memory addresses either:

Code:
DIM array(1 TO 3) AS UINTEGER AT @data

For now, I'm implementing everything "manually" instead of using ZX BASIC arrays. But it would be nice if this problem could be fixed in future releases! Smile

Print this item

  [pv1000] first test
Posted by: nitrofurano - 12-19-2014, 02:17 PM - Forum: Other Archs - Replies (3)

first test for the Casio PV-1000 game console - i still don’t know how the joystick works



Attached Files
.zip   example01d_io_notworking.zip (Size: 29.73 KB / Downloads: 791)
Print this item

  [capcom-vulgus] first test
Posted by: nitrofurano - 11-20-2014, 05:39 PM - Forum: Other Archs - Replies (1)

first test for the Capcom’s Vulgus arcade machine
( the wiki page related to this thread is at <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Released_Programs_-_CapcomVulgus">http://www.boriel.com/wiki/en/index.php ... pcomVulgus</a><!-- m --> )



Attached Files
.zip   example01f_working.zip (Size: 130.98 KB / Downloads: 951)
Print this item

  [zx81] first test (not working yet)
Posted by: nitrofurano - 11-16-2014, 04:22 PM - Forum: Other Archs - No Replies

first test for ZX81 - it shows something, but i really have no idea what is wrong there - stack and variables area? bios routines call? something that might be missing?



Attached Files
.zip   example01f.zip (Size: 12.82 KB / Downloads: 746)
Print this item

  [mc1000] random tiles test
Posted by: nitrofurano - 11-15-2014, 07:29 PM - Forum: Other Archs - No Replies

first test for the display mode 152 on MC1000 (a rare Brazilian home computer, a bit similar to Nec PC6001, same cpu and display processor)



Attached Files
.zip   mode152_128x192brgy.zip (Size: 47.59 KB / Downloads: 806)
Print this item

  [samcoupe] first test
Posted by: nitrofurano - 11-15-2014, 04:14 PM - Forum: Other Archs - Replies (4)

first test for the display mode 1 on Sam Coupé home computer



Attached Files
.zip   samcoupe_example1_mode1_03.zip (Size: 10.73 KB / Downloads: 1129)
Print this item