~grimmware/lc3

97de4308bee7a2332caca8ae46a989a11dcf7b4b — glenda 2 years ago 4ec2b25
Ditch string literals
2 files changed, 3 insertions(+), 3 deletions(-)

M asm.c
M tests/hello.asm
M asm.c => asm.c +3 -2
@@ 361,7 361,8 @@ parseline(char *l)
				return 1;
			} else if(strcmp(t,".STRINGZ") == 0) {
				l++;
				if(l[0] == 'x'){
				if(l[0] == 'x' && 0==1){ //This shit doesn't work so let's case it out
					// FIXME: byte packing is all kinds of fucked up
					l++;
					gettoken(&t, l);
					for(int i = 0; i<=strlen(t); i+=2){


@@ 405,7 406,7 @@ parseline(char *l)
						}
					}
				} else {
					syntaxerr(".STRINGZ only supports hex and string literals");
					syntaxerr(".STRINGZ only supports string literals");
				}
				goto Nop;
				return 1;

M tests/hello.asm => tests/hello.asm +0 -1
@@ 29,6 29,5 @@ O	.FILL	x6f
	BRnp	x0
	BR	x0
	HALT
HXWRLD	.STRINGZ	x20776f726c64210a
WRLD	.STRINGZ	" world\n"
	.END