www.delorie.com/archives/browse.cgi | search |
From: | "Michael Stewart" <mike AT reggin DOT freeserve DOT co DOT uk> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: asm code |
Date: | Thu, 13 May 1999 22:09:52 +0100 |
Organization: | Customer of Planet Online |
Lines: | 32 |
Message-ID: | <7hff3l$kgb$1@news4.svr.pol.co.uk> |
References: | <373B48C1 DOT 1660 AT bellsouth DOT net> |
NNTP-Posting-Host: | modem-78.bromine.dialup.pol.co.uk |
X-Trace: | news4.svr.pol.co.uk 926629813 21003 62.136.17.78 (13 May 1999 21:10:13 GMT) |
NNTP-Posting-Date: | 13 May 1999 21:10:13 GMT |
X-Complaints-To: | abuse AT theplanet DOT net |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Newsreader: | Microsoft Outlook Express 5.00.2314.1300 |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.2314.1300 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
seth <sethpark AT bellsouth DOT net> wrote in message news:373B48C1 DOT 1660 AT bellsouth DOT net... > Hello, I just started trying to learn Assembler. > I have a few questions.... > Is adding/subtracting ect. necessarily alot faster in Asm than in C? > Such as: > mov ax, 5 > mov bx, 5 > add ax, bx > > Would that be faster than > > int one, two; > one+=two; No. gcc will optimise the code to the faster possible. BTW, the above ASM is in Intel style, DJGPP uses AT&T. > Also, could someone give me some example code on how to add four numbers > and find the average with Asm? > > thanks -- Michael Stewart www.freeserve.co.uk mike AT reggin DOT freeserve DOT co DOT uk "Just because your paranoid doesn't mean they aren't after you!"
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |