There are so many services which can be used with the interrupt 10h,
I'd like to ask the question about two of them whom with i am confused

First is,

 AH = 06H SCROLL UP WINDOW
 AH = 07H SCROLL DOWN WINDOW

While coding in DOS what is meant by Scroll up / Scroll down ?

Have a look at this,

    ; AL = NUMBER OF LINES BY WHICH TO SCROLL UP (00H = CLEAR ENTIRE WINDOW)
    ; BH = ATTRIBUTE USED TO WRITE BLANK LINES AT BOTTOM OF WINDOW
    ; CH,CL = ROW,COLUMN OF WINDOW'S UPPER LEFT CORNER
    ; DH,DL = ROW,COLUMN OF WINDOW'S LOWER RIGHT CORNER

Here it says that BH is used to write blank lines at the bottom of the window,
but when i am using this code,

    MOV AH, 06H
    MOV AL, 00H
    MOV CX, 00H
    MOV DH, 25
    MOV DL, 80
    INT 10H

and not defining the value of BH, my results won't display on the screen and as soon as i declare dthe value of Bh, it is actually controlling the Foreground and Background color of DOS screen.
so why does it say that BH is used to write blank lines at the bottom of the window ?

The Second is,

;AH = 02 USED To SET CURSOR POSITION

    ;BH = PAGE NUMBER
    ;CH,CL = ROW,COLUMN OF WINDOW'S UPPER LEFT CORNER
    ;DH,DL = ROW,COLUMN OF WINDOW'S LOWER RIGHT CORNER

Here BH is equal to page number :confused: ? what is meant by a page number in a normal DOS screen ?

Scroll up/scroll down means that everything on the display (or in the window defined by cx/dx) moves up/down one or more lines. You probably want to put 7 in bh, which will give you the normal white text on a blck background.

Almost always the page number is zero, unless you have used another int 10h function to change it. There is room in the video buffer for four pages of text, and you can use an int 10h function to switch between them, but in my experience that facility is rarely if ever used.

Be a part of the DaniWeb community

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