Hein (fub) wrote,
Hein
fub

  • Mood:

Coding the segment driver

I have been writing the code for the segment driver. I think it's the most complex piece of code I have produced for the PIC to date.

In my first year in university, I had to write my own higher-level programming language using gpm, a macro processor. With some 'simple' text substitutions, we were able to write while- and for-next-loops -- the output were 1s and 0s that we ran in a SPARC emulator, which produced some real results.

Coding this particular piece of assembly, I spend a lot of time hand-crafting loops and if-then-else statements. These things are easy to get wrong, resulting in unpredictable behaviour, and I would love to use a higher-level programming language for those parts.
But as it is, I have very little working memory left for variables, and I really like being able to have minute control of what the PIC is doing. And the whole business with pointers is a disaster waiting to happen if you don't have that level of control.

Sure, most programming languages allow you to mix in assembly, but I think I'll keep at it in assembly, rather than debugging the mix of the two.
Tags: electronics project, random led rail
Subscribe

  • Friday Five & GenX

    What toys were popular when you were a kid? This was the height of the 80’s, the time of cartoons on TV pushing toys. They were expensive…

  • Small update

    Wow, I haven’t posted in over a month here. And yet I still don’t feel like I have much to say. Let’s see… – The…

  • Mock Chicken

    The Judge Dredd comics are an interesting artefact of the 1980s: it’s what British comic writers thought how the US urban landscape would…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments