title: Filling four bytes with one loop in 16 bit assembly
body: <p>im a begginner at os developing, so i started devloping in real mode 16 bits.
  assuming i decalre 4 bytes one after another by the following opreations:</p>
  
  <pre><code>temp1 db 0 
  temp2 db 0 
  temp3 db 0 
  temp4 db 0 
  </code></pre>
  
  <p>I want to fill all of them with input to the user without addressing every single one of them by name.
  i tried storying the first temp1's memory address in bx, then check if its 0(default vaule), if its not fill it with input and increase bx then proceed this until enter was entered , this is how i tried :</p>
  
  <pre><code>mov bx, temp1
  push bx
  call read_key123
  
  read_key123: 
      mov ax, 0
      mov ah, 10h         
      int 16h
      cmp al,13d
      jz enter_pressed 
      mov ah,0Eh
      int 10h
      call fill_temp
      jmp read_key
  
  fill_temp:
      pop bx
      cmp byte [bx],0
      jne fill_temps_check
      mov [bx],al
      inc bx
      push bx
      call return_main
  fill_temps_check:
      cmp bx, temp4
      je wrong_input
          ret
  return_main:
      ret
  temp1 db 0 
  temp2 db 0 
  temp3 db 0 
  temp4 db 0 
  </code></pre>
  
  <p>assume wrong_input is a label to print a message.
  thank you in advance!</p>