uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit f06a6002319f6463ffcb54c99e8112d456623fe3
parent 65c3a72730d07d3f5c08a94b8dbc79a13043a71f
Author: Andrew Alderwick <andrew@alderwick.co.uk>
Date:   Tue, 20 Apr 2021 21:05:34 +0100

Implemented : for ; without LIT2

Diffstat:
Msrc/assembler.c | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/assembler.c b/src/assembler.c @@ -212,6 +212,7 @@ walktoken(char *w) case ']': return 0; case '.': return 2; /* zero-page: LIT addr-lb */ case ',': return 2; /* relative: LIT addr-rel */ + case ':': return 2; /* absolute: addr-hb addr-lb */ case ';': return 3; /* absolute: LIT addr-hb addr-lb */ case '$': return shex(w + 1); case '#': return slen(w + 1) == 4 ? 3 : 2; @@ -239,6 +240,9 @@ parsetoken(char *w) return error("Address is too far", w); pushbyte((Sint8)off, 1); return ++l->refs; + } else if(w[0] == ':' && (l = findlabel(w + 1))) { /* absolute */ + pushshort(l->addr, 0); + return ++l->refs; } else if(w[0] == ';' && (l = findlabel(w + 1))) { /* absolute */ pushshort(l->addr, 1); return ++l->refs;