All of lore.kernel.org
 help / color / mirror / Atom feed
* running masm611 inside dosemu and freedos
@ 2004-01-25 14:38 Matthew Wilson
  2004-01-25 16:10 ` Ged Haywood
  2004-01-26  0:37 ` Ryan Underwood
  0 siblings, 2 replies; 6+ messages in thread
From: Matthew Wilson @ 2004-01-25 14:38 UTC (permalink / raw)
  To: linux-msdos

Hi -


I'm taking a assembly programming course this semester and we have to
use the masm assembler for all our assignments.  I installed the dosemu
rpm that includes a freedos image from dosemu.org.

Then, in linux, I copied everything from the Irvine textbook CD onto
$USER/dosemu/freedos/masmcd.

I started dosemu:
$ xdosemu

I moved to the masmcd/ml614 directory and ran setup.exe and installed
masm using all the defaults.

Then I copied from the masmcd dir the ml614.exe file into the installed
masm611 dir and ran that ml614.exe program, hitting 'yes' at all the
prompts.

Then I edited autoexec.bat and added c:\masm611\bin and c:\masm611\binr
to my path.

I could compile and run a simple hello.asm program that my professor
gave us to test to make sure we had installed masm correctly, and I
could compile and execute it.  The hello.asm program was very simple;
maybe some later more complicated assignment won't work in this setup.
Does anyone that understands the internals of this stuff (assembly,
dosemu, freedos) see any reason why assembly programming won't work?
I'm not trying to make anything real -- just do my class homework.

I'd like to thank all the developers on freedos and dosemu for
contributing this work.

-- 
My public key:
gpg --recv-keys --keyserver www.mandrakesecure.net 0x8D10BFD5

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: running masm611 inside dosemu and freedos
  2004-01-25 14:38 running masm611 inside dosemu and freedos Matthew Wilson
@ 2004-01-25 16:10 ` Ged Haywood
  2004-01-25 18:00   ` Matthew Wilson
  2004-01-26  0:37 ` Ryan Underwood
  1 sibling, 1 reply; 6+ messages in thread
From: Ged Haywood @ 2004-01-25 16:10 UTC (permalink / raw)
  To: Matthew Wilson; +Cc: linux-msdos

Hi there,

On Sun, 25 Jan 2004, Matthew Wilson wrote:

> I could compile and run a simple hello.asm program that my professor
> gave us to test to make sure we had installed masm correctly ...
> maybe some later more complicated assignment won't work in this setup.
> Does anyone that understands the internals of this stuff (assembly,
> dosemu, freedos) see any reason why assembly programming won't work?

If you can _assemble_ and run your hello.asm program then I'd be very
surprised if you will have the time during your course to write anything
which will give MASM any trouble.  I have used DOSEMU to compile and
assemble a program of over 100,000 lines of C.  Are there no sources
with your book that you can try to see if more complex code will be OK?

You will find many assembler sources on the Web to try, but make sure
that they don't expect anything in the system that you don't have (such
(as libraries etc.) or you'll be going off on a wild goose chase.  A
quick search on Google revealed over 6,000 hits when I asked for the 
words "MASM ASSEMBLER SOURCE", here's one of them:

http://www.movsd.com/source.htm

I'm sure that there'll be lots there for you to learn.

Of course if you have a Linux box you probably have a very much better
assembler than MASM on the box already, and there are certainly free
ones that you can download.

Being able to handle assembly language is a useful skill and learning
it is a very good introduction to using parts of a computer.  Assembler
is where it all started and it's indispensable, but be aware that
relatively little coding is done in assembler thesedays.

73,
Ged.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: running masm611 inside dosemu and freedos
  2004-01-25 16:10 ` Ged Haywood
@ 2004-01-25 18:00   ` Matthew Wilson
  2004-01-25 18:23     ` Bart Oldeman
  0 siblings, 1 reply; 6+ messages in thread
From: Matthew Wilson @ 2004-01-25 18:00 UTC (permalink / raw)
  To: linux-msdos

On Sun, Jan 25, 2004 at 04:10:41PM +0000, Ged Haywood wrote:
> Of course if you have a Linux box you probably have a very much better
> assembler than MASM on the box already, and there are certainly free
> ones that you can download.

I'm taking a class in assembly programming where all the assignments
have to be written in MASM syntax.  I couldn't find a linux assembler
that couldn't work on MASM syntax, but that might be because I know so
very little about the subject that I may have overlooked it.
                                                                                                    
