Assembly code compiler horror story

Click For Summary

Discussion Overview

The discussion revolves around the challenges and frustrations encountered while coding in assembly language, particularly in the context of compiling code for a microcontroller to control a fan. Participants share personal experiences related to debugging, data loss, and the emotional toll of programming mishaps.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant describes a frustrating experience with a compiler that fails to recognize structured assembly language, leading to complications in organizing files and compiling code.
  • Another participant empathizes with the original poster, suggesting that such programming challenges are common and part of the experience of coding.
  • A later reply mentions the difficulty of debugging assembly code and the emotional impact of data loss, while also highlighting a sense of accomplishment after successfully recoding and debugging under time pressure.
  • Humor is introduced regarding the use of "computer language" to describe the frustrations experienced during programming, indicating a light-hearted take on the situation.

Areas of Agreement / Disagreement

Participants generally express agreement on the challenges of programming in assembly language and the commonality of experiencing setbacks. However, there is no consensus on specific solutions or methods to avoid such issues in the future.

Contextual Notes

Limitations include the reliance on specific compiler behavior and the subjective nature of programming experiences, which may vary widely among individuals.

Who May Find This Useful

Individuals interested in programming, particularly in assembly language, as well as those who have experienced similar frustrations in coding and debugging processes.

enigma
Staff Emeritus
Science Advisor
Gold Member
Messages
1,739
Reaction score
20
So, I'm writing assembly language code to drive a fan by varying the pulsewidth.

Halfway through (6 hours or so ago) I try to compile it.

The compiler software is a piece of crap (code uses a structured assembly language, so it doesn't recognise anything), and I need to bring everything into one directory (in a different spot where I originally had it), and run a separate file to compile it.

No problems.

Keep coding.

and coding.

and coding.

Finally finish, and compile. Upload it to my microcontroller. Flip the switch. Fan no go, and I have a typo in the LCD display.

Look at the code, find the problems. Transposed the ASCII character, and sent power to the wrong bit, so it wasn't powering the fan.

Fix it, recompile, resend, run. Hrmm... still using the old code (the typo isn't fixed)

Go back into the first compiler (I was going to remove the structured assembly parts), run compile, go to the first problem, fix it.

Save as...



The mvdrfvkn workspace still had the old file as the active one.

So, I basically just wiped out 6 hours worth of work.



*sigh* Back to work.
 
Last edited:
Computer science news on Phys.org
Sob.

I need a hug.
 
I feel your pain, enigma.

*solemn bowing of head, moment of silence*

Doubly so since you're coding in assembly... ugh.

I think every programmer has at least one of these episodes. It's a mandatory part of the overall torture package.

I at least find that it's easier to rewrite everything the second time over, since you've already worked through it all once before... Look on the bright side-- you've reset your karmic counter of programming disasters, so you should be relatively impervious to devestating losses of data in the near future. :smile:

In the meantime, take a break, catch your breath and think happy thoughts.
 
Well, I'm up to 30 hours with no sleep, but I got it re-coded, debugged, and in an hour before the deadline.

Yay me.

Now, someone help me get these pink elephants out of the lab...
 
Whenever I screw up with a computer my wife has a term for the words that she hears coming from the room: "computer language."

I'm sure I would have plenty of cause to use computer language if I had to program in assembly language. :smile:

Good work tracking down your bug.
 

Similar threads

Replies
6
Views
4K
  • · Replies 6 ·
Replies
6
Views
6K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
10K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
2
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K