diff --git a/docs/source/programming.rst b/docs/source/programming.rst index 9a7331ce4..27295b4bb 100644 --- a/docs/source/programming.rst +++ b/docs/source/programming.rst @@ -177,6 +177,10 @@ for instance. .. todo:: matrix datatype +.. todo:: + There must be a way to tell the compiler which variables you require to be in Zeropage: + ``zeropage`` modifier keyword on vardecl perhaps? + Variables that represent CPU hardware registers ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -203,6 +207,13 @@ address you specified, and setting the varible will directly modify that memory memory word SCREENCOLORS = $d020 ; a 16-bit word at the addres $d020-$d021 +.. note:: + Directly accessing random memory locations is not yet supported without the + intermediate step of declaring a memory-mapped variable for the memory location. + The advantages of this however, is that it's clearer what the memory location + stands for, and the compiler also knows the data type. + + Integers ^^^^^^^^ @@ -460,6 +471,12 @@ len(x) Number of values in the non-scalar (array or matrix) value x. (This is different from the number of *bytes* in memory if the datatype isn't byte) +lsb(x) + Get the least significant byte of the word x. + +msb(x) + Get the most significant byte of the word x. + any(x) 1 ('true') if any of the values in the non-scalar (array or matrix) value x is 'true' (not zero), else 0 ('false') diff --git a/docs/source/syntaxreference.rst b/docs/source/syntaxreference.rst index 8b34fc639..43749a2c3 100644 --- a/docs/source/syntaxreference.rst +++ b/docs/source/syntaxreference.rst @@ -54,23 +54,24 @@ Directives .. data:: %zeropage