1
0
mirror of https://github.com/pevans/erc-c.git synced 2025-02-07 03:30:28 +00:00

Add docblock comments

This commit is contained in:
Peter Evans 2018-03-13 00:53:46 -05:00
parent 7d9879f843
commit a243ed3d35
2 changed files with 15 additions and 0 deletions

View File

@ -91,6 +91,14 @@ apple2_lores_draw(apple2 *mach, size_t addr)
vm_screen_draw_rect(mach->screen, &dest);
}
/*
* Return the color that corresponds to the value in the given byte.
* Even though we receive a byte, lores color data is stored two cells
* to a byte, so all we ever get here will be contained within the first
* four bits; therefore we mask the byte as we index the lores colors
* table, to ensure a bad value doesn't end up returning a value out of
* bounds.
*/
vm_color
apple2_lores_color(vm_8bit byte)
{

View File

@ -354,6 +354,13 @@ vm_segment_set16(vm_segment *segment, size_t addr, vm_16bit value)
return err;
}
/*
* Print a hex dump of the region of memory between from and to into the
* given file stream. This looks vaguely like the output of the hexdump
* Unix command, except that the hex values are upper-case, and we use
* brackets instead of vertical bars to delimit the ASCII output because
* WHY NOT.
*/
void
vm_segment_hexdump(vm_segment *seg, FILE *stream, size_t from, size_t to)
{