Hello, i am a student and need write an asembler program. for basic 8086 architecture. but i do not understand few conditions for a program:
it says that program must output text to screen whit a int 21, 40h funktion, and indicate stdout as output, with descriptor 1.
what this means?
but isnt int 21, 40h a output to a file?
sorry for my english :lol:

The keyboard and screen are treated just like files. There are three files that are always open when your program: stdin, stdout, and stderr are 0, 1, and 2, respectively. stdin is the keyboard, while stdout and stderr are the monitor. Here is more information about them.

int 21, 40h can be used because the monitor is treated just like a file.

The keyboard and screen are treated just like files. There are three files that are always open when your program: stdin, stdout, and stderr are 0, 1, and 2, respectively. stdin is the keyboard, while stdout and stderr are the monitor. Here is more information about them.

int 21, 40h can be used because the monitor is treated just like a file.

thanks that was big help. i have find some code example:

mov ah,40h
mov bx, 1
mov cl,length
xor ch,ch
mov dx,OFFSET msgText
int 21h

so bx register means stdout in this case? and were is "lenght" that is lenght in bytes of buffer? is that corect?

yes, length is the number of characters you want written to the screen.

If you do not have this already, here is a list of most common interrups

wow, thats great link. and one more thing, how i do get parameter send to program, like "prog \? "

This article has been dead for over six months. Start a new discussion instead.