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
replaces ENTRY, SUBFUNC_HEADER, and cnf macros (and related OLD_, etc) with a single macro row that generates all 3 structures (entry, subfunction header, country info). Avoids duplication of information, need to edit 3 places to add/update an entry, and avoids any usage of 2-alpha country codes, as long as a numeric country code (e.g. telephone code) exists then can be referenced. Updates ci_validate.py to parse new macro.
There was a problem hiding this comment.
Pull request overview
This pull request updates the validation script ci_validate.py to work with simplified country entry macros introduced in the main code. The script now validates the new COUNTRY, OLD_COUNTRY, COUNTRY_LCASE, COUNTRY_DBCS, and COUNTRY_ML macro formats instead of the previous lower-level entry definitions.
Changes:
- Rewrote validation logic to parse new macro formats (COUNTRY, OLD_COUNTRY variants, and COUNTRY_ML)
- Added support for validating obsolete entries wrapped in OLD_COUNTRY macros
- Built country code mapping from comments in country.asm instead of hardcoded patterns
- Added special-case handling for obsolete countries (Yugoslavia, Czechoslovakia)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…y check any more Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Have a look at this proof of concept for calculating the number of entries andrewbird@b57c721 It also generates a .map file so you can see where things are ending up in the output file. Edited after fixup, and answered own questions. |
|
the yes no values are in the form of yn_YN where yn_ is the prefix and YN are letters to use for yes and no, not language specific only combination specific. Each CC_yn where CC is the country, is an equate that correlates the country's yn to actual letters. Mostly this has comments to what yes and no are for the language. If they aren't ASCII values then uses codepage specific values. A future step would be to remove all these equates and only use the yn_YN variants directly. But I'd like to keep the comments too as I find it interesting to see the similarities of the various languages. |
|
I really like that! It even solves my main concern about moving things around breaking some unknown assumptions. Thank you. |
|
Cool, glad you like it! |
|
I may try to recreate the country.sys from FreeDOS 1.4 using your new macros plus this scheme and binary compare them. |
Too difficult, I'm afraid. With the same number of entries in the countries table, it got a lot better as the structure offsets within it began to match. Quite honestly there have been too many changes in the data for this comparison task. I suspect checking within DOS is likely to be the best option to validate. |
|
I will look into that this evening; I think I'm going to go ahead and make
the change to within COUNTRY macro use yn_YN form, I think it will clean up
the source some more and make it easier to verify the changes. I am also
going to extract the data from the COUNTRY macros to a csv that can be used
to generate some documentation about supported country codes (and if its
small enough maybe send on list for more native language speakers to review
-- but not until after more review to ensure as much as possible is up to
date with the world now).
…On Tue, Feb 3, 2026 at 11:07 AM Andrew Bird ***@***.***> wrote:
*andrewbird* left a comment (FDOS/country#16)
<#16 (comment)>
So I had a little more patience today and managed to do a reasonable
binary comparison of country.sys from 1.4 to a hacked up version of your
new macroed system. It's pretty good, but I do notice an oddity with the
yes/no stuff which seems to be coming through literally, rather than the
macro being expanded. See the screenshot.
yes-no.png (view on web)
<https://github.com/user-attachments/assets/de0df667-b20d-43dc-814c-d0f0fa834946>
—
Reply to this email directly, view it on GitHub
<#16 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAD3LQIK62GSHFNKHQ3NGKL4KDBT5AVCNFSM6AAAAACTUGCMDSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTQNBSGIYTQMJZGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
I also wonder if some YN entries in the original were incorrect, take this for instance |
|
Changing the macro a little to %macro YESNO 3-5
%1 db 0FFh,"YESNO "
dw 4
%if %0 == 5
db %2,%3,%4,%5
%else
db %2,0,%3,0
%endif
%endmacroimproved things Changes were |
By using NASM sections we can place things back in line with where the non-macro generated tables were found in the output file and so do math to establish the number of entries. (cherry picked from commit b57c721)
1/ We don't need a multicore runner for this, so just use the bare minimum and others can get the benefit. 2/ No need to install gcc-ia16 and its requisite repository. (cherry picked from commit b07b634)
…ly .data# sections; put entries in .data1 instead of .data
…te codepage # in COUNTRY macros is one of known codepages used
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
binaries built during validation now kept for 30 days for testing. build just completed available (for now) at https://github.com/FDOS/country/actions/runs/21658879035/artifacts/5369031236 |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…add both a program for testing/comparing country data (nlsdump) and simple wrapper library for common DOS NLS APIs (nls.h / nls.asm) that can be used by other programs. dosazm.inc is an incomplete NASM set of macros to allow writing assembly functions that work across compilers and memory models with minimal %if and duplication. [current version is as generated and though can build, logic is untested and likely to crash and burn!]
…aracter ASCIIZ values (character and 0 byte).
…n in small model need to pass as a far argument
…try.asm COUNTRY declarations
Update comments to reflect this now a generic Arabic / Middle East, but historically was for Arabia, see https://www.pcjs.org/documents/books/mspl13/msdos/encyclopedia/appendix-a/ in COUNTRY= section. In the future this may be updated to use OLD_ macros and marked obsolete if country specific records are added.

This replaces #15
In progress, requires further testing and verification but otherwise complete.
Creates Entry, subfunction header, and country info structures from a single macro invocation allowing defining country/codepage mappings and associated data with a single row instead of 3 different places in country.asm. Removes most references to 2-alpha country code except in header comment documenting countries and their numeric id (country code to pass to COUNTRY= line).
Updates ci_validation.py with new COUNTRY macro variations instead of ENTRY macro invocations.