summaryrefslogtreecommitdiff
path: root/reverse-engineering/dosbox_snif/int16todec.c
blob: 38348a1a08e709e777e10f16985c08c9cb058d2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <stdint.h>
#include <inttypes.h>
#include <stdio.h>

int main() {
	int16_t i;
	if ( scanf("%" SCNx16, &i) == 1 ) 
		printf("0x%" PRIx16 " => %" PRId16 "\n", i, i);
	else
		printf("Please input some signed 16 bits hex value like 'FFF6'\n");
	return 0;
}