www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/08/16/13:28:09

Xref: news-dnh.mv.net comp.os.msdos.djgpp:1570
Newsgroups: comp.os.msdos.djgpp
Path: news-dnh.mv.net!mv!news.sprintlink.net!in1.uu.net!ftpbox!mothost!schbbs!kali-e!kore
From: kore AT kali-e DOT eurpd DOT csg DOT mot DOT com (Ken Ore)
Subject: Quick inline assembly code problems/questions...
Organization: Motorola Cellular Subscriber Group
Date: Wed, 16 Aug 1995 13:39:05 GMT
Sender: news AT schbbs DOT mot DOT com (SCHBBS News Account)
Nntp-Posting-Host: 144.188.53.142
Lines: 49
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Dj-Gateway: from newsgroup comp.os.msdos.djgpp

Hello, all.

Quick question about using djgpp's inline stuff:

I'm writing a routine that copies a double buffer into the video
buffer.  The parts of my program that are of interest:

/* -------------------- Globals -------------------- */
char *double_buffer; 
char *video_buffer=0xd0000000;

Here's the module giving me trouble:

vid_ShowDoubleBuffer(void)
{
#ifdef Borland4.5
	asm{
		push ds
		les  di, video_buffer
		lds  si, double_buffer
		mov  cx, 320*200/2
		rep  movsw
		pop  ds
	}
#endif
#ifdef DJ
	asm("
		push %ds
		les  (_video_buffer), %edi
		ldsw (_double_buffer), %esi
		movw 320*200/2, %cx
		rep; movsw
		pop  %ds
  	");	
#endif
} /* End vid_ShowDoubleBuffer */

The Borland45 inline works(with Borland 4.5 obviously).
The DJ version compiles, links, and runs and stuff but
coughs when it hits the inline and pukes out 
the registers and stuff.  Anyone have a clue?  Please post
or email(kore AT eurpd DOT csg DOT mot DOT com), email preferred.  Thanks!

	--Ken
-- 
 +---------------------------------------------+
 | Ken Ore ~ kore AT eurpd DOT csg DOT mot DOT com     		
 |							
 | Software Engineer					

- Raw text -


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