News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Jwasm for DOS

Started by Gunther, September 30, 2010, 08:17:27 PM

Previous topic - Next topic

Gunther

I need for a special development a good assembler and downloaded Jwasm's DOS binary. It works, but cannot generate code for 80386 and above. The Windows version makes the job, but the DOS version brings such error messages:


LMSHELL.ASM(74) : Error A2030: Instruction or register not accepted in current CPU mode


The Web site says, there is a binary for Windows and DOS, but it's a Windows NT character-mode executable and doesn't run under plain DOS. Can anyone help?

Gunther
Forgive your enemies, but never forget their names.

japheth

Quote from: Gunther on September 30, 2010, 08:17:27 PM
The Web site says, there is a binary for Windows and DOS, but it's a Windows NT character-mode executable and doesn't run under plain DOS. Can anyone help?

Why don't you just read JWasm's README.TXT. It's not that big, and on the very first page you'll find this, for example:


    - JWASM.EXE, a precompiled Win32 binary, runs on any Win32 platform.

    - JWASMD.EXE, a precompiled DOS binary, runs in DOS 32bit protected-mode.
      It requires a 80386 cpu and needs a MS-DOS v5 compatible DOS to run
      (FreeDOS v1 will do). Long filenames (LFN) are supported. JWASMD.EXE
      won't run on 64-bit Windows.

    - JWASMR.EXE is a DOS real-mode program which runs on any x86 cpu.
      Similar to JWASMD.EXE it needs a MS-DOS v5 compatible DOS. Restrictions
      of this version are:
      - doesn't support long filenames
      - supports OMF, BIN and MZ output formats only
      - no support for 64-bit


So there are TWO binaries for DOS. JWASMD.EXE is the prefered one, of course. JWASMR.EXE is more of a toy, but it still should assembly code up to SSE2.


Gunther

Japheth,

my question shouldn't be  offending - only a question.

Quote from: japheth, October 01, 2010, at 07:17:41 amWhy don't you just read JWasm's README.TXT.

I did read the documentation, but should explain the problem a bit deeper.

Quote from: japheth, October 01, 2010, at 07:17:41 amJWASMD.EXE, a precompiled DOS binary, runs in DOS 32bit protected-mode.

That's exactly the point. I don't need 32 bit Protected Mode (DPMI); what I need is a clean DOS configuration and an assembler, which will run with that configuration. That's a bit tricky at the moment; I've 2 opportunities:


  • Assembling under Windows, shutdown Windows, starting DOS and do the test.
  • Assembling under Windows, alter the disk image of the virtualization software and do the test.

Both methods are a bit awkward.

It's not really clear for me, why an assembler should check the current configuration? It has to assemble and to generate machine code. It should in general be possible to develop on one platform an application for another target platform.

Quote from: japheth, October 01, 2010, at 07:17:41 amJWASMR.EXE is more of a toy, but it still should assembly code up to SSE2.

Yes, a toy. May be it assembles SSE code, but it failed by generating code for the 80386:


LMSHELL.ASM(147) : Error A2244: Instruction form requires 80386


It seems to me, that's an incapacitation of programmers.

Gunther
Forgive your enemies, but never forget their names.

japheth

Quote from: Gunther on October 01, 2010, 11:52:10 PM
Quote from: japheth, October 01, 2010, at 07:17:41 amJWASMD.EXE, a precompiled DOS binary, runs in DOS 32bit protected-mode.

That's exactly the point. I don't need 32 bit Protected Mode (DPMI); what I need is a clean DOS configuration and an assembler, which will run with that configuration.

There is probably a misconception. "32bit protected-mode" and "DPMI" is not the same. The requirements don't mention a DPMI host, they mention DOS and a 80386 (or better) cpu. That means, JWASMD.EXE is supposed to run on a clean DOS, it needs neither a memory manager nor a running DPMI host.

Quote
It's not really clear for me, why an assembler should check the current configuration? It has to assemble and to generate machine code. It should in general be possible to develop on one platform an application for another target platform.
I agree, but don't see the problem.

Quote
Quote from: japheth, October 01, 2010, at 07:17:41 amJWASMR.EXE is more of a toy, but it still should assembly code up to SSE2.

Yes, a toy. May be it assembles SSE code, but it failed by generating code for the 80386:


LMSHELL.ASM(147) : Error A2244: Instruction form requires 80386


It seems to me, that's an incapacitation of programmers.

That's also most likely a misconception. The error message tells that the assembler has found an instruction which needs at least a 80386, but the "current cpu" ( set by directives .8086, .186, .286, ... ) is lower.

Gunther

Quote from: japheth, October 02, 2010, at 04:26:24 AMThe requirements don't mention a DPMI host, they mention DOS and a 80386 (or better) cpu. That means, JWASMD.EXE is supposed to run on a clean DOS, it needs neither a memory manager nor a running DPMI host.

Okay, good to know. The protected mode statement in the file Readme.txt drove me a bit crazy. So, all together: JWASMD should run in my virtual machine, configured with MSDOS 7.1, only HIMEM.SYS loaded, and will do the same job like JWASM. That's good news and solves a lot of my current problems.

There are only a few open questions: I haven't solved the linker problem and I'm searching for a good DOS editor. At the moment there are only workarounds.

Gunther
Forgive your enemies, but never forget their names.