Skip to content

refactor with simple macros to ease reading and updating#15

Closed
PerditionC wants to merge 7 commits intomasterfrom
entry_simplify
Closed

refactor with simple macros to ease reading and updating#15
PerditionC wants to merge 7 commits intomasterfrom
entry_simplify

Conversation

@PerditionC
Copy link
Contributor

refactor with simple macros to ease reading and updating; add some entries

  • add South Africa (za), Mexico (mx), Indonesia (id), Philippines (ph), New Zealand (nz), Thailand (th), Vietnam (vn), Luxembourg (lu), Ireland (ie), Albania (al), Malta (mt), Cyprus (cy)
  • split Czechoslovakia (cz) into Czech Repulic (cz) and Slovakia (sk)
  • obsolete Yugoslavia (yu) & Czechoslovakia (cz) - can still be included by defining %OBSOLETE% when building
  • change Bulgaria to use Euro for currency, currency changed Jan 2026
  • internal only, rename Macedonia to North Macedonia

…tries

- add South Africa (za), Mexico (mx), Indonesia (id), Philippines (ph), New Zealand (nz), Thailand (th), Vietnam (vn), Luxembourg (lu), Ireland (ie), Albania (al), Malta (mt), Cyprus (cy)
- split Czechoslovakia (cz) into Czech Repulic (cz) and Slovakia (sk)
- obsolete Yugoslavia (yu) & Czechoslovakia (cz) - can still be included by defining %OBSOLETE% when building
- change Bulgaria to use Euro for currency, currency changed Jan 2026
- internal only, rename Macedonia to North Macedonia
@PerditionC
Copy link
Contributor Author

working to fixup validation and any validations that fail. Hopefully no typos, big change will need some native speakers to verify I didn't break anything. Considering a larger refactoring once this is committed that reorganizes file somewhat - need to verify structure layout isn't doesn't effect kernel loading (shouldn't be, but need to look that interleaving entries and subfunctions tables doesn't cause problems). The reorg would be a new macro to simplify the layout even more, remove the use of 2-alpha country code internally (not used externally, external references are keyed by numerical country code and code page#) and create both entry, subfunction header, and country info (cnf) structures from a single macro reducing potential typos further.

@andrewbird
Copy link
Contributor

Lots of changes here. I did spot one oddity.

country.asm:YESNO yn_me_864, 0F2h, 0, 9Dh, 0       ; CP864 (Arabic)
country.asm:xx_yn_864 equ yn_me_864        ; CP864 Arabic: (Na'am/La)

Should be yn_xx now for Middle East (Arabic)

Also how do you account for the number of entries being different if OLD_ENTRY is used? Is it possible to have NASM calculate the number based on (end - start ) / sizeof entry? Are forward references allowed in NASM calculations?

@PerditionC
Copy link
Contributor Author

good catch. I will fix that missed me reference. I have a simple fix locally that changes count based on OBSOLETE define, but I want to look further into defining it by assembler. I will be updating verification script shortly with updated regexes

@andrewbird
Copy link
Contributor

Macro Magic makes it readable!

@PerditionC PerditionC mentioned this pull request Feb 1, 2026
@PerditionC
Copy link
Contributor Author

PerditionC commented Feb 2, 2026

I have an updated macro that combines ENTRY, SUBFUNC_HEADER, and cnf into a single row, which should make updates and reading even easier. I am working on integrating it. Should be posting a new pull request tomorrow (maybe later tonight) which includes all the changes of this one, but using the new COUNTRY, OLD_COUNTRY macros.

@PerditionC PerditionC mentioned this pull request Feb 2, 2026
@PerditionC
Copy link
Contributor Author

Replaced with #16

@PerditionC PerditionC closed this Feb 2, 2026
@PerditionC PerditionC deleted the entry_simplify branch February 11, 2026 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants