1
0
mirror of https://gitlab.os-k.eu/os-k-team/kvisc.git synced 2023-08-25 14:05:46 +02:00
This commit is contained in:
julianb0 2019-05-30 11:20:09 +02:00
parent cc03cc8722
commit cf4bc26e8d
No known key found for this signature in database
GPG Key ID: DDF8325C95299A62
2 changed files with 1 additions and 44 deletions

View File

@ -158,47 +158,6 @@ def parse_preproc(line):
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
def apply_pdefs(line):
return line
"""
tok = line.split(' ', 1)
instr = tok[0]
new = '' + tok[0]
for word in tok[1:]:
word = word.strip()
new += ' '
print(word)
if '[' in word:
assert(len(word) > 2)
assert(word[-1] == ']')
assert(word[1:].strip()[0] == '[')
new += word[0] + '['
word = word[1:-1]
need_bracket = True
else:
need_bracket = False
if word in pdefs:
word = pdefs[word]
if not name_valid(word):
print("Invalid token in line: {}".format(line))
leave()
sys.exit(1)
return None
new += word
if need_bracket:
new += ']'
return new
"""
def parse(): def parse():
global ptext global ptext
global plastlabel global plastlabel
@ -219,8 +178,6 @@ def parse():
if line[0] == ' ' or line[0] == '\t': if line[0] == ' ' or line[0] == '\t':
line = line.lstrip() line = line.lstrip()
line = apply_pdefs(line)
ptext += parse_instr(line) ptext += parse_instr(line)
instrs.write("\n") instrs.write("\n")

View File

@ -29,7 +29,7 @@ print:
mov rcx, v_print_max mov rcx, v_print_max
.1: .1:
test b[ax0], b [ ax0 + 0 ] test b[ax0], b[ax0]
jz .2 jz .2
prn b[ax0] prn b[ax0]
inc ax0 inc ax0