TSE: Linux: sc32: Batch compiling behaves unexpected

8 views
Skip to first unread message

knud van eeden

unread,
Nov 1, 2025, 10:23:34 PM (5 days ago) Nov 1
to SemWare TSE Pro Text Editor
Hello,

TSE for Linux 4.50.13

What is wanted is to compile using a batch file a bunch of individual .s files (e.g. only those changed the last 5 days) somewhere.

Reproduction:

1. Put a .s file in an arbitrary directory

    E.g.

     /mnt/c/temp/foobar.s

2. Create a file (I believe this should be a Linux batch file similar to .bat in Microsoft Windows)

    ddd.sh

3. Add some repeated lines in ddd.sh like

    ./sc32 /mnt/c/temp/foobar.s 

    ./sc32 /mnt/c/temp/foobar.s 

    ./sc32 /mnt/c/temp/foobar.s 

4. Save this file ddd.sh in the 'tse' directory

5. Then make ddd.sh executable e.g. by 

    sudo chmod +x ddd.sh

6. Run ddd.sh

> /mnt/c/TEMP/tse_linux/tse$ ./ddd.sh

SAL Compiler V4.50.13 - Linux 32-bit (ow) 2025 Sep 27 (12420)
'rror   2305  (0,0)      Error opening file '/mnt/c/temp/foobar.s
SAL Compiler V4.50.13 - Linux 32-bit (ow) 2025 Sep 27 (12420)
'rror   2305  (0,0)      Error opening file '/mnt/c/temp/foobar.s
SAL Compiler V4.50.13 - Linux 32-bit (ow) 2025 Sep 27 (12420)
'rror   2305  (0,0)      Error opening file '/mnt/c/temp/foobar.s
SAL Compiler V4.50.13 - Linux 32-bit (ow) 2025 Sep 27 (12420)

7. Strange enough if you run a one liner of those 3 lines instead on the command line inside the tse directory it works

> ./sc32 /mnt/c/temp/foobar.s
SAL Compiler V4.50.13 - Linux 32-bit (ow) 2025 Sep 27 (12420)
File: /mnt/c/temp/foobar.s....
Writing output to file '/mnt/c/temp/foobar.mac'

8. Also tried full path names, similar error resullt

/mnt/c/temp/tse_linux/tse/sc32 /mnt/c/temp/foobar.s
/mnt/c/temp/tse_linux/tse/sc32 /mnt/c/temp/foobar.s
/mnt/c/temp/tse_linux/tse/sc32 /mnt/c/temp/foobar.s

9. Is something obvious missing here or is it just not possible to run sc32 from within assumed a batch file (like ddd.sh) thus?

with friendly greetings
Knud van Eeden





     


Guy Rouillier

unread,
Nov 2, 2025, 12:54:20 AM (5 days ago) Nov 2
to sem...@googlegroups.com
On Sun, 2025-11-02 at 02:23 +0000, 'knud van eeden' via SemWare TSE Pro text editor wrote:
> /mnt/c/TEMP/tse_linux/tse$ ./ddd.sh

SAL Compiler V4.50.13 - Linux 32-bit (ow) 2025 Sep 27 (12420)
'rror   2305  (0,0)      Error opening file '/mnt/c/temp/foobar.s

Linux is case sensitive.  If as shown in your text above your directory is truly TEMP, then looking for it in temp will not find it.

-- 
Guy Rouillier

knud van eeden

unread,
Nov 2, 2025, 7:46:41 AM (5 days ago) Nov 2
to sem...@googlegroups.com
A. This is running on Linux WSL, and WSL seems not to take into account filename case sensitivity at all:

1. Checking if in Linux WSL it finds it with lower case 'temp'?

> ls /mnt/c/temp/tse_linux$ ls /mnt/c/temp/foobar.s

/mnt/c/temp/foobar.s

yes thus.

2. Checking if in Linux WSL it finds it with upper case 'TEMP'?

> ls /mnt/c/temp/tse_linux$ ls /mnt/c/TEMP/foobar.s

/mnt/c/TEMP/foobar.s

also yes thus.

So not likely that this is a root cause.

===

B. So I just asked the question also to ChatGPT.

1. And it informed that it was very likely an issue with the LINE ENDING.

"

You ran into classic Windows line-endings trouble.
Your ddd.sh was almost certainly saved with CRLF endings, so each line passes a hidden \r to sc32. That turns:

/mnt/c/temp/foobar.s\r

…which does not exist. The stray carriage return also overwrites the first character of “Error”, which is why you see:

