Welcome, Guest |
You have to register before you can post on our site.
|
Online Users |
There are currently 209 online users. » 0 Member(s) | 206 Guest(s) Applebot, Bing, Google
|
Latest Threads |
.tap file code not execut...
Forum: Help & Support
Last Post: Zoran
04-28-2025, 10:59 AM
» Replies: 4
» Views: 319
|
Exit from more than one l...
Forum: Wishlist
Last Post: Duefectu
04-23-2025, 10:06 PM
» Replies: 3
» Views: 300
|
put small ASM programs li...
Forum: How-To & Tutorials
Last Post: Zoran
04-18-2025, 02:02 PM
» Replies: 6
» Views: 1,600
|
Creating +3 Menus - Loadi...
Forum: Help & Support
Last Post: merlinkv
04-16-2025, 02:08 PM
» Replies: 6
» Views: 554
|
Randomize not very random...
Forum: Help & Support
Last Post: Zoran
04-08-2025, 10:40 AM
» Replies: 4
» Views: 893
|
Scope rules
Forum: Bug Reports
Last Post: Zoran
04-04-2025, 09:46 AM
» Replies: 2
» Views: 328
|
Using constants not allow...
Forum: Bug Reports
Last Post: baltasarq
03-19-2025, 10:00 PM
» Replies: 8
» Views: 1,066
|
404 page not found
Forum: Documentation
Last Post: boriel
03-08-2025, 07:16 PM
» Replies: 5
» Views: 2,886
|
Spectrum keywords codes
Forum: Bug Reports
Last Post: boriel
03-08-2025, 11:00 AM
» Replies: 1
» Views: 419
|
ZXodus][Engine
Forum: ZX Basic Compiler
Last Post: boriel
02-19-2025, 11:43 PM
» Replies: 69
» Views: 213,808
|
|
|
RANDOMIZE USR issue |
Posted by: LukeBord1 - 11-23-2017, 08:16 PM - Forum: Help & Support
- Replies (15)
|
 |
I'm trying to compile a short menu program including a RANDOMIZE USR command which calls an external assembly routine (tested).
Using both the latest ZXB v.1.7.2 and the previous v.1.6.12, the compiled program freezes. Recompiling it without the RANDOMIZE USR command, all goes ok!
Even trying to change the memory addresses, it seems the problem persists between the RANDOMIZE USR instruction and something inside the code...
Code: DIM y,a,i AS UBYTE
y=10: a=0: i=1
10 BORDER 0: PAPER 0: INK 0: CLS: POKE 32005,0
RANDOMIZE USR (address of the external tested routine)
20 PRINT AT y,11; BRIGHT 1; OVER 1; INK i;" "
IF a < 10 THEN a=a+1
ELSE a=0
END IF
IF a=10 THEN
IF i < 7 THEN i=i+1
ELSE i=1
END IF: END IF
IF (INKEY="1" AND y <> 10) THEN GOSUB 70: y=10: POKE 32005,0: END IF
IF (INKEY="2" AND y <> 11) THEN GOSUB 70: y=11: POKE 32005,1: END IF
IF INKEY="3" THEN BEEP .04,50: RANDOMIZE USR (game start address): GO TO 10: END IF
GO TO 20
70 PRINT AT y,11; BRIGHT 0; OVER 1; INK 7;" ": BEEP .04,50: RETURN
Thoughts?
|
|
|
Question about the ORG value |
Posted by: LukeBord1 - 11-18-2017, 04:37 PM - Forum: How-To & Tutorials
- Replies (3)
|
 |
Maybe the question could result dumb to Assembly experts; however, is there a way to make an ORiGin memory address flexible? Saying it more clearly, even setting an ORG value in the ZXB commandline, is there a way to import the code into a new memory address?
|
|
|
New version 1.7.0 released! |
Posted by: boriel - 10-06-2017, 10:17 PM - Forum: ZX Basic Compiler
- Replies (3)
|
 |
Well, long time I don't announce new releases here (usually goes to Facebook or twitter).
This one is version 1.7.0 which includes:
- Some fixes and better stability
- Added (finally! 8) ) READ, DATA and RESTORE which, essentially work very much like the ones in Sinclair BASIC (i.e. DATA with complex expressions supported)
- Can now call SUBs with no parenthesis: mysub 1, 5, a, 3*c (expanded syntax)
- Can now call FUNctions with 1 or no parameters with no parenthesis.
Download it here: https://zxbasic.readthedocs.io/en/latest/archive/
|
|
|
|