Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I work for an analog company on a proprietary sequencer having a few bytes of free RAM (maybe 20 bytes, not kB, bytes); maybe 500 bytes statically allocated; 8 registers including PC; no indirection (in C, a "pointer"); no stack. We write 100% of our application code in assembly, and 95% of our business depends on legacy code, meaning any new code must neatly fit into the existing assembly code. I write assembly code and verify/debug code written (and not tested) by my superiors.

The sequencer would have been considered primitive in the 70's. There is no MOV instruction: to move M into K, you must write CLX A; ORX M; STX K which much complicates dependency resolution, or at least optimization. Many operations work only on specific registers: for example, a 32-bit right shift uses K in the upper word and M in the lower word.

This sequencer is used for extremely low-power applications, and has a ROM program. The chip sells for under $0.50 in unfathomably large quantities.

I hope I need not justify a higher level language to you; however, my management is not convinced it will be "worth the effort" of developing it, or porting an existing compiler. I feel confident I could write a little Lisp evaluator to produce machine code, but what would that get me?

I feel like what I'm doing is an immense waste of time, money, not to mention my own professional development. Is there some authoritative resource I can show my boss and his boss to make them understand? All of this seems like common sense to me (having studied software, my superiors having studied analog, and not being able to write a single line of C), and it's very hard to convey the idea that "if you put a round block into a square hole, it will not fit" to somebody who doesn't know what a block, hole, round, or square is.

share|improve this question

closed as not constructive by GrandmasterB, Ozz, Walter, Martijn Pieters, Kilian Foth Mar 19 '13 at 10:31

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

If I were in your position, I would be concerned with the fact I'm developing a niche skill. Unless there's exceptional job security in what you're doing, I would try to broaden my skills. This doesn't necessarily mean starting a new job, but could be anything from contributing to an open source effort to taking classes or getting certified in something. –  ipaul Mar 19 '13 at 1:18
Is there a pin-compatible chip that has more RAM / ROM ? Check out its cost. If you can cram more functionality into a chip with more memory by using a better development methodology that might spark your bosses' interest. –  Peter K. Mar 19 '13 at 1:21
Unfortunately no, this chip is designed in house. –  Cuadue Mar 19 '13 at 1:30
if you can, just play around with making your own language using lisp, sometimes its better just coming up with something then going "hey look, see what I've created..." –  Keith Nicholas Mar 19 '13 at 3:24
What exactly is the question here? –  GrandmasterB Mar 19 '13 at 6:38

2 Answers 2

In the old days, when people understood that there were other things besides PeeCees running Microsoft Windows, this kind of experience, IN MODERATION, was considered extremely valuable.

Today, the vast majority of recruiters and first-line HR drones only know how to read a list of buzzwords and throw out any resume that does not contain every buzzword on the list, and experience like this is, well, let's call it "undervalued".

If you can find a PIC that can, with a tiny PC board to rearrange the pins, plug into the same socket, draw the same OR LESS power, provide a LOT more RAM, ROM, and functionality INCLUDING TIMING, while imposing relatively minor software rework requirements, you might be able to sell that. The odds are NOT in your favor.

I'd suggest updating your resume and looking around.

share|improve this answer

The only way you might be able to convince your bosses is by actually writing a compiler that produces better code than the hand-crafted assembly you currently have. Then you can show your bosses that with a compiler, you can have both better readable input and more functionality crammed into that chip.

On the other hand, I am doubtful that such a compiler can actually be written.
Firstly, the device has such limited capabilities that the compiler would only be able to support a severely crippled dialect of C (no pointers, no functions, no floating point). This makes that it could not even be close to a conforming free-standing implementation.
Secondly, as the chip is produced in-house, the people writing the assembly code today are the same people that will have to program the compiler's back-end. This means that the compiler-generated assembly is unlikely to be better than the hand-crafted assembly, because it is ultimately written by the same people.
Thirdly, because there is so little room to play with on the device, any competent developer will double-check that the compiler output is actually optimal. If not, they will try to optimise their source, or resort to the use of assembly. This just about nullifies the advantages of a high-level language, because hand-optimised C code it typically no more readable than assembly code and every developer has to understand both languages anyway.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.