Author Topic: Uncle Remus Tales  (Read 18316 times)

Mikl__

  • Member
  • ****
  • Posts: 742
Re: Uncle Remus Tales
« Reply #105 on: January 31, 2019, 12:39:11 AM »
a continuation

jj2007

  • Member
  • *****
  • Posts: 9388
  • Assembler is fun ;-)
    • MasmBasic
Re: Uncle Remus Tales
« Reply #106 on: January 31, 2019, 01:13:49 AM »
Hi Mikl,

I can't build it because I don't yet have a consistent Win64 installation, but nonetheless I have a question regarding these lines:
Code: [Select]
mov r8d,offset expTxt0
mov edx,offset aStatic
sub esp,20h

Now that is obviously 64-bit code. Does the fact that you use edx and esp mean that you assume the addresses are 32-bit? I remember vaguely that years ago a group of programmers tried to promote a system with 64-bit instructions but 32-bit addresses.

AW

  • Member
  • *****
  • Posts: 1957
  • Let's Make ASM Great Again!
Re: Uncle Remus Tales
« Reply #107 on: January 31, 2019, 01:50:23 AM »
It builds with LARGEADDRESSAWARE:NO (you hate 64-bit!) in link and -Cp in ml64.
However it does not run.
You are using a set of unusual build parameters, so please let us know them. From a previous post I have seen things like /ALIGN:16 /SECTION:.text,W /BASE:0x400000. If I use these it does indeed launch but shows crap.
In short, how do you build this?  :biggrin:
Now all makes sense, including putting the data in the code section....

AW

  • Member
  • *****
  • Posts: 1957
  • Let's Make ASM Great Again!
Re: Uncle Remus Tales
« Reply #108 on: January 31, 2019, 02:25:05 AM »
All right, it shows crap because I am not using the Windows-1251 character encoding.



I notice that the first tab with caption Static disappeared in my Windows 10.

AW

  • Member
  • *****
  • Posts: 1957
  • Let's Make ASM Great Again!
Re: Uncle Remus Tales
« Reply #109 on: February 03, 2019, 09:17:58 PM »
BTW, even without Unicode you can display Russian strings to western people.
All you need to do is CreateFont with RUSSIAN_CHARSET (most fonts will do, no need for a Russian font).
Then when is time to render the string you SelectObject with that font before DrawText.

Mikl__

  • Member
  • ****
  • Posts: 742
Re: Uncle Remus Tales
« Reply #110 on: February 03, 2019, 11:19:34 PM »
Hi, AW!
I am very sorry that any text except the English text is rubbish ("crap") for you. Of course, in order to display the text in 10 ways, it was necessary to take 10 chapters from "Uncle Remus' Stories" in the Nigger Dixie dialect.
Quote
This is the Russian translation of "Uncle Remus's Tales". But this is not critical. This is a demonstration of displaying a few dozen lines..

jj2007

  • Member
  • *****
  • Posts: 9388
  • Assembler is fun ;-)
    • MasmBasic
Re: Uncle Remus Tales
« Reply #111 on: February 04, 2019, 12:51:02 AM »
Hi, Mikl!

It feels very strange to defend José, but in this particular case when he writes "crap" he means that the control does not display the cyrillian text correctly. Indeed, it shows something else - but that is a minor problem, it's just a codepage issue  8)

AW

  • Member
  • *****
  • Posts: 1957
  • Let's Make ASM Great Again!
Re: Uncle Remus Tales
« Reply #112 on: February 04, 2019, 02:04:52 AM »
Hi, Mikl!
I can imagine, but I always thought Uncle Remus was Russian.   ::)

Oh JJ,
Thankies. it is indeed a "minor" codepage issue, although very few people know how to solve it. I searched the internet and did not found a single instance of the correct solution. Lots of incorrect suggestions.

jj2007

  • Member
  • *****
  • Posts: 9388
  • Assembler is fun ;-)
    • MasmBasic
Re: Uncle Remus Tales
« Reply #113 on: February 04, 2019, 04:20:30 AM »
I can imagine :P

CreateFont with RUSSIAN_CHARSET is indeed an interesting idea, thanks; although in general it is easier to simply use the UTF-16 version of the edit control. You can even mix Russian, Chinese and Arabic then.

AW

  • Member
  • *****
  • Posts: 1957
  • Let's Make ASM Great Again!
Re: Uncle Remus Tales
« Reply #114 on: February 04, 2019, 07:21:40 PM »
CreateFont with RUSSIAN_CHARSET is indeed an interesting idea, thanks; although in general it is easier to simply use the UTF-16 version of the edit control. You can even mix Russian, Chinese and Arabic then.
UTF-16 is better but in some countries is not well accepted. This may not happen in Russia but in Japan they still prefer Shift-JIS. In other words suppose you want to convince Japanese people to use Rich Masm, better you make the menus and everything else in Shift-JIS. This happened to me, my agent said we would sell lots of software in Japan with a Japanese localization but could only be Shift-JIS.  At the time I had a Windows XP Japanese release only for testing. Something crazy to navigate it.