| Welcome, Guest |
You have to register before you can post on our site.
|
| Online Users |
There are currently 114 online users. » 0 Member(s) | 113 Guest(s) Google
|
| Latest Threads |
GuSprites
Forum: Help & Support
Last Post: zedex82
2026-06-19, 06:39 PM
» Replies: 2
» Views: 357
|
New video Couse / Nuevo c...
Forum: News
Last Post: Duefectu
2026-04-29, 11:02 PM
» Replies: 0
» Views: 2,702
|
location of heap manageme...
Forum: Help & Support
Last Post: boriel
2026-03-07, 12:13 AM
» Replies: 1
» Views: 745
|
non-paged supervisor code...
Forum: Help & Support
Last Post: sdo303
2026-02-20, 06:38 PM
» Replies: 8
» Views: 1,851
|
How to open fuse as an ex...
Forum: How-To & Tutorials
Last Post: Duefectu
2026-02-09, 01:52 PM
» Replies: 3
» Views: 1,745
|
Old zxbasic game errors
Forum: Help & Support
Last Post: boriel
2025-11-09, 11:52 AM
» Replies: 7
» Views: 2,541
|
Error: Undefined GLOBAL l...
Forum: Help & Support
Last Post: ardentcrest
2025-11-04, 05:46 PM
» Replies: 3
» Views: 1,397
|
A Fast(er) Plot Routine f...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-30, 03:16 PM
» Replies: 2
» Views: 1,480
|
Hall of Fame - Include fo...
Forum: How-To & Tutorials
Last Post: tubz74
2025-10-28, 03:48 PM
» Replies: 0
» Views: 820
|
[SOLVED] Array layout bug...
Forum: Bug Reports
Last Post: Zoran
2025-10-25, 05:48 PM
» Replies: 2
» Views: 1,541
|
|
|
| Adding new commands to ZX BASIC |
|
Posted by: cheveron - 2013-12-06, 10:43 AM - Forum: ZX Basic Compiler
- Replies (7)
|
 |
Just to help me understand the structure of the language a bit better I'd like to know what the method would be for adding commands. I'm mainly interested in adding the following commands from SE Basic IV:
CLUT: select color look-up table (0 to 3)
COLOR: absolute attribute value (0 to 255)
PALETTE: set ULAplus registers
RESET: restore palette from palette buffer (first 64 bytes after screen)
PUT: wrapper for LDIR
SCROLL: text display scrolling
SOUND: set AY registers
SPEED: set CPU speed for clones
But I can also provide support for the one everyone is always asking for:
PLAY
All of this can be done without requiring either the SE Basic ROM or the 128 ROM. Having said that PLAY isn't very versatile, can't be interrupt driven, and has a fairly large RAM overhead (the routine takes 2296 bytes).
|
|
|
| Embedded codes |
|
Posted by: britlion - 2013-10-28, 08:25 PM - Forum: Core
- Replies (4)
|
 |
I see Battle Bunny came up with a good idea here:
http://www.worldofspectrum.org/forums/sh...post732193
I suggest we steal it, and persuade Boriel to include it in the compiler. So you can do
Print "{PAPER 3} Hello world" to embed the paper 3 in the string. Or More usefully block graphics and {C} symbol in a more logical format.
Clearly needs a way of turning on and off globally via command line, and locally or a string via some #command....
But I think it would make it easier to enter some odd codes.
|
|
|
| [msx] found a bug from the compiler, i think |
|
Posted by: nitrofurano - 2013-09-22, 09:30 PM - Forum: Bug Reports
- No Replies
|
 |
the example i tried was this one
<!-- m --><a class="postlink" href="https://dl.dropboxusercontent.com/u/795795/retrocoding/msx/_example02ag_msxzxbasic_lacedpostscriptscreen7.zip">https://dl.dropboxusercontent.com/u/795 ... creen7.zip</a><!-- m -->
was about drawing vectorial drawings on laced screeen7 on msx
what appeared as error message from the terminal:
Code: msxscreen.bas:3: warning: SUB 'msxscreen' declared as FASTCALL with 4 parameters
Traceback (most recent call last):
File "/opt/zxbasiccompiler/zxbasiccompiler_zxspectrum/zxb.py", line 312, in <module>
sys.exit(main(sys.argv)) # Exit
File "/opt/zxbasiccompiler/zxbasiccompiler_zxspectrum/zxb.py", line 265, in main
asm_output = backend.emmit(MEMORY)
File "/mnt/sda4/opt/zxbasiccompiler/zxbasiccompiler_zxspectrum/backend/__init__.py", line 2368, in emmit
output_join(output, QUADS[i.quad[0]][1](i))
File "/mnt/sda4/opt/zxbasiccompiler/zxbasiccompiler_zxspectrum/backend/__16bit.py", line 413, in _modu16
if op2[0] in ('_', '$'):
TypeError: 'int' object has no attribute '__getitem__'
|
|
|
| This is weird - just plain won't run the code? |
|
Posted by: britlion - 2013-09-05, 08:16 PM - Forum: Bug Reports
- Replies (7)
|
 |
Input code:
Code: BORDER 2
CLS
Print "Temp File"
(Originally it was just the one print line).
Out put file: <!-- m --><a class="postlink" href="https://dl.dropboxusercontent.com/u/4903664/LawOfChaos.zip">https://dl.dropboxusercontent.com/u/490 ... fChaos.zip</a><!-- m -->
This just crashes the Spectrum.
Build settings: zxb -T -B -a "LawOfChaos.bas"
C:\zxb --version
zxb 1.3.0-s1022
I haven't compiled anything up in a while. But...it's odd it seems to be making a broken result?
|
|
|
| Optimizer bug (*solved*) |
|
Posted by: einar - 2013-08-30, 09:00 PM - Forum: Bug Reports
- Replies (2)
|
 |
Try running this program:
Code: sub x2()
DIM a AS UBYTE
LET a = 129
IF (a >= 224) OR (a <= 32) THEN
PRINT "Ops"
ELSE
PRINT "OK"
END IF
end sub
x2()
If compiled using "-O3" it will print "Ops", otherwise it will print "OK".
Tested using ZX BASIC version 1.3.0s1022.
|
|
|
| Comments inside ASM blocks (*solved*) |
|
Posted by: einar - 2013-08-20, 04:10 PM - Forum: Bug Reports
- Replies (2)
|
 |
Trying to compile the sub-routine below...
Code: sub test()
asm
ex af,af' ; A'=player
end asm
end sub
...produces this error message:
Quote:C:\...\zxbasic-1.3.0s1022\dist>zxb test.bas
test.bas:4: Error: illegal preprocessor character '='
However the following sub-routine compiles just fine:
Code: sub test()
asm
ex af,af' ; A=player
end asm
end sub
This other sub-routine also compiles just fine:
Code: sub test()
asm
exx ; A'=player
end asm
end sub
ZX BASIC parser is obviously misunderstanding those two apostrophes in the first case.
|
|
|
|