-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnextbasic.json
More file actions
869 lines (867 loc) · 26.1 KB
/
nextbasic.json
File metadata and controls
869 lines (867 loc) · 26.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
[
{
"description": "Displays disk/tape catalogue",
"token": "CAT",
"syntax": "CAT"
},
{
"description": "Prepares inserted disk for usage, erasing it",
"token": "FORMAT",
"syntax": "FORMAT"
},
{
"description": "Load BASIC program from file named fn",
"token": "LOAD",
"syntax": "LOAD fn"
},
{
"modifies": "LOAD",
"description": "Load data from fn into array x()",
"token": "DATA",
"syntax": "LOAD fn DATA x()"
},
{
"modifies": "LOAD",
"description": "Load data from fn into memory at address addr",
"token": "CODE",
"syntax": "LOAD fn CODE addr"
},
{
"modifies": "LOAD",
"description": "Load data from fn onto standard ULA screen",
"token": "SCREEN$",
"syntax": "LOAD fn SCREEN$"
},
{
"modifies": "LOAD",
"description": "Load data from fn into memory bank b at addr",
"token": "BANK",
"syntax": "LOAD fn BANK b,addr"
},
{
"modifies": "LOAD",
"description": "Load data from fn onto current layer",
"token": "LAYER",
"syntax": "LOAD fn LAYER"
},
{
"description": "Loads BASIC lines from file named fn and integrates them with current program",
"token": "MERGE",
"syntax": "MERGE fn"
},
{
"modifies": "SAVE",
"description": "Save BASIC program to file named fn (and set up autorun at line l)",
"token": "LINE",
"syntax": "SAVE fn (LINE l)?"
},
{
"modifies": "SAVE",
"description": "Save data as specified; CODE and BANK have an extra \"length\" parameter",
"token": "DATA",
"syntax": "SAVE fn (DATA/CODE/SCREEN$/BANK/LAYER..)"
},
{
"modifies": "SAVE",
"description": "Save data as specified; CODE and BANK have an extra \"length\" parameter",
"token": "CODE",
"syntax": "SAVE fn (DATA/CODE/SCREEN$/BANK/LAYER..)"
},
{
"modifies": "SAVE",
"description": "Save data as specified; CODE and BANK have an extra \"length\" parameter",
"token": "SCREEN$",
"syntax": "SAVE fn (DATA/CODE/SCREEN$/BANK/LAYER..)"
},
{
"modifies": "SAVE",
"description": "Save data as specified; CODE and BANK have an extra \"length\" parameter",
"token": "BANK",
"syntax": "SAVE fn (DATA/CODE/SCREEN$/BANK/LAYER..)"
},
{
"modifies": "SAVE",
"description": "Save data as specified; CODE and BANK have an extra \"length\" parameter",
"token": "LAYER",
"syntax": "SAVE fn (DATA/CODE/SCREEN$/BANK/LAYER..)"
},
{
"description": "Checks loaded basic program matches fn",
"token": "VERIFY",
"syntax": "VERIFY fn"
},
{
"modifies": "VERIFY",
"description": "Checks data in memory/array matches contents of fn; does not work with SCREEN$/LAYER because the screen is inevitably changed during the verify operation",
"token": "DATA",
"syntax": "VERIFY fn (DATA/CODE/BANK)"
},
{
"modifies": "VERIFY",
"description": "Checks data in memory/array matches contents of fn; does not work with SCREEN$/LAYER because the screen is inevitably changed during the verify operation",
"token": "CODE",
"syntax": "VERIFY fn (DATA/CODE/BANK)"
},
{
"modifies": "VERIFY",
"description": "Checks data in memory/array matches contents of fn; does not work with SCREEN$/LAYER because the screen is inevitably changed during the verify operation",
"token": "BANK",
"syntax": "VERIFY fn (DATA/CODE/BANK)"
},
{
"description": "Define n sprite patterns, starting with p, with data from bank b starting at offset o.",
"token": "BANK",
"modifies": "SPRITE",
"syntax": "SPRITE BANK b, o, p, n"
},
{
"modifies": "BANK",
"description": "Load sprite palette x (0 or 1) from bank b at offset o. Data is read as with LAYER PALETTE.",
"token": "SPRITE PALETTE",
"syntax": "SPRITE PALETTE x BANK b, o"
},
{
"description": "Set sprite palette n, index i, to color v. V is always 9-bit, even if PALETTE DIM 8 is in effect.",
"token": "PALETTE",
"modifies": "SPRITE",
"syntax": "SPRITE PALETTE n, i, v"
},
{
"description": "Enable or disable sprites. X must be 0 (disable) or 1 (enable).",
"token": "PRINT",
"modifies": "SPRITE",
"syntax": "SPRITE PRINT x"
},
{
"description": "Enable or disable sprites crossing the border. X must be 0 (disable) or 1 (enable).",
"token": "BORDER",
"modifies": "SPRITE",
"syntax": "SPRITE BORDER x"
},
{
"description": "Set sprite s to position (x,y), pattern p, x-scaling mx and y-scaling my. If the sprite id s is negative, this sprite is a relative sprite, and its position is relative to the previous anchor sprite (defined with a positive sprite id).",
"token": "SPRITE",
"syntax": "SPRITE s, x, y, p, f, rf, mx, my"
},
{
"description": "Reset all sprite attributes and global settings.",
"token": "CLEAR",
"modifies": "SPRITE",
"syntax": "SPRITE CLEAR"
},
{
"token": "RESTORE",
"description": "Sets DATA read point to start of line x in bank b",
"modifies": "BANK",
"syntax": "BANK b RESTORE x"
},
{
"description": "Stores data in program for later READing",
"token": "DATA",
"syntax": "DATA x[,y].."
},
{
"description": "Read next value from DATA statement into variable",
"token": "READ",
"syntax": "READ var"
},
{
"description": "Sets DATA read point to start of line x",
"token": "RESTORE",
"syntax": "RESTORE x"
},
{
"modifies": "BANK",
"description": "Jump execution to line x stored in bank b. b=-1 for main program",
"token": "GO TO",
"syntax": "BANK b GO TO x"
},
{
"modifies": "BANK",
"description": "Jump execution to line x stored in bank b, storing current location on gosub stack. b=-1 for main program",
"token": "SUB",
"syntax": "BANK b GO SUB x"
},
{
"description": "Creates a user defined function based on a parameterised expression. Will not work if moved into any bank other than the main program",
"token": "FN",
"modifies": "DEF",
"syntax": "DEF FN func(param[,param..])=expr"
},
{
"description": "Defines a as an array of length x (and second dimension length y, etc..)",
"token": "DIM",
"syntax": "DIM a(x[,y]..)"
},
{
"modifies": "FOR",
"description": "Starts FOR loop between given numeric values (with given step)",
"token": "TO",
"syntax": "FOR var = start TO end [STEP step]?"
},
{
"description": "Jump execution to line X in the same bank",
"token": "TO",
"modifies": "GO",
"syntax": "GO TO x"
},
{
"description": "Jump execution to line X in the same bank, storing current location (and bank) on gosub stack",
"token": "SUB",
"modifies": "GO",
"syntax": "GO SUB x"
},
{
"modifies": "IF",
"description": "Run statements only if expression c is true",
"token": "THEN",
"syntax": "IF c THEN statements.."
},
{
"token": "ELSE",
"description": "See IF ... THEN ... ELSE",
"syntax": "ELSE"
},
{
"description": "Sets variable var to expr",
"token": "LET",
"syntax": "LET var = expr"
},
{
"description": "Marks end of FOR loop regarding VAR",
"token": "NEXT",
"syntax": "NEXT var"
},
{
"description": "Code comment, ignored",
"token": "REM",
"syntax": "REM comment"
},
{
"description": "Restore execution location (line and bank) from gosub stack",
"token": "RETURN",
"syntax": "RETURN"
},
{
"modifies": "TILE",
"description": "Draw a section of the tilemap w,h wide (from tile offset x,y in the tilemap) (to tile offset x2,y2 on the screen)",
"token": "AT",
"syntax": "TILE w,h [AT x,y]? [TO x2,y2]?"
},
{
"modifies": "TILE",
"description": "Draw a section of the tilemap w,h wide (from tile offset x,y in the tilemap) (to tile offset x2,y2 on the screen)",
"token": "TO",
"syntax": "TILE w,h [AT x,y]? [TO x2,y2]?"
},
{
"description": "Set bank n as the root of tile graphics (which may occupy up to 4 banks in the case of 16x16 tiles).",
"token": "BANK",
"modifies": "TILE",
"syntax": "TILE BANK n"
},
{
"description": "Set bank n offset o as the root of tilemap data, with tilemap width v and tile size t (t must be 8 or 16 for 8x8 or 16x16 tiles)",
"token": "DIM",
"modifies": "TILE",
"syntax": "TILE DIM n, o, v, t"
},
{
"description": "Prints screen",
"token": "COPY",
"syntax": "COPY"
},
{
"description": "Returns currently pressed key",
"token": "INKEY",
"syntax": "INKEY$"
},
{
"description": "Output expression(s) and read a variable",
"token": "INPUT",
"syntax": "INPUT specifier [connector specifier].."
},
{
"modifies": "AT",
"syntax": "INPUT AT x,y",
"description": "Moves text cursor to the given text cell",
"token": "INPUT"
},
{
"modifies": "TAB",
"syntax": "INPUT TAB x",
"description": "Inserts spaces until text cursor is in column x",
"token": "INPUT"
},
{
"modifies": "INK",
"syntax": "INPUT INK x",
"description": "Changes the appropriate color for the duration of the print/input statement",
"token": "INPUT"
},
{
"modifies": "PAPER",
"syntax": "INPUT PAPER x",
"description": "Changes the appropriate color for the duration of the print/input statement",
"token": "INPUT"
},
{
"modifies": "LINE",
"syntax": "INPUT LINE x$",
"description": "INPUT only, reads a string without the prompting quotes ",
"token": "INPUT"
},
{
"description": "Enable or disable switching ink/paper color when printing (x=0 or 1)",
"token": "INVERSE",
"syntax": "INVERSE x"
},
{
"description": "Output expression(s) to printer",
"token": "LPRINT",
"syntax": "LPRINT specifier [connector specifier].."
},
{
"description": "Enable or disable overprinting (x=0 or 1)",
"token": "OVER",
"syntax": "OVER x"
},
{
"description": "Waits x frames or until a key is pressed",
"token": "PAUSE",
"syntax": "PAUSE x"
},
{
"description": "Output expression(s)",
"token": "PRINT",
"syntax": "PRINT specifier [connector specifier].."
},
{
"modifies": "AT",
"syntax": "PRINT AT x,y",
"description": "Moves text cursor to the given text cell",
"token": "PRINT"
},
{
"modifies": "TAB",
"syntax": "PRINT TAB x",
"description": "Inserts spaces until text cursor is in column x",
"token": "PRINT"
},
{
"modifies": "INK",
"syntax": "PRINT INK x",
"description": "Changes the appropriate color for the duration of the print/input statement",
"token": "PRINT"
},
{
"modifies": "PAPER",
"syntax": "PRINT PAPER x",
"description": "Changes the appropriate color for the duration of the print/input statement",
"token": "PRINT"
},
{
"modifies": "LINE",
"syntax": "PRINT LINE x$",
"description": "INPUT only, reads a string without the prompting quotes ",
"token": "PRINT"
},
{
"description": "Re-enable RAMdisk having been disabled by previous BANK 1346 USR",
"token": "FORMAT",
"modifies": "BANK",
"syntax": "BANK 1346 FORMAT"
},
{
"description": "Disable RAMdisk, allowing banks 1, 3, 4, and 6 to be used",
"token": "USR",
"modifies": "BANK,",
"syntax": "BANK 1346 USR"
},
{
"modifies": "BANK",
"description": "Copy entire bank b to bank c",
"token": "TO",
"syntax": "BANK b COPY TO c"
},
{
"modifies": "BANK",
"description": "Copy len bytes from start in bank b, to start in bank c",
"token": "COPY",
"syntax": "BANK b COPY start, len TO c, start"
},
{
"modifies": "BANK",
"description": "Erase all data in bank by overwriting with zeros (or x)",
"token": "ERASE",
"syntax": "BANK b ERASE x?"
},
{
"modifies": "BANK",
"description": "Overwrite len bytes of data at off in bank b with value",
"token": "ERASE",
"syntax": "BANK b ERASE off, len, value"
},
{
"modifies": "PEEK",
"description": "Returns value at given address in bank b (address is from start of bank)",
"token": "BANK",
"syntax": "BANK b PEEK addr"
},
{
"modifies": "BANK",
"description": "Reads a bit7-terminated string from memory or bank (NOTE: bit 7 will still be set on the string that is returned)",
"token": "PEEK$",
"syntax": "BANK b PEEK$ (addr, len)"
},
{
"modifies": "POKE",
"description": "Sets address in bank b to value (address is from start of bank)",
"token": "BANK",
"syntax": "BANK b POKE addr, value"
},
{
"description": "Returns current value at port",
"token": "IN",
"syntax": "IN port"
},
{
"description": "Returns value at given address",
"token": "PEEK",
"syntax": "PEEK addr"
},
{
"description": "Read double-byte (16-bit word) from memory",
"token": "DPEEK",
"syntax": "DPEEK addr"
},
{
"description": "Read double-byte (16-bit word) from offset in bank",
"token": "DPEEK",
"modifies": "BANK",
"syntax": "BANK b DPEEK addr"
},
{
"description": "Sets address to value",
"token": "POKE",
"syntax": "POKE addr, value"
},
{
"description": "Sets address to double value (16-bit word)",
"token": "DPOKE",
"syntax": "DPOKE addr, valuelist"
},
{
"description": "Sets address to double value (16-bit word) from offset in bank",
"modifies": "BANK",
"token": "DPOKE",
"syntax": "BANK b DPOKE addr, valuelist"
},
{
"description": "Sends value to port",
"token": "OUT",
"syntax": "OUT port, value"
},
{
"modifies": "LINE",
"description": "Copies lines x,y into bank b. Once this is done, these lines cannot be edited except by overwriting them with another BANK..LINE command. Cannot be used in a program.",
"token": "BANK",
"syntax": "BANK b LINE x,y"
},
{
"modifies": "LIST",
"description": "Lists source code in bank b (from line x)",
"token": "BANK",
"syntax": "BANK b LIST x?"
},
{
"modifies": "MERGE",
"description": "Adds all basic lines in bank b to main program",
"token": "BANK",
"syntax": "BANK b MERGE"
},
{
"description": "Repeats last command or restarts from error location",
"token": "CONTINUE",
"syntax": "CONTINUE"
},
{
"description": "Statement or statements in statementlist and statement list2 are repeated until x is true. The loop is terminated skipping statementlist2 if y evaluates to false",
"token": "REPEAT",
"syntax": "REPEAT statementlist"
},
{
"description": "Statement or statements in statementlist and statement list2 are repeated until x is true. The loop is terminated skipping statementlist2 if y evaluates to false",
"token": "UNTIL",
"modifies": "REPEAT",
"syntax": "REPEAT UNTIL x"
},
{
"description": "Used within a REPEAT loop, can provide an al ter native way of leaving the loop be fore reach ing the REPEAT UNTIL statement",
"token": "WHILE",
"syntax": "WHILE cond"
},
{
"description": "Resets variables, clears screen, resets plot cursor (and sets ramtop to X)",
"token": "CLEAR",
"syntax": "CLEAR x?"
},
{
"description": "Deletes all program lines between f and l. Cannot be used in a program.",
"token": "ERASE",
"syntax": "ERASE f, l"
},
{
"description": "Lists source code (from line x)",
"token": "LIST",
"syntax": "LIST x?"
},
{
"description": "Lists source code to printer (from line x)",
"token": "LLIST",
"syntax": "LLIST x?"
},
{
"description": "Clear stored program",
"token": "NEW",
"syntax": "NEW"
},
{
"description": "CLEAR then run program (from line x)",
"token": "RUN",
"syntax": "RUN x?"
},
{
"modifies": "RUN",
"token": "AT",
"description": "RUN AT speed Changes the speed of the ZX Spectrum Next",
"syntax": "RUN AT speed"
},
{
"description": "Set ULA border to color N",
"token": "BORDER",
"syntax": "BORDER n"
},
{
"description": "Enable or disable bright colors. n must be 0 or 1. Not legal on non-ULA layers or if Enhanced ULA is enabled.",
"token": "BRIGHT",
"syntax": "BRIGHT n"
},
{
"description": "Draw circle centered at x, y with radius r",
"token": "CIRCLE",
"syntax": "CIRCLE x,y,r"
},
{
"description": "Clears screen",
"token": "CLS",
"syntax": "CLS"
},
{
"description": "Draw line from plot cursor to given coordinate",
"token": "DRAW",
"syntax": "DRAW [modifies or x,y].."
},
{
"description": "Enable or disable ink/paper cycling. n must be 0 or 1. Not legal on non-ULA layers or if Enhanced ULA is enabled.",
"token": "FLASH",
"syntax": "FLASH n"
},
{
"description": "Set ink (foreground) color for print and graphics commands. If Enhanced ULA is enabled, this can use any legal palette value. On Layer 2, it can use any value 0-255.",
"token": "INK",
"syntax": "INK c"
},
{
"description": "Selects active layer for graphics operations. LAYER 0 is an unenhanced ULA screen. LAYER 1 is the ULA screen but with enhancements and with the origin at the top left (not the bottom left). LAYER 2 is, well, Layer 2.\n\n1 = Standard Spectrum, 2 = Timex hires, 3 = Timex hicolour, 0 = Lores layer.",
"token": "LAYER",
"syntax": "LAYER x"
},
{
"description": "Sets the scroll display offset for the current layer.",
"token": "AT",
"modifies": "LAYER",
"syntax": "LAYER AT x, y"
},
{
"description": "Only when Layer 2 is selected, selects the first bank for layer 2 (f) and shadow layer 2 (b). Note that a layer 2 screen occupies 3 banks.",
"token": "BANK",
"modifies": "LAYER",
"syntax": "LAYER BANK f, b"
},
{
"description": "Resets all layer settings",
"token": "CLEAR",
"modifies": "LAYER",
"syntax": "LAYER CLEAR"
},
{
"description": "Sets visible area for current layer",
"token": "DIM",
"modifies": "LAYER",
"syntax": "LAYER DIM left, top, right, bottom"
},
{
"description": "Fills a region at x,y, of size w,h, with palette index f (or the transparent value)",
"token": "ERASE",
"modifies": "LAYER",
"syntax": "LAYER ERASE x, y, w, h [,f]?"
},
{
"description": "Sets layer ordering",
"token": "OVER",
"modifies": "LAYER",
"syntax": "LAYER OVER"
},
{
"description": "Sets palette index i in palette in to color value v. V is always 9 bit, even if PALETTE DIM 8 is set.",
"token": "PALETTE",
"modifies": "LAYER",
"syntax": "LAYER PALETTE n, i, v"
},
{
"modifies": "LAYER",
"description": "Loads current layer's palette n (0 or 1) from bytes starting at offset in bank b. If PALETTE DIM 8 is set, each byte is one color. If PALETTE DIM 9 is set, each color needs two bytes, but only one bit of the second is used.",
"token": "BANK",
"syntax": "LAYER PALETTE n BANK b, offset"
},
{
"description": "Resets all palettes and palette settings",
"token": "CLEAR",
"modifies": "PALETTE",
"syntax": "PALETTE CLEAR"
},
{
"modifies": "BANK",
"token": "CLEAR",
"syntax": "BANK m CLEAR",
"description": "Marks bank m as free for use by other parts of the system"
},
{
"description": "Sets number of color bits in the active palette; x must be 8 or 9",
"token": "DIM",
"modifies": "PALETTE",
"syntax": "PALETTE DIM x"
},
{
"description": "Enables Enhanced ULA colors with x inks. X must be a bitmask which masks off bits on the right of a value (1, 3, 7, 15, 31, 63, 127 or 255)",
"token": "FORMAT",
"modifies": "PALETTE",
"syntax": "PALETTE FORMAT x"
},
{
"description": "Sets the global transparency color to x",
"token": "OVER",
"modifies": "PALETTE",
"syntax": "PALETTE OVER x"
},
{
"description": "Set paper (background) color for print and graphics commands. Follows the same rules as INK.",
"token": "PAPER",
"syntax": "PAPER c"
},
{
"description": "Plot listed points as single pixels on current layer",
"token": "PLOT",
"syntax": "PLOT [modifies or x,y].."
},
{
"description": "Stores the color at point x, y on the ULA screen in variable var",
"token": "POINT",
"syntax": "POINT x, y, var"
},
{
"description": "Returns the color at point x, y on the ULA screen",
"token": "POINT",
"syntax": "POINT x, y"
},
{
"description": "Standard boolean conjunctives",
"token": "AND",
"syntax": "AND"
},
{
"description": "Standard boolean conjunctives",
"token": "OR",
"syntax": "OR"
},
{
"description": "Standard boolean conjunctives",
"token": "NOT",
"syntax": "NOT"
},
{
"token": "MOD",
"syntax": "MOD x",
"description": "Gets the modulo which returns the remainder of a division"
},
{
"description": "Gets unsigned magnitude of x",
"token": "ABS",
"syntax": "ABS x"
},
{
"description": "Returns inverse trigonometric ratio (arcsin, arccos, arctan)",
"token": "ASN",
"syntax": "ASN x, ACS x, ATN x"
},
{
"description": "Returns inverse trigonometric ratio (arcsin, arccos, arctan)",
"token": "ACS",
"syntax": "ASN x, ACS x, ATN x"
},
{
"description": "Returns inverse trigonometric ratio (arcsin, arccos, arctan)",
"token": "ATN",
"syntax": "ASN x, ACS x, ATN x"
},
{
"description": "Returns attribute cell value at cell x,y",
"token": "ATTR",
"syntax": "ATTR x,y"
},
{
"description": "Converts binary number x to decimal",
"token": "BIN",
"syntax": "BIN x"
},
{
"description": "Gets character for an ASCII code",
"token": "CHR$",
"syntax": "CHR$ x"
},
{
"description": "Gets ASCII code for a character",
"token": "CODE",
"syntax": "CODE x"
},
{
"description": "Rounds x down to integer",
"token": "INT",
"syntax": "INT x"
},
{
"description": "Gets length of string",
"token": "LEN",
"syntax": "LEN x"
},
{
"description": "Returns approximation of pi",
"token": "PI",
"syntax": "PI"
},
{
"description": "Returns a random number between 0 and 1",
"token": "RND",
"syntax": "RND"
},
{
"description": "Returns text character in text cell x,y",
"token": "SCREEN$",
"syntax": "SCREEN$ x,y"
},
{
"description": "Divides x by its magnitude",
"token": "SIGN",
"syntax": "SIGN x"
},
{
"description": "Returns standard trigonometric ratio (sine)",
"token": "SIN",
"syntax": "SIN x"
},
{
"description": "Returns standard trigonometric ratio (cosine)",
"token": "COS",
"syntax": "COS x"
},
{
"description": "Returns standard trigonometric ratio (tangent)",
"token": "TAN",
"syntax": "TAN x"
},
{
"description": "Returns square of x",
"token": "SQR",
"syntax": "SQR x"
},
{
"description": "Converts number into a string",
"token": "STR$",
"syntax": "STR$ x"
},
{
"description": "If x is a string, gets the address of the first byte of the user defined graphic for the character. If x is a number, runs a machine code routine at address x and returns the value of BC after it exits.",
"token": "USR",
"syntax": "USR x"
},
{
"description": "Converts string number or expression into a number",
"token": "VAL",
"syntax": "VAL x"
},
{
"description": "Call procedure defined with DEFPROC. The number of expressions and each of their types must match those defined in the DEFPROC, otherwise a Q Parameter Error report will be generated. TO paramlist will copy return values declared by ENDPROC to up to 8 variables.",
"token": "PROC",
"syntax": "PROC name (expressionlist) [TO paramlist]",
"modifies": "TO"
},
{
"syntax": "ENDPROC [= expressionlist]",
"token": "ENDPROC",
"description": "Ends execution of a procedure defined with DEFPROC and returns up to 8 local values via the optional expressionlist to the calling PROC command."
},
{
"syntax": "DEFPROC name ([paramlist])",
"token": "DEFPROC",
"description": "Defines a procedure, where name follows the same naming rules as standard numeric variables. paramlist is an optional list of up to 8 variable names (simple strings, numeric variables or integer variables, but not arrays of any type). See ENDPROC."
},
{
"token": "OVER",
"modifies": "SPRITE",
"syntax": "%SPRITE OVER(s1, s2 [TO s3] [,overlapX [,overlapY] ])",
"description": "Performs bounding-box collision detection between sprite s1, and a single other sprite s2 or a range of sprites s2..s3."
},
{
"token": "AT",
"modifies": "SPRITE",
"syntax": "%SPRITE AT(s,c)",
"description": "Returns a coordinate or other movement-related value for the sprite:\n %SPRITE AT(s,0) returns x coordinate\n %SPRITE AT(s,1) returns y coordinate\n %SPRITE AT(s,2) returns pattern number\n %SPRITE AT(s,3) returns x step\n %SPRITE AT(s,4) returns y step\n %SPRITE AT(s,5) returns delay before the sprite next moves\n (0 means the sprite will move on the next SPRITE MOVE command)"
},
{
"token": "CONTINUE",
"modifies": "SPRITE",
"syntax": "SPRITE CONTINUE s, [x1 [TO x2]] [STEP xs] [RUN or STOP], [y1 [TO y2]] [STEP ys] [RUN or STOP], [p1 [TO p2]], [f], [r], [d]",
"description": "Turns automatic movement back on for a sprite"
},
{
"token": "PAUSE",
"modifies": "SPRITE",
"syntax": "SPRITE PAUSE s1 [TO s2]",
"description": "Turns off automatic movement for a single sprite or range of sprites."
},
{
"syntax": "SPRITE STOP",
"description": "Turns off immediate updates and enables batching mode.",
"modifies": "SPRITE",
"token": "STOP"
},
{
"syntax": "SPRITE RUN",
"description": "Turns immediate updates back on, disabling batching mode (this is also done by the SPRITE CLEAR command).",
"modifies": "SPRITE",
"token": "RUN"
},
{
"syntax": "SPRITE MOVE",
"description": "When batching mode is enabled, sends all outstanding sprite changes to the hardware immediately.",
"modifies": "SPRITE",
"token": "MOVE"
},
{
"syntax": "SPRITE MOVE INT [y]",
"description": "The same as SPRITE MOVE, but first waits for the 50/60Hz interrupt. With optional y changes are not sent to the hardware until after the TV scanline corresponding to sprite coordinate y. This can be used to avoid flicker by ensuring sprite changes don't occur whilst the TV is midway through displaying the sprite(s) in question.",
"modifies": "SPRITE",
"token": "INT"
}
]