more documentation of similarities and avoiding them where practicable.
This commit is contained in:
1 parent
035b386f6c
commit
7448909da8
17 files changed
+161
-12
No files matched your search
@@ -0,0 +1,5 @@
|
||||
CLC / ADC #40 / STA $nn
|
||||
|
||||
Add 40 to a ZP location. No creativity here.
|
||||
Effectivelhy only one insstruction.
|
||||
Not copyrightable.
|
||||
@@ -0,0 +1,4 @@
|
||||
string "BASIC "
|
||||
|
||||
Since we are writing a BASIC language interprettor, such a string is expected.
|
||||
BASIC appears in many other works. It cannot be copyrighted as a word.
|
||||
@@ -0,0 +1,8 @@
|
||||
String "BASIC V2"
|
||||
|
||||
As we are implementing a V2 class BASIC interprettor, it is
|
||||
natural for us to include this string.
|
||||
There are many BASIC intreprettors, and the word cannot be
|
||||
copyrighted, nor it is reasonable to contemplate that a party
|
||||
could be constrained from having a BASIC with version 2, or
|
||||
displaying that information anywhere. Not copyrightable.
|
||||
@@ -0,0 +1,7 @@
|
||||
RTS + LDA $028D
|
||||
|
||||
RTS is a very common instruction, as is loading A from absolute address.
|
||||
The RTS is the end of a routine, and the LDA $028D thus the start of
|
||||
another. Thus this would occur whenever a routine begins with loading
|
||||
A from $028D, immediately after another routine. Nothing creative.
|
||||
Not copyrightable.
|
||||
@@ -0,0 +1,3 @@
|
||||
Something with $0277 / INX
|
||||
|
||||
Only one whole instruction here. Not copyrightable.
|
||||
@@ -0,0 +1,3 @@
|
||||
something with $0286 / STA ($F3),Y
|
||||
|
||||
Only one whole instruction. Not copyrightable.
|
||||
@@ -0,0 +1,44 @@
|
||||
Copy screen + colour RAM to the right one place
|
||||
|
||||
This sequence of instructions:
|
||||
|
||||
loop:
|
||||
DEY
|
||||
LDA ($D1),Y
|
||||
INY
|
||||
STA ($D1),Y
|
||||
DEY
|
||||
LDA ($F3),Y
|
||||
INY
|
||||
STA ($F3),Y
|
||||
DEY
|
||||
CPY $D3
|
||||
BNE loop
|
||||
LDA #$20
|
||||
STA ($D1),Y
|
||||
|
||||
is the obvious any minimal way to copy the screen and colour RAM data.
|
||||
The constants $D1 and $F3 are fixed by the publicly documented interface
|
||||
of the KERNAL to point to the screen and colour RAM of the screen.
|
||||
|
||||
The Y register is the only register that can be used to post-increment an
|
||||
indirect address on the 6502.
|
||||
|
||||
Thus the only efficient manner to copy a string to the right one byte
|
||||
is to read, increment Y by one to get the destination address, store,
|
||||
then decrement Y again so that it points to the source offset, now read
|
||||
the colour RAM byte, add one to Y so that we point to the destination,
|
||||
and then write it.
|
||||
|
||||
Similarly the check against $D3 (current column of cursor on screen) is also
|
||||
necessary for working out when to terminate the loop. The storing of $20
|
||||
into the screen RAM is also required to effect the insertion of a space.
|
||||
|
||||
In fact, about the only variant possible would be to swap the $D1 and $F3
|
||||
constants so that the colour RAM is copied before the screen RAM in each
|
||||
loop, instead of after it.
|
||||
|
||||
It is telling that this routine was the result of independent implementation
|
||||
of this routine, without looking at the KERNALs routine, in terms of supporting
|
||||
the argument that the routine is the obvious manner in which to do this.
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
Copy screen + colour RAM to the right one place
|
||||
|
||||
This sequence of instructions:
|
||||
|
||||
loop:
|
||||
DEY
|
||||
LDA ($D1),Y
|
||||
INY
|
||||
STA ($D1),Y
|
||||
DEY
|
||||
LDA ($F3),Y
|
||||
INY
|
||||
STA ($F3),Y
|
||||
DEY
|
||||
CPY $D3
|
||||
BNE loop
|
||||
LDA #$20
|
||||
STA ($D1),Y
|
||||
|
||||
is the obvious any minimal way to copy the screen and colour RAM data.
|
||||
The constants $D1 and $F3 are fixed by the publicly documented interface
|
||||
of the KERNAL to point to the screen and colour RAM of the screen.
|
||||
|
||||
The Y register is the only register that can be used to post-increment an
|
||||
indirect address on the 6502.
|
||||
|
||||
Thus the only efficient manner to copy a string to the right one byte
|
||||
is to read, increment Y by one to get the destination address, store,
|
||||
then decrement Y again so that it points to the source offset, now read
|
||||
the colour RAM byte, add one to Y so that we point to the destination,
|
||||
and then write it.
|
||||
|
||||
Similarly the check against $D3 (current column of cursor on screen) is also
|
||||
necessary for working out when to terminate the loop. The storing of $20
|
||||
into the screen RAM is also required to effect the insertion of a space.
|
||||
|
||||
In fact, about the only variant possible would be to swap the $D1 and $F3
|
||||
constants so that the colour RAM is copied before the screen RAM in each
|
||||
loop, instead of after it.
|
||||
|
||||
It is telling that this routine was the result of independent implementation
|
||||
of this routine, without looking at the KERNALs routine, in terms of supporting
|
||||
the argument that the routine is the obvious manner in which to do this.
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
something with $028D / CMP #$03 / BNE somewhere
|
||||
|
||||
Only one whole instruction. Nothing creative.
|
||||
Not copyrightable.
|
||||
@@ -0,0 +1 @@
|
||||
STA $028C / LDA #$0E / STA $0286 / LDA
|
||||
@@ -0,0 +1,3 @@
|
||||
Use X register to compare contents of a ZP and absolute address location
|
||||
|
||||
Nothing copyrightable here in this simple comparison of memory contents.
|
||||
@@ -0,0 +1,4 @@
|
||||
LDA ($D1),Y / CMP #$20
|
||||
|
||||
Compare a byte read from a pointer with a specific value.
|
||||
No creativity here. Not copyrightable.
|
||||
@@ -0,0 +1,3 @@
|
||||
Fragment / CMP #$11 / BNE somewhere
|
||||
|
||||
Only one whole intruction here. Not copyrightable.
|
||||
@@ -0,0 +1,3 @@
|
||||
Fragment / CMP #$13 / BNE somewhere
|
||||
|
||||
Only one whole intruction here. Not copyrightable.
|
||||
Reference in new issue
Block a user