Output not correct on Putty Terminal

Hi all,
I wrote this C program for my Arrow Sockit Board, the LEDS on my board are working perfectly fine but the output on putty is not correct. it is some kind of blurred symbol or just 173 displayed every time. Can any one guide me what is wrong in the code?

#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
#include <fcntl.h> 
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "C:\altera\15.1\embedded\ip\altera\hps\altera_hps\hwlib\include\hwlib.h"
#include "C:\altera\15.1\embedded\ip\altera\hps\altera_hps\hwlib\include\soc_cv_av\socal\socal.h"
#include "C:\altera\15.1\embedded\ip\altera\hps\altera_hps\hwlib\include\soc_cv_av\socal\hps.h" 
#include "C:\altera\15.1\embedded\ip\altera\hps\altera_hps\hwlib\include\soc_cv_av\socal\alt_gpio.h"
#include "D:\masterarbeit3\reginteraction\hps_0.h"

#define REG_BASE 0xFF200000
#define REG_SPAN 0x00200000

/* Pointers Theory
1. Normal variables stores values while pointers store the address of that variables
2. The content of C pointers will always be a whole number
3. C pointer is initialized to NULL. The value of NULL pointer is zero. If a pointer in C is assigned to NULL then that means that it is pointing to nothing
4. & symbol is used to get the address of the variables
5. * symbol is used to get the value of the variable that the pointer is pointing to
6. Two pointers can be subtracted to know how many elements are between them but pointer addition, multiplication and division is not allowed.
7. The size of pointer is 2 bytes in case of 16 bit compiler. */

volatile unsigned char *led_addr; /*this is the pointer that writes to the register. This is our write input*/
void* virtual_base; /*pointer to open device memory file*/

int main (int argc, char *argv[])
int fd = EXIT_FAILURE;	
unsigned char value; /*this is our input to the register*/
unsigned char led;
if (argc < 2) {
		fprintf(stderr, "Usage: %s number from 1 to 15\n", argv[0]);
value = atoi(argv[1]);
if (value < 1 || value > 15) {
		fprintf(stderr, "Put number from 1 to 15\n");

if (fd < 0) {


/* get the delay_ctrl peripheral's base address */
led_addr = (unsigned char *) (virtual_base+REGGET_0_BASE);

/*writing the value*/

return 0;