Other Programming Languages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreOther Programming Languages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old March 11th, 2007, 07:25 AM
esmeco esmeco is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Posts: 35 esmeco User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 h 16 m 54 sec
Reputation Power: 3
Clear screen 8086

I'm starting to create a program with 8086 assembly and I was wondering if there's any interrupt that clears the screen.I think I have found some code that could actually do that(mov ax,03h ;int 10h) but I'm not sure why does it do that because I always thought that the functions of the interrupts should be put on the ah lhigh bit register and in this code is put on the register ax.Also,I found this code by searching in google "clear screen assembly" and couldn't find it in an interrupt list.
Also,is there any other ways to clear the screen?

Thanks in advance for the reply!

Reply With Quote
  #2  
Old March 11th, 2007, 07:56 AM
xnemesis64 xnemesis64 is offline
Google's No1 Supporter!
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2007
Location: irc.superirc.info
Posts: 569 xnemesis64 User rank is First Lieutenant (10000 - 20000 Reputation Level)xnemesis64 User rank is First Lieutenant (10000 - 20000 Reputation Level)xnemesis64 User rank is First Lieutenant (10000 - 20000 Reputation Level)xnemesis64 User rank is First Lieutenant (10000 - 20000 Reputation Level)xnemesis64 User rank is First Lieutenant (10000 - 20000 Reputation Level)xnemesis64 User rank is First Lieutenant (10000 - 20000 Reputation Level)xnemesis64 User rank is First Lieutenant (10000 - 20000 Reputation Level)xnemesis64 User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 4 Days 15 h 48 m 12 sec
Reputation Power: 145
Send a message via MSN to xnemesis64 Send a message via Yahoo to xnemesis64 Send a message via Google Talk to xnemesis64 Send a message via Skype to xnemesis64
ax? I thought screen was the c array? c0 c1 etc. Well that's what I remember from my days of assembly. Anyway I'll take a look in a bit when I get a chance and do you some research
__________________
Did this post help? Please Click The Next To My Post
Need help? Did you try Google?
Take a look over at my current work in progress http://crispycrisp.org

Reply With Quote
  #3  
Old March 13th, 2007, 02:07 PM
Schol-R-LEA's Avatar
Schol-R-LEA Schol-R-LEA is offline
Commie Mutant Traitor
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jun 2004
Location: The People's Republic of Berkeley
Posts: 1,082 Schol-R-LEA User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Schol-R-LEA User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Schol-R-LEA User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Schol-R-LEA User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Schol-R-LEA User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Schol-R-LEA User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Schol-R-LEA User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Schol-R-LEA User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Schol-R-LEA User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Schol-R-LEA User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Schol-R-LEA User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 10 h 16 m 50 sec
Reputation Power: 446
xnemesis64: I'm not sure what you mean by the 'c array'; the only thing I can think you are referring to is the video memory page at 0xB8000, which would certainly work, but only if you are certain that it actually is on that video page. Generally speaking, using the BIOS would be more consistent. Do you recall anything else about this?

esmeco: I assume you mean in text mode; to cleatr the screen in Windows (or rather, have ot switch to a full-screen mode) you would need to use a API call rather than an interrupt. AFAIK, there is no 'clear screen' MS-DOS or BIOS function per se; the code I've seen recommended actually scrolls the page up until the existing text is dropped. See
here and here for examples of this. I may be wrong however, and you may want to go through the Interrupt List to see if you can find something.

As for the AX, you have to recall that AH actual is a part of AX, specifically the upper eight bits of the 16-bit extended register (which is in turn the lower 16 bits of the 32-bit EAX register on modern x86 CPUS):
Code:
 ---------------- -------- ----------
|                | A high |  A Low   |
 ----------------- -------------------
|                |        A ext      | 
 ------------------------------------
|            Enhanced AX             |
 ------------------------------------


This admittedly doesn't explain the code you have, as the function code would have to be higher than 0xFF in order to have change the value of AH, but it may be that the function took some sort of argument in AL (a common use).
__________________
Rev First Speaker Schol-R-LEA;2 JAM LCF ELF KoR KCO BiWM TGIF
#define KINSEY (rand() % 7) λ Scheme is the Red Pill
Scheme in ShortUnderstanding the C/C++ Preprocessor
Taming PythonA Highly Opinionated Review of Programming Languages for the Novice, v1.1

FOR SALE: One ShapeSystem 2300 CMD, extensively modified for human use. Includes s/w for anthro, transgender, sex-appeal enhance, & Gillian Anderson and Jason D. Poit clone forms. Some wear. $4500 obo. tverres@et.ins.gov

Reply With Quote
  #4  
Old November 27th, 2007, 08:05 AM
kirpag kirpag is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2007
Posts: 1 kirpag User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 53 sec
Reputation Power: 0
xnemesis64: wow...lotta trouble for clearing the screen, but ya it would work in all cases if you used THAT.

esmeco & Schol-R-LEA : Well, int 10h, ah=0h is a function that sets the desired video mode. The requested mode is sent as a parameter vide al.
Soooo....if you set al=3, it sets it to an 80x2f character mode with 16 colors and 8 pages of memory.
When it sets this mode, it just brings up the freshly allocated page 0 up for you which so far is (obviously) empty. Making it appear as though its clearing the screen. (it is in fact doing just that...)
other available modes are setting al=0, again a character mode with 8 pages but with only 40x25 screen space.
A graphical mode is also available if you set al=13h giving you a 40x25 screen with 256 color space and a resolution of 320x200 pixels with one page of memory.

Remember when you set ax=3, you're setting ah=0 and al=3 in one shot...

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreOther Programming Languages > Clear screen 8086


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway