title: What code can echo a character in assembly language?
body: <p>The following code does assemble, build and run successfully but it doesn't do anything so I want it to output a character that's entered from the keyboard and display it to the screen. How can I do this? I've tried different lines of code and looked online but I can't find anything.</p>
  
  <p>I'm still learning asm so any help or advice would be appreciated.</p>
  
  <pre><code>        ;NASM-IDE ASM Assistant Assembler Project File
  ;BITS 16            ;Set code generation to 16 bit mode
  ;ORG 0x0100     ;Set code start address to 0100h
  
  
  SEGMENT .text        ;Main code segment
  
  PUTCH:             
  PUSH AX        
  
  MOV AH, 2H
  INT 21H
  
  POP AX                 
  
  ret  
  
  GETCH:
  PUSH BX
  
  MOV BH, AH 
  
  MOV AH, 08H 
  INT 21H    
  
  MOV AH, BH 
  
  POP BX
  
  ret
  
  PUTLINE:
  PUSH AX
  PUSH BX
  
  MOV AH, 004CH
  INT 21H   
  
  POP AX
  POP BX
  
  ret
  
  SEGMENT .data       ;Initialised data segment
  
  
  SEGMENT .bss        ;Uninitialised data segment
  </code></pre>