Incongruity of the PIXEL function

Post here to share useful tips and tricks, to ask questions about using your DM42 or to report software-related problems
Post Reply
User avatar
PierreMengisen
Posts: 252
Joined: Wed Nov 29, 2017 1:38 pm
Location: Neuchâtel CH

Incongruity of the PIXEL function

Post by PierreMengisen »

Incongruité de la fonction PIXEL
J'utilise la fonction PIXEL avec des arguments sous forme COMPLEX. C'est pratique, surtout en mode POLAR.
Mais lorsque j'utilise PIXEL avec des arguments en mode REAL, ces arguments sont inversés.
Exemple: en MODE DEG et POLA, GrMod =3
100.00 ∡30.000
PIXEL
COMPLEX
PIXEL
Les deux PIXEL ne donnent pas le même résultat, Les arguments sont inversés. Pas logique !!!
Je dois remplacer PIXEL par
LBL "PIXON"
REAL?
X<>Y
PIXEL
REAL?
X<>Y
END
A méditer.

D'autre part, ne pourrait-on pas obtenir une fonction PIXOFF pour éteindre 1 PIXEL ? Cela me rendrait bien service.
Mais je pense qu'il s'agit d'un problème de soft interne. Alors ce serait un souhait pour une nouvelle version.


I use the PIXEL function with arguments in COMPLEX form. It's convenient, especially in POLAR mode.
But when I use PIXEL with arguments in REAL mode, these arguments are reversed.
Example: in MODE DEG and POLA, GrMod = 3
100.00 ∡30.000
PIXEL
COMPLEX
PIXEL
The two PIXEL do not give the same result, The arguments are reversed. Illogical !!!
I have to replace PIXEL by
LBL "PIXON"
REAL?
X <> Y
PIXEL
REAL?
X <> Y
END
To meditate.

On the other hand, could not we get a PIXOFF function to turn off 1 PIXEL? It would do me good service.
But I think this is an internal soft problem. So that would be a wish for a new version.
Pierre
[TI59 with PC100C; TI-84 Plus CE-T; HP41CV with HP IL loop & 2*82161A DCD & 82162 TP; HP15C; HP28S; DM41; DM41L; DM42; DM41X]
whuyse
Posts: 167
Joined: Thu Dec 21, 2017 1:23 pm

Re: Incongruity of the PIXEL function

Post by whuyse »

Unfortunately, this is exactly how the HP42S behaves as well.
Cheers. Werner
42S #3249S01123
DM42 #00345
DM41X #01215
whuyse
Posts: 167
Joined: Thu Dec 21, 2017 1:23 pm

Re: Incongruity of the PIXEL function

Post by whuyse »

Code: Select all

LBL “PIXOFF”
“x”
SF 34
AGRAPH
CF 34
END
The “x” is the multiplication sign.
To be foolproof, the program would have to save the state of flags 34 and 35, then set 34 and clear 35, do AGRAPH and restore flags 34 and 35 to their original settings. But by default they are both clear, so..

Cheers,
Werner
42S #3249S01123
DM42 #00345
DM41X #01215
User avatar
PierreMengisen
Posts: 252
Joined: Wed Nov 29, 2017 1:38 pm
Location: Neuchâtel CH

Re: Incongruity of the PIXEL function

Post by PierreMengisen »

Thank you for the PIXOFF. That's exactly what i need. :P :P :P :P :P
Attachments
image.png
image.png (777 Bytes) Viewed 4964 times
Pierre
[TI59 with PC100C; TI-84 Plus CE-T; HP41CV with HP IL loop & 2*82161A DCD & 82162 TP; HP15C; HP28S; DM41; DM41L; DM42; DM41X]
keithdalby
Posts: 564
Joined: Mon Apr 24, 2017 8:38 pm

Re: Incongruity of the PIXEL function

Post by keithdalby »

What do flags 34 and 35 do? I don't understand that PIXOFF program.
whuyse
Posts: 167
Joined: Thu Dec 21, 2017 1:23 pm

Re: Incongruity of the PIXEL function

Post by whuyse »

From the manual:
F34 F35 AGRAPH behaviour
C C The image is merged with the existing display (logical OR) -- default state
C S The image overwrites all pixels in that portion of the display
S C Duplicate 'on' pixels are turned 'off'
S S All pixels are reversed (logical XOR)

Cheers, Werner
42S #3249S01123
DM42 #00345
DM41X #01215
mcc
Posts: 272
Joined: Fri Jun 23, 2017 5:10 am

Re: Incongruity of the PIXEL function

Post by mcc »

Hi,

is there a way to have the flags 34/35 settings not only for AGRAPH but also for PIXEL?

Cheers
Meino
DM 42 - SN: 00373, Firmware release v.:3.20. / DMCP 3.22. as compiled by SwissMicros
grsbanks
Posts: 1122
Joined: Tue Apr 25, 2017 11:23 am
Location: Preston, Lancs, UK
Contact:

Re: Incongruity of the PIXEL function

Post by grsbanks »

Not without changing behaviour away from how the HP-42S works. Legacy HP-42S programs might rely on the specific behaviour of PIXEL and would cease to function properly if this were changed. Bad idea.
There are only 10 kinds of people in the world: those who understand binary and those who do not.
keithdalby
Posts: 564
Joined: Mon Apr 24, 2017 8:38 pm

Re: Incongruity of the PIXEL function

Post by keithdalby »

I've not used AGRAPH, but surely it should be possible to AGRAPH a single pixel (what character would that be)? In which case, a simple RPN routine could be written to turn off pixels.
whuyse
Posts: 167
Joined: Thu Dec 21, 2017 1:23 pm

Re: Incongruity of the PIXEL function

Post by whuyse »

That is possible indeed.
See the 3rd post in this thread ;-)

Cheers, Werner
42S #3249S01123
DM42 #00345
DM41X #01215
Post Reply