From 2ac64e7b95dd26df77d0e386fadd00c2e2151ca1 Mon Sep 17 00:00:00 2001 From: Ian C Date: Tue, 17 Jan 2017 15:46:24 +0000 Subject: Added 3-byte word output to cpcout and added small tool for investigating CPC CDT files. --- src/cpcout.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/cpcout.c') diff --git a/src/cpcout.c b/src/cpcout.c index b962340..53496ea 100644 --- a/src/cpcout.c +++ b/src/cpcout.c @@ -70,6 +70,18 @@ static void WriteWord(FILE *fp, int w) } +static void Write3(FILE *fp, unsigned long l) +{ + int f; + + for(f = 0; f < 3; f++) + { + WriteByte(fp, l & 0xff); + l >>= 8u; + } +} + + static void WriteLong(FILE *fp, unsigned long l) { int f; -- cgit v1.2.3