diff --git a/projects/06/Asm/Assembler.py b/projects/06/Asm/Assembler.py old mode 100644 new mode 100755 index d8bc730..cb8da3b --- a/projects/06/Asm/Assembler.py +++ b/projects/06/Asm/Assembler.py @@ -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) diff --git a/projects/06/Asm/Parser.py b/projects/06/Asm/Parser.py new file mode 100644 index 0000000..cec8dfe --- /dev/null +++ b/projects/06/Asm/Parser.py @@ -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") +