0

hi Pals,
i have a problem with MASM interrpt 10h.
i want to colour s portion of the screen using the 10h interrupt after changinging to the video mode. Please help

.model small
.stack 100h
.386

.data
.code
main PROC

	    mov  ax,@data
	    mov  ds,ax
		
		mov ah, 0
		mov al, 3h
		int 10h        ;    set  video  mode 80*25
 		mov ah,1
		int 21h
 ;----  code  for colouring the  screen
            mov ax, 0600h
                mov ch, 1           ;   size to  set  colu
		 mov cl, 1
		 mov dh, 24
		mov dl, 78 
		mov bh, 100b
     	int 10h  
		 
;-----------------------------------------------
		mov ah ,04ch	    ; exit       interrupt
		int  21h			; call  sys  interrupt
   main ENDP
   END main

Please help;

2
Contributors
1
Reply
2
Views
10 Years
Discussion Span
Last Post by Duoas
0

Make sure you are using a good reference when you use interrupts. Also, try to reduce the number of instructions you use.

;set the video mode to CGA 80 x 25, 16-color
mov ax, 0300h
int 10h

;wait for a keypress
mov ah, 1
int 21h

;clear the screen to a specific character attribute
mov ax, 0600h  ; scroll all lines up == clear screen
mov bh, 07h    ; light gray on black
mov cx, 0      ; upper-left = 0, 0
mov dx, 184Fh  ; lower-right = 24, 79
int 10h

Hope this helps.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.