What are your favourite ZX Spectrum development tools? [closed] - z80

Closed. This question is opinion-based. It is not currently accepting answers.
Closed 8 years ago.
Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions.
What are your favourite assemblers, compilers, environments, interpreters for the
good old ZX Spectrum?

I always used to use Roybot Assembler - which had you enter your program using the BASIC editor and REM statements. It comes with a decent debugger/disassembler that lets you single-step machine code too.
The Hisoft Gens and Mons assembler and disassembler (aka Devpak) are probably fairly popular.
For high-level compiling, the Mira Modula-2 compiler is very good.

Hisoft Gens and Mons assembler and disassembler for programming/debugging.
The Artist / The Art Studio for graphics:
http://www.worldofspectrum.org/infoseekid.cgi?id=0007918
The Music Box for sound:
http://www.worldofspectrum.org/infoseekid.cgi?id=0008481

Zeus assembler, was the best.
I'd add a couple of the Spectrum books in there if I could remember the names, still have them at home. One was The Complete Spectrum ROM Disassembly by Ian Logan and Frank O'Hara (ISBN 0 86161 116 0), which was commented and described as if it was the source, a fantastic piece of reverse engineering, including a suggested bug fix for the known ROM bugs. If only flash memory had been around in those days. I also memorised a tiny book called the Z80 Workshop Manual which was a great summary of the processor.

Just programming in BASIC, the commands are right there on those rubbery keys. Now if only PC's could have key-legends with while, case, switch etc. on them :-)

ZX ASM 3.0
It had the best user interface and good feature set compared to other assemblers at the end of the twentieth century.

Devpac (a blue cassette) comes to my mind, even after all these years.
Sure, it was #1. I don't miss the cassette loadings, though. Nice question!!! :D
http://www.clive.nl/detail/22916/
I think I had v.3. It sure looked much more home-made than the this pic. But it worked and didn't have a single bug. Beat that, current software!!!

I used to type in hex-tables from a magazine and then a a short basic application to unpack the data into assembly code. I couldn't make heads nor tails of it for ages until I discovered I wasn't actually coding at all!
I then moved onto Z80 assembly on a College owned CP/M mini computer system. Programming the Speccy was never the same after that and I never went back!

BASin, TommyGun, ConTEXT and the Pasmo cross-compiler. Works great with the ZXSpin emulator too,,

For contemporary development, TommyGun is an excellent choice.
It has a built in assembler, map editor, graphics editor and other goodies. It also supports multiple 8-bit platforms.
It works well in conjunction with the excellent ZX Spin emulator for debugging.

ZX-Asm v3.1 + patched HiSoft-C v1.1 / figFORTH / BetaBasic 3.0

There are some good PC-based packages too. For Sinclair BASIC based development the excellent BASin package for Windows gives you a good syntax highlighter, runtime virtual machine, built-in editors for fonts and UDG's etc.

Assembler Prometheus from Proxima Software.

Well outside of GEN80, HiSoft Pascal and Hisoft C were pretty impressive. Proper high level languages, way cool. Before I learnt Z80, and was frustrated by the speed of BASIC, I also loved MCODER, though more on the ZX81 than ZX Spectrum.

I'm using Z88DK, but I think also SDCC may be of interest.

Related

Do computers still use the Z80 CPU?

I have seen that some people are asking questions about assembly programming using the Z80 CPU. I used it years ago. It it still being used in new pieces of hardware or is it totally obsolete?
Yes, the TI-84+/TI-83+ line of graphing calculators (besides the CE, which uses the faster eZ80 processor) use it: https://en.wikipedia.org/wiki/TI-84_Plus_series
Zilog still appears to sell the Z-80 though it does look like they're mostly selling the eZ80 in that line which is compatible but much improved.
Hobbyists still use it and there is even a kickstarter for building a ZX Spectrum clone: https://www.kickstarter.com/projects/1835143999/zx-spectrum-next However, they don't technically use the Z-80 but a 100% programming compatible clone using an FPGA. Certainly that's still a Z-80 as far as the programmer is concerned.
I was curious about this myself so I looked around a bit. The most extensive list I could find was from Wikipedia: https://en.wikipedia.org/wiki/Zilog_Z80#Embedded_systems_and_consumer_electronics
Here are the more modern pieces of equipment from the list:
Gasoline dispenser flow-rate controllers. US Patents 4930665 (1988), 4962462 (1983), 5602745 (1995). I would bet many of these are still in use today.
Breathalyzers (2008)
Looking through Google Patents I found these (after 2000):
Set-top box (2001)
Energy-saving cooking stove (2010)
Currency counting system (2013)
"Digital language learning machine" (2003)
Pinball Game Machine (2011)
Pachinko machine (2014)
Slot machine (2014)
Game machine processor (2019)
Many of these are low-cost Chinese embedded devices or Japanese arcade machines.
There is hobbyists project of ZX Spectrum clone that uses Z80 exactly http://nedopc.com/zxevo/zxevo_eng.php
This computer is still in production as well as several extension devices for it.

