News:

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

two plus operation

Started by Xor Stance, March 12, 2005, 12:20:27 AM

Previous topic - Next topic

Xor Stance

Hi, when I started to learn system engineer I start with this program and I know if I can start with this things I could advance.
I ask someone who knew assembly before, but he gave me this; after I compile some weird symbols appear and a do: something

.model small
.stack


.data
msg db "insert two numbers for the sum$"



.code
start:

mov ah,9
mov ds,ax
int 21h

      mov dx, 0
             mov cx, 2

again:  mov ah, 1
             int 21h

             add dl, al
loop again

end start

I want to operate x+x=x
However, I remember there was an intruction for mul, div and dec. For a power and a root which symbol should i use?

Gustav

Hi Xor Stance,

with 138 posts you should really be able to find the errors in this stuff by yourself. They are pretty easy to see, in fact, I would suggest to throw this crap away.

Xor Stance

The thing is that there're no good tutorial for 16-bits. I even founded an IBM tut but the author was smoke of was giving... It's very hard for me to read informal tutorials that only says something and some instructions don't even explain and some others don't have source code. That's why I'm trying hard, for it's not really a crap. It's very easy for those who already pass this step, the reason to still coding in 16 it's that there're hardware for console games that will require the 16-bits, challenge, some parts of the the pc using 16, and a boot loader for an OS.

I'm sorry that I haven't post before too many about asm questions, but now I got bore to post in the Soap Box and Colosseum; now I want to learn asm fast.
:green Gustav, had you written a tutorial? I really don't care about buying a book for asm(economic reasons and it's bore to find a store for it), I prefer to read it online.

AeroASM

Download emu8086, it will teach you a great deal about 16-bit assembly. If you are under the age of four, you can even use it as a replacement for masm (it makes com and exe files by itself).

Xor Stance

Correct, even with - * / too.

Gustav


As a very first step I would suggest to get Ralf Brown's interrupt list so you can find out what this weird "int 21h" is supposed to do.

pbrennick

gustav,
Your comments are right on track except for the one about int 21h.  Why do you feel that is wierd?  That is the DOS services interrupt and you can't do much without it.  I suppose you could try to do it all with int 10h which is the BIOS services interrupt but it would be almost impossible to do everything without DOS services.

Paul

Gustav


Hi Paul,

this was kind of a joke. I've got the feeling Xor Stance hasn't seen such a thing before.

Xor Stance

Numbers from 0 999999999 10 digits will be ok. I founded Emu8086 the best doc for the moment, however, I haven't check in depth the int until I learn other basic things. Since I could use the known things as: jumps, inc, dec, mul, div and maybe loops; I could make a short calculator.