[DM42 Bug?] CLLCD not working right

Post here to share useful tips and tricks, to ask questions about using your DM42 or to report software-related problems
Post Reply
keithdalby
Posts: 463
Joined: Mon Apr 24, 2017 6:38 pm

[DM42 Bug?] CLLCD not working right

Post by keithdalby » Mon Apr 02, 2018 4:21 pm

After printing the LCD, CLLCD isn't clearing the LCD before PIXEL draws pixels. Best to explain with the code below:

Code: Select all

LBL "TEST"
MAN
PRON
0
STO "GrMod"
5
5
CLLCD
PIXEL
PRLCD
CLLCD
2
STO "GrMod"
100
100
CLLCD
PIXEL
END
The code sticks a pixel at 5,5 in GrMod 0, prints, then attempts to show a pixel at 100,100 in GrMod 2, but the CLLCDs aren't doing what I'd expect them to do.

Is this normal behaviour or a bug?

whuyse
Posts: 19
Joined: Thu Dec 21, 2017 12:23 pm

Re: [DM42 Bug?] CLLCD not working right

Post by whuyse » Tue Apr 03, 2018 7:36 am

I altered the program to remove the printing commands, and added a STOP after the first PIXEL. Executing first shows the pixel at (5,5).
Upon pressing R/S, the busy annunciator remains lit, and the result of drawing the pixel at (100,100) is not shown. Pressing PRGM shows the code has run till the end (RTN before the LBL 14).
If I remove the CLLCD right after the stop it works OK.
I must say I tried it first with the printing commands, then turned printing off with PROFF and removed the commands. Firmware 3.5.

Code: Select all

>LBL "TEST"
0
XEQ 14
5
ENTER
CLLCD
PIXEL
STOP
CLLCD
2
XEQ 14
100
ENTER
CLLCD
PIXEL
RTN
>LBL 14
STO "GrMod"
END
Cheers, Werner
42S #3249S01123
DM42 #00345

keithdalby
Posts: 463
Joined: Mon Apr 24, 2017 6:38 pm

Re: [DM42 Bug?] CLLCD not working right

Post by keithdalby » Tue Apr 03, 2018 11:22 am

whuyse wrote:
Tue Apr 03, 2018 7:36 am
If I remove the CLLCD right after the stop it works OK.
Thanks for looking at this. I ran the code as you wrote it and had exactly the same behaviour whether I include the CLLCD just after the STOP or not. The CLLCD is not CLing the LCD. Same firmware as you.

Now, if I run up to the stop, then type something into the X register before resuming with R/S, I get the expected behaviour. So, I conclude that CLLCD isn't working right

mcc
Posts: 136
Joined: Fri Jun 23, 2017 3:10 am

Re: [DM42 Bug?] CLLCD not working right

Post by mcc » Tue Apr 03, 2018 12:05 pm

Hi,

just a quick guess:
Is this dependant on the refresh settings via virtual variables for the LCD?

Cheers!
Meino
DM 42 - SN: 00373, Firmware v.:3.5

keithdalby
Posts: 463
Joined: Mon Apr 24, 2017 6:38 pm

Re: [DM42 Bug?] CLLCD not working right

Post by keithdalby » Wed Apr 04, 2018 9:56 am

mcc wrote:
Tue Apr 03, 2018 12:05 pm
Is this dependant on the refresh settings via virtual variables for the LCD?
Afraid not. Tried with every permissible value of RefLCD, and got exactly the same broken behaviour.

Thomas Okken
Posts: 439
Joined: Tue May 02, 2017 3:48 pm
Contact:

Re: [DM42 Bug?] CLLCD not working right

Post by Thomas Okken » Sat Apr 07, 2018 9:07 pm

whuyse wrote:
Tue Apr 03, 2018 7:36 am
I altered the program to remove the printing commands, and added a STOP after the first PIXEL. Executing first shows the pixel at (5,5).
Upon pressing R/S, the busy annunciator remains lit, and the result of drawing the pixel at (100,100) is not shown. Pressing PRGM shows the code has run till the end (RTN before the LBL 14).
If the program pointer points *at* the RTN, something is wrong; the CLLCD has caused program execution to stop. When a program encounters a RTN with an empty return stack, it behaves like STOP, and the program pointer ends up pointing to the first line *after* the RTN.

whuyse
Posts: 19
Joined: Thu Dec 21, 2017 12:23 pm

Re: [DM42 Bug?] CLLCD not working right

Post by whuyse » Sun Apr 08, 2018 8:05 pm

Hi Thomas,
no, it points beyond the RTN, at LBL 14.
But something's wrong anyway: why is the busy annunciator lit, and the result not shown?
If I remove the CLLCD right after the STOP, it works as it should.
Perhaps it's the combination of CLLCD and subsequently changing GrMod that is the culprit.

Cheers, Werner
42S #3249S01123
DM42 #00345

keithdalby
Posts: 463
Joined: Mon Apr 24, 2017 6:38 pm

Re: [DM42 Bug?] CLLCD not working right

Post by keithdalby » Sun Apr 08, 2018 8:29 pm

whuyse wrote:
Sun Apr 08, 2018 8:05 pm
If I remove the CLLCD right after the STOP, it works as it should.
Not for me

User avatar
PierreMengisen
Posts: 5
Joined: Wed Nov 29, 2017 12:38 pm
Location: Neuchâtel CH

Re: [DM42 Bug?] CLLCD not working right

Post by PierreMengisen » Sat Apr 14, 2018 12:04 pm

[MD42 v3.5]

Je fais tous mes graphs en mode graphique 3. Jamais de problèmes.
Mais …
En mode graphique 2 et trois, l'instruction PIXEL génère automatiquement un CLLCD.
En mode 0, ce n'est pas le cas. De plus en mode 0, les pixels affichés sont formés d'une matrice de pixels-écran 3x4 ???
En mode 2 et 3 ils sont formés sur une matrice 2x2 et 1x1
Je pense donc qu'il ne faut pas mêler les sessions 0 avec celles en 2 ou 3.

I do all my graphics in graphic mode 3. Never have problems.
But ...
In Graph 2 and 3 mode, the PIXEL instruction automatically generates a CLLCD.
In mode 0, this is not the case. In addition to mode 0, the pixels displayed are formed of a matrix of 3x4 screen pixels ???
In mode 2 and 3 they are formed on a 2x2 and 1x1 matrix
So I think we should not mix sessions 0 with those in 2 or 3.

Pierre
Pierre
[TI59; HP41CV; HP15C; HP28S; DM41; DM41L; DM42]

Post Reply