SELECT * FROM posts WHERE tid = 'PA PROGRAMMING THREAD'

Posts

So far my default text editor is doing a decent job, but something that would help me keep track of how big variables are, make jump statements a bit clearer, and remind me when to use [varName] as opposed to varName would be appreciated.

At the moment I can write a few hundred lines of x86 in half an hour and logically it all works, but then it takes me three hours to go through it and fix all the little mistakes I've made.

Tell them you'd rather get it done in days instead of months and use a compiler. There's no good reason to ever write an entire program in assembly anymore

It's a uni course, not so much about programming in assembly as learning how processors work. And I really enjoy learning how processors work, and how an instruction of mov eax, [varName] is turned into binary and how the processor interprets that binary. It's just that after learning how it all works I don't want to spend additional hours fixing a dozen trivial mistakes that are throwing segfaults everywhere.

Ah, for school. Well that's different then. You will be making a ton of mistakes.

Decide on a calling convention, stick to it
Put comments in the code, stating what is in each register, what registers are free and what the stack looks like
Create macros that can test invariants, for example on function entry have a FUNC_ENTER macro that sets up the stack for the function and (for debugging) saves critical values. FUNC_EXIT reverses that and checks that esp is what it should be for example

Ah, for school. Well that's different then. You will be making a ton of mistakes.

Decide on a calling convention, stick to it
Put comments in the code, stating what is in each register, what registers are free and what the stack looks like
Create macros that can test invariants, for example on function entry have a FUNC_ENTER macro that sets up the stack for the function and (for debugging) saves critical values. FUNC_EXIT reverses that and checks that esp is what it should be for example

I've been reading the preview edition of Charles Petzold's sixth edition of Programming Windows (preview is $10 until the end of the month and gets you the final book). It's basically WinRT/Metro/C# stuff. So far if you've read his WPF book everything is going to feel really familiar.

Windows 8 is a little wonky, but it is growing on me. I like how focused it is on asynchronous programming.

It's more like the *.0 versions are poorly received. 5.0 (Windows 2000) and 6.0 (Vista). XP is 5.1, 7 is 6.1 and 8 is 6.2, so it'll probably be fine. Also Vista was actually good* (streets ahead of XP at least). I still use it on my desktop and I don't have a strong preference between it and 7. My work laptop is still XP and it makes me want to punch myself in the dick.

*I got it like a year after release, so I may have missed any dark times.

7 performs better on a whole, you'd get more torque out of your system.

I used windows 2000 until Windows7 came out, fuck yeah. Pretty much because I had a copy of the enterprise edition I could install on any pc from school they charged me $20 for. ITT probably did that illegally though.

not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me

It's more like the *.0 versions are poorly received. 5.0 (Windows 2000) and 6.0 (Vista). XP is 5.1, 7 is 6.1 and 8 is 6.2, so it'll probably be fine. Also Vista was actually good* (streets ahead of XP at least). I still use it on my desktop and I don't have a strong preference between it and 7. My work laptop is still XP and it makes me want to punch myself in the dick.

*I got it like a year after release, so I may have missed any dark times.

Windows ME was great unless you needed printing. I didn't, ME performed like 98 on my "parent's" PC.

I was doing desktop support type work for Best Buy back in the Win98/WinME days (pre-Geek Squad by several years) and ran WinME myself on multiple computers. My experience was that if you did a fresh install of WinME it worked as well as you could ever expect Windows to work. If you upgraded from 98 to ME it was the huge, barely working mess that so many people complain about it being, because most people upgraded and even lots of new, in store bought PCs actually had a 98->ME upgrade rather than fresh ME install.

Ah, well I'm talking about Windows debugging; I don't think I've seen a non-laptop PC without a COM port. USB requires a special cable and BIOS support and firewire just doesn't seem to work. Of course, that's just on the target machine, the debugger can use a USB serial adapter if it wants

You'd be surprised how many people didn't know that. I converted a hex number to decimal, then modified it, then back to hex infront of a co-worker using the Windows Calculator and you'd figured I just turned lead into gold. They were like, "HOW DID YOU DO THAT!!!!!!!!!!!"

Welp... I was down to around 25 known bugs as of last week. Then they let someone else test it... Now we're at 63.

That's why just having the developer test the code is terrible. It used to happen all the time at my old job. I always tried to explain to them that I'm the developer, I'm biased and so at a disadvantage when testing. If I didn't already think it was correct I wouldn't have written it that way and I wouldn't be testing it yet. There are also things that you just don't even think to try because how it works is so engrained in your mind that you just know not to do X and it never crosses your mind that someone else might.