delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/04/29/20:08:57

From: "Alexei A. Frounze" <dummy_addressee AT hotmail DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Assembler smal question
Date: Sun, 29 Apr 2001 18:18:39 -0400
Organization: Global Crossing Telecommunications
Lines: 61
Sender: UNKNOWN AT 209-130-138-153 DOT nas3 DOT roc DOT gblx DOT net
Message-ID: <9ci3t3$g6o$1@node17.cwnet.frontiernet.net>
References: <9chviu$1ps$1 AT info DOT cyf-kr DOT edu DOT pl>
NNTP-Posting-Host: 209-130-138-153.nas3.roc.gblx.net
X-Trace: node17.cwnet.frontiernet.net 988582627 16600 209.130.138.153 (29 Apr 2001 22:17:07 GMT)
X-Complaints-To: abuse AT frontiernet DOT net
NNTP-Posting-Date: 29 Apr 2001 22:17:07 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Rafal Maj" <maj_rafal AT poczta DOT onet DOT pl> wrote in message
news:9chviu$1ps$1 AT info DOT cyf-kr DOT edu DOT pl...
> I have only one small question about assembler. I'm using modem, so I
REALY
> can't read online documentation or FAQ for DJGPP.

I too have a modem but I can. Is there any conceptual problem? Anyway, you
can download the FAQ once to the disk on your computer and then read it
off-line as often as you need.

> How can I write code like this :
>
> mov AX,0x10
> int 0x13
>
> I want to use assembler direct inside my C++ functions like:
> int main() { _asm { mov AX,0x10 } }
>
> How can I fill memory from A000:0000 to A000:0FFF with pattern of
increasing
> bytes ? Something like this :
>
> mov cx,0x0FFF
> xor dl,dl
> begin :
> mov bx:cx, dl
> inc dl
> dec cx
> loop begin
>
> I know that this example probably has some bugs (I'm newbie to assembler
;)
>
> Thanks in advice.

First of all, GCC is a very efficient compiler with a very good code
optimizer so there is no reason for you (especially, if you're completely
new to assembly language).
Second thing is that GCC doesn't support native for x86 CPU assembly
language syntax but instead it supports AT&T syntax wich is more complicated
and I guess it's still in use in GNU software due to compatibility reasons
and is not very good to write assembly stuff in it.
Third thing is that if you *really* want to learn assembly language, this is
not the appropriate newsgroup, you better subscribe for
news:comp.lang.asm.x86 and post the the questions regarding assembly
language, learning it, online information and tutorials there.
Fourth thing.... if you need information on inline assembly in a C/C++
program for DJGPP, you should go www.delorie.com/djgpp/ and see there some
tutorials among other online documentation.

Good Luck
P.S. Get the FAQ, it will be an advantage to you anyways.
--
Alexei A. Frounze
alexfru [AT] chat [DOT] ru
http://alexfru.chat.ru
http://members.xoom.com/alexfru/
http://welcome.to/pmode/



- Raw text -


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