refactor: cleanup 3

This commit is contained in:
Dobin
2024-03-01 14:07:18 +00:00
parent 112964c11c
commit 9e551d9a19
8 changed files with 36 additions and 42 deletions
+6 -3
View File
@@ -1,9 +1,12 @@
import re
import os
import logging
logger = logging.getLogger("masmshc")
VERSION = "0.3"
g_is32bit = False
class Params:
def __init__(self, infile, outfile, inline_strings, remove_crt, append_rsp_stub):
self.infile = infile
@@ -116,10 +119,10 @@ def process_file(params):
# ofile.write("\tjmp\tmain\n")
elif params.append_rsp_stub:
append_align_rsp(ofile)
print("[INFO] Entry Point: AlignRSP")
logger.debug("[INFO] Entry Point: AlignRSP")
if seg_name == "_BSS":
print(f"[ERROR] Line {line_count + 1}: _BSS segment detected! Remove all global and static variables!\n")
logger.error(f"[ERROR] Line {line_count + 1}: _BSS segment detected! Remove all global and static variables!\n")
if seg_name in ("pdata", "xdata", "voltbl"):
in_skipped = True