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

Recommended Answers

All 6 Replies

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$'
commented: Thanks Very Much! +1

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.

Thanks, this was just for my knowleadge as a beginner.
+1 of reputation!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.