From 5f42022c1d52ffb8c3117d1a27d6436bc51dc99d Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 12 Aug 2017 17:35:14 -0400 Subject: [PATCH] Added a tester for the control mark. --- Components/8272/i8272.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Components/8272/i8272.cpp b/Components/8272/i8272.cpp index 427112d2b..285ec755d 100644 --- a/Components/8272/i8272.cpp +++ b/Components/8272/i8272.cpp @@ -42,6 +42,8 @@ using namespace Intel; #define SetMissingAddressMark() (status_[1] |= 0x01) #define SetControlMark() (status_[2] |= 0x40) +#define ControlMark() (status_[2] & 0x40) + #define SetDataFieldDataError() (status_[2] |= 0x20) #define SetWrongCyinder() (status_[2] |= 0x10) #define SetScanEqualHit() (status_[2] |= 0x08) @@ -393,7 +395,7 @@ void i8272::posit_event(int event_type) { // check whether that's it: either the final requested sector has been read, or because // a sector that was [/wasn't] marked as deleted when it shouldn't [/should] have been - if(sector_ != command_[6] && !(status_[2]&0x40)) { + if(sector_ != command_[6] && !ControlMark()) { sector_++; goto read_next_data; }