There's a great from-scratch tutorial (using Pascal code) written by Jack Crenshawe. I'd take a look at that for some ideas on where to start.
Personally, I wrote a tokenizer first, and then built upon it. The tokenizer breaks up the input string into tokens (which are defined in a global array along with a made up "token number" (easier/faster to use once you've broken up on the strings). The tokenizer adds each token to a linked list, but in an altered order (in other words, order of operations, etc, are taken care of by the tokenizer).
For eg.
y = 4 * (2 + 3)
equates to
2, 3, +, 4, *, = y
On my linked list.
Which the second phaze interprets as:
mov ebx, 2
mov eax, 3
add eax, ebx
mov ebx, 4
mul ebx
mov eax, [y]
(or something to that effect... I haven't had the time to work on it much lately, so I can't remember everything completely).
With this two pass method, I find it a lot easier to optomize code. For example, after tokenizing, you can skim through the linked list, and find code that does nothing (ie, "y, 1, *, = y" or "y = y * 1" can be completely ignored.)
If you're interested, the source code to the current version of my compiler can by found on my web site at
www.neuraldk.org Hopefully soon I'll have a much more advanced version, but this one is fairly functional, and works with basic arithmatic (including brackets and variables), and supports quite a few constructs -> C style for loop, do {} while/until, while/until {}, if)
Jeff