www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/24/20:54:20

From: "Yeep" <Yeep AT xs4all DOT nl>
Newsgroups: comp.os.msdos.djgpp
Subject: [Q] PM just like RM?
Date: 22 Dec 1996 17:04:44 GMT
Organization: XS4ALL, networking for the masses
Lines: 29
Message-ID: <01bbf02a$1fe67430$72216dc2@parkview>
NNTP-Posting-Host: mas04-17.dial.xs4all.nl
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I just started messing in PM and I decided to try this with DJGPP.
Now I got to the point where I wanted to copy a double buffer on the
screen.
I didn't want to do this with standard C intructions, I wanted to do this
in inline asm.
I posted a question here about how to do this, 'cos after 5 hours of trying
I still couldn't get it to work.
(Good thing I was under W95, it saved me a lot of reboots.)
When I got home last night I started trying again and after 4 more hours it
finally worked.
I'm not gonna bother you with all the different combinations of operands
and instructions I tried, but generally it came down to this:

It allocated the double buffer with calloc in stead of malloc.
Then I loaded the VESA lineair frame buffer address in ES and xor-ed EDI.
I then loaded the double buffer pointer in ESE and I movsl-ed it all.
Now this got me thinking.....
This is just like Real mode in a small model.
The variables are local, so I can just mov them or lea them in ESI for move
string operations, but the video screen isn't, so I have to do a segment
overide with ES and clear EDI.
Now is this just a coincidence that this works?
Isn't this supposed to work at all?
Or am I right?

Could anyone tell me, 'cos I'm not happy when my code _just_ works, I wanna
know _why_ it works.

	Yeep

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019