Hello Vern,

thanks for your valuable input, well-apppreciated.


Am 10.07.2025 um 01:11 schrieb Vern Hamberg via MIDRANGE-L <midrange-l@xxxxxxxxxxxxxxxxxx>:

Hi Patrik

It would appear you do need to deal with hex values - but, as that article offers, do it once, give each item a name, there you are for the future.

Someone even suggested using BITOR - the protected state is set with the leftmost bit, which is 8 in the first nybble - so BITOR x'80' with the unprotect values, you have cut things in half.

And with BITOR, you don't need to deal with hex values - everything can be done with single byte integers, or int(3) in RPG. So to get the protected condition, use BITOR(128).

I know, my syntax is probably very incorrect, but I do hope the idea comes across. Here's another "bit" to think about - to a certain extent, it seems there are 3 bits that control RI, HI, and UL - at least in GREEN. That's 1, 2, and 4, resp. You "add" them up, or BITOR them, to get combinations. So RI HI is 3. ND is 7. Some of these end up with different colors - that's how BLUE and PINK are kind of connected. likewise, TURQUOISE and YELLOW. And the difference between the colors, except for RED, seems mostly to be 2 - so I see opportunites for simplifying all this, not needing to list all the possible combinations, rather, to use sets of attributes.

Okay, enough, but it'd be about getting set up, then it'd be pretty clean going therefrom, eh?

Yes, thanks!

Setting individual attributes algorithmically appeared naturally to me, once I found sources which bit does what. I documented my findings here: https://try-as400.pocnet.net/wiki/5250_colors_and_display_attributes

:wq! PoC



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.