Date: Wed, 4 Apr 2001 10:14:59 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Mathias K cc: djgpp AT delorie DOT com Subject: Re: AST&T syntax In-Reply-To: <001001c0bcd1$f39fd960$0b0510ac@astra.sunderbynskabel.bd.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Wed, 4 Apr 2001, Mathias K wrote: > if video_buffer is a global pointer and data is a local pointer, could = > you translate these 7 lines for me? > > push ds > les di, video_buffer > lds si, data > mov cx, 32000 > cld > rep movsw > pop ds Untested: #include dosmemput (data, 32000*2, video_buffer_seg*16 + video_buffer_offs); where video_buffer_seg and video_buffer_offs are the segment and the offset of the video buffer. dosmemput is a library function which expands into the same assembly code that you were trying to use, except that it does that correctly for protected-mode programming, which disallows loading arbitrary values into segment registers such as DS and ES. In other words, don't use assembly unless you really need to: it introduces a level of complexity into DJGPP programming that a new user doesn't need. See chapter 18 in the DJGPP FAQ list for more about low-level programming with DJGPP.