flat assembler
Message board for the users of flat assembler.
Index
> Main > Notepad utf-8 format BOM Header Goto page 1, 2 Next |
Author |
|
MHajduk 25 Nov 2008, 16:54
skykrnl wrote: Notepad to save utf-8 format for the first time will increase BOM header BTW, don't use FASMW (i.e. original FASM IDE)! Use only console version of FASM! Find any editor with syntax highlighting (for example PSPad or any other) and adapt it for FASM. |
|||
25 Nov 2008, 16:54 |
|
DJ Mauretto 25 Nov 2008, 17:22
Yes PSPad is great ,i just downloaded yestrday,
but I keep using notepad because PSPad with all the functions that it distracts me _________________ Nil Volentibus Arduum |
|||
25 Nov 2008, 17:22 |
|
MHajduk 25 Nov 2008, 17:26
DJ Mauretto wrote: but I keep using notepad because PSPad with all the functions that it distracts me |
|||
25 Nov 2008, 17:26 |
|
bitRAKE 26 Nov 2008, 02:23
Here is my syntax file for PSPad, updated to version 1.67.29 of FASM. Keywords are divided into four groups: instructions, registers, preprocessor, control/other. This makes it very easy to read macros, imho. Please let me know of any errors / ommisions.
PSPad took me some time to configure for FASM. Code Explorer basically does not work with FASM syntax. Yet, by using the "ftPVS" parser it has some use ( for my coding style {label}: ). Also, the "ftPureBasic" works for browsing macros. Code completion would be much work - no desire atm. First I turned off extra line spacing: Code: menu Settings\Program Settings... button [Direct Edit] item ExtraLineSpacing=0 ...then I setup a batch file to build with FASM.EXE which doesn't require any changes to sources or environment variables (fasm_build.cmd). Code: @ECHO OFF SET FASMW=F:\FASMW16729 SET PATH=%FASMW%;%PATH% SET INCLUDE=%FASMW%\INCLUDE FASM %* Code: Compiler: {where you saved it}\fasm_build.cmd Parameters: "%File%" [X] Save All Files Before Compilation [X] Capture Program Output Window [X] Hide Output window Log window type: [Memo] LOG Parser %F [%L]
_________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup Last edited by bitRAKE on 26 Nov 2008, 06:42; edited 4 times in total |
|||||||||||
26 Nov 2008, 02:23 |
|
bitRAKE 26 Nov 2008, 02:31
The BOM could be removed with FASM
It is just the first three bytes, iirc. Code: ; Strip BOM bytes from UTF8 files if present format binary as "UTF8.fasm" virtual at 0 file "BOMtest.fasm":0,4 load BOM dword from 0 end virtual if (BOM and $FFFFFF) = $BFBBEF file "BOMtest.fasm":3 else if (BOM and $FFFF) = $FEFF ; wide character, much more work... else file "BOMtest.fasm" end if |
|||
26 Nov 2008, 02:31 |
|
MHajduk 26 Nov 2008, 09:09
Good work bitRAKE.
|
|||
26 Nov 2008, 09:09 |
|
baldr 27 Nov 2008, 19:59
bitRAKE,
You may also wrap it in a batch file with some environment variables set, just to be generic. And don't forget about non-canonical (should I say not well-formed?) encodings… |
|||
27 Nov 2008, 19:59 |
|
bitRAKE 27 Nov 2008, 20:39
Yeah, I thought about using the "-d" option of FASM to specify the file, and wrapping the whole thing in a batch file. I don't have much experience with Unicode files. "not well-formed": Are you speaking about alternate BOM's for UTF-8, or rather other encodings?
|
|||
27 Nov 2008, 20:39 |
|
baldr 27 Nov 2008, 21:35
bitRAKE,
file expands env. vars as well as include does (cf. PREPROCE.INC). well-formed was about clause in "3.9 Unicode Encoding Forms", The Unicode Standard, Version 5.0. F0 8F BB BF is decoded to FEFF too… |
|||
27 Nov 2008, 21:35 |
|
sleepsleep 27 Nov 2008, 21:54
Quote:
isn't correctly translated from Quote:
the chinese version said, when notepad save a file as UTF-8(记事本在保存为 utf-8 格式的时候), it will add a BOM header(会增加 BOM 头). he hope fasm (希望 fasm 能够) assembler would support this kinda BOM added asm source file (支持对这类utf-8文件的读取) human is the best translator |
|||
27 Nov 2008, 21:54 |
|
baldr 27 Nov 2008, 22:05
sleepsleep,
I'd already thought of "increase" being somewhat out of context… Automatic translators, heh? |
|||
27 Nov 2008, 22:05 |
|
f0dder 28 Nov 2008, 06:31
Keep source in ANSI form, and have international strings external to your source code... much better way of handling things.
|
|||
28 Nov 2008, 06:31 |
|
bitRAKE 28 Nov 2008, 06:41
What about comments in the source code?
|
|||
28 Nov 2008, 06:41 |
|
f0dder 28 Nov 2008, 06:52
bitRAKE wrote: What about comments in the source code? Non-English might be OK for purely hobby projects, but as soon as you're going to share/publish, English is the best choice, simply because it's the language shared by most people (even if it's smaller than Chinese etc. as primary language). Yeah, I know, people aren't going to agree. _________________ - carpe noctem |
|||
28 Nov 2008, 06:52 |
|
bitRAKE 28 Nov 2008, 08:07
Effective communication might require an exchange in multiple languages, and I wouldn't want to sacrifice the communication for some least common less potent version. If the automatic translators are any indication, it seems different cultures have adopted their own analogies to assist comprehension of programming ideas. It would be presumptuous of me to force the adoption of my culture, or lessen the impact of another culture on the topic.
So, I guess I'm one of the people that don't agree. (I have a deep respect for anyone taking the time to translate their work into English, but I also have a deep respect for anyone that takes the time to contribute openly -- even if they don't know English.) |
|||
28 Nov 2008, 08:07 |
|
revolution 28 Nov 2008, 09:00
English is only my second language but I feel that it is the most useful for exchange of ideas inside source files, even internally to myself.
|
|||
28 Nov 2008, 09:00 |
|
shoorick 28 Nov 2008, 09:58
the global sense of question: adjust human to computer or computer to human
|
|||
28 Nov 2008, 09:58 |
|
LocoDelAssembly 28 Nov 2008, 14:35
Quote: English is only my second language REALLY??? |
|||
28 Nov 2008, 14:35 |
|
revolution 28 Nov 2008, 15:17
LocoDelAssembly wrote:
|
|||
28 Nov 2008, 15:17 |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.