Hacker News new | ask | show | jobs
by joezydeco 2491 days ago
Yeah the moment they introduced a ROM call to optimize the routine, I kind of lost interest.
1 comments

Why? The memory layout of the text page would have also been c64 specific.
Because the article was titled "dirty 6502 tricks" and not "dirty C64 tricks".

If the article was more about hidden opcodes or instruction set side effects, that's great. But if the key to shaving 8 bytes out of the routine was calling a 120-byte function that's free in the ROM, there's no real trick to 6502 programming being revealed.

It's the equivalent of a blog post titled "I wrote a web server in 3 lines of code!" and the author calls .start() in some imported framework that contains 250,000 lines of code.

True. But in his defense, once you want to put text on the screen, you’re already using implementation defined behavior. Like I said in another reply, the character to memory location mapping is different between for instance the C64 and the Apple //e.

The Apple //e would have had a text scrolling function in ROM.

It's a grid of 24 rows (or is it 25?) of 40 bytes, top to bottom, left to right, one byte per char... not exactly uncommon for character mapped displays.
That wasn’t how the Apple II stored characters. The memory didn’t map contiguously to screen positions where you could calculate the character position using $400+x+y*40.