×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

changing background colors using an increment???

changing background colors using an increment???

changing background colors using an increment???

(OP)
using the : mov eax, black+(backgroundColor*16)

how can I increment backgroundColor to display different colors without changing the color of the text?
I've tried to move backgroundColor to a register, increment the register then move it back to backgroundColor but it doesn't let me do that. Im very stuck right now.

RE: changing background colors using an increment???

hello
you are using text mode
the background color is in the second byte (the first is the ascii and the second is the attribute)
bits 4, 5, 6 are for background so you preserve the first four bits and the last ( of blinking); add 1000h to ax (ax is the video memory text word) or 10001000 to eax ( tow words of memory)
i mean direct access to video text memory is easy then using bios int or other libreray  

RE: changing background colors using an increment???

Don't increment: add 16!

"Information has a tendency to be free.  Which means someone will always tell you something you don't want to know."

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close