My 32 bit PUTPIXEL in SVGA ...HELP !!!

I have this kind of procedure what I am tried to get work in my raw 32 bit PMODE ...but .. It wont work and I dont know why so help me little...


PUTPIXEL:

PUSH DX

PUSH BX

PUSH AX


MOV AX,1600

MUL CX

ADD BX,BX

ADD AX,BX

JNC NOCARRY

INC DX

NOCARRY:


; PUSH AX


CMP DX,SVGABANK

JZ SAME


MOV SVGABANK,DX


SHL DX,4

MOV AH,DL

MOV AL,09H

MOV DX,3CEH

OUT DX,AX


SAME:

MOV AX,0A000H

; MOV ES,AX


; POP DI

POP AX


; STOSW


POP BX

POP DX


RET


Input:

AX = Color

BX = X location

CX = Y location


This procedure works perfectly in RMODE but what makes it lock in pmode ??? all ; things dont work ...??

Why that one PUSH AX all so lock computer ???

This piece of code "runs" if all these problems are marked whit ";" like now ...

BTW SVGA mode is 800*600*64k if you need that information.


OK and I have all so second problem what comes up if I change that putpixel to REAL PROCEDURE like this:

PUTPIXEL PROC


PUSH ...

MOV ....

etc...


RET


PUTPIXEL ENDP


Why this kind of procedures dont work in code32 segment ?????


OK THANK YOU VERY MUCH for your help and if you need more details please ask ...I realy need your help now ...




Comments

  • ES is not a segment in protected mode. It is a selector.

    You can't just load the real mode address into ES and then try to

    access memory.. it'll typically cause a GPF.

    To do what your attempting, I suggest you try the DPMI function

    SegmentToSelector. You can find a complete list of all the DPMI

    functions on the page below:




    URL:http://www.delorie.com/

  • Is there any way to set the ES selector in easy way ??? whit some commands ?????

    Whit out any INT systems ???


    : ES is not a segment in protected mode. It is a selector.

    : You can't just load the real mode address into ES and then try to

    : access memory.. it'll typically cause a GPF.

    : To do what your attempting, I suggest you try the DPMI function

    : SegmentToSelector. You can find a complete list of all the DPMI

    : functions on the page below:





Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories