Remove the deprecated and incomplete compatibility mode for Perl65.

This commit is contained in:
Michael C. Martin 2012-05-23 17:15:10 -07:00
parent 1df8ad465d
commit c1c102291c
3 changed files with 0 additions and 62 deletions

View File

@ -447,32 +447,5 @@
macro definition intends to read. A shorthand for <literal>.invoke</literal>
is the name of the macro to invoke, backquoted.</para></listitem>
</itemizedlist>
<para>
The following directives are deprecated, added for
compatibility with the old Perl
assembler <command>P65</command>. Use
the <literal>-d</literal> option to Ophis to enable
them.
</para>
<itemizedlist>
<listitem><para><literal>.ascii</literal>: Equivalent to <literal>.byte</literal>,
which didn't used to be able to handle strings.</para></listitem>
<listitem><para><literal>.code</literal>: Equivalent to <literal>.text</literal>.</para></listitem>
<listitem><para><literal>.segment</literal>: Equivalent to <literal>.text</literal>,
from when there was no distinction between <literal>.text</literal> and
<literal>.data</literal> segments.</para></listitem>
<listitem><para><literal>.address</literal>: Equivalent to
<literal>.word</literal>.</para></listitem>
<listitem><para><literal>.link</literal> <emphasis>filename address</emphasis>: Assembles
the file specified as if it began at the address specified.
This is generally for use in <quote>top-level</quote> files, where there
is not necessarily a one-to-one correspondence between file
position and memory position. This is equivalent to an
<literal>.org</literal> directive followed by an <literal>.include</literal>.
With the introduction of the <literal>.org</literal> directive this one is
less useful (and in most cases, any <literal>.org</literal> statement
you use will actually be at the top of the <literal>.include</literal>d
file).</para></listitem>
</itemizedlist>
</section>
</appendix>

View File

@ -11,7 +11,6 @@ import sys
import Ophis.Frontend
import Ophis.IR
import Ophis.CorePragmas
import Ophis.OldPragmas
import Ophis.Passes
import Ophis.Errors as Err
import Ophis.Environment
@ -27,7 +26,6 @@ def usage():
print "Options:"
print "\t-6510 Allow 6510 undocumented opcodes"
print "\t-65c02 Enable 65c02 extensions"
print "\t-d Allow deprecated pragmas"
print "\t-v n Set verbosity to n (0-4, 1=default)"
sys.exit(1)
@ -87,8 +85,6 @@ def run_ophis():
chip_extension = Ophis.Opcodes.undocops
elif x == '-65c02':
chip_extension = Ophis.Opcodes.c02extensions
elif x == '-d':
p65_compatibility_mode = 1
else:
print "FATAL: Unknown option "+x
usage()
@ -110,9 +106,6 @@ def run_ophis():
Ophis.Frontend.pragma_modules.append(Ophis.CorePragmas)
if p65_compatibility_mode:
Ophis.Frontend.pragma_modules.append(Ophis.OldPragmas)
if chip_extension is not None:
Ophis.Opcodes.opcodes.update(chip_extension)

View File

@ -1,28 +0,0 @@
"""P65-Perl compatibility pragmas
Additional assembler directives to permit assembly of
old P65-Perl sources. This is not, in itself, sufficient,
as the precedence of < and > vs. + and - has changed
between P65-Perl and Ophis.
Supported pragmas are: .ascii (byte), .address (word),
.segment (text), .code (text), and .link."""
# Copyright 2002-2012 Michael C. Martin and additional contributors.
# You may use, modify, and distribute this file under the MIT
# license: See README for details.
import Ophis.CorePragmas as core
pragmaAscii = core.pragmaByte
pragmaAddress = core.pragmaWord
pragmaSegment = core.pragmaText
pragmaCode = core.pragmaText
def pragmaLink(ppt, line, result):
"Load a file in a precise memory location."
filename = line.expect("STRING").value
newPC = FE.parse_expr(line)
line.expect("EOL")
result.append(IR.Node(ppt, "SetPC", newPC))
if type(filename)==str: result.append(FE.parse_file(ppt, filename))