From df66063eb4d2e0ce32995acde31ce5f94c6d5ee3 Mon Sep 17 00:00:00 2001 From: Eldred Habert Date: Sun, 11 Oct 2026 16:41:38 +0200 Subject: [PATCH] Document the behavior of overlong `INCBIN` length (#2207) --- man/rgbasm.5 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/man/rgbasm.5 b/man/rgbasm.5 index 4f84a7a2..c1235c74 100644 --- a/man/rgbasm.5 +++ b/man/rgbasm.5 @@ -1888,10 +1888,15 @@ INCBIN "sprites/hero.bin" .Pp You can also include only part of a file with .Ic INCBIN . -The example below includes 256 bytes from data.bin, starting from byte 78. +The example below includes 256 bytes from +.Ql data.bin , +starting from byte 78. .Bd -literal -offset indent INCBIN "data.bin", 78, 256 .Ed +It is an error for +.Ql data.bin +to contain fewer than 78 + 256 = 334 bytes. .Pp The length argument is optional. If only the start position is specified, the bytes from the start position until the end of the file will be included.