Mail Archives: djgpp/1998/10/17/01:43:13
Message-ID: | <00d001bdf990$af591660$b36f19c4@default>
|
From: | rylan AT intekom DOT co DOT za (StefanViljoen,6599)
|
To: | <djgpp AT delorie DOT com>
|
Subject: | Re: Assembly woes...
|
Date: | Sat, 17 Oct 1998 07:36:30 +0200
|
MIME-Version: | 1.0
|
X-Priority: | 3
|
X-MSMail-Priority: | Normal
|
X-Mailer: | Microsoft Outlook Express 4.72.2106.4
|
X-MimeOLE: | Produced By Microsoft MimeOLE V4.72.2106.4
|
Reply-To: | djgpp AT delorie DOT com
|
-----Original Message-----
From: Ron Barbosa <rbarbosa AT mediaone DOT net>
Newsgroups: comp.os.msdos.djgpp
Date: Friday, October 16, 1998 7:49 AM
Subject: Assembly woes...
>syntax. My assembly is infantile-to-nonexistant. I've seen a few
>online mini-books and howtos but they are for Intel syntax.
There is a freeware intel syntax compiler for DJGPP called NASM:
http://www.cryogen.com/nasm/
It takes intel syntax and can output DJGPP compatible .COFF object files. I
use it for all my projects.
>If anyone out there would be
>kind enough to explain it to me, and give me some insight to converting
>les di,video_buffer
Loads the address of video_buffer into the ES:DI register
>mov al,BYTE PTR color
Sets the AL register (subregister of AX) to the address of the variable
color
>mov ah,al
Extends the value in AL into AH, i. e. just copies it over
>move cx,320*200/2
Sets CX to 32000
>rep stosw
Stores the value in the AX register to ES:DI 32000 times. What this does in
effect is to copy the video_buffer to the screen - many games / graphics
progs use this or something very similar to do animation and effects.
Check out the attached file for a DJGPP + NASM implementation of exactly the
above.
- Raw text -