Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

readexe version 0.1 (Announce)

posted by tkchia Homepage, 10.08.2023, 21:08

Hello segin,

Welcome!

> bitfields by OR/XOR/ANDing together preprocessor macros onto a single
> integer value holding all the flags is NOT allowed; C99 is the rule and
> bitfields are how we do. Any code using preprocessor macros with hex values
> to be OR/XOR/ANDed to a raw integer shall be rejected for this reason. Use
> C99 bitfields if you want to contribute.

Well, I like me some bit-fields myself, when I can use them. The fact though is that they are famously unportable, and therefore less than useful when dealing with binary formats over a network. N1570 (the final draft of the C11 standard) says under 6.7.2.1,

> The order of allocation of bit-fields within a unit (high-order to low-order or low-order to high-order) is implementation-defined. The alignment of the addressable storage unit is unspecified.

I would say that it is best to keep that in mind.

Thank you!

---
https://gitlab.com/tkchia · https://codeberg.org/tkchia · 😴 "MOV AX,0D500H+CMOS_REG_D+NMI"

 

Complete thread:

Back to the forum
Board view  Mix view
22632 Postings in 2109 Threads, 402 registered users, 383 users online (1 registered, 382 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum