Package: bin86 Version: 0.16.17-3.9 Severity: minor Tags: patch * What led up to the situation?
Checking for defects with [test-][g|n]roff -mandoc -t -K utf8 -rF0 -rHY=0 -ww -b -z < "man page" ["test-groff" is a script in the repository for "groff"; is not shipped] (local copy and "troff" slightly changed by me). [The fate of "test-nroff" was decided in groff bug #55941.] * What was the outcome of this action? <stdin>:2: Content of macro 'BY' is Bruce Evans, Robert de Bath troff: backtrace: file '<stdin>':92 troff:<stdin>:92: warning: trailing space in the line troff: backtrace: file '<stdin>':95 troff:<stdin>:95: warning: trailing space in the line troff: backtrace: file '<stdin>':224 troff:<stdin>:224: warning: trailing space in the line troff: backtrace: file '<stdin>':353 troff:<stdin>:353: warning: trailing space in the line troff: backtrace: file '<stdin>':365 troff:<stdin>:365: warning: trailing space in the line troff: backtrace: file '<stdin>':366 troff:<stdin>:366: warning: trailing space in the line troff: backtrace: file '<stdin>':379 troff:<stdin>:379: warning: trailing space in the line troff: backtrace: file '<stdin>':404 troff:<stdin>:404: warning: trailing space in the line troff: backtrace: file '<stdin>':434 troff:<stdin>:434: warning: trailing space in the line troff: backtrace: file '<stdin>':436 troff:<stdin>:436: warning: trailing space in the line troff: backtrace: file '<stdin>':438 troff:<stdin>:438: warning: trailing space in the line troff: backtrace: file '<stdin>':450 troff:<stdin>:450: warning: trailing space in the line * What outcome did you expect instead? No output (no warnings). -.- General remarks and further material, if a diff-file exist, are in the attachments. -- System Information: Debian Release: trixie/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 6.11.2-amd64 (SMP w/2 CPU threads; PREEMPT) Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: sysvinit (via /sbin/init) Versions of packages bin86 depends on: ii libc6 2.40-3 bin86 recommends no packages. bin86 suggests no packages. -- no debconf information
Any program (person), that produces man pages, should check the output for defects by using (both groff and nroff) [gn]roff -mandoc -t -ww -b -z -K utf8 <man page> The same goes for man pages that are used as an input. For a style guide use mandoc -T lint -.- So any 'generator' should check its products with the above mentioned 'groff', 'mandoc', and additionally with 'nroff ...'. This is just a simple quality control measure. The 'generator' may have to be corrected to get a better man page, the source file may, and any additional file may. Common defects: Input text line longer than 80 bytes. Not removing trailing spaces (in in- and output). The reason for these trailing spaces should be found and eliminated. Not beginning each input sentence on a new line. Lines should thus be shorter. See man-pages(7), item 'semantic newline'. -.- The difference between the formatted outputs can be seen with: nroff -mandoc <file1> > <out1> nroff -mandoc <file2> > <out2> diff -u <out1> <out2> and for groff, using "printf '%s\n%s\n' '.kern 0' '.ss 12 0' | groff -mandoc -Z - " instead of 'nroff -mandoc' Add the option '-t', if the file contains a table. Read the output of 'diff -u' with 'less -R' or similar. -.-. If 'man' (man-db) is used to check the manual for warnings, the following must be set: The option "-warnings=w" The environmental variable: export MAN_KEEP_STDERR=yes (or any non-empty value) or (produce only warnings): export MANROFFOPT="-ww -b -z" export MAN_KEEP_STDERR=yes (or any non-empty value) -.-. Output from "mandoc -T lint as86.1": (possibly shortened list) mandoc: as86.1:2:2: ERROR: skipping unknown macro: .BY Bruce Evans, Robert de Bath mandoc: as86.1:90:7: STYLE: whitespace at end of input line mandoc: as86.1:92:61: STYLE: whitespace at end of input line mandoc: as86.1:95:70: STYLE: whitespace at end of input line mandoc: as86.1:137:2: WARNING: skipping paragraph macro: PP empty mandoc: as86.1:177:109: STYLE: input text line longer than 80 bytes: Simple indirect regi... mandoc: as86.1:224:52: STYLE: whitespace at end of input line mandoc: as86.1:353:18: STYLE: whitespace at end of input line mandoc: as86.1:365:68: STYLE: whitespace at end of input line mandoc: as86.1:366:68: STYLE: whitespace at end of input line mandoc: as86.1:379:22: STYLE: whitespace at end of input line mandoc: as86.1:404:53: STYLE: whitespace at end of input line mandoc: as86.1:415:2: WARNING: skipping paragraph macro: PP empty mandoc: as86.1:434:49: STYLE: whitespace at end of input line mandoc: as86.1:436:59: STYLE: whitespace at end of input line mandoc: as86.1:438:23: STYLE: whitespace at end of input line mandoc: as86.1:450:3: STYLE: whitespace at end of input line -.-. Remove space characters at the end of lines. Use "git apply ... --whitespace=fix" to fix extra space issues, or use global configuration "core.whitespace". 90:.B -O 92:references to reduce the bytes needed for some instructions. 95:It's probably not a good idea to use this with hand written assembler 224:Set numeric segment 0=TEXT, 3=DATA,ROM,BSS, 14=MAX. 353:CS DS ES FS GS SS 365:the use of 80386 16bit conditional branches. The 'Dword' and 'word' 366:operators can control the size of operands on far jumps and calls. 379:CALLI CALLF JMPI JMPF 404:VERR VERW WAIT WBINVD WRMSR XADD XCHG XLAT XLATB XOR 434:Be aware though that Gasp generates an error for 436:commands, if you're not using alternate syntax you can use 438:instead, otherwise use 450:or -.-. Change '-' (\-) to '\(en' (en-dash) for a numeric range. GNU gnulib has recently (2023-06-18) updated its "build_aux/update-copyright" to recognize "\(en" in man pages. as86.1:227:Note the 64k size restrictions are not imposed for segments 3-14. -.-. Change (or include a "FIXME" paragraph about) misused SI (metric) numeric prefixes (or names) to the binary ones, like Ki (kibi), Mi (mebi), Gi (gibi), or Ti (tebi), if indicated. If the metric prefixes are correct, add the definitions or an explanation to avoid misunderstanding. 79:code generation and syntax for 16bit jumps and calls. ("jmp @(bx)" is then 227:Note the 64k size restrictions are not imposed for segments 3-14. 365:the use of 80386 16bit conditional branches. The 'Dword' and 'word' -.-. Use the correct macro for the font change of a single argument or split the argument into two. 439:.BR block -.-. Change - to \- if it shall be printed as a minus sign. as86.1:8:.RB [ -0123agjuw ] as86.1:63:.B -0 as86.1:64:start with 16-bit code segment, warn for all instructions > 8086 as86.1:66:.B -1 as86.1:67:start with 16-bit code segment, warn for all instructions > 80186 as86.1:69:.B -2 as86.1:70:start with 16-bit code segment, warn for all instructions > 80286 as86.1:72:.B -3 as86.1:73:start with 32-bit code segment, don't warn for any instructions. (not even as86.1:227:Note the 64k size restrictions are not imposed for segments 3-14. as86.1:319:Listings on/off (1,-1) as86.1:322:Macro listings on/off (1,-1) as86.1:458:The 6809 version does not support -0, -3, -a or -j. -.-. Change a HYPHEN-MINUS (code 0x2D) to a minus(-dash) (\-), if it is in front of a name for an option, is a symbol for standard input, is a single character used to indicate an option, or is in the NAME section (man-pages(7)). N.B. - (0x2D), processed as a UTF-8 file, is changed to a hyphen (0x2010, groff \[u2010] or \[hy]) in the output. 8:.RB [ -0123agjuw ] 9:.RB [ -lm [ list ]] 10:.RB [ -n\ name ] 11:.RB [ -o\ obj ] 12:.RB [ -b [ bin ]] 13:.RB [ -s\ sym ] 14:.RB [ -t\ textseg ] 29:file can be '-' to assemble the standard input. 51:arguments can be '-' for standard in/out. 53:.\" The 'src' file can be '-' for stdin but ONLY on 'big' machines. 58:.\"-03 native 63:.B -0 66:.B -1 69:.B -2 72:.B -3 76:.B -a 82:.B -g 85:.B -j 90:.B -O 103:.B -l 106:.B -m 109:.B -n 112:.B -o 115:.B -b 118:.B -s 121:.B -s 125:.B -b 129:.B -u 132:.B -w- 135:.B -t n 203:but I tend to used the second. :-) 319:Listings on/off (1,-1) 322:Macro listings on/off (1,-1) 424:.RB [ -a... ] 431:.B - 432:.RB [ -o\ obj ]\ [ -b\ bin ] 447:.B -b 458:The 6809 version does not support -0, -3, -a or -j. -.-. Wrong distance between sentences in the input file. Separate the sentences and subordinate clauses; each begins on a new line. See man-pages(7) ("Conventions for source file layout") and "info groff" ("Input Conventions"). The best procedure is to always start a new sentence on a new line, at least, if you are typing on a computer. Remember coding: Only one command ("sentence") on each (logical) line. E-mail: Easier to quote exactly the relevant lines. Generally: Easier to edit the sentence. Patches: Less unaffected text. Search for two adjacent words is easier, when they belong to the same line, and the same phrase. The amount of space between sentences in the output can then be controlled with the ".ss" request. 40:it defaults to the name of the source file. The variables defined include 73:start with 32-bit code segment, don't warn for any instructions. (not even 77:enable partial compatibility with Minix asld. This swaps the interpretation 79:code generation and syntax for 16bit jumps and calls. ("jmp @(bx)" is then 145:Either of these marks the start of a comment. In addition any 'unexpected' 162:segment and offset. This means that the way this operator and the 188:Absolute addressing, ax is set to contents of location 1234. Note the 203:but I tend to used the second. :-) 220:Set current segment. These can be preceded by the keyword 273:Space is counted in words. (2 bytes each) 309:later than specified give a warning. If the cpu is not mentioned the 364:jmpi, jmpf, callf, retf, etc. The 'Near' operator can be used to force 365:the use of 80386 16bit conditional branches. The 'Dword' and 'word' -.-. Split lines longer than 80 characters into two or more lines. Appropriate break points are the end of a sentence and a subordinate clause; after punctuation marks. Line 177, length 109 Simple indirect register addressing, the jump moves the contents of the location specified by BX into the PC. -.-. Name of a manual is set in bold, the section in roman. See man-pages(7). 456:as(1), ld86(1), bcc(1) -.-. Write "<number>-bit", not "<number>bit", see man-pages(7) 79:code generation and syntax for 16bit jumps and calls. ("jmp @(bx)" is then 365:the use of 80386 16bit conditional branches. The 'Dword' and 'word' -.-. Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -ww -b -z ": <stdin>:2: Content of macro 'BY' is Bruce Evans, Robert de Bath troff: backtrace: file '<stdin>':92 troff:<stdin>:92: warning: trailing space in the line troff: backtrace: file '<stdin>':95 troff:<stdin>:95: warning: trailing space in the line troff: backtrace: file '<stdin>':224 troff:<stdin>:224: warning: trailing space in the line troff: backtrace: file '<stdin>':353 troff:<stdin>:353: warning: trailing space in the line troff: backtrace: file '<stdin>':365 troff:<stdin>:365: warning: trailing space in the line troff: backtrace: file '<stdin>':366 troff:<stdin>:366: warning: trailing space in the line troff: backtrace: file '<stdin>':379 troff:<stdin>:379: warning: trailing space in the line troff: backtrace: file '<stdin>':404 troff:<stdin>:404: warning: trailing space in the line troff: backtrace: file '<stdin>':434 troff:<stdin>:434: warning: trailing space in the line troff: backtrace: file '<stdin>':436 troff:<stdin>:436: warning: trailing space in the line troff: backtrace: file '<stdin>':438 troff:<stdin>:438: warning: trailing space in the line troff: backtrace: file '<stdin>':450 troff:<stdin>:450: warning: trailing space in the line -.-. Additionally (general): Abbreviations get a '\&' added after their final full stop (.) to mark them as such and not as an end of a sentence. There is no need to add a '\&' before a full stop (.) if it has a character before it! Table headers, that are wider than any data in the corresponding column, do not need to be centered, so left adjustment is sufficient. The default value for kerning (.kern) and ligature (.lg) is one (1), so for n-mode (nroff) it should be set to zero (0) to avoid the processing of unnecessary code. Preferably set in the macro file "an.tmac".
--- as86.1 2024-10-20 22:58:39.506190893 +0000 +++ as86.1.new 2024-10-21 00:14:18.553221625 +0000 @@ -1,3 +1,6 @@ +.de BY\" guessed content +Written by \\$* +.. .TH as86 1 "Mar, 1999" .BY Bruce Evans, Robert de Bath .nh @@ -5,13 +8,13 @@ as86 \- Assembler for 8086..80386 processors .SH SYNOPSIS .B as86 -.RB [ -0123agjuw ] -.RB [ -lm [ list ]] -.RB [ -n\ name ] -.RB [ -o\ obj ] -.RB [ -b [ bin ]] -.RB [ -s\ sym ] -.RB [ -t\ textseg ] +.RB [ \-0123agjuw ] +.RB [ \-lm [ list ]] +.RB [ \-n\ name ] +.RB [ \-o\ obj ] +.RB [ \-b [ bin ]] +.RB [ \-s\ sym ] +.RB [ \-t\ textseg ] .B src .B as86_encap\ prog.s\ prog.v @@ -26,7 +29,7 @@ the unix system assembler. The .B src -file can be '-' to assemble the standard input. +file can be '\-' to assemble the standard input. This assembler can be compiled to support the 6809 cpu and may even work. @@ -37,7 +40,8 @@ to be included in or linked with program The .B prefix_ argument is a prefix to be added to all variables defined by the source, -it defaults to the name of the source file. The variables defined include +it defaults to the name of the source file. +The variables defined include .B prefix_start .B prefix_size and @@ -48,7 +52,7 @@ Either or both the .B prog.s and .B prog.v -arguments can be '-' for standard in/out. +arguments can be '\-' for standard in/out. .\" The 'src' file can be '-' for stdin but ONLY on 'big' machines. @@ -60,39 +64,40 @@ arguments can be '-' for standard in/out .\"name basename of the source name .TP -.B -0 +.B \-0 start with 16-bit code segment, warn for all instructions > 8086 .TP -.B -1 +.B \-1 start with 16-bit code segment, warn for all instructions > 80186 .TP -.B -2 +.B \-2 start with 16-bit code segment, warn for all instructions > 80286 .TP -.B -3 -start with 32-bit code segment, don't warn for any instructions. (not even -486 or 586) +.B \-3 +start with 32-bit code segment, don't warn for any instructions. +(not even 486 or 586) .TP -.B -a -enable partial compatibility with Minix asld. This swaps the interpretation +.B \-a +enable partial compatibility with Minix asld. +This swaps the interpretation of round brackets and square brackets as well as making alterations to the -code generation and syntax for 16bit jumps and calls. ("jmp @(bx)" is then -a valid instruction) +code generation and syntax for 16-bit jumps and calls. +("jmp @(bx)" is then a valid instruction.) .TP -.B -g +.B \-g only put global symbols in object or symbol file .TP -.B -j +.B \-j replace all short jumps with similar 16 or 32 bit jumps, the 16 bit conditional branches are encoded as a short conditional and a long unconditional branch. .TP -.B -O +.B \-O this causes the assembler to add extra passes to try to use forward -references to reduce the bytes needed for some instructions. +references to reduce the bytes needed for some instructions. If the labels move on the last pass the assembler will keep adding passes until the labels all stabilise (to a maximum of 30 passes) -It's probably not a good idea to use this with hand written assembler +It's probably not a good idea to use this with hand written assembler use the explicit .B br\ bmi\ bcc style opcodes for 8086 code or the @@ -100,41 +105,40 @@ style opcodes for 8086 code or the style for conditional i386 instructions and make sure all variables are defined before they are used. .TP -.B -l +.B \-l produce list file, filename may follow .TP -.B -m +.B \-m print macro expansions in listing .TP -.B -n +.B \-n name of module follows (goes in object instead of source name) .TP -.B -o +.B \-o produce object file, filename follows .TP -.B -b +.B \-b produce a raw binary file, filename may follow. This is a 'raw' binary file with no header, if there's no -.B -s +.B \-s option the file starts at location 0. .TP -.B -s +.B \-s produce an ASCII symbol file, filename follows. The format of this table is designed to be easy to parse for encapsulation and related activities in relation to binary files created with the -.B -b +.B \-b option. If a binary file doesn't start at location zero the first two items in the table are the start and end addresses of the binary file. .TP -.B -u +.B \-u assume undefined symbols are imported-with-unspecified segment. .TP -.B -w- +.B \-w\- allow the assembler to print warning messages. .TP -.B -t n +.B \-t n move all text segment data in segment n+3. -.P .SH AS86 SOURCE Special characters .TP @@ -142,9 +146,10 @@ Special characters Address of the start of the current line. .TP .B ; ! -Either of these marks the start of a comment. In addition any 'unexpected' -character at the start of a line is assumed to be a comment (but it's also -displayed to the terminal). +Either of these marks the start of a comment. +In addition any 'unexpected' +character at the start of a line is assumed to be a comment +(but it's also displayed to the terminal). .TP .B $ Prefix for hexadecimal numbers, the 'C' syntax, eg\ 0x1234, is also accepted. @@ -159,7 +164,8 @@ Prefix for immediate operands. Specifies an indirect operand. .br Unlike MASM the assembler has no type information on labels just a -segment and offset. This means that the way this operator and the +segment and offset. +This means that the way this operator and the immediate prefix work are like traditional assemblers. .sp Examples: @@ -174,7 +180,8 @@ Direct register addressing, the jump cop mov ax,[bx] jmp [bx] .fi -Simple indirect register addressing, the jump moves the contents of the location specified by BX into the PC. +Simple indirect register addressing, +the jump moves the contents of the location specified by BX into the PC. .sp mov ax,#1234 .br @@ -185,9 +192,9 @@ Immediate value, ax becomes 1234. mov ax,_hello mov ax,[_hello] .fi -Absolute addressing, ax is set to contents of location 1234. Note the -third option is not strictly consistent but is in place mainly for asld -compatibility. +Absolute addressing, ax is set to contents of location 1234. +Note the third option is not strictly consistent +but is in place mainly for asld compatibility. .sp .nf @@ -217,14 +224,15 @@ Generate user error. Segment related .TP .B .TEXT .ROM .DATA .BSS -Set current segment. These can be preceded by the keyword +Set current segment. +These can be preceded by the keyword .B .SECT .TP .B LOC -Set numeric segment 0=TEXT, 3=DATA,ROM,BSS, 14=MAX. +Set numeric segment 0=TEXT, 3=DATA,ROM,BSS, 14=MAX. The segment order set by the linker is now 0,4,5,6,7,8,9,A,B,C,D,E,1,2,3. Segment 0 and all segments above 3 are assumed to be text segment. -Note the 64k size restrictions are not imposed for segments 3-14. +Note the 64\~kibibytes size restrictions are not imposed for segments 3\(en14. .P Label type definition .TP @@ -270,7 +278,8 @@ Space definition Space is counted in bytes. .TP .B .BLKW .ZEROW -Space is counted in words. (2 bytes each) +Space is counted in words. +(2 bytes each) .TP .B COMM .COMM LCOMM .LCOMM Common area data definition @@ -306,7 +315,8 @@ later than specified give a warning. .BR USE32\ [ cpu ] Define default operand size as 32 bit, argument is cpu type the code is expected to run on (86, 186, 286, 386, 486, 586) instructions for cpus -later than specified give a warning. If the cpu is not mentioned the +later than specified give a warning. +If the cpu is not mentioned the assembler ensures it is >= 80386. .TP .B END @@ -316,10 +326,10 @@ End of compilation for this file. Switch warnings .TP .B .LIST -Listings on/off (1,-1) +Listings on/off (1,\-1) .TP .B .MACLIST -Macro listings on/off (1,-1) +Macro listings on/off (1,\-1) .P Macros, now working, the general form is like this. @@ -350,7 +360,7 @@ AX CX DX SP .br AH AL BH BL CH CL DH DL .br -CS DS ES FS GS SS +CS DS ES FS GS SS .br CR0 CR2 CR3 DR0 DR1 DR2 DR3 DR6 DR7 .br @@ -361,9 +371,11 @@ BYTE DWORD FWORD FAR PTR PWORD QWORD TBY .sp The 'near and 'far' do not allow multi-segment programming, all 'far' operations are specified explicitly through the use of the instructions: -jmpi, jmpf, callf, retf, etc. The 'Near' operator can be used to force -the use of 80386 16bit conditional branches. The 'Dword' and 'word' -operators can control the size of operands on far jumps and calls. +jmpi, jmpf, callf, retf, etc. +The 'Near' operator can be used to force +the use of 80386 16-bit conditional branches. +The 'Dword' and 'word' +operators can control the size of operands on far jumps and calls. .TP General instructions. These are in general the same as the instructions found in any 8086 assembler, @@ -376,7 +388,7 @@ BCC BCS BEQ BGE BGT BHI BHIS BLE BLO BLO BR .TP Intersegment -CALLI CALLF JMPI JMPF +CALLI CALLF JMPI JMPF .TP Segment modifier instructions ESEG FSEG GSEG SSEG @@ -401,7 +413,7 @@ SCASW SCAW SEG SETA SETAE SETB SETBE SET SETNA SETNAE SETNB SETNBE SETNC SETNE SETNG SETNGE SETNL SETNLE SETNO SETNP SETNS SETNZ SETO SETP SETPE SETPO SETS SETZ SGDT SHL SHLD SHR SHRD SIDT SLDT SMSW STC STD STI STOB STOS STOSB STOSD STOSW STOW STR SUB TEST -VERR VERW WAIT WBINVD WRMSR XADD XCHG XLAT XLATB XOR +VERR VERW WAIT WBINVD WRMSR XADD XCHG XLAT XLATB XOR .TP Floating point F2XM1 FABS FADD FADDP FBLD FBSTP FCHS FCLEX FCOM FCOMP FCOMPP FCOS @@ -412,7 +424,6 @@ FNDISI FNENI FNINIT FNOP FNSAVE FNSTCW F FPREM1 FPTAN FRNDINT FRSTOR FSAVE FSCALE FSETPM FSIN FSINCOS FSQRT FST FSTCW FSTENV FSTP FSTSW FSUB FSUBP FSUBR FSUBRP FTST FUCOM FUCOMP FUCOMPP FWAIT FXAM FXCH FXTRACT FYL2X FYL2XP1 -.P .SH Using GASP The Gnu assembler preprocessor provides some reasonable implementations @@ -421,22 +432,22 @@ of user biased pseudo opcodes. It can be invoked in a form similar to: .TP .B gasp -.RB [ -a... ] +.RB [ \-a... ] .B file.s .RB [ file2.s ] .B | .br .B as86 .RB [ ... ] -.B - -.RB [ -o\ obj ]\ [ -b\ bin ] +.B \- +.RB [ \-o\ obj ]\ [ \-b\ bin ] .P -Be aware though that Gasp generates an error for +Be aware though that Gasp generates an error for .B .org -commands, if you're not using alternate syntax you can use +commands, if you're not using alternate syntax you can use .B org -instead, otherwise use -.BR block +instead, otherwise use +.B block and .BR endb . The directive @@ -444,18 +455,18 @@ The directive is translated into .BR .global , which forces an import, if you are making a file using -.B -b +.B \-b use .B public -or +or .B .define instead. The GASP list options have no support in as86. .SH SEE ALSO -as(1), ld86(1), bcc(1) +.BR as "(1), " ld86 "(1), " bcc (1) .SH BUGS -The 6809 version does not support -0, -3, -a or -j. +The 6809 version does not support \-0, \-3, \-a or \-j. If this assembler is compiled with BCC this is classed as a 'small' compiler, so there is a maximum input line length of 256 characters