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: Ra001
» Forum threads: 1,073
» Forum posts: 6,437

Full Statistics

Online Users
There are currently 366 online users.
» 0 Member(s) | 363 Guest(s)
Applebot, Bing, Google

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

 
  Passing strings to assembler
Posted by: Uto - 10-09-2016, 11:28 AM - 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?

Print this item

  [alphadenshisega-championbaseball] first test
Posted by: nitrofurano - 08-01-2016, 05:38 PM - Forum: Other Archs - No Replies

first test for the Alphadenshi/Sega’s Champion Baseball 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_-_AlphadenshiSegaChampionBaseball">http://www.boriel.com/wiki/en/index.php ... onBaseball</a><!-- m --> )



Attached Files
.zip   example01c_working.zip (Size: 29.32 KB / Downloads: 833)
Print this item

  Using ZX Basic to create ESXDOS dot commands
Posted by: Uto - 07-16-2016, 12: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.

Code:
PRINT "Hello World"

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?

Print this item

  Radastan Mode
Posted by: PeekPoke - 07-15-2016, 03:59 PM - Forum: Help & Support - Replies (10)

Hi to all members of this forum, Big Grin

Are there tutorials on how to use Radastan Mode ( 128 x 96 pixels, 16 colours)
with ZX Basic please ?

Thank you very much.

Print this item

  Exit code -1 cause found (SGN)
Posted by: LCD - 07-13-2016, 04: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.

Print this item

  [dyna-royalcasino] first test
Posted by: nitrofurano - 07-02-2016, 09:30 PM - Forum: Other Archs - No Replies

A test demo for Dyna’s Royal Casıno 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_-_DynaRoyalCasino">http://www.boriel.com/wiki/en/index.php ... oyalCasino</a><!-- m --> )



Attached Files
.zip   example01f_working.zip (Size: 22.25 KB / Downloads: 879)
Print this item

  [ace-sidewinder] first test
Posted by: nitrofurano - 07-02-2016, 03:28 PM - Forum: Other Archs - No Replies

first test for the Ace’s Sidewinder 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_-_AceSidewinder">http://www.boriel.com/wiki/en/index.php ... Sidewinder</a><!-- m --> )



Attached Files
.zip   example01e_startingtowork.zip (Size: 26.99 KB / Downloads: 808)
Print this item

  Sprites & ATTR
Posted by: jonesypeter - 06-26-2016, 08: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

Print this item

  Unexpected token 'NEXT'
Posted by: gunduzs - 05-23-2016, 07:09 PM - Forum: Help & Support - Replies (1)

Hello,

this is my 1st post! Total newbie.

I just typed in the 1st program in the book "ZX Spectrum Games Code Club: Twenty fun games to code and learn" by Gary Plowman (from Amazon),
but when I attempt a "zxb ex1.bas" , it throws up a couple of errors.
I've checked the code and it appears valid. Any ideas on what the problem could be?

(I've attached the .bas file)

Regards



Attached Files
.bas   ex1.bas (Size: 3 KB / Downloads: 139)
Print this item

  One more optimizer bug (*solved*)
Posted by: einar - 05-07-2016, 04: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.

Print this item