Routines in mode 12h (640x480x16 colors) 
Author Message
 Routines in mode 12h (640x480x16 colors)

Quote:

> Please, I need Put Pixel and Get Pixel Color routines for the mode
> 12h.Where I can get them??

Do you use the BGI driver and Graph.tpu? GetPixel(X,Y) and
PutPixel(X,Y,colour);

Else look for the INT 10H procedures in Ralph Browns "Interrupt"
list. There exist your desired functions. You can write them
in ASM or with Registers and INTR($10,Regs).

The famous Ralph Brown's list is available as .ZIP and for
convenience as html with a search engine etc.
http://www.*-*-*.com/
chapter "information"
Franz Glaser
http://www.*-*-*.com/



Wed, 18 Jun 1902 08:00:00 GMT  
 Routines in mode 12h (640x480x16 colors)

Quote:

> Else look for the INT 10H procedures in Ralph Browns "Interrupt"
> list. There exist your desired functions. You can write them
> in ASM or with Registers and INTR($10,Regs).

PutPixel
   MOV   AH,0CH
   MOV   AL,colour
   MOV   CX,column
   MOV   DX,row
   MOV   BX,0 {page # in BH}
   INT  10H

GetPixel
   MOV   AH,0DH
   MOV   BX,0 {page # in BH}
   MOV   CX,column
   MOV   DX,row
   INT   10H
   ;AL = pixel colour

Quote:
> Franz Glaser
> http://members.eunet.at/meg-glaser



Wed, 18 Jun 1902 08:00:00 GMT  
 Routines in mode 12h (640x480x16 colors)


Quote:
>Please, I need Put Pixel and Get Pixel Color routines for the mode
>12h.Where I can get them??

PutPixel, GetPixel. Unit Graph :-)
Harry Poloscov

---- Processor not found. System halted ----


Wed, 18 Jun 1902 08:00:00 GMT  
 Routines in mode 12h (640x480x16 colors)

Quote:

>PutPixel
>   MOV   AH,0CH
>   MOV   AL,colour
>   MOV   CX,column
>   MOV   DX,row
>   MOV   BX,0 {page # in BH}
>   INT 10H

    Drawing pixel via Int 10h (Bios Video interrupt) is at least
10x slower then writing direct into video memory. Can't belive
 nobody replyed this yet... ;)

---------------------------------------------------------------------
Procedure WritePixel(X,Y: Word; Color: Byte); Assembler;
Asm
    mov   dx,3ceh
    mov   ax,0f01h
    out     dx,ax
    xor     al,al
    mov   ah,Color
    out     dx,ax
    mov   cx,X
    and    cx,00000111b
    mov   ah,10000000b
    shr     ah,cl
    mov   al,08h
    out     dx,ax
    mov   bx,Y
    mov   cx,bx
    shl      bx,6
    shl      cx,4
    add    bx,cx
    mov   ax,X
    shr     ax,3
    add    bx,ax
    mov   ax,0a000h
    mov   es,ax
    mov   al,es:[bx]
    mov   es:[bx],al
End;
-------------------------------------------------------------

                               All the best... Vlada...



Wed, 18 Jun 1902 08:00:00 GMT  
 Routines in mode 12h (640x480x16 colors)


Wed, 18 Jun 1902 08:00:00 GMT  
 Routines in mode 12h (640x480x16 colors)


Wed, 18 Jun 1902 08:00:00 GMT  
 Routines in mode 12h (640x480x16 colors)


Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 11 post ] 

 Relevant Pages 

1. PUTPIXEL REPLACEMENT IN MODE 12h...THATS 640x480x16 (BGI-style)

2. By request: Mode 12h routines

3. FREE 12h BGI Icon Editor n routine for TP7

4. Copiing buffer to VGA 12h mode *HELP* 2nd try

5. Mode 12h

6. Putpixel in mode 12h

7. mode 12h system fonts

8. Help for mode 12h

9. Printing in Mode 12h

10. REQ: Writing text in mode 12h

11. Copiing buffer to VGA 12h mode *HELP*

12. 136 colors in VGA 640x480x16

 

 
Powered by phpBB® Forum Software