Outils pour utilisateurs

Outils du site


back2root:archives:denthor:part-01

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
back2root:archives:denthor:part-01 [2021/09/04 22:38] – [Code Source : C] fraterback2root:archives:denthor:part-01 [2024/08/27 08:43] (Version actuelle) – [Putting a pixel on the screen (two different methoods)] frater
Ligne 13: Ligne 13:
  
  
-<WRAP center round info 80%>+<WRAP center round info>
 I drop source code all through my explanations. You needn't try to grab all of it from all over the place, at the end of each part I add a little program that uses all the new routines that we have learned. If you do not fully understand a section, leave me private mail telling me what you don't understand or asking how I got something etc, and I will try to make myself clearer. One last thing : When you spot a mistake I have made in one of my parts, leave me mail and I will correct it post-haste. I drop source code all through my explanations. You needn't try to grab all of it from all over the place, at the end of each part I add a little program that uses all the new routines that we have learned. If you do not fully understand a section, leave me private mail telling me what you don't understand or asking how I got something etc, and I will try to make myself clearer. One last thing : When you spot a mistake I have made in one of my parts, leave me mail and I will correct it post-haste.
 </WRAP> </WRAP>
Ligne 82: Ligne 82:
  
 <code> <code>
-    Writes a pixel dot of a specified color at a specified screen +    Writes a pixel dot of a specified color at a specified screen coordinate.
-    coordinate.+
  
     On entry:      AH         0Ch     On entry:      AH         0Ch
Ligne 116: Ligne 115:
 you how to alter it in my next lesson, but for now you will have to hunt for colors that fit in for what you want to do. Luckily, a byte is 0 to 255, so that is what we pass to the col variable. Have a look at the following. you how to alter it in my next lesson, but for now you will have to hunt for colors that fit in for what you want to do. Luckily, a byte is 0 to 255, so that is what we pass to the col variable. Have a look at the following.
  
 +<code>
     CGA = 4 colours.     CGA = 4 colours.
     4x4 = 16     4x4 = 16
Ligne 122: Ligne 122:
     VGA = 256 colors.     VGA = 256 colors.
     Therefore an EGA is a CGA squared, and a VGA is an EGA squared ;-)     Therefore an EGA is a CGA squared, and a VGA is an EGA squared ;-)
 +</code>
  
 Anyway, back to reality. Even though the abouve procedure is written in assembly language, it is slooow. Why? I hear your enquiring minds cry. The reason is simple : It uses interrupts (It calls INT 10h). Interrupts are sloooow ... which is okay for getting into MCGA mode, but not for trying to put down a pixel lickety-split. So, why not try the following ... Anyway, back to reality. Even though the abouve procedure is written in assembly language, it is slooow. Why? I hear your enquiring minds cry. The reason is simple : It uses interrupts (It calls INT 10h). Interrupts are sloooow ... which is okay for getting into MCGA mode, but not for trying to put down a pixel lickety-split. So, why not try the following ...
back2root/archives/denthor/part-01.1630787932.txt.gz · Dernière modification : 2021/09/04 22:38 de frater