Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Last year I tried C on a real Amiga 1200 (using DICE, Matt Dillon’s compiler / runtime). I didn’t get very far, lack of memory protection makes things really hard.

This year the Amiga has an 060 upgrade with an MMU, so perhaps I can figure out how to use that and have another go.



Forgive the dumb question... it's been ages since I've done Amiga programming in C. What behaves differently? Is the lower K of memory mapped, such that null pointer deferences cause excitement rather than simply crashing your program? Or is it something else?


AmigaOS has no memory protection whatsoever. If your program crashes, so does the entire machine. And it will possibly bring your hard drive with it, too.

Not unworkable, but not the most relaxed environment for fast’n’fun cowboy coding. You typically have to reboot a lot.


I thought the Amiga 1k had page protection, just not virtual memory?


No MMU.

A1000 has... something. The WORM (write once read many), RAM used for the kickstart, which is latched as read-only after the kickstart has been loaded from floppy by the bootstrap ROM.


No, there's no MMU.


Well, apparently if your CPU has one (030+) you can use something like Enforcer (http://www.sinz.org/Michael.Sinz/Enforcer/). I’ve yet to try it.


I don't get it either, particularly as most advent challenges can be solved using just iso c and its standard library.


> I didn’t get very far, lack of memory protection makes things really hard

What was the issue with lack of memory protection? If you're used to programming in C is there actually that much difference to running on a modern PC or embedded system?


Heh. Yeah, a memfault tanking the machine is not conducive to iterative programming :o)


Just stop writing memfault.

I say it in jest but that's actually how I used to program a few years ago when I was working on large industrial pieces of software with long compilation time. You just have to be careful and check what you wrote before sending it to the machine.

I think "iterative" programming has made people really complacent when it comes to silly errors. Slowing down can often do wonder.


I feel like if you're writing C then writing with memory safety in mind should probably be autonomous anyway



Honestly, I forgot all about that aspect of ancient programming. It probably made one more careful, or more patient. (Source: typing 6502 programs into a hex "monitor" which is a way to edit memory, view memory, and issue "jump to this memory address".)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: