Assembler begonnen

This commit is contained in:
2023-10-21 18:45:06 +02:00
parent 4776b3eb70
commit 5cf9dad18b
2 changed files with 18 additions and 5 deletions

14
projects/06/Asm/Assembler.py Normal file → Executable file
View 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)

View 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")