Hacker News new | ask | show | jobs
by mothsonasloth 2537 days ago
As a senior Java / CPP developer, reading what Wozniak had written, it might have been some incantation in a forgotten language.

I really wish I had done more embedded and assembly at school. I can't understand it or appreciate it.

Maybe SW and HW shouldn't mix, bar a few visionaries who bridge both worlds?

5 comments

Why should not they mix ? I now mostly work on high level code (C++, Python, Delphi/FreePascal/Javascript/etc ). But every once in a while fun project comes in. For example I had no problem creating 4 quadrant torque driven 3 phase AC motor controller using AT90USB1286 microcontroller from Atmel. Granted I did not use assembly for programming as plain C was good enough. Or police light flashing pattern controller on PIC32MX795. Fun fun fun ;)
> As a senior Java / CPP developer

This makes me cringe. A "senior" engineer is defined by whatever role a company slots you in. This is compounded by adding programming languages to the mix.

> I really wish I had done more embedded and assembly at school. I can't understand it or appreciate it.

There is no hardware involved here, per-se. What is there is the 6502 instruction set, plus binary floating point calculations. But the fact it is on the 6502 is only interesting because of the constraints.

If you are interested, pick up some tutorials on x86 assembly (or ARM, or whatever you have emulators or real hardware available) and go to town. Actually creating full programs(with syscalls) is a bit involved, but a small ASM function inside C++ (since you mentioned C++) should be perfectly doable (example: https://github.com/diasurgical/devilution/blob/master/Source... – you'll notice the Diablo game was not an embedded system either)

On Linux, a full asm program with syscalls isn't too bad.

Here's one example:

https://jameshfisher.com/2018/03/10/linux-assembly-hello-wor...

A 16-bit realmode DOS Hello World is also very simple, being less than 2 dozen bytes (8 bytes of actual machine instructions, and 15 bytes of message...) and something you can enter into DEBUG and run immediately if you have a 32-bit Windows system; on a 64-bit one, DOSBox or similar emulators will work well too:

    mov ah, 9
    mov dx, 108
    int 21
    ret
    db "Hello world!" 0D 0A "$"
And if you don't have a 32-bit Windows system, you could always just run Windows 95 on your browser

https://win95.ajf.me/win95.html

Why bother with Windows in that case? Just emulate DOS directly.
Not as cool though!
You can have fun writing simple programs too:

https://github.com/skx/math-compiler/

Why should SW and HW not mix?
Well, my day to day job is writing applications that will be managed at runtime by a JVM on a Linux distro which is in turn virualised.

I am so far away from the bits...

Hardware smells of rosin core and ozone. Software smells like someone hasn't showered or changed clothes in two weeks. Not a good mix.
play the zachtronics games if you want a taste of it.
I did assembly on 6502, 6809 family, and 68000 for quite a few years. While I did enjoy Tis-100 and other zachtronics titles, those are actually quite a bit more challenging than real assembly programming. In real assembly you’re pretty much never limited to like 1 or 2 bytes of ram to work with. Zachtronics games are more like puzzle games than a real taste of assembly. For a real taste of assembly, write a little game in real assembly, or maybe calculate Fibonacci numbers in 6809 assembly, or maybe play with Chip-8.
I'd say grab a free emulator for an 8-bit machine, like Fuse http://fuse-emulator.sourceforge.net/ or VICE http://vice-emu.sourceforge.net/ .
> Maybe SW and HW shouldn't mix

All of us who work in embedded software would disagree!