bf: added notes regarding '{' and '<'.

This commit is contained in:
2026-03-17 21:28:50 +00:00
parent 071fe2ff98
commit 4ba7d3c554

View File

@@ -105,6 +105,8 @@ void program_execute(struct ProgramConcat *prg)
switch (opcode)
{
case '<':
// NOTE: We're doing a safe subtraction here, but maybe we should
// terminate execution if subtraction will overflow?
ctx.head0 = SAFE_SUB(ctx.head0, 1);
++ctx.ip;
break;
@@ -113,6 +115,8 @@ void program_execute(struct ProgramConcat *prg)
++ctx.ip;
break;
case '{':
// NOTE: We're doing a safe subtraction here, but maybe we should
// terminate execution if subtraction will overflow?
ctx.head1 = SAFE_SUB(ctx.head1, 1);
++ctx.ip;
break;