LearnSCADA Books
All books
Cover of Learn BASIC and Assembly on the 6502

Learn BASIC and Assembly on the 6502

How Computers Work, from Your First PRINT to Machine Code

Coming soon

Learn BASIC and Assembly on the 6502

How Computers Work, from Your First PRINT to Machine Code

Type a line, press Enter, and the computer answers. That is where this book starts, and by the last page you will be writing machine code and running an operator screen for a water treatment plant.

Learn BASIC and Assembly on the 6502 teaches programming the way it was first learned by millions of people: on an 8-bit computer simple enough to understand completely. Every program in the book runs on the LearnSCADA 6502 BASIC Emulator, a desktop emulator built on Microsoft BASIC for the 6502, the same language that shipped on the home computers that started the personal computing age. Nothing is assumed. If you have never written a line of code, you will be at home from the first chapter.

The book moves in seven parts, each building on the one before:

Hello, Computer. Direct mode, your first program, variables, and asking the user questions with INPUT and GET.

Decisions and Repetition. IF and THEN, FOR and NEXT loops, random numbers, games of chance, and subroutines.

Working with Data. Strings, arrays and tables, READ and DATA, math functions, and sorting and searching.

How a Computer Works. Binary, hexadecimal, memory and addresses, logic gates, an adder built from gates, and the registers, buses, and instruction cycle inside the 6502.

The Screen Is Your Canvas. Screen memory, block graphics, animation, keyboard control, sound, and timing.

Assembly Language. The stack, machine code, and writing your own new commands into BASIC.

SCADA and Modbus. What industrial control systems do, how Modbus lets equipment talk, and how to turn the 6502 into a live operator screen for a water plant, using the commands you built yourself.

Every chapter ends with a summary and exercises, with answers to selected exercises in the back. The emulator is free with a LearnSCADA membership at learnscada.com.

Whether you are a young adult writing your first program, a parent learning alongside a student, or a technician who wants to know what really happens inside a processor, this book takes you from your first PRINT statement to the bare metal and back out into the plant.

Author
Charles Vance
Category
Programming

Also in Programming