refactor with simple macros to ease reading and updating#15
refactor with simple macros to ease reading and updating#15PerditionC wants to merge 7 commits intomasterfrom
Conversation
…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
|
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. |
|
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 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? |
|
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 |
|
Macro Magic makes it readable! |
|
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. |
|
Replaced with #16 |
refactor with simple macros to ease reading and updating; add some entries