add integer multiply

This commit is contained in:
2026-08-30 18:24:53 +02:00
parent f620bd41fa
commit 8460c0ff47
2 changed files with 18 additions and 1 deletions
+16
View File
@@ -0,0 +1,16 @@
pub mul_low:
mov r3, 0 ; result
mov r4, 31 ; loop counter
mull_loop:
asr r5, r2, 31
and r5, r5, r1
lsl r5, r5, r4
add r3, r3, r5
lsl r2, r2, 1
sub r4, r4, 1
cmp r4, 0
jge mull_loop
mov r1, r3
jmp r13
+2 -1
View File
@@ -27,4 +27,5 @@
; ===== TYPES ===== ; ===== TYPES =====
pub include bit pub include bit
pub include imath