From: Cando Through on
G'Day assembly programmers and especially those who wannabe assembly
programmers :)

I know that most of you know that Emu8086 - Microprocessor Emulator has
evolved to version 3.22 just 5 days ago!

You can download this version from here:
http://www.emu8086.com

The new version supports emulation of DOS file system (int 21h) and it
has support for basic VGA graphics (13h mode, 320x200 pixels, 256
colors).

It's even possible to write your own tiny operating system that will
boot from a floppy drive!

This release includes 12 assembly language tutorials for beginners,
8086 instruction set and short list of most useful interrupt functions.

Here is a simple "Hello World" example:

; start code!
org 100h ; assembler directive (required for simple .com files!)

mov dx, offset text
mov ah, 9 ; select print function.
int 21h ; do it!
text db "Hello, World!$"

; end code!

; this example should be compatible with all
; other known assemblers (I really hope so).


There are several new examples in C:\Emu8086\Samples, one of them is
called "datefile.asm", it demonstrates how to write the computer's date
and time into a file.

The file system is emulated in C:\Emu8086\vdrive\x
where "x" is a drive letter.

There is also examples that shows how to put a a single white pixel on
the screen (pixel.asm) and an example that draws a small rectangle
(0_sample_vga_graphics.asm).

Complete list of all supported interrupt functions is published here:

http://www.emu8086.com/assembly_language_tutorial_assembler_reference/supported_interrupts.html

This is shareware demo version, but it is fully functional. Registraion
is only required only if you find it helpful in some way or another.

The only advantage of Emu8086 among other assembler sharks is that it's
impossible to crash the system with a wrong code, probably every
assembly programmer who coded something more advanced than MOV AX, 5
experienced it a few times :)

--

Computer shall not live by electricity alone, but by every thought that
proceeds out of the brain of a Man

From: Frank Kotler on
Cando Through wrote:

....
> ; start code!
> org 100h ; assembler directive (required for simple .com files!)
>
> mov dx, offset text
> mov ah, 9 ; select print function.
> int 21h ; do it!
> text db "Hello, World!$"
>
> ; end code!

....
> The only advantage of Emu8086 among other assembler sharks is that it's
> impossible to crash the system with a wrong code,

Good thing.

Best,
Frank
From: Jim Carlock on
What about the call to exit the DOS program? Shouldn't there be
an INT 20h in there as well?

--
Jim Carlock
Please post replies to newsgroup.

Cando Through wrote:
....
> ; start code!
> org 100h ; assembler directive (required for simple .com files!)
>
> mov dx, offset text
> mov ah, 9 ; select print function.
> int 21h ; do it!
> text db "Hello, World!$"
>
> ; end code!
....
> The only advantage of Emu8086 among other assembler sharks is that it's
> impossible to crash the system with a wrong code,


From: Cando Through on
ooops! sorry, the correct "Hello, World!" code should be:

; start code!
org 100h ; assembler directive (required for simple .com files!)


mov dx, offset text
mov ah, 9 ; select print function.
int 21h ; do it!
ret ; return to operating system, same as INT 20h
text db "Hello, World! $" ; dollar sign marks the end of the string.


; end code!

Truly, it's wasn't my intension to prove it, but it's just evident that
even proffies can make a mistake that can lead to arbitary code
execution...

Thanks for pointing that out Jim!



Jim Carlock wrote:
> What about the call to exit the DOS program? Shouldn't there be
> an INT 20h in there as well?
>
> --
> Jim Carlock
> Please post replies to newsgroup.
>
> Cando Through wrote:
> ...
> > ; start code!
> > org 100h ; assembler directive (required for simple .com files!)
> >
> > mov dx, offset text
> > mov ah, 9 ; select print function.
> > int 21h ; do it!
> > text db "Hello, World!$"
> >
> > ; end code!
> ...
> > The only advantage of Emu8086 among other assembler sharks is that it's
> > impossible to crash the system with a wrong code,