[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DGR...



 
> The only thing of note is that you've defined plot in two places as a label so you'd want to use a different label for a local label vs. a firmware routine. 

I do that a lot.  It is more to show a general pointer to use with the monitor assembler, for where the branch goes but the actual label is not needed, and not an external program assembler


> Otherwise I see what you'd doing to use the carry bit to detect odd/even (but does your method work?

It seems to work only in applesoft

10 GR : POKE 49246,0 : GR
20 COLOR = 1
30 FOR I=0TO79 : PLOT I,0: NEXT

There is no bank changing to AUX and back with either $C054/$C055 or $C004/$C005.  So it is not as simple as jumping to the plot routine at $F800.


>  Why is the stack used and why shift twice?

You are right. the stack did not need to be used as the TAY preserved the first shift of the ACC.

The first LSR would be used to divide the HOR line by 2 to get 0-39 from 0-79
The second LSR would be used to get the odd or even columns for the bank switching

But as noted above, bank switching is not needed directly in applesoft.  Which probably means the applesoft PLOT command handles the bank changes before jumping to the routine at $F800.

This might be worth further investigation.

Also might need to note, this is done on a IIGS.  I do not know if the applesoft program above would work on a IIe or enhanced IIe.

Rob