Let's learn together.

As a teen in the 80s, I had an interest in computer programming. The only computers I had access to was TRS-80 Model IIIs, a few Commodore 64s, and a few Apple IIs at school. Computers were fairly expensive back then, so there was little oppurtunity for me to own my own computer. My dad's car cost less than many computers of the day.

So, I graduated high school. Started working in local resturaunts in Branson, Missouri. My interests gradually diverged from the 8-bit computers of the day. In the late 90s, something happened that renewed my interest in owning a computer. I got a girlfriend who wanted to e-mail, mySpace, and ICQ with me.

I started looking for computers. They weren't terribly cheap, even then, but the computers of the 90s were a little less expensive than the 8-bit beasts of the 80. They were orders of magnitude more capable than the 80s models too. So, I bought an IBM Aptiva from a catalog. Ever since, I've been online.

Long story short, I've renewed an interest in programming as a hobby. My true passion back in the 80s was programming in BASIC. Nowadays, there are a few BASIC interpreters and compilers available. I've used some of them. FreeBASIC is probably my favorite. However, I'm looking again at assembly. Back in the 80s, I learned a little Z80 assembly. I did get my hands on a Timex Sinclair 1000 and was able to do some work on it with Z80 assembly. However, that particular machine was terribly inadequate.

I'm am now interested in X86_64 assembly. I have already written a few programs and I think I will like learning more about this language.

The purpose of this blog is for me to write a tutorial of the language as I am learning it. So, you can learn with me, if you want to.

First off, I am learning in Linux. Believe it or not, I am using a Chromebook. ChromeOS is a real deal Linux, but it is not designed to be a developement environment. It does have a feature called Crostini, though. Crostini is a container or VM that can run Linux and Linux programs. It ships with Debian which is an excellent distro for programming. It has a decent terminal. We are going to do almost everything in the terminal.

Here's what you'll need and how to install it.

  • The Assembler. I'm using NASM. It's free. Everything we use is free. FASM is also another free assembler that might be worth looking into.
    To install it on Debian or Ubuntu, enter this in the terminal.
    sudo apt install nasm
  • A C compiler suite. There are two of them that I use. TCC and GCC.
    You'll only need one, GCC really. They are all free and work very well.
    Install them like this.
    sudo install gcc
    sudo install tcc
  • The linker. If you installed GCC, you have it. Also, if you install GCC, you'll get another assembler called GAS. We might get into it a little. It has a different syntax to NASM.
Also, you'll need a plain text editor. There are many. In the terminal you got nano, emacs and vim. I think nano is the easiest, that's what I use. They'll all work fine. There are a lot of graphical editors. Just be sure that the files are saved as plain text files and not some word processor format. That's it for now.

Comments

Popular posts from this blog

The Dumbest Program in the World! Lesson 1