View Single Post
Old 1st Jun 2019, 7:55 pm   #12
Duke_Nukem's Avatar
Join Date: Jan 2003
Location: Birmingham, West Midlands, UK.
Posts: 1,174
Default Re: Fun with 6502 Assembler

This thread has made me feel very nostalgic, back to the days of my then shiny new Acorn Atom.

Disassembling the ROM taught me a lot and of course in them days finding subroutines you could make use of would save precious RAM in your own programs.

No printer for me back then, so it was all done by hand ! I've attached an extract, it illustrates how to do division - in those pre-internet pocket-money-wouldn't-cover-a-book days, how else would you learn ? It also illustrates another bit of ROM space saving, note the branch instruction near bottom of page jumps into the middle of an instruction, which happened to be #00 => BRK -> divide by zero error.

I'm sure I have a listing of some games I wrote, will see if I can find it. Back then there seemed to be two main camps, the 6502 brigade vs the Z80 brigade, if I could find my sprite plotting routines it would illustrate why the 6502, whose 3 little 8 bit registers** initially seems puney compared to the Z80's mighty selection of 8/16 bit registers was in fact better due to a better instruction set. There was also the unofficial op codes that did two things at once (some of which were actually useful).

Happy days. Set me up such that when I started work in 1984 as a hardware engineer I could also do the programming too (8051 - or 8039 on real bad days).


** I guess you could argue zero page RAM were another set of registers ...
Attached Thumbnails
Click image for larger version

Name:	sheets.jpg
Views:	74
Size:	40.0 KB
ID:	184299  
Attached Files
File Type: pdf Disassemble.pdf (606.8 KB, 38 views)
Duke_Nukem is offline   Reply With Quote