|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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! |
|
#2
|
|||
|
|||
|
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 PostNeed help? Did you try Google? Take a look over at my current work in progress http://crispycrisp.org |
|
#3
|
||||
|
||||
|
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 Short • Understanding the C/C++ Preprocessor Taming Python • A 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 |
|
#4
|
|||
|
|||
|
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... |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Other Programming Languages > Clear screen 8086 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|