flat assembler
Message board for the users of flat assembler.
Index
> Main > advanced ASCII |
Author |
|
Furs 04 Mar 2018, 22:12
Well this has nothing to do with FASM, but with the print output, which is probably a setting in the OS (locale or whatever).
(and no, I don't know how to do that on the OS, only used English ) |
|||
04 Mar 2018, 22:12 |
|
revolution 04 Mar 2018, 22:49
Mino wrote: Does FASM allow advanced ASCII characters? |
|||
04 Mar 2018, 22:49 |
|
Walter 04 Mar 2018, 22:57
If you're using printf, try using 130 instead of 233.
Code: format pe console entry start include '\Fasm\Include\win32a.inc' section '.data' data readable writeable msg db "Chlo",130,0,13,10 format1 db '%s',0 section '.code' code readable executable start: cinvoke printf,format1,msg invoke ExitProcess,0 section '.idata' import data readable writeable library kernel32,'kernel32.dll',\ crtdll,'crtdll.dll' import kernel32,\ ExitProcess,'ExitProcess' import crtdll,\ printf,'printf' |
|||
04 Mar 2018, 22:57 |
|
revolution 04 Mar 2018, 23:03
The code page selected determines which characters are mapped in the range 0x80-0xff.
If your OS/system supports UNICODE then that might be the easiest and most compatible encoding to select. That way all applications and OS components will agree on what characters to draw. |
|||
04 Mar 2018, 23:03 |
|
alexfru 05 Mar 2018, 06:04
Walter wrote: Actual interpretation of 8-bit character depends on the code page chosen in Windows. If I have the Russian code page, the characters will look different. One could chose the Unicode (UTF-8 ) page, but then non-ASCII chars will need several bytes per character and the cmd.exe window need to have a Unicode font selected (and unless anything has changed since Windows 7, a font can only be selected manually, oops). |
|||
05 Mar 2018, 06:04 |
|
Mino 05 Mar 2018, 16:50
Thank you very much for your answers It works perfectly.
But, if I understood correctly, this technique (= mixing everything you've said) depends on the operating system; so if I'm on Windows, Mac or Linux, the result won't necessarily be the same? |
|||
05 Mar 2018, 16:50 |
|
revolution 05 Mar 2018, 22:34
Mino wrote: But, if I understood correctly, this technique (= mixing everything you've said) depends on the operating system; so if I'm on Windows, Mac or Linux, the result won't necessarily be the same? You will find UNICODE to be the most compatible across all OSes and programs. And specifically the UTF8 encoding of UNICODE. Everything else with code pages and only 256 characters is going to cause problems. |
|||
05 Mar 2018, 22:34 |
|
Mino 06 Mar 2018, 15:27
Ok, thank you very much for yours answers
|
|||
06 Mar 2018, 15:27 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.