News:

;) This forum is the property of Proton software developers

Main Menu

bitwise complement and array elements

Started by puffeltje, Jun 11, 2021, 10:03 PM

Previous topic - Next topic

puffeltje

i can't get the bitwise complement working on array elements. I made a small test procedure in positron8:

PROC test()
DIM xx AS BYTE = 0
DIM yy[2] AS BYTE = 0, 0

xx = %01110000
yy[1] = %01110000

HRSOUTLN BIN8 xx, "   ", BIN8 ~xx
HRSOUTLN BIN8 yy[1], "   ", BIN8 ~yy[1]
ENDPROC

when i run this code i get these results back:

01110000   10001111
01110000   10010000

The first line is correct but the second isn't. i know, i can solve the problem by first filling a byte with the array element and then do the bitwise operation with the byte.
I have a mind like a clock. And like a clock, it regularly goes cuckoo...!

top204

#1
For that particular complement of a byte array within a modifier, I mistakenly used the Sublw mnemonic, instead of the Comf mnemonic in the compiler's not_wreg_wreg function. I must have gotten the not and minus function mixed up and used the incorrect mnemonic when the source and the destination are both WREG, and that has been with the compiler from, literally, day one. :-)

I'll be correcting it and uploading an update ASAP, however, I have some issues at the moment because my lovely mum passed away a few days ago, so my mind is elsewhere. :-( She was 87 and I've had some people say "she had a good innings", but there is "never" a good innings for your mum or dad and you want them around forever. I truly miss her so much. :-(

I know it is innevitable, but you always think "in the future, in the future", and when the future happens now, it hurts like hell. But my mum is now with the man she loved dearly and they will be hugging each other as they used to do when I was growing up. :-) To us, seeing mum and dad having a hug with a small kiss every now and then was normal, but none of my friends parents did it. Just a few months before my dad passed back in 1983, he said to me on our regular visits to our shed to build things, "I love your mum more now that I did when I first married her", and that was after 25 years of marriage.

I was so lucky to have two wonderful people as mum and dad.

basiclover

LES I share your sadness. I remember it's always a painful moment.
But you have a lot of friends here that will help you overcome this misfortune

okmn

I know very well the sadness of losing a mother.
My mother also passed away in 1996.
my God will have mercy to them,
I wish patience to those they left behind..(to all those who love them).

Yasin

-May their eternal place be heaven.

-I guess it is not possible to translate it into English meaningfully. That's why I wanted to share it in my own language.

QuoteAnne başta tac imiş.
Her derde ilaç imiş.
Bir evlat pir olsa da.
Anneye muhtaç imiş.

OG

Quote from: top204 on Jun 12, 2021, 09:28 AMbecause my lovely mum passed away a few days ago, so my mind is elsewhere. :-(
I was highly sad to learn.
I pray that God will grant you the strength. My most sincere condolences.


Giuseppe


gtvpic

I'm sorry Les, my condolences and support for what I can help you
It is the law of life, but very hard for everyone.

Giuseppe MPO


HAL