SDL-Hercules-390 / hyperion

The SDL Hercules 4.x Hyperion version of the System/370, ESA/390, and z/Architecture Emulator
Other
237 stars 89 forks source link

IMAPS struct for icount command #622

Closed salva-rczero closed 6 months ago

salva-rczero commented 6 months ago

An attempt to use strucs within structs, to avoid hardcode in IMAP_FIRST & IMAP_SIZE.

wrljet commented 6 months ago

Fish, you're up late tonight. Me, too. :)

salva-rczero commented 6 months ago

The key is to avoid to update IMAP_SIZE if you need a new one:

#define IMAP_SIZE \
            ( sizeof(sysblk.imap01) \
            + sizeof(sysblk.imapa4) \
            + sizeof(sysblk.imapa5) \
...

that I forget in my first addition of imape7, imape7T.

So, IMAP_SIZE must to be carefully, and manually, maintained. While sizeof sysblk.imaps is done automatically by the compiler.

I agree that it is not a very frequent change, but after many decades supporting a large installation, I learned that many errors are due to the data structures and not so much to the code.

Fish-Git commented 6 months ago

Merged!