How to Code a 6502 Emulator in Python Part 6

Published: 22 October 2025
on channel: TokyoEdtech
302
12

Welcome to Part 6!

In this video, I will show you how to implement the CMP command. The CMP command compares an 8-bit value to the value in the accumulator. Depending on whether or not the value is equal, greater than, or less than the value in the accumulator, various CPU flags are set. In the video I add the negative and equal flags. If the value in the accumulator is negative (8-bit signed), then the negative flag is set.

I originally wanted to also do branching, but decided to save that for the next video.

To follow along, download the Starter Code Here: https://github.com/wynand1004/6502_Em...

📖 DOWNLOAD my FREE Intro to Python eBook here: https://drive.google.com/file/d/1ajYJ...
📖 DOWNLOAD my FREE Intro to Java eBook here: https://drive.google.com/file/d/1c4Nl...

NEED HELP?
🆘 If you need help, please copy and paste your code into a comment along with any error messages. I'll take a look when I'm able and get back to you.

LINKS
🗄️ GITHUB: https://github.com/wynand1004
💬 Follow me on Twitter: https://x.com/tokyoedtech
📝 Check out my Blog: https://christianthompson.com
⬇️ Download Geany Editor: https://www.geany.org

LEARN MORE PYTHON
➡️Space Invaders:    • Python Game Programming Tutorial: Space In...  
➡️Snake Game:    • Python Game Programming Tutorial: Snake Ga...  
➡️Pong:    • Python Game Programming Tutorial: Pong Par...  
➡️Space War:    • Python Game Programming Tutorial: SpaceWar 1  
➡️Intro to Python (for Java Coders):    • Intro to Python for Java Coders: Comments ...  
➡️Space Arena - The Ultimate Python Turtle Graphics Game Tutorial:    • Ultimate Python Turtle Graphics Tutorial: ...  

LEARN MORE JAVA
➡️Basic Java for Beginners:    • Basic Java 1&2: Comments and Printing  
➡️Intro to AP Computer Science A:    • AP Computer Science Unit 1: Primitive Types  

#Python #6502 #retrocomputing


On this page of the site you can watch the video online How to Code a 6502 Emulator in Python Part 6 with a duration of hours minute second in good quality, which was uploaded by the user TokyoEdtech 22 October 2025, share the link with friends and acquaintances, this video has already been watched 302 times on youtube and it was liked by 12 viewers. Enjoy your viewing!