Nasm Hello World
Nasm Hello World
I’m new to assembly, thus am in need of help…?
Okay… Just earlier today I finally successfully assembled a “Hello, world!” DOS (.com) program… so yes, I’m new as of today at this… so I really have no idea what I’m doing…
I’m trying to make something that will set the mouse cursor to 10, 10 (X,Y)..
In C (dos.h) it’s as simple, as
in.x.ax = 4;
in.x.cx = 10;
inx..dx = 10;
int86(0×33,&in,&out);
So I assumed that would be all I would have to do… But it doesn’t do anything O.o And as i said before, I really have no idea what I’m doing… So, how many errors, and where are they, in this:
org 100h
mov ax,4
mov cx,10
mov dx,10
int 33h
… and do I need a ‘$’ in the end of it? O.o
So I have no idea what I’m doing, so that surely has thousands of errors! Any help would be greatly appreciated!
OH, and I’m compiling it with
nasm name.asm -o name.com -f bin
I think… it’s all on my XP, which doesn’t have internet.
This looks good to me, so I don’t know why it wouldn’t work.
Run it through a debugger to ensure that the int 33h call is being executed.
EDIT—–
I did confirm that you are using the correct interrupt. It’s 33 hex.
http://www.htl-steyr.ac.at/~morg/pcinfo/hardware/interrupts/inte3mcw.htm
Assembly Language Tutorial #6 Running Hello World
