From 3957a92f44fd7832f089cd5859f72dfb0aa7fa0f Mon Sep 17 00:00:00 2001 From: Paul Gardner-Stephen Date: Wed, 24 Apr 2019 12:48:45 +0930 Subject: [PATCH] add more explanations of byte sequences --- strings/488A489848 | 15 +++++++++++++++ strings/68A868AA | 5 +++++ strings/68A868AA6840 | 16 ++++++++++++++++ strings/820260 | 5 +++++ strings/840260 | 5 +++++ strings/8A489848 | 15 +++++++++++++++ strings/A868AA6840 | 16 ++++++++++++++++ strings/B00320 | 11 +++++++++++ strings/B0034C | 10 ++++++++++ strings/F0034C | 10 ++++++++++ 10 files changed, 108 insertions(+) create mode 100644 strings/488A489848 create mode 100644 strings/68A868AA create mode 100644 strings/68A868AA6840 create mode 100644 strings/820260 create mode 100644 strings/840260 create mode 100644 strings/8A489848 create mode 100644 strings/A868AA6840 create mode 100644 strings/B00320 create mode 100644 strings/B0034C create mode 100644 strings/F0034C diff --git a/strings/488A489848 b/strings/488A489848 new file mode 100644 index 00000000..9d3cbe70 --- /dev/null +++ b/strings/488A489848 @@ -0,0 +1,15 @@ +Preserve registers on stack + +This is the standard form of saving the A X and Y registers on the stack + +PHA +TXA +PHA +TYA +PHA + +See, for example: + +http://6502.org/tutorials/register_preservation.html + +Not copyrightable. diff --git a/strings/68A868AA b/strings/68A868AA new file mode 100644 index 00000000..840186cf --- /dev/null +++ b/strings/68A868AA @@ -0,0 +1,5 @@ +PLA / TAY / PLA / TAX sequence + +This is a common sequence for restoring registers from the stack. +It is a fragment of the reverse of pushing the registers A X and Y +in alphabetic order. Not copyrightable. diff --git a/strings/68A868AA6840 b/strings/68A868AA6840 new file mode 100644 index 00000000..58b80c5c --- /dev/null +++ b/strings/68A868AA6840 @@ -0,0 +1,16 @@ +End of interrupt restore registers and resume sequence + +This is the standard form of returning from an interrupt on a 6502: + +PLA +TAY +PLA +TAX +PLA +RTI + +See, for example: + +http://6502.org/tutorials/register_preservation.html + +Not copyrightable. diff --git a/strings/820260 b/strings/820260 new file mode 100644 index 00000000..699666b7 --- /dev/null +++ b/strings/820260 @@ -0,0 +1,5 @@ +tail end of access to $0282, followed by RTS + +This small fragment is a return from subroutine, where +the last thing the subroutine does is access memory location $0282. +This is not copyrightable. diff --git a/strings/840260 b/strings/840260 new file mode 100644 index 00000000..b2fa208a --- /dev/null +++ b/strings/840260 @@ -0,0 +1,5 @@ +tail end of access to $0284, followed by RTS + +This small fragment is a return from subroutine, where +the last thing the subroutine does is access memory location $0284. +This is not copyrightable. diff --git a/strings/8A489848 b/strings/8A489848 new file mode 100644 index 00000000..9d3cbe70 --- /dev/null +++ b/strings/8A489848 @@ -0,0 +1,15 @@ +Preserve registers on stack + +This is the standard form of saving the A X and Y registers on the stack + +PHA +TXA +PHA +TYA +PHA + +See, for example: + +http://6502.org/tutorials/register_preservation.html + +Not copyrightable. diff --git a/strings/A868AA6840 b/strings/A868AA6840 new file mode 100644 index 00000000..58b80c5c --- /dev/null +++ b/strings/A868AA6840 @@ -0,0 +1,16 @@ +End of interrupt restore registers and resume sequence + +This is the standard form of returning from an interrupt on a 6502: + +PLA +TAY +PLA +TAX +PLA +RTI + +See, for example: + +http://6502.org/tutorials/register_preservation.html + +Not copyrightable. diff --git a/strings/B00320 b/strings/B00320 new file mode 100644 index 00000000..b6551cbc --- /dev/null +++ b/strings/B00320 @@ -0,0 +1,11 @@ +Branch over following JSR instruction +A branch with argument $03 skips the following 3 bytes. +A JSR instruction has the initial byte value of $20. +Therefore $F0 $XX $20 is part of a +Bxx + +JSR $xxxx +* + +instruction sequence. +This is a very common construction, and the logical way to +conditionally call a routines, and therefore is not copyrightable. diff --git a/strings/B0034C b/strings/B0034C new file mode 100644 index 00000000..eae67630 --- /dev/null +++ b/strings/B0034C @@ -0,0 +1,10 @@ +Jump conditionally + +Conditionally take a JMP + +Bxx + +JMP $xxxx +* + +This is a very common instruction sequence. +Not copyrightable. diff --git a/strings/F0034C b/strings/F0034C new file mode 100644 index 00000000..eae67630 --- /dev/null +++ b/strings/F0034C @@ -0,0 +1,10 @@ +Jump conditionally + +Conditionally take a JMP + +Bxx + +JMP $xxxx +* + +This is a very common instruction sequence. +Not copyrightable.