ugBASIC 1.18
An isomorphic BASIC language compiler for retrocomputers
Loading...
Searching...
No Matches
__syntax.c
Go to the documentation of this file.
1/* <usermanual>
2@keyword IF (function)
3
4@english
5
6The ''IF'' function allows you to evaluate whether a certain expression is ''TRUE'' (not 0) or ''FALSE''.
7(0). Depending on that check, the function will return the second (if ''TRUE'') or third (if ''FALSE'')
8argument.
9
10This function evaluates the expression at compile time: it follows that the return
11value does not change at runtime. There are three versions of this function, one for each
12type of value that can be returned. There is a version that returns integers, one for
13floating point numbers, and one for strings.
14
15This function is particularly useful for carrying out a conditional evaluation of constants which,
16otherwise, would require evaluation at runtime, wasting time and occupying useless space.
17
18@italian
19La funzione IF consente di valutare se una certa espressione è vera o falsa. A seconda di
20tale controllo, la funzione restituirà il secondo argomento (se vero) o il terzo (se falso).
21
22Questa funzione valuta l'espressione la momento della compilazione: ne consegue che il valore
23restituito non cambia in fase di runtime. Esistono tre versioni di questa funzione, una per
24ogni tipo di valore che può essere restituito. Esiste la versione che restituisce numeri interi,
25una per i numeri in virgola mobile e una per le stringhe.
26
27Questa funzione è particolarmente utile per effettuare una valorizzazione condizionata di costanti
28che, altrimenti, richiederebbero una valutazione a runtime, con perdita di tempo e occupazione
29di spazio inutile.
30
31@syntax = IF (exp, valueTrue, valueFalse )
32
33
34@example pictureToUse = IF(SCREEN WIDTH > 160, "large.png", "small.png" )
35</usermanual> */
36
37/* <usermanual>
38@keyword FONT WIDTH (constant)
39
40@english
41This function allows you to obtain the width of the current font, expressed in pixels.
42The width depends on the currently selected graphics mode, and it can change at runtime.
43
44There is also a compile-level function for this keyword, which is called when the value
45is used to initialize a constant. In this case, the value is that taken from inspecting
46the instructions at the time of compilation.
47
48@italian
49Questa funzione permette di ottenere la larghezza del font corrente,
50espressa in pixels. La larghezza dipende dall'attuale modalità grafica
51selezionata, e può cambiare in sede di esecuzione.
52
53Di questa parola chiave esiste anche una funzione a livello di compilazione,
54che viene richiamata quando il valore viene utilizzato per inizializzare una
55costante. In tal caso, il valore è quello desunto dall'ispezione delle
56istruzioni al momento della compilazione.
57
58@syntax = FONT WIDTH
59
60@example fontSize = FONT WIDTH
61
62@seeAlso FONT HEIGHT (constant)
63
64</usermanual> */
65
66/* <usermanual>
67@keyword FONT HEIGHT (constant)
68
69@english
70This function allows you to obtain the height of the current font, expressed in pixels.
71The height depends on the currently selected graphics mode, and it can change at runtime.
72
73There is also a compile-level function for this keyword, which is called when the value
74is used to initialize a constant. In this case, the value is that taken from inspecting
75the instructions at the time of compilation.
76
77@italian
78Questa funzione permette di ottenere l'altezza del font corrente,
79espressa in pixels. L'altezza dipende dall'attuale modalità grafica
80selezionata, e può cambiare in sede di esecuzione.
81
82Di questa parola chiave esiste anche una funzione a livello di compilazione,
83che viene richiamata quando il valore viene utilizzato per inizializzare una
84costante. In tal caso, il valore è quello desunto dall'ispezione delle
85istruzioni al momento della compilazione.
86
87@syntax = FONT HEIGHT
88
89@example fontSize = FONT HEIGHT
90
91@seeAlso FONT WIDTH (constant)
92
93</usermanual> */
94
95/* <usermanual>
96@keyword BLACK (constant)
97
98@english
99This keyword represents the color black. Depending on the methodology and technique,
100as well as the available hardware, it can correspond to a specific color in the RGB
101space, usually ''(0,0,0)''. However, not all computers have this color. In which case,
102it is approximated by the closest color available, which is usually also used in
103decoding images to identify the color to use.
104
105@italian
106Con questa parola chiave si rappresenta il colore nero. A seconda della metodologia
107e della tecnica, nonché dell'hardware disponibile, può corrispondere a uno specifico
108colore nello spazio RGB, di solito ''(0,0,0)''. Tuttavia, non tutti i computer
109dispongono di un colore di questo tipo. Nel qual caso, viene approssimato dal
110colore più vicino, che di solito viene utilizzato anche nella decodifica delle
111immagini per individuare il colore da utilizzare.
112
113@syntax = BLACK
114
115@example PEN BLACK
116
117@usedInExample control_loops_01.bas
118@usedInExample graphics_clip_01.bas
119@usedInExample graphics_plot_01.bas
120@usedInExample graphics_plot_02.bas
121
122@target all
123
124@color
125</usermanual> */
126
127/* <usermanual>
128@keyword WHITE (constant)
129
130@english
131This keyword represents the color white. Depending on the methodology and technique,
132as well as the available hardware, it can correspond to a specific color in the RGB
133space, usually ''(255,255,255)''. However, not all computers have this color. In which case,
134it is approximated by the closest color available, which is usually also used in
135decoding images to identify the color to use.
136
137@italian
138Con questa parola chiave si rappresenta il colore bianco. A seconda della metodologia
139e della tecnica, nonché dell'hardware disponibile, può corrispondere a uno specifico
140colore nello spazio RGB, di solito ''(255,255,255)''. Tuttavia, non tutti i computer
141dispongono di un colore di questo tipo. Nel qual caso, viene approssimato dal
142colore più vicino, che di solito viene utilizzato anche nella decodifica delle
143immagini per individuare il colore da utilizzare.
144
145Qui di seguito si forniscono le componenti cromatiche per ogni target e chipset:
146
147@syntax = WHITE
148
149@example PEN WHITE
150
151@usedInExample control_loops_01.bas
152@usedInExample graphics_clip_01.bas
153@usedInExample graphics_plot_01.bas
154@usedInExample graphics_plot_02.bas
155
156@target all
157
158@color
159</usermanual> */
160
161/* <usermanual>
162@keyword RED (constant)
163
164@english
165This keyword represents the color red. Depending on the methodology and technique,
166as well as the available hardware, it can correspond to a specific color in the RGB
167space, usually ''(255,0,0)''. However, not all computers have this color. In which case,
168it is approximated by the closest color available, which is usually also used in
169decoding images to identify the color to use.
170
171@italian
172Con questa parola chiave si rappresenta il colore rosso. A seconda della metodologia
173e della tecnica, nonché dell'hardware disponibile, può corrispondere a uno specifico
174colore nello spazio RGB, di solito ''(255,0,0)''. Tuttavia, non tutti i computer
175dispongono di un colore di questo tipo. Nel qual caso, viene approssimato dal
176colore più vicino, che di solito viene utilizzato anche nella decodifica delle
177immagini per individuare il colore da utilizzare.
178
179@syntax = RED
180
181@example PEN RED
182
183@usedInExample control_loops_02.bas
184@usedInExample control_loops_03.bas
185@usedInExample graphics_color_01.bas
186@usedInExample graphics_plot_03.bas
187
188@target all
189
190@color
191</usermanual> */
192
193/* <usermanual>
194@keyword CYAN (constant)
195
196@english
197This keyword represents the color cyan. Depending on the methodology and technique,
198as well as the available hardware, it can correspond to a specific color in the RGB
199space, usually ''(170,255,230)''. However, not all computers have this color. In which case,
200it is approximated by the closest color available, which is usually also used in
201decoding images to identify the color to use.
202
203@italian
204Con questa parola chiave si rappresenta il colore ciano. A seconda della metodologia
205e della tecnica, nonché dell'hardware disponibile, può corrispondere a uno specifico
206colore nello spazio RGB, di solito ''(170,255,230)''. Tuttavia, non tutti i computer
207dispongono di un colore di questo tipo. Nel qual caso, viene approssimato dal
208colore più vicino, che di solito viene utilizzato anche nella decodifica delle
209immagini per individuare il colore da utilizzare.
210
211@syntax = CYAN
212
213@example PEN CYAN
214
215@target all
216
217@color
218</usermanual> */
219
220/* <usermanual>
221@keyword VIOLET (constant)
222
223@english
224This keyword represents the color violet. Depending on the methodology and technique,
225as well as the available hardware, it can correspond to a specific color in the RGB
226space, usually ''(204,68,204)''. However, not all computers have this color. In which case,
227it is approximated by the closest color available, which is usually also used in
228decoding images to identify the color to use.
229
230@italian
231Con questa parola chiave si rappresenta il colore viola. A seconda della metodologia
232e della tecnica, nonché dell'hardware disponibile, può corrispondere a uno specifico
233colore nello spazio RGB, di solito ''(204,68,204)''. Tuttavia, non tutti i computer
234dispongono di un colore di questo tipo. Nel qual caso, viene approssimato dal
235colore più vicino, che di solito viene utilizzato anche nella decodifica delle
236immagini per individuare il colore da utilizzare.
237
238@syntax = VIOLET
239
240@example PEN VIOLET
241
242@target all
243
244@color
245</usermanual> */
246
247/* <usermanual>
248@keyword GREEN (constant)
249
250@english
251This keyword represents the color green. Depending on the methodology and technique,
252as well as the available hardware, it can correspond to a specific color in the RGB
253space, usually ''(0,204,85)''. However, not all computers have this color. In which case,
254it is approximated by the closest color available, which is usually also used in
255decoding images to identify the color to use.
256
257@italian
258Con questa parola chiave si rappresenta il colore verde. A seconda della metodologia
259e della tecnica, nonché dell'hardware disponibile, può corrispondere a uno specifico
260colore nello spazio RGB, di solito ''(0,204,85)''. Tuttavia, non tutti i computer
261dispongono di un colore di questo tipo. Nel qual caso, viene approssimato dal
262colore più vicino, che di solito viene utilizzato anche nella decodifica delle
263immagini per individuare il colore da utilizzare.
264
265@syntax = GREEN
266
267@example PEN GREEN
268
269@usedInExample control_loops_02.bas
270@usedInExample control_loops_03.bas
271@usedInExample screens_cls_03.bas
272
273@target all
274
275@color
276</usermanual> */
277
278/* <usermanual>
279@keyword BLUE (constant)
280
281@english
282This keyword represents the color blue. Depending on the methodology and technique,
283as well as the available hardware, it can correspond to a specific color in the RGB
284space, usually ''(0,0,170)''. However, not all computers have this color. In which case,
285it is approximated by the closest color available, which is usually also used in
286decoding images to identify the color to use.
287
288@italian
289Con questa parola chiave si rappresenta il colore blue. A seconda della metodologia
290e della tecnica, nonché dell'hardware disponibile, può corrispondere a uno specifico
291colore nello spazio RGB, di solito ''(0,0,170)''. Tuttavia, non tutti i computer
292dispongono di un colore di questo tipo. Nel qual caso, viene approssimato dal
293colore più vicino, che di solito viene utilizzato anche nella decodifica delle
294immagini per individuare il colore da utilizzare.
295
296@syntax = BLUE
297
298@example PEN BLUE
299
300@usedInExample screens_cls_03.bas
301@usedInExample texts_options_06.bas
302
303@target all
304
305@color
306</usermanual> */
307
308/* <usermanual>
309@keyword YELLOW (constant)
310
311@english
312This keyword represents the color yellow. Depending on the methodology and technique,
313as well as the available hardware, it can correspond to a specific color in the RGB
314space, usually ''(238,238,119)''. However, not all computers have this color. In which case,
315it is approximated by the closest color available, which is usually also used in
316decoding images to identify the color to use.
317
318@italian
319Con questa parola chiave si rappresenta il colore giallo. A seconda della metodologia
320e della tecnica, nonché dell'hardware disponibile, può corrispondere a uno specifico
321colore nello spazio RGB, di solito ''(238,238,119)''. Tuttavia, non tutti i computer
322dispongono di un colore di questo tipo. Nel qual caso, viene approssimato dal
323colore più vicino, che di solito viene utilizzato anche nella decodifica delle
324immagini per individuare il colore da utilizzare.
325
326@syntax = YELLOW
327
328@example PEN YELLOW
329
330@usedInExample control_loops_01.bas
331@usedInExample control_loops_02.bas
332@usedInExample control_loops_03.bas
333@usedInExample graphics_color_01.bas
334
335@target all
336
337@color
338</usermanual> */
339
340/* <usermanual>
341@keyword ORANGE (constant)
342
343@english
344This keyword represents the color orange. Depending on the methodology and technique,
345as well as the available hardware, it can correspond to a specific color in the RGB
346space, usually ''(161, 104, 60)''. However, not all computers have this color. In which case,
347it is approximated by the closest color available, which is usually also used in
348decoding images to identify the color to use.
349
350@italian
351Con questa parola chiave si rappresenta il colore arancio. A seconda della metodologia
352e della tecnica, nonché dell'hardware disponibile, può corrispondere a uno specifico
353colore nello spazio RGB, di solito ''(161, 104, 60)''. Tuttavia, non tutti i computer
354dispongono di un colore di questo tipo. Nel qual caso, viene approssimato dal
355colore più vicino, che di solito viene utilizzato anche nella decodifica delle
356immagini per individuare il colore da utilizzare.
357
358@syntax = ORANGE
359
360@example PEN ORANGE
361
362@usedInExample control_loops_01.bas
363@usedInExample control_loops_02.bas
364@usedInExample control_loops_03.bas
365@usedInExample graphics_color_01.bas
366
367@target all
368
369@color
370</usermanual> */
371
372/* <usermanual>
373@keyword BROWN (constant)
374
375@english
376This keyword represents the color brown. Depending on the methodology and technique,
377as well as the available hardware, it can correspond to a specific color in the RGB
378space, usually ''(221, 136, 101)''. However, not all computers have this color. In which case,
379it is approximated by the closest color available, which is usually also used in
380decoding images to identify the color to use.
381
382@italian
383Con questa parola chiave si rappresenta il colore marrone. A seconda della metodologia
384e della tecnica, nonché dell'hardware disponibile, può corrispondere a uno specifico
385colore nello spazio RGB, di solito ''(221, 136, 101)''. Tuttavia, non tutti i computer
386dispongono di un colore di questo tipo. Nel qual caso, viene approssimato dal
387colore più vicino, che di solito viene utilizzato anche nella decodifica delle
388immagini per individuare il colore da utilizzare.
389
390@syntax = BROWN
391
392@example PEN BROWN
393
394@target all
395
396@color
397</usermanual> */
398
399/* <usermanual>
400@keyword LIGHT RED (constant)
401
402@english
403This keyword represents the color light red. Depending on the methodology and technique,
404as well as the available hardware, it can correspond to a specific color in the RGB
405space. However, not all computers have this color. In which case,
406it is approximated by the closest color available, which is usually also used in
407decoding images to identify the color to use.
408
409@italian
410Con questa parola chiave si rappresenta il colore rosso chiaro. A seconda della metodologia
411e della tecnica, nonché dell'hardware disponibile, può corrispondere a uno specifico
412colore nello spazio RGB. Tuttavia, non tutti i computer
413dispongono di un colore di questo tipo. Nel qual caso, viene approssimato dal
414colore più vicino, che di solito viene utilizzato anche nella decodifica delle
415immagini per individuare il colore da utilizzare.
416
417@syntax = LIGHT RED
418
419@example PEN LIGHT RED
420
421@target all
422
423@color
424</usermanual> */
425
426/* <usermanual>
427@keyword DARK GREY (constant)
428
429@english
430This keyword represents the color dark grey. Depending on the methodology and technique,
431as well as the available hardware, it can correspond to a specific color in the RGB
432space. However, not all computers have this color. In which case,
433it is approximated by the closest color available, which is usually also used in
434decoding images to identify the color to use.
435
436@italian
437Con questa parola chiave si rappresenta il colore grigio scuro. A seconda della metodologia
438e della tecnica, nonché dell'hardware disponibile, può corrispondere a uno specifico
439colore nello spazio RGB. Tuttavia, non tutti i computer
440dispongono di un colore di questo tipo. Nel qual caso, viene approssimato dal
441colore più vicino, che di solito viene utilizzato anche nella decodifica delle
442immagini per individuare il colore da utilizzare.
443
444@syntax = DARK GREY
445
446@example PEN DARK GREY
447
448@alias DARK GRAY (constant)
449
450@target all
451
452@color
453</usermanual> */
454
455/* <usermanual>
456@keyword DARK GRAY (constant)
457
458@english
459
460@italian
461
462@syntax = DARK GRAY
463
464@example PEN DARK GRAY
465
466@alias DARK GREY (constant)
467
468@color
469</usermanual> */
470
471/* <usermanual>
472@keyword GREY (constant)
473
474@english
475This keyword represents the color grey. Depending on the methodology and technique,
476as well as the available hardware, it can correspond to a specific color in the RGB
477space. However, not all computers have this color. In which case,
478it is approximated by the closest color available, which is usually also used in
479decoding images to identify the color to use.
480
481@italian
482Con questa parola chiave si rappresenta il colore grigio. A seconda della metodologia
483e della tecnica, nonché dell'hardware disponibile, può corrispondere a uno specifico
484colore nello spazio RGB. Tuttavia, non tutti i computer
485dispongono di un colore di questo tipo. Nel qual caso, viene approssimato dal
486colore più vicino, che di solito viene utilizzato anche nella decodifica delle
487immagini per individuare il colore da utilizzare.
488
489@syntax = GREY
490
491@example PEN GREY
492
493@alias GRAY (constant)
494
495@target all
496
497@color
498</usermanual> */
499
500/* <usermanual>
501@keyword GRAY (constant)
502
503@english
504
505@italian
506
507@syntax = GRAY
508
509@example PEN GRAY
510
511@alias GREY (constant)
512
513@target all
514
515@color
516</usermanual> */
517
518/* <usermanual>
519@keyword LIGHT GREEN (constant)
520
521@english
522This keyword represents the color light green. Depending on the methodology and technique,
523as well as the available hardware, it can correspond to a specific color in the RGB
524space. However, not all computers have this color. In which case,
525it is approximated by the closest color available, which is usually also used in
526decoding images to identify the color to use.
527
528@italian
529Con questa parola chiave si rappresenta il colore verde chiaro. A seconda della metodologia
530e della tecnica, nonché dell'hardware disponibile, può corrispondere a uno specifico
531colore nello spazio RGB. Tuttavia, non tutti i computer
532dispongono di un colore di questo tipo. Nel qual caso, viene approssimato dal
533colore più vicino, che di solito viene utilizzato anche nella decodifica delle
534immagini per individuare il colore da utilizzare.
535
536@syntax = LIGHT GREEN
537
538@example PEN LIGHT GREEN
539
540@target all
541
542@color
543</usermanual> */
544
545/* <usermanual>
546@keyword LIGHT BLUE (constant)
547
548@english
549This keyword represents the color light blue. Depending on the methodology and technique,
550as well as the available hardware, it can correspond to a specific color in the RGB
551space. However, not all computers have this color. In which case,
552it is approximated by the closest color available, which is usually also used in
553decoding images to identify the color to use.
554
555@italian
556Con questa parola chiave si rappresenta il colore blu chiaro. A seconda della metodologia
557e della tecnica, nonché dell'hardware disponibile, può corrispondere a uno specifico
558colore nello spazio RGB. Tuttavia, non tutti i computer
559dispongono di un colore di questo tipo. Nel qual caso, viene approssimato dal
560colore più vicino, che di solito viene utilizzato anche nella decodifica delle
561immagini per individuare il colore da utilizzare.
562
563@syntax = LIGHT BLUE
564
565@example PEN LIGHT BLUE
566
567@target all
568
569@color
570</usermanual> */
571
572/* <usermanual>
573@keyword LIGHT GREY (constant)
574
575@english
576This keyword represents the color light grey. Depending on the methodology and technique,
577as well as the available hardware, it can correspond to a specific color in the RGB
578space. However, not all computers have this color. In which case,
579it is approximated by the closest color available, which is usually also used in
580decoding images to identify the color to use.
581
582@italian
583Con questa parola chiave si rappresenta il colore grigio chiaro. A seconda della metodologia
584e della tecnica, nonché dell'hardware disponibile, può corrispondere a uno specifico
585colore nello spazio RGB. Tuttavia, non tutti i computer
586dispongono di un colore di questo tipo. Nel qual caso, viene approssimato dal
587colore più vicino, che di solito viene utilizzato anche nella decodifica delle
588immagini per individuare il colore da utilizzare.
589
590@syntax = LIGHT GREY
591
592@example PEN LIGHT GREY
593
594@target all
595
596@color
597</usermanual> */
598
599/* <usermanual>
600@keyword DARK BLUE (constant)
601
602@english
603This keyword represents the color dark blue. Depending on the methodology and technique,
604as well as the available hardware, it can correspond to a specific color in the RGB
605space. However, not all computers have this color. In which case,
606it is approximated by the closest color available, which is usually also used in
607decoding images to identify the color to use.
608
609@italian
610Con questa parola chiave si rappresenta il colore blu scuro. A seconda della metodologia
611e della tecnica, nonché dell'hardware disponibile, può corrispondere a uno specifico
612colore nello spazio RGB. Tuttavia, non tutti i computer
613dispongono di un colore di questo tipo. Nel qual caso, viene approssimato dal
614colore più vicino, che di solito viene utilizzato anche nella decodifica delle
615immagini per individuare il colore da utilizzare.
616
617@syntax = DARK BLUE
618
619@example PEN DARK BLUE
620
621@target all
622
623@color
624</usermanual> */
625
626/* <usermanual>
627@keyword MAGENTA (constant)
628
629@english
630This keyword represents the color magenta. Depending on the methodology and technique,
631as well as the available hardware, it can correspond to a specific color in the RGB
632space. However, not all computers have this color. In which case,
633it is approximated by the closest color available, which is usually also used in
634decoding images to identify the color to use.
635
636@italian
637Con questa parola chiave si rappresenta il colore magenta. A seconda della metodologia
638e della tecnica, nonché dell'hardware disponibile, può corrispondere a uno specifico
639colore nello spazio RGB. Tuttavia, non tutti i computer
640dispongono di un colore di questo tipo. Nel qual caso, viene approssimato dal
641colore più vicino, che di solito viene utilizzato anche nella decodifica delle
642immagini per individuare il colore da utilizzare.
643
644@syntax = MAGENTA
645
646@example PEN MAGENTA
647
648@target all
649
650@color
651</usermanual> */
652
653/* <usermanual>
654@keyword PURPLE (constant)
655
656@english
657This keyword represents the color purple. Depending on the methodology and technique,
658as well as the available hardware, it can correspond to a specific color in the RGB
659space. However, not all computers have this color. In which case,
660it is approximated by the closest color available, which is usually also used in
661decoding images to identify the color to use.
662
663@italian
664Con questa parola chiave si rappresenta il colore viola. A seconda della metodologia
665e della tecnica, nonché dell'hardware disponibile, può corrispondere a uno specifico
666colore nello spazio RGB. Tuttavia, non tutti i computer
667dispongono di un colore di questo tipo. Nel qual caso, viene approssimato dal
668colore più vicino, che di solito viene utilizzato anche nella decodifica delle
669immagini per individuare il colore da utilizzare.
670
671@syntax = PURPLE
672
673@example PEN PURPLE
674
675@target all
676
677@color
678</usermanual> */
679
680/* <usermanual>
681@keyword LAVENDER (constant)
682
683@english
684This keyword represents the color lavender. Depending on the methodology and technique,
685as well as the available hardware, it can correspond to a specific color in the RGB
686space. However, not all computers have this color. In which case,
687it is approximated by the closest color available, which is usually also used in
688decoding images to identify the color to use.
689
690@italian
691Con questa parola chiave si rappresenta il colore lavanda. A seconda della metodologia
692e della tecnica, nonché dell'hardware disponibile, può corrispondere a uno specifico
693colore nello spazio RGB. Tuttavia, non tutti i computer
694dispongono di un colore di questo tipo. Nel qual caso, viene approssimato dal
695colore più vicino, che di solito viene utilizzato anche nella decodifica delle
696immagini per individuare il colore da utilizzare.
697
698@syntax = LAVENDER
699
700@example PEN LAVENDER
701
702@target all
703
704@color
705</usermanual> */
706
707/* <usermanual>
708@keyword GOLD (constant)
709
710@english
711This keyword represents the color gold. Depending on the methodology and technique,
712as well as the available hardware, it can correspond to a specific color in the RGB
713space. However, not all computers have this color. In which case,
714it is approximated by the closest color available, which is usually also used in
715decoding images to identify the color to use.
716
717@italian
718Con questa parola chiave si rappresenta il colore oro. A seconda della metodologia
719e della tecnica, nonché dell'hardware disponibile, può corrispondere a uno specifico
720colore nello spazio RGB. Tuttavia, non tutti i computer
721dispongono di un colore di questo tipo. Nel qual caso, viene approssimato dal
722colore più vicino, che di solito viene utilizzato anche nella decodifica delle
723immagini per individuare il colore da utilizzare.
724
725@syntax = GOLD
726
727@example PEN GOLD
728
729@target all
730
731@color
732</usermanual> */
733
734/* <usermanual>
735@keyword TURQUOISE (constant)
736
737@english
738This keyword represents the color turquoise. Depending on the methodology and technique,
739as well as the available hardware, it can correspond to a specific color in the RGB
740space. However, not all computers have this color. In which case,
741it is approximated by the closest color available, which is usually also used in
742decoding images to identify the color to use.
743
744@italian
745Con questa parola chiave si rappresenta il colore turchese. A seconda della metodologia
746e della tecnica, nonché dell'hardware disponibile, può corrispondere a uno specifico
747colore nello spazio RGB. Tuttavia, non tutti i computer
748dispongono di un colore di questo tipo. Nel qual caso, viene approssimato dal
749colore più vicino, che di solito viene utilizzato anche nella decodifica delle
750immagini per individuare il colore da utilizzare.
751
752@syntax = TURQUOISE
753
754@example PEN TURQUOISE
755
756@target all
757
758@color
759</usermanual> */
760
761/* <usermanual>
762@keyword TAN (constant)
763
764@english
765This keyword represents the color tan. Depending on the methodology and technique,
766as well as the available hardware, it can correspond to a specific color in the RGB
767space. However, not all computers have this color. In which case,
768it is approximated by the closest color available, which is usually also used in
769decoding images to identify the color to use.
770
771@italian
772Con questa parola chiave si rappresenta il colore tanno. A seconda della metodologia
773e della tecnica, nonché dell'hardware disponibile, può corrispondere a uno specifico
774colore nello spazio RGB. Tuttavia, non tutti i computer
775dispongono di un colore di questo tipo. Nel qual caso, viene approssimato dal
776colore più vicino, che di solito viene utilizzato anche nella decodifica delle
777immagini per individuare il colore da utilizzare.
778
779@syntax = TAN
780
781@example PEN TAN
782
783@target all
784
785@color
786</usermanual> */
787
788/* <usermanual>
789@keyword YELLOW GREEN (constant)
790
791@english
792This keyword represents the color yellow green. Depending on the methodology and technique,
793as well as the available hardware, it can correspond to a specific color in the RGB
794space. However, not all computers have this color. In which case,
795it is approximated by the closest color available, which is usually also used in
796decoding images to identify the color to use.
797
798@italian
799Con questa parola chiave si rappresenta il colore giallo verde. A seconda della metodologia
800e della tecnica, nonché dell'hardware disponibile, può corrispondere a uno specifico
801colore nello spazio RGB. Tuttavia, non tutti i computer
802dispongono di un colore di questo tipo. Nel qual caso, viene approssimato dal
803colore più vicino, che di solito viene utilizzato anche nella decodifica delle
804immagini per individuare il colore da utilizzare.
805
806@syntax = YELLOW GREEN
807
808@example PEN YELLOW GREEN
809
810@target all
811
812@color
813</usermanual> */
814
815/* <usermanual>
816@keyword OLIVE GREEN (constant)
817
818@english
819This keyword represents the color olive green. Depending on the methodology and technique,
820as well as the available hardware, it can correspond to a specific color in the RGB
821space. However, not all computers have this color. In which case,
822it is approximated by the closest color available, which is usually also used in
823decoding images to identify the color to use.
824
825@italian
826Con questa parola chiave si rappresenta il colore verde olive. A seconda della metodologia
827e della tecnica, nonché dell'hardware disponibile, può corrispondere a uno specifico
828colore nello spazio RGB. Tuttavia, non tutti i computer
829dispongono di un colore di questo tipo. Nel qual caso, viene approssimato dal
830colore più vicino, che di solito viene utilizzato anche nella decodifica delle
831immagini per individuare il colore da utilizzare.
832
833@syntax = OLIVE GREEN
834
835@example PEN OLIVE GREEN
836
837@target all
838
839@color
840</usermanual> */
841
842/* <usermanual>
843@keyword PINK (constant)
844
845@english
846This keyword represents the color pink. Depending on the methodology and technique,
847as well as the available hardware, it can correspond to a specific color in the RGB
848space. However, not all computers have this color. In which case,
849it is approximated by the closest color available, which is usually also used in
850decoding images to identify the color to use.
851
852@italian
853Con questa parola chiave si rappresenta il colore rosa. A seconda della metodologia
854e della tecnica, nonché dell'hardware disponibile, può corrispondere a uno specifico
855colore nello spazio RGB. Tuttavia, non tutti i computer
856dispongono di un colore di questo tipo. Nel qual caso, viene approssimato dal
857colore più vicino, che di solito viene utilizzato anche nella decodifica delle
858immagini per individuare il colore da utilizzare.
859
860@syntax = PINK
861
862@example PEN PINK
863
864@target all
865
866@color
867</usermanual> */
868
869/* <usermanual>
870@keyword PEACH (constant)
871
872@english
873This keyword represents the color peach. Depending on the methodology and technique,
874as well as the available hardware, it can correspond to a specific color in the RGB
875space. However, not all computers have this color. In which case,
876it is approximated by the closest color available, which is usually also used in
877decoding images to identify the color to use.
878
879@italian
880Con questa parola chiave si rappresenta il colore pesca. A seconda della metodologia
881e della tecnica, nonché dell'hardware disponibile, può corrispondere a uno specifico
882colore nello spazio RGB. Tuttavia, non tutti i computer
883dispongono di un colore di questo tipo. Nel qual caso, viene approssimato dal
884colore più vicino, che di solito viene utilizzato anche nella decodifica delle
885immagini per individuare il colore da utilizzare.
886
887@syntax = PEACH
888
889@example PEN PEACH
890
891@target all
892
893@color
894</usermanual> */
895
896/* <usermanual>
897@keyword SIZE
898
899@english
900To get the size of a variable you can use the ''SIZE'' command. This command
901will return, in bytes, the size of the memory area used by that
902variable. It is possible to apply this command to any type of static data,
903such as ''BUFFER'', ''IMAGE'', ''IMAGES'', ''TYPE'' and constant strings.
904
905@italian
906Per ottenere la dimensione di una variabile puoi usare il comando ''SIZE''.
907Questo comando restituirà, in byte, la dimensione dell'area di memoria
908utilizzata da quella variabile. È possibile applicare questo comando a
909qualsiasi tipo di dati statici, come ''BUFFER'', ''IMAGE'', ''IMAGES'',
910''TYPE'' e stringhe costanti.
911
912@syntax ... = SIZE(variable)
913
914@example PRINT SIZE(var)
915
916@usedInExample buffers_definition_02.bas
917@usedInExample buffers_definition_03.bas
918
919@target all
920</usermanual> */
921
922/* <usermanual>
923@keyword FREE
924
925@english
926Retrieves the free space still available for strings, in terms of bytes.
927This is how many characters are still available to be stored. The maximum
928value when calling this function is that indicated by the
929''DEFINE STRING SPACE'' statement. The default value for string
930storage is 1024 bytes. The command implicitly invokes garbage collection.
931
932@italian
933Recupera lo spazio libero ancora disponibile per le stringhe, in termini di bytes.
934Equivale a quanti caratteri sono ancora disponibili per essere memorizzati. Il
935valore massimo, nel richiamare questa funzione, è quello indicato
936dall'istruzione ''DEFINE STRING SPACE'', ed è pari a 1024 bytes se non viene
937impostato diversamente. Il comando invoca implicitamente una garbage collection.
938
939@syntax ... = FREE
940
941@example PRINT FREE
942
943</usermanual> */
944
945/* <usermanual>
946@keyword SCREEN (constant)
947
948@english
949Retrieves a bitmask with screen characteristics, such as whether or
950not TILE or BITMAP mode is available.
951
952^ BIT POSITION ^ SYMBOL ^ MEANING ^
953| 0 | TILEMAP | Is tilemap native? |
954| 1 | BITMAP | Is bitmap native? |
955
956This can be verified with a simple bitwise comparison.
957
958@italian
959Recupera una maschera di bit con le caratteristiche dello schermo, quali la
960disponibilità o meno della modalità TILE o BITMAP.
961
962^ POSIZIONE BIT ^ SIMBOLO ^ SIGNIFICATO ^
963| 0 | TILEMAP | Supporto al tilemap nativo? |
964| 1 | BITMAP | Supporto al bitmap nativo? |
965
966Si può verificare con un semplice confronto bit a bit.
967
968@syntax ... = SCREEN
969
970@example IF SCREEN IS TILEMAP THEN: PRINT "tilemap is native!": ENDIF
971
972@usedInExample screens_bitmap_01.bas
973
974@target all
975
976@deprecated
977</usermanual> */
978
979/* <usermanual>
980@keyword TILEMAP (constant)
981
982@english
983This is the bitmask used to select the TILE mode.
984
985@italian
986Questa è la maschera di bit per indicare la modalità TILE.
987
988@syntax ... = TILEMAP
989
990@example IF SCREEN IS TILEMAP THEN: PRINT "tilemap is native!": ENDIF
991
992@usedInExample screens_bitmap_01.bas
993
994@target all
995
996@seeAlso BITMAP (constant)
997</usermanual> */
998
999/* <usermanual>
1000@keyword BITMAP (constant)
1001
1002@english
1003This is the bitmask used to select the BITMAP mode.
1004
1005@italian
1006Questa è la maschera di bit per indicare la modalità BITMAP.
1007
1008@syntax ... = BITMAP
1009
1010@example IF SCREEN IS BITMAP THEN: PRINT "bitmap is native!": ENDIF
1011
1012@usedInExample screens_bitmap_01.bas
1013
1014@seeAlso TILEMAP (constant)
1015</usermanual> */
1016
1017/* <usermanual>
1018@keyword CONST
1019
1020@english
1021Using the ''CONST'' command allows you to define one or more constants, which will be used later
1022in the program. Constants have the advantage of being calculated once and for
1023all, at compile time, directly by the compiler and can be used to initialize
1024variables. Furthermore, the constants are global, that is, they are always visible
1025everywhere, both in the main program and within the procedures. Finally, constants
1026do not take up memory space.
1027
1028In the definition of the constants itself it is possible to indicate whether it must
1029be positive or not, with the keyword ''POSITIVE''. This check is carried out at
1030compilation time and, in the event of a negative result, it will result in a
1031compilation error. This condition is useful to ensure that the preconditions related to
1032the hardware are respected (as happens, for example, when calculating the margins
1033in the case of a screen smaller than the expected minimum).
1034
1035It is also possible to define a validity range of the values that will be represented
1036in the constant. This interval is defined in a similar way to intervals in mathematics:
1037using the square bracket means that the extremes (minimum, maximum) are included,
1038while a round bracket means that the extremes are excluded.
1039
1040@italian
1041L'uso del comando ''CONST'' permette di definire una costante, che sarà utilizzata
1042successivamente nel programma. Le costanti hanno il vantaggio di essere calcolate
1043una volta per tutte, al momento della compilazione, direttamente dal compilatore e
1044possono essere usate per inizializzare le variabili. Inoltre, le costanti sono globali,
1045cioè sono sempre visibili dovunque, sia nel programma principale che all'interno
1046delle procedure. Infine, le costanti non occupano spazio in memoria.
1047
1048Nella definizione stessa delle costanti è possibile indicare se la stessa deve
1049essere o meno positiva (con la parola chiave ''POSITIVE''). Tale controllo viene
1050svolto al momento della compilazione, e in caso dia esito negativo, darà luogo a
1051un errore di compilazione. Tale condizione è utile per garantire che le precondizioni
1052legate all'hardware siano rispettate (come avviene, ad esempio, calcolando i margini
1053in caso di uno schermo più piccolo del minimo atteso).
1054
1055E' anche possibile definire un intervallo di validità dei valori che saranno rappresentati
1056nella costante. Tale intervallo viene definito con una modalità analoga agli intervalli
1057in matematica: usando la parentesi quadra si intende che gli estremi (minimo, massimo)
1058sono inclusi, mentre una parentesi tonda si intende che gli estremi sono esclusi.
1059
1060@syntax [POSITIVE] CONST identifier = value
1061@syntax CONST identifier IN (min,max) = value
1062@syntax CONST identifier IN "[" min,max) = value
1063@syntax CONST identifier IN (min,max "]" = value
1064@syntax CONST identifier IN "[" min,max "]"" = value
1065
1066@example CONST x = 42
1067@example POSITIVE CONST y = -42: ' this raises an error!
1068@example CONST width IN (0,320] = 128
1069
1070@usedInExample contrib_sierpinski.bas
1071@usedInExample contrib_sierpinski2.bas
1072@usedInExample contrib_sierpinski3.bas
1073
1074@alias SHARED CONST
1075@alias CONST SHARED
1076@alias GLOBAL CONST
1077@alias CONST GLOBAL
1078
1079@target all
1080</usermanual> */
1081
1082/* <usermanual>
1083@keyword DIM (array)
1084
1085@english
1086
1087The ''DIM'' command is used to reserve a specific space in the computer's
1088memory to hold data that you will use during the execution of your program.
1089In practice, it is like reserving empty boxes where you can store objects
1090(data) of different sizes and types.
1091
1092The ''DIM'' command is used primarily to create arrays, which are data
1093structures that allow you to group multiple values under a single name,
1094accessing each value through a numeric index. You can define both
1095vectors (mono dimensional array) or a multidimensional array of values,
1096and to initialize this array with the preferred values. You must also
1097specify the size of the array, that is, the number of elements it can contain.
1098When you declare an array with ''DIM'', you reserve a portion of memory
1099sufficient to hold all the elements of the array.
1100
1101The simplest syntax is that which defines a vector of a single dimension:
1102in this case, it is sufficient to indicate the number of elements in
1103parentheses. With the keyword ''AS'' you can indicate the data type
1104of each single element.
1105
1106You can, of course, define a matrix (i.e.
1107a vector with two or more dimensions). In this case it is sufficient to
1108indicate the number of elements for each dimension, separating them
1109with a comma.
1110
1111By definition, the array will be initialized with a value of zero
1112for each element. You can change this behavior by specifying an
1113initialization by assignment. The initialization can be done by
1114indicating a single initialization value, each single value
1115of each single element, with the same type of data with which
1116the matrix was created (with the ''# {...}'' syntax), or by
1117describing the memory area that will occupy the array,
1118byte by byte (with the ''# [...]'' syntax ).
1119
1120The array could be assigned to a "read only" memory, in order
1121to save RAM space. This can be done using ''READ ONLY'' flag.
1122
1123Finally, the array can be assigned to a specific expansion
1124bank by using the ''BANKED'' keyword. Otherwise, if an array
1125could be used as destination of ''BANK READ'' / ''BANK WRITE''
1126command, you should add this flag.
1127
1128Arrays allow you to organize data in a structured way, making it easier
1129to access and manipulate. By declaring arrays before using them, you
1130define a specific size of the data. The ''DIM'' command makes code
1131more readable, because it explicitly declares the data structures
1132used.
1133
1134@italian
1135
1136Il comando ''DIM'' serve per riservare uno spazio specifico nella
1137memoria del computer per contenere i dati che utilizzerai durante
1138l'esecuzione del tuo programma. In pratica, è come riservare delle
1139caselle vuote in cui puoi memorizzare oggetti (dati) di diverse
1140dimensioni e tipi.
1141
1142Il comando ''DIM'' serve principalmente per creare array, che
1143sono strutture dati che consentono di raggruppare più valori
1144sotto un unico nome, accedendo a ciascun valore tramite un indice
1145numerico. Puoi definire sia vettori (array monodimensionale) sia un
1146array multidimensionale di valori e inizializzare questo array con
1147i valori preferiti. Devi anche specificare la dimensione dell'array,
1148ovvero il numero di elementi che può contenere. Quando dichiari un array
1149con ''DIM'', riservi una porzione di memoria sufficiente a contenere tutti gli elementi dell'array.
1150
1151La sintassi più semplice è quella che definisce un vettore di
1152una sola dimensione: in questo caso, è sufficiente indicare il numero di
1153elementi tra parentesi. Con la parola chiave ''AS'' puoi indicare il tipo
1154di dati di ogni singolo elemento.
1155
1156Puoi, naturalmente, definire una matrice (cioè un vettore con due o
1157più dimensioni). In questo caso è sufficiente indicare il numero di elementi
1158per ogni dimensione, separandoli con una virgola.
1159
1160Per definizione, l'array verrà inizializzato con un valore pari a zero
1161per ogni elemento. Puoi modificare questo comportamento specificando
1162un'inizializzazione tramite assegnazione. L'inizializzazione può essere
1163effettuata indicando un singolo valore di inizializzazione, ogni singolo
1164valore di ogni singolo elemento, con lo stesso tipo di dati con cui è
1165stata creata la matrice (con la sintassi ''# {...}''), oppure descrivendo
1166l'area di memoria che occuperà l'array, byte per byte (con la sintassi
1167''# [...]'').
1168
1169L'array potrebbe essere assegnato a una memoria a "sola lettura", per
1170risparmiare spazio RAM. Questo può essere fatto usando il flag ''READ ONLY''.
1171
1172Infine, l'array può essere assegnato a una specifica memoria di espansione
1173usando la parola chiave ''BANKED''. Altrimenti, se un array può essere
1174usato come destinazione del comando ''BANK READ'' / ''BANK WRITE'',
1175dovresti aggiungere questo flag.
1176
1177Gli array consentono di organizzare i dati in modo strutturato,
1178rendendoli più facili da accedere e manipolare. Dichiarando gli array
1179prima di utilizzarli, definisci una dimensione specifica dei dati.
1180Il comando ''DIM'' rende il codice più leggibile, perché dichiara
1181esplicitamente le strutture dati utilizzate.
1182
1183@syntax DIM name [AS type] (d1[,d2[,...]]) [ro] [fl]
1184@syntax DIM name [AS type] (d1[,d2[,...]]) = #"["hex"]" [ro] [fl]
1185@syntax DIM name [AS type] (d1[,d2[,...]]) = #{v,v,...} [ro] [fl]
1186@syntax DIM name [AS type] WITH v (d1[,d2[,...]]) [ro] [fl]
1187@syntax ro: [READ ONLY|READONLY]
1188@syntax fl: [BANKED|BANKED(n)|UNBANKED|FOR BANK READ|FOR BANK WRITE]
1189
1190@example DIM x(42)
1191@example DIM values AS DWORD(20,20) BANKED
1192@example DIM y AS BYTE(8) = #[ff80ff80ff80ff80]
1193@example DIM z AS BYTE(8) = _
1194@example #{ 255, 128, 255, 128, 255, 128, 255, 128 }
1195@example DIM scores WITH 0 (2)
1196
1197@example DIM x(42)
1198@example DIM y(4) AS BYTE = #{ 1, 2, 3, 4 }
1199
1200@usedInExample arrays_examples_01.bas
1201@usedInExample arrays_examples_02.bas
1202@usedInExample arrays_examples_03.bas
1203@usedInExample arrays_examples_04.bas
1204@usedInExample arrays_examples_05.bas
1205@usedInExample contrib_sierpinski.bas
1206@usedInExample contrib_sierpinski2.bas
1207@usedInExample contrib_sierpinski3.bas
1208
1209@seeAlso DIM (variable)
1210
1211@target all
1212</usermanual> */
1213
1214/* <usermanual>
1215@keyword DIM (variable)
1216
1217@english
1218
1219The ''DIM'' command is used to reserve a specific space in the computer's
1220memory to hold data that you will use during the execution of your program.
1221In particular, you can use ''DIM'' for a single variable
1222
1223Declaring variables explicitly makes your code more readable and understandable,
1224especially in longer programs. Specifying the data type prevents type errors
1225when your program runs. You can initialize a variable when you declare it,
1226giving it an initial value different by 0 (the ugBASIC default value).
1227Moreover, when you need to use a particular data type (e.g. ''FLOAT''
1228for scientific calculations), it is advisable to explicitly declare the variable.
1229
1230The scope of a variable declared with ''DIM'' depend on the context in which
1231it is declared. It may be local to a procedure or global to the entire program.
1232It is always a good practice to declare all variables at the beginning of a
1233program or procedure to improve readability and maintainability of the code, and
1234ugBASIC gives you the ''OPTION EXPLICIT'' directive to ensure that you use
1235only defined variables.
1236
1237Note that ugBASIC language, as other BASIC dialect, do not need to use ''DIM'' to
1238declare a variable. The data type and scope is inferred from the context in which
1239the variable is first used.
1240
1241@italian
1242
1243Il comando ''DIM'' viene utilizzato per riservare uno spazio specifico nella
1244memoria del computer per contenere i dati che utilizzerai durante l'esecuzione
1245del tuo programma.
1246
1247In particolare, puoi utilizzare ''DIM'' per una singola variabile. Dichiarare
1248le variabili in modo esplicito rende il tuo codice più leggibile e comprensibile,
1249specialmente nei programmi più lunghi. Specificare il tipo di dati impedisce
1250errori di tipo quando il tuo programma viene eseguito. Puoi inizializzare una
1251variabile quando la dichiari, assegnandole un valore iniziale diverso da 0
1252(il valore predefinito di ugBASIC).
1253
1254Inoltre, quando hai bisogno di utilizzare un particolare tipo di dati (ad
1255esempio ''FLOAT'' per calcoli scientifici), è consigliabile dichiarare
1256esplicitamente la variabile.
1257
1258L'ambito di una variabile dichiarata con ''DIM'' dipende dal contesto in cui
1259viene dichiarata. Può essere locale a una procedura o globale all'intero
1260programma. È sempre una buona norma dichiarare tutte le variabili all'inizio
1261di un programma o di una procedura per migliorare la leggibilità e la
1262manutenibilità del codice, e ugBASIC fornisce la direttiva ''OPTION EXPLICIT''
1263per garantire che vengano utilizzate solo variabili definite.
1264
1265Nota che il linguaggio ugBASIC, come altri dialetti BASIC, non ha bisogno di
1266usare ''DIM'' per dichiarare una variabile. Il tipo di dati e l'ambito vengono
1267dedotti dal contesto in cui la variabile viene utilizzata per la prima volta.
1268
1269@syntax DIM name [AS type] [= v][,name [AS type] [= v][, ...]]
1270
1271@example DIM x AS INTEGER = 42, y AS BYTE = 21
1272
1273@usedInExample arrays_examples_01.bas
1274@usedInExample arrays_examples_02.bas
1275@usedInExample arrays_examples_03.bas
1276@usedInExample arrays_examples_04.bas
1277@usedInExample arrays_examples_05.bas
1278@usedInExample contrib_sierpinski.bas
1279@usedInExample contrib_sierpinski2.bas
1280@usedInExample contrib_sierpinski3.bas
1281
1282@alias VAR
1283@seeAlso DIM (array)
1284
1285@target all
1286</usermanual> */
1287
1288/* <usermanual>
1289@keyword VAR
1290
1291@english
1292
1293@italian
1294
1295@alias DIM (variable)
1296
1297@target all
1298</usermanual> */
1299
1300/* <usermanual>
1301@keyword SPRITE MAX X (constant)
1302
1303@english
1304This constant allows us to know which is the largest abscissa
1305(x) that can assume the horizontal position of a sprite. It
1306may or may not coincide with the horizontal resolution of the
1307screen, in the sense that some graphics chipsets can move
1308sprites far beyond what is representable (example: border
1309management on the VIC-II).
1310
1311@italian
1312Questa costante permette di sapere qual è l'ascissa (x) più
1313grande che può assumere la posizione orizzontale di uno sprite.
1314Può o meno coincidere con la risoluzione orizzontale dello
1315schermo, nel senso che alcuni chipset grafici possono muovere
1316sprite ben oltre quello che è rappresentabile (esempio:
1317la gestione dei bordi sul VIC-II).
1318
1319@syntax = SPRITE MAX X
1320
1321@example maxX = SPRITE MAX X
1322
1323</usermanual> */
1324
1325/* <usermanual>
1326@keyword SPRITE MIN X (constant)
1327
1328@english
1329This constant allows us to know which is the smallest abscissa
1330(x) that can assume the horizontal position of a sprite. It
1331may or may not coincide with zero of the
1332screen, in the sense that some graphics chipsets can move
1333sprites far beyond what is representable (example: border
1334management on the VIC-II).
1335
1336@italian
1337Questa costante permette di sapere qual è l'ascissa (x) più
1338piccola che può assumere la posizione orizzontale di uno sprite.
1339Può o meno coincidere con la risoluzione orizzontale dello
1340schermo, nel senso che alcuni chipset grafici possono muovere
1341sprite ben oltre quello che è rappresentabile (esempio:
1342la gestione dei bordi sul VIC-II).
1343
1344@syntax = SPRITE MIN X
1345
1346@example minX = SPRITE MIN X
1347
1348</usermanual> */
1349
1350/* <usermanual>
1351@keyword SPRITE MAX Y (constant)
1352
1353@english
1354This constant allows us to know which is the largest ordinate
1355(y) that can assume the vertical position of a sprite. It
1356may or may not coincide with the horizontal resolution of the
1357screen, in the sense that some graphics chipsets can move
1358sprites far beyond what is representable (example: border
1359management on the VIC-II).
1360
1361@italian
1362Questa costante permette di sapere qual è l'ordinata (y) più
1363grande che può assumere la posizione verticale di uno sprite.
1364Può o meno coincidere con la risoluzione verticale dello
1365schermo, nel senso che alcuni chipset grafici possono muovere
1366sprite ben oltre quello che è rappresentabile (esempio:
1367la gestione dei bordi sul VIC-II).
1368
1369@syntax = SPRITE MAX Y
1370
1371@example maxY = SPRITE MAX Y
1372
1373</usermanual> */
1374
1375/* <usermanual>
1376@keyword SPRITE MIN Y (constant)
1377
1378@english
1379This constant allows us to know which is the smallest ordinate
1380(y) that can assume the vertical position of a sprite. It
1381may or may not coincide with zero of the
1382screen, in the sense that some graphics chipsets can move
1383sprites far beyond what is representable (example: border
1384management on the VIC-II).
1385
1386@italian
1387Questa costante permette di sapere qual è l'ordinata (y) più
1388piccola che può assumere la posizione verticale di uno sprite.
1389Può o meno coincidere con lo zero dello
1390schermo, nel senso che alcuni chipset grafici possono muovere
1391sprite ben oltre quello che è rappresentabile (esempio:
1392la gestione dei bordi sul VIC-II).
1393
1394@syntax = SPRITE MIN Y
1395
1396@example minX = SPRITE MIN Y
1397
1398</usermanual> */
1399
1400/* <usermanual>
1401@keyword WAIT FIRE
1402
1403@english
1404This instruction allows you to wait for the pressure of the FIRE key on the
1405joystick. If the port number is not indicated, it means the first available
1406(the one with index 0). If the keyword ''RELEASE'' is appended,
1407the instruction will wait for the release of the key, as well.
1408
1409@italian
1410Questa istruzione consente di attendere la pressione del tasto FIRE del
1411joystick. Se non viene indicato il numero della porta, si intende il
1412primo disponibile (quello con indice 0). Se viene aggiunta la parola chiave
1413''RELEASE'', l'istruzione attenderà anche il rilascio del tasto.
1414
1415@syntax WAIT FIRE [(port)] [RELEASE]
1416
1417@example WAIT FIRE
1418
1419@target all
1420</usermanual> */
1421
1422/* <usermanual>
1423@keyword WAIT KEY
1424
1425@english
1426This instruction allows you to wait for any key to be pressed
1427key on the keyboard. If the keyword ''RELEASE'' is appended,
1428the instruction will wait for the release of the key, as well.
1429
1430@italian
1431Questa istruzione consente di attendere la pressione di un qualsiasi
1432tasto sulla tastiera. Se viene aggiunta la parola chiave
1433''RELEASE'', l'istruzione attenderà anche il rilascio del tasto.
1434
1435@syntax WAIT KEY [RELEASE]
1436
1437@example WAIT KEY
1438
1439@target all
1440</usermanual> */
1441
1442/* <usermanual>
1443@keyword WAIT KEY OR FIRE
1444
1445@english
1446This instruction allows you to wait for the pressure of the FIRE key on the
1447joystick or any key from keyboard. If the port number is not indicated, it means the first available
1448(the one with index 0). If the keyword ''RELEASE'' is appended,
1449the instruction will wait for the release of the key / fire button, as well.
1450
1451@italian
1452Questa istruzione consente di attendere la pressione del tasto FIRE del
1453joystick, oppure di un tasto sulla tastiera. Se non viene indicato il numero della porta, si intende il
1454primo disponibile (quello con indice 0). Se viene aggiunta la parola chiave
1455''RELEASE'', l'istruzione attenderà anche il rilascio di entrambi i tasti.
1456
1457@syntax WAIT KEY OR FIRE [([port])] [RELEASE]
1458
1459@example WAIT KEY OR FIRE
1460
1461@target all
1462</usermanual> */
1463
1464/* <usermanual>
1465@keyword OPTION EXPLICIT
1466
1467@english
1468When ''OPTION EXPLICT'' or ''OPTION EXPLICIT ON'' appears in a source file,
1469the programmer must explicitly declare all variables by using the ''VAR'' or
1470''DIM'' statements.
1471
1472If the programmer tries to use an undeclared variable
1473name, an error occurs at compile time. The ''OPTION EXPLICT OFF'' statement
1474allows implicit declaration of variables. If used, the ''OPTION EXPLICT''
1475statement can appear everywhere in a source file, before any other source
1476code statements to check.
1477
1478Setting ''OPTION EXPLICT OFF'' is generally not a good practice. The programmer
1479could misspell a variable name in one or more locations, which would cause
1480unexpected results when the program is run.
1481
1482@italian
1483Quando ''OPTION EXPLICT'' o ''OPTION EXPLICIT ON'' appare in un file sorgente,
1484il programmatore deve dichiarare esplicitamente tutte le variabili usando le
1485istruzioni ''VAR'' o ''DIM''.
1486
1487Se il programmatore tenta di utilizzare un nome di variabile non dichiarato,
1488si verifica un errore in fase di compilazione. L'istruzione ''OPTION EXPLICT OFF''
1489consente la dichiarazione implicita di variabili. Se utilizzata, l'istruzione
1490''OPTION EXPLICT'' può apparire ovunque in un file sorgente, prima di qualsiasi
1491altra istruzione del codice sorgente da controllare.
1492
1493L'impostazione di ''OPTION EXPLICT OFF'' generalmente non è una buona pratica.
1494Il programmatore potrebbe digitare in modo errato un nome di variabile in una
1495o più posizioni, il che causerebbe risultati imprevisti durante l'esecuzione
1496del programma.
1497
1498@syntax OPTION EXPLICT [ON]
1499@syntax OPTION EXPLICT OFF
1500
1501@example OPTION EXPLICIT ON
1502
1503@target all
1504</usermanual> */
1505
1506/* <usermanual>
1507@keyword ORIGIN
1508
1509@english
1510The ''ORIGIN'' command can be used to set the origin of the cartesian axes with
1511respect to which drawing instructions will operate. The command accepts the
1512coordinates ''x, y'' of the origin, and the indication whether the Y axis is
1513oriented upwards (''UP'') or downwards (''DOWN''). If not used, the reference
1514system by default is placed at the top left with the Y axis downwards.
1515
1516@italian
1517Il comando ''ORIGIN'' può essere utilizzato per impostare l'origine degli assi
1518cartesiani rispetto ai quali opereranno le istruzioni di disegno. Il comando
1519accetta le coordinate ''x, y'' dell'origine, e l'indicazione se l'asse delle
1520Y è orientato verso l'alto (''UP'') oppure verso il basso (''DOWN'').
1521Se non utilizzato, il sistema di riferimento per default viene posto in alto a
1522sinistra con l'asse delle Y verso il basso.
1523
1524@syntax ORIGIN x, y UP
1525@syntax ORIGIN x, y [DOWN]
1526
1527@example ORIGIN 100, 100 UP
1528
1529</usermanual> */
1530
1531/* <usermanual>
1532@keyword RESOLUTION
1533
1534@english
1535This keyword allows to have a "virtual" resolution. Even when you select a graphical mode with only
1536160 pixel x 200 pixel, the graphical instructions execute the same thing, the only difference is that
1537the pixels will be proportional to virtual resolution. The choice to add this instruction is guided
1538by mathematical ratio, since 640x400 pixels gives 1,6 where 640x200 gives 3,2. 1.6 isn't a perfect
15394/3 ratio but at least it's closer. By default, the virtual resolution will be set equal to the
1540resolution given by ''BITMAP ENABLE''. Then, after ''RESOLUTION'', the graphical instructions
1541will use this virtual resolution.
1542
1543@italian
1544Questa parola chiave permette di avere una risoluzione "virtuale". Anche quando si seleziona una
1545modalità grafica con soli 160 pixel x 200 pixel, le istruzioni grafiche funzioneranno con le
1546stesse identiche dimensioni. L'unica differenza è che i pixel saranno proporzionali alla
1547risoluzione virtuale. La scelta di aggiungere questa istruzione è guidata dal rapporto matematico,
1548poiché 640x400 pixel dà 1,6 dove 640x200 dà 3,2. 1.6 non è un perfetto rapporto 4/3 ma almeno è più
1549vicino. Di default, la risoluzione virtuale sarà impostata uguale alla risoluzione data da
1550''BITMAP ENABLE''. Quindi, dopo ''RESOLUTION'', le istruzioni grafiche utilizzeranno
1551questa risoluzione virtuale.
1552
1553@syntax RESOLUTION width, height
1554
1555@example RESOLUTION 100, 100
1556
1557@seeAlso ORIGIN
1558
1559</usermanual> */
1560
1561/* <usermanual>
1562@keyword FONT LOAD
1563
1564@english
1565The ''FONT LOAD'' command allows you to load an image and to convert it into
1566a font.
1567
1568The command support a set of modern image format, like:
1569
1570 * JPEG baseline & progressive
1571 * PNG 1/2/4/8/16-bit-per-channel
1572 * TGA
1573 * BMP (non-1bpp, non-RLE)
1574 * PSD (composited view only, no extra channels, 8/16 bit-per-channel)
1575 * GIF
1576 * HDR (radiance rgbE format)
1577 * PIC (Softimage PIC)
1578 * PNM (PPM and PGM binary only)
1579
1580The image will be converted into a way that can be efficiently drawn
1581on the screen using the default characters.
1582
1583It is also possible to indicate the index from which to start loading the various characters.
1584The index is not the ASCII code but the screen code.
1585
1586@italian
1587Il comando ''FONT LOAD'' permette di caricare un file immagine, e di convertirlo
1588in una serie di caratteri (font).
1589
1590Il comando supporta una serie di formati moderni:
1591
1592 * JPEG baseline & progressive
1593
1594 * PNG 1/2/4/8/16-bit-per-canale
1595
1596 * TGA
1597
1598 * BMP (non-1bpp, non-RLE)
1599
1600 * PSD (vista composita, nessun canale extra, 8/16 bit-per-canale)
1601
1602 * GIF
1603
1604 * HDR (formato radiance rgbE)
1605
1606 * PIC (Softimage PIC)
1607
1608 * PNM (solo formato binario PPM e PGM)
1609
1610L'immagine verrà convertita in un modo che possa essere disegnata in modo efficiente
1611sullo schermo. Potrebbe essere convertita in una tavolozza indicizzata, e potrebbe essere
1612anche ridimensionata.
1613
1614E' inoltre possibile indicare l'indice da cui iniziare a caricare i vari caratteri.
1615L'indice non è il codice ASCII ma lo screen code.
1616
1617@syntax FONT LOAD filename [TO index]
1618
1619@example FONT LOAD "digit0.png" TO 48
1620
1621@target all
1622</usermanual> */
1623/* <usermanual>
1624@keyword REM
1625
1626@english
1627
1628In BASIC, the ''REM'' keyword (also abbreviated by the single quotation character ('))
1629is used to insert comments into code. A comment is a note or explanation that is added
1630to code to make it easier for the developer to understand, as well as for other
1631programmers who may read it in the future.
1632
1633When the computer compile the ugBASIC program, it completely ignores everything that follows
1634the ''REM'' keyword on the same line. The word ''REM'' can be placed at the beginning of a line
1635or after a colon. In either case, the rest of the line will be treated as a comment.
1636To comment out multiple lines of code, you can use ''REM'' at the beginning of each line.
1637Note that you cannot continue a ''REM'' statement by using a line-continuation sequence
1638(''_''). This means that, for a multiple-line comment, you need to use as many ''REM''s
1639statements as the lines you comment.
1640
1641Comments have the role to describe the purpose of a particular section of code
1642or individual statement, and it provide information about the program, who created it,
1643when it was created, and what changes were made. They make code easier to understand,
1644even for people who didn write the program: when you return to code after some time,
1645comments help you remember the purpose of different parts of the program.
1646
1647Moreover, it is the best way to disable
1648a piece of code without deleting it, simply add ''REM'' to the beginning of the line.
1649
1650The main guidelines in using ''REM'' it to use simple, direct language to explain the code,
1651avoiding long or complicated sentences. Generally, they should be used on parts of the code
1652that are not obvious. You do not need to comment on every single line.
1653
1654@italian
1655In BASIC, la parola chiave ''REM'' (abbreviata anche con il carattere di virgoletta
1656singola (')) viene utilizzata per inserire commenti nel codice. Un commento è una nota
1657o una spiegazione che viene aggiunta al codice per renderlo più facile da comprendere per
1658lo sviluppatore, così come per altri programmatori che potrebbero leggerlo in futuro.
1659
1660Quando il computer compila il programma ugBASIC, ignora completamente tutto ciò che segue
1661la parola chiave ''REM'' sulla stessa riga. La parola ''REM'' può essere posizionata
1662all'inizio di una riga o dopo i due punti. In entrambi i casi, il resto della riga verrà
1663trattato come un commento. Per commentare più righe di codice, puoi usare ''REM'' all'inizio
1664di ogni riga.
1665
1666Nota che non puoi continuare un'istruzione ''REM'' usando una sequenza di continuazione
1667di riga (''_''). Ciò significa che per un commento multiriga, devi usare tante istruzioni
1668''REM'' quante sono le righe che stai commentando.
1669
1670I commenti vengono utilizzati per descrivere lo scopo di una particolare sezione
1671di codice o di una singola istruzione e forniscono informazioni sul programma,
1672chi lo ha creato, quando è stato creato e quali modifiche sono state apportate.
1673Rendono il codice più facile da capire, anche per chi non ha scritto il programma:
1674quando si torna al codice dopo un po' di tempo, i commenti aiutano a ricordare
1675lo scopo delle diverse parti del programma.
1676
1677Inoltre, è il modo migliore per disabilitare un pezzo di codice senza eliminarlo,
1678basta aggiungere ''REM'' all'inizio della riga. Le linee guida principali
1679nell'uso di ''REM'' sono di usare un linguaggio semplice e diretto per spiegare
1680il codice, evitando frasi lunghe o complicate. In genere, dovrebbero essere
1681utilizzati su parti del codice che non sono ovvie. Non è necessario commentare
1682ogni singola riga.
1683
1684@syntax REM [comment]
1685@syntax ' [comment]
1686
1687@example REM this is a comment
1688@example ' and this is a comment
1689@example PRINT "ok": REM I am printing ok
1690
1691@target all
1692</usermanual> */
1693
1694/* <usermanual>
1695@keyword RGB
1696
1697@english
1698
1699The ''RGB'' function allows you to obtain the equivalent value of a color, given its red, green and blue
1700components. The value of this function, where it is supported by the target, can be used in place of a
1701nominal color. Where it is not defined, it always returns a value of zero, which may (or may not) correspond
1702to a valid color.
1703
1704@italian
1705
1706La funzione ''RGB'' consente di ottenere il valore equivalente di un colore, date le sue componenti secondo
1707rosso, verde e blu. Il valore di questa funzione, laddove è supportata dal target, può essere utilizzata al
1708posto di un colore nominale. Laddove non è definita, restituisce sempre un valore di zero, che può (o meno)
1709corrispondere a un colore valido.
1710
1711@syntax = RGB( red, green, blue )
1712
1713@example red = RGB( 255, 0, 0 )
1714
1715@usedInExample graphics_color_04.bas
1716@usedInExample graphics_palette_01.bas
1717@usedInExample images_get_03.bas
1718
1719@seeAlso COLOR
1720@seeAlso SHADES (constant)
1721@target all
1722</usermanual> */
1723
1724/* <usermanual>
1725@keyword AFTER...CALL
1726
1727@english
1728
1729The ''AFTER...CALL'' command implement a countdown timer for your program.
1730It is a very useful tool for making a piece of code run after a specific interval,
1731essentially turning your program into a countdown. You must specifying the length
1732of time to wait, measured in ''TICKS''.
1733
1734When the timer reaches the specified timer, the program stops executing the current
1735code and jumps to the ''PROCEDURE'' indicated by the label. After executing the
1736routine, the program returns to where it left off and resumes execution. After the call,
1737the timer is disabled. You must use, again, the ''AFTER...CALL'' to enable again the mechanism.
1738
1739There are 8 delay timers from 0 to 7 which can be specified with ''timer''
1740parameter. If omitted, ''timer'' will be considered as 0. In the case of parallel
1741timers, 0 will be the highest and 7 the lowest priority.
1742
1743With ''EVERY OFF'' and ''EVERY ON'' you can disable or enable the timed
1744calls. It is important to know or realise that low-priority-procedures
1745which occurs simultanously to higher-priority-procedures are not lost.
1746Their task remains or handled again after finishing the higher-prio interrupt.
1747
1748Finally, note that the accuracy of the timer can vary depending on hardware and operating system,
1749and it can be used to create animations, simulate real-time events, or simply to execute
1750tasks after a specific time.
1751
1752@italian
1753Il comando ''AFTER...CALL'' implementa un timer di conto alla
1754rovescia per il programma.
1755
1756È uno strumento molto utile per far sì che un pezzo di codice venga eseguito
1757dopo un intervallo specifico, trasformando essenzialmente il tuo programma
1758in un conto alla rovescia. Devi specificare la durata del tempo di attesa,
1759 misurata in ''TICKS''.
1760
1761Quando il timer raggiunge il tempo specificato, il programma interrompe
1762l'esecuzione del codice corrente e passa alla ''PROCEDURE'' indicata
1763dall'etichetta. Dopo aver eseguito la routine, il programma torna al punto
1764in cui si era interrotto e riprende l'esecuzione. Dopo la chiamata,
1765il timer viene disabilitato. Devi usare, di nuovo, ''AFTER...CALL''
1766per abilitare nuovamente il meccanismo.
1767
1768Ci sono 8 timer di ritardo da 0 a 7 che possono essere specificati con il
1769parametro ''timer''. Se omesso, ''timer'' verrà considerato come 0.
1770Nel caso di timer paralleli, 0 sarà la priorità più alta e 7 la priorità
1771più bassa.
1772
1773Con ''EVERY OFF'' e ''EVERY ON'' puoi disabilitare o abilitare le
1774chiamate temporizzate. È importante sapere o realizzare che le procedure
1775a bassa priorità che si verificano simultaneamente alle procedure a
1776priorità più alta non vengono perse. Il loro compito rimane o viene gestito
1777di nuovo dopo aver terminato l'interruzione a priorità più alta.
1778
1779Infine, nota che la precisione del timer può variare a seconda dell'hardware
1780e del sistema operativo e può essere utilizzato per creare animazioni,
1781simulare eventi in tempo reale o semplicemente per eseguire attività dopo un
1782tempo specifico.
1783
1784@syntax AFTER value[,timer] TICKS CALL identifier
1785
1786@example AFTER 50 TICKS CALL changeBorderColor
1787@example AFTER 50,2 TICKS CALL changeBorderColor
1788
1789@usedInExample control_after_01.bas
1790
1791@target all
1792</usermanual> */
1793
1794/* <usermanual>
1795@keyword AFTER...GOSUB
1796
1797@english
1798Define the call of a subroutine after a specific time, without
1799interfering with the main program. You must specifying the length of time
1800to wait, measured in TICKS. The ugBASIC branches to the
1801subroutine after ''value''/''TICKS PER SECONDS'' seconds.
1802
1803There are 8 delay timers from 0 to 7 which can be specified with ''timer''.
1804If omitted ''timer'' defaults to 0. In the case of parallel task has 0 the
1805highest and 8 the lowest priority.
1806
1807With ''EVERY OFF'' and ''EVERY ON'' you can disable or enable the timed
1808calls. It is important to know or realise that
1809low-priority-subroutines which occurs simultanously to higher-priority-subroutines
1810are not lost. Their task remains or handled again after finishing the higher-prio interrupt.
1811
1812@italian
1813Introduce la chiamata di una subroutine dopo un certo tempo, senza interferire
1814con il programma principale. È necessario specificare il tempo da attendere,
1815misurato in ''TICKS''. Il compilatore ugBASIC passa alla subroutine
1816dopo ''value''/''TICKS PER SECOND'' secondi.
1817
1818Vi sono 8 timer di ritardo da 0 a 7 che possono essere specificati con ''timer''.
1819Se omesso, il valore predefinito ''timer'' è 0. Nel caso di attività parallela,
18200 ha la priorità più alta e 8 la priorità più bassa.
1821
1822Con ''EVERY OFF'' e ''EVERY ON'' è possibile disabilitare o abilitare le chiamate
1823temporizzate.
1824È importante sapere o realizzare che le subroutine a bassa priorità che si
1825verificano contemporaneamente alle subroutine a priorità più alta non vanno perse.
1826Il loro compito rimane o viene gestito nuovamente dopo aver terminato
1827l'interruzione con priorità più alta.
1828
1829@syntax AFTER value[,timer] TICKS GOSUB label
1830
1831@example AFTER 50 TICKS GOSUB 100
1832@example AFTER 50,2 TICKS GOSUB label
1833
1834@usedInExample control_after_02.bas
1835
1836@target all
1837</usermanual> */
1838
1839/* <usermanual>
1840@keyword UBOUND
1841
1842@english
1843
1844The ''UBOUND'' command (short for "upper bound") is used to determine the
1845highest index of an array. In other words, it tells you how far up
1846the array goes.
1847
1848Imagine you have a box of numbered chocolates. ''UBOUND'' tells you what
1849the number of the last chocolate is. This is useful when you need to
1850iterate over all the elements of an array, because it gives you the end
1851point of the loop.
1852
1853''UBOUND'' and ''LBOUND'' are often used together to define the bounds
1854of a ''FOR'' loop, and are complementary commands: they allow you to obtain
1855complete information about the structure of an array. Knowing these two
1856values, you can iterate over all the elements of the array, calculate
1857its total size, and perform many other operations.
1858
1859@italian
1860
1861Il comando ''UBOUND'' (abbreviazione di "upper bound") viene utilizzato
1862per determinare l'indice più alto di un array. In altre parole, ti dice
1863come funziona la composizione dell'array.
1864
1865Immagina di avere una scatola di cioccolatini numerati. ''UBOUND'' ti dice
1866qual è il numero dell'ultimo cioccolatino. Questo è utile quando devi
1867scorrere tutti gli elementi di un array, perché ti fornisce il punto finale
1868del ciclo.
1869
1870''UBOUND'' e ''LBOUND'' vengono spesso utilizzati insieme per definire
1871i limiti di un ciclo ''FOR'' e sono comandi complementari: ti consentono
1872di ottenere informazioni complete sulla struttura di un array. Conoscendo
1873questi due valori, puoi scorrere tutti gli elementi dell'array, calcolarne
1874la dimensione totale ed eseguire molte altre operazioni.
1875
1876@syntax = UBOUND( array [, dimension])
1877
1878@example DIM a(10,20)
1879@example PRINT UBOUND(a,1) : REM it will print 19 (0...19)
1880
1881</usermanual> */
1882
1883/* <usermanual>
1884@keyword LBOUND
1885
1886@english
1887
1888The ''LBOUND'' command (short for "lower bound") is used to determine the
1889lowest index of an array. In other words, it tells you where the count
1890of elements in an array begins.
1891
1892Imagine an array as a cabinet with many numbered drawers. ''LBOUND'' tells you
1893what the number of the first drawer is. This is useful when you need to
1894iterate through all the elements of an array, because it gives you the
1895starting point of the loop.
1896
1897If you have an array with multiple dimensions, you can specify the dimension
1898for which you want to find the lower bound:
1899
1900''LBOUND'' is essential when you write ''FOR'' loops to iterate through all
1901the elements of an array. It allows you to set the initial value of the loop
1902counter correctly.
1903
1904@italian
1905
1906Il comando ''LBOUND'' (abbreviazione di "lower bound") viene utilizzato per
1907determinare l'indice più basso di un array. In altre parole, ti dice dove
1908inizia il conteggio degli elementi in un array.
1909
1910Immagina un array come un mobile con molti cassetti numerati. ''LBOUND'' ti dice
1911qual è il numero del primo cassetto. Questo è utile quando devi scorrere tutti
1912gli elementi di un array, perché ti fornisce il punto di partenza del ciclo.
1913
1914Se hai un array con più dimensioni, puoi specificare la dimensione per cui
1915vuoi trovare il limite inferiore: ''LBOUND'' è essenziale quando scrivi cicli
1916''FOR'' per scorrere tutti gli elementi di un array. Ti consente di impostare
1917il valore iniziale corretto del contatore del ciclo.
1918
1919@syntax = LBOUND( array [, dimension])
1920
1921@example DIM a(10,20)
1922@example PRINT LBOUND(a) : REM it will print 0 (0...9)
1923
1924</usermanual> */
1925
1926/* <usermanual>
1927@keyword BIG ENDIAN (constant)
1928
1929@english
1930
1931The ''BIG ENDIAN'' is a constant that values non zero if the rappresentation
1932of data on the local CPU is in big endian. Endianness is a concept that concerns
1933the order in which the bytes of a multi-byte number are stored in memory.
1934
1935Imagine having an integer that spans more than one byte. Endianness determines
1936whether the most significant byte (the one that represents the highest digit)
1937is stored first (at the lowest memory address) or last. In this case, the most
1938significant byte is stored first. It is like reading a book from left to right,
1939starting with the most important word.
1940
1941Endianness is a fundamental aspect of computer architecture, as it affects how
1942data is interpreted and manipulated. Different architectures use different
1943endianness conventions. For example: Motorola 6809 is ''BIG ENDIAN'',
1944MOS 6502 is ''LITTLE ENDIAN''.
1945
1946In 8-bit computers, endianness was a crucial consideration, especially when
1947it came to managing integers across multiple bytes. Since these computers
1948had limited memory, it was essential to maximize storage space.
1949
1950With limited memory available, it was essential to use each byte efficiently, and
1951endianess directly affected arithmetic operations on multi-byte numbers, such as
1952addition and subtraction. Moreover, when exchanging data between systems with
1953different endianness, appropriate conversions is needed.
1954
1955If you are writing code that directly manipulates memory, it is essential to know
1956the endianness of the system to avoid data interpretation errors. If you are
1957developing software that needs to run on different platforms, you need to account
1958for endianness differences and implement data conversion mechanisms, for data
1959that are not manager by ugBASIC itself.
1960
1961@italian
1962
1963La costante ''BIG ENDIAN'' ha un valore diverso da zero se la rappresentazione
1964dei dati sulla CPU locale è in big endian. L'endianness è un concetto che
1965riguarda l'ordine in cui i byte di un numero multi-byte vengono memorizzati nella memoria.
1966
1967Immagina di avere un intero che si estende su più di un byte. L'endianness
1968determina se il byte più significativo (quello che rappresenta la cifra più alta)
1969viene memorizzato per primo (all'indirizzo di memoria più basso) o per ultimo.
1970In questo caso, il byte più significativo viene memorizzato per primo. È come
1971leggere un libro da sinistra a destra, iniziando dalla parola più importante.
1972
1973L'endianness è un aspetto fondamentale dell'architettura dei computer,
1974poiché influisce sul modo in cui i dati vengono interpretati e manipolati.
1975Architetture diverse utilizzano diverse convenzioni di endianness. Ad esempio:
1976Motorola 6809 è ''BIG ENDIAN'', MOS 6502 è ''LITTLE ENDIAN''.
1977
1978Nei computer a 8 bit, l'endianness era una considerazione cruciale, soprattutto
1979quando si trattava di gestire interi su più byte. Poiché questi computer
1980avevano una memoria limitata, era essenziale massimizzare lo spazio di archiviazione.
1981
1982Con una memoria limitata disponibile, era essenziale utilizzare ogni byte in
1983modo efficiente e l'endianness influenzava direttamente le operazioni aritmetiche
1984su numeri multi-byte, come addizione e sottrazione. Inoltre, quando si scambiavano
1985dati tra sistemi con endianness diversa, erano necessarie conversioni appropriate.
1986
1987Se si scrive codice che manipola direttamente la memoria, è essenziale conoscere
1988l'endianness del sistema per evitare errori di interpretazione dei dati. Se si
1989sviluppa software che deve essere eseguito su piattaforme diverse, è necessario
1990tenere conto delle differenze di endianness e implementare meccanismi di
1991conversione dei dati, per i dati che non sono gestiti da ugBASIC stesso.
1992
1993@syntax = BIG ENDIAN
1994
1995@example IF BIG ENDIAN THEN
1996@example PRINT "This CPU is big endian"
1997@example ENDIF
1998
1999@seeAlso LITTLE ENDIAN (constant)
2000
2001@target all
2002</usermanual> */
2003
2004/* <usermanual>
2005@keyword LITTLE ENDIAN (constant)
2006
2007@english
2008
2009The ''LITTLE ENDIAN'' is a constant that values non zero if the rappresentation
2010of data on the local CPU is in little endian. Endianness is a concept that concerns
2011the order in which the bytes of a multi-byte number are stored in memory.
2012
2013Imagine having an integer that spans more than one byte. Endianness determines
2014whether the most significant byte (the one that represents the highest digit)
2015is stored first (at the lowest memory address) or last. In this case, the least
2016significant byte is stored first. It is like reading a book from right to left,
2017starting with the least important word.
2018
2019Endianness is a fundamental aspect of computer architecture, as it affects how
2020data is interpreted and manipulated. Different architectures use different
2021endianness conventions. For example: Motorola 6809 is ''BIG ENDIAN'',
2022MOS 6502 is ''LITTLE ENDIAN''.
2023
2024In 8-bit computers, endianness was a crucial consideration, especially when
2025it came to managing integers across multiple bytes. Since these computers
2026had limited memory, it was essential to maximize storage space.
2027
2028With limited memory available, it was essential to use each byte efficiently, and
2029endianess directly affected arithmetic operations on multi-byte numbers, such as
2030addition and subtraction. Moreover, when exchanging data between systems with
2031different endianness, appropriate conversions is needed.
2032
2033If you are writing code that directly manipulates memory, it is essential to know
2034the endianness of the system to avoid data interpretation errors. If you are
2035developing software that needs to run on different platforms, you need to account
2036for endianness differences and implement data conversion mechanisms, for data
2037that are not manager by ugBASIC itself.
2038
2039@italian
2040
2041''LITTLE ENDIAN'' è una costante che ha un valore diverso da zero se la rappresentazione
2042dei dati sulla CPU locale è in little endian. L'endianità è un concetto che riguarda
2043l'ordine in cui i byte di un numero multi-byte vengono archiviati nella memoria.
2044
2045Immagina di avere un intero che si estende su più di un byte. L'endianità determina
2046se il byte più significativo (quello che rappresenta la cifra più alta)
2047viene archiviato per primo (all'indirizzo di memoria più basso) o per ultimo.
2048In questo caso, il byte meno significativo viene archiviato per primo. È come
2049leggere un libro da destra a sinistra, iniziando dalla parola meno importante.
2050
2051L'endianità è un aspetto fondamentale dell'architettura dei computer, poiché
2052influenza il modo in cui i dati vengono interpretati e manipolati. Architetture
2053diverse utilizzano diverse convenzioni di endianità. Ad esempio: Motorola 6809
2054è ''BIG ENDIAN'', MOS 6502 è ''LITTLE ENDIAN''.
2055
2056Nei computer a 8 bit, l'endianness era una considerazione cruciale, soprattutto
2057quando si trattava di gestire interi su più byte. Poiché questi computer avevano
2058una memoria limitata, era essenziale massimizzare lo spazio di archiviazione.
2059Con una memoria limitata disponibile, era essenziale utilizzare ogni byte in modo
2060efficiente e l'endianness influenzava direttamente le operazioni aritmetiche su
2061numeri multi-byte, come l'addizione e la sottrazione. Inoltre, quando si scambiano
2062dati tra sistemi con endianness diversa, sono necessarie conversioni appropriate.
2063Se si scrive codice che manipola direttamente la memoria, è essenziale conoscere
2064l'endianness del sistema per evitare errori di interpretazione dei dati. Se si
2065sviluppa un software che deve essere eseguito su piattaforme diverse, è necessario
2066tenere conto delle differenze di endianness e implementare meccanismi di conversione
2067dei dati, per i dati che non sono gestiti da ugBASIC stesso.
2068
2069@syntax = LITTLE ENDIAN
2070
2071@example IF LITTLE ENDIAN THEN
2072@example PRINT "This CPU is little endian"
2073@example ENDIF
2074
2075@seeAlso BIG ENDIAN (constant)
2076
2077@target all
2078</usermanual> */
2079
2080/* <usermanual>
2081@keyword VARBANK
2082
2083@english
2084Returns the bank assigned for the given variable, -1 if the variable is on resident memory.
2085
2086@italian
2087Restituisce il banco della memoria espansa assegnato per la data variabile, oppure -1
2088se la variabile è posta sulla memoria residente.
2089
2090@syntax = VARBANK( variable )
2091
2092@example DIM x as INTEGER: DIM largeArray( 100, 100 ) AS INTEGER BANKED
2093@example x = 42
2094@example BANK WRITE VARBANK( largeArray ) FROM VARPTR( x ) TO VARBANKPTR( largeArray ) SIZE 2
2095
2096@target all
2097</usermanual> */
2098
2099/* <usermanual>
2100@keyword VARBANKPTR
2101
2102@english
2103Returns the address assigned for the given variable inside a bank of memory expansion.
2104
2105@italian
2106Restituisce l'indirizzo di memoria assegnato all'interno del banco di memoria espansa.
2107
2108@syntax = VARBANKPTR( variable )
2109
2110@example DIM x as INTEGER: DIM largeArray( 100, 100 ) AS INTEGER BANKED
2111@example x = 42
2112@example BANK WRITE VARBANK( largeArray ) FROM VARPTR( x ) TO VARBANKPTR( largeArray ) SIZE 2
2113
2114@target all
2115</usermanual> */
2116
2117/* <usermanual>
2118@keyword ENABLE INTERRUPT
2119
2120@english
2121
2122An interrupt is a signal that temporarily stops the normal execution of a program,
2123allowing the processor to handle external events or internal exceptions. These events can be
2124a key being pressed on the keyboard, data arriving from a serial port or a timer reaching zero.
2125
2126Interrupts allow the processor to respond quickly and efficiently to external events,
2127avoiding delays in processing, so that you can handle events that occur independently
2128of the main program execution and so the computer can communicate with external devices
2129such as keyboard.
2130
2131This instruction will change the specific register of the main processor, so that interrupts will
2132be served again.
2133
2134@italian
2135
2136Un interrupt è un segnale che interrompe temporaneamente la normale esecuzione di un programma,
2137consentendo al processore di gestire eventi esterni o eccezioni interne. Questi eventi possono
2138essere la pressione di un tasto sulla tastiera, l'arrivo di dati da una porta seriale o un timer
2139che raggiunge lo zero.
2140
2141Gli interrupt consentono al processore di rispondere in modo rapido ed efficiente agli eventi
2142esterni, evitando ritardi nell'elaborazione, in modo da poter gestire eventi che si verificano
2143indipendentemente dall'esecuzione del programma principale e in modo che il computer possa
2144comunicare con dispositivi esterni come la tastiera.
2145
2146Questa istruzione modificherà il registro specifico del processore principale, in modo che
2147gli interrupt vengano nuovamente serviti.
2148
2149@syntax ENABLE INTERRUPT
2150
2151@example ENABLE INTERRUPT
2152
2153@seeAlso DISABLE INTERRUPT
2154
2155@target all
2156</usermanual> */
2157
2158/* <usermanual>
2159@keyword DISABLE INTERRUPT
2160
2161@english
2162
2163An interrupt is a signal that temporarily stops the normal execution of a program,
2164allowing the processor to handle external events or internal exceptions. These events can be
2165a key being pressed on the keyboard, data arriving from a serial port or a timer reaching zero.
2166
2167Interrupts allow the processor to respond quickly and efficiently to external events,
2168avoiding delays in processing, so that you can handle events that occur independently
2169of the main program execution and so the computer can communicate with external devices
2170such as keyboard.
2171
2172This instruction will change the specific register of the main processor, so that interrupts will
2173not be served anymore.
2174
2175@italian
2176
2177Un interrupt è un segnale che interrompe temporaneamente la normale esecuzione di un programma,
2178consentendo al processore di gestire eventi esterni o eccezioni interne. Questi eventi possono
2179essere la pressione di un tasto sulla tastiera, l'arrivo di dati da una porta seriale o un timer
2180che raggiunge lo zero.
2181
2182Gli interrupt consentono al processore di rispondere in modo rapido ed efficiente agli eventi
2183esterni, evitando ritardi nell'elaborazione, in modo da poter gestire eventi che si verificano
2184indipendentemente dall'esecuzione del programma principale e in modo che il computer possa
2185comunicare con dispositivi esterni come la tastiera.
2186
2187Questa istruzione modificherà il registro specifico del processore principale, in modo che
2188gli interrupt non siano più serviti.
2189
2190@syntax DISABLE INTERRUPT
2191
2192@example DISABLE INTERRUPT
2193
2194@seeAlso ENABLE INTERRUPT
2195
2196</usermanual> */
2197
2198/* <usermanual>
2199@keyword JOY
2200
2201@english
2202Read the value from the joystick port.
2203
2204@italian
2205Leggi il valore della porta del joystick.
2206
2207@syntax = JOY( port )
2208
2209@example x = JOY(0)
2210
2211@target all
2212</usermanual> */
2213
2214/* <usermanual>
2215@keyword JUP
2216
2217@english
2218Read the joystick port and check for "direction up" bit.
2219
2220@italian
2221Leggi il valore della porta del joystick, e controlla il bit in "direzione su".
2222
2223@syntax = JUP( port )
2224
2225@example x = JUP(0)
2226
2227@target all
2228</usermanual> */
2229
2230/* <usermanual>
2231@keyword JDOWN
2232
2233@english
2234Read the joystick port and check for "direction down" bit.
2235
2236@italian
2237Leggi il valore della porta del joystick, e controlla il bit in "direzione giù".
2238
2239@syntax = JDOWN( port )
2240
2241@example x = JDOWN(0)
2242
2243@target all
2244</usermanual> */
2245
2246/* <usermanual>
2247@keyword JLEFT
2248
2249@english
2250Read the joystick port and check for "direction left" bit.
2251
2252@italian
2253Leggi il valore della porta del joystick, e controlla il bit in "direzione sinistra".
2254
2255@syntax = JLEFT( port )
2256
2257@example x = JLEFT(0)
2258
2259@target all
2260</usermanual> */
2261
2262/* <usermanual>
2263@keyword JRIGHT
2264
2265@english
2266Read the joystick port and check for "direction right" bit.
2267
2268@italian
2269Leggi il valore della porta del joystick, e controlla il bit in "direzione destra".
2270
2271@syntax = JRIGHT( port )
2272
2273@example x = JRIGHT(0)
2274
2275@target all
2276</usermanual> */
2277
2278/* <usermanual>
2279@keyword JFIRE
2280
2281@english
2282Read the joystick port and check for "fire button" bit.
2283
2284@italian
2285Leggi il valore della porta del joystick, e controlla il bit "fuoco".
2286
2287@syntax = JFIRE( port )
2288
2289@example x = JFIRE(0)
2290
2291@target all
2292</usermanual> */
2293
2294/* <usermanual>
2295@keyword FIRE (function)
2296
2297@english
2298
2299Read the joystick port and check for "fire button" bit.
2300
2301@italian
2302
2303Leggi il valore della porta del joystick, e controlla il bit "FIRE".
2304
2305@syntax = FIRE( port )
2306
2307@example x = FIRE(0)
2308</usermanual> */
2309
2310/* <usermanual>
2311@keyword FIRE (constant)
2312
2313@english
2314
2315Return the bitmask for joystick's fire bit.
2316
2317@italian
2318
2319Restituisce il bitmask per il bit FIRE del joystick.
2320
2321@syntax = FIRE
2322
2323@example x = FIRE
2324
2325@alias JOY FIRE (constant)
2326</usermanual> */
2327
2328/* <usermanual>
2329@keyword JOY FIRE (constant)
2330
2331@english
2332
2333@italian
2334
2335@syntax = JOY FIRE
2336
2337@example x = JOY FIRE
2338
2339@alias FIRE (constant)
2340</usermanual> */
2341
2342/* <usermanual>
2343@keyword JOY COUNT (constant)
2344
2345@english
2346Read the number of joysticks installed into the system.
2347
2348@italian
2349Recupera il numero di porte joystick installate nel sistema.
2350
2351@syntax = JOY COUNT
2352
2353@example x = JOY COUNT
2354
2355@alias JOYCOUNT
2356</usermanual> */
2357
2358/* <usermanual>
2359@keyword JOYCOUNT
2360
2361@english
2362Read the number of joysticks installed into the system.
2363
2364@italian
2365Recupera il numero di porte joystick installate nel sistema.
2366
2367@syntax = JOYCOUNT
2368
2369@example x = JOYCOUNT
2370
2371@alias JOY COUNT
2372
2373</usermanual> */
2374
2375/* <usermanual>
2376@keyword JOY X
2377
2378@english
2379Read the horizontal axys of an analogical joystick, if it is present.
2380A negative value means "left" while a positive one means "right".
2381The value near 0 means "no direction".
2382
2383@italian
2384Legge il valore dell'asse orizzontale di un joystick analogico, se presente.
2385Un valore negativo indica "sinistra" mentre un valore positivo indica "destra".
2386Un valore prossimo allo 0 significa "nessuna direzione".
2387
2388@syntax = JOY X( port )
2389
2390@example x = JOY X(0)
2391
2392@target coco
2393@target coco3
2394@target d32
2395@target d64
2396
2397@alias JOYX
2398
2399</usermanual> */
2400
2401/* <usermanual>
2402@keyword JOYX
2403
2404@english
2405
2406@italian
2407
2408@syntax = JOYX( port )
2409
2410@example x = JOYX(0)
2411
2412@alias JOY X
2413
2414@target coco
2415@target coco3
2416@target d32
2417@target d64
2418</usermanual> */
2419
2420/* <usermanual>
2421@keyword JOYY
2422
2423@english
2424Read the vertical axys of an analogical joystick, if it is present.
2425A negative value means "up" while a positive one means "down".
2426The value near 0 means "no direction".
2427
2428@italian
2429Legge il valore dell'asse verticale di un joystick analogico, se presente.
2430Un valore negativo indica "su" mentre un valore positivo indica "giù".
2431Un valore prossimo allo 0 significa "nessuna direzione".
2432
2433@syntax = JOY Y( port )
2434
2435@example y = JOY Y(0)
2436
2437@target coco
2438@target coco3
2439@target d32
2440@target d64
2441
2442@alias JOYY
2443
2444</usermanual> */
2445
2446/* <usermanual>
2447@keyword JOYY
2448
2449@english
2450
2451@italian
2452
2453@syntax = JOYY( port )
2454
2455@example y = JOYY(0)
2456
2457@alias JOY Y
2458
2459@target coco
2460@target coco3
2461@target d32
2462@target d64
2463</usermanual> */
2464
2465/* <usermanual>
2466@keyword BLOCK
2467
2468@english
2469
2470@italian
2471
2472@syntax BLOCK x1, y1, x2, y2, fq
2473
2474@example BLOCK x, y, x+29, y+19, 0
2475
2476@usedInExample tsb_block_rec_01.bas
2477
2478@alias BAR
2479
2480@project tsb
2481</usermanual> */
2482
2483/* <usermanual>
2484@keyword REC
2485
2486@english
2487
2488''REC'' draws a rectangle. The location of the top left corner is determined by the first two
2489parameters ''x'' and ''y'', the width and height of the rectangle by parameters three and four
2490(''sa'' and ''sb''). The color of the edge lines is determined by the last parameter (''fq'',
2491color source). The four corners of the rectangle are always drawn.
2492
2493Permissible values are 0..''SCREEN WIDTH'' for ''x'' and ''sa''.
2494For ''y'' or ''sb'', values from 0 to ''SCREEN HEIGHT'' are permitted in both cases. The color also depends on
2495the graphics mode and refers to the color specifications behind ''HIRES'' on the one hand and
2496''MULTI'' and ''LOW COL'' on the other. The point 0,0 is in the top left corner.
2497
2498Note: If the edge lengths of the rectangle exceed the screen limits, rectangle will be clipped.
2499
2500@italian
2501
2502''REC'' disegna un rettangolo. La posizione dell'angolo in alto a sinistra è determinata dai
2503primi due parametri ''x'' e ''y'', la larghezza e l'altezza del rettangolo dai parametri tre e
2504quattro (''sa'' e ''sb'' ). Il colore delle linee del bordo è determinato dall'ultimo parametro
2505(''fq'', sorgente colore). Vengono sempre disegnati i quattro angoli del rettangolo.
2506
2507I valori consentiti sono 0..''SCREEN WIDTH'' per ''x'' e ''sa''. Per ''y'' o ''sb'' sono ammessi
2508in entrambi i casi i valori da 0 a ''SCREEN HEIGHT''. Il colore dipende anche dalla modalità
2509grafica e si riferisce alle specifiche del colore date al comando ''HIRES'' da un lato e
2510''MULTI'' e ''LOW COL'' dall'altro. Il punto 0,0 si trova nell'angolo in alto a sinistra.
2511
2512Nota: se la lunghezza dei bordi del rettangolo supera i limiti dello schermo, il rettangolo
2513sarà ritagliato
2514
2515@syntax REC x, y, sa, sb, fq
2516
2517@example REC x, y, 29, 19, 1
2518
2519@usedInExample tsb_block_rec_01.bas
2520
2521@alias BOX
2522@alias RECT
2523
2524</usermanual> */
2525
2526/* <usermanual>
2527@keyword RECT
2528
2529@english
2530
2531@italian
2532
2533@alias REC
2534
2535</usermanual> */
2536
2537/* <usermanual>
2538@keyword HIRES
2539
2540@english
2541
2542`HIRES` is used to switch from text to high-resolution graphics mode and to use the specified colors:
2543''ink'' for the writing color and ''paper'' for the background color (both with values from 0 to ''SCREEN COLORS'').
2544The graphics memory is deleted and preset with the specified colors. The color of the screen frame
2545remains unaffected. The selected mode remains active until it is switched off or changed by a command
2546(''MULTI'', ''CSET'' or ''NRM''). Important: the color specifications of almost all other graphics
2547commands that use ''fg'' as color parameter refers to the colors specified here. If the color source ''0'' is specified in a graphics
2548command, the color specified for ''paper'' is selected; if ''1'' is specified, the color for ''ink''
2549is selected; the color specification ''2'' inverts the controlled pixel (if in hires mode,
2550otherwise see ''MULTI'').
2551
2552@italian
2553
2554''HIRES'' serve per passare dalla modalità testo a quella grafica ad alta risoluzione e per
2555utilizzare i colori specificati: ''ink'' per il colore della scrittura e ''paper'' per il colore
2556dello sfondo (entrambi con valori da 0 a ''SCREEN COLORS''). La memoria grafica viene cancellata e
2557preimpostata con i colori specificati. Il colore della cornice dello schermo rimane inalterato.
2558La modalità selezionata rimane attiva finché non viene spenta o modificata tramite un comando
2559(''MULTI'', ''CSET'' o ''NRM''). Importante: le specifiche dei colori di quasi tutti gli altri
2560comandi grafici che usano ''fg'' come parametro del colore si riferiscono ai colori qui specificati.
2561Se in un comando grafico viene specificata l'origine colore ''0'', viene selezionato il colore
2562specificato per ''paper''; se viene specificato ''1'', viene selezionato il colore per
2563''ink''; la specifica colore ''2'' inverte il pixel controllato (se in modalità ''HIRES'', altrimenti
2564vedi ''MULTI'').
2565
2566@syntax HIRES ink, paper
2567
2568@example HIRES 0, 1
2569
2570@usedInExample tsb_block_rec_01.bas
2571
2572@target c128
2573@project tsb
2574</usermanual> */
2575
2576/* <usermanual>
2577@keyword DO NULL
2578
2579@english
2580
2581Wait for a keystroke. If a program comes to a ''DO NULL'' instruction, it waits until the user presses
2582a key. Differently from TSB, further commands can follow on the same BASIC line in the progra,
2583and it can be used in an ''IF'' line (after ''THEN'' or ''ELSE'').
2584
2585@italian
2586
2587Aspetta la sequenza di tasti. Se un programma arriva a un'istruzione ''DO NULL'', attende finché l'utente
2588preme un tasto. A differenza di TSB, ulteriori comandi possono seguire sulla stessa riga BASIC nel programma,
2589e può essere utilizzata in una riga ''IF'' (dopo ''THEN'' o ''ELSE'').
2590
2591@syntax DO NULL
2592
2593@example DO NULL
2594
2595@usedInExample tsb_block_rec_01.bas
2596
2597@seeAlso WAIT KEY
2598
2599@project tsb
2600</usermanual> */
2601
2602/* <usermanual>
2603@keyword NRM
2604
2605@english
2606
2607''NRM'' resets the chipset to its default values: the graphic mode is switched off,
2608uppercase and lowercase font is activated, the extended color mode is switched off.
2609
2610@italian
2611
2612''NRM'' ripristina il chipset ai suoi valori predefiniti: la modalità grafica è
2613disattivata, i caratteri maiuscoli e minuscoli sono attivati, la modalità colore
2614estesa è disattivata.
2615
2616@syntax NRM
2617
2618@example NRM
2619
2620@usedInExample tsb_block_rec_01.bas
2621
2622</usermanual> */
2623
2624/* <usermanual>
2625@keyword INSERT (function)
2626
2627@english
2628
2629The ''INSERT'' command allows you to insert a substring into an existing string,
2630at a specific position that you specify. ''INSERT'' inserts the character string
2631''string'' (first argument) into the character string
2632''alt'' (second argument) starting at the position ''pos'' (third argument), whereby
2633the counting starts with ''1''. The resulting character string is as long as the sum of the two
2634individual character strings.
2635
2636You can use ''INSERT'' to join strings
2637more precisely than simple concatenation with the ''+'' symbol. You can insert
2638spaces, special characters, or other elements to format strings to your liking.
2639You can correct typos, add or remove text precisely. You can build complex strings
2640by combining static and variable parts.
2641
2642The position ''pos'' you specify must be an integer between 1 and the length
2643of the main string plus 1. ''INSERT'' creates a copy of the final string.
2644
2645
2646@italian
2647
2648Il comando ''INSERT'' consente di inserire una sottostringa in una stringa
2649esistente, in una posizione specifica da te specificata. ''INSERT'' inserisce
2650la stringa di caratteri ''string'' (primo argomento) nella stringa di caratteri
2651''alt'' (secondo argomento) a partire dalla posizione ''pos'' (terzo argomento),
2652per cui il conteggio inizia con ''1''. La stringa di caratteri risultante è
2653lunga quanto la somma delle due stringhe di caratteri individuali.
2654
2655Puoi usare ''INSERT'' per unire stringhe in modo più preciso rispetto alla
2656semplice concatenazione con il simbolo ''+''. Puoi inserire spazi, caratteri
2657speciali o altri elementi per formattare le stringhe a tuo piacimento.
2658Puoi correggere errori di battitura, aggiungere o rimuovere testo in modo
2659preciso. Puoi creare stringhe complesse combinando parti statiche e variabili.
2660
2661La posizione ''pos'' specificata deve essere un numero intero compreso tra
26621 e la lunghezza della stringa principale più 1. ''INSERT'' crea una copia
2663della stringa finale.
2664
2665@syntax = INSERT( string, alt, pos )
2666
2667@example c$=INSERT(a$,b$,9)
2668
2669@usedInExample tsb_insert_01.bas
2670
2671</usermanual> */
2672
2673/* <usermanual>
2674@keyword COLORS (constant)
2675
2676@english
2677
2678This constant holds the maximum number of colors available for the target, for
2679the current mode. Note that, although this is the number of colors available,
2680it is not guaranteed that every single graphic or text element in the mode could
2681assume this number independently. This depends on the specific characteristics
2682of the video chipset available. Also, it is not guaranteed that the colors are
2683changeable. This information is useful when you want to choose a random color
2684from those available, or to perform loops on the actual availability of colors.
2685
2686@italian
2687
2688Questa costante mantiene il numero massimo di colori disponibili per il target,
2689per la modalità corrente. Nota che, sebbene questo sia il numero di colori
2690disponibili, non è detto che ogni singolo elemento grafico o testuale della
2691modalità possa assumerlo in modo indipendente. Questo dipende dalle caratteristiche
2692specifiche del chipset video a disposizione. Inoltre, non è detto che i colori
2693siano modificabili. Questa informazione è utile laddove si voglia scegliere un
2694colore a caso tra quelli disponibili, o effettuare cicli sulla effettiva
2695disponibilità di colori.
2696
2697@syntax = COLORS
2698
2699@alias SCREEN COLORS (constant)
2700@alias COLORS COUNT (constant)
2701@alias COLOR COUNT (constant)
2702@target all
2703</usermanual> */
2704
2705/* <usermanual>
2706@keyword SCREEN COLORS (constant)
2707
2708@english
2709
2710@italian
2711
2712@syntax = SCREEN COLORS
2713
2714@alias COLORS (constant)
2715@alias COLORS COUNT (constant)
2716@target all
2717</usermanual> */
2718
2719/* <usermanual>
2720@keyword COLORS COUNT (constant)
2721
2722@english
2723
2724@italian
2725
2726@syntax = COLORS COUNT
2727
2728@alias COLORS (constant)
2729@alias SCREEN COLORS (constant)
2730@alias COLOR COUNT (constant)
2731@target all
2732</usermanual> */
2733
2734/* <usermanual>
2735@keyword COLOR COUNT (constant)
2736
2737@english
2738
2739@italian
2740
2741@syntax = COLOR COUNT
2742
2743@alias COLORS (constant)
2744@alias SCREEN COLORS (constant)
2745@alias COLORS COUNT (constant)
2746@target all
2747</usermanual> */
2748
2749
2750/* <usermanual>
2751@keyword COLOURS (constant)
2752
2753@english
2754
2755@italian
2756
2757@syntax = COLOURS
2758
2759@alias SCREEN COLOURS (constant)
2760@alias COLOURS COUNT (constant)
2761@target all
2762</usermanual> */
2763
2764/* <usermanual>
2765@keyword SCREEN COLOURS (constant)
2766
2767@english
2768
2769@italian
2770
2771@syntax = SCREEN COLORS
2772
2773@alias COLOURS (constant)
2774@alias COLOURS COUNT (constant)
2775@target all
2776</usermanual> */
2777
2778/* <usermanual>
2779@keyword COLOURS COUNT (constant)
2780
2781@english
2782
2783@italian
2784
2785@syntax = COLOURS COUNT
2786
2787@alias COLOURS (constant)
2788@alias SCREEN COLOURS (constant)
2789@target all
2790</usermanual> */
2791
2792/* <usermanual>
2793@keyword PEN COLORS (constant)
2794
2795@english
2796
2797This constant gives the number of colors that can be used with the ''PEN'' command.
2798It usually represents the maximum number of colors that can be managed in text mode,
2799and has little to do with the actual number of colors available in the mode in use.
2800For that, it is advisable to use the ''COLORS'' constant.
2801
2802@italian
2803
2804Questa costante fornisce il numero di colori utilizzabili con il comando ''PEN''.
2805Di solito rappresenta il numero massimo di colori gestibili nella modalità testuale,
2806e non ha molta attinenza con l'effettivo numero di colori disponibili nella
2807modalità in uso. Per quello è consigliabile usare la costante ''COLORS''.
2808
2809@syntax = PEN COLORS
2810
2811@seeAlso COLORS (constant)
2812@target all
2813</usermanual> */
2814
2815/* <usermanual>
2816@keyword PAPER COLORS (constant)
2817
2818@english
2819
2820This constant gives the number of colors that can be used with the ''PAPER'' command.
2821It usually represents the maximum number of colors that can be managed in text mode,
2822and has little to do with the actual number of colors available in the mode in use.
2823For that, it is advisable to use the ''COLORS'' constant.
2824
2825@italian
2826
2827Questa costante fornisce il numero di colori utilizzabili con il comando ''PAPER''.
2828Di solito rappresenta il numero massimo di colori gestibili nella modalità testuale,
2829e non ha molta attinenza con l'effettivo numero di colori disponibili nella
2830modalità in uso. Per quello è consigliabile usare la costante ''COLORS''.
2831
2832@syntax = PAPER COLORS
2833
2834@seeAlso COLORS (constant)
2835@target all
2836</usermanual> */
2837
2838/* <usermanual>
2839@keyword COLOR (data type)
2840
2841@english
2842
2843The ''COLOR'' data type holds enough information to represent a color on the target's
2844video chipset. This type of information allows one of several possible colors to be
2845selected, either predefined or redefined, depending on the targets' capabilities.
2846
2847@italian
2848
2849Il tipo di dato ''COLOR'' mantiene l'informazione sufficiente a rappresentare un colore
2850sul chipset video del target. Questo tipo di informazione permette di selezionare uno
2851dei colori possibili, predefiniti o ridefiniti, a seconda delle possibilità dei target.
2852
2853@syntax DIM c AS COLOR
2854@syntax x = (COLOR) 42
2855
2856@target all
2857</usermanual> */
2858
2859/* <usermanual>
2860@keyword SHADES (constant)
2861
2862@english
2863
2864This constant holds the maximum number of shades available for the target, for
2865the current mode. Note that, although this is the number of shades available,
2866it is not guaranteed that every single graphic or text element in the mode could
2867assume this value, independently. This depends on the specific characteristics
2868of the video chipset available.
2869
2870@italian
2871
2872Questa costante mantiene il numero massimo di sfumature disponibili per il target,
2873per la modalità corrente. Nota che, sebbene questo sia il numero di sfumature
2874disponibili, non è detto che ogni singolo elemento grafico o testuale della
2875modalità possa assumere tale vlaore in modo indipendente. Questo dipende dalle
2876caratteristiche specifiche del chipset video a disposizione.
2877
2878@syntax = SHADES
2879
2880@alias SCREEN SHADES (constant)
2881@seeAlso COLOR
2882@seeAlso RGB
2883@target all
2884</usermanual> */
2885
2886/* <usermanual>
2887@keyword SCREEN SHADES (constant)
2888
2889@english
2890
2891@italian
2892
2893@syntax = SCREEN SHADES
2894
2895@alias SHADES (constant)
2896@seeAlso COLOR
2897@seeAlso RGB
2898@target all
2899</usermanual> */
2900
2901/* <usermanual>
2902@keyword SCREEN BORDER X (constant)
2903
2904@english
2905
2906Returns the width of the border of the screen, in the reference frame used by sprites. If no sprites
2907are available, or if the border is not present, it is equal to ''0''. This constant should be used as
2908a horizontal offset, to ensure that the sprite is visible beyond the left screen border.
2909
2910@italian
2911
2912Restituisce la larghezza del bordo dello schermo, nel sistema di riferimento utilizzato dagli sprites. Se
2913gli sprite non sono disponibili, oppure se il bordo non è presente, vale ''0''. Questa costante
2914deve essere utilizzata come offset orizzontale, per garantire che lo sprite sia visibile oltre
2915il bordo sinistro dello schermo.
2916
2917@syntax = SCREEN BORDER X
2918
2919@target all
2920</usermanual> */
2921
2922/* <usermanual>
2923@keyword SCREEN BORDER Y (constant)
2924
2925@english
2926
2927Returns the height of the border of the screen, in the reference frame used by sprites. If no sprites
2928are available, or if the border is not present, it is equal to ''0''. This constant should be used as
2929a vertical offset, to ensure that the sprite is visible beyond the top screen border.
2930
2931@italian
2932
2933Restituisce l'altezza del bordo dello schermo, nel sistema di riferimento utilizzato dagli sprites. Se
2934gli sprite non sono disponibili, oppure se il bordo non è presente, vale ''0''. Questa costante
2935deve essere utilizzata come offset verticale, per garantire che lo sprite sia visibile oltre
2936il bordo superiore dello schermo.
2937
2938@syntax = SCREEN BORDER Y
2939
2940@target all
2941</usermanual> */
2942
2943/* <usermanual>
2944@keyword BORDER
2945
2946@english
2947
2948@italian
2949
2950@syntax BORDER shade
2951
2952@alias COLOR BORDER
2953@target all
2954</usermanual> */
2955
2956/* <usermanual>
2957@keyword SPRITE COUNT (constant)
2958
2959@english
2960
2961This constant allows you to know the number of hardware sprites available on the
2962target considered. Note that this is the effective limit allowed by the video
2963chipset: however, ugBASIC can provide additional mechanisms to multiply the
2964number of available sprites, such as the so-called "sprite multiplexing".
2965
2966@italian
2967
2968Questa costante permette di conoscere il numero di sprite hardware disponibili
2969sul target considerato. Da notare che questo è l'effettivo limite concesso
2970dal chipset video: tuttavia, ugBASIC può dare meccanismi aggiuntivi per
2971moltiplicare il numero di sprite disponibili, come il cosiddetto
2972"sprite multiplexing".
2973
2974@syntax = SPRITE COUNT
2975
2976@target all
2977</usermanual> */
2978
2979/* <usermanual>
2980@keyword SCREEN SPRITE RATIO X (constant)
2981
2982@english
2983
2984This constant allows you to know the ratio (percentile) between the screen
2985reference system and the sprite reference system. In other words, given a
2986coordinate according to the screen reference system, you can calculate the
2987one according to the sprite reference system with the following proportion:
2988
2989'''( SCREEN WIDTH * SCREEN SPRITE RATIO X ) / 100'''
2990
2991@italian
2992
2993Questa costante permette di conoscere il rapporto (percentile) tra il
2994sistema di riferimento dello schermo e quello degli sprite. In altri termini,
2995data una coordinata secondo il sistema di riferimento dello schermo, si può
2996calcolare quella secondo il sistema di riferimento degli sprite con la
2997seguente proporzione:
2998
2999'''( SCREEN WIDTH * SCREEN SPRITE RATIO X ) / 100'''
3000
3001@syntax = SCREEN SPRITE RATIO X
3002
3003@target all
3004</usermanual> */
3005
3006/* <usermanual>
3007@keyword SCREEN SPRITE RATIO Y (constant)
3008
3009@english
3010
3011This constant allows you to know the ratio (percentile) between the screen
3012reference system and the sprite reference system. In other words, given a
3013coordinate according to the screen reference system, you can calculate the
3014one according to the sprite reference system with the following proportion:
3015
3016'''( SCREEN HEIGHT * SCREEN SPRITE RATIO Y ) / 100'''
3017
3018@italian
3019
3020Questa costante permette di conoscere il rapporto (percentile) tra il
3021sistema di riferimento dello schermo e quello degli sprite. In altri termini,
3022data una coordinata secondo il sistema di riferimento dello schermo, si può
3023calcolare quella secondo il sistema di riferimento degli sprite con la
3024seguente proporzione:
3025
3026'''( SCREEN HEIGHT * SCREEN SPRITE RATIO Y ) / 100'''
3027
3028@syntax = SCREEN SPRITE RATIO Y
3029
3030@target all
3031</usermanual> */
3032
3033/* <usermanual>
3034@keyword SPRITE HEIGHT (constant)
3035
3036@english
3037
3038This constant allows you to know the height of hardware sprites available on the
3039target considered. Note that this is the effective limit allowed by the video
3040chipset: however, ugBASIC can provide additional mechanisms to increase the
3041height of sprites, such as the so-called "sprite multiplexing".
3042
3043@italian
3044
3045Questa costante permette di conoscere l'altezza degli sprite hardware disponibili
3046sul target considerato. Da notare che questo è l'effettivo limite concesso
3047dal chipset video: tuttavia, ugBASIC può dare meccanismi aggiuntivi per
3048accrescere l'altezza degli sprite disponibili, come il cosiddetto
3049"sprite multiplexing".
3050
3051@syntax = SPRITE HEIGHT
3052
3053@target all
3054</usermanual> */
3055
3056/* <usermanual>
3057@keyword SPRITE WIDTH (constant)
3058
3059@english
3060
3061This constant allows you to know the width of hardware sprites available on the
3062target considered. Note that this is the effective limit allowed by the video
3063chipset: however, ugBASIC can provide additional mechanisms to increase the
3064width of sprites, such as the so-called "sprite multiplexing".
3065
3066@italian
3067
3068Questa costante permette di conoscere la larghezza degli sprite hardware disponibili
3069sul target considerato. Da notare che questo è l'effettivo limite concesso
3070dal chipset video: tuttavia, ugBASIC può dare meccanismi aggiuntivi per
3071accrescere la larghezza degli sprite disponibili, come il cosiddetto
3072"sprite multiplexing".
3073
3074@syntax = SPRITE WIDTH
3075
3076@target all
3077</usermanual> */
3078
3079/* <usermanual>
3080@keyword SPRITE X MIN (constant)
3081
3082@english
3083
3084This constant allows you to know the minimum value of horizontal position of hardware
3085sprites available on the target considered. Note that this is the effective limit
3086allowed by the video chipset.
3087
3088@italian
3089
3090Questa costante permette di conoscere il valor minimo della posizione X degli sprite
3091hardware disponibili sul target considerato.
3092
3093@syntax = SPRITE X MIN
3094@syntax = SPRITE MIN X
3095
3096@target all
3097</usermanual> */
3098
3099/* <usermanual>
3100@keyword SPRITE Y MIN (constant)
3101
3102@english
3103
3104This constant allows you to know the minimum value of vertical position of hardware
3105sprites available on the target considered. Note that this is the effective limit
3106allowed by the video chipset.
3107
3108@italian
3109
3110Questa costante permette di conoscere il valor minimo della posizione Y degli sprite
3111hardware disponibili sul target considerato.
3112
3113@syntax = SPRITE Y MIN
3114@syntax = SPRITE MIN Y
3115
3116@target all
3117</usermanual> */
3118
3119/* <usermanual>
3120@keyword SPRITE X MAX (constant)
3121
3122@english
3123
3124This constant allows you to know the maximum value of horizontal position of hardware
3125sprites available on the target considered. Note that this is the effective limit
3126allowed by the video chipset.
3127
3128@italian
3129
3130Questa costante permette di conoscere il valor massimo della posizione X degli sprite
3131hardware disponibili sul target considerato.
3132
3133@syntax = SPRITE X MAX
3134@syntax = SPRITE MAX X
3135
3136@target all
3137</usermanual> */
3138
3139/* <usermanual>
3140@keyword SPRITE Y MAX (constant)
3141
3142@english
3143
3144This constant allows you to know the maximum value of vertical position of hardware
3145sprites available on the target considered. Note that this is the effective limit
3146allowed by the video chipset.
3147
3148@italian
3149
3150Questa costante permette di conoscere il valor massimo della posizione Y degli sprite
3151hardware disponibili sul target considerato.
3152
3153@syntax = SPRITE Y MAX
3154@syntax = SPRITE MAX Y
3155
3156@target all
3157</usermanual> */
3158
3159/* <usermanual>
3160@keyword SPRITE (data type)
3161
3162@english
3163
3164This data type allows you to identify and use a hardware sprite resource. Its value is
3165not directly usable by the programmer, who must consider the variable that contains
3166it as a "placeholder" for the sprite. Furthermore, this data type is used by both
3167native hardware sprites (''SPRITE'') and "composite" ones (''CSPRITE''), but it is
3168not possible to mix their use.
3169
3170@italian
3171
3172Questo tipo di dato permette di individuare e utilizzare una risorsa di tipo
3173sprite hardware. Il suo valore non è direttamente utilizzabile dal programmatore,
3174che deve intendere la variabile che lo contiene come un "segnaposto" dello sprite.
3175Inoltre, questo tipo di dato è usato sia dagli sprite hardware nativi (''SPRITE'')
3176che da quelli "compositi" (''CSPRITE''), ma non è possibile miscelarne l'uso.
3177
3178@syntax DIM x AS SPRITE: x = SPRITE(xImage)
3179
3180@target all
3181</usermanual> */
3182
3183/* <usermanual>
3184@keyword SPRITE (instruction)
3185
3186@english
3187
3188The ''SPRITE'' instructions can be used to prefix one or more commands on specific
3189hardware sprites. Commands can be specified, one after the other, after specifying which
3190sprite to refer to. If the sprite number is omitted, it is assumed that the
3191operations will be performed on all hardware sprites.
3192
3193@italian
3194
3195L'istruzione ''SPRITE'' può essere utilizzata per premettere uno o più comandi su
3196specifici sprite hardware. I comandi possono essere indicate, una dopo l'altra,
3197dopo aver indicato a quale sprite si vuol far riferimento. Se viene omesso il
3198numero dello sprite, si intende che le operazioni saranno svolte su tutti gli
3199sprite hardware.
3200
3201@syntax SPRITE index command1 [command2 [command3 ...]]
3202@syntax SPRITE command1 [command2 [command3 ...]]
3203
3204@example SPRITE 1 ENABLE MULTICOLOR
3205@example SPRITE ON
3206
3207@target c64
3208@target c64reu
3209@target c128
3210@target msx1
3211@target coleco
3212@target sc3000
3213@target sg1000
3214@seeAlso SPRITE (function)
3215@seeAlso SPRITE AT (command)
3216@seeAlso SPRITE COLOR (command)
3217@seeAlso SPRITE COMPRESS HORIZONTAL (command)
3218@seeAlso SPRITE COMPRESS VERTICAL (command)
3219@seeAlso SPRITE DISABLE (command)
3220@seeAlso SPRITE ENABLE (command)
3221@seeAlso SPRITE EXPAND HORIZONTAL (command)
3222@seeAlso SPRITE EXPAND VERTICAL (command)
3223@seeAlso SPRITE MONOCOLOR (command)
3224@seeAlso SPRITE MULTICOLOR (command)
3225</usermanual> */
3226
3227/* <usermanual>
3228@keyword BITMAP (constant)
3229
3230@english
3231
3232The ''BITMAP'' constant represents the position (in terms of bits) that tracks
3233whether the graphics chipset is capable of rendering graphics in "bitmap" mode,
3234i.e. whether it is possible to address individual pixels on the screen.
3235
3236This constant can be used to query the ''SCREEN'' constant, in an attempt to
3237understand whether the functionality is available or not.
3238
3239@italian
3240
3241La costante ''BITMAP'' rappresenta la posizione (in termini di bit) che traccia
3242se il chipset grafico è in grado di rapprentare grafica nella modalità "bitmap",
3243cioè se è possibile indirizzare singolarmente i singoli pixel sullo schermo.
3244
3245Questa costante può essere utilizzata per interrogare la costante ''SCREEN'',
3246nel tentativo di comprendere se la funzionalità è disponibile o meno.
3247
3248@syntax = BITMAP
3249
3250@example IF BIT BITMAP OF SCREEN THEN: PRINT "bitmap is available!": ENDIF
3251
3252@target all
3253@seeAlso SCREEN (constant)
3254
3255@deprecated
3256</usermanual> */
3257
3258/* <usermanual>
3259@keyword SCREEN (constant)
3260
3261@english
3262
3263The ''SCREEN'' constant represents the capabilities of video chipset.
3264
3265@italian
3266
3267La costante ''SCREEN'' rappresenta le capacità del chipset video.
3268
3269@syntax = SCREEN
3270
3271@example IF BIT BITMAP OF SCREEN THEN: PRINT "bitmap is available!": ENDIF
3272
3273@target all
3274@seeAlso BITMAP (constant)
3275
3276@deprecated
3277
3278</usermanual> */
3279
3280/* <usermanual>
3281@keyword SCREEN WIDTH (constant)
3282
3283@english
3284
3285The ''SCREEN WIDTH'' constant represents the actual width of the screen,
3286for the current video chipset and graphic / text mode, in terms of pixels.
3287
3288@italian
3289
3290La costante ''SCREEN WIDTH'' rappresenta la larghezza effettiva dello
3291schermo, per l'attuale chipset video e la modalità grafica/testo,
3292in termini di pixel.
3293
3294@syntax = SCREEN WIDTH
3295
3296@example IF SCREEN WIDTH > 128 THEN: PRINT "At least 128 pixels!!": ENDIF
3297
3298@target all
3299@alias WIDTH (constant)
3300</usermanual> */
3301
3302/* <usermanual>
3303@keyword WIDTH (constant)
3304
3305@english
3306
3307@italian
3308
3309@syntax = WIDTH
3310
3311@example IF WIDTH > 128 THEN: PRINT "At least 128 pixels!!": ENDIF
3312
3313@target all
3314@alias SCREEN WIDTH (constant)
3315</usermanual> */
3316
3317/* <usermanual>
3318@keyword SCREEN HEIGHT (constant)
3319
3320@english
3321
3322The ''SCREEN HEIGHT'' constant represents the actual height of the screen,
3323for the current video chipset and graphic / text mode, in terms of pixels.
3324
3325@italian
3326
3327La costante ''SCREEN HEIGHT'' rappresenta la larghezza effettiva dello
3328schermo, per l'attuale chipset video e la modalità grafica/testo,
3329in termini di pixel.
3330
3331@syntax = SCREEN HEIGHT
3332
3333@example IF SCREEN HEIGHT > 128 THEN: PRINT "At least 128 pixels!!": ENDIF
3334
3335@target all
3336@alias HEIGHT (constant)
3337</usermanual> */
3338
3339/* <usermanual>
3340@keyword HEIGHT (constant)
3341
3342@english
3343
3344@italian
3345
3346@syntax = HEIGHT
3347
3348@example IF HEIGHT > 128 THEN: PRINT "At least 128 pixels!!": ENDIF
3349
3350@target all
3351@alias SCREEN HEIGHT (constant)
3352</usermanual> */
3353
3355
3356/* <usermanual>
3357@keyword SCREEN TILES WIDTH (constant)
3358
3359@english
3360
3361The ''SCREEN TILES WIDTH'' constant represents the actual width of the screen,
3362for the current video chipset and graphic / text mode, in terms of tiles (characters).
3363
3364@italian
3365
3366La costante ''SCREEN TILES WIDTH'' rappresenta la larghezza effettiva dello
3367schermo, per l'attuale chipset video e la modalità grafica/testo,
3368in termini di tiles (caratteri).
3369
3370@syntax = SCREEN TILES WIDTH
3371
3372@example IF SCREEN TILES WIDTH > 40 THEN: PRINT "At least 40 columns!!": ENDIF
3373
3374@target all
3375@alias TILES WIDTH (constant)
3376@alias SCREEN COLUMNS (constant)
3377</usermanual> */
3378
3379/* <usermanual>
3380@keyword TILES WIDTH (constant)
3381
3382@english
3383
3384@italian
3385
3386@syntax = TILES WIDTH
3387
3388@example IF TILES WIDTH > 40 THEN: PRINT "At least 40 columns!!": ENDIF
3389
3390@target all
3391@alias SCREEN TILES WIDTH (constant)
3392@alias SCREEN COLUMNS (constant)
3393</usermanual> */
3394
3395/* <usermanual>
3396@keyword SCREEN COLUMNS (constant)
3397
3398@english
3399
3400@italian
3401
3402@syntax = SCREEN COLUMNS
3403
3404@example IF SCREEN COLUMNS > 40 THEN: PRINT "At least 40 columns!!": ENDIF
3405
3406@target all
3407@alias SCREEN TILES WIDTH (constant)
3408@alias TILES WIDTH (constant)
3409</usermanual> */
3410
3412
3413/* <usermanual>
3414@keyword SCREEN TILES HEIGHT (constant)
3415
3416@english
3417
3418The ''SCREEN TILES HEIGHT'' constant represents the actual width of the screen,
3419for the current video chipset and graphic / text mode, in terms of tiles (characters).
3420
3421@italian
3422
3423La costante ''SCREEN TILES HEIGHT'' rappresenta la larghezza effettiva dello
3424schermo, per l'attuale chipset video e la modalità grafica/testo,
3425in termini di tiles (caratteri).
3426
3427@syntax = SCREEN TILES HEIGHT
3428
3429@example IF SCREEN TILES HEIGHT > 10 THEN: PRINT "At least 10 rows!!": ENDIF
3430
3431@target all
3432@alias TILES HEIGHT (constant)
3433@alias SCREEN COLUMNS (constant)
3434</usermanual> */
3435
3436/* <usermanual>
3437@keyword TILES HEIGHT (constant)
3438
3439@english
3440
3441@italian
3442
3443@syntax = TILES HEIGHT
3444
3445@example IF TILES HEIGHT > 10 THEN: PRINT "At least 10 rows!!": ENDIF
3446
3447@target all
3448@alias SCREEN TILES HEIGHT (constant)
3449@alias SCREEN COLUMNS (constant)
3450</usermanual> */
3451
3452/* <usermanual>
3453@keyword SCREEN ROWS (constant)
3454
3455@english
3456
3457@italian
3458
3459@syntax = SCREEN ROWS
3460
3461@example IF SCREEN ROWS > 10 THEN: PRINT "At least 10 rows!!": ENDIF
3462
3463@target all
3464@alias SCREEN TILES HEIGHT (constant)
3465@alias TILES HEIGHT (constant)
3466</usermanual> */
3467
3468/* <usermanual>
3469@keyword ADDRESS (data type)
3470
3471@english
3472
3473Data type ''ADDRESS'' represents a 16-bit address, that is used by processors to access
3474computer's memory. The memory address is represented by a binary number
3475of 16 digits (bits). With 16 bits, we can represent 2^16 = 65,536 different addresses.
3476
3477@italian
3478
3479Il tipo di dati ''ADDRESS'' rappresenta un indirizzo a 16 bit, utilizzato dai processori
3480per accedere alla memoria del computer. L'indirizzo di memoria è rappresentato da un
3481numero binario di 16 cifre (bit). Con 16 bit, possiamo rappresentare 2^16 = 65.536
3482indirizzi diversi.
3483
3484@syntax ... AS ADDRESS
3485
3486@example DIM limit AS ADDRESS = &H8000
3487
3488</usermanual> */
3489
3490/* <usermanual>
3491@keyword LEFT ALT (constant)
3492
3493@english
3494
3495This constant represent the left "ALT" key, when used as bitmask
3496for ''KEY SHIFT'' instruction.
3497
3498@italian
3499
3500Questa costante rappresenta il tasto sinistro "ALT", quando utilizzato
3501come maschera di bit per l'istruzione ''KEY SHIFT''.
3502
3503@syntax = LEFT ALT
3504
3505@example IF KEY SHIFT AND LEFT ALT THEN
3506@example PRINT "LEFT ALT has been pressed!"
3507@example ENDIF
3508
3509@alias ALT LEFT (constant)
3510
3511</usermanual> */
3512
3513/* <usermanual>
3514@keyword ALT LEFT (constant)
3515
3516@english
3517
3518This constant represent the left "ALT" key, when used as bitmask
3519for ''KEY SHIFT'' instruction.
3520
3521@italian
3522
3523Questa costante rappresenta il tasto sinistro "ALT", quando utilizzato
3524come maschera di bit per l'istruzione ''KEY SHIFT''.
3525
3526@syntax = LEFT ALT
3527
3528@alias LEFT ALT (constant)
3529
3530</usermanual> */
3531
3532/* <usermanual>
3533@keyword RIGHT ALT (constant)
3534
3535@english
3536
3537This constant represent the left "ALT" key, when used as bitmask
3538for ''KEY SHIFT'' instruction.
3539
3540@italian
3541
3542Questa costante rappresenta il tasto sinistro "ALT", quando utilizzato
3543come maschera di bit per l'istruzione ''KEY SHIFT''.
3544
3545@syntax = RIGHT ALT
3546
3547@example IF KEY SHIFT AND RIGHT ALT THEN
3548@example PRINT "RIGHT ALT has been pressed!"
3549@example ENDIF
3550
3551@alias ALT RIGHT (constant)
3552
3553</usermanual> */
3554
3555/* <usermanual>
3556@keyword ALT RIGHT (constant)
3557
3558@english
3559
3560This constant represent the left "ALT" key, when used as bitmask
3561for ''KEY SHIFT'' instruction.
3562
3563@italian
3564
3565Questa costante rappresenta il tasto sinistro "ALT", quando utilizzato
3566come maschera di bit per l'istruzione ''KEY SHIFT''.
3567
3568@syntax = RIGHT ALT
3569
3570@alias RIGHT ALT (constant)
3571
3572</usermanual> */
3573
3574/* <usermanual>
3575@keyword ARRAY
3576
3577@english
3578
3579The ''ARRAY'' keyword allows you to copy a block of memory from a static definition
3580to an array at run time. In simple terms, it copies an array of bytes from the right
3581expression to a ''var''. It is especially useful when you want to initialize an
3582array with a specific value or assign an entire array.
3583
3584This method is generally faster than copying element by element,
3585 especially for large arrays. It provides a concise way to initialize an entire
3586 array with a constant value.
3587
3588If you want to initialize an array to a single byte, ''FILL' is more efficient.
3589For small arrays or when initializing elements with different values, direct
3590assignment can be more readable.
3591
3592@italian
3593
3594La parola chiave ''ARRAY'' consente di copiare un blocco di memoria da una
3595definizione statica a un array in fase di esecuzione. In parole povere,
3596copia un array di byte dall'espressione corretta a una ''var''.
3597È particolarmente utile quando si desidera inizializzare un array con un
3598valore specifico o assegnare un intero array.
3599
3600Questo metodo è generalmente più veloce della copia elemento per elemento,
3601soprattutto per array di grandi dimensioni. Fornisce un modo conciso per
3602inizializzare un intero array con un valore costante.
3603
3604Se si desidera inizializzare un array a un singolo byte, ''FILL''
3605è più efficiente. Per array di piccole dimensioni o quando si inizializzano
3606elementi con valori diversi, l'assegnazione diretta può essere più
3607leggibile.
3608
3609@syntax ARRAY var = ...
3610@syntax ARRAY var := ...
3611
3612@example DIM var(4) AS BYTE
3613@example ARRAY var = #{42424242}
3614
3615</usermanual> */
3616
3617/* <usermanual>
3618@keyword LEFT ARROW (constant)
3619
3620@english
3621
3622This constant represent the left arrow key, when used as a value
3623to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
3624If the key does not exist in the corresponding target, the
3625value will be zero.
3626
3627@italian
3628
3629Questa costante rappresenta il tasto freccia sinistra, quando
3630viene utilizzata come valore da confrontare con ''SCANCODE'',
3631''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
3632target corrispondente, il valore sarà zero.
3633
3634@syntax = LEFT ARROW
3635
3636@example IF SCANCODE = KEY LEFT ARROW THEN
3637@example PRINT "LEFT ARROW has been pressed!"
3638@example ENDIF
3639
3640@alias ARROW LEFT (constant)
3641
3642</usermanual> */
3643
3644/* <usermanual>
3645@keyword ARROW LEFT (constant)
3646
3647@english
3648
3649This constant represent the left arrow key, when used as a value
3650to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
3651If the key does not exist in the corresponding target, the
3652value will be zero.
3653
3654@italian
3655
3656Questa costante rappresenta il tasto freccia sinistra, quando
3657viene utilizzata come valore da confrontare con ''SCANCODE'',
3658''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
3659target corrispondente, il valore sarà zero.
3660
3661@syntax = ARROW LEFT
3662
3663@example IF KEY STATE(KEY ARROW LEFT) THEN
3664@example PRINT "LEFT ARROW has been pressed!"
3665@example ENDIF
3666
3667@alias LEFT ARROW (constant)
3668
3669</usermanual> */
3670
3671/* <usermanual>
3672@keyword UP ARROW (constant)
3673
3674@english
3675
3676This constant represent the up arrow key, when used as a value
3677to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
3678If the key does not exist in the corresponding target, the
3679value will be zero.
3680
3681@italian
3682
3683Questa costante rappresenta il tasto freccia in alto, quando
3684viene utilizzata come valore da confrontare con ''SCANCODE'',
3685''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
3686target corrispondente, il valore sarà zero.
3687
3688@syntax = UP ARROW
3689
3690@example IF SCANCODE = KEY UP ARROW THEN
3691@example PRINT "UP ARROW has been pressed!"
3692@example ENDIF
3693
3694@alias ARROW UP (constant)
3695
3696</usermanual> */
3697
3698/* <usermanual>
3699@keyword ARROW UP (constant)
3700
3701@english
3702
3703This constant represent the up arrow key, when used as a value
3704to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
3705If the key does not exist in the corresponding target, the
3706value will be zero.
3707
3708@italian
3709
3710Questa costante rappresenta il tasto freccia in alto, quando
3711viene utilizzata come valore da confrontare con ''SCANCODE'',
3712''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
3713target corrispondente, il valore sarà zero.
3714
3715@syntax = ARROW UP
3716
3717@example IF KEY STATE(KEY ARROW UP) THEN
3718@example PRINT "UP ARROW has been pressed!"
3719@example ENDIF
3720
3721@alias UP ARROW (constant)
3722
3723</usermanual> */
3724
3725/* <usermanual>
3726@keyword ASM
3727
3728@english
3729
3730The ''ASM'' command is a bridge between ugBASIC and the assembly language.
3731It allows you to directly insert instructions in machine language or
3732assembly language into the source code.
3733
3734In some sections of the code, especially those that require maximum
3735performance or very precise control over the hardware, writing directly
3736in assembly can bring significant speed improvements. Assembly allows you
3737to interact directly with the registers and instructions of the CPU,
3738offering granular control over the hardware.
3739
3740When dealing with code that must run on different architectures,
3741assembly can be used to write portions of code that are highly
3742optimized for a specific platform. In some cases, you may need to
3743interface with code written in assembly or with pre-existing libraries.
3744
3745The first syntax allow to introduce a single machine code
3746for each line, while the second one allows to introduce multiple
3747lines, at once.
3748
3749Note that assembly code is tightly coupled to the processor
3750architecture. A block of assembly code written for a Zilog Z80
3751will not run on an MOS 6502. Moreover, it is less readable than
3752ugBASIC language, making it more difficult to maintain. Finally,
3753a single error in assembly can cause the program to crash,
3754and indiscriminate use of assembly can interact with compiler
3755optimizations.
3756
3757Inline assembly should be used sparingly and only when
3758absolutely necessary. It is best used for small sections of
3759performance-critical code, for direct access to processor-specific
3760registers or instructions and to Interface with legacy code or
3761specific hardware.
3762
3763@italian
3764
3765Il comando ''ASM'' è un ponte tra ugBASIC e il linguaggio assembly.
3766Consente di inserire direttamente istruzioni in linguaggio macchina
3767o assembly nel codice sorgente.
3768
3769In alcune sezioni del codice, in particolare quelle che richiedono
3770le massime prestazioni o un controllo molto preciso sull'hardware,
3771scrivere direttamente in assembly può apportare notevoli miglioramenti
3772di velocità. L'assembly consente di interagire direttamente con i
3773registri e le istruzioni della CPU, offrendo un controllo
3774granulare sull'hardware.
3775
3776Quando si ha a che fare con codice che deve essere eseguito su
3777architetture diverse, l'assembly può essere utilizzato per scrivere
3778porzioni di codice altamente ottimizzate per una piattaforma specifica.
3779In alcuni casi, potrebbe essere necessario interfacciarsi con codice
3780scritto in assembly o con librerie preesistenti.
3781
3782La prima sintassi consente di introdurre un singolo codice macchina
3783per ogni riga, mentre la seconda consente di introdurre più righe
3784contemporaneamente.
3785
3786Nota che il codice assembly è strettamente accoppiato all'architettura
3787del processore. Un blocco di codice assembly scritto per uno Zilog Z80
3788non funzionerà su un MOS 6502. Inoltre, è meno leggibile del linguaggio
3789ugBASIC, il che lo rende più difficile da gestire. Infine, un singolo
3790errore in assembly può causare l'arresto anomalo del programma e l'uso
3791indiscriminato dell'assembly può interagire con le ottimizzazioni
3792del compilatore.
3793
3794L'assembly inline dovrebbe essere utilizzato con parsimonia e solo
3795quando assolutamente necessario. È meglio utilizzarlo per piccole
3796sezioni di codice critiche per le prestazioni, per l'accesso diretto
3797a registri o istruzioni specifici del processore e per interfacciarsi
3798con codice legacy o specifico per un hardware.
3799
3800@syntax ASM line
3801@syntax BEGIN ASM
3802@syntax ...
3803@syntax END ASM
3804
3805@example BEGIN ASM
3806@example LDA #02
3807@example STA $D020
3808@example END ASM ON CPU6502
3809
3810</usermanual> */
3811
3812/* <usermanual>
3813@keyword ASTERISK (constant)
3814
3815@english
3816
3817This constant represent the asterisk key, when used as a value
3818to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
3819If the key does not exist in the corresponding target, the
3820value will be zero.
3821
3822@italian
3823
3824Questa costante rappresenta il tasto asterisco, quando
3825viene utilizzata come valore da confrontare con ''SCANCODE'',
3826''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
3827target corrispondente, il valore sarà zero.
3828
3829@syntax = ASTERISK
3830
3831@example IF KEY STATE(KEY ASTERISK) THEN
3832@example PRINT "ASTERISK has been pressed!"
3833@example ENDIF
3834
3835</usermanual> */
3836
3837/* <usermanual>
3838@keyword AT (constant)
3839
3840@english
3841
3842This constant represent the "at" (@) key, when used as a value
3843to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
3844If the key does not exist in the corresponding target, the
3845value will be zero.
3846
3847@italian
3848
3849Questa costante rappresenta il tasto chiocciolina (@), quando
3850viene utilizzata come valore da confrontare con ''SCANCODE'',
3851''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
3852target corrispondente, il valore sarà zero.
3853
3854@syntax = AT
3855
3856@example IF KEY STATE(KEY AT) THEN
3857@example PRINT "ASTERISK has been pressed!"
3858@example ENDIF
3859
3860</usermanual> */
3861
3862/* <usermanual>
3863@keyword ATLAS (data type)
3864
3865@english
3866
3867The ''ATLAS'' data type maintains a reference to the collection of images that
3868can be used to draw them on the screen.
3869
3870@italian
3871
3872Il tipo di dato ''ATLAS'' mantiene un riferimento alla collezione di immagini
3873che può essere usata per disegnarle sullo schermo.
3874
3875@syntax ... AS ATLAS
3876
3877@target all
3878
3879@alias IMAGES
3880</usermanual> */
3881
3882/* <usermanual>
3883@keyword IMAGES (data type)
3884
3885@english
3886
3887@italian
3888
3889@syntax ... AS IMAGES
3890
3891@target all
3892
3893@alias ATLAS
3894
3895</usermanual> */
3896
3897/* <usermanual>
3898@keyword BETA (constant)
3899
3900@english
3901
3902This constant is set to non-zero if the compiler used to generate the executable
3903is in beta version. The beta version is not the final version of the compiler,
3904and may contain bugs or run unstable. This constant helps to isolate the
3905part of codes that depends on aspects available on beta version only.
3906
3907@italian
3908
3909Questa costante è impostata su un valore diverso da zero se il compilatore
3910utilizzato per generare l'eseguibile è in versione beta. La versione beta non
3911è la versione finale del compilatore e potrebbe contenere bug o risultare instabile.
3912Questa costante aiuta a isolare la parte di codice che dipende da aspetti disponibili
3913solo nella versione beta.
3914
3915@syntax = BETA
3916
3917@example IF NOT BETA THEN
3918@example PRINT "We are in a stable compiler."
3919@example ENDIF
3920
3921</usermanual> */
3922
3923/* <usermanual>
3924@keyword BIT (data type)
3925
3926@english
3927
3928The ''BIT'' data type is the smallest unit of information in a computer,
3929it takes up very little memory, since ut is "packed" on the minimum
3930number of bytes. This data type can be used to create compact and efficient
3931data structures, such as "bitsets", just using them in an array.
3932
3933@italian
3934
3935Il tipo di dati ''BIT'' è la più piccola unità di informazione in un
3936computer, occupa pochissima memoria, poiché è "impacchettato" sul numero
3937minimo di byte. Questo tipo di dati può essere utilizzato per creare
3938strutture di dati compatte ed efficienti, come i "bitset", semplicemente
3939utilizzandoli in un array.
3940
3941@syntax ... AS BIT
3942
3943@target all
3944
3945</usermanual> */
3946
3947/* <usermanual>
3948@keyword BLIT (data type)
3949
3950@english
3951
3952This data type holds a reference to the blitting operation. It can be used
3953as an argument to the blitting instruction, to specify how to manipulate
3954the input channels.
3955
3956@italian
3957
3958Questo tipo di dati contiene un riferimento all'operazione di blitting.
3959Può essere utilizzato come argomento per l'istruzione di blitting,
3960per specificare come manipolare i canali di input.
3961
3962@syntax ... AS BLIT
3963
3964@example DIM x AS BLIT
3965
3966@usedInExample blit_basic_mask.bas
3967
3968@seeAlso BLIT (instruction)
3969@seeAlso BLIT IMAGE
3970
3971@target all
3972</usermanual> */
3973
3974/* <usermanual>
3975@keyword BUFFER (data type)
3976
3977@english
3978
3979This data type holds a reference to any generic buffer, that is
3980a memory area of any kind, from a spare memory to a specific and
3981big resource.
3982
3983@italian
3984
3985Questo tipo di dati contiene un riferimento a qualsiasi buffer
3986generico, ovvero un'area di memoria di qualsiasi tipo, da una
3987memoria di riserva a una risorsa specifica e di grandi dimensioni.
3988
3989@syntax ... AS BUFFER
3990
3991@example DIM x AS BUFFER
3992
3993@target all
3994</usermanual> */
3995
3996/* <usermanual>
3997@keyword BYTE (data type)
3998
3999@english
4000
4001The ''BYTE'' represent the data type for 8 bit numbers. This kind of data can
4002represent a single character, such as a letter or number, could be represented with a byte,
4003integers between 0 and 255 could be represented directly in a byte.
4004
4005@italian
4006
4007Il ''BYTE'' rappresenta il tipo di dati per numeri a 8 bit. Questo tipo di dati
4008può rappresentare un singolo carattere, come una lettera o un numero, potrebbe
4009essere rappresentato con un byte, gli interi tra 0 e 255 potrebbero essere
4010rappresentati direttamente in un byte.
4011
4012@syntax ... AS BYTE
4013
4014@example DIM x AS BYTE
4015
4016@target all
4017</usermanual> */
4018
4019/* <usermanual>
4020@keyword SIGNED BYTE (data type)
4021
4022@english
4023
4024The ''SIGNED BYTE'' represent the data type for 8 bit numbers with sign. This kind of data can
4025represent a relative number, integers between -128 and 127 could be represented directly in a byte.
4026
4027@italian
4028
4029Il ''SIGNED BYTE'' rappresenta il tipo di dati per numeri a 8 bit con segno. Questo tipo
4030di dati può rappresentare un numero relativo, gli interi tra -128 e 127 potrebbero essere
4031rappresentati direttamente in un byte.
4032
4033@syntax ... AS SIGNED BYTE
4034
4035@example DIM x AS SIGNED BYTE
4036
4037</usermanual> */
4038
4039/* <usermanual>
4040@keyword CAPS LOCK (constant)
4041
4042@english
4043
4044This constant represent the "CAPS LOCK" key, when used as bitmask
4045for ''KEY SHIFT'' instruction.
4046
4047@italian
4048
4049Questa costante rappresenta il tasto "CAPS LOCK", quando utilizzato
4050come maschera di bit per l'istruzione ''KEY SHIFT''.
4051
4052@syntax = CAPS LOCK
4053
4054@example IF KEY SHIFT AND CAPS LOCK THEN
4055@example PRINT "CAPS LOCK has been pressed!"
4056@example ENDIF
4057
4058@alias CAPSLOCK (constant)
4059
4060</usermanual> */
4061
4062/* <usermanual>
4063@keyword CAPSLOCK (constant)
4064
4065@english
4066
4067@italian
4068
4069@syntax = CAPSLOCK
4070
4071@example IF KEY SHIFT AND CAPSLOCK THEN
4072@example PRINT "CAPS LOCK has been pressed!"
4073@example ENDIF
4074
4075@alias CAPS LOCK (constant)
4076
4077</usermanual> */
4078
4079/*
4080@tobe CHECK
4081 */
4082
4083/* <usermanual>
4084@keyword CLEAR (constant)
4085
4086@english
4087
4088This constant represent the "CLEAR" key, when used as a value
4089to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
4090If the key does not exist in the corresponding target, the
4091value will be zero.
4092
4093@italian
4094
4095Questa costante rappresenta il tasto "CLEAR", quando
4096viene utilizzata come valore da confrontare con ''SCANCODE'',
4097''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
4098target corrispondente, il valore sarà zero.
4099
4100@syntax = CLEAR
4101
4102@example IF KEY STATE(KEY CLEAR) THEN
4103@example PRINT "CLEAR has been pressed!"
4104@example ENDIF
4105
4106</usermanual> */
4107
4108/* <usermanual>
4109@keyword CMOB
4110
4111@english
4112
4113The ''CMOB'' instruction attribute the two colors that are the same for all multicolor
4114sprites in VIC-II registers. Color for individual sprites are available with the
4115''MOB SET'' command or, even, ''MOBCOL''.
4116
4117@italian
4118
4119L'istruzione ''CMOB'' attribuisce i due colori che sono gli stessi per tutti gli
4120sprite multicolor nei registri VIC-II. I colori per i singoli sprite sono disponibili
4121con il comando ''MOB SET'' o, persino, ''MOBCOL''.
4122
4123@syntax CMOB c1, c2
4124
4125@example CMOB RED, BLUE
4126
4127</usermanual> */
4128
4129/* <usermanual>
4130@keyword COLUMNS (constant)
4131
4132@english
4133
4134This constant represents the number of columns present
4135in the last defined console.
4136
4137@italian
4138
4139Questa costante rappresenta il numero di colonne presenti
4140nell'ultima console definita.
4141
4142@syntax = COLUMNS
4143
4144@seeAlso SCREEN COLUMNS (constant)
4145@target all
4146</usermanual> */
4147
4148/* <usermanual>
4149@keyword CONFIGURE
4150
4151@english
4152
4153The ''CONFIGURE'' command allow to customize hardware configuration, and
4154gives the possibility of generating hardware selection menus via software.
4155The configuration allows two types of manipulation: a ''STATIC'' one,
4156which is adopted at compilation time (useful for development and
4157unconventional startup) and a ''DYNAMIC'' one, which is adopted at
4158execution time (useful for creating configuration menus).
4159Static changes must begin with the ''CONFIGURE STATIC'' keywords,
4160while dynamic changes must begin with the ''CONFIGURE DYNAMIC'' keywords.
4161By default, the changes are to be considered static.
4162
4163Each hardware change request must begin with the ''CONFIGURE'' keyword
4164followed by the name of the hardware to be configured. Each request for
4165hardware modification must concern one or more parameters prefixed by
4166the ''SET'' command. The value that can be assigned to these
4167variables must be consistent with the expected and acceptable values.
4168
4169Finally, it is possbile to assign multiple values consecutively,
4170separating them with a comma, without using the ''SET'' command.
4171
4172@italian
4173
4174Il comando ''CONFIGURE'' consente di personalizzare la
4175configurazione hardware e fornisce la possibilità di generare
4176menu di selezione hardware tramite software.
4177
4178La configurazione consente due tipi di manipolazione: una ''STATIC'',
4179che viene adottata in fase di compilazione (utile per lo sviluppo e
4180l'avvio non convenzionale) e una ''DYNAMIC'', che viene adottata
4181in fase di esecuzione (utile per la creazione di menu di configurazione).
4182
4183Le modifiche statiche devono iniziare con le parole chiave ''CONFIGURE STATIC'',
4184mentre le modifiche dinamiche devono iniziare con le parole chiave
4185''CONFIGURE DYNAMIC''. Per impostazione predefinita, le modifiche
4186sono considerate statiche.
4187
4188Ogni richiesta di modifica hardware deve iniziare con la parola
4189chiave ''CONFIGURE'' seguita dal nome dell'hardware da configurare.
4190Ogni richiesta di modifica hardware deve riguardare uno o più
4191parametri preceduti dal comando ''SET''. Il valore che può essere
4192assegnato a queste variabili deve essere coerente con i valori
4193previsti e accettabili.
4194
4195Infine, è possibile assegnare più valori consecutivamente,
4196separandoli con una virgola, senza utilizzare il comando ''SET''.
4197
4198@syntax CONFIGURE STATIC hw SET p1 = v1 [, p2 = v2 [, ...]]
4199@syntax CONFIGURE DYNAMIC hw SET p1 = v1 [, p2 = v2 [, ...]]
4200
4201@target all
4202</usermanual> */
4203
4204/* <usermanual>
4205@keyword CONST SHARED
4206
4207@english
4208
4209@italian
4210
4211@syntax [POSITIVE] CONST SHARED identifier = value
4212@syntax CONST SHARED identifier IN (min,max) = value
4213@syntax CONST SHARED identifier IN "[" min,max) = value
4214@syntax CONST SHARED identifier IN (min,max "]" = value
4215@syntax CONST SHARED identifier IN "[" min,max "]"" = value
4216
4217@example CONST SHARED x = 42
4218@example POSITIVE CONST SHARED y = -42: ' this raises an error!
4219@example CONST SHARED width IN (0,320] = 128
4220
4221@usedInExample contrib_sierpinski.bas
4222@usedInExample contrib_sierpinski2.bas
4223@usedInExample contrib_sierpinski3.bas
4224
4225@alias SHARED CONST
4226@alias SHARED
4227@alias GLOBAL CONST
4228@alias CONST GLOBAL
4229
4230@target all
4231</usermanual> */
4232
4233/* <usermanual>
4234@keyword SHARED CONST
4235
4236@english
4237
4238@italian
4239
4240@syntax [POSITIVE] SHARED CONST identifier = value
4241@syntax SHARED CONST identifier IN (min,max) = value
4242@syntax SHARED CONST identifier IN "[" min,max) = value
4243@syntax SHARED CONST identifier IN (min,max "]" = value
4244@syntax SHARED CONST identifier IN "[" min,max "]"" = value
4245
4246@example SHARED CONST x = 42
4247@example POSITIVE SHARED CONST y = -42: ' this raises an error!
4248@example SHARED CONST width IN (0,320] = 128
4249
4250@usedInExample contrib_sierpinski.bas
4251@usedInExample contrib_sierpinski2.bas
4252@usedInExample contrib_sierpinski3.bas
4253
4254@alias SHARED
4255@alias CONST SHARED
4256@alias GLOBAL CONST
4257@alias CONST GLOBAL
4258
4259@target all
4260</usermanual> */
4261
4262/* <usermanual>
4263@keyword CONST GLOBAL
4264
4265@english
4266
4267@italian
4268
4269@syntax [POSITIVE] CONST GLOBAL identifier = value
4270@syntax CONST GLOBAL identifier IN (min,max) = value
4271@syntax CONST GLOBAL identifier IN "[" min,max) = value
4272@syntax CONST GLOBAL identifier IN (min,max "]" = value
4273@syntax CONST GLOBAL identifier IN "[" min,max "]"" = value
4274
4275@example CONST GLOBAL x = 42
4276@example POSITIVE CONST GLOBAL y = -42: ' this raises an error!
4277@example CONST GLOBAL width IN (0,320] = 128
4278
4279@usedInExample contrib_sierpinski.bas
4280@usedInExample contrib_sierpinski2.bas
4281@usedInExample contrib_sierpinski3.bas
4282
4283@alias SHARED
4284@alias CONST SHARED
4285@alias SHARED CONST
4286@alias GLOBAL CONST
4287
4288@target all
4289</usermanual> */
4290
4291/* <usermanual>
4292@keyword GLOBAL CONST
4293
4294@english
4295
4296@italian
4297
4298@syntax [POSITIVE] GLOBAL CONST identifier = value
4299@syntax GLOBAL CONST identifier IN (min,max) = value
4300@syntax GLOBAL CONST identifier IN "[" min,max) = value
4301@syntax GLOBAL CONST identifier IN (min,max "]" = value
4302@syntax GLOBAL CONST identifier IN "[" min,max "]"" = value
4303
4304@example GLOBAL CONST x = 42
4305@example POSITIVE GLOBAL CONST y = -42: ' this raises an error!
4306@example GLOBAL CONST width IN (0,320] = 128
4307
4308@usedInExample contrib_sierpinski.bas
4309@usedInExample contrib_sierpinski2.bas
4310@usedInExample contrib_sierpinski3.bas
4311
4312@alias SHARED
4313@alias CONST SHARED
4314@alias SHARED CONST
4315@alias CONST GLOBAL
4316
4317@target all
4318</usermanual> */
4319
4320/* <usermanual>
4321@keyword CONTROL (constant)
4322
4323@english
4324
4325This constant represent the "CONTROL" key, when used as a value
4326to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
4327If the key does not exist in the corresponding target, the
4328value will be zero.
4329
4330@italian
4331
4332Questa costante rappresenta il tasto "CONTROL", quando
4333viene utilizzata come valore da confrontare con ''SCANCODE'',
4334''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
4335target corrispondente, il valore sarà zero.
4336
4337@syntax = CONTROL
4338
4339@example IF KEY STATE(KEY CONTROL) THEN
4340@example PRINT "CONTROL has been pressed!"
4341@example ENDIF
4342
4343</usermanual> */
4344
4345/* <usermanual>
4346@keyword CRSR LEFT RIGHT (constant)
4347
4348@english
4349
4350This constant represent the "CRSR LEFT RIGHT" key, when used as a value
4351to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
4352If the key does not exist in the corresponding target, the
4353value will be zero.
4354
4355@italian
4356
4357Questa costante rappresenta il tasto "CRSR LEFT RIGHT", quando
4358viene utilizzata come valore da confrontare con ''SCANCODE'',
4359''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
4360target corrispondente, il valore sarà zero.
4361
4362@syntax = CRSR LEFT RIGHT
4363
4364@example IF KEY STATE(KEY CRSR LEFT RIGHT) THEN
4365@example PRINT "CRSR LEFT RIGHT has been pressed!"
4366@example ENDIF
4367
4368</usermanual> */
4369
4370/* <usermanual>
4371@keyword CRSR UP DOWN (constant)
4372
4373@english
4374
4375This constant represent the "CRSR UP DOWN" key, when used as a value
4376to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
4377If the key does not exist in the corresponding target, the
4378value will be zero.
4379
4380@italian
4381
4382Questa costante rappresenta il tasto "CRSR UP DOWNT", quando
4383viene utilizzata come valore da confrontare con ''SCANCODE'',
4384''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
4385target corrispondente, il valore sarà zero.
4386
4387@syntax = CRSR UP DOWN
4388
4389@example IF KEY STATE(KEY CRSR UP DOWN) THEN
4390@example PRINT "CRSR UP DOWN has been pressed!"
4391@example ENDIF
4392
4393</usermanual> */
4394
4395/* <usermanual>
4396@keyword DEGREE
4397
4398@english
4399
4400This command allows you to select the angle mode with
4401trigonometric functions, setting it to 360 degrees.
4402
4403@italian
4404
4405Questo comando permette di selezionare la modalità
4406degli angoli nelle funzioni trigonometriche, impostandola a gradi su 360.
4407
4408@syntax DEGREE
4409
4410@example x1 = COS(3.1415)
4411@example DEGREE
4412@example x2 = COS(180)
4413@example PRINT x1;" ";x2
4414
4415</usermanual> */
4416
4417
4418/* <usermanual>
4419@keyword RADIAN
4420
4421@english
4422
4423This command allows you to select the angle mode with
4424trigonometric functions, setting it to radiants.
4425
4426@italian
4427
4428Questo comando permette di selezionare la modalità
4429degli angoli nelle funzioni trigonometriche, impostandola a radianti
4430
4431@syntax RADIAN
4432
4433@example DEGREE
4434@example x1 = COS(180)
4435@example RADIAN
4436@example x2 = COS(3.1415)
4437@example PRINT x1;" ";x2
4438
4439</usermanual> */
4440
4441/* <usermanual>
4442@keyword DELETE (constant)
4443
4444@english
4445
4446This constant represent the "DELETE" key, when used as a value
4447to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
4448If the key does not exist in the corresponding target, the
4449value will be zero.
4450
4451@italian
4452
4453Questa costante rappresenta il tasto "DELETE", quando
4454viene utilizzata come valore da confrontare con ''SCANCODE'',
4455''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
4456target corrispondente, il valore sarà zero.
4457
4458@syntax = DELETE
4459
4460@example IF KEY STATE(KEY DELETE) THEN
4461@example PRINT "DELETE has been pressed!"
4462@example ENDIF
4463
4464</usermanual> */
4465
4466/* <usermanual>
4467@keyword DOJOKA (data type)
4468
4469@english
4470
4471This data type holds a reference to a connection or communication
4472port with the DOJO protocol.
4473
4474@italian
4475
4476Questo tipo di dato mantiene un riferimento a una connessione o
4477a una porta di comunicazione con il protocollo ''DOJO''.
4478
4479@syntax ... AS DOJOKA
4480
4481@example DIM accessId AS DOJOKA
4482@example accessId = LOGIN( "user", "password" )
4483
4484</usermanual> */
4485
4486/* <usermanual>
4487@keyword DOWN (constant)
4488
4489@english
4490
4491This constant represent the "DOWN" key (move cursor down), when used as a value
4492to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
4493If the key does not exist in the corresponding target, the
4494value will be zero.
4495
4496@italian
4497
4498Questa costante rappresenta il tasto "DOWN" (muovi il cusorse in giù), quando
4499viene utilizzata come valore da confrontare con ''SCANCODE'',
4500''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
4501target corrispondente, il valore sarà zero.
4502
4503@syntax = DOWN
4504
4505@example IF KEY STATE(KEY DOWN) THEN
4506@example PRINT "DOWN has been pressed!"
4507@example ENDIF
4508
4509</usermanual> */
4510
4511/* <usermanual>
4512@keyword WORD (data type)
4513
4514@english
4515
4516The ''WORD'' is a data type that allow to store a 16-bit word.
4517
4518@italian
4519
4520''WORD'' è un tipo di dati che consente di memorizzare una
4521parola a 16 bit.
4522
4523@syntax ... AS WORD
4524
4525@example DIM parolaLunga AS WORD
4526
4527</usermanual> */
4528
4529/* <usermanual>
4530@keyword SIGNED WORD (data type)
4531
4532@english
4533
4534The ''SIGNED WORD'' is a data type that allow to store a 16-bit word, with sign.
4535
4536@italian
4537
4538''WORD'' è un tipo di dati che consente di memorizzare una
4539parola a 16 bit, con segno.
4540
4541@syntax ... AS SIGNED WORD
4542
4543@example DIM parolaLunga AS SIGNED WORD
4544
4545@alias INT (data type)
4546@alias INTEGER (data type)
4547</usermanual> */
4548
4549/* <usermanual>
4550@keyword DWORD (data type)
4551
4552@english
4553
4554The ''DWORD'' is a data type that allow to store a 32-bit word (''WORD'').
4555
4556@italian
4557
4558''DWORD'' è un tipo di dati che consente di memorizzare una
4559parola (''WORD'') a 32 bit.
4560
4561@syntax ... AS DWORD
4562
4563@example DIM parolaLunga AS DWORD
4564
4565</usermanual> */
4566
4567/* <usermanual>
4568@keyword SIGNED DWORD (data type)
4569
4570@english
4571
4572The ''SIGNED DWORD'' is a data type that allow to store a 32-bit word (''DWORD''), with sign.
4573
4574@italian
4575
4576''SIGNED DWORD'' è un tipo di dati che consente di memorizzare una
4577parola lunga a 32 bit, con segno.
4578
4579@syntax ... AS SIGNED DWORD
4580
4581@example DIM parolaLunga AS SIGNED DWORD
4582
4583@alias LONG (data type)
4584
4585</usermanual> */
4586
4587/* <usermanual>
4588@keyword EMPTY TILE
4589
4590@english
4591
4592This is a special parameter of ugBASIC, which allows you to change what
4593is considered the "space" character on the screen. It is used, in text
4594modes, to clear the screen.
4595
4596@italian
4597
4598Questo è un parametro speciale di ugBASIC, che consente di modificare
4599quello che viene considerato il carattere "spazio" sullo schermo.
4600Viene utilizzato, nelle modalità testuali, per cancellare lo schermo.
4601
4602@syntax = EMPTY TILE
4603@syntax EMPTY TILE = ...
4604
4605@example EMPTY TILE = 65
4606@example CLS
4607
4608@alias EMPTYTILE
4609
4610</usermanual> */
4611
4612/* <usermanual>
4613@keyword EMPTYTILE
4614
4615@english
4616
4617@italian
4618
4619@syntax = EMPTYTILE
4620@syntax EMPTYTILE = ...
4621
4622@example EMPTYTILE = 65
4623@example CLS
4624
4625@alias EMPTY TILE
4626
4627</usermanual> */
4628
4629/* <usermanual>
4630@keyword EQUAL (constant)
4631
4632@english
4633
4634This constant represent the "EQUAL" key (=), when used as a value
4635to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
4636If the key does not exist in the corresponding target, the
4637value will be zero.
4638
4639@italian
4640
4641Questa costante rappresenta il tasto "UGUALE" (=), quando
4642viene utilizzata come valore da confrontare con ''SCANCODE'',
4643''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
4644target corrispondente, il valore sarà zero.
4645
4646@syntax = EQUAL
4647
4648@example IF KEY STATE(KEY EQUAL) THEN
4649@example PRINT "EQUAL has been pressed!"
4650@example ENDIF
4651
4652</usermanual> */
4653
4654/* <usermanual>
4655@keyword FALSE (constant)
4656
4657@english
4658
4659This constant represent the boolean value for FALSE (0).
4660
4661@italian
4662
4663Questa costante rappresenta il valore booleano per FALSE (0).
4664
4665@syntax = FALSE
4666
4667@example IF v = FALSE THEN
4668@example PRINT "V is false!"
4669@example ENDIF
4670
4671</usermanual> */
4672
4673/* <usermanual>
4674@keyword FLOAT (data type)
4675
4676@english
4677
4678The ''FLOAT'' is a data type that allow to store a floating
4679point number.
4680
4681@italian
4682
4683''FLOAT'' è un tipo di dati che consente di memorizzare un
4684numero in virgola mobile.
4685
4686@syntax ... AS FLOAT
4687
4688@example DIM numero AS FLOAT
4689
4690@alias SINGLE
4691
4692</usermanual> */
4693
4694/* <usermanual>
4695@keyword SINGLE (data type)
4696
4697@english
4698
4699@italian
4700
4701@syntax ... AS SINGLE
4702
4703@example DIM numero AS SINGLE
4704
4705@alias FLOAT
4706
4707</usermanual> */
4708
4709/* <usermanual>
4710@keyword GET
4711
4712@italian
4713
4714@syntax GET var
4715
4716@example GET tasto
4717
4718@alias INKEY
4719
4720</usermanual> */
4721
4722/* <usermanual>
4723@keyword GLOBAL
4724
4725@english
4726
4727When you write a program, variables are like containers that store data.
4728Depending on where you declare them, these variables can have different "scopes,"
4729meaning they can be accessed from different parts of your code. The ''GLOBAL''
4730command allows to define a variable as accessible from everywhere.
4731
4732You should use ''GLOBAL'' to store parameters that do not change during program execution,
4733to share the state between different parts of your code, and generally to improve performance,
4734but it is important to weigh the pros and cons carefully. In general, it is a good idea to limit
4735the use of global variables and use local variables whenever possible.
4736
4737You can use the name of variables to make them global, or a string with a "pattern"
4738to follow, to choose if a variable will be global or not. Pattern uses "wildcard"
4739to match any letter in name of the variables.
4740
4741@italian
4742
4743Quando scrivi un programma, le variabili sono come contenitori che memorizzano dati.
4744A seconda di dove le dichiari, queste variabili possono avere diversi "ambiti",
4745ovvero possono essere accessibili da diverse parti del tuo codice. Il comando ''GLOBAL''
4746consente di definire una variabile come accessibile da qualsiasi luogo.
4747
4748Dovresti usare ''GLOBAL'' per memorizzare parametri che non cambiano durante
4749l'esecuzione del programma, per condividere lo stato tra diverse parti del tuo
4750codice e in generale per migliorare le prestazioni, ma è importante soppesare
4751attentamente i pro e i contro. In generale, è una buona idea limitare l'uso di
4752variabili globali e usare variabili locali quando possibile.
4753
4754Puoi usare il nome delle variabili per renderle globali o una stringa con un
4755"pattern" da seguire, per scegliere se una variabile sarà globale o meno.
4756Il pattern usa "carattere jolly" per abbinare qualsiasi lettera nel nome
4757delle variabili.
4758
4759@syntax GLOBAL var[, var[, ...]]
4760@syntax GLOBAL string
4761
4762@example GLOBAL var42
4763@example GLOBAL "a*"
4764
4765@seeAlso SHARED
4766
4767</usermanual> */
4768
4769/* <usermanual>
4770@keyword HOME (constant)
4771
4772@english
4773
4774This constant represent the "HOME" key, when used as a value
4775to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
4776If the key does not exist in the corresponding target, the
4777value will be zero.
4778
4779@italian
4780
4781Questa costante rappresenta il tasto "HOME", quando
4782viene utilizzata come valore da confrontare con ''SCANCODE'',
4783''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
4784target corrispondente, il valore sarà zero.
4785
4786@syntax = HOME
4787
4788@example IF KEY STATE(KEY HOME) THEN
4789@example PRINT "HOME has been pressed!"
4790@example ENDIF
4791
4792</usermanual> */
4793
4794/* <usermanual>
4795@keyword IMAGE (data type)
4796
4797@english
4798
4799The ''IMAGE'' data type maintains a reference to an image that
4800can be drawn on the screen
4801
4802@italian
4803
4804Il tipo di dato ''IMAGE'' mantiene un riferimento a una immagine
4805che può essere disegnata sullo schermo.
4806
4807@syntax ... AS IMAGE
4808
4809</usermanual> */
4810
4811/* <usermanual>
4812@keyword INCLUDE
4813
4814@english
4815
4816The ''INCLUDE'' command allows you to insert a source from an external
4817file. In practice, what happens is that the content of the file, without
4818any interpretation, is copied "as is" at the point where the statement
4819was inserted. All variables and scopes will be maintained.
4820
4821Particular attention should be paid to the fact that all the
4822configurations and values at the time the command is executed will be
4823maintained. This means that, for example, if you include a source that
4824manages graphics, it will work with the graphics mode defined up to
4825that moment.
4826
4827@italian
4828
4829Il comando ''INCLUDE'' consente di inserire una sorgente da un file esterno.
4830In pratica, ciò che accade è che il contenuto del file, senza alcuna
4831interpretazione, viene copiato "così com'è" nel punto in cui è stata inserita
4832l'istruzione. Tutte le variabili e gli ambiti verranno mantenuti.
4833
4834Particolare attenzione si dovrà porre al fatto che tutte le configurazioni
4835e valori al momento in cui il comando viene eseguito saranno mantenute.
4836Questo significa che, se ad esempio includete un sorgente che gestisce
4837la grafica, questa lavorerà con la modalità grafica definita fino a
4838quel momento.
4839
4840@syntax INCLUDE filename
4841@syntax INCLUDE "filename"
4842
4843</usermanual> */
4844
4845/* <usermanual>
4846@keyword INSERT (constant)
4847
4848@english
4849
4850This constant represent the "INSERT" key, when used as a value
4851to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
4852If the key does not exist in the corresponding target, the
4853value will be zero.
4854
4855@italian
4856
4857Questa costante rappresenta il tasto "INSERT", quando
4858viene utilizzata come valore da confrontare con ''SCANCODE'',
4859''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
4860target corrispondente, il valore sarà zero.
4861
4862@syntax = INSERT
4863
4864@example IF KEY STATE(KEY INSERT) THEN
4865@example PRINT "INSERT has been pressed!"
4866@example ENDIF
4867
4868</usermanual> */
4869
4870/* <usermanual>
4871@keyword INT (data type)
4872
4873@english
4874
4875The ''INT'' is a data type that allow to store a signed 16-bit word.
4876
4877@italian
4878
4879Il tipo ''INT'' è un tipo di dati che consente di memorizzare una
4880parola con segno a 16 bit.
4881
4882@syntax ... AS INT
4883
4884@example DIM parolaLunga AS INT
4885
4886@alias INTEGER (data type)
4887@alias SIGNED WORD (data type)
4888
4889</usermanual> */
4890
4891/* <usermanual>
4892@keyword INTEGER (data type)
4893
4894@english
4895
4896@italian
4897
4898@syntax ... AS INTEGER
4899
4900@example DIM parolaLunga AS INTEGER
4901
4902@alias INT (data type)
4903@alias SIGNED WORD (data type)
4904
4905</usermanual> */
4906
4907/* <usermanual>
4908@keyword JOY UP (constant)
4909
4910@english
4911
4912This constant represents the bitmask to use to identify the "up direction"
4913bit for the value returned by the JOY function.
4914
4915@italian
4916
4917Questa costante rappresenta la bitmask da utilizzare per identificare il
4918bit "direzione su" per il valore restituito dalla funzione JOY.
4919
4920@syntax = JOY UP
4921
4922@example IF JOY(0) AND JOY UP THEN
4923@example PRINT "UP!"
4924@example ENDIF
4925
4926</usermanual> */
4927
4928/* <usermanual>
4929@keyword JOY DOWN (constant)
4930
4931@english
4932
4933This constant represents the bitmask to use to identify the "down direction"
4934bit for the value returned by the JOY function.
4935
4936@italian
4937
4938Questa costante rappresenta la bitmask da utilizzare per identificare il
4939bit "direzione giù" per il valore restituito dalla funzione JOY.
4940
4941@syntax = JOY DOWN
4942
4943@example IF JOY(0) AND JOY DOWN THEN
4944@example PRINT "DOWN!"
4945@example ENDIF
4946
4947</usermanual> */
4948
4949/* <usermanual>
4950@keyword JOY LEFT (constant)
4951
4952@english
4953
4954This constant represents the bitmask to use to identify the "left direction"
4955bit for the value returned by the JOY function.
4956
4957@italian
4958
4959Questa costante rappresenta la bitmask da utilizzare per identificare il
4960bit "direzione sinistra" per il valore restituito dalla funzione JOY.
4961
4962@syntax = JOY LEFT
4963
4964@example IF JOY(0) AND JOY LEFT THEN
4965@example PRINT "LEFT!"
4966@example ENDIF
4967
4968</usermanual> */
4969
4970/* <usermanual>
4971@keyword JOY RIGHT (constant)
4972
4973@english
4974
4975This constant represents the bitmask to use to identify the "right direction"
4976bit for the value returned by the JOY function.
4977
4978@italian
4979
4980Questa costante rappresenta la bitmask da utilizzare per identificare il
4981bit "direzione destra" per il valore restituito dalla funzione JOY.
4982
4983@syntax = JOY RIGHT
4984
4985@example IF JOY(0) AND JOY RIGHT THEN
4986@example PRINT "RIGHT!"
4987@example ENDIF
4988
4989</usermanual> */
4990
4991/* <usermanual>
4992@keyword LEFT (constant)
4993
4994@english
4995
4996This constant represent the "LEFT" key, when used as a value
4997to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
4998If the key does not exist in the corresponding target, the
4999value will be zero.
5000
5001@italian
5002
5003Questa costante rappresenta il tasto "LEFT", quando
5004viene utilizzata come valore da confrontare con ''SCANCODE'',
5005''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
5006target corrispondente, il valore sarà zero.
5007
5008@syntax = LEFT
5009
5010@example IF KEY STATE(KEY LEFT) THEN
5011@example PRINT "LEFT has been pressed!"
5012@example ENDIF
5013
5014</usermanual> */
5015
5016/* <usermanual>
5017@keyword RIGHT (constant)
5018
5019@english
5020
5021This constant represent the "RIGHT" key, when used as a value
5022to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
5023If the key does not exist in the corresponding target, the
5024value will be zero.
5025
5026@italian
5027
5028Questa costante rappresenta il tasto "RIGHT", quando
5029viene utilizzata come valore da confrontare con ''SCANCODE'',
5030''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
5031target corrispondente, il valore sarà zero.
5032
5033@syntax = RIGHT
5034
5035@example IF KEY STATE(KEY RIGHT) THEN
5036@example PRINT "RIGHT has been pressed!"
5037@example ENDIF
5038
5039</usermanual> */
5040
5041/* <usermanual>
5042@keyword UP (constant)
5043
5044@english
5045
5046This constant represent the "UP" key, when used as a value
5047to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
5048If the key does not exist in the corresponding target, the
5049value will be zero.
5050
5051@italian
5052
5053Questa costante rappresenta il tasto "UP", quando
5054viene utilizzata come valore da confrontare con ''SCANCODE'',
5055''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
5056target corrispondente, il valore sarà zero.
5057
5058@syntax = UP
5059
5060@example IF KEY STATE(KEY UP) THEN
5061@example PRINT "UP has been pressed!"
5062@example ENDIF
5063
5064</usermanual> */
5065
5066/* <usermanual>
5067@keyword DOWN (constant)
5068
5069@english
5070
5071This constant represent the "DOWN" key, when used as a value
5072to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
5073If the key does not exist in the corresponding target, the
5074value will be zero.
5075
5076@italian
5077
5078Questa costante rappresenta il tasto "DOWN", quando
5079viene utilizzata come valore da confrontare con ''SCANCODE'',
5080''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
5081target corrispondente, il valore sarà zero.
5082
5083@syntax = DOWN
5084
5085@example IF KEY STATE(KEY DOWN) THEN
5086@example PRINT "DOWN has been pressed!"
5087@example ENDIF
5088
5089</usermanual> */
5090
5091/* <usermanual>
5092@keyword LONG (data type)
5093
5094@english
5095
5096The ''LONG'' is a data type that allow to store a signed 32-bit word.
5097
5098@italian
5099
5100''LONG'' è un tipo di dati che consente di memorizzare una
5101parola (''WORD'') a 32 bit con segno.
5102
5103@syntax ... AS LONG
5104
5105@example DIM parolaLunga AS LONG
5106
5107@alias SIGNED DWORD (data type)
5108
5109</usermanual> */
5110
5111/* <usermanual>
5112@keyword MINUS (constant)
5113
5114@english
5115
5116This constant represent the "MINUS" key, when used as a value
5117to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
5118If the key does not exist in the corresponding target, the
5119value will be zero.
5120
5121@italian
5122
5123Questa costante rappresenta il tasto "MINUS", quando
5124viene utilizzata come valore da confrontare con ''SCANCODE'',
5125''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
5126target corrispondente, il valore sarà zero.
5127
5128@syntax = MINUS
5129
5130@example IF KEY STATE(KEY MINUS) THEN
5131@example PRINT "MINUS has been pressed!"
5132@example ENDIF
5133
5134</usermanual> */
5135
5136/* <usermanual>
5137@keyword MOB ON
5138
5139@english
5140
5141@italian
5142
5143@syntax MOB ON
5144
5145@alias SPRITE ENABLE
5146
5147</usermanual> */
5148
5149/* <usermanual>
5150@keyword MOB OFF
5151
5152@english
5153
5154@italian
5155
5156@syntax MOB OFF
5157
5158@alias SPRITE DISABLE
5159
5160</usermanual> */
5161
5162/* <usermanual>
5163@keyword MSPRITE (data type)
5164
5165@english
5166
5167The ''MSPRITE'' is a data type that allow to store a reference to a multiplexed
5168sprite.
5169
5170@italian
5171
5172''MSPRITE'' è un tipo di dati che consente di memorizzare il riferimento
5173a uno sprite multiplexed.
5174
5175@syntax ... AS MSPRITE
5176
5177@example DIM player AS MSPRITE
5178
5179</usermanual> */
5180
5181/* <usermanual>
5182@keyword MUL
5183
5184@english
5185
5186The ''MUL'' statement is used to multiply the value of a numeric variable by
5187a specified amount. In other words, it is like multiply one number with another.
5188It is the same as ''var = var * expr''.
5189
5190It takes the ''var'' to which you want
5191to multiply a value and the ''expr'' as the expression you want to multiply
5192to the variable.
5193
5194@italian
5195
5196L'istruzione ''MUL'' viene utilizzata per moltiplicare il valore di una
5197variabile numerica per una quantità specificata. In altre parole, è come
5198moltiplicare un numero per un altro. È uguale a ''var = var * expr''.
5199
5200Prende la ''var'' a cui vuoi moltiplicare un valore e ''expr'' come
5201espressione che vuoi moltiplicare per la variabile.
5202
5203@syntax MUL var, expr
5204
5205@example MUL v, 42
5206
5207</usermanual> */
5208
5209/* <usermanual>
5210@keyword MULTI
5211
5212@english
5213
5214MULTI sets three of the colors of the C64's multicolor mode and switches
5215the multicolor mode on. The fourth possible color (the background color,
5216multicolor bit combination %00, controlled by memory address $D021) is defined with
5217the ''COLOR'' command. The first parameter of ''MULTI'' (''color1'') controls
5218the color of the bit combination %01, ''color2'' corresponds to the color of the
5219bit combination %10 and ''color3'' colors the bit combination %11.
5220
5221@italian
5222
5223''MULTI'' imposta tre dei colori della modalità multicolore del C64 e attiva la
5224modalità multicolore. Il quarto colore possibile (il colore di sfondo, la
5225combinazione di bit multicolore %00, controllata dall'indirizzo di memoria $D021)
5226è definito con il comando ''COLOR''. Il primo parametro di ''MULTI'' (''color1'')
5227controlla il colore della combinazione di bit %01, ''color2'' corrisponde al
5228colore della combinazione di bit %10 e ''color3'' colora la combinazione di
5229bit %11.
5230
5231@syntax MULTI color1, color2, color3
5232
5233@example MULTI RED, GREEN, YELLOW
5234@seeAlso MULTI ON
5235@seeAlso MULTI OFF
5236
5237</usermanual> */
5238
5239/* <usermanual>
5240@keyword MULTI ON
5241
5242@english
5243
5244''MULTI ON'' activates the multicolor mode without setting any colors.
5245
5246@italian
5247
5248''MULTI ON'' attiva la modalità multicolore senza impostare alcun colore.
5249
5250@syntax MULTI ON
5251
5252@example MULTI ON
5253
5254@seeAlso MULTI OFF
5255
5256</usermanual> */
5257
5258/* <usermanual>
5259@keyword MULTI OFF
5260
5261@english
5262
5263''MULTI OFF'' deactivates the multicolor mode.
5264
5265@italian
5266
5267''MULTI OFF'' disattiva la modalità multicolore.
5268
5269@syntax MULTI OFF
5270
5271@example MULTI OFF
5272
5273@seeAlso MULTI ON
5274
5275</usermanual> */
5276
5277/* <usermanual>
5278@keyword MUSIC (data type)
5279
5280@english
5281
5282The ''MUSIC'' is a data type that reference the data for any music track.
5283
5284@italian
5285
5286''MUSIC'' è un tipo di dati che fa riferimento ai dati di qualsiasi traccia musicale.
5287
5288@syntax ... AS MUSIC
5289
5290@example DIM music AS MUSIC
5291
5292</usermanual> */
5293
5294// @tobe NEW TILESET
5295
5296/* <usermanual>
5297@keyword NONE (constant)
5298
5299@english
5300
5301This constant represent the fact that no key has been pressed, when used
5302as a valueto compare with ''SCANCODE''.
5303
5304@italian
5305
5306Questa costante rappresenta il fatto che non è stato premuto alcun tasto,
5307quando viene utilizzata come valore da confrontare con ''SCANCODE''.
5308
5309@syntax = NONE
5310
5311@example IF SCANCODE = KEY NONE THEN
5312@example PRINT "No key has been pressed"
5313@example ENDIF
5314
5315</usermanual> */
5316
5317/* <usermanual>
5318@keyword NOP
5319
5320@english
5321
5322''NOP'' is short for "No OPeration" and it is a very special instruction:
5323it generates an equivalent instruction in assembly languages that
5324does not perform any useful operation, that is, it does not change the
5325state of the processor or the data in memory.
5326
5327By inserting a sequence of ''NOP'' instructions, you can create a timed
5328delay within your program. This can be useful, for example, to synchronize
5329several actions or to create animation effects. In some cases, it is necessary
5330to align the code to certain memory locations. By inserting ''NOP'' instructions,
5331you can "fill" the missing space and ensure correct alignment. NOP instructions
5332can be used to insert "placeholders" into code, making debugging and testing
5333easier.
5334
5335When the program encounters a ''NOP'' instruction, it simply increments
5336the program counter (PC) to the next instruction, without performing any data
5337operations. In effect, the processor "wastes time" executing this empty instruction.
5338
5339It is important to note that excessive use of NOP instructions can slow
5340down the execution of the program, so it is advisable to use them sparingly
5341and only when absolutely necessary.
5342
5343This instruction can also be used within a copper list.
5344
5345@italian
5346
5347''NOP'' è l'abbreviazione di "No OPeration" ed è un'istruzione molto speciale:
5348genera un'istruzione equivalente nei linguaggi assembly che
5349non esegue alcuna operazione utile, ovvero non modifica lo
5350stato del processore o i dati in memoria.
5351
5352Inserendo una sequenza di istruzioni ''NOP'', puoi creare un ritardo temporizzato all'interno del tuo programma. Questo può essere utile, ad esempio, per sincronizzare
5353diverse azioni o per creare effetti di animazione. In alcuni casi, è necessario
5354allineare il codice a determinate posizioni di memoria. Inserendo istruzioni ''NOP'',
5355puoi "riempire" lo spazio mancante e garantire un allineamento corretto. Le istruzioni NOP
5356possono essere utilizzate per inserire "segnaposto" nel codice, semplificando il debug e il test.
5357
5358Quando il programma incontra un'istruzione ''NOP'', incrementa semplicemente
5359il contatore del programma (PC) all'istruzione successiva, senza eseguire alcuna operazione sui dati. In effetti, il processore "perde tempo" eseguendo questa istruzione vuota.
5360
5361È importante notare che un uso eccessivo di istruzioni NOP può rallentare
5362l'esecuzione del programma, quindi è consigliabile usarle con parsimonia
5363e solo quando assolutamente necessario.
5364
5365Questa istruzione si può utilizzare anche all'interno di una copper list.
5366
5367@syntax NOP
5368
5369@example IF tooEarly THEN
5370@example NOP: NOP: NOP: NOP: NOP
5371@example ENDIF
5372
5373</usermanual> */
5374
5375
5376/* <usermanual>
5377@keyword NOTE (constant)
5378
5379@english
5380
5381The keyword ''NOTE'' allows you to indicate a note on the musical scale.
5382The syntax must indicate the note, any variations and the reference octave.
5383If the octave is omitted, octave no. 4 (the fifth octave) is understood.
5384
5385@italian
5386
5387La parola chiave ''NOTE'' permette di indicare una nota sulla scala musicale.
5388La sintassi deve indicare la nota, eventuali variazioni e l'ottava di
5389riferimento. Se l'ottava viene omessa, si intende l'ottava nr. 4
5390(la quinta ottava).
5391
5392@syntax NOTE note [#] [octave]
5393@syntax note: C|D|E|F|G|A|B
5394
5395@example SOUND NOTE C#3, 200
5396
5397</usermanual> */
5398
5399/* <usermanual>
5400@keyword NTSC (constant)
5401
5402@english
5403
5404The keyword ''NTSC'' allows you to know if the target is running
5405with a video chipset that supports NTSC standard.
5406
5407@italian
5408
5409La parola chiave ''NTSC'' consente di sapere se il target è in
5410 esecuzione con un chipset video che supporta lo standard NTSC.
5411
5412@syntax = NTSC
5413
5414@example IF NTSC THEN
5415@example PRINT "I am using the NTSC video standard!"
5416@example ENDIF
5417
5418</usermanual> */
5419
5420/* <usermanual>
5421@keyword PAGE A (constant)
5422
5423@english
5424
5425This constant can be used to identify the first of two
5426buffers in a double buffering screen.
5427
5428@italian
5429
5430Questa costante può essere utilizzata per identificare il
5431primo dei due buffer di uno schermo con doppio buffering.
5432
5433@syntax = PAGE A
5434
5435@example IF SCREEN PAGE = PAGE A THEN
5436@example PRINT "I am showing the page A!"
5437@example ENDIF
5438
5439@alias PAGE 0
5440</usermanual> */
5441
5442/* <usermanual>
5443@keyword PAGE 0 (constant)
5444
5445@english
5446
5447@italian
5448
5449@syntax = PAGE 0
5450
5451@example IF SCREEN PAGE = PAGE 0 THEN
5452@example PRINT "I am showing the page 0!"
5453@example ENDIF
5454
5455@alias PAGE A
5456
5457</usermanual> */
5458
5459/* <usermanual>
5460@keyword PAGE A (constant)
5461
5462@english
5463
5464This constant can be used to identify the second of two
5465buffers in a double buffering screen.
5466
5467@italian
5468
5469Questa costante può essere utilizzata per identificare il
5470secondo dei due buffer di uno schermo con doppio buffering.
5471
5472@syntax = PAGE B
5473
5474@example IF SCREEN PAGE = PAGE B THEN
5475@example PRINT "I am showing the page B!"
5476@example ENDIF
5477
5478@alias PAGE 1
5479</usermanual> */
5480
5481/* <usermanual>
5482@keyword PAGE 1 (constant)
5483
5484@english
5485
5486@italian
5487
5488@syntax = PAGE 1
5489
5490@example IF SCREEN PAGE = PAGE 1 THEN
5491@example PRINT "I am showing the page 1!"
5492@example ENDIF
5493
5494@alias PAGE B
5495
5496</usermanual> */
5497
5498/* <usermanual>
5499@keyword PAL (constant)
5500
5501@english
5502
5503The keyword ''PAL'' allows you to know if the target is running
5504with a video chipset that supports PAL standard.
5505
5506@italian
5507
5508La parola chiave ''PAL'' consente di sapere se il target è in
5509esecuzione con un chipset video che supporta lo standard PAL.
5510
5511@syntax = PAL
5512
5513@example IF PAL THEN
5514@example PRINT "I am using the PAL video standard!"
5515@example ENDIF
5516
5517</usermanual> */
5518
5519/* <usermanual>
5520@keyword PALETTE
5521
5522@english
5523
5524The ''PALETTE'' command allows you to define and modify the range of colors that can
5525be used to draw on the screen. You can give a number for each element of the
5526palette, sequentially. Thenumber is then used to refer to the specific color
5527when drawing shapes or objects. Thanks to RGB function you can change the
5528red, green and blue value of each color in the palette, allowing you to
5529create custom color combinations, provided that the hardware allows it.
5530
5531The palette is applied immediately to all the graphic elements on the screen.
5532This allows you to define a color palette that adapts to the atmosphere
5533of the game, creating particular visual effects. It allows to
5534create transition effects between different colors, simulating for example
5535the passage of time or changes in state. Finally, it customizes the appearance
5536of the interface, making it more attractive and functional.
5537
5538The maximum number of colors that can be defined in a palette varies
5539depending on the video chipset and the mode selected.
5540
5541@italian
5542
5543Il comando ''PALETTE'' consente di definire e modificare la gamma di colori
5544che possono essere utilizzati per disegnare sullo schermo. È possibile
5545assegnare un numero a ciascun elemento della tavolozza, in sequenza.
5546Il numero viene quindi utilizzato per fare riferimento al colore specifico
5547quando si disegnano forme o oggetti. Grazie alla funzione RGB è possibile
5548modificare il valore rosso, verde e blu di ciascun colore nella tavolozza,
5549consentendo di creare combinazioni di colori personalizzate, a condizione che
5550l'hardware lo consenta.
5551
5552La tavolozza viene applicata immediatamente a tutti gli elementi grafici
5553sullo schermo. Ciò consente di definire una tavolozza di colori che si
5554adatta all'atmosfera del gioco, creando effetti visivi particolari.
5555Consente di creare effetti di transizione tra diversi colori, simulando ad
5556esempio il passare del tempo o i cambiamenti di stato. Infine, personalizza
5557l'aspetto dell'interfaccia, rendendola più accattivante e funzionale.
5558
5559Il numero massimo di colori che possono essere definiti in una tavolozza
5560varia a seconda del chipset video e della modalità selezionata.
5561
5562@syntax PALETTE c0[,c1[,c2[,...]]]
5563
5564@example PALETTE WHITE, RED, GREEN, BLUE
5565@example PALETTE RGB(0,0,0),RGB(255,0,0),RGB(255,255,255)
5566
5567@seeAlso RGB
5568@seeAlso COLOR
5569
5570</usermanual> */
5571
5572/* <usermanual>
5573@keyword PERIOD (constant)
5574
5575@english
5576
5577This constant represent the "PERIOD" key, when used as a value
5578to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
5579If the key does not exist in the corresponding target, the
5580value will be zero.
5581
5582@italian
5583
5584Questa costante rappresenta il tasto "punto", quando
5585viene utilizzata come valore da confrontare con ''SCANCODE'',
5586''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
5587target corrispondente, il valore sarà zero.
5588
5589@syntax = PERIOD
5590
5591@example IF KEY STATE(KEY PERIOD) THEN
5592@example PRINT "PERIOD has been pressed!"
5593@example ENDIF
5594
5595</usermanual> */
5596
5597/* <usermanual>
5598@keyword PI (constant)
5599
5600@english
5601
5602The ''PI'' constant is a mathematical constant that indicates the
5603ratio of the circumference of a circle to its diameter. The value
5604of ''PI'' is approximately 3.14159. It is a fundamental constant
5605in many geometric and trigonometric calculations.
5606
5607@italian
5608
5609The ''PI'' constant is a mathematical constant that indicates the
5610ratio of the circumference of a circle to its diameter. The value
5611of ''PI'' is approximately 3.14159. It is a fundamental constant
5612in many geometric and trigonometric calculations.
5613
5614@syntax = PI
5615
5616@example c = PI * 2 * r
5617
5618</usermanual> */
5619
5620/* <usermanual>
5621@keyword PLUS (constant)
5622
5623@english
5624
5625This constant represent the "PLUS" key, when used as a value
5626to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
5627If the key does not exist in the corresponding target, the
5628value will be zero.
5629
5630@italian
5631
5632Questa costante rappresenta il tasto "più", quando
5633viene utilizzata come valore da confrontare con ''SCANCODE'',
5634''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
5635target corrispondente, il valore sarà zero.
5636
5637@syntax = PLUS
5638
5639@example IF KEY STATE(KEY PLUS) THEN
5640@example PRINT "PLUS has been pressed!"
5641@example ENDIF
5642
5643</usermanual> */
5644
5645/* <usermanual>
5646@keyword POLYLINE
5647
5648@english
5649
5650The ''POLYLINE'' command allows you to draw a
5651certain number of concatenated lines.
5652
5653@italian
5654
5655Il comando ''POLYLINE'' permette di disegnare
5656un certo numero di linee concatenate.
5657
5658@syntax POLYLINE [[x1],[y1]] TO x2, y2 [TO x3,y3 [TO x4,y4]]...
5659
5660@example POLYLINE 10,10 TO 20,10 TO 20,20 TO 10,20 TO 10,10
5661
5662</usermanual> */
5663
5664/* <usermanual>
5665@keyword POSITION (data type)
5666
5667@english
5668
5669The ''POSITION'' is a data type that represent a coordinate into the video chipset.
5670So, it should be used where you are working with coordinates. For example,
5671to draw a point, a line, or to draw an entire frame, it is advisable to use this
5672data type that is sized appropriately to the target you are working on.
5673
5674In general, the ''POSITION'' type is usually a ''SIGNED WORD'', so it can range from
5675-32767 to 32767. In some specific cases it may be more efficient to work directly
5676with the single ''BYTE'', where the coordinate extension does not exceed the value
5677of 255 (and there are no negative coordinates).
5678
5679@italian
5680
5681''POSITION'' è un tipo di dati che rappresenta una coordinata nel chipset video.
5682In generale, il tipo ''POSITION'' dovrebbe essere utilizzato quando si lavora
5683con le coordinate. Ad esempio, per disegnare un punto, una linea o un intero
5684frame, è consigliabile utilizzare questo tipo di dati che è dimensionato in
5685modo appropriato per il target su cui si sta lavorando. In generale, il tipo
5686''POSITION'' è solitamente una SIGNED WORD, quindi può variare da -32767
5687a 32767. In alcuni casi specifici potrebbe essere più efficiente lavorare
5688direttamente con il singolo byte, dove l'estensione delle coordinate non supera
5689il valore di 255 (e non ci sono coordinate negative).
5690
5691@syntax ... AS POSITION
5692
5693@example DIM x AS POSITION
5694
5695</usermanual> */
5696
5697/* <usermanual>
5698@keyword POUND (constant)
5699
5700@english
5701
5702This constant represent the "POUND" key, when used as a value
5703to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
5704If the key does not exist in the corresponding target, the
5705value will be zero.
5706
5707@italian
5708
5709Questa costante rappresenta il tasto "sterlina", quando
5710viene utilizzata come valore da confrontare con ''SCANCODE'',
5711''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
5712target corrispondente, il valore sarà zero.
5713
5714@syntax = POUND
5715
5716@example IF KEY STATE(KEY POUND) THEN
5717@example PRINT "POUND has been pressed!"
5718@example ENDIF
5719
5720</usermanual> */
5721
5722/* <usermanual>
5723@keyword RETURN (constant)
5724
5725@english
5726
5727This constant represent the "RETURN" key, when used as a value
5728to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
5729If the key does not exist in the corresponding target, the
5730value will be zero.
5731
5732@italian
5733
5734Questa costante rappresenta il tasto "RETURN", quando
5735viene utilizzata come valore da confrontare con ''SCANCODE'',
5736''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
5737target corrispondente, il valore sarà zero.
5738
5739@syntax = RETURN
5740
5741@example IF KEY STATE(KEY RETURN) THEN
5742@example PRINT "RETURN has been pressed!"
5743@example ENDIF
5744
5745</usermanual> */
5746
5747/* <usermanual>
5748@keyword RIGHT SHIFT (constant)
5749
5750@english
5751
5752This constant represent the right "SHIFT" key, when used as bitmask
5753for ''KEY SHIFT'' instruction.
5754
5755@italian
5756
5757Questa costante rappresenta il tasto destro "SHIFT", quando utilizzato
5758come maschera di bit per l'istruzione ''KEY SHIFT''.
5759
5760@syntax = RIGHT SHIFT
5761
5762@example IF KEY SHIFT AND RIGHT SHIFT THEN
5763@example PRINT "RIGHT SHIFT has been pressed!"
5764@example ENDIF
5765
5766@alias SHIFT RIGHT (constant)
5767
5768</usermanual> */
5769
5770/* <usermanual>
5771@keyword SHIFT RIGHT (constant)
5772
5773@english
5774
5775This constant represent the right "SHIFT" key, when used as bitmask
5776for ''KEY SHIFT'' instruction.
5777
5778@italian
5779
5780Questa costante rappresenta il tasto destro "SHIFT", quando utilizzato
5781come maschera di bit per l'istruzione ''KEY SHIFT''.
5782
5783@syntax = SHIFT RIGHT
5784
5785@alias RIGHT SHIFT (constant)
5786
5787</usermanual> */
5788
5789/* <usermanual>
5790@keyword ROWS (constant)
5791
5792@english
5793
5794This constant gives you the number of rows of the actual console.
5795
5796@italian
5797
5798Questa costante fornisce il numero effettivo di righe della console attiva.
5799
5800@syntax = ROWS
5801@seeAlso SCREEN ROWS (constant)
5802
5803</usermanual> */
5804
5805/* <usermanual>
5806@keyword RUN STOP (constant)
5807
5808@english
5809
5810This constant represent the "RUN STOP" key, when used as a value
5811to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
5812If the key does not exist in the corresponding target, the
5813value will be zero.
5814
5815@italian
5816
5817Questa costante rappresenta il tasto "RUN STOP", quando
5818viene utilizzata come valore da confrontare con ''SCANCODE'',
5819''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
5820target corrispondente, il valore sarà zero.
5821
5822@syntax = RUN STOP
5823
5824@alias RUNSTOP (constant)
5825
5826</usermanual> */
5827
5828/* <usermanual>
5829@keyword RUNSTOP (constant)
5830
5831@english
5832
5833This constant represent the "RUNSTOP" key, when used as a value
5834to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
5835If the key does not exist in the corresponding target, the
5836value will be zero.
5837
5838@italian
5839
5840Questa costante rappresenta il tasto "RUNSTOP", quando
5841viene utilizzata come valore da confrontare con ''SCANCODE'',
5842''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
5843target corrispondente, il valore sarà zero.
5844
5845@syntax = RUNSTOP
5846
5847alias RUN STOP (constant)
5848
5849</usermanual> */
5850
5851/* <usermanual>
5852@keyword SEQUENCE (data type)
5853
5854@english
5855
5856The ''SEQUENCE'' data type maintains a reference to the collection of strips of images that
5857can be used to draw them on the screen.
5858
5859@italian
5860
5861Il tipo di dato ''SEQUENCE'' mantiene un riferimento alla collezione di pose di immagini
5862che può essere usata per disegnarle sullo schermo.
5863
5864@syntax ... AS SEQUENCE
5865
5866@target all
5867</usermanual> */
5868
5869/* <usermanual>
5870@keyword SET LINE
5871
5872@english
5873
5874The ''SET LINE'' statement changes the pattern used to draw lines.
5875
5876@italian
5877
5878L'istruzione ''SET LINE'' modifica il pattern utilizzato per disegnare le linee.
5879
5880@syntax SET LINE pattern
5881
5882@example SET LINE %1010101010101010
5883
5884</usermanual> */
5885
5886/* <usermanual>
5887@keyword SLASH (constant)
5888
5889@english
5890
5891This constant represent the "SLASH" key, when used as a value
5892to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
5893If the key does not exist in the corresponding target, the
5894value will be zero.
5895
5896@italian
5897
5898Questa costante rappresenta il tasto "BARRA IN AVANTI", quando
5899viene utilizzata come valore da confrontare con ''SCANCODE'',
5900''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
5901target corrispondente, il valore sarà zero.
5902
5903@syntax = SLASH
5904
5905@example IF SCANCODE = KEY SLASH THEN
5906@example PRINT "SLASH has been pressed!"
5907@example ENDIF
5908
5909</usermanual> */
5910
5911/* <usermanual>
5912@keyword SPACE (constant)
5913
5914@english
5915
5916This constant represent the "SPACE" key, when used as a value
5917to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
5918If the key does not exist in the corresponding target, the
5919value will be zero.
5920
5921@italian
5922
5923Questa costante rappresenta il tasto "BARRA SPAZIATRICE", quando
5924viene utilizzata come valore da confrontare con ''SCANCODE'',
5925''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
5926target corrispondente, il valore sarà zero.
5927
5928@syntax = SPACE
5929
5930@example IF SCANCODE = KEY SPACE THEN
5931@example PRINT "SPACE has been pressed!"
5932@example ENDIF
5933
5934</usermanual> */
5935
5936/* <usermanual>
5937@keyword STRING (data type)
5938
5939@english
5940
5941The ''STRING'' data type maintains a reference to a static or dynamic string.
5942
5943@italian
5944
5945Il tipo di dati ''STRING'' mantiene un riferimento a una stringa statica o dinamica.
5946
5947@syntax ... AS STRING
5948
5949</usermanual> */
5950
5951/* <usermanual>
5952@keyword TAB (constant)
5953
5954@english
5955
5956This constant represent the "TAB" key, when used as a value
5957to compare with ''SCANCODE'',''KEY STATE'' and ''KEY PRESSED''.
5958If the key does not exist in the corresponding target, the
5959value will be zero.
5960
5961@italian
5962
5963Questa costante rappresenta il tasto "TABULAZIONE", quando
5964viene utilizzata come valore da confrontare con ''SCANCODE'',
5965''KEY STATE'' and ''KEY PRESSED''. Se il tasto non esiste nel
5966target corrispondente, il valore sarà zero.
5967
5968@syntax = TAB
5969
5970@example IF SCANCODE = KEY TAB THEN
5971@example PRINT "TAB has been pressed!"
5972@example ENDIF
5973
5974</usermanual> */
5975
5976/* <usermanual>
5977@keyword THREAD (data type)
5978
5979@english
5980
5981The ''THREAD'' data type holds a reference to a thread created with
5982''SPAWN'' command.
5983
5984@italian
5985
5986Il tipo di dati ''THREAD'' contiene un riferimento a un thread
5987creato con il comando ''SPAWN''.
5988
5989@syntax ... AS THREAD
5990
5991@alias TASK
5992
5993</usermanual> */
5994
5995/* <usermanual>
5996@keyword TASK (data type)
5997
5998@english
5999
6000The ''TASK'' data type holds a reference to a thread created with
6001''SPAWN'' command.
6002
6003@italian
6004
6005Il tipo di dati ''TASK'' contiene un riferimento a un thread
6006creato con il comando ''SPAWN''.
6007
6008@syntax ... AS TASK
6009
6010@alias THREAD
6011
6012</usermanual> */
6013
6014/* <usermanual>
6015@keyword TICK PER SECOND
6016
6017@english
6018
6019This constant holds the number of ticks that occur each second.
6020
6021@italian
6022
6023Questa costante mantiene il numero di tick che avvengono ad ogni secondo.
6024
6025@syntax = TICK PER SECOND
6026
6027</usermanual> */
6028
6029/* <usermanual>
6030@keyword VOLUME MIN (constant)
6031
6032@english
6033
6034Minimum value usable for audio volume.
6035
6036@italian
6037
6038Valore minimo utilizzabile per il volume audio.
6039
6040@syntax = VOLUME MIN
6041
6042</usermanual> */
6043
6044/* <usermanual>
6045@keyword VOLUME MAX (constant)
6046
6047@english
6048
6049Maximum value usable for audio volume.
6050
6051@italian
6052
6053Valore massimo utilizzabile per il volume audio.
6054
6055@syntax = VOLUME MAX
6056
6057</usermanual> */
6058
6059/* <usermanual>
6060@keyword XCURS
6061
6062@english
6063
6064Returns the X value of the cursor position.
6065
6066@italian
6067
6068Restituisci la posizione orizzontale del cursore.
6069
6070@syntax = XCURS
6071
6072@alias X CURS
6073</usermanual> */
6074
6075/* <usermanual>
6076@keyword X CURS
6077
6078@english
6079
6080@italian
6081
6082@syntax = X CURS
6083
6084@alias XCURS
6085</usermanual> */
6086
6087/* <usermanual>
6088@keyword YCURS
6089
6090@english
6091
6092Returns the Y value of the cursor position.
6093
6094@italian
6095
6096Restituisci la posizione verticale del cursore.
6097
6098@syntax = YCURS
6099
6100@alias Y CURS
6101</usermanual> */
6102
6103/* <usermanual>
6104@keyword Y CURS
6105
6106@english
6107
6108@italian
6109
6110@syntax = Y CURS
6111
6112@alias YCURS
6113</usermanual> */
6114
6115
6116/* <usermanual>
6117@keyword XGR
6118
6119@english
6120
6121Returns the X value of the last graphical position.
6122
6123@italian
6124
6125Restituisci la posizione orizzontale dell'ultima posizione grafica.
6126
6127@syntax = XGR
6128
6129</usermanual> */
6130
6131/* <usermanual>
6132@keyword YGR
6133
6134@english
6135
6136Returns the Y value of the last graphical position.
6137
6138@italian
6139
6140Restituisci la posizione verticale dell'ultima posizione grafica.
6141
6142@syntax = YGR
6143
6144</usermanual> */
6145
6146/* <usermanual>
6147@keyword IMAGEREF (data type)
6148
6149@english
6150
6151The ''IMAGEREF'' data type maintains a (dynamic) reference to ''IMAGE'',
6152''ATLAS'' or ''SEQUENCE'', that can be used to draw any image to the screen.
6153
6154@italian
6155
6156Il tipo di dati ''IMAGEREF'' mantiene un riferimento (dinamico) a ''IMAGE'',
6157''ATLAS'' o ''SEQUENCE'', che può essere utilizzato per disegnare qualsiasi
6158immagine sullo schermo.
6159
6160@syntax ... AS IMAGEREF
6161
6162</usermanual> */
6163
6164/* <usermanual>
6165@keyword RANDOM WIDTH
6166
6167@english
6168
6169This instruction allows you to get a random number between 0 and the current width of the screen
6170(intended as ''SCREEN WIDTH'') minus one. It is particularly useful for positioning pixels or
6171graphic elements, randomly, on the screen.
6172
6173@italian
6174
6175Questa istruzione permette di ottenere un numero casuale compreso tra 0 e la larghezza attuale
6176dello schermo (intesa come ''SCREEN WIDTH'') meno uno. E' particolarmente utile per posizionare
6177pixel o elementi grafici, in modo casuale, sullo schermo.
6178
6179@syntax = RANDOM WIDTH
6180
6181@example POINT AT (RANDOM WIDTH, RANDOM HEIGHT)
6182
6183@seeAlso RANDOM HEIGHT
6184@seeAlso RANDOMIZE
6185
6186@target all
6187</usermanual> */
6188
6189/* <usermanual>
6190@keyword RANDOM HEIGHT
6191
6192@english
6193
6194This instruction allows you to get a random number between 0 and the current height of the screen
6195(intended as ''SCREEN HEIGHT'') minus one. It is particularly useful for positioning pixels or
6196graphic elements, randomly, on the screen.
6197
6198@italian
6199
6200Questa istruzione permette di ottenere un numero casuale compreso tra 0 e la larghezza attuale
6201dello schermo (intesa come ''SCREEN HEIGHT'') meno uno. E' particolarmente utile per posizionare
6202pixel o elementi grafici, in modo casuale, sullo schermo.
6203
6204@syntax = RANDOM HEIGHT
6205
6206@example POINT AT (RANDOM WIDTH, RANDOM HEIGHT)
6207
6208@seeAlso RANDOM WIDTH
6209@seeAlso RANDOMIZE
6210
6211@target all
6212</usermanual> */
6213
6214/* <usermanual>
6215@keyword BLIT (instruction)
6216
6217@english
6218
6219The “BLITTING” is a data operation used in computer graphics in which several bitmaps
6220are combined into one using a boolean (or mathematical) function. The operation involves
6221at least two bitmaps: a “source” (or “foreground”) and a “destination” (or “background”),
6222and other fields, called “masks” or something like that. The result may be written to a
6223final bitmap, though often it replaces the “destination” field.
6224
6225The pixels of each are combined bitwise according to the specified BLIT OPERATION (BOP)
6226and the result is then written to the destination. The BOP is essentially a boolean
6227formula, that can be written using ''BLIT'' instructrion. The most obvious BOP overwrites
6228the destination with the source. Other BOPs may involve ''AND'', ''OR'', ''XOR'', and
6229other more complex operations.
6230
6231@italian
6232Il “BLITTING” è un'operazione di dati utilizzata nella computer grafica in cui diverse
6233bitmap vengono combinate in una utilizzando una funzione booleana (o matematica).
6234L'operazione coinvolge almeno due bitmap: una “sorgente” (o “primo piano”) e una
6235“destinazione” (o “sfondo”), e altri campi, chiamati “maschere” o qualcosa del genere.
6236Il risultato può essere scritto su una bitmap finale, anche se spesso sostituisce il
6237campo “destinazione”.
6238
6239I pixel di ciascuno vengono combinati bit per bit in base all'OPERAZIONE BLIT (BOP)
6240specificata e il risultato viene quindi scritto nella destinazione. Il BOP è
6241essenzialmente una formula booleana, che può essere scritta utilizzando l'istruzione
6242''BLIT''. Il BOP più ovvio sovrascrive la destinazione con la sorgente. Altri BOP
6243possono comportare ''AND'', ''OR'', ''XOR'' e altre operazioni più complesse.
6244
6245@syntax BLIT identifier AS expression
6246
6247@example BLIT bop1 AS ( ( SOURCE ) AND ( DESTINATION ) )
6248
6249@usedInExample blit_basic_mask.bas
6250
6251@seeAlso BLIT (data type)
6252@seeAlso BLIT IMAGE
6253
6254@target all
6255@ntarget gb
6256</usermanual> */
6257
6258/* <usermanual>
6259@keyword BLIT IMAGE
6260
6261@english
6262
6263The “BLITTING” is a data operation used in computer graphics in which several bitmaps
6264are combined into one using a boolean (or mathematical) function. The operation involves
6265at least two bitmaps: a “source” (or “foreground”) and a “destination” (or “background”),
6266and other fields, called “masks” or something like that. The result may be written to a
6267final bitmap, though often it replaces the “destination” field.
6268
6269To draw, the BLIT IMAGE(S) command will be used. The syntax of this command will be
6270identical to that of ''PUT IMAGE'' (therefore with management of images and sequences),
6271with two main differences. The first is the ability to indicate multiple images
6272(separated from each other by a comma) and the second is to be able to indicate
6273which blitting operation you want to use.
6274
6275@italian
6276Il “BLITTING” è un'operazione di dati utilizzata nella computer grafica in cui diverse
6277bitmap vengono combinate in una utilizzando una funzione booleana (o matematica).
6278L'operazione coinvolge almeno due bitmap: una “sorgente” (o “primo piano”) e una
6279“destinazione” (o “sfondo”), e altri campi, chiamati “maschere” o qualcosa del genere.
6280Il risultato può essere scritto su una bitmap finale, anche se spesso sostituisce il
6281campo “destinazione”.
6282
6283Per disegnare, verrà utilizzato il comando BLIT IMAGE(S). La sintassi di questo comando
6284sarà identica a quella di ''PUT IMAGE'' (quindi con gestione di immagini e sequenze),
6285con due differenze principali. La prima è la possibilità di indicare più immagini
6286(separate tra loro da una virgola) e la seconda è quella di poter indicare quale operazione
6287di blitting si vuole utilizzare.
6288
6289@syntax BLIT IMAGE i1, i2, ... AT [x], [y] WITH b
6290@syntax BLIT IMAGE i1, i2, ... FRAME frame AT [x], [y] WITH b
6291@syntax BLIT IMAGE i1, i2, ... STRIP s FRAME f AT [x], [y] WITH b
6292
6293@example BLIT IMAGE test AT 0, 0 WITH bop
6294
6295@usedInExample blit_basic_mask.bas
6296
6297@seeAlso BLIT (data type)
6298@seeAlso BLIT (instruction)
6299
6300@target all
6301@ntarget gb
6302</usermanual> */
6303
6304/* <usermanual>
6305@keyword JOYDIR
6306
6307@english
6308Read a single direction from the joystick port. Note that only one direction
6309is read at a time. This means, for example, that if the joystick is moved in the
6310up and right direction, only the up value will be returned.
6311
6312@italian
6313Leggi il valore di un singolo valore dalla porta joystick. Da notare che viene letta
6314una sola direzione alla volta. Questo significa, ad esempio, che se viene mosso il
6315joystick nella direzione su e destra, verrà restituito solo il valore su.
6316
6317@syntax = JOYDIR( port )
6318
6319@example x = JOYDIR(0)
6320
6321@target all
6322</usermanual> */
6323
6324/* <usermanual>
6325@keyword SCALE
6326
6327@english
6328The ''SCALE'' keyword allows you to scale the horizontal and vertical coordinates
6329before they are used for drawing. For speed reasons, scaling is done by applying
6330a multiplication factor as a power of two:
6331
6332 - 0 means x1;
6333
6334 - 1 means x2;
6335
6336 - 2 means x4;
6337
6338and so on. The scaling is done when drawing the point on the screen, and not when
6339calculating the actual
6340coordinates. This means that the images will be subject to a "scanline" effect,
6341since the number of points drawn will remain the same. To apply a scale that respects
6342the number of points to be drawn, it is advisable to use the ''RESOLUTION'' command.
6343
6344@italian
6345La parola chiave ''SCALE'' permette di apportare una scalatura alle coordinate
6346orizzontali e verticali prima che le stesse vengano usate per disegnare. Per ragioni
6347di velocità, la scalatura avviene applicando un fattore moltiplicativo come potenza
6348di due, quindi x2, x4 e così via. Inoltre, la scalatura avviene al momento di disegnare
6349il punto sullo schermo e non, quindi, al momento di calcolare le coordinate effettive.
6350Questo comporta che le immagini saranno oggetto di un effetto di "scanline", dato che
6351il numero di punti disegnati rimarrà lo stesso. Per applicare una scalatura rispettosa
6352del numero di punti da disegnare, è opportuno usare il comando ''RESOLUTION''.
6353
6354@syntax SCALE w, h
6355
6356@example SCALE 1, 0
6357
6358@seeAlso RESOLUTION
6359
6360@target all
6361</usermanual> */
6362
6363/* <usermanual>
6364@keyword OFFSET
6365
6366@english
6367The ''OFFSET'' keyword allows you to apply an offset on the horizontal and vertical
6368 coordinates, before they are used for drawing. For speed reasons, the offset is
6369 performed when the point is drawn on the screen and not when the actual coordinates
6370 are calculated. To apply an offset that respects the coordinate system, it is
6371 recommended to use the ''ORIGIN'' command.
6372
6373@italian
6374La parola chiave ''OFFSET'' consente di applicare uno scostamento sulle coordinate orizzontali
6375e verticali, prima che vengano utilizzate per il disegno. Per motivi di velocità,
6376l'offset viene eseguito quando si disegna il punto sullo schermo e non quando si calcolano le
6377coordinate effettive. Per applicare uno scostamento che rispetti il sistema di cordinate,
6378è consigliabile utilizzare il comando ''ORIGIN''.
6379
6380@syntax OFFSET dx, dy
6381
6382@example OFFSET 10, 10
6383
6384@seeAlso ORIGIN
6385
6386@target all
6387</usermanual> */
6388
6389/* <usermanual>
6390@keyword SLEEP
6391
6392@english
6393
6394Pauses execution for a certain number of seconds. The pause is of the "busy" type,
6395so the entire program is suspended, except for the timer-related mechanisms.
6396The multhtireading mechanism, instead, will continue to run. Note that the maximum
6397duration you can expect is about 65 seconds.
6398
6399@italian
6400
6401Mette in pausa l'esecuzione per un certo numero di secondi. La pausa è di tipo "busy",
6402quindi l'intero programma viene sospeso, ad eccezione dei meccanismi correlati al timer.
6403Il multitasking, invece, continuerà a funzionare. Nota che la durata massima è di
6404circa 65 secondi.
6405
6406@syntax SLEEP seconds
6407
6408@example SLEEP 10
6409
6410@seeAlso WAIT
6411
6412@target all
6413</usermanual> */
6414
6415/* <usermanual>
6416@keyword FIND WIDTH
6417
6418@english
6419
6420This function calculates the width of a rectangle that fits on the screen at the
6421current resolution, taking into account that a certain ''number'' of rectangles fit on the
6422same line, and ensuring a bilateral ''offset'' of a certain number of pixels in total.
6423The number is rounded to the nearest 8 pixels. Offset can be omitted, and it will be
6424considered as zero (0).
6425
6426@italian
6427
6428Questa funzione calcola la larghezza di un rettangolo che sia iscritto nello schermo
6429della risoluzione attuale, tenendo conto di inserire un certo numero di rettangoli sulla
6430stessa linea, e garantendo un offset bilaterale di un certo numero di pixel. Il numero è
6431arrotondato al limite di 8 pixel più vicino. Il campo offset può essere omesso, e sarà
6432considerato come zero (0).
6433
6434@syntax FIND WIDTH( number[, offset] )
6435
6436@example x = FIND WIDTH( 7, 16 )
6437
6438@seeAlso FIND HEIGHT
6439
6440@alias FWIDTH
6441
6442@target all
6443</usermanual> */
6444
6445/* <usermanual>
6446@keyword FWIDTH
6447
6448@english
6449
6450@italian
6451
6452@alias FIND WIDTH
6453
6454@target all
6455</usermanual> */
6456
6457/* <usermanual>
6458@keyword FIND HEIGHT
6459
6460@english
6461
6462This function calculates the height of a rectangle that fits on the screen at the
6463current resolution, taking into account that a certain ''number'' of rectangles fit on the
6464same column, and ensuring a bilateral ''offset'' of a certain number of pixels in total.
6465The number is rounded to the nearest 8 pixels. Offset can be omitted, and it will be
6466considered as zero (0).
6467
6468@italian
6469
6470Questa funzione calcola l'altezza di un rettangolo che sia iscritto nello schermo
6471della risoluzione attuale, tenendo conto di inserire un certo numero di rettangoli sulla
6472stessa colonna, e garantendo un offset bilaterale di un certo numero di pixel. Il numero è
6473arrotondato al limite di 8 pixel più vicino. Il campo offset può essere omesso, e sarà
6474considerato come zero (0).
6475
6476@syntax FIND HEIGHT( number[, offset] )
6477
6478@example x = FIND HEIGHT( 7, 16 )
6479
6480@seeAlso FIND HEIGHT
6481
6482@alias FHEIGHT
6483
6484@target all
6485</usermanual> */
6486
6487/* <usermanual>
6488@keyword FHEIGHT
6489
6490@english
6491
6492@italian
6493
6494@alias FIND HEIGHT
6495
6496@target all
6497</usermanual> */
6498
6499/* <usermanual>
6500@keyword FUNCTION
6501
6502@english
6503
6504The ''FUNCTION'' command is an instruction that allows you to define custom functions within
6505a program. These functions can be called multiple times, simplifying the code and making it
6506more modular. The syntax accepts a ''name'', one or more ''parameters'', followed by
6507an equal sign and from an expression. Functions are limited to a single
6508expression, but parameters are local or global to the function, following the current context.
6509
6510The use of this instruction can avoid repeating the same calculation multiple times, the code
6511becomes more organized and easier to read and complex functions can be created with a single
6512line of code.
6513
6514@italian
6515Il comando ''FUNCTION'' è un'istruzione che consente di definire funzioni personalizzate all'interno
6516del programma. Queste funzioni possono essere chiamate più volte, semplificando il codice e rendendolo
6517più modulare. La sintassi accetta un ''nome'', uno o più ''parametri'', seguiti da
6518un segno di uguale e da un'espressione tra parentesi quadre. Le funzioni sono limitate a una singola
6519espressione, ma i parametri sono locali o globali alla funzione, seguendo il contesto corrente.
6520
6521L'uso di questa istruzione può evitare di ripetere lo stesso calcolo più volte, il codice
6522diventa più organizzato e più facile da leggere e funzioni complesse possono essere create con una singola
6523riga di codice.
6524
6525@syntax FUNCTION name[parameters] = [expression]
6526@example FUNCTION pow2[a] = a*a
6527
6528</usermanual> */
6529
6530/* <usermanual>
6531@keyword PLOTR
6532
6533@english
6534
6535The ''PLOTR'' command allows you to draw individual points on the screen, behaving
6536very similarly to the ''PLOT'' command. The difference is that ''PLOTR'' draws the
6537point starting from the last stored position. So the origin of the point does not
6538coincide with the origin of the screen. If the color is not provided, the default
6539color is the one set with the last ''INK'' / ''PEN'' command.
6540
6541@italian
6542
6543Il comando ''PLOTR'' consente di disegnare singoli punti sullo schermo, comportandosi
6544in modo molto simile al comando ''PLOT''. La differenza è che ''PLOTR'' disegna il
6545punto a partire dall'ultima posizione memorizzata. Quindi l'origine del punto non
6546coincide con l'origine dello schermo. Se il colore non viene fornito, il colore
6547predefinito è quello impostato con l'ultimo comando ''INK'' / ''PEN''.
6548
6549@syntax PLOTR x, y[, color]
6550
6551@example PLOTR 1,1
6552
6553@target atari
6554@target atarixl
6555@target c128
6556@target c128z
6557@target c16
6558@target c64
6559@target c64reu
6560@target coco
6561@target coco3
6562@target coleco
6563@target cpc
6564@target d32
6565@target d64
6566@target mo5
6567@target msx1
6568@target pc128op
6569@target plus4
6570@target sc3000
6571@target to8
6572@target zx
6573</usermanual> */
6574
6575/* <usermanual>
6576@keyword SCREEN (function)
6577
6578@english
6579
6580The ''SCREEN'' function allows you to know the contents of the text memory,
6581given the coordinates. There are two versions of this function: one without
6582the dollar symbol, which returns a ''BYTE'' with the value, and one with the
6583dollar symbol, which returns a string with that value. Note that this function
6584will always return zero if it is used in a target that does not have a text
6585mode, and an unspecified value, if you are operating in a graphics mode.
6586
6587@italian
6588
6589La funzione ''SCREEN'' consente di conoscere il contenuto della memoria testuale,
6590date le coordinate. Di questa funzione esistono due versioni: quella senza il
6591simbolo del dollaro, che restituisce un ''BYTE'' con il valore, e quella con il
6592simbolo del dollaro, che restituisce una stringa avente quel valore. Da notare che
6593questa funzione ritornerà sempre zero se viene usata in un target che non dispone
6594di una modalità testuale, e un valore non precisato, se si sta operando con una
6595modalità grafica.
6596
6597@syntax = SCREEN(x,y)
6598@syntax = SCREEN$(x,y)
6599
6600@example PRINT SCREEN(10,10)
6601
6602</usermanual> */
6603
6604/* <usermanual>
6605@keyword VECTOR (data type)
6606
6607@english
6608
6609The ''VECTOR'' datatype represents a two-dimensional geometric vector, i.e.
6610an oriented segment that represents a quantity with: module (or magnitude),
6611as the length of the segment, which indicates the magnitude of the quantity;
6612direction: the line on which the segment lies, i.e. the orientation of the
6613segment on the line.
6614
6615In a Cartesian coordinate system, a two-dimensional vector is defined by a
6616pair of numbers (x, y), which represent its components along the x and y axes.
6617These components can be viewed as the coordinates of the vector's endpoint,
6618assuming that the initial point is the origin (0, 0).
6619
6620Given a variable of ''VECTOR'' data type, you can access to coordinates
6621using the ''X()'' and ''Y()'' functions.
6622
6623Vectors can be added or subtracted, and they are performed by adding or
6624subtracting the corresponding components; you can do a scalar product,
6625where both components are multiplied by the scalar; you can do a dot
6626product, an operation that returns a number related to the angle between
6627two vectors.
6628
6629Two-dimensional geometric vectors are a fundamental tool in many areas of
6630mathematics, physics, and computer science, especially in computer graphics
6631and the simulation of physical phenomena.
6632
6633@italian
6634
6635Il tipo di dati ''VECTOR'' rappresenta un vettore geometrico bidimensionale, ovvero
6636un segmento orientato che rappresenta una quantità con: modulo (o magnitudine),
6637come lunghezza del segmento, che indica la magnitudine della quantità;
6638direzione: la linea su cui giace il segmento, ovvero l'orientamento del
6639segmento in linea.
6640
6641In un sistema di coordinate cartesiane, un vettore bidimensionale è definito da una
6642coppia di numeri (x, y), che rappresentano i suoi componenti lungo gli assi x e y.
6643Questi componenti possono essere visti come le coordinate del punto finale del vettore,
6644supponendo che il punto iniziale sia l'origine (0, 0).
6645
6646Data una variabile di tipo di dati ''VECTOR'', è possibile accedere alle coordinate
6647utilizzando le funzioni ''X()'' e ''Y()''.
6648
6649I vettori possono essere aggiunti o sottratti e vengono eseguiti aggiungendo o
6650sottraendo i componenti corrispondenti; puoi fare un prodotto scalare,
6651in cui entrambe le componenti vengono moltiplicate per lo scalare; puoi fare un prodotto scalare,
6652un'operazione che restituisce un numero correlato all'angolo tra
6653due vettori.
6654
6655I vettori geometrici bidimensionali sono uno strumento fondamentale in molti settori della
6656matematica, della fisica e dell'informatica, specialmente nella computer grafica
6657e nella simulazione di fenomeni fisici.
6658
6659@syntax DIM v AS VECTOR
6660@example PLOT X(v),Y(v), RED
6661
6662@target all
6663</usermanual> */
6664
6665/* <usermanual>
6666@keyword LET (data type)
6667
6668@english
6669
6670The ''LET'' command is a statement used to assign a value to a variable.
6671Although it is optional, and the assignment can be done simply by writing
6672''variable = value'', this command can help to produce a more optimized
6673code, since its syntax is a bit more limited. So, ''LET'' allows you to
6674store a value (numeric or text) in a memory location represented by a
6675''variable'', helping ugBASIC to retrieve it in an more optimized way.
6676
6677@italian
6678
6679Il comando ''LET'' è un'istruzione utilizzata per assegnare un valore a una variabile.
6680Sebbene sia facoltativo e l'assegnazione possa essere eseguita semplicemente scrivendo
6681''variabile = valore'', questo comando può aiutare a produrre un codice più ottimizzato,
6682poiché la sua sintassi è un po' più limitata. Quindi, ''LET'' consente di
6683memorizzare un valore (numerico o di testo) in una posizione di memoria rappresentata da una
6684''variabile'', aiutando ugBASIC a recuperarlo in modo più ottimizzato.
6685
6686@syntax LET variable = expression
6687@example LET v = t(i)
6688
6689@target all
6690</usermanual> */
6691
6692/* <usermanual>
6693@keyword BITMAPADDRESS
6694
6695@english
6696This is a variable (16 bit) that contains the actual address of the bitmap,
6697the video memory containing the bitmap data of the screen
6698in bitmap mode. It could refer to a certain position in RAM memory or in a separate
6699video memory. It depends on the computer you are programming.
6700
6701@italian
6702Questa è una variabile (16 bit) che contiene l'indirizzo effettivo della bitmap,
6703la memoria video contenente i vari pixel che compongono un disegno sullo schermo
6704in modalità bitmap. Potrebbe fare riferimento a una determinata posizione nella memoria
6705RAM o in una memoria video separata. Dipende dal computer che stai programmando.
6706
6707@syntax = BITMAPADDRESS
6708
6709@example actual = BITMAPADDRESS
6710</usermanual> */
6711
6712/* <usermanual>
6713@keyword PEN (variable)
6714
6715@english
6716
6717The ''PEN'' variable contains the current color used to draw
6718graphics or text.
6719
6720@italian
6721
6722La variable ''PEN'' contiene il colore attuale utilizzato
6723per disegnare gli elementi grafici o i testi.
6724
6725@syntax = PEN
6726
6727@example x = PEN
6728
6729@seeAlso PEN (instruction)
6730
6731@target all
6732</usermanual> */
6733
6734/* <usermanual>
6735@keyword BITMAP CLEAR
6736
6737@english
6738
6739This command is currently and alias for ''CLS''. Previously, when it
6740was not deprecated, it fills the bitmap with a certain pattern (by default is ZERO, used to indicate
6741the blank screen). The filled part is exclusively that linked to the bitmap,
6742so the color information is kept unchanged. Note that bitmap must be
6743enabled at least once with instruction ''BITMAP ENABLE''.
6744
6745@italian
6746Questo comando è un alias per ''CLS''. In precedenza, quando non era
6747ancora stato deprecato, riempiva la bitmap con un determinato motivo (per impostazione predefinita è
6748ZERO, utilizzato per indicare lo schermo vuoto). La parte riempita è
6749esclusivamente quella legata alla bitmap, quindi le informazioni sul
6750colore vengono mantenute invariate. Notare che la bitmap doveva essere
6751abilitata almeno una volta con l'istruzione ''BITMAP ENABLE''.
6752
6753@syntax BITMAP CLEAR [ WITH value ]
6754
6755@example BITMAP CLEAR
6756@example BITMAP CLEAR WITH #$42
6757
6758@seeAlso BITMAP ENABLE
6759@seeAlso CLS
6760
6761@deprecated
6762</usermanual> */
6763
6764/* <usermanual>
6765@keyword TRIANGLE
6766
6767@english
6768
6769The ''TRIANGLE'' command allows you to draw a triangle,
6770or a polygon with three vertices.
6771
6772@italian
6773
6774Il comando ''POLYLINE'' permette di disegnare un triangolo,
6775ovvero un poligono con tre vertici.
6776
6777@syntax TRIANGLE [x1],[y1] TO x2,y2 TO x3,y3
6778
6779@example TRIANGLE 10,10 TO 20,10 TO 20,20
6780
6781</usermanual> */
6782
6783/* <usermanual>
6784@keyword RESET
6785
6786@english
6787
6788The ''RESET'' command is an instruction that initiates the
6789reset or reboot process of a computer system, returning it to an
6790initial state, as if it had just been turned on. Depending on the
6791target, the command will do something different.
6792
6793@italian
6794
6795Il comando ''RESET'' è un'istruzione che avvia il processo
6796di reset o riavvio di un sistema informatico, riportandolo allo
6797stato iniziale, come se fosse appena stato acceso. A seconda del
6798target, il comando avrà un effetto diverso.
6799
6800@syntax RESET
6801
6802@example RESET
6803
6804</usermanual> */
6805
6806/* <usermanual>
6807@keyword FAST
6808
6809@english
6810
6811The ''FAST'' command (opposite of ''SLOW'') instructs the computer to dedicate
6812100% of the microprocessor's resources to executing the ugBASIC program's
6813calculations, completely suspending video signal generation or other functions
6814that are typically handled.
6815
6816In the default state (''SLOW''), and in some home computers, the CPU spends a
6817portion of its processing power generating the video and only the remainder
6818executing the program. With the ''FAST'' command, this balance was disrupted,
6819in favor of processing. In other home computers, the CPU is set to run at a
6820slower clock rate to ensure greater compatibility, and this command increases it.
6821
6822Once executed, processing speed increases. However, the screen may go black or
6823begin to flicker, and execution speed increases.
6824
6825@italian
6826
6827Il comando ''FAST'' (opposto di ''SLOW'') istruisce il computer a dedicare il 100%
6828delle risorse del microprocessore all'esecuzione dei calcoli del programma ugBASIC,
6829sospendendo completamente la generazione del segnale video, o di altre funzionalità
6830che vengono in genere gestite.
6831
6832Nello stato predefinito (''SLOW''), e in alcuni home computer, la CPU spende una
6833quota parte della sua potenza di calcolo a generare il video e solo il restante a
6834eseguire il programma. Con il comando ''FAST'', questo equilibrio veniva spezzato,
6835in favore dell'elaborazione. In altri home computer, la CPU viene fatta lavorare a
6836una frequenza di lavoro più lenta, per garantire maggiore compatibilità, e questo
6837comando l'aumenta.
6838
6839Una volta mandato in esecuzione, la velocità di elaborazione aumenta. Tuttavia,
6840lo schermo può diventare nero o iniziare a sfarfallare, e la velocità di
6841esecuzione aumenta.
6842
6843@syntax FAST
6844
6845@example FAST
6846
6847</usermanual> */
6848
6849/* <usermanual>
6850@keyword SLOW
6851
6852@english
6853
6854The ''SLOW'' command returns the computer to its standard operating mode, in
6855which the CPU divides its time between program execution and other functions,
6856such as creating video. When the computer is in ''SLOW'' mode, each second's
6857time is divided into several functions, or the CPU operates at the lowest but
6858most compatible frequency.
6859
6860@italian
6861
6862Il comando ''SLOW'' riporta il computer alla sua modalità operativa standard,
6863in cui la CPU divide il suo tempo tra l'esecuzione del programma e altre
6864funzionalità, come la creazione dell'immagine video. Quando il computer è in
6865modalità ''SLOW'', il tempo di ogni singolo secondo viene diviso in varie
6866funzionalità, oppure la CPU funziona con il regime di frequenza più basso
6867ma più compatibile.
6868
6869@syntax SLOW
6870
6871@example SLOW
6872
6873</usermanual> */
6874