Skip to content

Conversation

@ecm-pushbx
Copy link

If the variable named JWASM was set, jwasm (both DOS32/DJGPP and Linux) would parse the contents of that variable as a command line parameter. For example,

edrdos/repo/drbio$ JWASM=FOO jwasm -c -Zm -Fo./bin/initmsgs initmsgs.asm
JWasm v2.18, Aug 14 2023, Masm-compatible assembler.
Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.

Fatal error A1106: Cannot open file: "FOO" [ENOENT]
initmsgs.asm: 93 lines, 2 passes, 0 ms, 0 warnings, 0 errors

This code is responsible for filling argv[0]:

pEnv = getenv( "JWASM" );

The error became apparent because the assembler spammed a lot of messages when trying to replace the use of MASM in the EDR-DOS build by JWasm. They were caused by setting set JWASM=C:\BIN\JWASM.EXE and JWasm trying to parse its executable file as an assembly source file then.

@ecm-pushbx
Copy link
Author

Oh, I just noticed that this variable is probably intended to allow passing parameters like NASM's NASMENV. In that case it is intended to parse the contents as switches and the fault lies with me.

@Baron-von-Riedesel Baron-von-Riedesel force-pushed the master branch 4 times, most recently from f8c007c to ab8a297 Compare June 12, 2024 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants