I'm learning Assembly. I'm using DEBUG as my Assembler, but now i want to convert a simple code to really Assembly(For emu8086), here is the code as i put in DEBUG:

-E 0200 "0123456789" 24
-A 0100
0D0B:0100 MOV AH,09
0D0B:0102 MOV DX,0200
0D0B:0105 INT 21
0D0B:0107 INT 20

But when i put this code in emu8086 and i try to emulate it, the program gave me two errors.
What i have to do?

Nathan Paulino Campos

7 Years
Discussion Span
Last Post by Nathan Campos

I'm not sure of what you're trying to say,
but DOS interrupt is 21h ; 21 Hex not 21 decimal.
DOS terminate is 20h ; 20 Hex not 20 decimal

In the assembler you enter -E 0200 and I'm assuming you mean 0200h (hex) not 200 (decimal)

You entere -A 0100 and I showed a hex segment + offset at 100 which implies data entry is in hex. But in terms of assembly instructions you need to enter mov dx,0200h


I realize English isn't your primary language but you need to try better as your request is not clear!

You covered up your code so we can no longer see it!
DOS used a '$' terminator so if you're trying to reference an ASCII string
It thinks you're trying to assemble commands?

I don't use EMU8086 but I believe the edit is only for source commands. It is not the DOS debugger (debug.exe)

Normally it is like the following:

org $100
   mov ah,9
   mov dx,msg    ; Print string$
   int 21h            ; DOS Interrupt

   int 20h           ; DOS terminate

msg:   db    '0123456789$'
Votes + Comments
Thanks Very Much!

Thanks, now it is working!
But i'm starting, then i want to know what program you use, if you can share i will be very happy.

+1 of Reputation


When doing 80x86 I use C/C++ with either inline assembly, or MASM assembled files linked to the exe.

MIPS its usually SNSystems.
PowerPC its a couple different IDE's.
Rabbit SofTools
PIC18F MicroChip

and a few other ancient processors.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.