Hi! 3-Сен-2004 09:26 [EMAIL PROTECTED] (Luchezar Georgiev) wrote to [EMAIL PROTECTED]:
> Update of /cvsroot/freedos/kernel/kernel > In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15462/kernel/kernel > Modified Files: > Tag: UNSTABLE > Log Message: > COUNTRY.SYS & NLSFUNC support added: Lucho, Eduardo. > --- NEW FILE: country.asm --- > dd ent ; first entry > ent dw 35; number of entries - don't forget to update when adding a new country Here is possible to slightly enhance this point (no need for manual updating), because table below is regular (contain equal-size items): > ; entries > ; (size, country, codepage, reserved(2), offset) > __us dw 12, 1,437,0,0 > dd _us [...] > __me dw 12,785,864,0,0 > dd _me > __il dw 12,972,862,0,0 > dd _me (Bug? __il refers to _me instead _il). Thus, all quoted above my be replaced by: ______________O\_/_________________________________\_/O______________ dd $+4 ; address of table (folows below) dw (LAST_ENTRY - FIRST_ENTRY) / ENTRY_SIZE ; entries (size, country, codepage, reserved(2), offset) FIRST_ENTRY label dw ENTRY_SIZE-2, 1,437,0,0 ; US dd _us ENTRY_SIZE = $ - FIRST_ENTRY [...] dw ENTRY_SIZE-2,785,864,0,0 ; Middle East dd _me dw ENTRY_SIZE-2,972,862,0,0 ; Israel dd _il LAST_ENTRY label _____________________________________________________________________ O/~\ /~\O Or, even better, all data may be reordered to place related data adjacent: ______________O\_/_________________________________\_/O______________ dd $+4 ; address of table (folows below) dw (LAST_ENTRY - FIRST_ENTRY) / ENTRY_SIZE FIRST_ENTRY label dw HEAD_SIZE HEAD_START label dw 1,437,0,0 ; US dd $+4 HEAD_SIZE = $ - HEAD_START dw 1,6,1 dd $+4 db 0FFh,"CTYINFO" dw DATA_SIZE DATA_START label dw 1,437,MDY db "$",0,0,0,0 dw ",",".","-",":" db 0,2,_12 DATA_SIZE = $ - DATA_START [...] dw HEAD_SIZE dw 785,864,0,0 ; Middle East dd $+4 dw 1,6,1 dd $+4 db 0FFh,"CTYINFO" dw DATA_SIZE dw 785,864,DMY db 0A4h,0,0,0,0 dw ".",",","/",":" db 3,3,_12 dw HEAD_SIZE dw 972,862,0,0 ; Israel dd $+4 dw 1,6,1 dd $+4 db 0FFh,"CTYINFO" dw DATA_SIZE dw 972,862,DMY db 99h,0,0,0,0 dw ",","."," ",":" db 2,2,_24; Israel LAST_ENTRY label _____________________________________________________________________ O/~\ /~\O Of course, entry may be defined through macro. Someting like: ______________O\_/_________________________________\_/O______________ dd $+4 ; address of table (folows below) dw (LAST_ENTRY - FIRST_ENTRY) / ENTRY_SIZE FIRST_ENTRY label ENTRY 1,437,MDY,<"$",0,0,0,0>, ",",".","-",":",0,2,_12 ; US [...] ENTRY 785,864,DMY,<0A4h,0,0,0,0>,".",",","/",":",3,3,_12 ; Middle East ENTRY 972,862,DMY,<99h,0,0,0,0>, ",","."," ",":",2,2,_24 ; Israel LAST_ENTRY label _____________________________________________________________________ O/~\ /~\O > +++ globals.h 3 Sep 2004 09:26:51 -0000 1.45.2.2 > - " (Build " KERNEL_BUILD_STRING ") [" __DATE__ " " __TIME__ "]\n" > + " (Build " KERNEL_BUILD_STRING ", " __DATE__ ")\n" I like this. :) > +++ main.c 3 Sep 2004 09:26:51 -0000 1.81.2.4 > static char copyright[] = > - "(C) Copyright 1995-2004 Pasquale J. Villani and The FreeDOS Project.\n" > +"Copyright 1995-2004 Pasquale J. Villani and The FreeDOS Project.\n" > +"This free software has ABSOLUTELY NO WARRANTY and is licensed under\n" > +"the GNU General Public License (http://www.gnu.org/licenses/gpl.html)\n\n"; And this too. :) Though, I think, here is mistake, because me use GPL2, not plain GPL. Thus, above should like something like: "This free software has ABSOLUTELY NO WARRANTY and is licensed under the\n" "GNU General Public License v2 (http://www.gnu.org/licenses/gpl2.html)\n\n"; > +++ inthndlr.c 3 Sep 2004 09:26:51 -0000 1.87.2.4 > @@ -709,10 +698,8 @@ > case 0x30: > lr.AL = os_setver_major; > lr.AH = os_setver_minor; > + lr.BX = (OEM_ID << 8) | REVISION_SEQ; lr.BX = MK_UWORD (OEM_ID, REVISION_SEQ); -------------^^^^^^^^ [...] > + if ((rc = _SftSeek(s, MK_ULONG(lr.CX, lr.DX), lr.AL)) >= SUCCESS) -------------------------------^^^^^^^^ [...] > VOID ASMCFUNC int2F_12_handler(struct int2f12regs r) > + COUNT rc; "int rc;" [...] > + case 0x27: /* close file */ > r.FLAGS &= ~FLG_CARRY; > - break; > + CritErrCode = SUCCESS; > + rc = DosClose(r.BX); > + goto short_check; Better to place "r.FLAGS &=" right before "goto" to make common tail for many branches. About "CrtiErrCode =" I unsure, if it valid to move after function. [...] > +long_check: > + if (lrc >= SUCCESS) > + { > + r.AX = (UWORD)lrc; r.AX = loword(lrc). > + return; > + } > + rc = (int)lrc; ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_idP47&alloc_id808&op=click _______________________________________________ Freedos-kernel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-kernel