flat assembler
Message board for the users of flat assembler.

Index > DOS > DOS encoding (#128..#255)

Author
Thread Post new topic Reply to topic
DimonSoft



Joined: 03 Mar 2010
Posts: 1228
Location: Belarus
DimonSoft 03 Mar 2010, 20:22
Is there a simple decision to make FASMW compiling executables, which use language-specific symbols (cyrillic, in my case) without the need to save the program's source code in OEM866? Is it possible to make FASMW automatically convert the strings to the MS-DOS codepage?

Thanks.

P.S. Searched through the whole board, but couldn't find an answer Sad
Post 03 Mar 2010, 20:22
View user's profile Send private message Visit poster's website Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 03 Mar 2010, 21:01
You'll need something similar to http://flatassembler.net/docs.php?article=win32#1.7 .

This would be an interesting addition to the macro package as Windows console applications also use OEM charsets.
Post 03 Mar 2010, 21:01
View user's profile Send private message Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 1228
Location: Belarus
DimonSoft 03 Mar 2010, 21:18
LocoDelAssembly
So, I was right when looking for the solution in the ENCODING folder Smile

If someone could explain the way those includes work... Even having a little bit of experience writing simple macros, I still don't feel I can understand the file contents fully Sad And, of course, the best solution would be to get a complete solution. Smile
Post 03 Mar 2010, 21:18
View user's profile Send private message Visit poster's website Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1614
Location: Ukraine
shoorick 04 Mar 2010, 06:14
see attach


Description:
Download
Filename: oem_test.zip
Filesize: 1.71 KB
Downloaded: 649 Time(s)


_________________
UNICODE forever!
Post 04 Mar 2010, 06:14
View user's profile Send private message Visit poster's website Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 28 Mar 2010, 18:39
DimonSoft, can't you just use iconv or recode externally before assembling?
Post 28 Mar 2010, 18:39
View user's profile Send private message Visit poster's website Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1614
Location: Ukraine
shoorick 29 Mar 2010, 04:31
it's not handy to insert additional stage before assembling, esp. when multiply files used
Post 29 Mar 2010, 04:31
View user's profile Send private message Visit poster's website Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 1228
Location: Belarus
DimonSoft 17 Mar 2014, 13:45
The topic was started 4 years ago but it seems like nobody has posted a solution using a single include file from ENCODING folder yet. A few days ago my students asked me the same question: "How to use cyrillic characters in the source code?" So I've spent a little time and have a result to share.

There are 2 files in the attachment: one is called "safe", another is "unsafe". Both of them perform translation from Win1251 to OEM866, the only difference is that "safe" version doesn't map national characters like 'І', 'і', 'Ѕ', 'ѕ', etc. to latin 'I', 'i', 'S', 's', etc. On the other hand "unsafe" version abandons character semantics whenever possible to achieve the best visual appearance (less question marks '?'). And yes, characters that don't have equivalents in OEM866 are replaced with question marks.

Usage:
1. Unpack files to your %fasminc%\ENCODING folder.
2. Include one of the files depending on your needs.
3. Declare your strings this way:

strMyString dosstr "Мама мыла раму"

---
Feel free to criticize, fix bugs and obviously use in your own projects.


Description: Win1251 to OEM866 conversion for FASMW.
Download
Filename: OEM866R.zip
Filesize: 1.44 KB
Downloaded: 655 Time(s)

Post 17 Mar 2014, 13:45
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.