First off, I really want to learn win32asm. I read some faqs about it and almost always it says that I need to learn programming asm in DOS. My question is, can I start learning it without knowledge in asm in DOS? Can I go right away learning win32asm? What do I really need to get started (besides the tools needed)? Thanks in advance. :twisted:
Posted on 2005-01-26 20:50:54 by modchip
I did.
Posted on 2005-01-26 21:09:58 by Sparafusile
Its a loaded question that shows a lack of understanding of where the burden lies but to address the problem of a learner, writing assembler code in 32 bit windows is an advanced topic that assumes you already understand the architecture of windows and the use of the API functions and at last have a grasp of how assembler works.

The question does not indicate what the expertise of the asker is so there is little chance of getting a sensible answer. Basics are to know how to use a compiler in Windows and to understand how to write successful software with that compiler.

On rare occasions it has been known for learners to start with assembler and succeed but in most instances they fail badly because they don't know enough to start.

Unless you know enough to write Windows code with a compiler, the best advice is to get and learn a decent compiler and when you are ready, you can come back to assembler.
Posted on 2005-01-27 04:53:48 by hutch--
i apologize, i was to hasty and accidentaly voted no (actually i dont know what i selected) :oops:

but i vote yes, of course , i started from win32 like many other
Posted on 2005-01-27 07:55:47 by drizz
well....
i guess anyone can learn win32asm whithout DOS asm...i was learning DOS asm but i didnt got deep into it...
BUT !
DOS asm is a bit more complex than win32asm, when you learn DOS asm you can get more efficient on some register operation and stuff....
DOS asm doesnt have invoke stuff, its only INT this INT that and shit
i really didnt like that at all, too booring :lol: i wanted to see some windows and stuff

in the end my conclusion is that DOS asm is complex and a bit harder to lear than win32asm with yours winAPI call that are easy to understand

well... after all i guess :P
Posted on 2005-01-27 13:48:47 by GR33d
thanks guys. ill try to catch up.
Posted on 2005-01-28 01:08:50 by modchip
i still dont know what int represents which function :)
but i can code
mov esi,addr mystring
mov edi,addr yourstring
mov ecx, strlen(addr mystring)
rep movsb

so i would vote for an empahtic yes :)
btw is above code w32 asm ?? :)
Posted on 2005-01-28 04:17:50 by bluffer
in the end my conclusion is that DOS asm is complex and a bit harder to lear than win32asm with yours winAPI call that are easy to understand


...especially dealing with the 16-bit segmented architecture is messy.
Posted on 2005-01-28 05:23:12 by Vortex

btw is above code w32 asm ?? :)

That is 32 asm adding an api call would make it win32asm, then again since thats masm syntax and masm only creates 32 bit code for the win32 platform then I guese it is.
Posted on 2005-01-29 00:21:21 by QuantumMatrix1024
Hi QuantumMatrix1024

You can easily put both 8, 16-bit code into
a 32-bit windows application/platform :)
Posted on 2005-01-29 02:01:19 by The SharK
Shark,

you mean this code can work in 32 bit


004011A9 . B4 09 MOV AH, 9
004011AB . 66:BA B511 MOV DX, 11B5
004011AF . CD 21 INT 21
004011B1 . C3 RETN
004011B2 90 NOP
004011B3 00 DB 00
004011B4 00 DB 00
004011B5 . 68 69 20 77 6F 72 6C 64 24 00 ASCII "hi world$",0


i dunno it erred with access violation reading some :) in ollydbg

but it runs perfect in command.com



C:\>debug
-a
0ADA:0100 mov ah,09
0ADA:0102 mov dx,109
0ADA:0105 int 21
0ADA:0107 retn
0ADA:0108
-e 109 "hello world $"
-g
hello world
Program terminated normally
Posted on 2005-01-29 05:59:20 by bluffer
Hi bluffer


NO, you can't use DOS code using INT21h,
in win32 applications.

What I mean is, that before you call or invoke
a function like: MessageBox

You can do some calculations or other stuff,
like your code:

mov ah,09h

mov dx,11B5h
---------------
---------------


and then pass this to a function like a MessageBox.

In DOS when you use
mov ah,09

int21h

you write a string to the screen, you can't
do the same in windows applications using
int21h.
When you have to make some output AFTER,
your calculations and other programming stuff,
you pass some values to windows API's.

That's the world of win32asm :)


regards,


The SharK
Posted on 2005-01-30 04:09:48 by The SharK
but it runs perfect in command.com

Yes, DOS code will run under a DOS emulation environment. It just needs to be in a DOS executable, to be recognized as DOS code. If you create a Win32 executable (PE format), then DOS code within it will fail.
Posted on 2005-01-30 17:52:31 by tenkey
i dont know dick 'bout dos..... :oops:

but i code full w32 apps so it's definately poss!
Posted on 2005-02-02 15:48:26 by zincboy
The difficulty is (as hutch mentioned) you'll end up having to learn both asm and the win32 api at the same time. And learning two different things is of course very difficult cause both will have to work at the same time. When something goes wrong (and it will) you probably won't know if its and asm fault or incorrect win32 code, worse it could be both.

That said it is how I learned win32asm, but I read and read and read all about asm instructions (from Art of Assembly old 16bit dos guide) before ever starting to code. And then I had to go very slowly through Iczelions tutorials which though me enough win32 bits to be able and stand on my own feet. It was a slow, but very rewarding process :) .

If you can code in something like C then I suggest you learn win32 apis in that first, when you have enough grounding to make a simple enough app which read in text and numbers and display purely through win32 api then you can try and repeat that in assembly.

Such an app would require very little code on your part, it's really just about clicking together apis properly and so the translation to assembly would be "reasonably" straight forward.
Posted on 2005-02-02 16:25:13 by Eóin
Are Iczlions tutes sufficient enough tp get me started? thanks.
Posted on 2005-02-07 04:14:29 by modchip
There is no substitute for testing the idea out, try using his tutorials and see if you understand them, that will tell you quickly enough if they are any use to you or not.
Posted on 2005-02-07 05:01:58 by hutch--
thank you very much hutch-- :lol:
Posted on 2005-02-09 02:13:50 by modchip
Yes you can learn 32-bit Windows without 16-bit DOS, lol some recommend that you dont ever think about treading through that path. I learned it, it has helped but a lot of the knowledge I gained I could have done ith just 32-bit stuff.
Posted on 2005-02-09 16:01:55 by x86asm