From 6275d94bca6e4a676dd477ee3ad1e65d143553d8 Mon Sep 17 00:00:00 2001 From: rzzzwilson Date: Mon, 14 Jun 2021 14:05:55 +0700 Subject: [PATCH] Fixed strupper() of fields in line, issue #24 --- iasm/assemble.c | 11 +++-------- iasm/test.asm | 6 +++--- iasm/test.ptp | Bin 142 -> 186 bytes 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/iasm/assemble.c b/iasm/assemble.c index 0b2ed97..80b1982 100755 --- a/iasm/assemble.c +++ b/iasm/assemble.c @@ -404,6 +404,7 @@ delimfields(char *buffer, ++chptr; if (*chptr) *(chptr++) = '\0'; + strupper(*label); } /* if not off end of buffer, look for opcode */ @@ -426,7 +427,7 @@ delimfields(char *buffer, ++chptr; if (*chptr) *(chptr++) = '\0'; - + strupper(*opcode); } } } @@ -451,19 +452,13 @@ delimfields(char *buffer, ++chptr; if (*chptr) *(chptr++) = '\0'; + strupper(*field); } } } if (*chptr == ';') *comment = chptr; - - if (*label) - strupper(*label); - if (*opcode) - strupper(*opcode); - if (*field) - strupper(*field); } diff --git a/iasm/test.asm b/iasm/test.asm index 5ed7ef2..6789fca 100755 --- a/iasm/test.asm +++ b/iasm/test.asm @@ -1,7 +1,7 @@ ;------------------------------- ; Just loop in place - CPU speed test. ;------------------------------- - org 0100 ; -start jmp start ; + org 0100 ; +start jmp start ; ;------------------------------- - end start + end ;start diff --git a/iasm/test.ptp b/iasm/test.ptp index cca50161a60e1612fa725d3a315189debc1627f5..7dffdda3aefa6d92f55942701e31827027ac5ad2 100644 GIT binary patch delta 62 hcmeBU+{MVpfC478XrS;J7#SP{fbjqS|ES^&3;@qU26F%a delta 18 YcmdnR*vB}LuZ4?|!9f5B8UOzW04=fwSO5S3