MCPcopy Index your code
hub / github.com/InkboxSoftware/excelCPU / compileASM

Function compileASM

compileExcelASM16.py:385–401  ·  view source on GitHub ↗
(filepath)

Source from the content-addressed store, hash-verified

383 return
384
385def compileASM(filepath):
386 file = open(filepath, "r")
387 lineNumber = 1 #file line number for specifying errors
388 for line in file:
389 #print(line)
390 line = line.upper()
391 line = line.split(";") #getting rid of comments
392 line[0] = line[0].replace("\n", "") #removing return line
393 line[0] = line[0].replace("\r", "")
394 line[0] = line[0].strip()
395 #print(line)
396 if (len(line[0]) > 0):
397 parseLine(line[0], lineNumber)
398 lineNumber = lineNumber + 1
399 parseUnmarkedLabels()
400 parseProgram()
401 compileResults()
402
403def parseLine(line, lineNumber):
404 global labelOpen

Callers 1

Calls 4

parseLineFunction · 0.85
parseUnmarkedLabelsFunction · 0.85
parseProgramFunction · 0.85
compileResultsFunction · 0.85

Tested by

no test coverage detected