Addressing individual bits in a byte

10 views
Skip to first unread message

FraserSmith51

unread,
Feb 4, 2026, 5:28:29 PM (8 days ago) Feb 4
to jallist
I would like to be able to use the lower four bits of a byte to store the status of four outputs. The store would be into a byte variable and that would then be stored in EEPROM. I would then like to read from EEPROM and allocate the four bits to bit variables.

I'm sure that I've seen this before but I can't find any mention of such a thing in the documentation. I sem to remember that a colon : was involved. 

Any help would be much appreciated.

TIA

Fraser

Mike

unread,
Feb 4, 2026, 6:22:50 PM (8 days ago) Feb 4
to jallist
Yes, and you can see it right in the chip definition files.

var byte giraffe
var bit g0 at giraffe : 0
var bit g1 at giraffe : 1

FraserSmith51

unread,
Feb 5, 2026, 2:45:41 AM (8 days ago) Feb 5
to jallist
Thanks Mike,

I don't know where I came across it before but had not thought to look  in the chip file. I think it would be useful if something could be included in the JALV2 document.

Cheers

Fraser

Rob CJ

unread,
Feb 5, 2026, 3:10:50 PM (7 days ago) Feb 5
to jal...@googlegroups.com
Hi Fraser,

The following is in the jalv2 compiler documentation which you can find in the compiler directory of the Jallib release.

Kind regards,

Rob


Van: jal...@googlegroups.com <jal...@googlegroups.com> namens FraserSmith51 <fra...@cairntoul.net>
Verzonden: donderdag 5 februari 2026 08:45
Aan: jallist <jal...@googlegroups.com>
Onderwerp: [jallist] Re: Addressing individual bits in a byte
 
--
You received this message because you are subscribed to the Google Groups "jallist" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jallist+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/jallist/425a0eb1-a5cc-46d3-92aa-67615bef51a8n%40googlegroups.com.

FraserSmith51

unread,
Feb 6, 2026, 12:09:20 PM (6 days ago) Feb 6
to jallist
Thanks Rob

Just thought that I should have done a search for a colon and it would have taken me to that section. Unfortunately the PDF search won't search for the colon on its own so I don't feel quite so bad.

Code now setup and working as far as this part of the program that I'm working on. The support from this Forum is a great thing to have access to.

Cheers

Fraser
Reply all
Reply to author
Forward
0 new messages