Here you can read what base32 is:
https://en.wikipedia.org/wiki/Base32For the moment i just have this code which is based on the hexdump code.
SECTION .data ; Section containing initialised data
Str: db " 00 00 00 00 00",10
BASELEN equ $-BASEStr
Digits: db "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"
SECTION .bss ; Section containing uninitialized data
BUFFLEN equ 5 ; We read the file 5 bytes at a time
Buff: resb BUFFLEN ; Text buffer itself
StringOut db " ",10 ;
Stringoutlen equ $-StringOut
SECTION .text ; Section containing code
global _start ; Linker needs this to find the entry point!
_start:
Read:
mov eax,3 ; Specify sys_read call
mov ebx,0 ; Specify File Descriptor 0: Standard Input
mov ecx,Buff ; Pass offset of the buffer to read to
mov edx,BUFFLEN ; Pass number of bytes to read at one pass
int 80h ; Call sys_read to fill the buffer
mov ebp,eax ; Save # of bytes read from file for later
cmp eax,0 ; If eax=0, sys_read reached EOF on stdin
je Done ; Jump If Equal (to 0, from compare)