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

can anyone help me if there's any m

can anyone help me if there's any m

can anyone help me if there's any m

can anyone help me if there's any memory location of the screen for DOS??? if there is, please give me the location... and if you're in good mood, post me some simple code if u want... :)


RE: can anyone help me if there's any m

segment 0A000h for graphics, something else for text (I can't remember); if you want to do graphics get hold of a good book. Abrash is a good author name to go for. It's not totally straightforward (but it's fun!)

RE: can anyone help me if there's any m

Color text mode starts at 0B800:0000h
Monochrome text mode starts at 0B000:0000h

To check which mode you're in:
AH = 0Fh
INT 10h
if AL == 7h --> monochrome
if AL != 7h --> color

Bert Vingerhoets
Don't worry what people think about you. They're too busy wondering what you think about them.

RE: can anyone help me if there's any m

For most text modes, segment 0B800h like Bertv says. In your program it is not unusual to set the video mode at the start - this clears the screen for one, and gives you a definate address for screen memory. I believe the DOS screen is usually video mode 3 (80x20 text resol,16 colors,8 display pages and screen addr 0B800h), but for other modes look for a list in BIOS INT 10h fuction 01h, for example, Ralf Brown might have this. Abrash is very cool too, but he deals more with graphics modes than text - if you can get an e-book read it anyway.

I have written this code as an example for you:

assume cs:code

code segment
  org 100h
  jmp start

; set screen mode (clear screen)
  mov ah,00h ; BIOS function
  mov al,03h ; video mode
  int 10h

  mov ax,0b800h ; video address
  mov es,ax
  sub di,di     ; start of vid.mem

  mov cx,07d0h ; repeat to fill screen
  mov al,'±'  ; character to put
  mov es:[di],al
  inc di
  mov al,03h  ; color
  mov es:[di],al
  inc di
  loop outputloop

; wait for key press
  mov ah,00h ; BIOS function
  int 16h

; clear screen
  mov ah,00h ; BIOS function
  mov al,03h ; video mode
  int 10h

; terminate program
  mov ax,4c00h
  int 21h

code ends

end program

Hope that helps.

RE: can anyone help me if there's any m

thanks guys!!!

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