6502.org http://forum.6502.org/ |
|
[49] 6502 RISC - What a chip! http://forum.6502.org/viewtopic.php?f=7&t=306 |
Page 1 of 1 |
Author: | JIM1831 [ Tue Apr 25, 2000 3:43 pm ] |
Post subject: | [49.1] 6502 RISC - What a chip! |
I happened to be poking around the 'net looking up info about an old friend, the 6502. I have read most of the 6502-related stuff and find it interesting that, depending on your age, everyone has a different perspective on this. I got involved in the Apple II in HS (1978). I didn't touch assembler programming until I got in college. I wrote my own assembler for the 6502-chip by writing a full-screen editor (with move subroutines in native machine code - page x'0300') for speed. Then I wrote a BASIC program that would assemble (product object code). Eventually, after I got the bugs worked out (it took about 5 compiles with each running about 1/2 hour - slow disk times) and then used this assembler (assembled with the BASIC assembler) as my new assembler. Once you get a limited-function assembler, you can then grow your functionality. Kind of incestuous but still pretty neat. After writing this, I moved some important storage to zero page and what a HUGE difference the 2 machine cyles per access made! Being a Wozniak-phile, I brutalized the code so it was as fast as could be made. It taught me a lot about bit manipulation (which is the final step in becoming a very good assembler coder). Eventually, I used the RWTS Apple II subroutine to write my own disk directory search and disk read routines (to read a standard ASCII file without the DOS services. I LOVED the 6502 design; the addressing modes, the accumulator, carry flags, SED, etc. Interestingly, if you ever get a chance to view Wozniak's original monitor, there is a routine called NXTA2 that cryptically sets multiple condition codes while incrementing a 2-byte pointer. What a tour-de-force. Or check out his BASCALC routine for driving the video storage base addresses. Thanks for listening to this rambling. Jim Lewandowski |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |