Skip to content

Programming by Design

If you're not prepared to be wrong, you'll never come up with anything original. – Sir Ken Robinson

  • About
  • Java-PbD
  • C-PbD
  • ASM-PbD
  • Algorithms
  • Other

Category: AsmBook

Chapter x86_64-1 – The IDE

Posted on February 18, 2025February 19, 2025 By William Jojo
AsmBook

(Updated February 18, 2025) Table of Contents What is and IDE? Hello World A Bigger Example What is an IDE? An Integrated Development Environment, or IDE, is typically a graphical user interface with an editor, compiler, debugger, and much more at your fingertips. One possible IDE combination is Visual Studio Code with x86 and x86 … Read More “Chapter x86_64-1 – The IDE” »

Chapter x86_64-0 – Where to Begin?

Posted on February 18, 2025February 18, 2025 By William Jojo
AsmBook

(Updated February 18, 2025) Table of Contents Starting Out With Newer Tech The Intel x86 References Starting Out With Newer Tech Hopefully, you’ve arrived here after explaining the first half of this textbook, which is based on the MOS 6502. If you skipped ahead because this is really what you’re interested in, don’t worry. You … Read More “Chapter x86_64-0 – Where to Begin?” »

Chapter 6502-A – 8-, 16-, and 32-bit Printing.

Posted on February 9, 2025April 22, 2025 By William Jojo
AsmBook

(Updated April 22, 2025) signed8bit.asmLoad Workspace ; This is the start of the 8-bit library. define CHROUT $ffd2 define LZF $30 ; This is test code for the 8-bit printing LDY #0 NUMLOOP: LDA NUMBERS,Y STA $31 ; LSB PHA ; SAVE JSR S8OUT ; PRINT AS SIGNED LDA #7 ; ‘\t’ JSR CHROUT PLA … Read More “Chapter 6502-A – 8-, 16-, and 32-bit Printing.” »

Chapter 6502-6 – Numbers and Math

Posted on February 8, 2025February 18, 2025 By William Jojo
AsmBook

(Updated February 18, 2025) Table of Contents Overview Printing Numbers – Part I Bigger Numbers Bigger Math Printing Numbers – Part II Overview In previous chapters, we’ve glossed over details on numbers and mathematics. This is simply because math on this CPU is hard. Remember that all we can do is add. Even subtraction is … Read More “Chapter 6502-6 – Numbers and Math” »

Chapter 6502-5 – Beyond the Basics

Posted on August 4, 2024February 15, 2025 By William Jojo
AsmBook

(Updated February 15, 2025) Table of Contents Multi-way If Test Arrays Subroutines Self-modifying Code Multi-way If Test We will use the following code to demonstrate several features once used on the 6502. Example1.asmLoad Workspace define CHROUT $FFD2 start: jsr printres lda #$65 sec sbc #$84 beq printzero bvs printovf bmi printneg bpl printpos end: brk … Read More “Chapter 6502-5 – Beyond the Basics” »

Chapter 6502-4 – The Basics

Posted on August 3, 2024February 15, 2025 By William Jojo
AsmBook

(Updated February 15, 2025) Table of Contents Moving Data Simple Math Compare and Branch Overflow Moving Data While this is a 16-bit addressable space, we can only perform operations 8 bits at a time because our registers are also 8-bit wide. As such, working with 16-bit or 32-bit quantities means some code repetition. Let’s begin … Read More “Chapter 6502-4 – The Basics” »

Chapter 6502-3 – The Assembler

Posted on June 7, 2024February 7, 2025 By William Jojo
AsmBook

(Updated February 7, 2025) Table of Contents Programs The Assembler Breakdown Features Errors Programs Let’s take a 10,000-foot tour. Our IDE has a form of compiler called an assembler. That is because it assembles the mnemonics, addresses, names, and such for a given CPU and translates it to machine code. In comparison, a compiler translates … Read More “Chapter 6502-3 – The Assembler” »

Chapter 6502-2 – Basic CPU Architecture

Posted on June 7, 2024January 19, 2025 By William Jojo
AsmBook

(Updated July 16, 2024) Table of Contents Physical Details Registers Instructions Addressing Modes Physical Details The MOS 6502 was originally released as a 40-pin dual-inline package (DIP-40) in both plastic and ceramic. The pins connect to locations inside the packaging and onto the CPU die with tiny filaments. Each pin represents a signal in the … Read More “Chapter 6502-2 – Basic CPU Architecture” »

Chapter 6502-1 – The IDE

Posted on June 5, 2024January 20, 2025 By William Jojo
AsmBook

(Updated January 20, 2025) Table of Contents What is and IDE? Hello World A Bigger Example What is an IDE? An Integrated Development Environment, or IDE, is typically a graphical user interface with an editor, compiler, debugger, and much more at your fingertips. During the 6502 era, the idea of having a full-featured development environment … Read More “Chapter 6502-1 – The IDE” »

Chapter 6502-0 – Where to Begin?

Posted on June 3, 2024February 18, 2025 By William Jojo
AsmBook

(Updated February 18, 2025) Table of Contents Starting Out With Old Tech The MOS 6502 References Starting Out With Old Tech The tech we’re talking about here is the MOS 6502. Why choose an old CPU such as this? It’s a good place to begin since the CPU is so primitive that we can easily … Read More “Chapter 6502-0 – Where to Begin?” »

Posts pagination

1 2 Next

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Copyright © 2018 – 2025 Programming by Design.