| Welcome, Guest |
You have to register before you can post on our site.
|
| Online Users |
There are currently 96 online users. » 0 Member(s) | 93 Guest(s) Baidu, Bing, Google
|
| Latest Threads |
Old zxbasic game errors
Forum: Help & Support
Last Post: boriel
2025-11-09, 11:52 AM
» Replies: 7
» Views: 141
|
Error: Undefined GLOBAL l...
Forum: Help & Support
Last Post: ardentcrest
2025-11-04, 05:46 PM
» Replies: 3
» Views: 110
|
A Fast(er) Plot Routine f...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-30, 03:16 PM
» Replies: 2
» Views: 160
|
Hall of Fame - Include fo...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-28, 03:48 PM
» Replies: 0
» Views: 92
|
[SOLVED] Array layout bug...
Forum: Bug Reports
Last Post: Zoran
2025-10-25, 05:48 PM
» Replies: 2
» Views: 219
|
3DOS Commands?
Forum: Help & Support
Last Post: boriel
2025-10-06, 02:54 PM
» Replies: 3
» Views: 383
|
How to open fuse as an ex...
Forum: How-To & Tutorials
Last Post: zedex82
2025-10-05, 07:36 PM
» Replies: 2
» Views: 280
|
CLS/Fade out ASM Sub-rout...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-05, 03:39 PM
» Replies: 2
» Views: 273
|
ZX Basic Studio Bugs
Forum: Bug Reports
Last Post: Duefectu
2025-09-23, 04:07 PM
» Replies: 5
» Views: 1,083
|
Printing with FZX
Forum: Help & Support
Last Post: boriel
2025-07-17, 10:08 PM
» Replies: 1
» Views: 1,966
|
|
|
| Passing strings to assembler |
|
Posted by: Uto - 2016-10-09, 12:28 PM - Forum: Help & Support
- Replies (1)
|
 |
Hi,
I have this code:
Code: .....
PRINT "Please enter text:"
LET a$= INPUT(8)
SAVEFILE(a$)
.....
SUB fastcall SAVEFILE(name as String)
ASM
.....
END ASM
END SUB
I need to get the string value in the ASM function, and I was expecting having a pointer to it as the second value in stack (so POP HL, POP DE, PUSH HL will keep the return adress in stack and DE as pointer to the string), but it doesn't seem to work like that, How could I get the string parameter from assembler?
|
|
|
| Using ZX Basic to create ESXDOS dot commands |
|
Posted by: Uto - 2016-07-16, 01:18 PM - Forum: Help & Support
- Replies (5)
|
 |
Hello all,
I'm new to ZXBasic, but despite of that I've managed to properly build and application using it (<!-- m --><a class="postlink" href="https://github.com/Utodev/ZXCU">https://github.com/Utodev/ZXCU</a><!-- m -->). I've found ZXBasic and its extension a great help to build that application, so first of all, thank you for building this tool.
The application is a menu driven setup application for Zx-Uno spectrum clone, built for latest core avaliable so far. While providing this application as .tap file may be OK, I wanted to try to compile it so it is a ESXDOS dot command, that may be invoked just by .zxuc.
I have built small ESXDOS dot commands before (just proofs of concept), made in assembler, and all that I know, considering they are undocummented, is:
- They are raw machine code binary files, that is, if first instruction is RET the dot command does nothing but returning to prompt. There is no header.
- They start at 0x4000 (ORG 8192)
- They apparently have 8K maximum size (largest one included with ESXDOS, .snaload, takes almost thos 8K)
I have compiled my code using -S 8192 option, but when y run .zxuc ZXUno freezes. I have also tried to compile a very simple code, and do the same, and in that case it doesn't freeze, but it does nothing.
Compiling that code into a .hello command just returns with OK, without printing "Hello World"
I have decompiled what ZXBasic compiles and first instructions are what is expected, but it's way too complicated to debug furthermore.
I have also tried to reduce heap size with -H parameter, but nothing changes.
Any idea what may be wrong?
|
|
|
| Exit code -1 cause found (SGN) |
|
Posted by: LCD - 2016-07-13, 05:55 PM - Forum: Bug Reports
- Replies (2)
|
 |
If I have a unsigned variable (e.g. UBYTE) and want a SGN of it, the compiler produces a warning that it can then be only 0 or 1, but the compiler exits with exit code -1. Should be the warning not mean, it can be compiled anyway?
I'm using version 1.4.0s1968.
|
|
|
| Sprites & ATTR |
|
Posted by: jonesypeter - 2016-06-26, 09:13 PM - Forum: Help & Support
- Replies (2)
|
 |
Hi,
I'm quite new to ZX Basic, and just had a few questions:
Is the replacement for the Sinclair BASIC ATTR command attrAdress(x,y)?
Are there any linked sprite libraries that let you use Sprites (larger than 8*8) from BASIC? I did look at the Spanish Fourspriter tutorial, but Google translate is not great with technical translations. Is there an English Language tutorial, and are there any other libraries, without the need to use Assembler?
Thanks
|
|
|
| One more optimizer bug (*solved*) |
|
Posted by: einar - 2016-05-07, 05:46 PM - Forum: Bug Reports
- Replies (7)
|
 |
File "test.bas":
Code: sub test()
asm
ld hl, 56469
ld de, 5
ld (hl), e
inc l
ld (hl), d
; ret
end asm
end sub
test()
Trying to compile it:
Code: >zxb.exe -t -O3 test.bas -o test.tap
Traceback (most recent call last):
File "zxb.py", line 348, in <module>
File "zxb.py", line 301, in main
File "optimizer.pyc", line 2290, in optimize
File "optimizer.pyc", line 1949, in optimize
File "optimizer.pyc", line 680, in op
File "optimizer.pyc", line 538, in inc
File "optimizer.pyc", line 432, in set
TypeError: unsupported operand type(s) for <<: 'NoneType' and 'int'
Compiling it without "-O3" works just fine.
|
|
|
|