1 /* $Id: pixelsup_i386.S,v 1.1 2003/08/24 12:11:13 dwelch Exp $
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * FILE: ntoskrnl/inbv/i386/pixelsup.S
6 * PURPOSE: Boot video support
7 * PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
12 * InbvPutPixels(int x, int y, unsigned long c);
14 * Will put 4 pixels on the screen at
15 * (x+0*8,y), (x+1*8,y), (x+2*8,y), and (x+3*8,y)
17 * bits 0- 3: Palette index for pixel at (x+0*8,y)
18 * bits 8-11: Palette index for pixel at (x+1*8,y)
19 * bits 16-19: Palette index for pixel at (x+2*8,y)
20 * bits 24-27: Palette index for pixel at (x+3*8,y)
23 * [EBP+08h] - x X-coordinate of first pixel
24 * [ESP+0Ch] - y Y-coordinate of first pixel
25 * [ESP+10h] - c 4*4-bit color indices
32 /* Compute mask and put it in EBX
35 movl _maskbit(,%esi, 4), %ebx
37 /* Don't set bit mask if it is already set */
38 cmpl (inbv_last_mask),%ebx
41 /* Set Mask Bit Register
42 WRITE_PORT_UCHAR((PUCHAR)0x3ce,0x08);
43 WRITE_PORT_UCHAR((PUCHAR)0x3cf,mask); */
44 movl %ebx,(inbv_last_mask)
54 /* Compute offset in video memory and put it in EBX
55 offset = (x >> 3) + y80[y]; */
56 movl 0xC(%ebp), %esi /* y */
57 movl _y80(,%esi, 4), %ebx
58 movl 0x8(%ebp), %eax /* x */
63 (UCHAR) READ_REGISTER_UCHAR(vidmem + offset+0); */
67 /* Write color index for first pixel
68 *((PUCHAR)(vidmem + offset+0)) = (c >> 0*8) & 0xff; */
73 (UCHAR) READ_REGISTER_UCHAR(vidmem + offset+1); */
75 /* Write color index for second pixel
76 *((PUCHAR)(vidmem + offset+1)) = (c >> 1*8) & 0xff; */
81 (UCHAR) READ_REGISTER_UCHAR(vidmem + offset+2); */
83 /* Write color index for third pixel
84 *((PUCHAR)(vidmem + offset+2)) = (c >> 2*8) & 0xff; */
89 (UCHAR) READ_REGISTER_UCHAR(vidmem + offset+3); */
91 /* Write color index for fourth pixel
92 *((PUCHAR)(vidmem + offset+3)) = (c >> 3*8) & 0xff; */