Z80 Assembly Language for the ZX Spectrum Tutorial, Episode 1: The Basics

  Рет қаралды 57,941

The Retro Desk

The Retro Desk

Күн бұрын

This is the first episode of a new series that will teach you how to program using Z80 assembly language, specifically for the Sinclair ZX Spectrum. In this episode, we go over the very basic concepts of assembly language and machine language and show how to use a development toolchain for writing, building and testing ZX Spectrum software.
All code and materials for this series are available on GitHub: github.com/SlithyMatt/zxs-ass...
Join our Patreon community: / slithymatt

Пікірлер: 156
@ulysses_grant
@ulysses_grant 2 күн бұрын
This playlist comes to the rescue. It's like seeing an old book of photographs of a dearest friend in a moment like this. Farewell, Z80.
@Dunbar0740
@Dunbar0740 3 жыл бұрын
Wish I'd seen this vid in 1983. Better late than never.
@oneheckofabanana2016
@oneheckofabanana2016 2 жыл бұрын
This video did not exist back then. However, I am the best. So there is no need to worry. All in due time, my friend. Learn patience, and your key to success will lie within.
@BinaryReader
@BinaryReader 3 жыл бұрын
This is a hugely valuable resource! Modern processors are far too sophisticated to trivially jump into for beginners, so something like the Zilog Z80 is just the right balance of sophistication and approachability. Having a full series on this processor is something Im exceptionally keen on as i am looking to write my own Z80 emulator. Thank you so much!
@radiognome1971
@radiognome1971 3 жыл бұрын
Oh, what a joy. Thanks for reviving these childhood memories of my school holidays in the '80-s, converting mnemonics to op-code with pencil and paper.
@michaelclift6849
@michaelclift6849 3 жыл бұрын
Exactly this! Not on a ZX, I had a single board computer called a TEC1 by an Australian company called Talking Electronics. I went mad with it, making expansions, and hand assembling code to punch in opcodes on a 4x4 keypad.
@slithymatt
@slithymatt 3 жыл бұрын
@@michaelclift6849 that is hard core! Wish I had a hex keypad today.
@dalixman2754
@dalixman2754 Жыл бұрын
Exactly what I had to do until I saved enough to buy an Assembler :)
@cnc-maker
@cnc-maker 3 жыл бұрын
There are 2 things that made the Z80 the 8080 killer. The fact that it only needed +5v instead of +5v, +12V, and -5V was absolutely huge, as well as the fact that it only needed a simple oscillator for the clock as well. The 8080 required a weird 2 phase clock that was beyond bizarre.
@klave8511
@klave8511 3 жыл бұрын
The 8085 sorted all that out in 1976.
@cnc-maker
@cnc-maker 3 жыл бұрын
@@klave8511 that isn't quite accurate. While it did allow a single +5v power supply to be used, and a single phase oscillator to be used as well, it's touting of being 100% binary compatible was false. There were originally undocumented changes to flags that complicated code to support both processors. Plus, it had none of the additional functionality of the Z80, which eclipsed all use of the 8080 and 8085 combined. I will say that the 8032 line of microcontrollers was nice, but that was a completely different market, which the 8085 sort of entered.
@TheSulross
@TheSulross 2 жыл бұрын
I have a vintage computer that uses the Intel 8085 - the Tandy TRS-80 Model 200. It's really a powerhouse of a portable computer with productivity programs that can be quickly sommoned from ROM - like the Multiplan spreadsheet. Probably safe to say that this line of portables from Tandy (Model 100 and follow-ons) were the most successful 8085 computers
@TSteffi
@TSteffi 9 ай бұрын
Also the LDIR/OTIR type opcodes make a big difference. Thanks to those opcodes, the Z80 could do copy and search operations much faster than the 8080.
@rjy8960
@rjy8960 3 жыл бұрын
I'll be following this - I'm 54 and cut my teeth on creating assembly code and hardware design for various different 4- and 8-bit processors. The first machine I programmed was an 8085 in hex - I remember cheating and using absolute addressing rather than relative addressing to make life easier. Assemblers make life so much easier. Good luck with the series! :)
@jenny-c
@jenny-c 3 жыл бұрын
Oooh that‘s so great! The Spectrum was my first computer and I loved to code in assembler (also later in M68000 assembler for the QL). Watching this video is like travelling back in time and all the memories coming back. Thank you!
@mig7287
@mig7287 3 жыл бұрын
Best memories. I loved assembly programming on my Spectrum. Dot Net on my PC is not as much fun. Starting now to do assembly on the PC.
@mrunixman1579
@mrunixman1579 2 жыл бұрын
I never programmed in assembly on a Spectrum but I have on a PC and just passed a course on it. I came across this video due to interests in the Spectrum's programming languages when code appears on screen after crashing a game.
@darrellsturdivant7912
@darrellsturdivant7912 2 жыл бұрын
Bravo!! Loved every minute of this. Early micro computers, assembly language, emulators, Mac’s and even Atom. Wow. It does not get much better than that. I wrote tons of z80 code back in the day. I even wrote most of my code and compiled it on the mainframe z80 cross assembler. ah, the days of single threaded programming. A simpler time.
@stupossibleify
@stupossibleify 3 жыл бұрын
Fantastic tutorial. As a C64 owner I always wondered about programming the Speccy. Looking forward to the next episode!
@TheAgent4125
@TheAgent4125 3 жыл бұрын
Great start - looking forward to the next one.
@daljitsingh2143
@daljitsingh2143 Жыл бұрын
You've made this video sound like child's play! Thank you. Z80 was always my best processor along with 6502 thank you, you made it easier to understand...better than some lecturers 😊
@dodgydruid
@dodgydruid 3 жыл бұрын
I cut my teeth on a ZX80 kit which was a lot of effort but the damned thing was too limited to do anything of consequence, the ZX81 improved things but the Spectrum took it all to a new level and because it was built upon the 80 and 81's core, was a breeze to migrate too. Another contender also entered the fray at this time, that of CP/M much favoured by the Amstrad machines and became cohabitable on the Spectrum 3's where many Amstrad games could work natively on Spectrum 3's and I used to create personalised Locoscript installs for companies which was a nice bit of extra money using CP/M. I used to have big notepads for setting up a programme, create its flowchart, break the flowchart down into modules then work on each module once I had set up the framework, I was working in a bank in the 90's and I sat there one lunchtime and knocked them up a far better database with decent sockets to talk with other bank systems, the programme was actually tiny and super robust and they stopped using it in early 2000's so it lasted pretty well, of course me being green around the gills I got a cheque for £500 for doing that but £500 in the eighties was not to be sniffed at and like any young lad I blew it on beer, parties and young ladies hehe I spotted this vid as I used to be pretty good at all of this but have lost my way the last 20 odd years, would love to relearn it all and all thru this vid I was thinking "Oh yes, that's how it went" lol
@axelBr1
@axelBr1 3 жыл бұрын
My first computer was a ZX81 with 1K of memory. And although I wanted to program the Z80 in Assembler, and asked my dad for the book "Programming the Z80" for Christmas, but never got round to actually doing it. Great to see something for the Z80, I've been following Ben Eater's 6502 projects, but it's not the same.
@euphoricmonkey8409
@euphoricmonkey8409 8 ай бұрын
Thanks for this series. I had a spectrum as a kid and just wasn’t smart enough to understand assembly. Now I’m a LOT older it’s fun to look back now I’m a BIT wiser. The Z80 is such a manageable cpu to understand.
@dreznik
@dreznik 3 жыл бұрын
this takes me back to Z80 assembly experiments on my ZX81... to go into assembly mode there we had to do smtg like RAND USR
@martinj.fowler6262
@martinj.fowler6262 Ай бұрын
The Latin and Classical Studies teacher at our school was a computer hobbyist. He gave me his copy of Picturesque Editor/Assembler/Monitor/Debugger and said "See if you can work out how to use it, I have no idea". It took me another year or so but I eventually worked it out with a little help from a friend :D I wrote a couple of little games for the Spectrum in Z80 but never fully finished for release. I've still got the tapes but don't think they'll work after all these years. I'd have to guess at the org address to run it and the source was created using Laser Genius Assembler Suite.
@kilianhekhuis
@kilianhekhuis 3 жыл бұрын
Very nice video! Clearly explained, good pace, good information density. Can't wait for the next one!
@microdocker
@microdocker 3 жыл бұрын
Clear explanation, nice and comprehensive infografics and pleasant narration! Thank you!
@trinitron40237
@trinitron40237 3 жыл бұрын
I feel 25 years younger watching this video. I did a 3ph PWM inverter project based on Z80 back then.
@amiller112
@amiller112 3 жыл бұрын
Good video. I have been interested in learning assembly for a while and as I still have my original spectrum +3 this series seems like a good place to start.
@ArcangelOrtiz
@ArcangelOrtiz 3 жыл бұрын
Thanks, it was informative
@kychemclass5850
@kychemclass5850 3 жыл бұрын
Great to see such a series begin!
@richardturnnidge
@richardturnnidge 3 жыл бұрын
Brilliant, looking forward to the series.
@adamjones6252
@adamjones6252 Жыл бұрын
just getting into Z80 programming - nice primer :) looking forward to working through the series.
@HansBezemer
@HansBezemer 3 жыл бұрын
Nothing new for me, but well explained! But it makes me remember a lot of good times. Gives me a very good reason to visit your next presentation!
@curtisvaughan8955
@curtisvaughan8955 Жыл бұрын
OMG finally somebody doing everything on Linux! Thank you so much. I was so tired of emulating programs under wine to follow along with other tutorials.
@Theineluctable_SOME_CANT
@Theineluctable_SOME_CANT 2 жыл бұрын
Great little tutorial. Thoroughly enjoyed it! Great channel...
@jurijzahn8985
@jurijzahn8985 3 жыл бұрын
I am traveling back in time 😁. Very nice! Thanks!
@AdamSommer70
@AdamSommer70 3 жыл бұрын
Great video, thanks for posting!
@hadireg
@hadireg 3 жыл бұрын
👍👍awesome series!
@RufianEmbozado
@RufianEmbozado 3 жыл бұрын
Awesome introduction! I wish I'd had this kind of resource back in the day (although that maybe would have killed some of the joy of discover things on my own, but anyway).
@heidirichter
@heidirichter 3 жыл бұрын
This was great, thank you!
@qzorn4440
@qzorn4440 3 жыл бұрын
gee this is wonderful info, i wished i had this when learning logic and the 8080, etc... thanks a lot...:)
@005AGIMA
@005AGIMA 3 жыл бұрын
oooooh I'm so in! Subbed. Perhaps I will finally write a game after all these years? :D
@rodoherty1
@rodoherty1 3 жыл бұрын
I know that feeling! I've wanted to write a C64 game for so long. I'm working through Matt's X16 series and, so far, I'm hanging in there! Hope you get to realise that dream!
@JimmWare
@JimmWare Жыл бұрын
Well done!
@idea1407
@idea1407 3 жыл бұрын
Very awesome. Great tutorial.
@idea1407
@idea1407 3 жыл бұрын
Yep, just got sjasmplus up and running on my raspberry pi zero w. Your code worked just fine.
@colonelbarker
@colonelbarker 3 жыл бұрын
Thank you for making this!
@r_bilek
@r_bilek 2 жыл бұрын
Very very very good !
@thedogwooddandy
@thedogwooddandy 3 жыл бұрын
so grateful. thank you!
@VasaMusic438
@VasaMusic438 2 жыл бұрын
Fantastic !!!!!!!!
@RockTo11
@RockTo11 3 жыл бұрын
Oh yes. I'm really looking forward to this series. Specifically beca6ineant to make games for the Amstrad CPC and Gameboy.
@slithymatt
@slithymatt 3 жыл бұрын
I won't be getting into the hardware specifics of those platforms in this series, but I hope it provides a good basis for understanding Z80 assembly, which you can then apply to systems besides the ZX Spectrum. Just be aware that the Game Boy CPU only has a subset of the Z80 instructions
@taldmd
@taldmd 3 жыл бұрын
neat! for following episodes, could we expect an explanation of the ZX48 memory map, how did develop in asm back in the 80's, and what made the ZX48 a unique platform (ROM, graphics, sound and input subsystems, etc), different from other Z80 based microcomputers?
@ronvanderlee7298
@ronvanderlee7298 3 жыл бұрын
Memory layout: kzbin.info/www/bejne/lXuXkpuhjNmBj9k 😉🙂
@slithymatt
@slithymatt 3 жыл бұрын
Yes, we'll get into all of that
@iliasgkotsidis3204
@iliasgkotsidis3204 2 жыл бұрын
Beautiful
@davidmarks509
@davidmarks509 2 жыл бұрын
I liked it. TY
@donaldklopper
@donaldklopper 3 жыл бұрын
Pure gold, man!
@slithymatt
@slithymatt 3 жыл бұрын
Thanks! I was shooting for at least 18K
@donaldklopper
@donaldklopper 3 жыл бұрын
@@slithymatt 24K for sure. I just love the application to the Spectrum ecosystem. Even your narration is on point :-) Where were you in 1983 when I got my ZX81?
@slithymatt
@slithymatt 3 жыл бұрын
@@donaldklopper learning how to code at school using Logo on an Apple II, naturally.
@HA7DN
@HA7DN 3 жыл бұрын
Having just programmed 8085 I can already see this is waaaay friendlier, despite being closely related...
@AndrewHelgeCox
@AndrewHelgeCox Жыл бұрын
UK game developers often worked on the Z80 Amstrad CPC when targeting the spectrum.
@slithymatt
@slithymatt Жыл бұрын
I could see that. Definitely a better system for development on.
@croll_uk
@croll_uk 3 жыл бұрын
Awesome. Used to have a Speccy in the late 80's. Would be nice to reminisce and finally write assembly instead of basic. 10 Print 'ME' . 20 GOTO 10 ... lol
@pavloskairis9994
@pavloskairis9994 8 ай бұрын
6502 was fun ... I wrote code for the BBC model B.
@TheBeeshSpweesh
@TheBeeshSpweesh 3 жыл бұрын
7:32 - "(absolute), C" is an invalid LD operand combination on the Z80. 13:27 - There are instructions that load an immediate to the memory byte pointed to by HL, IX+offset, and IY+offset, but not by a 16-bit absolute address. You can make the code clobber HL instead of A as a result.
@slithymatt
@slithymatt 3 жыл бұрын
Good catch with the LD (xx),C. I'm not sure how I missed that! And yeah, you could use (hl), too, but I didn't want to get into indirect addressing in the first example
@TheBeeshSpweesh
@TheBeeshSpweesh 2 жыл бұрын
There's a Z80 knockoff I'm kind of obsessed with that has that LD...
@turbinegraphics16
@turbinegraphics16 Жыл бұрын
Nice, I'm using this to learn master system hacking. I've already started by hacking wonder boy item usage.
@fcf8269
@fcf8269 2 жыл бұрын
Would love to see this when I got my spectrum :) Any plans to make a series for the 68K?
@slithymatt
@slithymatt 2 жыл бұрын
I've definitely considered it. That was my first assembly language many years ago, and I still have my textbook. I would probably target the Amiga.
@cprince10
@cprince10 8 ай бұрын
Great video. If I draw a box using Plot and Draw, how do I fill in the box with colour?
@Choober65
@Choober65 Жыл бұрын
ZX Spectrum, best computer EVER 🤣
@AlessandroGrussu
@AlessandroGrussu 3 жыл бұрын
Interesting video, and a commendable effort to teach the basics of Z80 assembly to the masses. However, I have some reservations. I find the exclusive use of the hexadecimal system in a tutorial aimed at absolute beginners a questionable choice, more so if it is proposed without explaining anything about it. Also, ZesarUX is far too complex to use for a beginner: Spectaculator and SpecEmu would have been better choices in my opinion. Not that I am a Z80 Assembly expert - far from it - but if I had your experience and knowledge, I would have chosen a more "for dummies" approach, delving into details that I could genuinely believe not to need any explanation.
@kirill_bykov
@kirill_bykov 2 жыл бұрын
16:36 AFAIK, $ sign means current compilation address in most assembly languages. And hexadecimal form is written as ####H, started with decimal number, so you have to prefix it with zero sometimes to obey the rule.
@slithymatt
@slithymatt 2 жыл бұрын
No, it just means hex. Each assembler has different notation, but $ is very common for hex. Some assemblers allow multiple notation, including prepending # or postpending H
@kirill_bykov
@kirill_bykov 2 жыл бұрын
@@slithymatt, M80 and GEN80 support H-suffixed and do not support $-prefixed hex notation, even Zeus does not. All three use $ as the current compliation address. I did not tell $ is not supported at all for this purpose, simply uncommon. Is common for Pascal though.
@thinking-laaf
@thinking-laaf 8 ай бұрын
The alternate registers are moderately useful. If zilog had added a means to find out which set is active, that would have increased their usefulness...
@slithymatt
@slithymatt 8 ай бұрын
Indeed! Instead the alternate registers are always the ones not directly accessible. One of the unused status bits would be nice!
@johnwilliams7999
@johnwilliams7999 3 жыл бұрын
What a great video! Maybe a daft question but why would you use assembly if you can compile c to machine code.
@slithymatt
@slithymatt 3 жыл бұрын
There are many reasons, but mostly when you are dealing with extremely tight constraints, like on a low-RAM system with a slow CPU and no operating system (which is pretty much all 8-bit home computers and game consoles), the code generated by C will be too bulky and inefficient. C was invented for Unix and systems capable of running it.
@cyberp0et
@cyberp0et 3 жыл бұрын
Why not program in BASIC, since it comes with the system :)
@johnwilliams7999
@johnwilliams7999 3 жыл бұрын
@@cyberp0et I used to program in basic a long time ago and ill probably tinker with it a little when I get around to it. I like to code in language like rust and probably c is the closest thing to that that u can code with on this machine.
@Michael75579
@Michael75579 3 жыл бұрын
It's difficult to imagine how constrained the Spectrum and other machines of the time were unless you've used them. The ancient (2010) PC I'm running a Spectrum emulator on to follow these tutorials has a quad-core Intel CPU running at 2.66Ghz and 4G of memory; that's around 750 times the CPU clock speed and over 85000 times the memory of my original Spectrum 48K.
@Gruntos
@Gruntos 3 жыл бұрын
If I remember the IX and IY registers could be addresses as 8 bit registers IX.L and IX.H my old assembler had this functionality. Not sure if it was common practice though. I did a lot with screen drawing on the specky. Most people used LDIR which would cause a screen flicker but it was faster to call LDI in a block 1024 blocks as the LDIR took 24 T states and the LDI 8 ( memory falling here). I think the fastest way was to move the SP to the top of screen memory and push the screen byte. Had a lot of fun with the z80 and 68000
@slithymatt
@slithymatt 3 жыл бұрын
Yes, you can address ixh and ixl in the same ways you can h and l, for the most part. There are a few exceptions where you can't substitute index register halves, when h or l is one operand, but (hl) is the other. For example: ld (hl),h is valid, but you can't do ld (hl),ixh. What you can do is ld(ix+x),h, but again not ld(ix+x),ixh.
@nicadi2005
@nicadi2005 Жыл бұрын
@Gruntos "I think the fastest way was to move the SP to the top of screen memory and push the screen byte." - Yes, I do recall hearing about that technique - fairly recently, as a matter of fact. But I haven't quite figured it out yet, to be honest... I do understand (to some extent) why this would be an attractive approach, though: i.e. using 16-bit transfers per opcode (rather than 8-bit ones), as well as the address decrement/increment being handled automatically. However, I keep seeing the fact that the stack is implemented 'upside-down' for the Z80 as a serious (potential) impediment to achieving high performance for this technique, in certain applications... (P.S. I can explain more thoroughly what I actually mean by all of that, however I would risk turning this post into an interminable essay - and I would rather NOT go that way... At least, not unless someone else here first manifests further interest in hearing more about my musings on the matter...)
@AhmadAlMutawa_abunoor
@AhmadAlMutawa_abunoor 3 жыл бұрын
This is an excellent level of explanation. Even to a veteran programmer in different languages. My question is: will this code work for MSX computers? I am interested in writing programs for the MSX, but could not find enough information and videos for it, since it was not very popular in the USA
@ped7g
@ped7g 3 жыл бұрын
the video ram and other memory layout of MSX is very likely completely different (I don't know how MSX has it), so the code itself will still work the same, write value $D6 into memory at address $5800, but the MSX computer will not create blinking square on screen. (what will happen on MSX depends what is in that area of memory, probably nothing of significance/direct response). Also the output format SNA is ZX snapshot, so you will need to figure out how to produce binary which can be loaded by MSX emulator (or real MSX computer), AFAIK games for MSX are often produced as ROM-cartridge images, I know one huge MSX project does use sjasmplus for it, but it builds the whole file byte by byte manually, ie. any required "headers" of ROM cartridge and special values like checksum are part of the source code, and the source output is captured "as is" as raw stream of bytes (OUTPUT -> OUTEND directives of sjasmplus, or --raw command line option). in other words, it makes some sense to follow ZX tutorials (the Z80 assembly is still Z80 assembly, but [only] the machine-specific parts differ), and you can also use tools presented here, but you need to find some "glue" tutorial dedicated to MSX which will fill you on those machine-specific details, what's the memory layout of MSX, how to use it's HW features like graphics, sound, sprites, etc.... There's excellent web dedicated to MSX at msx dot org, where you can find also wiki with tips for programmers, and probably also some links to other tutorials or example projects and HW info. If you are completely new to assembly, and you really want to do MSX, it may make sense to start rather with MSX tutorials, and scavenge the ZX assembly tutorials a bit later, when you can somewhat tell which parts are machine specific features, and pick up the Z80 assembly tricks which do apply also for MSX.
@solhsa
@solhsa 3 жыл бұрын
The z80 code itself will "work", but referring to anything outside it (like display memory) will differ from one z80 computer to another.
@solhsa
@solhsa 3 жыл бұрын
Since even when writing for the speccy you'll probably want to have some kind of hardware reference in hand, writing for the msx shouldn't be much different - you just need a different reference =)
@cnc-maker
@cnc-maker 3 жыл бұрын
Also be aware that this assembler does not use the original Z80 syntax. The “$” (dollar sign) used by this assembler is not a part of the Z80 assembly syntax. Also, by default, all numbers in Z80 assembly are considered to be hexadecimal, not decimal. There are other differences as well, but you get the jist.. If you are using a different assembler, you might need to tweak the assembly in order for it to work for you.
@andyleighton3616
@andyleighton3616 3 жыл бұрын
The basic information about how the instructions work is the same. However MSX is totally different to the Spectrum. Anything to do with writing to screen, reading the keyboard, etc will be completely different. The MSX did not have an area of screen memory in the main 64K. It used dedicated VRAM accessed by a visual display processor chip (a Texas Instruments one for earlier MSX machines). The process for writing (and reading) the MSX VRAM (and VDP) require a few techniques Matt hasn't talked about. Basically using OUT and IN instructions (and also DI / EI to disable / enable interrupts). There were probably also MSX bios routines to do some of that too (just as we saw in the Hello World example program).
@Veso266
@Veso266 Жыл бұрын
How would I do this direcly on the spectrum? Were there any good asemblers back in the day?
@slithymatt
@slithymatt Жыл бұрын
I don't know about anything specific, but I'm sure it would be possible. There were several assemblers for Z80-based computers that ran CP/M
@zembalu
@zembalu 3 жыл бұрын
Thank you for that video! I have a ZX Spectrum since the 80ies, and programmed video games in assembler. I really would like to turn this thing on again, but there are two impediments: I have no old fashioned TV as a monitor, and I have no cassette drive, not to speak of the cassettes with the assembler and so on. Any clue, how to fix this?
@slithymatt
@slithymatt 3 жыл бұрын
Any TV with an analog PAL tuner should work, assuming you have a PAL unit. Most modern TVs still support analog RF video, but it may be stretched out on the screen. As for a tape deck, you can use anything that can play a sound through a headphone jack. You just need a dubbing cable, with a 3.5mm plug on both ends. Then you can just play the sound file through the cable.
@zembalu
@zembalu 3 жыл бұрын
@@slithymatt Thank you! That helps a lot.
@XXXXXX-dy5fs
@XXXXXX-dy5fs 3 жыл бұрын
There is a simple mod to bypass the TV modulator and give a composite video output. As for storage there are several modern alternatives to tape. Some use SD cards to copy file images from your PC to the SD interface that plugs into the Spectrum.
@zembalu
@zembalu 3 жыл бұрын
@@XXXXXX-dy5fs thank you!
@alexandrugoia2982
@alexandrugoia2982 4 ай бұрын
Have you some experience with gens-3 assembler directly on spectrum computer/emulator ?
@slithymatt
@slithymatt 4 ай бұрын
No, never tried it.
@iliasgkotsidis3204
@iliasgkotsidis3204 2 жыл бұрын
I need to ask a question the tutorial is very helpful but i am having a rough time finding an ide to make the .asm file work
@slithymatt
@slithymatt 2 жыл бұрын
I don't use an IDE, all you need is a text editor and the sjasmplus assembler. See the GitHub link in the description for more info
@iliasgkotsidis3204
@iliasgkotsidis3204 2 жыл бұрын
@@slithymatt thank you
@andrewdunbar828
@andrewdunbar828 3 жыл бұрын
I consider it respectful to pronounce the Z in Z-80 and ZX as "zed" when talking about British computers and "zee" when talking about American computers, at least in public (-:
@axelBr1
@axelBr1 3 жыл бұрын
The trouble is that the Z80 is a yankee chip, so I guess it should be called the Zee 80, but Zed 80 sounds better
@StarsManny
@StarsManny 2 жыл бұрын
Most native English speakers in the world are American. So let's use the American way. I'm sure most non Americans like me don't care much either way anyway.
@isyt1
@isyt1 2 жыл бұрын
@@StarsManny that’s completely not true. If you add up Indian, Nigerians, British, Irish, Australian, New Zealand, South Africa, Germans then it’s far more than America and they all use real English, not American English. See Wikipedia article entitled “List of countries by English-speaking population”
@paulklasmann1218
@paulklasmann1218 Жыл бұрын
@@StarsManny The language is English, not American. In English it is pronounced "zed". Anything else is wrong in an English exam.
@commentingpausedtoprotectus
@commentingpausedtoprotectus Жыл бұрын
Some good points, one very bad point here. All of it respectful (maybe not mine 😂) but yes, it is Zed 😅
@caphep
@caphep Жыл бұрын
Atom has been discontinued and the Z80 language package for syntax is not available any more. Can anyone recommend an alternative editor for this tutorial?
@slithymatt
@slithymatt Жыл бұрын
VSCode is the closest, and if you don't want the Microsoft proprietary libraries you can install the fully FOSS version "Codium"
@ian_b
@ian_b 3 жыл бұрын
There will never again be a register pair as great as hl.
@slithymatt
@slithymatt 3 жыл бұрын
HL' is just waiting in the wings, though...
@ian_b
@ian_b 3 жыл бұрын
@@slithymatt Well I admit, I tend to flip-flop between the two.
@DAVIDGREGORYKERR
@DAVIDGREGORYKERR 3 жыл бұрын
The MEMOTECH MTX512 can combine Assembly and BASIC together I.E. ASSEM 10 10 CODE &H4000 LD HL,&H20 &H4004 LD BC,AH32 &H4008 ADD BC,HL &H400C LD (HL),BC &H4010 RET 20 REM End of assembly. the MTX512 also has a proper keyboard which makes coding easier. What about storing you assembly language in the REM statements and do CALL RAND USER(16384) or you can do like in this example goto 10.
@slithymatt
@slithymatt 3 жыл бұрын
I don't know anything about the Memotech computers. Looks like a nice feature!
@DAVIDGREGORYKERR
@DAVIDGREGORYKERR 3 жыл бұрын
@@slithymatt if a special piece of hardware plugged into the back of the computer you can load and run SINCLAIR Spectrum games for both the 48K and 64K machines and it just happens that you can get the MEMOTECM HDX512 (Hard drive) or the MEMOTECH FDX512 (Dual floppy drive) and can run CPM/80.
@TheBeeshSpweesh
@TheBeeshSpweesh 2 жыл бұрын
Are you sure the MTX512's assembler supports "ADD BC, HL" and "LD (HL), BC" as pseudo-instructions? The Z80 has neither. I'm gonna guess you reversed the operand order for those. The latter can be done via: LD C, (HL) ; Load low byte INC HL ; Advance to high byte LD B, (HL) ; Load high byte DEC HL ; Go back (may not be needed) Once again, I know nothing about the BASIC used by that machine.
@DAVIDGREGORYKERR
@DAVIDGREGORYKERR 2 жыл бұрын
The processor is the ZILOG Z80A get the the MEMOTECH program book and have a look at the machine code for the Sound To Light programme
@TheBeeshSpweesh
@TheBeeshSpweesh 2 жыл бұрын
@@DAVIDGREGORYKERR I know! I saw that it used the Z80.
@SteveInScotland
@SteveInScotland 3 жыл бұрын
Speccy is an affectionate name often used in magazines back in the day but it kind of makes my skin crawl when it’s used too often or in inappropriate places. For me at least, I prefer just hearing the regular name of Spectrum. It’s kind of similar to if you kept saying Bro all the time, you could but in general you likely wouldn’t. No hate, just my opinion.
@slithymatt
@slithymatt 3 жыл бұрын
I try to switch it up, because saying Zed-Ecks-Spectrum over and over can get monotonous.
@SteveInScotland
@SteveInScotland 3 жыл бұрын
@@slithymatt absolutely it’s full name is far too long winded but just Spectrum is easy enough I think. I mean it’s your channel, do your thing.
@wlorenz65
@wlorenz65 3 жыл бұрын
Why is it See-Eighty and Said-Ex-Eighty but not See-Ex-Eighty?
@slithymatt
@slithymatt 3 жыл бұрын
The Z80 is an American chip, while the ZX80 is a British computer
@kcinplatinumgaming2598
@kcinplatinumgaming2598 2 жыл бұрын
takes me back not codedd any z80 since the 1990s, I dont think i done any assembly on spectrums mostly Amstrad CPC when i developed a text editor and some small projects on the PCW systems but mostly coding on low power stand alone chips systems hardware like controllers, io ect .. serial devices with Z80 logic.. but mostly other CP/M based systems .. mad really that Digital Research could have been instead of Microsoft .. Gary Kildall could have been instead of Bill Gates
@LarsHHoog
@LarsHHoog 3 жыл бұрын
7:40 shows a LD (NN),C instruction that Z80 doesn't have.
@LarsHHoog
@LarsHHoog 3 жыл бұрын
But the contents is promising and I hope many will learn lots.
@slithymatt
@slithymatt 3 жыл бұрын
Yeah, someone else caught that already. Had a bit of a brain fart there. I'm to change it to A in the slides in the repo
@LarsHHoog
@LarsHHoog 3 жыл бұрын
@@slithymatt There was no damage caused :)
@annieworroll4373
@annieworroll4373 9 ай бұрын
Just good enough, just cheap enough, just simple enough, and with a huge number of people who know how to work with them gave this thing a very long life in embedded applications after the 8 bit PC era faded. It's still being made! And being used for so long every tiny edge case has been figured out making its behavior incredibly predictable, which is crucial in a lot of embedded applications.
@AndersJackson
@AndersJackson 3 жыл бұрын
Emacs also have syntax highlightning.
@slithymatt
@slithymatt 3 жыл бұрын
There's one in every crowd... 😉
@AndersJackson
@AndersJackson 3 жыл бұрын
@@slithymatt yes, but it is plain better. :-)
@1Rictec
@1Rictec Жыл бұрын
"bro i cant pass this level on this game can you do something?" ok looking for DEC (HL) on the code , remove it and there you go infinity lives...oh the memories lol
@ped7g
@ped7g 3 жыл бұрын
IMHO it's a bit better to end these early snapshot examples with `jr $` (infinite loop of self-jump). (and leave the "ret to basic" for later, when you will deal also with loader/sysvars/etc) It's also nice reminder for asm beginners, that the CPU doesn't stop where the source does, and keeps executing whatever it finds in memory further down, unless it is explicitly prevented.
@davidorama6690
@davidorama6690 3 жыл бұрын
If you’d have posted these videos earlier I could of learnt assembly coding from you and would of been a hero in my High School and maybe Bill Gates instead of a geek who became an accountant. Thanks. 35 years too late. Try harder next time! 🤣
@toastyPredicament
@toastyPredicament Жыл бұрын
Shut
@IngieKerr
@IngieKerr 3 жыл бұрын
Inspired, I've now got a tiny blue stick-person rotating in a character cell... with a pause subroutine to slow it down enough to see it. I'd make it move around the screen but sprites on a spectrum memory map are beyond my brain for today :) I mean, it's easy-ish to move "sprites" sideways on a speccy screen, it's just the moving up and down that gets tricky :) As a child I had a language extension tape _"Fifth"_ (I'd link to it, but a product name like that wasn't built for legacy searching an internet :) , which was a library of sprite routines and such, and wasn't a derivative of Forth, despite its obvious pun. I recall it being quite nice - hacking around with its demos, but I think at the time I hadn't tuned into the delights of such things, or what I was doing. edit: found a reference, if anyone remembers this: worldofspectrum.org/archive/software/utilities/fifth-crl-group-plc ... I cite this, since when a 12yr old, I remember I found it fascinating, and looking back at the manual on this link, I can see why... but I can also see why it went over my head at the time :)
@slithymatt
@slithymatt 3 жыл бұрын
Very cool! I never heard of this "Fifth" -- very cute name. Was it only for the Spectrum?
@IngieKerr
@IngieKerr 3 жыл бұрын
@@slithymatt I believe so, aye... I can't recall why I bought it back then, but I imagine I read an advert in _Your Spectrum_ magazine saying "WRITE YOUR OWN GAMES, MAKE ££££", sent off naively, opened the box and realised I was lacking various other parts, namely those in my brain :)
Optimizing with "Bad Code"
17:11
Kaze Emanuar
Рет қаралды 194 М.
everything is open source if you can reverse engineer (try it RIGHT NOW!)
13:56
Low Level Learning
Рет қаралды 1,2 МЛН
DIY 8-Bit Z80 Single Board Computer
13:27
Ivan Farafontov
Рет қаралды 64 М.
The Z80's secret feature discovered after 40 years!
16:07
Andy Hu
Рет қаралды 702 М.
Installing Linux Like It's 1992
17:47
Old Computers Sucked
Рет қаралды 70 М.
Top 50 ZX Spectrum games of 1985 - in under 10 minutes
8:53
RetroNoName
Рет қаралды 86 М.
A $9 Introduction to the RISC-V Future of Computing
26:34
apalrd's adventures
Рет қаралды 345 М.
Building the most controversial Z80 Computer ever
25:58
Ready? Z80
Рет қаралды 73 М.
ВСЕ МОИ ТЕЛЕФОНЫ
14:31
DimaViper Live
Рет қаралды 62 М.
TOP-18 ФИШЕК iOS 18
17:09
Wylsacom
Рет қаралды 606 М.
APPLE совершила РЕВОЛЮЦИЮ!
0:39
ÉЖИ АКСЁНОВ
Рет қаралды 324 М.
WWDC 2024 Recap: Is Apple Intelligence Legit?
18:23
Marques Brownlee
Рет қаралды 5 МЛН
сюрприз
1:00
Capex0
Рет қаралды 1,2 МЛН