Search found 12 matches

by TheBrewThatIsTrue
Tue Sep 06, 2022 4:15 am
Forum: General Discussions
Topic: Discussion: What would be the point of a 65xx HAL?
Replies: 56
Views: 7272

Re: Discussion: What would be the point of a 65xx HAL?

According to CPU Shack:
Quote:
Back when the 6502 was introduced, RAM was actually faster than microprocessors, so it made sense to optimize for RAM access rather than increase the number of registers on a chip.
by TheBrewThatIsTrue
Sun Sep 04, 2022 3:02 pm
Forum: General Discussions
Topic: Discussion: What would be the point of a 65xx HAL?
Replies: 56
Views: 7272

Re: Discussion: What would be the point of a 65xx HAL?

"All problems in computer science can be solved by another level of indirection, except for the problem of too many layers of indirection." -- David John Wheeler
by TheBrewThatIsTrue
Tue Aug 30, 2022 10:42 pm
Forum: Programming
Topic: Zero page as registers or globals?
Replies: 28
Views: 6219

Re: Zero page as registers or globals?

I think it's a false dichotomy, recall that this was a time when hand assembly was still commonplace. Regardless of what the tools, or even the documentation called something, in the end what mattered to competent low-level programmers were the capabilities, affordances, and tradeoffs on offer from ...
by TheBrewThatIsTrue
Tue Aug 30, 2022 9:08 am
Forum: Programming
Topic: Flag to Mask Conversions
Replies: 16
Views: 4063

Re: Flag to Mask Conversions

Welcome, Mark! An interesting quest, to be sure. And rather jumping in at the deep end of deterministic runtime, to pick the 2600. But I look forward to seeing some ingenious ideas.

You might find the resources linked here useful, if any are new to you:
https://alienbill.com/2600/

And there's an ...
by TheBrewThatIsTrue
Tue Aug 30, 2022 8:04 am
Forum: Programming
Topic: Flag to Mask Conversions
Replies: 16
Views: 4063

Re: Flag to Mask Conversions

Nice! I use the HP-41cx regularly. It doesn't have as many computer-science functions as the 16c, but my Advantage module has the base conversions and boolean functions, 32-bit, which is adequate for me. There is another module that just came out in the last couple of years that does the 16c stuff ...
by TheBrewThatIsTrue
Tue Aug 30, 2022 6:20 am
Forum: Programming
Topic: Flag to Mask Conversions
Replies: 16
Views: 4063

Re: Flag to Mask Conversions

GARTHWILSON wrote:
Which HP calc is your avatar of?
It's an HP-16C Computer Scientist, bought it at Macy's in San Francisco in the early 80s.
by TheBrewThatIsTrue
Tue Aug 30, 2022 5:53 am
Forum: Programming
Topic: Flag to Mask Conversions
Replies: 16
Views: 4063

Re: Flag to Mask Conversions

The reason I'm keen on mask generators is that, in the display kernel of a 2600 game, I'd like to avoid branches wherever I can easily do so, since all control flow paths will need to be balanced to consume the exact same number of cycles, and ballasting branches is a pain. :)
by TheBrewThatIsTrue
Tue Aug 30, 2022 5:40 am
Forum: Programming
Topic: Flag to Mask Conversions
Replies: 16
Views: 4063

Re: Flag to Mask Conversions


What's the 00/FF thing for? [...]
In Forth-83 test/query words returned -1/0, Forth-79 and Fig-Forth used 1/0.
Although I'm not a fan of the later ANS-Forth, I adopted some of the controversial changes of '83, particularly the -1/0 test results and the use of floored division.

As to why -1/0 is ...
by TheBrewThatIsTrue
Tue Aug 30, 2022 4:43 am
Forum: Programming
Topic: Flag to Mask Conversions
Replies: 16
Views: 4063

Re: Flag to Mask Conversions

Below is an example where I'm using the result of a comparison as a mask for the subsequent AND.


Preload Player Graphics.

98 tya (2)x3 @ dk.000*.090-095
N.B. clc rather than sec.
18 clc (2)x3 @ dk.000*.096-101
e587 sbc SRAM_P0_Y (3)x3 @ dk.000*.102-110
c5a7 cmp CRAM_P0_HEIGHT (3)x3 @ dk.000 ...
by TheBrewThatIsTrue
Tue Aug 30, 2022 4:31 am
Forum: Programming
Topic: Flag to Mask Conversions
Replies: 16
Views: 4063

Re: Flag to Mask Conversions

Welcome.

I always welcome new tricks, but I can't imagine you'll be able to do this quite the way you had hoped. C is the only flag you can do this kind of thing with, so without conditional branches or tables, you're probably confined to PHP, PLA, and shifting the desired position into the C flag ...
by TheBrewThatIsTrue
Tue Aug 30, 2022 3:47 am
Forum: Programming
Topic: Flag to Mask Conversions
Replies: 16
Views: 4063

Re: Flag to Mask Conversions

Welcome, Mark, and congratulations on ending your very long hiatus!

Here are two possible approaches. I'm pretty sure I understand what we're trying to achieve. But I'm less sure I've gotten all the details correct, as it's late and I'm getting sleepy! Maybe this will at least help you get started ...
by TheBrewThatIsTrue
Tue Aug 30, 2022 1:32 am
Forum: Programming
Topic: Flag to Mask Conversions
Replies: 16
Views: 4063

Flag to Mask Conversions

Greetings,

I spent a couple of enjoyable hours reading through some of this boards threads last night. This is my first post.

I have recently returned to 65xx assembly after a very long hiatus (my last time was in the early 80s).

For the heck of it (and to keep my mind sharp), my first foray ...