From 461d83e9e4e404b6f67a8e80c3bab7ccf348d275 Mon Sep 17 00:00:00 2001 From: nmlgc Date: Sat, 12 Sep 2020 01:51:37 +0200 Subject: [PATCH] [Maintenance] Move the value-first outw() variant to decomp.h Not really PC-98-hardware-related, not really master.lib-related, so yeah, that's really the best place for it. Part of P0116, funded by [Anonymous] and Lmocinemod. --- decomp.h | 7 +++++++ th01/hardware/egcscopy.c | 7 +------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/decomp.h b/decomp.h index ce8729e5..c99f0eac 100644 --- a/decomp.h +++ b/decomp.h @@ -11,3 +11,10 @@ // get the N versions. #define FLAGS_ZERO (_FLAGS & 0x40) /* JZ */ // ---------------- + +// Alternate version that sets the value first +#define OUTW2(port, val) __asm { \ + mov ax, val; \ + mov dx, port; \ + out dx, ax; \ +} diff --git a/th01/hardware/egcscopy.c b/th01/hardware/egcscopy.c index 4c78319a..8e9787ed 100644 --- a/th01/hardware/egcscopy.c +++ b/th01/hardware/egcscopy.c @@ -1,9 +1,4 @@ -// Alternate version that sets the value first -#define OUTW2(port, val) __asm { \ - mov ax, val; \ - mov dx, port; \ - out dx, ax; \ -} +#include "decomp.h" void pascal egc_start_copy(void) {