1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-26 19:17:52 +00:00

Factored out the dull and repetitious stuff of writing n bytes of the same value.

This commit is contained in:
Thomas Harte
2017-08-14 15:50:36 -04:00
parent d7bed958b3
commit 4df9307d25
3 changed files with 27 additions and 32 deletions
+4
View File
@@ -181,3 +181,7 @@ void MFMController::write_crc() {
write_byte(crc >> 8);
write_byte(crc & 0xff);
}
void MFMController::write_n_bytes(int quantity, uint8_t value) {
while(quantity--) write_byte(value);
}
+5
View File
@@ -113,6 +113,11 @@ class MFMController: public Controller {
*/
void write_crc();
/*!
Calls @c write_byte with @c value, @c quantity times.
*/
void write_n_bytes(int quantity, uint8_t value);
private:
// Storage::Disk::Controller
virtual void process_input_bit(int value, unsigned int cycles_since_index_hole);