Welcome, Guest |
You have to register before you can post on our site.
|
Online Users |
There are currently 314 online users. » 0 Member(s) | 311 Guest(s) Applebot, Bing, Google
|
Latest Threads |
char pointer bend to anot...
Forum: How-To & Tutorials
Last Post: funkheld
11-29-2024, 01:42 PM
» Replies: 0
» Views: 49
|
my THE SPECTRUM has arriv...
Forum: How-To & Tutorials
Last Post: boriel
11-27-2024, 10:04 PM
» Replies: 1
» Views: 87
|
Store array information i...
Forum: Help & Support
Last Post: funkheld
11-24-2024, 02:44 PM
» Replies: 1
» Views: 1,436
|
Declare an array type
Forum: Help & Support
Last Post: baltasarq
11-22-2024, 09:41 PM
» Replies: 2
» Views: 175
|
Reading DATA
Forum: ZX Basic Compiler
Last Post: boriel
11-22-2024, 09:36 PM
» Replies: 4
» Views: 279
|
Discord?
Forum: Off-Topic
Last Post: StevesGaming
11-21-2024, 09:07 PM
» Replies: 6
» Views: 318
|
Compiler Speed Trials
Forum: ZX Basic Compiler
Last Post: boriel
11-20-2024, 07:47 AM
» Replies: 76
» Views: 223,417
|
Help with Book
Forum: Help & Support
Last Post: StevesGaming
11-18-2024, 09:24 PM
» Replies: 4
» Views: 359
|
New telegram channels
Forum: ZX Basic Compiler
Last Post: boriel
11-18-2024, 09:13 AM
» Replies: 0
» Views: 134
|
where can I get help with...
Forum: How-To & Tutorials
Last Post: boriel
11-15-2024, 08:16 PM
» Replies: 9
» Views: 601
|
|
|
my THE SPECTRUM has arrived for 99 euros in Germany. |
Posted by: funkheld - 11-27-2024, 02:12 PM - Forum: How-To & Tutorials
- Replies (1)
|
|
hello, good day.
my THE SPECTRUM has arrived for 99 euros in Germany.
a great device.
I set it to spectrum maschine 128k.
my programs-128k from ZX Basic run wonderfully.
also the bank programs in ZX Basic for the 128k with the bank switching.
greetings
this interrupt ist ok with "THE SPECTRUM"
----------------------------------------------
Code: ' Example of the use of the IM2 library
' Including the IM2 library
#include "IM2.bas"
' We declare two variables to use inside IM2CallMyRoutine
' These variables must be global
' Time wasting counter
DIM im2_Counter AS UInteger
' Height of the horizon
DIM im2_Horizon AS UInteger = 400
' We call the subroutine Main
Main()
' - Main subroutine ---------------------------------------
SUB Main()
CLS
PRINT AT 23,0;"q - Up, a - Down, s - Stop";
PRINT AT 0,0;"Height of the horizon:";
' We configure and start up the interruptions.
IM2Start(@MyInterruptRoutine)
' Infinite loop
DO
' Print the current horizon height
PRINT AT 0,23;im2_Horizon;" ";
' If we press "q", we raise the horizon.
IF INKEY$ = "q" THEN
' We raise it as long as it is not 0
IF im2_Horizon > 0 THEN
' Going up means less pause
im2_Horizon = im2_Horizon - 1
END IF
' Pressing "a" lowers the horizon.
ELSEIF INKEY$ = "a" THEN
' Going down is to pause more
im2_Horizon = im2_Horizon + 1
' Pressing "s" stops the interruptions.
ELSEIF INKEY$ = "s" THEN
IM2Stop()
RETURN
END IF
LOOP
END SUB
' - This is our routine which is called at every interruption
' We can't do a lot of things inside
' Do not define local variables, do not use ROM,
' not to dawdle too much...
SUB FASTCALL MyInterruptRoutine()
' The sky is cyan
BORDER 5
' We wait to change from heaven to earth
FOR im2_Counter=0 to im2_Horizon
NEXT im2_Counter
' The land is green
BORDER 4
END SUB
------------------------------------------------
|
|
|
Declare an array type |
Posted by: baltasarq - 11-22-2024, 11:51 AM - Forum: Help & Support
- Replies (2)
|
|
How do you declare an array type? I supposed it should be easy to find in the docs, but didn't have any luck. For instance:
Code: sub doThis(v as string?)
print( v( 0 ) )
endsub
I'm certain it is not string() (I have tried that). I wonder if I have to use DIM again?
Thanks,
-- Baltasar
|
|
|
Reading DATA |
Posted by: baltasarq - 11-20-2024, 08:25 PM - Forum: ZX Basic Compiler
- Replies (4)
|
|
Lo siento si esto ha sido preguntado antes, pero no lo he encontrado.
Dado un proc como este:
Code: const NumLocs as ubyte = 2
'enum Exits
const ExitNorth as ubyte = 0
const ExitSouth as ubyte = 1
const ExitEast as ubyte = 2
const ExitWest as ubyte = 3
const ExitUp as ubyte = 4
const ExitDown as ubyte = 5
const NumExits as ubyte = 6
'end enum
dim locDescs(NumLocs) as string
dim locExits(NumLocs, NumExits) as integer
sub init_locs()
'locDescs( 0 ) = "El lugar del alunizaje. La vaina abierta y sin " _
' + "contenido parece una triste parodia de ella misma. " _
' + "Un valle natural conduce al sur."
'locDescs( 1 ) = "El lugar del alunizaje. La vaina abierta y sin " _
' + "contenido parece una triste parodia de ella misma. " _
' + "Un valle natural conduce al sur."
restore LocData
for i = 0 to NumLocs - 1
print "numloc i:", i
' Read the desc
read locDescs( i )
print "read numloc i: "; i; locDescs( i )
' Read the exits
for j = 0 to NumExits - 1
print "numloc i:"; i; " exit "; j
read locExits(i, j)
print "numloc i:"; i; " exit "; j; " = "; locExits(i, j)
input a
next
next
return
LocData:
' Loc 0 - Landing
data "El lugar del alunizaje. La vaina abierta y sin " _
+ "contenido parece una triste parodia de ella misma. " _
+ "Un valle natural conduce al sur."
data -1, 1, -1, -1, -1, -1
' Loc 1 - Valley
data "El lugar del alunizaje. La vaina abierta y sin " _
+ "contenido parece una triste parodia de ella misma. " _
+ "Un valle natural conduce al sur."
data 0, -1, -1, -1, -1, -1
end sub
El problema es el siguiente. Si descomento las primeras líneas y comento la línea
y los data correspondientes, el programa parece que funciona. Pero si dejo el programa tal y como está, solo lee porquería en la posición i del vector locDescs, y el Speccy se reinicia. ¿No se pueden leer cadenas con READ? Según los docs, entiendo que sí...
|
|
|
Discord? |
Posted by: StevesGaming - 11-19-2024, 09:24 PM - Forum: Off-Topic
- Replies (6)
|
|
Does anyone know of a discord server that features a Boriel Basic channel?
(I did a search on here and found one but the link has expired.)
Thanks
|
|
|
New telegram channels |
Posted by: boriel - 11-18-2024, 09:13 AM - Forum: ZX Basic Compiler
- No Replies
|
|
Hi, there
The forum is still alive, yes, but it's clear that the recent waves of spam attack have causes a great damage to our community :-(
In the meantime other tools and communities have emerged around instant messaging (Discord, Telegram, etc).
I've created two official Telegram channels (English, and Spanish). Please follow the invitation links if you're willing to join.
Boriel ZX Basic Compiler
Official channel (English Only)
Invite link:
https://t.me/+ag4E7W05dvRkZmZk
Boriel ZX Basic [ES] (Spanish official channel)
Sobre el compilador Boriel ZX Basic
Enlace de invitación:
https://t.me/+dSbWL8z8ol1lMjA0
|
|
|
Help with Book |
Posted by: StevesGaming - 11-16-2024, 07:15 PM - Forum: Help & Support
- Replies (4)
|
|
Hello, I just registered!
I bought the Boriel Basic book and I'm just on page 52 where it tells you about debugging and adding breakpoints. but when I add a breakpoint and press F6 I get errors!
"Exception: could not find file C:\zxbasic\helloworld\helloworld.buildtemp.ic"
How do I fix this? (note: running the code normally with F5 and it works fine)
Thanks
|
|
|
|