mirror of
https://github.com/pevans/erc-c.git
synced 2024-11-23 23:32:45 +00:00
Rename to read/write (without byte)
This commit is contained in:
parent
047d9eabd0
commit
ed1a7b3278
@ -111,7 +111,7 @@ extern int apple2dd_position(apple2dd *);
|
||||
extern void apple2dd_eject(apple2dd *);
|
||||
extern int apple2dd_insert(apple2dd *, FILE *);
|
||||
extern void apple2dd_shift(apple2dd *, int);
|
||||
extern vm_8bit apple2dd_read_byte(apple2dd *);
|
||||
extern void apple2dd_write_byte(apple2dd *, vm_8bit);
|
||||
extern vm_8bit apple2dd_read(apple2dd *);
|
||||
extern void apple2dd_write(apple2dd *, vm_8bit);
|
||||
|
||||
#endif
|
||||
|
@ -151,7 +151,7 @@ apple2dd_shift(apple2dd *drive, int pos)
|
||||
}
|
||||
|
||||
vm_8bit
|
||||
apple2dd_read_byte(apple2dd *drive)
|
||||
apple2dd_read(apple2dd *drive)
|
||||
{
|
||||
vm_8bit byte = vm_segment_get(drive->data, apple2dd_position(drive));
|
||||
apple2dd_shift(drive, 1);
|
||||
@ -160,7 +160,7 @@ apple2dd_read_byte(apple2dd *drive)
|
||||
}
|
||||
|
||||
void
|
||||
apple2dd_write_byte(apple2dd *drive, vm_8bit byte)
|
||||
apple2dd_write(apple2dd *drive, vm_8bit byte)
|
||||
{
|
||||
vm_segment_set(drive->data, apple2dd_position(drive), byte);
|
||||
apple2dd_shift(drive, 1);
|
||||
|
@ -134,31 +134,31 @@ Test(apple2dd, shift)
|
||||
cr_assert_eq(drive->sector_pos, 7);
|
||||
}
|
||||
|
||||
Test(apple2dd, read_byte)
|
||||
Test(apple2dd, read)
|
||||
{
|
||||
drive->data = vm_segment_create(_140K_);
|
||||
vm_segment_set(drive->data, 0, 123);
|
||||
vm_segment_set(drive->data, 1, 234);
|
||||
|
||||
cr_assert_eq(apple2dd_read_byte(drive), 123);
|
||||
cr_assert_eq(apple2dd_read(drive), 123);
|
||||
cr_assert_eq(drive->track_pos, 0);
|
||||
cr_assert_eq(drive->sector_pos, 1);
|
||||
|
||||
cr_assert_eq(apple2dd_read_byte(drive), 234);
|
||||
cr_assert_eq(apple2dd_read(drive), 234);
|
||||
cr_assert_eq(drive->track_pos, 0);
|
||||
cr_assert_eq(drive->sector_pos, 2);
|
||||
}
|
||||
|
||||
Test(apple2dd, write_byte)
|
||||
Test(apple2dd, write)
|
||||
{
|
||||
drive->data = vm_segment_create(_140K_);
|
||||
|
||||
apple2dd_write_byte(drive, 123);
|
||||
apple2dd_write(drive, 123);
|
||||
cr_assert_eq(vm_segment_get(drive->data, 0), 123);
|
||||
cr_assert_eq(drive->track_pos, 0);
|
||||
cr_assert_eq(drive->sector_pos, 1);
|
||||
|
||||
apple2dd_write_byte(drive, 234);
|
||||
apple2dd_write(drive, 234);
|
||||
cr_assert_eq(vm_segment_get(drive->data, 1), 234);
|
||||
cr_assert_eq(drive->track_pos, 0);
|
||||
cr_assert_eq(drive->sector_pos, 2);
|
||||
|
Loading…
Reference in New Issue
Block a user