Mail Archives: djgpp/1999/09/18/18:24:18
Nate Eldredge <neldredge AT hmc DOT edu> wrote in message
news:37E29DEB DOT 3961CD69 AT hmc DOT edu...
> "Santosh H." wrote:
> >
> > Hi,
> > I was trying today to port some of my graphics functions I'd written
for
> > borland C to DJGPP(why prot mode u knucklehead!sorry:-)).Right , So i
have
> > a procedure which i converted from TASM to NASM syntax.the procedure is
as
> > below
> >
> > _Drawhorizline:
> > push ebp
> > mov ebp,esp
> > push es
> > push ds
> >
> > mov es,_VideoSegmentSelector ;which I get by push word 0a000h
> > call
___dpmi_segment_to_descriptor
> > mov
[_Videosegmentselector],ax
> > mov di,0 ;0 just for eg
> > mov cx,80
> > rep stosb "BANG!"<-generates a gpf
>
I encountered EXACTLY the same problem in converting TASM code to NASM code.
Stosb stores the value in al (? was it ah?) to es:di right? I broke this
down to its components, doing something like
mov [es:di],al
inc di
Check out the code on my programming page - I deal specfically with
converting real mode TASM code for graphics to protected mode NASM/DJGPP
compatible code - the stuff I have there does exactly what you seem to want
to do.
--
This message courtesy of
RylanNet rylan AT intekom DOT co DOT za
http://home.intekom.com/rylan/
--
StarWars for ever!.
- Raw text -