From 72bf05f691a811b63d8c5e98923afcba4f1f872c Mon Sep 17 00:00:00 2001 From: MrKOSMOS Date: Wed, 20 Aug 2025 23:21:31 +0100 Subject: [PATCH 01/13] Create pragma.md Placeholder, as needed for dim.md --- docs/pragma.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 docs/pragma.md diff --git a/docs/pragma.md b/docs/pragma.md new file mode 100644 index 000000000..1f4b394be --- /dev/null +++ b/docs/pragma.md @@ -0,0 +1,3 @@ +# Pragma + +Placeholder file as requested by DIM.md From 2630c436fe02f70f38ac404ce179b5e59a4fabc8 Mon Sep 17 00:00:00 2001 From: MrKOSMOS Date: Wed, 20 Aug 2025 23:33:08 +0100 Subject: [PATCH 02/13] Update poke.md and types.md Fix links on poke.md and clarify Integrals on types.md --- docs/poke.md | 2 +- docs/types.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/poke.md b/docs/poke.md index 1172553e1..467d2c23a 100644 --- a/docs/poke.md +++ b/docs/poke.md @@ -11,7 +11,7 @@ poke
, Stores the given (numeric) _value_ at the specified memory _address_. If _valueType_ is omitted, it is supposed to be _ubyte_ (8 bit unsigned integer). -The _value_ is [converted](cast.md) to the given _[valueType](zx_basic:types.md)_ and stored at the given _Address_. _Type_ can be any numeric one (like _[float](zx_basic:types#float.md)_ or _[integer](zx_basic:types#integer.md)_). +The _value_ is [converted](cast.md) to the given _[valueType](types.md)_ and stored at the given _Address_. _Type_ can be any numeric one (like _[float](types.md#float)_ or _[integer](types.md#integral)_). ## Examples diff --git a/docs/types.md b/docs/types.md index 734d24b0e..cee879016 100644 --- a/docs/types.md +++ b/docs/types.md @@ -20,7 +20,7 @@ to save memory and achieve higher speed. There are 3 kinds of types: **integrals** (integer numbers), **decimals** and **strings** ### Integral -Integrals are numerical types to store integer values. +Integrals (or Integers) are numerical types to store integer values. They can be _unsigned_ (their value is always 0 or positive) or _signed_ (can take negative values). ZX Basic integer types sizes are 8, 16 and 32 bits. Unsigned types have the prefix _U_. From 7384cbe70e98b5875b37e7a11e3f107993c9f1ed Mon Sep 17 00:00:00 2001 From: MrKOSMOS Date: Wed, 20 Aug 2025 23:46:14 +0100 Subject: [PATCH 03/13] Fixing links on code.md and const.md Fixes the links to types.md in these two files to a possible intended state --- docs/code.md | 2 +- docs/const.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/code.md b/docs/code.md index 65b14ddf8..837213a6f 100644 --- a/docs/code.md +++ b/docs/code.md @@ -11,7 +11,7 @@ code() Returns the ASCII code of the first character of the given string value. If the string is empty, the returned value is 0. -Returned value type is [UByte](types.md#UByte). +Returned value type is [UByte](types.md#Integral). ## Examples diff --git a/docs/const.md b/docs/const.md index 5b1fc469c..e83e82c4e 100644 --- a/docs/const.md +++ b/docs/const.md @@ -13,7 +13,7 @@ CONST [AS ] = **CONST** declares a non-modifable variable. `` can be something like `Integer`, `Byte`, `Float`, etc. -See the list of [available types](types.md#types.md). If type is not specified, +See the list of [available types](types.md#types). If type is not specified, `Float` will be used, unless you use a modifier like `$` or `%`. ## Examples From 842cf6ba76e36ed77f0eba7ef8fc9609791acad5 Mon Sep 17 00:00:00 2001 From: MrKOSMOS Date: Wed, 20 Aug 2025 23:57:07 +0100 Subject: [PATCH 04/13] Modify for clarity and create Modify several files for better linking and create scope.md as needed for end.md --- docs/cos.md | 2 +- docs/dim.md | 6 +++--- docs/function.md | 2 +- docs/scope.md | 0 4 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 docs/scope.md diff --git a/docs/cos.md b/docs/cos.md index 7a2c34e81..ce400416e 100644 --- a/docs/cos.md +++ b/docs/cos.md @@ -30,4 +30,4 @@ PRINT "Cosine value of a is "; COS(a) * [SIN](sin.md) and [ASN](asn.md) * [TAN](tan.md) and [ATN](atn.md) * [ACS](acs.md) -* Faster library option for lower accuracy trigonometry for games: [FCOS](library/fsin.bas.md) +* Faster library option for lower accuracy trigonometry for games: [FCOS](library/fsin.bas.md#COSINE) diff --git a/docs/dim.md b/docs/dim.md index 24538d87a..5f6a9de49 100644 --- a/docs/dim.md +++ b/docs/dim.md @@ -26,10 +26,10 @@ empty string, so you don't need to initialize them, though it's recommended. ZX BASIC allows you to use undeclared variables. In Sinclair BASIC, using an unassigned variable triggered the error _Variable not found_, but in ZX BASIC it will default to 0 value. -You can enforce variable declaration using the `--explicit` [command line option](zxb.md#Command_Line_Options). +You can enforce variable declaration using the `--explicit` [command line option](zxb.md#Command). When it's used, the compiler will require every variable to be declared with DIM before being used for the 1st time. -You can also enforce explicit type declaration using the `--strict` [command line option](zxb.md#Command_Line_Options). +You can also enforce explicit type declaration using the `--strict` [command line option](zxb.md#Command). This way, if you use `DIM` you will be required to declare also the type needed. When you use an undeclared variable, ZX BASIC will try to guess its type by looking at the context in which @@ -166,7 +166,7 @@ DIM a([ TO] [, ...]) AS ### Description By default, array indexes starts from 0, not from 1 as in Sinclair BASIC. You can change this behavior setting -a different array base index using either a [#pragma option](pragma.md) or a [command line option](zxb.md#Command Line Options). +a different array base index using either a [#pragma option](pragma.md) or a [command line option](zxb.md#Command). ### Examples diff --git a/docs/function.md b/docs/function.md index 438e6dd72..f622874ae 100644 --- a/docs/function.md +++ b/docs/function.md @@ -58,7 +58,7 @@ END FUNCTION However, not using types explicitly might have a negative impact on performance. Better redefine it using data types. Factorial is usually defined on unsigned integers and also returns an unsigned integer. Also, keep in mind that factorial numbers tends to _grow up very quickly_ (e.g. Factorial of 10 is 3628800), -so `ULong` [type](types.md) (32 bits unsigned) seems to be the most suitable for this function. +so `ULong` [type](types.md#Integral) (32 bits unsigned) seems to be the most suitable for this function. This version is faster (just the 1st line is changed): diff --git a/docs/scope.md b/docs/scope.md new file mode 100644 index 000000000..e69de29bb From 58af762605e5d34bdefa4809f0708c462e39d256 Mon Sep 17 00:00:00 2001 From: MrKOSMOS Date: Thu, 21 Aug 2025 00:06:54 +0100 Subject: [PATCH 05/13] Update identifier.md More clarifications and fixing the subsection links for identifier.md --- docs/identifier.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/identifier.md b/docs/identifier.md index 11b319bd7..05cc3d0c7 100644 --- a/docs/identifier.md +++ b/docs/identifier.md @@ -20,10 +20,10 @@ Identifiers shown in bold are taken from the Sinclair BASIC (beware their meanin * **[ASN](asn.md)** **(function)** * **[AT](at.md)** * **[ATN](atn.md)** **(function)** -* **[bAND](bitwiselogic.md)** **(operator)** -* **[bNOT](bitwiselogic.md)** **(operator)** -* **[bOR](bitwiselogic.md)** **(operator)** -* **[bXOR](bitwiselogic.md)** **(operator)** +* **[bAND](bitwiselogic.md#bAND)** **(operator)** +* **[bNOT](bitwiselogic.md#bNOT)** **(operator)** +* **[bOR](bitwiselogic.md#bOR)** **(operator)** +* **[bXOR](bitwiselogic.md#bXOR)** **(operator)** * **[BEEP](beep.md)** **(statement)** * [BOLD](bold.md) * **[BORDER](border.md)** **(statement)** @@ -44,7 +44,7 @@ Identifiers shown in bold are taken from the Sinclair BASIC (beware their meanin * **[DATA](data.md)** **(statement)** * **[DRAW](draw.md)** **(statement)** * [ELSE](if.md) -* [ELSEIF](if.md) +* [ELSEIF](if.md#using-elseif) * [END](end.md) * [EXIT](exit.md) **(statement)** * **[EXP](exp.md)** **(function)** @@ -68,7 +68,7 @@ Identifiers shown in bold are taken from the Sinclair BASIC (beware their meanin * **[LN](ln.md)** **(function)** * **[LOAD](load.md)** **(statement)** * [LOOP](do.md) **(statement)** -* [MOD](operators.md#Arithmetic Operators) **(operator)** +* [MOD](operators.md#Arithmetic-Operators) **(operator)** * **[NEXT](for.md)** **(statement)** * **[NOT](operators.md#NOT)** **(operator)** * **[ON ... GOTO](on_goto.md)** **(statement)** @@ -110,7 +110,7 @@ Identifiers shown in bold are taken from the Sinclair BASIC (beware their meanin * **[VERIFY](load.md)** **(statement)** * [WEND](while.md) **(statement)** * [WHILE](while.md) **(statement)** -* **[XOR](operators.md#logical_operators.md)** **(operator)** +* **[XOR](operators.md#logical-operators)** **(operator)** ## Inbuilt library Functions You should also avoid defining (with a SUB or FUNCTION command) routines with the following names, as they are available in the internal library for your use, though you are almost certainly going to need to use #include before using them. Note that some Sinclair Basic words are listed here. Some Freebasic commands are also available through #include options for compatibility with freebasic. From 44a419f52f72cce5fe071009e8699aeeb9e6fe4b Mon Sep 17 00:00:00 2001 From: MrKOSMOS Date: Thu, 21 Aug 2025 00:37:26 +0100 Subject: [PATCH 06/13] Doc fixes More link fixes, clarifications and consistency on a few files --- docs/cos.md | 4 ++-- docs/dim.md | 6 +++--- docs/function.md | 2 +- docs/in.md | 2 +- docs/index.md | 2 +- docs/inkey.md | 4 ++++ docs/lbound.md | 2 +- docs/library/stdlib.md | 4 ++-- docs/zxb.md | 7 ++++--- 9 files changed, 19 insertions(+), 14 deletions(-) diff --git a/docs/cos.md b/docs/cos.md index ce400416e..6e91a3160 100644 --- a/docs/cos.md +++ b/docs/cos.md @@ -10,7 +10,7 @@ COS(numericExpression) ## Description Returns the cosine value of the given argument. -Argument must be a numeric expression in radians units. Returned value type is [float](types.md#Float). +Argument must be a numeric expression in radians units. Returned value type is [float](types.md#float). ## Examples @@ -30,4 +30,4 @@ PRINT "Cosine value of a is "; COS(a) * [SIN](sin.md) and [ASN](asn.md) * [TAN](tan.md) and [ATN](atn.md) * [ACS](acs.md) -* Faster library option for lower accuracy trigonometry for games: [FCOS](library/fsin.bas.md#COSINE) +* Faster library option for lower accuracy trigonometry for games: [FCOS](library/fsin.bas.md#cosine-function) diff --git a/docs/dim.md b/docs/dim.md index 5f6a9de49..5a65225bd 100644 --- a/docs/dim.md +++ b/docs/dim.md @@ -26,10 +26,10 @@ empty string, so you don't need to initialize them, though it's recommended. ZX BASIC allows you to use undeclared variables. In Sinclair BASIC, using an unassigned variable triggered the error _Variable not found_, but in ZX BASIC it will default to 0 value. -You can enforce variable declaration using the `--explicit` [command line option](zxb.md#Command). +You can enforce variable declaration using the `--explicit` [command line option](zxb.md#command-line-options). When it's used, the compiler will require every variable to be declared with DIM before being used for the 1st time. -You can also enforce explicit type declaration using the `--strict` [command line option](zxb.md#Command). +You can also enforce explicit type declaration using the `--strict` [command line option](zxb.md#command-line-options). This way, if you use `DIM` you will be required to declare also the type needed. When you use an undeclared variable, ZX BASIC will try to guess its type by looking at the context in which @@ -166,7 +166,7 @@ DIM a([ TO] [, ...]) AS ### Description By default, array indexes starts from 0, not from 1 as in Sinclair BASIC. You can change this behavior setting -a different array base index using either a [#pragma option](pragma.md) or a [command line option](zxb.md#Command). +a different array base index using either a [#pragma option](pragma.md) or a [command line option](zxb.md#command-line-options). ### Examples diff --git a/docs/function.md b/docs/function.md index f622874ae..bad9fda71 100644 --- a/docs/function.md +++ b/docs/function.md @@ -58,7 +58,7 @@ END FUNCTION However, not using types explicitly might have a negative impact on performance. Better redefine it using data types. Factorial is usually defined on unsigned integers and also returns an unsigned integer. Also, keep in mind that factorial numbers tends to _grow up very quickly_ (e.g. Factorial of 10 is 3628800), -so `ULong` [type](types.md#Integral) (32 bits unsigned) seems to be the most suitable for this function. +so `ULong` [type](types.md#integral) (32 bits unsigned) seems to be the most suitable for this function. This version is faster (just the 1st line is changed): diff --git a/docs/in.md b/docs/in.md index 6e4c94f76..d9bb6185e 100644 --- a/docs/in.md +++ b/docs/in.md @@ -11,7 +11,7 @@ IN ## Description Returns the byte value read in the given port. -Argument must be a numeric expression. Returned value type is [Ubyte](types.md#Ubyte). +Argument must be a numeric expression. Returned value type is [Ubyte](types.md#integral). ## Examples diff --git a/docs/index.md b/docs/index.md index aac26859b..66d7c6a63 100644 --- a/docs/index.md +++ b/docs/index.md @@ -12,7 +12,7 @@ * [SDK tools](tools.md)
Tools available in the SDK. -* [Command line options](zxb.md#Command_Line_Options) +* [Command line options](zxb.md#Command-Line-Options)
Command line options table for the compiler (zxb) ## Download diff --git a/docs/inkey.md b/docs/inkey.md index 1999e30a3..9cd702a20 100644 --- a/docs/inkey.md +++ b/docs/inkey.md @@ -26,3 +26,7 @@ The above code will echo keys pressed to the screen. Note that the loop has to b ## Remarks * This sentence is 100% Sinclair BASIC Compatible + +## See also + +* [INPUT](input.md) \ No newline at end of file diff --git a/docs/lbound.md b/docs/lbound.md index 0ab869d85..727365246 100644 --- a/docs/lbound.md +++ b/docs/lbound.md @@ -35,7 +35,7 @@ PRINT LBound(a, 0): REM Prints 2, since 'a' has 2 dimensions ## Remarks -* This function does not exists in Sinclair BASIC. +* This function does not exist in Sinclair BASIC. ## See also diff --git a/docs/library/stdlib.md b/docs/library/stdlib.md index 14fbdf17e..db2de8012 100644 --- a/docs/library/stdlib.md +++ b/docs/library/stdlib.md @@ -5,8 +5,8 @@ Some libraries might be available only for some architectures. If so, they will be signaled as such. If no notice is shown, they are available for all. -* [keys.bas](d)
+* [keys.bas](keys.bas.md)
Faster and efficient way to detect keys pressed. -* [string.bas](.md)
+* [string.bas](string.bas.md)
Library for string manipulation. diff --git a/docs/zxb.md b/docs/zxb.md index 27db3c27d..38e26f1a9 100644 --- a/docs/zxb.md +++ b/docs/zxb.md @@ -159,7 +159,7 @@ messages (for example, to call ZX BASIC compiler from within an IDE). * **--array-base** -
Unlike original Sinclair BASIC, array indexes starts from 0, not from 1 (see [DIM](dim.md)). +
Unlike original Sinclair BASIC, array indexes starts from 0, not from 1 (see [DIM](dim.md#array-declaration)). You can change this behavior. For example setting `--array-base=1` will make array indexes start from 1 (like in Sinclair BASIC). This option (array-base=1) is active when `--sinclair` compatibility flag is specified. @@ -211,8 +211,9 @@ This option is really useful and you should enable it for large programs. * **--strict**
Requires all variables (and parameters and functions!) to have an explicit type declared -(e.g. [Uinteger](types.md)). Otherwise, forgetting a type will cause an error and the program won't compile. +(e.g. [Uinteger](types.md#integral)). Otherwise, forgetting a type will cause an error and the program won't compile. This is very useful to avoid forgetting type declarations. When the type is explicitly declared the compiler can make better assumptions and further error checking and optimizations. -This is all you need to know to use the compiler. Proceed to the [ZX BASIC](language.md) page for a language reference. +This is all you need to know to use the compiler. Proceed to the [ZX BASIC](index.md#language-reference) page for a +language reference. From 6bd48e64bf83e9e882287772c110bb7af7965cbc Mon Sep 17 00:00:00 2001 From: MrKOSMOS Date: Thu, 21 Aug 2025 00:41:57 +0100 Subject: [PATCH 07/13] Update other_architectures.md Indentation fixes --- docs/other_architectures.md | 105 ++++++++++++++++++------------------ 1 file changed, 53 insertions(+), 52 deletions(-) diff --git a/docs/other_architectures.md b/docs/other_architectures.md index 9ef947713..ad7ab8ca4 100644 --- a/docs/other_architectures.md +++ b/docs/other_architectures.md @@ -2,7 +2,7 @@ ## home computers -###[Z80](architectures/z80.md) +### [Z80](architectures/z80.md) * [ZX-Spectrum](architectures/zxspectrum.md) * [MSX](architectures/msx.md) 1/2/2+ @@ -56,15 +56,15 @@ * Compucolor 8001/8051 * Triumph-Adler Alphatronic-PC P1/P2/P3/P4 -###Z84C15 +### Z84C15 * [Sprinter 2000](architectures/sp2000.md) -###[R800](architectures/r800.md) +### [R800](architectures/r800.md) * MSX Turbo-R -###[6502](architectures/6502.md) +### [6502](architectures/6502.md) * [BBC-Micro](architectures/bbc_micro.md) * [Apple](architectures/apple_ii.md) I/[II](architectures/apple_ii.md)/III/IIe/IIc @@ -78,40 +78,40 @@ * Commodore Plus4 * Commodore [C128](architectures/c128.md) -###[6800](architectures/6800.md) +### [6800](architectures/6800.md) * Goupil-2 * APF [Imagination-Machine](architectures/imaginationmachine.md) * Matsushita [JR-100](architectures/jr100.md)/[JR-200](architectures/jr200.md) * Matra-Hachette Alice/Alice-90 -###[6809](architectures/6809.md) +### [6809](architectures/6809.md) * TRS 80 Color Computer (CoCo1/[CoCo2](architectures/coco2.md)/CoCo3/[Dragon32](architectures/coco2.md)/etc.) * Thomson/Olivetti [MO5](architectures/mo5.md)/[Prodest](architectures/mo5.md)/TO7 * Fujitsu FM-7/FM-8 -###65816 +### 65816 * Apple IIGS -###65SC12 +### 65SC12 * BBC-Master -###K1801VM1 +### K1801VM1 * [Elektronika-BK](architectures/elektronika_bk.md) -###Fairchild-F8 +### Fairchild-F8 * VideoBrain Family-Computer -###TMS7020 +### TMS7020 * Exelvision -###TMS9900 +### TMS9900 * TI-99-4A/Geneve/TIM * Tomy Pyuuta/Tutor @@ -120,7 +120,7 @@ * Xerox Alto -###[68000](architectures/68000.md) +### [68000](architectures/68000.md) * [Sinclair QL](architectures/sinclair_ql.md) * [Amiga](architectures/amiga_500.md) 1000/[500](architectures/amiga_500.md)/2000/1500/600 @@ -131,95 +131,95 @@ * Luxor ABC-1600 * Silicon Graphics Iris 1000 -###[68020](architectures/68020.md) +### [68020](architectures/68020.md) * Amiga 1200 -###[68030](architectures/68030.md) +### [68030](architectures/68030.md) * Atari Falcon * Amiga 3000/4000-030 -###[68040](architectures/68040.md) +### [68040](architectures/68040.md) * Amiga 4000-040 -###8086 +### 8086 * NEC [PC-9801](architectures/pc98.md) * Toshiba Pasopia1600 -###8088 +### 8088 * [IBM PC-XT](architectures/ibm_pc-xt.md) * Toshiba Pasopia16 -###i386 +### i386 * Fujitsu FM-Towns -###[ARM](architectures/arm.md) +### [ARM](architectures/arm.md) * Acorn Archimedes ## Game Consoles -###6502 +### 6502 * [NES](architectures/nes.md) * Atari 5200/7800/XEGS * [PCEngine](architectures/pcengine.md)/[TurboGrafx](architectures/pcengine.md) -###6809 +### 6809 * Vectrex -###6800 +### 6800 * APF-M1000 -###CP1600 +### CP1600 * Intellivision -###8048 +### 8048 * Odyssey/Videopac Signetics-2650A * Emerson Arcadia-2001 -###68000 +### 68000 * Sega Megadrive/Genesis * SNK [NeoGeo](architectures/neogeo.md) * Amiga [CDTV](architectures/amiga_500.md) * Philips CD-i -###68020 +### 68020 * Amiga CD32 -i286 +### i286 * Tandy Memorex VIS -###i386 +### i386 * Fujitsu FM-Towns Marty -###65816 +### 65816 * [SNES](architectures/snes.md) -###ARM +### ARM * 3DO * Ouya -###PowerPC +### PowerPC * Apple/Bandai Pippin -###MIPS +### MIPS * Atari Jaguar * Nintendo64 @@ -227,54 +227,55 @@ i286 * PlayStation2 * Gamebox [GBX-1001](architectures/gbx1001.md) -###SuperH +### SuperH * Casio Loopy -###Atmega +### Atmega * [Uzebox](architectures/uzebox.md) ## handheld consoles: -###8048 + +### 8048 * Entex [Adventure Vision](architectures/adventurevision.md) -###Z80 +### Z80 * Sega [GameGear](architectures/segamastersystem.md) -###8080 +### 8080 * Nintendo [GameBoy](architectures/gameboy.md) -###6502 +### 6502 * Watara Supervision * NEC TurboExpress -###65SC02 +### 65SC02 * Atari [Lynx](architectures/atarilynx.md) -###TLCS900H +### TLCS900H * SNK [NeoGeo Pocket](architectures/neogeopocket.md) -###80186 +### 80186 * Bandai [Wonderswan](architectures/wonderswan.md) -###S1C33209 +### S1C33209 * Aquaplus [Piece](architectures/aquapluspiece.md) -###ARM +### ARM * GP2X * Pandora -###MIPS +### MIPS * Dingoo @@ -360,19 +361,19 @@ i286 * Sega [Model2](architectures/segamodel2.md) -###Hitachi SuperH +### Hitachi SuperH * Sega Hikaru/Aurora/Naomi * Kaneko SuperNova -###PowerPC +### PowerPC * Sega [Model3](architectures/segamodel3.md)/Triforce * Taito Type-Zero * Namco 357 * Konami M2/Viper/Hornet -###MIPS +### MIPS * SNK Hyper-NeoGeo64 * Taito FX-1B/G-Net @@ -382,11 +383,11 @@ i286 * Atari Cojag/Flagstaff/Phoenix/Seattle/Vegas/Denver * Konami Bemani 573/Twinkle/Karaoke -###ARM +### ARM * DataEast MLC/Simple156 -###i586 +### i586 * Sega Chihiro/Lindbergh * Taito Type-X/Type-X-Zero @@ -395,12 +396,12 @@ i286 * Cave PC * Midway Graphite -###amd64 +### amd64 * Sega Europa-R/RingEdge/RingWide/Nu * Taito Type-X2 * Konami Bemani PC Type 4 -###Konami Emotion-Engine (128bit) +### Konami Emotion-Engine (128bit) * Konami Bemani Python From a80ce70b332c7f59f55ceee2068c473c90c0942d Mon Sep 17 00:00:00 2001 From: MrKOSMOS Date: Thu, 21 Aug 2025 00:52:35 +0100 Subject: [PATCH 08/13] More link corrections Link fixes and consistency corrections --- docs/sgn.md | 2 +- docs/sin.md | 2 +- docs/sqr.md | 2 +- docs/stop.md | 1 + docs/str.md | 2 +- docs/tan.md | 4 ++-- docs/usr.md | 2 +- 7 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/sgn.md b/docs/sgn.md index c314471c0..6c2729531 100644 --- a/docs/sgn.md +++ b/docs/sgn.md @@ -12,7 +12,7 @@ Returns the sign of a numeric expression as follows: * 0 if the number is zero * 1 if the number is positive -The returned value type is [byte](types.md#Byte). +The returned value type is [byte](types.md#integral). ## Examples diff --git a/docs/sin.md b/docs/sin.md index 7d68c967d..320a89874 100644 --- a/docs/sin.md +++ b/docs/sin.md @@ -9,7 +9,7 @@ SIN(numericExpression) ## Description Returns the sine value of the given argument. -Argument must be a numeric expression in radians units. Returned value type is [float](types.md#Float). +Argument must be a numeric expression in radians units. Returned value type is [float](types.md#float). ## Examples diff --git a/docs/sqr.md b/docs/sqr.md index dc7ac586e..796327b2e 100644 --- a/docs/sqr.md +++ b/docs/sqr.md @@ -10,7 +10,7 @@ SQR(numericExpression) ## Description Returns the square root value of the given argument. -Argument must be a numeric expression, and is returned as type [float](types.md#Float). +Argument must be a numeric expression, and is returned as type [float](types.md#float). ## Examples diff --git a/docs/stop.md b/docs/stop.md index 8c65e9110..a79084429 100644 --- a/docs/stop.md +++ b/docs/stop.md @@ -15,4 +15,5 @@ STOP ``` ## See Also + * [END](end.md) diff --git a/docs/str.md b/docs/str.md index 6009462ca..a09d735c7 100644 --- a/docs/str.md +++ b/docs/str.md @@ -10,7 +10,7 @@ STR() ## Description Converts the given numeric value to a String. It's the opposite of [VAL](val.md) -Returned value type is [String](types.md#UByte). +Returned value type is [String](types.md#integral). ## Examples diff --git a/docs/tan.md b/docs/tan.md index 096896370..81166cb73 100644 --- a/docs/tan.md +++ b/docs/tan.md @@ -11,7 +11,7 @@ TAN(numericExpression) ## Description Returns the tangent value of the given argument. -Argument must be a numeric expression in radians units. Returned value type is [float](types.md#Float). +Argument must be a numeric expression in radians units. Returned value type is [float](types.md#float). ## Examples @@ -31,4 +31,4 @@ PRINT "Tangent value of a is "; TAN(a) * [SIN](sin.md) and [ASN](asn.md) * [COS](cos.md) and [ACS](acs.md) * [ATN](atn.md) -* Faster library option for lower accuracy trigonometry for games: [FTAN](library/fsin.bas.md) +* Faster library option for lower accuracy trigonometry for games: [FTAN](library/fsin.bas.md#tangent-function) diff --git a/docs/usr.md b/docs/usr.md index 66d193edd..72e621edf 100644 --- a/docs/usr.md +++ b/docs/usr.md @@ -19,7 +19,7 @@ value (uInteger) returned by the function. If used with a string argument, it will return the UDG (User Defined Graphic) memory address of the first character of the string. For example, for the `\A` UDG, `USR "a"` will return the address of it. This function is case insensitive. -Returned value type is [UInteger](types.md#Integral). +Returned value type is [UInteger](types.md#integral). ## Examples From abfa829ecb1d990e1278b48ddd5106b58f76377c Mon Sep 17 00:00:00 2001 From: MrKOSMOS Date: Thu, 21 Aug 2025 01:02:36 +0100 Subject: [PATCH 09/13] Update const.md Further fixing const --- docs/const.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/const.md b/docs/const.md index e83e82c4e..538122d1f 100644 --- a/docs/const.md +++ b/docs/const.md @@ -13,7 +13,7 @@ CONST [AS ] = **CONST** declares a non-modifable variable. `` can be something like `Integer`, `Byte`, `Float`, etc. -See the list of [available types](types.md#types). If type is not specified, +See the list of [available types](types.md). If type is not specified, `Float` will be used, unless you use a modifier like `$` or `%`. ## Examples From 40c07d2f5f3e3f5c9648bdf60c016b5905430277 Mon Sep 17 00:00:00 2001 From: MrKOSMOS Date: Thu, 21 Aug 2025 01:07:33 +0100 Subject: [PATCH 10/13] Update inkey.md --- docs/inkey.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/inkey.md b/docs/inkey.md index 9cd702a20..b00f3ed45 100644 --- a/docs/inkey.md +++ b/docs/inkey.md @@ -29,4 +29,4 @@ The above code will echo keys pressed to the screen. Note that the loop has to b ## See also -* [INPUT](input.md) \ No newline at end of file +* [INPUT](input.md) From 4614c30982e0b8ccd9d90e1018abbf9c0341af84 Mon Sep 17 00:00:00 2001 From: MrKOSMOS Date: Thu, 21 Aug 2025 01:34:15 +0100 Subject: [PATCH 11/13] Reverting pointless changes --- docs/cos.md | 4 ++-- docs/function.md | 2 +- docs/in.md | 2 +- docs/sgn.md | 2 +- docs/sin.md | 2 +- docs/sqr.md | 2 +- docs/str.md | 2 +- docs/tan.md | 4 ++-- docs/usr.md | 2 +- docs/zxb.md | 6 +++--- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/cos.md b/docs/cos.md index 6e91a3160..7a2c34e81 100644 --- a/docs/cos.md +++ b/docs/cos.md @@ -10,7 +10,7 @@ COS(numericExpression) ## Description Returns the cosine value of the given argument. -Argument must be a numeric expression in radians units. Returned value type is [float](types.md#float). +Argument must be a numeric expression in radians units. Returned value type is [float](types.md#Float). ## Examples @@ -30,4 +30,4 @@ PRINT "Cosine value of a is "; COS(a) * [SIN](sin.md) and [ASN](asn.md) * [TAN](tan.md) and [ATN](atn.md) * [ACS](acs.md) -* Faster library option for lower accuracy trigonometry for games: [FCOS](library/fsin.bas.md#cosine-function) +* Faster library option for lower accuracy trigonometry for games: [FCOS](library/fsin.bas.md) diff --git a/docs/function.md b/docs/function.md index bad9fda71..f622874ae 100644 --- a/docs/function.md +++ b/docs/function.md @@ -58,7 +58,7 @@ END FUNCTION However, not using types explicitly might have a negative impact on performance. Better redefine it using data types. Factorial is usually defined on unsigned integers and also returns an unsigned integer. Also, keep in mind that factorial numbers tends to _grow up very quickly_ (e.g. Factorial of 10 is 3628800), -so `ULong` [type](types.md#integral) (32 bits unsigned) seems to be the most suitable for this function. +so `ULong` [type](types.md#Integral) (32 bits unsigned) seems to be the most suitable for this function. This version is faster (just the 1st line is changed): diff --git a/docs/in.md b/docs/in.md index d9bb6185e..c983f2253 100644 --- a/docs/in.md +++ b/docs/in.md @@ -11,7 +11,7 @@ IN ## Description Returns the byte value read in the given port. -Argument must be a numeric expression. Returned value type is [Ubyte](types.md#integral). +Argument must be a numeric expression. Returned value type is [Ubyte](types.md#Integral). ## Examples diff --git a/docs/sgn.md b/docs/sgn.md index 6c2729531..f4cc95247 100644 --- a/docs/sgn.md +++ b/docs/sgn.md @@ -12,7 +12,7 @@ Returns the sign of a numeric expression as follows: * 0 if the number is zero * 1 if the number is positive -The returned value type is [byte](types.md#integral). +The returned value type is [byte](types.md#Integral). ## Examples diff --git a/docs/sin.md b/docs/sin.md index 320a89874..7d68c967d 100644 --- a/docs/sin.md +++ b/docs/sin.md @@ -9,7 +9,7 @@ SIN(numericExpression) ## Description Returns the sine value of the given argument. -Argument must be a numeric expression in radians units. Returned value type is [float](types.md#float). +Argument must be a numeric expression in radians units. Returned value type is [float](types.md#Float). ## Examples diff --git a/docs/sqr.md b/docs/sqr.md index 796327b2e..dc7ac586e 100644 --- a/docs/sqr.md +++ b/docs/sqr.md @@ -10,7 +10,7 @@ SQR(numericExpression) ## Description Returns the square root value of the given argument. -Argument must be a numeric expression, and is returned as type [float](types.md#float). +Argument must be a numeric expression, and is returned as type [float](types.md#Float). ## Examples diff --git a/docs/str.md b/docs/str.md index a09d735c7..ca23138bf 100644 --- a/docs/str.md +++ b/docs/str.md @@ -10,7 +10,7 @@ STR() ## Description Converts the given numeric value to a String. It's the opposite of [VAL](val.md) -Returned value type is [String](types.md#integral). +Returned value type is [String](types.md#Integral). ## Examples diff --git a/docs/tan.md b/docs/tan.md index 81166cb73..096896370 100644 --- a/docs/tan.md +++ b/docs/tan.md @@ -11,7 +11,7 @@ TAN(numericExpression) ## Description Returns the tangent value of the given argument. -Argument must be a numeric expression in radians units. Returned value type is [float](types.md#float). +Argument must be a numeric expression in radians units. Returned value type is [float](types.md#Float). ## Examples @@ -31,4 +31,4 @@ PRINT "Tangent value of a is "; TAN(a) * [SIN](sin.md) and [ASN](asn.md) * [COS](cos.md) and [ACS](acs.md) * [ATN](atn.md) -* Faster library option for lower accuracy trigonometry for games: [FTAN](library/fsin.bas.md#tangent-function) +* Faster library option for lower accuracy trigonometry for games: [FTAN](library/fsin.bas.md) diff --git a/docs/usr.md b/docs/usr.md index 72e621edf..66d193edd 100644 --- a/docs/usr.md +++ b/docs/usr.md @@ -19,7 +19,7 @@ value (uInteger) returned by the function. If used with a string argument, it will return the UDG (User Defined Graphic) memory address of the first character of the string. For example, for the `\A` UDG, `USR "a"` will return the address of it. This function is case insensitive. -Returned value type is [UInteger](types.md#integral). +Returned value type is [UInteger](types.md#Integral). ## Examples diff --git a/docs/zxb.md b/docs/zxb.md index 38e26f1a9..298e936d9 100644 --- a/docs/zxb.md +++ b/docs/zxb.md @@ -159,7 +159,7 @@ messages (for example, to call ZX BASIC compiler from within an IDE). * **--array-base** -
Unlike original Sinclair BASIC, array indexes starts from 0, not from 1 (see [DIM](dim.md#array-declaration)). +
Unlike original Sinclair BASIC, array indexes starts from 0, not from 1 (see [DIM](dim.md#Array-Declaration)). You can change this behavior. For example setting `--array-base=1` will make array indexes start from 1 (like in Sinclair BASIC). This option (array-base=1) is active when `--sinclair` compatibility flag is specified. @@ -211,9 +211,9 @@ This option is really useful and you should enable it for large programs. * **--strict**
Requires all variables (and parameters and functions!) to have an explicit type declared -(e.g. [Uinteger](types.md#integral)). Otherwise, forgetting a type will cause an error and the program won't compile. +(e.g. [Uinteger](types.md#Integral)). Otherwise, forgetting a type will cause an error and the program won't compile. This is very useful to avoid forgetting type declarations. When the type is explicitly declared the compiler can make better assumptions and further error checking and optimizations. -This is all you need to know to use the compiler. Proceed to the [ZX BASIC](index.md#language-reference) page for a +This is all you need to know to use the compiler. Proceed to the [ZX BASIC](index.md#Language-Reference) page for a language reference. From d6cb4d8b29fca741edcc038cf562d0134a3bdd43 Mon Sep 17 00:00:00 2001 From: MrKOSMOS Date: Thu, 21 Aug 2025 01:38:10 +0100 Subject: [PATCH 12/13] Unnecessary files for now --- docs/pragma.md | 3 --- docs/scope.md | 0 2 files changed, 3 deletions(-) delete mode 100644 docs/pragma.md delete mode 100644 docs/scope.md diff --git a/docs/pragma.md b/docs/pragma.md deleted file mode 100644 index 1f4b394be..000000000 --- a/docs/pragma.md +++ /dev/null @@ -1,3 +0,0 @@ -# Pragma - -Placeholder file as requested by DIM.md diff --git a/docs/scope.md b/docs/scope.md deleted file mode 100644 index e69de29bb..000000000 From 7b858ce4e58d5141130afa31f0f282864fda11ea Mon Sep 17 00:00:00 2001 From: MrKOSMOS Date: Fri, 22 Aug 2025 00:12:06 +0100 Subject: [PATCH 13/13] Link fixes Fixing outdated web links in released_programs.md and a more direct link to ASM tutorial in index.md --- docs/index.md | 2 +- docs/released_programs.md | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/index.md b/docs/index.md index 66d7c6a63..3eb16e062 100644 --- a/docs/index.md +++ b/docs/index.md @@ -63,7 +63,7 @@ Get the latest version of Boriel BASIC from the [archive](archive.md).
Library of functions and subroutines you can use in your programs. You might find them really useful. ## Inline assembler -Embedding inline assembler in your code is pretty easy. There's a [tutorial](tutorials.md) on it. +Embedding inline assembler in your code is pretty easy. There's a [tutorial](tutorials.md#how-to-use-inline-assembly) on it. ## Compiler internals Only for true hackers: This explains how the compiler does its job, how to expand it, etc. diff --git a/docs/released_programs.md b/docs/released_programs.md index 0be3ff88e..a24282e87 100644 --- a/docs/released_programs.md +++ b/docs/released_programs.md @@ -111,7 +111,7 @@ Year: 2011 Source: Yes -Link: [http://www.mojontwins.com/csscgc2011/nitrofurano-bacaball/](http://www.mojontwins.com/csscgc2011/nitrofurano-bacaball/) +Link: [https://web.archive.org/web/20241102042243/http://www.mojontwins.com/csscgc2011/nitrofurano-bacaball/](https://web.archive.org/web/20241102042243/http://www.mojontwins.com/csscgc2011/nitrofurano-bacaball/) ![Bacaball.png](img/games/bacaball.png) @@ -126,7 +126,7 @@ Year: 2011 Source: Yes -Link: [http://www.mojontwins.com/csscgc2011/nitrofurano-bacachase/](http://www.mojontwins.com/csscgc2011/nitrofurano-bacachase/) +Link: [https://web.archive.org/web/20241010222443/http://www.mojontwins.com/csscgc2011/nitrofurano-bacachase/](https://web.archive.org/web/20241010222443/http://www.mojontwins.com/csscgc2011/nitrofurano-bacachase/) ![Bacachase.png](img/games/bacachase.png) @@ -383,7 +383,7 @@ Year: 2013 Source: Yes -Link: [http://notimetoplay.org/our-games/escape-from-cnossus/](http://notimetoplay.org/our-games/escape-from-cnossus/) +Link: [https://notimetoplay.org/games/roguelike/escape-from-cnossus/](https://notimetoplay.org/games/roguelike/escape-from-cnossus/) ![cnossus.png](img/games/cnossus.png) @@ -503,7 +503,7 @@ Year: 2012 Source: Yes -Link: [https://www.yoursinclair.co.uk/csscgc/csscgc.cgi?search=0301180542lookingforacsscgc2012theme_20120301145340.zip](https://www.yoursinclair.co.uk/csscgc/csscgc.cgi?search=0301180542lookingforacsscgc2012theme_20120301145340.zip) +Link: [https://www.yoursinclair.co.uk/csscgc/csscgc.cgi?search=lookingforacsscgc2012theme](https://www.yoursinclair.co.uk/csscgc/csscgc.cgi?search=lookingforacsscgc2012theme) Description: optimized for ULA-Plus palette @@ -535,7 +535,7 @@ Year: 2011 Source: Yes -Link: [http://www.mojontwins.com/csscgc2011/paulo-silva-memorama/](http://www.mojontwins.com/csscgc2011/paulo-silva-memorama/) +Link: [https://web.archive.org/web/20240911054831/http://www.mojontwins.com/csscgc2011/paulo-silva-memorama/](https://web.archive.org/web/20240911054831/http://www.mojontwins.com/csscgc2011/paulo-silva-memorama/) ![Memorama.png](img/games/memorama.png) @@ -715,7 +715,7 @@ Year: 2011 Source: Yes -Link: [http://www.mojontwins.com/csscgc2011/nitrofurano-solitario/](http://www.mojontwins.com/csscgc2011/nitrofurano-solitario/) +Link: [https://web.archive.org/web/20200526010102/https://www.mojontwins.com/csscgc2011/nitrofurano-solitario/](https://web.archive.org/web/20200526010102/https://www.mojontwins.com/csscgc2011/nitrofurano-solitario/) ![Solitario.png](img/games/solitario.png) @@ -745,7 +745,7 @@ Year: 2013 Source: Yes -Link: [https://www.boriel.com/forum/showthread.php?tid=410&highlight=speccywars](https://www.boriel.com/forum/showthread.php?tid=410&highlight=speccywars) +Link: [https://www.boriel.com/forum/showthread.php?tid=410](https://www.boriel.com/forum/showthread.php?tid=410) ![Speccywars.png](img/games/speccywars.png) @@ -775,7 +775,7 @@ Year: 2012 Source: No -Link: [http://cgc.zx.gen.tr/index.php?game=0628182038](http://cgc.zx.gen.tr/index.php?game=0628182038) +Link: [https://zx.gen.tr/cgc/index.php?game=0628182038](https://zx.gen.tr/cgc/index.php?game=0628182038) ![Splash.gif](img/games/splash.gif) @@ -835,7 +835,7 @@ Year: 2011 Source: No -Link: [http://www.mojontwins.com/csscgc2011/jbgv-uchi-danza/](http://www.mojontwins.com/csscgc2011/jbgv-uchi-danza/) +Link: [https://web.archive.org/web/20111122000131/https://www.mojontwins.com/csscgc2011/jbgv-uchi-danza/](https://web.archive.org/web/20111122000131/https://www.mojontwins.com/csscgc2011/jbgv-uchi-danza/) ![UchiDanza.png](img/games/uchidanza.png) @@ -990,7 +990,7 @@ Year: 2016 Source: No -Link: [http://www.boriel.com/forum/gallery/ems-christmas-card-demo-t1102.html](http://www.boriel.com/forum/gallery/ems-christmas-card-demo-t1102.html) +Link: [https://www.boriel.com/forum/showthread.php?tid=764](https://www.boriel.com/forum/showthread.php?tid=764) ![EmsChristmasCardDemo.png](img/games/emschristmascarddemo.png) @@ -1005,7 +1005,7 @@ Year: 2016 Source: No -Link: [http://www.boriel.com/forum/gallery/jrpg-test-and-tileeditor-t1082.html](http://www.boriel.com/forum/gallery/jrpg-test-and-tileeditor-t1082.html) +Link: [https://www.boriel.com/forum/showthread.php?tid=747](https://www.boriel.com/forum/showthread.php?tid=747) ![JRPGTest.png](img/games/jrpgtest.png) @@ -1020,7 +1020,7 @@ Year: 2016 Source: No -Link: [http://www.boriel.com/forum/gallery/just-something-silly-t1095.html](http://www.boriel.com/forum/gallery/just-something-silly-t1095.html) +Link: [https://www.boriel.com/forum/showthread.php?tid=757](https://www.boriel.com/forum/showthread.php?tid=757) Description: @@ -1137,7 +1137,7 @@ Year: 2013 Source: Yes -Link: [https://www.boriel.com/forum/showthread.php?tid=529&pid=3334#pid3334](https://www.boriel.com/forum/showthread.php?tid=529&pid=3334#pid3334) +Link: [https://www.boriel.com/forum/showthread.php?tid=529](https://www.boriel.com/forum/showthread.php?tid=529) ![P3efilebrowser.png](img/games/p3efilebrowser.png)