Browse Source

Fixing numeric token parsing

Yann Weber 5 years ago
parent
commit
ecb298f0b0
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      yaglitch.asm

+ 4
- 4
yaglitch.asm View File

@@ -227,7 +227,7 @@ parse:
227 227
 			jmp .next_token
228 228
 
229 229
 		.hex_token:
230
-			sub al, "F"
230
+			sub al, "A" - 10
231 231
 			jmp .numeric_token
232 232
 		.dec_token:
233 233
 			sub al, "0"
@@ -236,7 +236,7 @@ parse:
236 236
 			je exit.syntax_error ; Numeric constant OF
237 237
 			inc r11
238 238
 			mov r10, 1
239
-			shl edx, 8
239
+			shl edx, 4
240 240
 			add edx, eax
241 241
 		.next_token:
242 242
 			;inc rbx ; chrno
@@ -671,7 +671,7 @@ OP:
671 671
 		call .prep_2arg
672 672
 		test ebx, ebx
673 673
 		jz .nodiv
674
-		xor edx, edx
674
+		xor rdx, rdx
675 675
 		div ebx
676 676
 		jmp .divend
677 677
 		.nodiv:
@@ -694,7 +694,7 @@ OP:
694 694
 		ret
695 695
 	.mod:
696 696
 		call .prep_2arg
697
-		test ebx, ebx
697
+		test rbx, rbx
698 698
 		jz .nomod
699 699
 		xor edx, edx
700 700
 		div ebx

Loading…
Cancel
Save