8 ms·
Crash course to Amiga assembly programming
- matthewwiese 9y agoAwesome article OP, thanks for linking it here; I've been looking for something along these lines for the Amiga for a while, actually. Tangentially related: if you haven't already, I'd suggest dabbling in development for these "retro" systems. Not only will they teach you about memory management, &c but you will also be able to familiarize yourself with architecture of decades past. Much like a Shakespearean scholar doesn't just reader William's texts, but also attempts to understand the sociopolitical climate in which they were written; so, too, ought a proficient programmer see where she has come from to integrate not just "best practices" but an optimism which guides her progress. Or one could just read Stack Overflow. shrugs
- nallerooth 9y agoThanks! I'm hoping to find some time for this and learn enough to be able to create something Amiga-ish for our next hackday at work.
- t0mek 9y agoBTW, there's a Stack Overflow for the retro computing: https://retrocomputing.stackexchange.com/ https://retrocomputing.stackexchange.com/
- logiseye 9y agoCheckout this series of video tutorials by Photon of Scoopex :) https://www.youtube.com/watch?v=p83QUZ1-P10&list=PLc3ltHgmiidpK-s0eP5hTKJnjdTHz0_bW https://www.youtube.com/watch?v=p83QUZ1-P10&list=PLc3ltHgmii...
- jl6 9y agoI'm a huge Amiga fan, but what is there to learn from it that couldn't be obtained by working at the lower levels of a modern system?
- Frenchgeek 9y agoWell, unlike modern machines, the system was made to be simple enough to understand while being as powerful as possible. Modern computers, on the other hand, have to either up the complexity by quite a bit and keep the power ( trying to rewrite an old and simplistic DOS based mandelbrot set generator for modern system got me mostly battling my misundertanding of SDL: putting bytes in A000 was way simpler. ) or sacrifice power by going back a generation or two...
- white-flame 9y agoDevices are memory-mapped without going through many nested protocols (USB, PCIe, etc). What drivers do is completely transparent. Library calls are a simple subroutine which jumps into the real details, without a privilege barrier. Much of the accessibility of the architecture is that it's a single address space, with no MMU interference to speak of (later models had MMUs, but where only used for a few enhancements here & there at best). Besides, 680x0 code is much more pleasant to deal with than x86. But that's the case for pretty much any non-x86 ISA. ;-)
- Jaruzel 9y agoGreat Article! The Amiga community is 100% alive and well, with new software and hardware being developed all the time. If you were a fan of the Amiga then now is a great time to jump back in and see the fun stuff that the community is doing.
- tezza 9y agoNice to see articles on how to code from a modern host. Last time I coded Amiga assembly was on an actual Amiga 2000. Blitter, Copper, non maskable interupts, ahh the memories as an aside, the VR community right now in 2017 is in the very early Amiga stage. Theres Atari ST vs Amiga, ( Oculus vs Vive ). Also individual coders can have a widely played and adopted game / experience. The games are fun and not overly complex and there's some great early adopter communities ( /r/Vive )
- pjc50 9y agoUsing the emulator's exogenous debugger is "cheating" ;)
- Flow 9y agoWhat did you use NMI for? I've coded a lot of asm, blitter and coppper on the Amiga but I don't recall ever using NMI's.
- tezza 9y ago1) I think the debugger used it 2) I had an Action Replay that used it 3) It existed 4) I had some off computer hardware I was talking to memory a bit hazy !
- 1ba9115454 9y agoI'm tempted to jump back in. Back in the day programming involved books and a lot of guess work. Now I can google the hell out of any problem.
- deleted 9y ago[deleted]
- josteink 9y agoThe beauty of old school 68k assembly is astounding compared to the unstructured, messy piece of garbage that is X86 assembly. Intel should be ashamed of themselves for 20 years later still not having cleaned up their act.
- fahadkhan 9y agoI can't see them being anything but proud of that legacy! In fairness they tried with IA-64, but the world didn't want it. And perhaps both HP & Intel were half hearted about it.
- beagle3 9y agoIA-64 was not a clean break; it was an enormous bet on compilers getting sufficiently smart by the time the cheap gets out. They didn't. In fact, today's compilers are still not smart enough to make the IA-64 a reasonable architecture.
- pjc50 9y agoIA-64 was a terrible fit for anything other than carefully targeted code for very specific algorithms. Anything data-dependent ended up with poor code density. It was left to AMD to deliver the 64-bit instruction set that people actually wanted.
- WalterBright 9y agoThe x86 kludginess is a result of decades of new features being layered in while maintaining backwards compatibility.
- beagle3 9y agoTrue, but the original 8086 was already ultra kludgy (segment registers etc), even though it was NOT backwards compatible with its predecessor 8080; and every new x86 generation had seen more kludges added. The 68000, which was essentially a contemporary of the 8086 (something like 6 month difference in market availablity IIRC), was clean and orthogonal, and they kept it kludge free at least through the 68040 (which was the last one I used, and which was contemporary with the super-ultra-kludgy 486). I don't disagree with your statement, but I think it gives the impression that Intel did a reasonable job at any given time subject to compatibility constraints, and in my opinion that is not so.
- logiseye 9y agoIf you think that article is awesome, you should fasten your seatbelts and check out this video tutorials by Photon of Scoopex (Demo Group). https://www.youtube.com/watch?v=p83QUZ1-P10&list=PLc3ltHgmiidpK-s0eP5hTKJnjdTHz0_bW https://www.youtube.com/watch?v=p83QUZ1-P10&list=PLc3ltHgmii...
- nallerooth 9y agoThat looks awesome - thanks!
- sdnguyen90 9y agoA bit off topic: I'm looking to get an Amiga mainly to run Octamed and get that Paula chip sound. Can someone suggest a model to buy?
- Jaruzel 9y agoJoin the CommodoreAmiga group on Facebook and ask there. We're a great bunch of guys (and gals). Edit: Realised that Facebook search is rubbish, this is the actual group URL: https://www.facebook.com/groups/CommodoreAmiga/ https://www.facebook.com/groups/CommodoreAmiga/
- wordupmaking 9y agoAlso: http://eab.abime.net/ http://eab.abime.net/
- renaudg 9y agoPaula is exactly the same across the whole Amiga range AFAIK, so no difference when it comes to sound. Not sure how much resources Octamed requires though. An A1200 with CF hard disk + ACA board seems like a safe bet
- vardump 9y agoThere are differences in audio low pass filters between different Amiga models. It can't be ever entirely disabled. I think Amiga 1200 filter affects the sound the least. IIRC, AGA chipset (Amiga 1200, 4000) is also capable of up to ~56 kHz sample rate. OCS/ECS is just up to 28 kHz.
- draven 9y agoIIRC (that was a long time ago) I could use only 8 tracks on my A600 because I only had a meg of memory. A friend had extended his A600 memory to 2MB and I think he could get 6 tracks.
- mrspeaker 9y agoArrrgh! Great article (and there goes my weekend) - but this article reaches my eyes 25 years too late. I would have killed for this information as a kid!
- baldfat 9y agoI actually got started coding Assembly on the C64. I found the C64 was much easier to code to. I keep telling my kids, "If I had youtube tutorials when I was a kid I would be ruling the world."
- tombert 9y agoIt seems like every month or so on HN there's a new Amiga post, and this has resulted in me becoming slightly obsessed with the machine (even though I never had one as a kid since they weren't terribly popular in the US). Learning the assembly sounds like it could be a fun weekend project, so thank you!
- cr0sh 9y agoThis was an interesting read, though I've never really delved into 68k assembler, even when I was playing with the Amiga. In the early 1990s I purchased an Amiga 2000, then a couple of years later an Amiga 1200. A few years after that, Commodore "died" and I moved to a 486 and Windows (though I had used a DOS-base laptop prior to that). A few years later I move to Linux. I still have my Amigas, and my 1080S - but I have no idea if any of it still works; they haven't been booted in over 20 years (though I have kept them stored well). I've thought about getting them running again; maybe someday (I've got more actual retro hardware than I have time and space for, honestly).
- mreid 9y agoI saw this at the end of the article, was hit by a huge wage of nostalgia, and had to comment: > Update 9.10.2015: exec.library base address is stored in > memory address $4. The library base address itself is not $4. I learnt 68k assembler for the Amiga in high-school and made _exactly_ this mistake. After many "guru mediations" (the flashing red and black box) and much head-scratching I finally realized the problem. It was a big breakthrough in my early days as a programmer and taught me a solid lesson about indirection and pointers.