Bug in global LBL generation on dm41.swissmicros.com

If you think you've found a bug in one of these machines, post about it here indicating the steps you perform in order to reproduce it.

Please prefix your topic with the model number in question and firmware version this way:

[DM16 V22] CHS gives unexpected results
Post Reply
Bernd
Posts: 9
Joined: Sat Jul 22, 2017 8:17 pm

Bug in global LBL generation on dm41.swissmicros.com

Post by Bernd » Mon Oct 09, 2017 8:59 pm

There seems of be a bug in the generation of the first global label generation.
The first global LBL in RAM should have a byte code of the structure "c0 00 fn 00 <n-chars>". The three zero nybbles after the C denote the byte distance to the previous global LBL. In case of the first LBL, the distance must be zero.

The generated code generated by pressing the "<-- Encode --" is correct, when the first instruction in the code listing is a global LBL.
E.g.:

Code: Select all

LBL "X"
+
results in

Code: Select all

DM41
08  4b000000000000  00000000000000  00000000000000  00000000000000
0c  1000000000019c  1a70016919c19a  0000002c048000  00000000000000
198  00000000000000  00000000000000  00000000c8012f  c000f200584000
...
The byte code "c0 00 f2 00 58" in register 19b means LBL "X".

When I swap the two instructions:

Code: Select all

+
LBL "X"
the distance information is incorrect:

Code: Select all

DM41
08  4b000000000000  00000000000000  00000000000000  00000000000000
0c  1000000000019c  1a70016919c19a  0000002c048000  00000000000000
198  00000000000000  00000000000000  00000000c6012f  40c200f2005800
...
I discovered this bug when trying to upload the "LBX" program of K. Jarett's "Synthetic programming made easy", which starts with a LBL 01.
As a obvious workaround I have put a global LBL at the beginning of the listing, which I later removed on the DM-41L.

Post Reply