'rror 2305 ...
{

2. And as I created the ddd.sh file in TSE for Microsoft Windows and saved it then in 
a Linux directory.

3. The advice from ChatGPT was to use e.g. dos2unix (I had to install it first)

dos2unix ddd.sh

and then running it:

"
> ./ddd.sh
SAL Compiler V4.50.13 - Linux 32-bit (ow) 2025 Sep 27 (12420)
'rror   2305  (0,0)      Error opening file '/mnt/c/TEMP/foobar.s
SAL Compiler V4.50.13 - Linux 32-bit (ow) 2025 Sep 27 (12420)
'rror   2305  (0,0)      Error opening file '/mnt/c/TEMP/foobar.s
SAL Compiler V4.50.13 - Linux 32-bit (ow) 2025 Sep 27 (12420)
'rror   2305  (0,0)      Error opening file '/mnt/c/TEMP/foobar.s

> sudo apt install dos2unix

Now running dos2unix on ddd.sh

> dos2unix ddd.sh

dos2unix: converting file ddd.sh to Unix format...
knud@DESKTOP-R2VMOBB:/mnt/c/temp/tse_linux$ ./ddd.sh
SAL Compiler V4.50.13 - Linux 32-bit (ow) 2025 Sep 27 (12420)

File: /mnt/c/TEMP/foobar.s....
Writing output to file '/mnt/c/TEMP/foobar.mac'
SAL Compiler V4.50.13 - Linux 32-bit (ow) 2025 Sep 27 (12420)

File: /mnt/c/TEMP/foobar.s....
Writing output to file '/mnt/c/TEMP/foobar.mac'
SAL Compiler V4.50.13 - Linux 32-bit (ow) 2025 Sep 27 (12420)

File: /mnt/c/TEMP/foobar.s....
Writing output to file '/mnt/c/TEMP/foobar.mac'
SAL Compiler V4.50.13 - Linux 32-bit (ow) 2025 Sep 27 (12420)
"

So that works now.

So that line feed was indeed the solution and certainly good to know how this unexpected batch file behavior can be explained and the root cause.

Note: I also tried to load the ddd.sh in TSE for Linux and then save it but it seemed to still give the error messages.

Only when running dos2unix on the .sh file it started to work as it should it seems.

with friendly greetings
Knud van Eeden

--

---
You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.
To view this discussion visit
https://groups.google.com/d/msgid/semware/e6801cc380da78dd92d77402f3943ac10e5ee3b7.camel%40gmail.com
.

H P

unread,
Nov 2, 2025, 2:52:29 PM (5 days ago) Nov 2
to sem...@googlegroups.com
Knud, 

I use linux ubuntu and I don't have your problem. 
First of all what I do is check if I have read and write permission on the .s files.
In the script I first do a cd to the directory where the .s files are and I write in front of the sc32 the directory that contains the sc32 program. I also have between sc32 and the .s file the parameter "-c ". After finishing the script, I use a chmod 755 for the shellscript. By the way after the .s name I use >> log.txt so after ending the script I can look back what has happend. Compiling in a script goes very fast so don't put the same .s names 2 or 3 after one other but try 3 different .s filenames.
I hope that this will help you too.


Met vriendelijke groet,
With kind regards,
Muy atentamente,
Mit Freundliche Gruß,
Sinceramente,


H. Pikaar

Henri...@gmail.com


Op zo 2 nov 2025, 13:46 schreef 'knud van eeden' via SemWare TSE Pro text editor <sem...@googlegroups.com>:

H P

unread,
Nov 2, 2025, 2:59:23 PM (5 days ago) Nov 2
to sem...@googlegroups.com
And by the way I don't need to use dos2unix. I just copy my .s files made under windows with carriagereturn linefeed to my ubuntu laptop and they are compiled with the linux sc32 program.


Met vriendelijke groet,
With kind regards,
Muy atentamente,
Mit Freundliche Gruß,
Sinceramente,


H. Pikaar

Henri...@gmail.com


Op zo 2 nov 2025, 20:52 schreef H P <henri...@gmail.com>:

knud van eeden

unread,
Nov 2, 2025, 3:24:17 PM (5 days ago) Nov 2
to sem...@googlegroups.com
Just tested: I need to choose in TSE for Microsoft Windows:

menu TSE > 'Options' > Full configuration > System/File options > 'Save with LF only'.

Then saving and running works OK.

E.g. chosing insteada 'CR only' or 'CR+LF' or thus earlier 'As loaded' the default
gives executing issues.

with friendly greetings
Knud van Eeden

Reply all
Reply to author
Forward
0 new messages