Hi, On Fri, Nov 30, 2012 at 3:20 PM, Ralf A. Quint <free...@gmx.net> wrote: > At 01:10 PM 11/30/2012, Ladislav Lacina wrote: > >>I haven't expect that somebody on this forum doesn't understand >>"seges lea di,A" instruction. So explanation:LEA DI,a - load address >>of A into DS:DISEGES LEA DI,a load address of A into ES:DI > > As I mentioned, I have never see or used the SEGES instruction and I > am using Borland Pascal 7 ever since it was released, in fact almost > daily (ok, weekly) use it for a lot of "quick and dirty" stuff... > And I am using x86 assembler for pretty much 30 years by now! > > I don't have the time to verify in a debugger or via disassembly what > it exactly is supposed to do, but as I mentioned, the proper > instructions to do so without any doubts would be "LES DI, a" as I > mentioned in my previous post. That will properly load both segment > and offset as expected for the function call, if that in fact is the > (sole) source of the problem.
1). Laaca, are you truly using BP7 (real mode? 286 pmode?) or (more likely) FPC? The latter is DPMI only, and presumably won't work unless you call int 21h indirectly via int 31h, 300h. 2). The buffer will have to be in conventional memory and ES:DI will have to correctly point to it (after switching to V86 or real mode). I know you're probably aware of all that. 3). "LES DI,mem" loads ES:DI with the 32-bit pointer value stored at [mem], not the address of mem itself. http://stanislavs.org/helppc/les.html 4). What exactly are you trying to accomplish by calling this function? http://www.delorie.com/djgpp/doc/rbinter/id/76/31.html http://www.delorie.com/djgpp/doc/rbinter/it/50/17.html input: BX=0FFFFh (use global code page, aka, CHCP, aka system wide) That's not the same as display code page. Hence you're only correctly testing if the user has COUNTRY.SYS info loaded (and NLSFUNC probably must be loaded too). For instance, since Esperantujo isn't in there, it won't work, and thus this won't tell you that your current display code page is cp853. It will presumably just return cp437 (or maybe cp850). If you want display code page only, use int 21h 440Ch 6Ah (and when it fails for FreeDOS), then optionally try int 2Fh, 0AD02h (undocumented). 5). BTW, I can't check, but didn't MS-DOS have a bug in filename tables not working correctly? 6). It might be easier (for now) to write a real-mode only program that correctly writes this i18n info to file (via aforementioned int 21h, 6501h call). Run that (via .BAT?) before your main program, and then from within the main program, read the resulting file for correct info. Then you can see if this works well enough and does what you want before wasting further time. ------------------------------------------------------------------------------ Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel