Jump to content

Beginner 6502 Assembly Stuff 0.0.4

   (0 reviews)

1 Screenshot

About This File

This may be of interest to absolute 6502 assembly beginners like me, although advanced 6502 programmers may cringe at the way I've done things here! This program does very little, but it is a repository of useful assembly routines for things like printing different bytes of memory (useful for debugging) as well as some basic math operations. I will keep adding to this as I progress through my assembly journey (I'm aiming to write my fractal BASIC programs in assembly).

Thanks to the following YouTubers for their excellent tutorials on all things 6502: 

Ben Eater - YouTube

Matt Heffernan - YouTube

ChibiAkumas - YouTube (and also his excellent website: Assembly Tutorials: Learn 6502 Assembly Programming... With ChibiAkumas!)

Function usage: (notation for cc65 assembler)

   jsr print
.byte (list of PETSCII character codes to print, ending in a $0 byte)

   jsr println
.byte (list of PETSCII character codes to print, ending in a $0 byte)

   jsr print_mem
.word (start address of memory dump)

Set MEMDUMPLEN to the number of addresses you wish print_mem to display. 


What's New in Version 0.0.3   See changelog

Released

Added some functions including: 

print_dec 
print the contents of A as a decimal - adapted from the very useful: Number output in 6502 machine code - BeebWiki (mdfs.net)

print_dec_2c
2s complement of the above - accounts for negative numbers- print_mem updated to include this feature. 

neg_8
perform a 2s complement negate on the contents of A

Updated the print_mem function to include the decimal representation of the byte in memory. 


try_it

Yes

try_it_start_prg

MATH16.PRG
 Share


User Feedback

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
×
×
  • Create New...

Important Information

Please review our Terms of Use