LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-02-2003, 09:39 AM   #1
Citizen Bleys
Member
 
Registered: Mar 2001
Location: Moncton, NB
Distribution: Gentoo 2006.0
Posts: 181

Rep: Reputation: 30
Simple ASM question


I know this is a very simple thing to do, but I've not done any playing around in ASM for three years, and of course, the numbers have escaped me ><

I want a simple asm routine to change the text color in a terminal window, without switching to mode 13h. I've looked through a lot of references for int 10h, and all I've been able to do is change the border color
 
Old 04-02-2003, 02:09 PM   #2
bentz
Member
 
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362

Rep: Reputation: 30
It's been a long time, and unfortunately, I don't have any examples. I do remember that if you send out hex to the video card using an ascii character, followed by a color assignment, followed by another ascii character, and another color assignment, you can control the foreground and background of each character that is written to the video card.

Like 'Hello World':
48 10 65 10 6C 10 6C 10 6F 10 20 10 57 10 6F 10 72 10 6C 10 64 10

I'm not sure what background/forground colors correspond to 010h, but changing this value to something that represents the colors that you want, and sending it to the video adapter should produce the results you want.
 
Old 04-03-2003, 05:55 AM   #3
Citizen Bleys
Member
 
Registered: Mar 2001
Location: Moncton, NB
Distribution: Gentoo 2006.0
Posts: 181

Original Poster
Rep: Reputation: 30
Actually, I meant running a little asm program that would turn the text color in a console window blue...i.e.

(white text here)

# ./asmcolor

(blue text here)

...so that everything the user enters afterwards is blue.

Useless, but fun
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu Fluxbox simple question, simple answer? generallimptoes Linux - Software 3 09-26-2005 02:03 PM
asm Question Whiteghost Programming 2 09-03-2005 09:26 AM
asm question karlan Programming 6 07-16-2004 11:54 AM
ASM question zWaR Programming 2 06-26-2004 11:42 AM
question on usr/include/asm/module.h kmack2001 Linux - Newbie 0 02-14-2004 10:40 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration