From ee01f1a7f1e10be78bcceb4f0f42aa352a6a588f Mon Sep 17 00:00:00 2001 From: Jacques Comeaux Date: Sat, 24 Aug 2024 01:14:04 -0500 Subject: Add parsers for basic instruction types --- newasm/parsers/decimal.s | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'newasm/parsers/decimal.s') diff --git a/newasm/parsers/decimal.s b/newasm/parsers/decimal.s index a1516d2..cc9dff4 100644 --- a/newasm/parsers/decimal.s +++ b/newasm/parsers/decimal.s @@ -5,8 +5,6 @@ .type decimal, %function .global decimal -// 1 not a digit - // R4 input stream // R2 output value @@ -35,5 +33,5 @@ loop: LDRB R0, [R4] // get another char MULS R2, R3 // shift result by one decimal place ADDS R2, R0 // accumulate into R2 B loop // keep getting digits -bad: MOVS R0, #1 // return code 1 (not a digit) +bad: MOVS R0, #5 // return code 5 (not a digit) BX LR -- cgit v1.2.3