delorie.com/archives/browse.cgi | search |
From: | "David Mitchell" <dmitchell AT inet DOT net DOT nz> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Assembly routine |
Date: | Fri, 2 Jul 1999 17:12:22 +1200 |
Organization: | Inet Ltd, Christchurch, New Zealand |
Lines: | 30 |
Message-ID: | <930893937.855103@kyle.inet.net.nz> |
References: | <377b163a DOT 2813653 AT news DOT telepac DOT pt> |
NNTP-Posting-Host: | kyle.inet.net.nz |
X-Trace: | titan.xtra.co.nz 930893177 4637563 202.50.171.4 (2 Jul 1999 05:26:17 GMT) |
X-Complaints-To: | abuse AT xtra DOT co DOT nz |
NNTP-Posting-Date: | 2 Jul 1999 05:26:17 GMT |
X-Newsreader: | Microsoft Outlook Express 4.72.3110.5 |
X-MimeOLE: | Produced By Microsoft MimeOLE V4.72.3110.3 |
Cache-Post-Path: | kyle.inet.net.nz!unknown AT p42-tnt1 DOT inet DOT net DOT nz |
X-Cache: | nntpcache 2.3.3 (see http://www.nntpcache.org/) |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
aperes wrote in message <377b163a DOT 2813653 AT news DOT telepac DOT pt>... > >Please help me! > >I'm trying to write a routine that transfers the contents of a buffer >to video memory. This is my routine: > > FlipAsm(_my_ds(), (int) virtual_screen); you want to call it by: FlipAsm(_my_ds(), &virtual_screen); also: > asm(" > MOVW %0, %%ES /* ES= video (%0) */ > MOVW %1, %%DS /* DS= buffer (%1) = segmento dados */ > > MOVL $0xA0000, %%EAX > MOVL %%EAX, %%EDI /* EDI = Ax0000, ES:DI > MOVL %2, %%EAX > MOVL %%EAX, %%ESI /* ESI = source, DS:SI */ This code is wrong. You are moving the Data segment to ES, whereas you want to move 0x0a000 to ES, and xorw %%si, %%si Then it should work. You don't need the video variable. David
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |