@phooky everyone keeps sending me this, I'm not super clear why, I haven't played it yet, is it because it's the only contact people with assembly or?
@neauoire probably because it (and exapunks and shenzhen I/O) also feature very stripped-down ISAs that can be learned quickly. The neat thing about these games is that the processors are embedded in really interesting parallel architectures. It's speculative fiction for hardware design! Also, the puzzles are basically tsumego for assembly nerds.
@neauoire (if you want to mess around with the architecture without the overhead of the game, I think there are a few TIS-100 emulators up on github.)
@neauoire
++++++++[>++++++++<-] >
<++[>+++++++<-]>.N+.O+.P-----------.E
@neauoire How do you learn it though?
I found just some resouces that look OK, but not impressed.
https://nostarch.com/assembly2.htm
https://www.udemy.com/course/programming-games-for-the-atari-2600/
Also which assembler to start with? Some old simpler one? WebAssembly? And then how to run it?
@borko i do not personally subscribe to this theory, but some people believe that you need the right kind of mind to learn assembly and some people are just not capable of that level of abstract thought.
i always thought it was pretty straightforwardly similar enough to BASIC - the hardest thing about assembly is implementing stuff that you take for granted in higher level languages: like needing to implement multiplication using only bit shifts and adds
@zens Haha, that's BS, made up by people who want to feel special for their skills.
@babelcarp @zens @borko I agree, assembly programming is mostly about attention to detail and remembering some sometimes rather long idioms. I was able to program 6502 assembly before I could wrap my head around pointers, for example.
@babelcarp Things like char** only made sense to me when I worked through the produced assembly. Which meant after I learned 8086, because it's not like I had a C compiler for the C64. Using indexed addressing to load an index for the next indexed address was something I was comfortable with though...
@zens @borko
@babelcarp
I got my hands on a 286 before an Amiga, but I was absolutely a fan of the 68k when I learned it. It was a lot easier to get a cheap PC than any of the 68k machines though. My Amiga came with a broken power supply and an abused video out connector. All easy enough to fix fortunately.
@zens @borko
@tfb @babelcarp @borko a thought experiment i keep coming back to is hacking a genesis/megadrive to be an amiga or mac- and pondering how feasible it would be.
@borko learn 6502, try making a little NES/C64 game :)
@neauoire Sounds like a plan, so where do I start:
So far I found two books:
https://skilldrick.github.io/easy6502/#snake
https://www.atariarchives.org/mlb/
I read that I can use dasm for debugging?
Looks like I also need an emulator and some documentation for platform-based stuff, right?
Get the asm6 assembler.
https://git.sr.ht/~rabbits/famicom_cookbook/tree/master/item/tools/asm6.c
This will assemble a .asm file into a .rom that works on the NES.
Here's my notes on 6502 writing
https://wiki.xxiivv.com/site/assembly.html
Here are examples to do "most things" on a NES
https://git.sr.ht/~rabbits/famicom_cookbook/tree/master/item/examples
fceux is my favourite NES emulator :)
@neauoire Haha, thanks, but those resources look a little above my level. But maybe it will become clear when I go through a few tutorials, thanks.
@borko you must at least complete the skilldrick tutorials first yeah :) Otherwise it'll all look very strange. But let me know once you've completed it and if you have any questions then!
@neauoire OK, so I guess I was on the right track with those ;)
@borko yup! it's the first thing I did when I got started.
@neauoire Looking at the cookbook repo now. A lot of unknowns.
The examples/*/build.sh files seem obsolete, btw.
@borko
Assembly is only impressive because it is direct manipulation of the CPU itself. No nasty middleman, a.k.a programming language.
Get yourself a development board of an Arduino or ESP32, and feel the joy when a LED blinks due to your newfound Assembler Magic Powers.
It is soooo easy nowadays.
Borko don't listen to those advices: the best way to learn ASM is integrating small operation it into C programs, to optimize functions.
Example:
https://www.codeproject.com/Articles/15971/Using-Inline-Assembly-in-C-C
This way you have a practical use for what you're learning, and get some satisfaction over a project that is working on your computer, and not inside a Z80 emulator.
Also, always start from 8086 so you can make programs to actually run on your computer and you can give it a purpose, and avoid previous Z80 and 6502 since you they are "useless" unless you physically buy the actual chip and build something like a robot or a microcomputer like "Ben Eater" on YouTube.
(Unless of course you want to go that direction, i.e.: making a NES game)
Anyway give a look his breadboard computer is awesome:
https://youtube.com/c/BenEater
@cel I never articulated to myself why I liked it so much, but after a year on the fedi, I decided to pin it, it both somehow spoke loudly about what lead me in this place, and also has a sort of self-derision quality to it that I find necessary when talking about technology. I'm glad it resonated with you :)
@neauoire I know it's not your job to educate me *but* do you have any good resources to learn asm? I've tried and failed many times 😩
@childishgiant I'd be happy to help, assembly for which platform?
@neauoire Well I've been trying x86. I did a very basic equivalent to assembly when learning computing which only had 11 instructions. Maybe I should just write some stuff for uxn 😅
@childishgiant Well, uxn is very much for working with forth-machines, if that's something that interests you, dive into the tutorial.
For more, standard and less esoteric asm languages, I'd recommend looking at 6502 or z80, try making a little NES game. The 6502 assembly language is great, I have a LOT of documentations and examples if you're interested.
https://git.sr.ht/~rabbits/famicom_cookbook/tree/master/item/examples
@neauoire I was wondering what cool new toolset was calling itself “Assembly” but then I realised who you are
@Viveka Powered by Assembly.js
@neauoire all projects eventually converge towards TIS-100
https://alandesmet.github.io/TIS-100-Hackers-Guide/assembly.html