I am trying to make a program in x86 NASM that reads two integers from stdin and then does something with them (greatest common divisor, but thats not the question here). The question I have, is now that I have the two input integers, how do I go about turning them into actual integers to use as such? Here is the code I use to grab the strings of digits
SECTION .data
prompt: db "Enter a positive integer: "
plen: equ $-prompt
SECTION .bss
inbuf: resb 20
inbuf2: resb 20
SECTION .text
global _start
_start:
; Here I am grabbing the two integers to use in the function
nop
mov eax, 4 ; write
mov ebx, 1 ; to standard output
mov ecx, prompt ; the prompt string
mov edx, plen ; of length plen
int 80H ; interrupt with the syscall
mov eax, 3 ; read
mov ebx, 0 ; from standard input
mov ecx, inbuf ; into the input buffer
mov edx, 30 ; upto 30 bytes
int 80H ; interrupt with the syscall
mov eax, 4 ; write
mov ebx, 1 ; to standard output
mov ecx, prompt ; the prompt string
mov edx, plen ; of length plen
int 80H ; interrupt with the syscall
mov eax, 3 ; read
mov ebx, 0 ; from standard input
mov ecx, inbuf2 ; into the input buffer
mov edx, 30 ; upto 30 bytes
int 80H ; interrupt with the syscall