From e0315bffdc5664f402293182144e0a7b36640f22 Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Tue, 15 Dec 2020 22:25:06 +0100 Subject: [PATCH] decided not to change mkword() again, added note to docs about argument order --- docs/source/programming.rst | 6 ++++++ docs/source/todo.rst | 1 - examples/compiled/balloonflight.prg | Bin 2889 -> 2889 bytes 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/source/programming.rst b/docs/source/programming.rst index 4ba8a5e52..5575cf69f 100644 --- a/docs/source/programming.rst +++ b/docs/source/programming.rst @@ -836,6 +836,12 @@ mkword(msb, lsb) Efficiently create a word value from two bytes (the msb and the lsb). Avoids multiplication and shifting. So mkword($80, $22) results in $8022. + .. note:: + The arguments to the mkword() function are in 'natural' order that is first the msb then the lsb. + Don't get confused by how the system actually stores this 16-bit word value in memory (which is + in little-endian format, so lsb first then msb) + + rnd() returns a pseudo-random byte from 0..255 diff --git a/docs/source/todo.rst b/docs/source/todo.rst index 0e3774a34..69ce21186 100644 --- a/docs/source/todo.rst +++ b/docs/source/todo.rst @@ -2,7 +2,6 @@ TODO ==== -- (thinking about) reverse mkword() again because of consistency with the platform and AY register pairs...?? - see if we can group some errors together for instance the (now single) errors about unidentified symbols - Cx16 target: support full-screen 640x480 and 320x240 graphics? That requires our own custom graphics routines though to draw lines. - hoist all variable declarations up to the subroutine scope *before* even the constant folding takes place (to avoid undefined symbol errors when referring to a variable from another nested scope in the subroutine) diff --git a/examples/compiled/balloonflight.prg b/examples/compiled/balloonflight.prg index 0dd542ffd13a00764c16992c22208f28654c2a0d..95a8476d0b0b0fc6be91a05a7dc7d71a3ee0b4b7 100644 GIT binary patch delta 25 hcmX>pc2aCY7~_eJ;osO8*(dw4>oYQJu46yV3;=xi2$%o> delta 25 hcmX>pc2aCY7^B9<@NaC443quX^%>bW*Rh{w1^{u62lxO0