TheAbysmal: Iczelion's tutorials weren't meant to teach you how to do assembly programming, just like Charles Petzold's "programming windows" book doesn't attempt to teach you C; the material is about programming Windows using the Win32 API in ASM and C, respectively. A lot of people seem to miss this point :)
Posted on 2007-08-27 05:01:47 by f0dder

TheAbysmal: Iczelion's tutorials weren't meant to teach you how to do assembly programming, just like Charles Petzold's "programming windows" book doesn't attempt to teach you C; the material is about programming Windows using the Win32 API in ASM and C, respectively. A lot of people seem to miss this point :)


I'm new to the forum and find this and some of the other replys confusing.First let me explain where I'm at as far as my knowledge of assembly i understand about memory and the cpu  what i don't get is when you guys say that tuts like Iczelion's will not teach you how to program with assembly.I thought you had to abide by windows rules in order to create programs in windows.

Here are my questions i know how the cpu works and memory how do i program with out windows dictating me.

Do i still use the  Flat memory model like in icz tut if i want to do straight assembly.

I hope i can get some answers cause I'm ready to program with asm i just need to know where to start

Also i have assembly step by step is this still relevant today even tho segmented memory is no more
Posted on 2007-12-15 00:16:11 by shadyike

I'm new to the forum and find this and some of the other replys confusing.First let me explain where I'm at as far as my knowledge of assembly i understand about memory and the cpu  what i don't get is when you guys say that tuts like Iczelion's will not teach you how to program with assembly.I thought you had to abide by windows rules in order to create programs in windows.


The CPU architecture and instruction set is not the same as an operating systems' API. The CPU architecture dictates physical programming constraints. The OS API only provides abstracted functionality.


Here are my questions i know how the cpu works and memory how do i program with out windows dictating me.


You don't. You work within the OS API specifications or you come up with your own set of shared libraries and API interface/standard, in which is highly unrecommended.


Do i still use the  Flat memory model like in icz tut if i want to do straight assembly.


The Flat memory model has been standard and utilizedfor quite some time. On a modern day desktop OS, you are most likely working with a 32-bit processor yielding a 4GB memory space split up into 2GB for the kernel and 2GB for the process.


I hope i can get some answers cause I'm ready to program with asm i just need to know where to start


Depends on what you are trying to program: applications, drivers, operating systems, games, etc...


Also i have assembly step by step is this still relevant today even tho segmented memory is no more


In all honesty, unless you are getting in to 16-bit or OS development on the x86, ignore segmentation except where absolutely needed. It is an unfortunate carry-over of past technological limitations.
Posted on 2007-12-15 01:01:23 by SpooK
Think big... but start small.
Make a Hello World! application.
Now grow it.
Now apply that philosophy to everything you write.

The more you do this, the more you learn to design your code correctly in the first place, rather than waste valuable time searching for fundamental design flaws.

You failed to mention if you have a background in any existing language, not that it matters, I was merely curious.
Posted on 2007-12-15 02:22:52 by Homer
SpooK

Thanks for the reply these where the answers i was hoping for :)




The Flat memory model has been standard and utilizedfor quite some time. On a modern day desktop OS, you are most likely working with a 32-bit processor yielding a 4GB memory space split up into 2GB for the kernel and 2GB for the process.



Yea I'm using a Pentium 4




Depends on what you are trying to program: applications, drivers, operating systems, games, etc...




All I'm want to do right now is just make programs that move data to and from registers and play with the memory.Just something simple to get the hang of assembly.


In all honesty, unless you are getting in to 16-bit or OS development on the x86, ignore segmentation except where absolutely needed. It is an unfortunate carry-over of past technological limitations.


I have used his book to help understand how computers work ignoring the segmentation parts of the book.






You failed to mention if you have a background in any existing language, not that it matters, I was merely curious.


I have done apps in vb nothing special


Thanks you guys this has already helped me thanks for helping me out
Posted on 2007-12-15 10:29:06 by shadyike
 
I have been using olly debugger to see how the cpu and every thing interacts but i have come across something i don't understand why if your moving(copying) a memory address into a register do you need the dword ptr and ds infront of it

MOV EAX,DWORD PTR DS:

I know this is very basic but nothing I've read has this type of stuff in it.

Posted on 2007-12-16 02:32:25 by shadyike
DS = Data Segment Register.

It means that the address is someplace inside a data segment, which is indicated by the DS register, which was set up when the process was created.

Theres also CS, ES, FS, GS.
These are called Segment Selectors.
We dont have to think about them much unless we get hacky.
Although I will say now that FS can be quite useful for windows coders, as it has special meaning in that operating system.
Posted on 2007-12-16 03:14:16 by Homer
Got another question for you guys the last post got me thinking about

When looking inside a debugger is the memory segmented or do you think of it just as memory with out segmentation.

The reason i ask is using a debugger is important esp for noob like me who will probably be spending a lot of time looking at it. :sad:
Posted on 2007-12-16 13:09:20 by shadyike

Got another question for you guys the last post got me thinking about

When looking inside a debugger is the memory segmented or do you think of it just as memory with out segmentation.

The reason i ask is using a debugger is important esp for noob like me who will probably be spending a lot of time looking at it. :sad:


Well i found the answer to my question here

http://www.dirac.org/linux/gdb/02a-Memory_Layout_And_The_Stack.php
Posted on 2007-12-16 20:35:14 by shadyike