Is there a linux assembler that can handle MASM syntax?

-- 
My public key:
gpg --recv-keys --keyserver www.mandrakesecure.net 0x8D10BFD5

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: running masm611 inside dosemu and freedos
  2004-01-25 18:00   ` Matthew Wilson
@ 2004-01-25 18:23     ` Bart Oldeman
  0 siblings, 0 replies; 6+ messages in thread
From: Bart Oldeman @ 2004-01-25 18:23 UTC (permalink / raw)
  To: Matthew Wilson; +Cc: linux-msdos

On Sun, 25 Jan 2004, Matthew Wilson wrote:

> On Sun, Jan 25, 2004 at 04:10:41PM +0000, Ged Haywood wrote:
> > Of course if you have a Linux box you probably have a very much better
> > assembler than MASM on the box already, and there are certainly free
> > ones that you can download.
>
> I'm taking a class in assembly programming where all the assignments
> have to be written in MASM syntax.  I couldn't find a linux assembler
> that couldn't work on MASM syntax, but that might be because I know so
> very little about the subject that I may have overlooked it.
>
> Is there a linux assembler that can handle MASM syntax?

no, there isn't. There is intel_syntax in gas and NASM which can be quite
close but there are important differences. Also asm code for DOS will be
very different to asm code for Linux as far as interfacing with the
hardware and OS (or BIOS) goes.

if the book is easy to find (it was at the local Borders here) you could
have a look at Jeff Duntemann's "Assembly Language Step By Step" which
tells you a bit about the differences and what's available.
http://www.duntemann.com/assembly.htm
reviews are mixed though.

As to masm in dosemu, this will generally work, and may be more
comfortable than real DOS since it can only crash the virtual machine.
However direct hardware access, IRQs and so on (one of the reasons ASM
is still used is for these things, where C can be too cumbersome) DOSEMU
can be quite tricky, depending on how well it emulates the hardware or how
you configure it.

Bart


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: running masm611 inside dosemu and freedos
  2004-01-25 14:38 running masm611 inside dosemu and freedos Matthew Wilson
  2004-01-25 16:10 ` Ged Haywood
@ 2004-01-26  0:37 ` Ryan Underwood
  2004-01-27 16:17   ` Ged Haywood
  1 sibling, 1 reply; 6+ messages in thread
From: Ryan Underwood @ 2004-01-26  0:37 UTC (permalink / raw)
  To: linux-msdos

[-- Attachment #1: Type: text/plain, Size: 426 bytes --]


One thing to note is that there have been problems in the past related
to the MASM linker and the DOS extender that it uses (Phar Lap).  I
think if the linker is invoked from ml.exe, it will work fine, but the
linker cannot be invoked on its own (it will crash dosemu).

Also, some versions of MASM are Win32 console-mode applications and
won't run under DOSEMU at all.

-- 
Ryan Underwood, <nemesis@icequake.net>

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: running masm611 inside dosemu and freedos
  2004-01-26  0:37 ` Ryan Underwood
@ 2004-01-27 16:17   ` Ged Haywood
  0 siblings, 0 replies; 6+ messages in thread
From: Ged Haywood @ 2004-01-27 16:17 UTC (permalink / raw)
  To: Ryan Underwood; +Cc: linux-msdos

Hi all,

On Sun, 25 Jan 2004, Ryan Underwood wrote:

> One thing to note is that there have been problems in the past related
> to the MASM linker and the DOS extender that it uses (Phar Lap).  I
> think if the linker is invoked from ml.exe, it will work fine, but the
> linker cannot be invoked on its own (it will crash dosemu).

I use the X32 DOS extender mostly for C stuff.  Early versions of this
product used to be marketed under the name 'DOSX' with the Zortech
compiler.  While it never worked with earlier versions it does now
work under the latest DOSEMU.  I have to tweak stack parameters on the
command line which I don't have to do under real DOS, I haven't
investigated the cause but it's not too surprising to find something
like that.

Zortech claimed compatibility with Phar Lap as well as DOSX, maybe
Phar Lap might work now too?

73,
Ged.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-01-27 16:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-25 14:38 running masm611 inside dosemu and freedos Matthew Wilson
2004-01-25 16:10 ` Ged Haywood
2004-01-25 18:00   ` Matthew Wilson
2004-01-25 18:23     ` Bart Oldeman
2004-01-26  0:37 ` Ryan Underwood
2004-01-27 16:17   ` Ged Haywood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.