From 5a560aa9eb1b2cc9caa06331d384ecc955095513 Mon Sep 17 00:00:00 2001
From: Andy McFadden
Long comments can be arbitrarily long and span multiple lines. They will be word-wrapped at a line width of your choosing. They're always drawn with a fixed-width font, so you can create ASCII-art diagrams. Comment delimiters are added automatically at the start of each line.
-For a true retro look you can "box" the comment with asterisks. You -can create a full-width row of asterisks by putting a '*' on a line by -itself. (Assembly source generators are allowed to use a character -other than '*' for the output, e.g. they might use a full set of -box outline characters, though that's somewhat against the spirit of -the thing. Regardless, a solo '*' results in a line.)
+The bottom window will update automatically as you type, showing what the output is expected to look like. The actual assembler source output will depend on features of the target assembler, such as comment delimiter choices and maximum line length limitations. For example, -Merlin allows a leading '*' to indicate a comment, while cc65 does not, -so cc65 code uses ";*' instead. Because the length limitation affects -the length of the line, not just the comment text, an asterisk-boxed -comment will have one fewer character per line in cc65 output.
+Merlin allows a leading '*' to indicate a full-line comment, while most +others use ";'.Clear the text field to delete the comment.
You can use Ctrl+Enter as a keyboard shortcut @@ -388,6 +382,88 @@ for OK.
not associated with a file offset. If you delete it, you can get it back by using Edit > Edit Header Comment. +Recent versions of SourceGen support "fancy" formatting tags, which +are embedded in the comment like BBCode or HTML. You can choose to +use "classic" or "fancy" formatting by clicking the +Enable Fancy Formatting checkbox.
+ +If fancy formatting is disabled, you can set the line width for the +comment block from the choices in the pop-up menu. If you want to +wrap the comment in a box of asterisks, check the +Render In Box checkbox.
+For boxed text, most assemblers don't accept '*' as a full-line comment +delimiter, so the actual delimiter will be output at the start of each +line. This reduces the width of the box by 1 for those assemblers and +the on-screen display.
+Within a box, putting '*' on a line by itself causes a full line of +asterisks to be output.
+ +If fancy formatting is enabled, the width and box controls are disabled +in the dialog. The features are available with embedded formatting +commands.
+The supported tags are:
+[width=nn]
: sets the line width to the specified value.
+ The minimum width is 8, maximum is 128. The special value '*' sets
+ the width to the default (80). This is the total width of the output,
+ so the actual text width will be slightly smaller because of comment
+ delimiters and box edges.[br]
: breaks up the output with a totally blank line.
+ The line won't even have a comment delimiter.[box]...[/box]
: formats the text inside the tags in
+ a box. The box frame will be composed of comment delimiters (usually
+ ';
' or '*
').[box char='#']
: alternate form of [box]
+ that allows the frame character to be specified. Because lines will
+ need to be prefixed with a comment delimiter, the box width is
+ reduced by one. If the specified character happens to match the
+ comment delimiter, the comment delimiter will be omitted, but the
+ width will still be reduced so that the inside of the box is the same
+ width regardless of assembler configuration.[hr]
: outputs a horizontal line of characters, using
+ the comment char.[hr char='-']
: outputs a horizontal line of characters,
+ using the specified char.[url]https://example.com/[/url]
: outputs a URL.[url=https://example.com/]link text[/url]
: outputs
+ the link text followed by the URL.The width
and br
tags are not allowed in
+boxes, but the hr
and url
tags are.
For example, the text:
++[width=20][box] +Hello, world! +[hr char='-'] +The quick brown fox jumps over the lazy dog. +[/box] ++
will be formatted as:
++******************** +* Hello, world! * +*------------------* +* The quick brown * +* fox jumps over * +* the lazy dog. * +******************** ++ +
Incomplete or malformed format tags will be output as written. To
+avoid confusing the parser, the left bracket can be escaped with a
+backslash, e.g. "\[br]
" will appear in the output as
+"[br]
".
A quick reference for the format tags can be accessed with the +Format Help button.
+ +Sets the Data Bank Register (DBR) value for 65816 code. This is used
diff --git a/docs/sgtutorial/images/t1-edit-long-comment.png b/docs/sgtutorial/images/t1-edit-long-comment.png
index f4b81e26897ab21a0413ed50be95277f72dedfa7..36be0d1f27c4796aa15f8e18320cb49a977b088c 100644
GIT binary patch
literal 21415
zcmeFZXHZjb+b Double-click the comment to open the editor. Type some words into the
upper window, and note that a formatted version appears in the bottom
- window. Experiment with the maximum line width and "render in box"
- settings to see what they do. You can hit Enter to create line breaks,
+ window. You can hit Enter to create line breaks,
or let SourceGen wrap lines for you. When you're done, click OK.
(Or hit Ctrl+Enter.) When the dialog closes, you'll see your new comment in place at the
xBW~Y(>D@s
z^oDXXt$a&XEbKqe3>?gAlt_~UuiaZ;KESU^K~@L)nw@rDrueX$G004{6xl{l^#mx;w)f|Q;
zuB}aDSp_jK=BIF|od&_aeGVnF69+;uD|`H$ar;^(E4z82+$$O@Wlq^C<{ZZbr)6$2
zy6Li@?Auc!gVuFzeOD>F5Bflc!+8>VS0YNXzre`r1>$z&J^M4{6bH5Gv+B*bS#j@Q
zrj6(CXqI6luEewwlyUJuswhDz#85x@u*|!2670|uIPbc85de7D^6YX}L3sEI_T9_L
z^R1eJGiHNKK3K3v9qI^Jg06LzSm8k{-t~k{b2ma(R;qDf!Q3ke%dxTNAkN@L0phw?
zLwX}+2%->%dgd%=J0|-nXJS1+b~IKhJs??4QtZB^3w)&h`T}mOpkkwL@38bXL-1
z=kF=C_$~5gDFhz1w+;Mh3t!0#cdMvlms WKF
zS_z|sm5Q3o^vuXeS|>SfI^1!kXucxSC*gbeG>^FC@mnjp%$?M
7B@Yw_XlvkTyj{8!rdX8HQY0N3g7f6FdtrCl4an8GaNrYsia
zc~!xPGWvfQ*`K`FSwX;0%=6y=XLY0U>OT-<5tIaR-g(SKCpF5qW}sv{^|8;6U5=71
z{BfHtCl@m-i~(9`wfrkym^IIrxv8xx;1>H<93su~Xm?crA^zmuz!pL67_d~&+38}t
z%f%G4*J2jsBjY$-a3eOlLo{KICGz|Jh$mg}x0woZ4*Z_8T
ndi@uEz1B&CcCfp0F>>y}t
z4Rt#lj+8RIa=r*zS*HdSvfgGX$M~71yrKaxX*|cQ{bYR9D8(qx5f^#O-1V%Q6p(x(
z7{tRW>Q98Pe8}{B=L>rFFqSnNCObX_Jurh|&S-ibSc3Nyq&+d7zmQgGPrV+Cxz1Uh
z6Z>j$1*QxE`?;^CxQ7T>I{!CQl$xxvJt+6x