What's the most cross-platform friendly coding language? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
Let's say I want to create FPS game, let's say clone Crysis so everybody understand what type of graphics & performance I'm after. What's the best code to write this game with so it's as easy as possible to port it to all the common platforms? Of course I want the application to feel and be native to the platform. This also means that it should be easy to take advantage of Snow Leopard's new features like OpenCL and Windows 7's new features. I realize that GUI has the written separately for different platforms and that's not a problem.
So my question is that what's the best language for the job. I'm not looking for one-for-all solution but more like language for the core. I guess one way to put it is to say that what's the best language if you need to port the same program to Windows, OS X & Linux? Java is out of the question.
C (and now for some padding to reach 15 chars)
Have you ever seen the Blues Brothers? In the movie, Jake and Elwood go into a hick bar to do a gig and ask what sort of music they like, to which the woman behind the bar answers:
We have both kinds: country AND
western.
What has this got to do with this question? Well, you want to create high performance 3D graphics and you're asking what language to use?
We have both kinds: C and C++.
You probably want C for your lower level graphics performance, either the variant of C89 that Visual C++ supports, or use MinGW and gcc C99 ( VC++ 2008 doesn't support declarations in for loops in C99 code, which is very annoying, but then they didn't do that right in C++ for years ).
Admittedly, if you're taking GNU with you and running full-screen with your own GUI then it's not really cross platform any more.
You also probably want either Lua or Python or another scripting language which plays well with calling C to give a sensible higher level way of controlling the game.
C++. You can avoid millions of "if #define"'s for platform dependent things and instead use inheritance (derived classes for each platform and client using/knowing the abstract base class). A few exceptions to this can be made for the performance critical parts.
There are also lots of libraries for cross-platform development.
I really recommend using Lua for any scripting. It is an ANSI C library so that means that a: it can be compiled in (at least most) C++ compilers, and: if there's a C compiler for the platform then you can use lua. It allows for significant extension of flexibility of your game and if you want it will let your players customize it too!
Java is probably one of the easiest to learn, personally. Java though doesn't have have that great of a graphical system, it needs more code to support the graphical display if you are coding "GAMES," if you're going to code a website though choose JavaScript, CSS, and HTML/5. Or use only one of these languages normally best to choose two that best fit your comforts... =) For an FPS, I would recommend for beginners to use Java, if you have a good sense in what you want to create and it is a more complex game then use C# or C++, just because it uses less hardware if you want to make more complex games to run on multi platform.
Whatever you use you're going to have to write platform-specific code. Languages like Java or other interpreted languages (Python be my personal preference) are going to allow you to use a lot of commonalities. However, since it's not a quick and simple project, I'd suggest </intelligent-looking-padding> C or C++.
Edit: GUI doesn't necessarily have to be written from scratch for every platform. Check wxWidgets.
Most cross platform games are written in C++, because it is very good - performance wise; and its more user friendly than C. Games need maximum speed & efficiency!
You can hide away platform specific stuff behind certain abstractions and API's that you write so that you can port it easily. You can also use a cross platform framework such as Qt or wxWidgets for the window & GUI elements. Adding a scripting language to non critical parts is also nice. :)
As most have noted here, you are almost certainly going to need C/C++ for your graphics in the end particularly for your high performance (graphics) requirements.
However there might be an opportunity to develop the "core" as you call it, in a scripting language which in turn is easy to embed within a C/C++ application. In which case, the top 2 scripting languages to look into would be Lua and Tcl.
Lua in particular is used in WoW among others I'm sure. Tcl on the other hand has more "batteries included" (libraries).
I'd recommend C++ for large cross-platform projects as well. But I think what's also important are the build-tools you use. For example SCons or CMake can create project files/makefiles for most compilers under Windows/Linux/MacOS.
C is a good language, but generally you want an object oriented language for programming game. If your looking for speed, go with C++, but if you don't have much programming experience, go with python. look into the sfml and pygame libraries.

