flat assembler
Message board for the users of flat assembler.

Index > DOS > Color text

Author
Thread Post new topic Reply to topic
marcelo.sabino



Joined: 10 Mar 2006
Posts: 4
marcelo.sabino
How can i use color on a simple output program like this.
Code:
org 256

jmp inicio

menu: 
  db ' -------------------------',13,10
  db '| File  |'
  db ' Edit   |'
  db '    ?   |',13,10
  db ' -------------------------',13,10
  db '| New   |'
  db '  Undo  |'
  db '  About |',13,10
  db '| Close |'
  db '  Redo  |'
  db '        |',13,10
  db ' -------------------------'
  db '$'
inicio:  
  mov ah,9
  mov dx,menu
  int 21h
  mov ah,0
  int 16h
  int 21h
  
int 20h
    
Post 20 Sep 2006, 18:34
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
Int 10/AH=13h
VIDEO - WRITE STRING (AT and later,EGA)

http://www.ctyme.com/intr/rb-0210.htm
Post 21 Sep 2006, 01:48
View user's profile Send private message Visit poster's website Reply with quote
2



Joined: 26 Sep 2006
Posts: 92
2
I've been looking at that call. I don't know a thing about ES or BP.
I'm surprised I've gone this far without needing them.
Can somebody give an example of correctly using this function?
Post 11 Oct 2006, 18:33
View user's profile Send private message Reply with quote
2



Joined: 26 Sep 2006
Posts: 92
2
Never mind! I figure it out!

Code:
org 256
mov bp,green
mov ah,19 ;call 19
mov al,1  ;move cursor
mov bh,0  ;page 0
mov bl,10 ;color
mov cx,32 ;length of string to print
mov dh,0  ;row
mov dl,0  ;column
int 16
mov ah,8
int 33
int 32
green db 'I am the extremely green string!'
    

_________________
There are 10 kinds of people in the world.
Those who know binary and those who haven't met me.
Post 11 Oct 2006, 19:36
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.