Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédente | |||
back2root:archives:denthor:part-01 [2021/09/04 22:38] – [Code Source : C] frater | back2root: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' | I drop source code all through my explanations. You needn' | ||
</ | </ | ||
Ligne 82: | Ligne 82: | ||
< | < | ||
- | 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. |
- | | + | |
On entry: | On entry: | ||
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. | ||
+ | < | ||
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 ;-) | ||
+ | </ | ||
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 ... |