From c1c102291c130d6e50916aab665cd5f3d93d2c8a Mon Sep 17 00:00:00 2001 From: "Michael C. Martin" Date: Wed, 23 May 2012 17:15:10 -0700 Subject: [PATCH] Remove the deprecated and incomplete compatibility mode for Perl65. --- doc/docbook/cmdref.sgm | 27 --------------------------- src/Ophis/Main.py | 7 ------- src/Ophis/OldPragmas.py | 28 ---------------------------- 3 files changed, 62 deletions(-) delete mode 100644 src/Ophis/OldPragmas.py diff --git a/doc/docbook/cmdref.sgm b/doc/docbook/cmdref.sgm index 5c3d557..d052970 100644 --- a/doc/docbook/cmdref.sgm +++ b/doc/docbook/cmdref.sgm @@ -447,32 +447,5 @@ macro definition intends to read. A shorthand for .invoke is the name of the macro to invoke, backquoted. - - The following directives are deprecated, added for - compatibility with the old Perl - assembler P65. Use - the -d option to Ophis to enable - them. - - - .ascii: Equivalent to .byte, - which didn't used to be able to handle strings. - .code: Equivalent to .text. - .segment: Equivalent to .text, - from when there was no distinction between .text and - .data segments. - .address: Equivalent to - .word. - .link filename address: Assembles - the file specified as if it began at the address specified. - This is generally for use in top-level files, where there - is not necessarily a one-to-one correspondence between file - position and memory position. This is equivalent to an - .org directive followed by an .include. - With the introduction of the .org directive this one is - less useful (and in most cases, any .org statement - you use will actually be at the top of the .included - file). - diff --git a/src/Ophis/Main.py b/src/Ophis/Main.py index 46ed086..6cc43f4 100644 --- a/src/Ophis/Main.py +++ b/src/Ophis/Main.py @@ -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) diff --git a/src/Ophis/OldPragmas.py b/src/Ophis/OldPragmas.py deleted file mode 100644 index ca0ae41..0000000 --- a/src/Ophis/OldPragmas.py +++ /dev/null @@ -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))