Minor - remove CLEARBITS_BDA and SETBITS_BDA macros.

Remove these infrequently used macros and replace with explicit
GET_BDA/SET_BDA calls.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
diff --git a/src/biosvar.h b/src/biosvar.h
index eceee54..c879f40 100644
--- a/src/biosvar.h
+++ b/src/biosvar.h
@@ -134,14 +134,12 @@
     GET_FARVAR(SEG_BDA, ((struct bios_data_area_s *)0)->var)
 #define SET_BDA(var, val) \
     SET_FARVAR(SEG_BDA, ((struct bios_data_area_s *)0)->var, (val))
-#define CLEARBITS_BDA(var, val) do {                                    \
-        typeof(((struct bios_data_area_s *)0)->var) __val = GET_BDA(var); \
-        SET_BDA(var, (__val & ~(val)));                                 \
-    } while (0)
-#define SETBITS_BDA(var, val) do {                                      \
-        typeof(((struct bios_data_area_s *)0)->var) __val = GET_BDA(var); \
-        SET_BDA(var, (__val | (val)));                                  \
-    } while (0)
+
+// Helper function to set the bits of the equipment_list_flags variable.
+static inline void set_equipment_flags(u16 clear, u16 set) {
+    u16 eqf = GET_BDA(equipment_list_flags);
+    SET_BDA(equipment_list_flags, (eqf & ~clear) | set);
+}
 
 
 /****************************************************************
diff --git a/src/block.c b/src/block.c
index 44ba9bd..7a62787 100644
--- a/src/block.c
+++ b/src/block.c
@@ -263,11 +263,11 @@
     // Update equipment word bits for floppy
     if (FloppyCount == 1) {
         // 1 drive, ready for boot
-        SETBITS_BDA(equipment_list_flags, 0x01);
+        set_equipment_flags(0x41, 0x01);
         SET_BDA(floppy_harddisk_info, 0x07);
     } else if (FloppyCount >= 2) {
         // 2 drives, ready for boot
-        SETBITS_BDA(equipment_list_flags, 0x41);
+        set_equipment_flags(0x41, 0x41);
         SET_BDA(floppy_harddisk_info, 0x77);
     }
 }
diff --git a/src/cdrom.c b/src/cdrom.c
index f3208b5..6e0055d 100644
--- a/src/cdrom.c
+++ b/src/cdrom.c
@@ -280,7 +280,7 @@
         // Floppy emulation
         CDEmu.emulated_extdrive = 0x00;
         // XXX - get and set actual floppy count.
-        SETBITS_BDA(equipment_list_flags, 0x41);
+        set_equipment_flags(0x41, 0x41);
 
         switch (media) {
         case 0x01:  // 1.2M floppy
diff --git a/src/floppy.c b/src/floppy.c
index 72bc79b..ce54d0c 100644
--- a/src/floppy.c
+++ b/src/floppy.c
@@ -185,27 +185,28 @@
 wait_floppy_irq(void)
 {
     ASSERT16();
-    u8 v;
+    u8 frs;
     for (;;) {
         if (!GET_BDA(floppy_motor_counter))
             return -1;
-        v = GET_BDA(floppy_recalibration_status);
-        if (v & FRS_TIMEOUT)
+        frs = GET_BDA(floppy_recalibration_status);
+        if (frs & FRS_TIMEOUT)
             break;
         // Could use yield_toirq() here, but that causes issues on
         // bochs, so use yield() instead.
         yield();
     }
 
-    v &= ~FRS_TIMEOUT;
-    SET_BDA(floppy_recalibration_status, v);
+    frs &= ~FRS_TIMEOUT;
+    SET_BDA(floppy_recalibration_status, frs);
     return 0;
 }
 
 static void
 floppy_prepare_controller(u8 floppyid)
 {
-    CLEARBITS_BDA(floppy_recalibration_status, FRS_TIMEOUT);
+    u8 frs = GET_BDA(floppy_recalibration_status);
+    SET_BDA(floppy_recalibration_status, frs & ~FRS_TIMEOUT);
 
     // turn on motor of selected drive, DMA & int enabled, normal operation
     u8 prev_reset = inb(PORT_FD_DOR) & 0x04;
@@ -320,7 +321,8 @@
     data[1] = floppyid; // 0=drive0, 1=drive1
     floppy_pio(data, 2);
 
-    SETBITS_BDA(floppy_recalibration_status, 1<<floppyid);
+    u8 frs = GET_BDA(floppy_recalibration_status);
+    SET_BDA(floppy_recalibration_status, frs | (1<<floppyid));
     set_diskette_current_cyl(floppyid, 0);
 }
 
@@ -597,7 +599,8 @@
         } while ((inb(PORT_FD_STATUS) & 0xc0) == 0xc0);
     }
     // diskette interrupt has occurred
-    SETBITS_BDA(floppy_recalibration_status, FRS_TIMEOUT);
+    u8 frs = GET_BDA(floppy_recalibration_status);
+    SET_BDA(floppy_recalibration_status, frs | FRS_TIMEOUT);
 
 done:
     eoi_pic1();
diff --git a/src/misc.c b/src/misc.c
index b948778..54d8aef 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -65,7 +65,7 @@
 {
     dprintf(3, "math cp init\n");
     // 80x87 coprocessor installed
-    SETBITS_BDA(equipment_list_flags, 0x02);
+    set_equipment_flags(0x02, 0x02);
     enable_hwirq(13, FUNC16(entry_75));
 }
 
diff --git a/src/mouse.c b/src/mouse.c
index e4b25e0..7b28a63 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -18,7 +18,7 @@
         return;
     dprintf(3, "init mouse\n");
     // pointing device installed
-    SETBITS_BDA(equipment_list_flags, 0x04);
+    set_equipment_flags(0x04, 0x04);
 }
 
 static int
diff --git a/src/serial.c b/src/serial.c
index 21b4bd0..153f82a 100644
--- a/src/serial.c
+++ b/src/serial.c
@@ -46,8 +46,7 @@
     dprintf(1, "Found %d serial ports\n", count);
 
     // Equipment word bits 9..11 determing # serial ports
-    u16 eqb = GET_BDA(equipment_list_flags);
-    SET_BDA(equipment_list_flags, (eqb & 0xf1ff) | (count << 9));
+    set_equipment_flags(0xe00, count << 9);
 }
 
 static u16
@@ -211,8 +210,7 @@
     dprintf(1, "Found %d lpt ports\n", count);
 
     // Equipment word bits 14..15 determing # parallel ports
-    u16 eqb = GET_BDA(equipment_list_flags);
-    SET_BDA(equipment_list_flags, (eqb & 0x3fff) | (count << 14));
+    set_equipment_flags(0xc000, count << 14);
 }
 
 static u16
diff --git a/vgasrc/vgabios.c b/vgasrc/vgabios.c
index d80cd53..b13d274 100644
--- a/vgasrc/vgabios.c
+++ b/vgasrc/vgabios.c
@@ -1197,10 +1197,7 @@
 {
     // init detected hardware BIOS Area
     // set 80x25 color (not clear from RBIL but usual)
-    u16 eqf = GET_BDA(equipment_list_flags);
-    SET_BDA(equipment_list_flags, (eqf & 0xffcf) | 0x20);
-
-    // Just for the first int10 find its children
+    set_equipment_flags(0x30, 0x20);
 
     // the default char height
     SET_BDA(char_height, 0x10);