• Welcome to Valhalla Legends Archive.
 

Getting started

Started by noarch, February 10, 2003, 04:20 PM

Previous topic - Next topic

Adron

#15
I suppose if you know exactly what the macros do, and when they're not appropriate to use, you can go ahead and use them. I think there's a great risk that they will produce worse code than you would get if you let a C compiler do it for you though.

I also didn't see many explanations of the macros in that template for beginner assembler programmers you posted - they sure shouldn't be using a lot of macros they don't understand when they start programming. They'll probably also need to debug their programs and I'm not sure that will be made easier if they're running macros instead of instructions they actually wrote.

CupHead

#16
I've looked at the disassembly for the macros (inside of my programs) to see if it wouldn't be more efficient to write the routines, but it results in as efficient code as if I had done it manually.

c0ol

asm is only good for inline code, since a C compiler can push out pages of asm in seconds, where a human cant. its less expensive to use up a LITTLE cpu time with slightly less efficient(only if ur an asm ninja) code than it is to use up precious human resources on trivial mind numbing tasks such as straight asm coding.  That aside, asm does make a great place for excersize in programming.

Magna

Heres an easier way to do the hello world in a msgbox


.386
.Model Flat ,stdcall
Locals
Jumps

extern    MessageBoxA:PROC
extern    ExitProcess:PROC

mb_ok     equ 0
hWnd      equ 0
lptext      equ offset text
lpcaption equ offset caption

.Data
text db "Hello World!",0ah
      db "Magna Greets All Who did this!",0

caption db "What Up",0

.Code
Main:

push mb_ok
push offset caption
push offset text
push hWnd
call ExitProcess

End  Main

iago

shouldn't you be calling MessageBoxA() somewhere?
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Skywing

#20
Quote from: iago on August 23, 2003, 07:21 PM
shouldn't you be calling MessageBoxA() somewhere?
Yes.  His code absolutely does not work.

You need a call MessageBoxA before that call ExitProcess statement.

Maddox

Quote from: Skywing on February 10, 2003, 04:25 PM
IA32 == Intel x86.  They're one and the same.

Anyways, maybe this reference might come in handy.

I find it easier to view the 421 pages as a pdf.
http://www.microsym.com/386intel.pdf
asdf.

Adron

Isn't that much harder to search in? Do you have some special tool to read it?

iago

I personally Hate PDF's.. HATEHATEHATEHATEHATE them!  My prof's at school use those, mostly because they're generally read-only, and they're SO annoying!


(Unless you're printing them off)


Also, somebody should find that topic on Free Assembly Books.. I still use Vol 2 a lot.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Maddox

#24
Quote from: Adron on August 31, 2003, 08:39 AM
Isn't that much harder to search in? Do you have some special tool to read it?

In Acrobat Reader you can use ctrl+f (find) to search just like any text file.
asdf.

Adron

Yes, but that search feature is much slower, and the file itself redraws much slower, than the search feature in notepad or any other pure text editor/viewer.

EvilCheese

I've uploaded the asm reference I use most often to my webspace, you can find it here:

http://www.ninjazone.net/asmhelp.zip

It's just basic instruction set reference, but it's very detailed on precisely how each instruction works, and VERY easy to search.

Banana fanna fo fanna


iago

I wish there was some pdf-to-doc converter.. I know that Google.com has one built in, but it's not that great..
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Banana fanna fo fanna

There are several PDF converters available. The one I use is pdf995. It sucks but it works. Basically you print from any app and pick "Print to PDF"

|