diff --git a/as/k-as.py b/as/k-as.py index c9d971d..1e34dad 100755 --- a/as/k-as.py +++ b/as/k-as.py @@ -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(): global ptext global plastlabel @@ -219,8 +178,6 @@ def parse(): if line[0] == ' ' or line[0] == '\t': line = line.lstrip() - - line = apply_pdefs(line) ptext += parse_instr(line) instrs.write("\n") diff --git a/os/dos.k b/os/dos.k index c9a4a8a..fe57439 100644 --- a/os/dos.k +++ b/os/dos.k @@ -29,7 +29,7 @@ print: mov rcx, v_print_max .1: - test b[ax0], b [ ax0 + 0 ] + test b[ax0], b[ax0] jz .2 prn b[ax0] inc ax0