What is the best way to learn x86 assembly on a Linux platform? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I have no prior knowledge of assembly programming, and would like to learn how to code x86 assembly on a Linux platform. However, I'm having a hard time finding a good resource to teach myself with.
The Art of Assembly book looks good, but it teaches HLA. I'm not interested in having to learn one way, then relearning it all over again. It also seems like RISC architectures have better resources for assembly, but unfortunately I do not have a RISC processor to learn with. Does anyone have any suggestions?
http://asm.sf.net has some material on architectures besides x86.
If you are interested in RISC architectures, you could run Linux on Qemu. Qemu emulates several RISC architectures like PowerPC, ARM and MIPS. You might be able to find a ready to use Qemu hard disk image here.
Another way to experiment with RISC architectures would be to use gdb's built-in simulator.
I found Assembly language step-by-step to be a very good resource. It has a section in the back thats aimed at Linux assembly too.
Probably nothing much better than The Art of Assembly Language Programming and the other resources at that web site.
There are really two parts to learning assembly-level programming: the basic concepts, and then specific architectures. If you haven't had any exposure to asm programming, I strongly suggest you get the basics down first with a simple, small architecture, even tho' it likely is not directly applicable to any real hardware. If many folks are pointing to a particular resource like "The Art of...", take another look at it, use it to learn what an architecture is, how to use the basic tools (asm, debugger, disasm, etc).
Once those are out of the way, then you can start looking into more advanced instruction sets. The x86 architecture and instruction set are pretty convoluted and there are many obscure ways to twist your brain - learn something simple before you tackle that.
Even though many people I know at school hated this book, I will link it anyway:
http://www.amazon.com/Professional-Assembly-Language-Programmer/dp/0764579010
The main reason I used this book is because it uses x86 on Linux with the GNU assembler. That last point helped since I had to use that assembler in our school's lab, and if you aren't aware - the syntax is different from Intel syntax.
Also, I would just add that learning how high level languages are compiled into assembly language really helped me move along.
x86 assembly is really an intel language, best learnt with an intel chip and a windows platform which does DOS
If you have something like WinXP there used to be a DOS interpreter which showed a user the basics of asm and allowed a user to reverse a command and tweak the code in real time, then assemble the code into a block which could be run on the interpreter
It was called the "Ketman Interpreter"
It was for DOS asm only but it was pretty unique because it let you see what happens with all the registers and flags and allows a totally clueless individual to get a handle on the logic
Try http://www.emu8086.com which is a windows-hosted 8086 emulator with an assembler and debugger. It comes with a tutorial.
I learned x86 assembler from a book about the 8086 (which I can't remember the name of at present... it was obviously quite old, and purple. if you're really interested I can dig it up when I get home). That will only teach you 16 bit stuff, for the more advanced 32 bit stuff I read some tutorials online. I've never done 64 bit. At least at first, the OS you're targeting probably won't matter, as you're too low-level... the BIOS is all you really care about. If you don't have access to a test system, an emulator is probably a good choice, as others have mentioned, but you can also build yourself an 8088 or 8086 without too much trouble from discrete parts. You can find tutorials and circuit diagrams online easily. It should cost less than $50 and it's a great learning experience -- you're essentially building a motherboard from scratch.
If you're not too attached to x86 assembly and want to learn RISC, I recommend the Microchip PIC microcontrollers. You can pick up a starter kit for less than $50 (the PICKit 1, which I have, even works under Linux). They have extensive documentation and plenty of third-party tutorials aimed at hobbyists.
don't forget to grab a copy of Guide-Assembly-Language-Programming-in-Linux book.
The Art of Assembly Language Programming

