Assembler begonnen
This commit is contained in:
14
projects/06/Asm/Assembler.py
Normal file → Executable file
14
projects/06/Asm/Assembler.py
Normal file → Executable file
@@ -1,9 +1,11 @@
|
||||
#!/usr/bin/python3
|
||||
import sys
|
||||
from Parser import *
|
||||
|
||||
|
||||
class Assembler:
|
||||
def __init__(self):
|
||||
pass
|
||||
class Assembler(object):
|
||||
def __init__(self,parser):
|
||||
parser.bin_ich_zu_sehen()
|
||||
|
||||
'''
|
||||
Statische Methoden zeichnen sich dadurch aus, dass ihnen kein Parameter übergeben,
|
||||
@@ -14,6 +16,7 @@ class Assembler:
|
||||
#def getfile(file):
|
||||
|
||||
def assemblefile(self, file):
|
||||
|
||||
pass
|
||||
|
||||
|
||||
@@ -24,8 +27,9 @@ class Assembler:
|
||||
if __name__ == '__main__':
|
||||
|
||||
inputfile = sys.argv[1]
|
||||
hackasm = Assembler()
|
||||
hackasm.assemblefile(inputfile)
|
||||
hackasm = Assembler(Parser())
|
||||
|
||||
#hackasm.assemblefile(inputfile)
|
||||
|
||||
|
||||
|
||||
|
||||
9
projects/06/Asm/Parser.py
Normal file
9
projects/06/Asm/Parser.py
Normal file
@@ -0,0 +1,9 @@
|
||||
class Parser(object):
|
||||
#def __int__(self):
|
||||
# pass
|
||||
|
||||
def bin_ich_zu_sehen(self,file):
|
||||
f = open(file, "r")
|
||||
print(f)
|
||||
print("Ja")
|
||||
|
||||
Reference in New Issue
Block a user