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
|
import sys
|
||||||
|
from Parser import *
|
||||||
|
|
||||||
|
|
||||||
class Assembler:
|
class Assembler(object):
|
||||||
def __init__(self):
|
def __init__(self,parser):
|
||||||
pass
|
parser.bin_ich_zu_sehen()
|
||||||
|
|
||||||
'''
|
'''
|
||||||
Statische Methoden zeichnen sich dadurch aus, dass ihnen kein Parameter übergeben,
|
Statische Methoden zeichnen sich dadurch aus, dass ihnen kein Parameter übergeben,
|
||||||
@@ -14,6 +16,7 @@ class Assembler:
|
|||||||
#def getfile(file):
|
#def getfile(file):
|
||||||
|
|
||||||
def assemblefile(self, file):
|
def assemblefile(self, file):
|
||||||
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
@@ -24,8 +27,9 @@ class Assembler:
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
||||||
inputfile = sys.argv[1]
|
inputfile = sys.argv[1]
|
||||||
hackasm = Assembler()
|
hackasm = Assembler(Parser())
|
||||||
hackasm.assemblefile(inputfile)
|
|
||||||
|
#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