aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2018-10-13 00:50:42 -0700
committerH. Peter Anvin <hpa@zytor.com>2018-10-13 00:50:42 -0700
commit9d728fda8458ebc042d3bcb07da6b2d88ccb602d (patch)
tree32ff019c36e60826d7576f090ca9e4797defdb50
parent56decf5009cf8d54af6eaa477f6c1557a1a5a893 (diff)
downloadabcdisk-9d728fda8458ebc042d3bcb07da6b2d88ccb602d.tar.gz
abcdisk-9d728fda8458ebc042d3bcb07da6b2d88ccb602d.tar.xz
abcdisk-9d728fda8458ebc042d3bcb07da6b2d88ccb602d.zip
bac80: clarify "scratch byte" comment
-rw-r--r--bac80.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/bac80.c b/bac80.c
index b4225b1..d6d8bb1 100644
--- a/bac80.c
+++ b/bac80.c
@@ -52,7 +52,7 @@ static void closestring(struct basic_block *blk)
* merged into common strings and strings can be broken up between
* blocks.
*/
-static void stringstmts(struct basic_block *blk, const uint8_t * data, int len)
+static void stringdata(struct basic_block *blk, const uint8_t * data, int len)
{
while (len) {
int copylen;
@@ -142,7 +142,7 @@ static uint8_t run_prefix[] = {
*/
static uint8_t restart_prefix[] = {
0x10, 0x01, 0x00, 0x86, 0x81, 0xc7,
- 0x38, 0xfe, /* Point to scratch byte */
+ 0x38, 0xfe, /* Point to scratch byte (ERRCODE) */
0xba, 0x2c, 0xc7,
0, 0, /* CALL address goes here */
0xce, 0x3a, 0xba, 0x0d,
@@ -212,15 +212,15 @@ int writebac80(FILE * out, const uint8_t * data, int len, int origin,
bacstmt(&blk, run_prefix, sizeof run_prefix);
/* Emit the restart prefix, if applicable */
- stringstmts(&blk, restart_prefix, pfxlen);
+ stringdata(&blk, restart_prefix, pfxlen);
/* Emit the actual binary data */
- stringstmts(&blk, data, len);
+ stringdata(&blk, data, len);
/* Emit relocation information */
if (have_relocs) {
- stringstmts(&blk, (const uint8_t *)"\1", 1); /* EOFA marker */
- stringstmts(&blk, relocdata, reloclen);
+ stringdata(&blk, (const uint8_t *)"\1", 1); /* EOFA marker */
+ stringdata(&blk, relocdata, reloclen);
}
/* Emit STOP statement to indicate end of data blocks */