MASM int 10h help

Reply

Join Date: Oct 2007
Posts: 1
Reputation: esquared is an unknown quantity at this point 
Solved Threads: 0
esquared esquared is offline Offline
Newbie Poster

MASM int 10h help

 
0
  #1
Oct 27th, 2007
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
  1. .model small
  2. .stack 100h
  3. .386
  4.  
  5. .data
  6. .code
  7. main PROC
  8.  
  9. mov ax,@data
  10. mov ds,ax
  11.  
  12. mov ah, 0
  13. mov al, 3h
  14. int 10h ; set video mode 80*25
  15. mov ah,1
  16. int 21h
  17. ;---- code for colouring the screen
  18. mov ax, 0600h
  19. mov ch, 1 ; size to set colu
  20. mov cl, 1
  21. mov dh, 24
  22. mov dl, 78
  23. mov bh, 100b
  24. int 10h
  25.  
  26. ;-----------------------------------------------
  27. mov ah ,04ch ; exit interrupt
  28. int 21h ; call sys interrupt
  29. main ENDP
  30. END main

Please help;
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 1,951
Reputation: Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of 
Solved Threads: 214
Featured Poster
Duoas's Avatar
Duoas Duoas is offline Offline
Posting Virtuoso

Re: MASM int 10h help

 
0
  #2
Oct 27th, 2007
Make sure you are using a good reference when you use interrupts. Also, try to reduce the number of instructions you use.
  1. ;set the video mode to CGA 80 x 25, 16-color
  2. mov ax, 0300h
  3. int 10h
  4.  
  5. ;wait for a keypress
  6. mov ah, 1
  7. int 21h
  8.  
  9. ;clear the screen to a specific character attribute
  10. mov ax, 0600h ; scroll all lines up == clear screen
  11. mov bh, 07h ; light gray on black
  12. mov cx, 0 ; upper-left = 0, 0
  13. mov dx, 184Fh ; lower-right = 24, 79
  14. int 10h

Hope this helps.
Last edited by Duoas; Oct 27th, 2007 at 7:31 pm.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC