From 80d8f3ae48255f786bd4d52a1819ea0c339f6946 Mon Sep 17 00:00:00 2001 From: Jacques Comeaux Date: Fri, 23 Aug 2024 19:46:17 -0500 Subject: Add register parser and binary search for opcodes --- newasm/string.s | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'newasm/string.s') diff --git a/newasm/string.s b/newasm/string.s index c77958b..d897a98 100644 --- a/newasm/string.s +++ b/newasm/string.s @@ -28,7 +28,8 @@ putstrln: BL putstr POP {PC} -cmpstr: MOVS R4, 0 +cmpstr: PUSH {R4} + MOVS R4, 0 1: LDRB R2, [R0, R4] LDRB R3, [R1, R4] CMP R2, R3 @@ -37,4 +38,5 @@ cmpstr: MOVS R4, 0 BEQ 2f ADDS R4, 1 B 1b -2: BX LR +2: POP {R4} + BX LR -- cgit v1.2.3