Reference material for LabVIEW [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm supposed to learn how to use LabVIEW for my new job, and I'm wondering if anybody can recommend some good books or reference/tutorial web sites.
I'm a senior developer with lots of Java/C#/C++ experience.
I realize that this question is perhaps more vague than is intended on stack overflow, so how about this? Please answer with one book or web site and a brief description. Then people can vote up their favourites.
It will take some training and some time to learn the style needed to develop maintainable code.
Coming from Java/C#/C++, you probably have a good idea of good software architecture. Now you just need to learn the peculiarities of LabView and the common pitfalls.
For the basics, National Instruments offers training courses. See if your new employer can send you to a Basics I/II class to get your feet wet. They offer some online classes as well. Following classes, you can sign up to take tests for certification.
Get an evaluation copy of Labview from National Instruments; they have a well maintained help file that you can dive right into, with example code included. Look at "Getting Started" and "LabVIEW Environment". You should be able to jump right in and become familiar with the dev environment pretty quickly.
LabVIEW, being graphical is nice, but don't throw out your best practices from an application design point of view. It is common to end up with code looking like rainbow sphaghetti, or code that stretches several screens wide. Use subvi's and keep each vi with a specific purpose and function.
The official NI support forums and knowledgebase are probably the best resources out there at the moment.
Unofficial sites like Tutorials in G have a subset of the information found on the official site and documentation, but still may be useful for cross reference if you get stuck.
Edit: Basics I/II are designed to be accessible to users without prior software development experience. Depending on how you feel after using the evaluation version, you may be able to move directly into Intermediate I/II. NI has the course outlines available on their website as well, so you know what you're going to cover in each.
LabVIEW for Everyone is recently revised and quite comprehensive. Other than the free stuff available on the Web, this is probably the best place to start learning the language.
The LabVIEW Style Guide is a great book on how to organize and arrange your code and files for maximum benefit.
Object oriented programming is a recent addition to LabVIEW. The LVOOP white paper explains much about how it works and why the way it is the way it is.
It's a bit out of date, but LabVIEW Advanced Programming Techniques by Bitter, Mohiuddin and Nawrocki is still full of useful stuff.
The National Instruments forums are a great place to go for basic help. The LabVIEW Advanced Virtual Architects (LAVA) is the community forum for advanced topics.
Tutorials in G, also check out the webring.
-Adam
The official NI support page and support forums are hard to beat.
It really helps having a guru around for LabVIEW.
'Arc the daft' pretty much nailed exactly what one should try to do to learn LabVIEW. However, I would not skip Basic's I and II. The classes do teach basic programming concepts and are geared to non-programmers, however they do cover the IDE extensively. The LabVIEW IDE is strange coming from a text based language and spending the time in the class learning it with an instructor can really accelerate your learning.
I would skip Intermediate 1 if you are a seasoned developer. Intermediate 1 tries to teach software engineering practices in the span of a three day course. If you are studying to get your CLD you need to know the course and the terminology for the exam, otherwise I wouldn't spend my time or capital in the course.
Subscribe to the Info-LabVIEW mailing list. It's got a lot quieter in recent times as the NI and LAVA forums have grown in popularity, but it's still read by some very experienced and helpful people, including people at NI, and if you can't find what you need elsewhere then a good question will usually get a good answer.
The NI style guide, as already mentioned, is a good reference - re-read it as you learn about more of the things it covers, it contains some densely packed good advice.
Personal top tips: look at the supplied example code (although it's not necessarily perfect); learn to use queues and notifiers as soon as possible; don't dive in to using event structures and control references until you've figured out what you can and can't do without them; and start small and simple - you should find it easy to reuse this code later on by repackaging it into subVI's as the scope of your ambitions increases. And have fun!
For me the best way to learn LabVIEW was by analyzing the in-build examples. The best forums are NI Developer Zone Community and LAVA Forums
LabVIEW is really easy to work with but the tricky bit is to know how to design your application so that it will not becaome a spaghetti. Once you get the basics (e.g. LabVIEW Introduction Course) learn how to use design patterns, events, queues, typedefs and references. Use modular architecture, avoid big structures, try 'writing' your code in small window.
It is also important to know the differences between LabVIEW versions (full/pro, and ver 7.1.1, 8.2, 8.5, 8.6, 2009), how to use version control system with the vi's (binary files), and how to keep your files in project so that you can easily reuse any code and be "DRY" (don't repeat yourself), how to build executable and what LabVIEW RunTime Engine it needs (for customers), what is DAQmx and how to use it, what are VISA drivers and which version is correct for you settings, how to use Measurements & Automation program..
When I started with LabVIEW a few years ago I was given a link to the LabVIEW Graphical Programming Course. It covers the basics and having a sound knowledge of other programming languages I think helped me pick things up quickly.
I would start with the LabVIEW wiki.
Specifically, LabVIEW Tutorial. There are lots of online references and links to LabVIEW reference books. Welcome to the world of LabVIEW!
I would suggest you start with LabVIEW for Everyone. Its a good book which covers the basics of LabVIEW well.

What's the best way to get to know linux or BSD kernel internals? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I'd like to gain better knowledge of operating system internals. Process management, memory management, and stuff like that.
I was thinking of learning by getting to know either linux or BSD kernel.
Which one kernel is better for learning purposes?
What's the best place to start?
Can you recommend any good books?
In college, I had an operating systems class where we used a book by Tanenbaum. In the class, we implemented a device driver in the Minix operating system. It was a lot of fun, and we learned a lot.
One thing to note though, if you pick Minix, it is designed for learning. It is a microkernel, while Linux and BSD are a monolithic kernel, so what you learn may not be 100% translatable to be able to work with Linux or BSD, but you can still gain a lot out of it, without having to process quite as much information.
As a side note, if you've read Just for Fun, Linus actually was playing with Minix before he wrote Linux, but it just wasn't enough for his purposes.
As a Linux user I'd say Linux has a great community for people to learn about the kernel. http://kernelnewbies.org is a great place to start asking questions and learning about how the kernel works. I can't make a book reccomendation, but once you've read the starting material on kernelnewbies the source is very well documented.
Aside from the good books already mentioned (Opeating System Design & Implementation is particularly good), get a hold of a 1.x release Linux Kernel, load it into VMWare or VirtualBox and start playing around from there.
You will need to spend a lot of time browsing source code. For this, check out http://lxr.linux.no/ which is a browsable linked version of the source and makes life a lot easier. For the very first version of Linux (0.01) check out http://lxr.linux.no/linux-old+v0.01/. The fun begins at http://lxr.linux.no/linux-old+v0.01/boot/boot.s. As you progress from version to version, check out the ChangeLog and dig into those parts that have changed to save you re-reading the whole thing again.
Once you've gotten a hold of the concepts, look at 2.0, then 2.2, etc. Be prepared to sink A LOT of time into the process.
Linux
Device Drivers
Linux Core Kernel Commentary
Operating Systems Design and Implementation
I had previously bought these books on recommendation for the same purpose but I never got to studying them myself so only take them as second-hand advice.
I recommend you the BSD kernels! BSD kernels have far fewer hackers so following their evolution is easier. Either BSD and Linux kernels have great hackers, but some people argue that BSD lower fame filters out novice ones. Also taking design decisions is easier when the sources are not being updated 100 times a day.
Among the BSD choices, my favorite one is NetBSD. It might not be the pain-free choice you want for your desktop, but because it has a strong focus on portability, the quality is quite good. I think this part say it all:
Some systems seem to have the philosophy of “If it works, it's right”. In that light NetBSD's philosophy could be described as “It doesn't work unless it's right”
If you have been working long enough, you will know that NetBSD is a quite joy for learning good coding. Although professionally you will find more chances with Linux
Whichever choice you take, start joining their mail lists, follow the discussions. Study some patches and finally try to do your own bug-fixing. Regarding books, search for Diomidis Spinellis articles and his book. It is not exactly a kernel book, but has NetBSD examples and helps a lot to tackle large software.
Noting the lack of BSDs here, I figured I'd chip in:
The Design and Implementation of the FreeBSD Operating System (dead-tree book)
Unix and BSD Courses (courses and videos)
FreeBSD Architecture Handbook (online book)
I haven't taken any of the courses myself, but I've heard Marshall Kirk McKusick speak on other occasions, and he is really good at what he does.
And of course the BSD man pages, which are an excellent resource as they are maintained to a far greater extent than your average Linux man-page. Take for instance the uvm(9) man-page, describing the virtual memory interface in OpenBSD.
Not quite related, but I'll also recommend the video History of the Berkeley Software Distributions as it gives a nice introduction to the BSD parts of the UNIX history and culture as well as plenty of hilarious anectodes from back when.
There's no substitute for diving into the code. Try to find a driver or subsystem that you're interested in and poke around with it. With tools like VMware Workstation it's super easy to make whatever changes you want, snapshot the VM, and run your modified kernel. If the kernel panics on boot, who cares? Just jump back to the snapshot and fix the problem.
For books, I strongly recommend Linux Kernel Development by Robert Love. It's a wonderfully written book -- lots of information, organized sanely, and humorous... not dry reading at all.
Take Mike Stone's advice and start with Minix. That's what Linus did! The textbook is really well written, and Tannenbaum does a great job of showing how the various features are implemented in a real system.
Nobody seems to have mentioned that code-wise BSD is much cleaner and more consistent. The documentation's way better too (as already mentioned). But since there's a whole lot of fiddling with whatever system you choose - I'd pick the one you use more often.
Linux and Minix are fun to learn. If you also want to learn how a modern micro-kernel operating system looks like, you can look at QNX. The complete documentation is available online and it is very accessible. For example, this online book.
When I was at uni I spent a semester studying operating systems, and as part of this had an assignment where we had to implement a RAM-based filesystem in Linux.
It was a fantastic way to get to understand the internals of the Linux keurnel and to get a grasp on how everything fits together - And a heck of a lot of fun playing around with how it interacts with standard tools too.
I haven't tried it myself, but you can go to Linux From Scratch and start building your own Linux distribution. Sounds like something that'll take a junkload of time, but will result in an intimate knowledge of the guts of the Linux kernel and how each part works. Of course, you can supplement this learning by following any of the other tips here.

Resources