News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Error: line too long while using backslash

Started by bluedevil, September 14, 2022, 07:16:32 AM

Previous topic - Next topic

zedd151

Quote from: TimoVJL on September 15, 2022, 01:16:03 AM
ml64.exe handle only ASCII and UTF-8 without signature source files.
I figured only ascii after I tested my "odd" notion that I had this morning while pondering the original problem.
Good to know for future reference.

hutch--

ML64 does not support UNICODE text but there are a couple of method to include UNICODE text, in a resource file OR as DB data. The ANSI to UNICODE conversion will only do the first 256 characters but if you have genuine UNICODE from arabic or oriental sources, you need a method of storing it. A resource file works but its a bit clunky to use and DB format UNICODE is bulky and not editable.

jj2007

Quote from: swordfish on September 14, 2022, 11:56:56 PM
Okay, my theory didn't quite work at all. Saved the file as uncode this is the response:

Strangely enough, when I open your Unicode source in RichMasm and hit F6, it assembles & runs just fine... but when I use the makeit.bat, I see lots of error messages :cool:

The reason is that RichMasm doesn't care whether it opens an Ascii or UTF-16 file, but for building the source it always exports Ascii or Utf-8 :cool:

Quote from: swordfish on September 15, 2022, 01:19:20 AMI figured only ascii

The Assembler has no idea what Utf-8 looks like; so it assumes "Ascii".

zedd151

Quote from: jj2007 on September 15, 2022, 02:39:40 AM
Strangely enough, when I open your Unicode source in RichMasm...
When I posted the 'saved as unicode' version, it was just an experiment on my part. Not suggesting anyone else should use that (saving as unicode).

TimoVJL

Quote from: swordfish on September 15, 2022, 01:19:20 AM

The Assembler has no idea what Utf-8 looks like; so it assumes "Ascii".
Good point is, that it don't mess with ANSI codebases, but i haven't tested it enough.
May the source be with you

jj2007

Quote from: swordfish on September 15, 2022, 03:03:38 AMWhen I posted the 'saved as unicode' version, it was just an experiment on my part. Not suggesting anyone else should use that (saving as unicode).

It was worth a test. I just checked with UAsm and AsmC, same as ML64: no luck with a Utf-16 source.

Quote from: TimoVJL on September 15, 2022, 03:41:01 AM
Quote from: swordfish on September 15, 2022, 01:19:20 AM

The Assembler has no idea what Utf-8 looks like; so it assumes "Ascii".
Good point is, that it don't mess with ANSI codebases, but i haven't tested it enough.

Save & build everything as Utf-8; then, if Windows asks for it, convert Utf-8 to Utf-16. It works.

TimoVJL

Windows NT have been internally UNICODE since born, why ml/ml64 don't still accept that ?
May the source be with you

hutch--

I think its a case of what assemblers have generally been used for over a long period. The memory demand being just one of them. If you need to deal with text in a non european character set, UNICODE is very useful but if you are doing anything else, the 256 character set is half the size and a more efficient use of memory.

daydreamer

Quote from: hutch-- on September 15, 2022, 10:39:35 AM
I think its a case of what assemblers have generally been used for over a long period. The memory demand being just one of them. If you need to deal with text in a non european character set, UNICODE is very useful but if you are doing anything else, the 256 character set is half the size and a more efficient use of memory.
when I worked with 06xx arabic and hiragana and katakana I tested do storage of only the lower byte and add 0600 or where hiragana or katakana start
isnt that something similar to utf8 works?
probably invain when posting .zip in forum,it probably compress lots of 06 bytes
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

bluedevil

Quote from: jj2007 on September 14, 2022, 07:30:42 PM
Quote from: bluedevil on September 14, 2022, 06:54:09 PM
@jj
How are you doing this? Code on your zip file also compiles on my machine right now!!!

Zip your non-assembling source and post it here. I am curious, too.

OK I've solved your magic @jj. :D

You had shared this code:

    invoke  CreateWindowEx, \
                WS_EX_CLIENTEDGE, \
                addr ClassName, \
                addr AppName, \
                WS_OVERLAPPED or WS_CAPTION or WS_SYSMENU or WS_MINIMIZEBOX or WS_MAXIMIZEBOX or WS_VISIBLE, \
                CW_USEDEFAULT, \
                CW_USEDEFAULT, \
                CW_USEDEFAULT, \
                CW_USEDEFAULT, \
                NULL, \
                NULL, \
                hInst, \
                NULL


And this is my non-compiling code:

    invoke  CreateWindowEx,
                    WS_EX_CLIENTEDGE, \
                    addr ClassName, \
                    addr AppName, \
                    WS_OVERLAPPED or WS_CAPTION or WS_SYSMENU or WS_MINIMIZEBOX or WS_MAXIMIZEBOX or WS_VISIBLE, \
                    CW_USEDEFAULT, \
                    CW_USEDEFAULT, \
                    CW_USEDEFAULT, \
                    CW_USEDEFAULT, \
                    NULL, \
                    NULL, \
                    hInst, \
                    NULL


At first they seem equal but, i have added one more tab to each line. So this makes more than 512 chars. Remember what M$ Docs said:
Quote
line too long

A source-file line exceeded the limit of 512 characters.

If multiple physical lines are concatenated with the line-continuation character ( \ ), then the resulting logical line is still limited to 512 characters.

Anyway, I got the situation. I will be more careful while coding and try not to exceed 512 chars.

Thanks everyone for your valuable comments.
..Dreams make the future
But the past never lies..
BlueDeviL // SCT
My Code Site:
BlueDeviL Github

jj2007

Quote from: bluedevil on September 25, 2022, 05:44:54 AMAnyway, I got the situation. I will be more careful while coding and try not to exceed 512 chars.

Try UAsm64, its limit is 1004 chars ;-)

bluedevil

Quote from: jj2007 on September 25, 2022, 06:46:34 AM
Quote from: bluedevil on September 25, 2022, 05:44:54 AMAnyway, I got the situation. I will be more careful while coding and try not to exceed 512 chars.

Try UAsm64, its limit is 1004 chars ;-)

I am taking this as a note :D

BTW is it 1004 or 1024?
..Dreams make the future
But the past never lies..
BlueDeviL // SCT
My Code Site:
BlueDeviL Github

jj2007


hutch--

#43
Funny enough, I have never found line length to be a problem that cannot easily be overcome. For Windows styles, OR them all to either a variable or register, instead of "ADDR whatever", use a pointer instead "pText". With quoted text, multiline layouts with a separate DB for each line allows very large text to be embedded in an exe file.

HSE

Quote from: jj2007 on September 25, 2022, 08:16:30 AM
Strangely enough, it's 1004 :cool:

You can rebuild UASM with longer lines, no restriction. Usually I set maximum line size to 2048 bytes, but my longer mesured line only was 1680 bytes.
Equations in Assembly: SmplMath