got stuck in shift and add
section .data
msg db 10,'Enter a 4 digit number',10
msgl: equ $-msg
msg1 db 'The mul is',0ah
msg1l:equ $-msg1
section .bss
num1 resb 10
num2 resb 10
temp resd 10
dispnum resb 8
ans resq 1
%macro cmn 4
mov eax,%1
mov ebx,%2
mov ecx,%3
mov edx,%4
int 80h
%endm
section .text
global _start
_start:
cmn 4,1,msg,msgl
cmn 3,0,temp,5
call process
mov [num1],ebx
cmn 4,1,msg,msgl
cmn 3,0,temp,5
call process
mov [num2],ebx
call addition
;mov eax,[edx]
;call disp
ext:
mov eax,1
mov ebx,0
int 80h
process:
xor ebx,ebx
mov ecx,4
mov esi,temp
up1:
xor eax,eax
rol ebx,4
mov al,[esi]
cmp al,39h
jbe xyz
cmp al,59h
jbe xyz1
sub al,20h
xyz1:
sub al,07h
xyz:
sub al,30h
add ebx,eax
inc esi
loop up1
ret
addition:
mov ebx,0h
mov eax,[num1]
mov ebx,[num2]
mov edx,0000h
mov ecx,16
dwi:
shl edx,1
shl eax,1
jnc ab
add edx,ebx
ab:
dec ecx
jnz dwi
mov [ans],edx
call disp
ret
disp: mov eax,[ans]
mov esi,dispnum+7
mov ecx,8
cntdz:
mov edx,0
mov ebx,10h
div bx
cmp dl,09h
jbe pqrz
add dl,07h
pqrz:
add dl,30h
mov [esi],dl
dec esi
loop cntdz
cmn 4,1,dispnum,8
ret