psim.texinfo 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106
  1. \input texinfo.tex @c -*-texinfo-*-
  2. @comment %**start of header
  3. @setfilename texinfo
  4. @settitle Texinfo @value{edition}
  5. @syncodeindex vr fn
  6. @footnotestyle separate
  7. @paragraphindent 2
  8. @smallbook
  9. @comment %**end of header
  10. @c Set smallbook if printing in smallbook format so the example of the
  11. @c smallbook font is actually written using smallbook; in bigbook, a kludge
  12. @c is used for TeX output.
  13. @set smallbook
  14. @c @@clear smallbook
  15. @ignore
  16. @ifinfo
  17. @format
  18. START-INFO-DIR-ENTRY
  19. * Texinfo: (texinfo). The documentation format for the GNU Project.
  20. END-INFO-DIR-ENTRY
  21. @end format
  22. @end ifinfo
  23. @end ignore
  24. @set edition 2.21
  25. @set update-date 7 June 1995
  26. @set update-month June 1995
  27. @c Experiment with smaller amounts of whitespace between chapters
  28. @c and sections.
  29. @tex
  30. \global\chapheadingskip = 15pt plus 4pt minus 2pt
  31. \global\secheadingskip = 12pt plus 3pt minus 2pt
  32. \global\subsecheadingskip = 9pt plus 2pt minus 2pt
  33. @end tex
  34. @c Experiment with smaller amounts of whitespace between paragraphs in
  35. @c the 8.5 by 11 inch format.
  36. @ifclear smallbook
  37. @tex
  38. \global\parskip 6pt plus 1pt
  39. @end tex
  40. @end ifclear
  41. @finalout
  42. @c Currently undocumented command, 5 December 1993:
  43. @c
  44. @c nwnode (Same as node, but no warnings; for `makeinfo'.)
  45. @ifinfo
  46. This file documents Texinfo, a documentation system that uses a single
  47. source file to produce both on-line information and a printed manual.
  48. Copyright (C) 1988--2022 Free Software Foundation, Inc.
  49. This is the second edition of the Texinfo documentation,@*
  50. and is consistent with version 2 of @file{texinfo.tex}.
  51. Permission is granted to make and distribute verbatim copies of
  52. this manual provided the copyright notice and this permission notice
  53. are preserved on all copies.
  54. @ignore
  55. Permission is granted to process this file through TeX and print the
  56. results, provided the printed document carries copying permission
  57. notice identical to this one except for the removal of this paragraph
  58. (this paragraph not being relevant to the printed manual).
  59. @end ignore
  60. Permission is granted to copy and distribute modified versions of this
  61. manual under the conditions for verbatim copying, provided that the entire
  62. resulting derived work is distributed under the terms of a permission
  63. notice identical to this one.
  64. Permission is granted to copy and distribute translations of this manual
  65. into another language, under the above conditions for modified versions,
  66. except that this permission notice may be stated in a translation approved
  67. by the Free Software Foundation.
  68. @end ifinfo
  69. @setchapternewpage odd
  70. @shorttitlepage Texinfo
  71. @titlepage
  72. @c use the new format for titles
  73. @title Texinfo
  74. @subtitle The GNU Documentation Format
  75. @subtitle Edition @value{edition}, for Texinfo Version Three
  76. @subtitle @value{update-month}
  77. @author by Robert J. Chassell and Richard M. Stallman
  78. @comment Include the Distribution inside the titlepage so
  79. @c that headings are turned off.
  80. @page
  81. @vskip 0pt plus 1filll
  82. Copyright @copyright{} 1988, 1990, 1991, 1992, 1993, 1995, 2010, 2011
  83. Free Software Foundation, Inc.
  84. @sp 2
  85. This is the second edition of the Texinfo documentation,@*
  86. and is consistent with version 2 of @file{texinfo.tex}.
  87. @sp 2
  88. Published by the Free Software Foundation @*
  89. 59 Temple Place Suite 330, @*
  90. Boston, MA 02111-1307 USA @*
  91. Printed copies are available for $15 each.@*
  92. ISBN 1-882114-63-9
  93. @c ISBN number 1-882114-63-9 is for edition 2.20 of 28 February 1995
  94. Permission is granted to make and distribute verbatim copies of
  95. this manual provided the copyright notice and this permission notice
  96. are preserved on all copies.
  97. Permission is granted to copy and distribute modified versions of this
  98. manual under the conditions for verbatim copying, provided that the entire
  99. resulting derived work is distributed under the terms of a permission
  100. notice identical to this one.
  101. Permission is granted to copy and distribute translations of this manual
  102. into another language, under the above conditions for modified versions,
  103. except that this permission notice may be stated in a translation approved
  104. by the Free Software Foundation.
  105. @sp 2
  106. Cover art by Etienne Suvasa.
  107. @end titlepage
  108. @ifinfo
  109. @node Top, Copying, (dir), (dir)
  110. @top Texinfo
  111. Texinfo is a documentation system that uses a single source file to
  112. produce both on-line information and printed output.@refill
  113. The first part of this master menu lists the major nodes in this Info
  114. document, including the @@-command and concept indices. The rest of
  115. the menu lists all the lower level nodes in the document.@refill
  116. This is Edition @value{edition} of the Texinfo documentation,
  117. @w{@value{update-date},} for Texinfo Version Three.
  118. @end ifinfo
  119. @c Here is a spare copy of the chapter menu entry descriptions,
  120. @c in case they are accidently deleted
  121. @ignore
  122. Your rights.
  123. Texinfo in brief.
  124. How to use Texinfo mode.
  125. What is at the beginning of a Texinfo file?
  126. What is at the end of a Texinfo file?
  127. How to create chapters, sections, subsections,
  128. appendices, and other parts.
  129. How to provide structure for a document.
  130. How to write nodes.
  131. How to write menus.
  132. How to write cross references.
  133. How to mark words and phrases as code,
  134. keyboard input, meta-syntactic
  135. variables, and the like.
  136. How to write quotations, examples, etc.
  137. How to write lists and tables.
  138. How to create indices.
  139. How to insert @@-signs, braces, etc.
  140. How to indicate results of evaluation,
  141. expansion of macros, errors, etc.
  142. How to force and prevent line and page breaks.
  143. How to describe functions and the like in a uniform manner.
  144. How to write footnotes.
  145. How to specify text for either @TeX{} or Info.
  146. How to print hardcopy.
  147. How to create an Info file.
  148. How to install an Info file
  149. A list of all the Texinfo @@-commands.
  150. Hints on how to write a Texinfo document.
  151. A sample Texinfo file to look at.
  152. Tell readers they have the right to copy
  153. and distribute.
  154. How to incorporate other Texinfo files.
  155. How to write page headings and footings.
  156. How to find formatting mistakes.
  157. All about paragraph refilling.
  158. A description of @@-Command syntax.
  159. Texinfo second edition features.
  160. A menu containing commands and variables.
  161. A menu covering many topics.
  162. @end ignore
  163. @menu
  164. * Copying:: Your rights.
  165. * Overview:: Texinfo in brief.
  166. * Texinfo Mode:: How to use Texinfo mode.
  167. * Beginning a File:: What is at the beginning of a Texinfo file?
  168. * Ending a File:: What is at the end of a Texinfo file?
  169. * Structuring:: How to create chapters, sections, subsections,
  170. appendices, and other parts.
  171. * Nodes:: How to write nodes.
  172. * Menus:: How to write menus.
  173. * Cross References:: How to write cross references.
  174. * Marking Text:: How to mark words and phrases as code,
  175. keyboard input, meta-syntactic
  176. variables, and the like.
  177. * Quotations and Examples:: How to write quotations, examples, etc.
  178. * Lists and Tables:: How to write lists and tables.
  179. * Indices:: How to create indices.
  180. * Insertions:: How to insert @@-signs, braces, etc.
  181. * Glyphs:: How to indicate results of evaluation,
  182. expansion of macros, errors, etc.
  183. * Breaks:: How to force and prevent line and page breaks.
  184. * Definition Commands:: How to describe functions and the like
  185. in a uniform manner.
  186. * Footnotes:: How to write footnotes.
  187. * Conditionals:: How to specify text for either @TeX{} or Info.
  188. * Format/Print Hardcopy:: How to convert a Texinfo file to a file
  189. for printing and how to print that file.
  190. * Create an Info File:: Convert a Texinfo file into an Info file.
  191. * Install an Info File:: Make an Info file accessible to users.
  192. * Command List:: All the Texinfo @@-commands.
  193. * Tips:: Hints on how to write a Texinfo document.
  194. * Sample Texinfo File:: A sample Texinfo file to look at.
  195. * Sample Permissions:: Tell readers they have the right to copy
  196. and distribute.
  197. * Include Files:: How to incorporate other Texinfo files.
  198. * Headings:: How to write page headings and footings.
  199. * Catching Mistakes:: How to find formatting mistakes.
  200. * Refilling Paragraphs:: All about paragraph refilling.
  201. * Command Syntax:: A description of @@-Command syntax.
  202. * Obtaining TeX:: How to Obtain @TeX{}.
  203. * New Features:: Texinfo second edition features.
  204. * Command and Variable Index:: A menu containing commands and variables.
  205. * Concept Index:: A menu covering many topics.
  206. --- The Detailed Node Listing ---
  207. Overview of Texinfo
  208. * Using Texinfo:: Create a conventional printed book
  209. or an Info file.
  210. * Info Files:: What is an Info file?
  211. * Printed Books:: Characteristics of a printed book or manual.
  212. * Formatting Commands:: @@-commands are used for formatting.
  213. * Conventions:: General rules for writing a Texinfo file.
  214. * Comments:: How to write comments and mark regions that
  215. the formatting commands will ignore.
  216. * Minimum:: What a Texinfo file must have.
  217. * Six Parts:: Usually, a Texinfo file has six parts.
  218. * Short Sample:: A short sample Texinfo file.
  219. * Acknowledgements::
  220. Using Texinfo Mode
  221. * Texinfo Mode Overview:: How Texinfo mode can help you.
  222. * Emacs Editing:: Texinfo mode adds to GNU Emacs' general
  223. purpose editing features.
  224. * Inserting:: How to insert frequently used @@-commands.
  225. * Showing the Structure:: How to show the structure of a file.
  226. * Updating Nodes and Menus:: How to update or create new nodes and menus.
  227. * Info Formatting:: How to format for Info.
  228. * Printing:: How to format and print part or all of a file.
  229. * Texinfo Mode Summary:: Summary of all the Texinfo mode commands.
  230. Updating Nodes and Menus
  231. * Updating Commands:: Five major updating commands.
  232. * Updating Requirements:: How to structure a Texinfo file for
  233. using the updating command.
  234. * Other Updating Commands:: How to indent descriptions, insert
  235. missing nodes lines, and update
  236. nodes in sequence.
  237. Beginning a Texinfo File
  238. * Four Parts:: Four parts begin a Texinfo file.
  239. * Sample Beginning:: Here is a sample beginning for a Texinfo file.
  240. * Header:: The very beginning of a Texinfo file.
  241. * Info Summary and Permissions:: Summary and copying permissions for Info.
  242. * Titlepage & Copyright Page:: Creating the title and copyright pages.
  243. * The Top Node:: Creating the `Top' node and master menu.
  244. * Software Copying Permissions:: Ensure that you and others continue to
  245. have the right to use and share software.
  246. The Texinfo File Header
  247. * First Line:: The first line of a Texinfo file.
  248. * Start of Header:: Formatting a region requires this.
  249. * setfilename:: Tell Info the name of the Info file.
  250. * settitle:: Create a title for the printed work.
  251. * setchapternewpage:: Start chapters on right-hand pages.
  252. * paragraphindent:: An option to specify paragraph indentation.
  253. * End of Header:: Formatting a region requires this.
  254. The Title and Copyright Pages
  255. * titlepage:: Create a title for the printed document.
  256. * titlefont center sp:: The @code{@@titlefont}, @code{@@center},
  257. and @code{@@sp} commands.
  258. * title subtitle author:: The @code{@@title}, @code{@@subtitle},
  259. and @code{@@author} commands.
  260. * Copyright & Permissions:: How to write the copyright notice and
  261. include copying permissions.
  262. * end titlepage:: Turn on page headings after the title and
  263. copyright pages.
  264. * headings on off:: An option for turning headings on and off
  265. and double or single sided printing.
  266. The `Top' Node and Master Menu
  267. * Title of Top Node:: Sketch what the file is about.
  268. * Master Menu Parts:: A master menu has three or more parts.
  269. Ending a Texinfo File
  270. * Printing Indices & Menus:: How to print an index in hardcopy and
  271. generate index menus in Info.
  272. * Contents:: How to create a table of contents.
  273. * File End:: How to mark the end of a file.
  274. Chapter Structuring
  275. * Tree Structuring:: A manual is like an upside down tree @dots{}
  276. * Structuring Command Types:: How to divide a manual into parts.
  277. * makeinfo top:: The @code{@@top} command, part of the `Top' node.
  278. * chapter::
  279. * unnumbered & appendix::
  280. * majorheading & chapheading::
  281. * section::
  282. * unnumberedsec appendixsec heading::
  283. * subsection::
  284. * unnumberedsubsec appendixsubsec subheading::
  285. * subsubsection:: Commands for the lowest level sections.
  286. * Raise/lower sections:: How to change commands' hierarchical level.
  287. Nodes
  288. * Two Paths:: Different commands to structure
  289. Info output and printed output.
  290. * Node Menu Illustration:: A diagram, and sample nodes and menus.
  291. * node:: How to write a node, in detail.
  292. * makeinfo Pointer Creation:: How to create node pointers with @code{makeinfo}.
  293. The @code{@@node} Command
  294. * Node Names:: How to choose node and pointer names.
  295. * Writing a Node:: How to write an @code{@@node} line.
  296. * Node Line Tips:: Keep names short.
  297. * Node Line Requirements:: Keep names unique, without @@-commands.
  298. * First Node:: How to write a `Top' node.
  299. * makeinfo top command:: How to use the @code{@@top} command.
  300. * Top Node Summary:: Write a brief description for readers.
  301. Menus
  302. * Menu Location:: Put a menu in a short node.
  303. * Writing a Menu:: What is a menu?
  304. * Menu Parts:: A menu entry has three parts.
  305. * Less Cluttered Menu Entry:: Two part menu entry.
  306. * Menu Example:: Two and three part menu entries.
  307. * Other Info Files:: How to refer to a different Info file.
  308. Cross References
  309. * References:: What cross references are for.
  310. * Cross Reference Commands:: A summary of the different commands.
  311. * Cross Reference Parts:: A cross reference has several parts.
  312. * xref:: Begin a reference with `See' @dots{}
  313. * Top Node Naming:: How to refer to the beginning of another file.
  314. * ref:: A reference for the last part of a sentence.
  315. * pxref:: How to write a parenthetical cross reference.
  316. * inforef:: How to refer to an Info-only file.
  317. @code{@@xref}
  318. * Reference Syntax:: What a reference looks like and requires.
  319. * One Argument:: @code{@@xref} with one argument.
  320. * Two Arguments:: @code{@@xref} with two arguments.
  321. * Three Arguments:: @code{@@xref} with three arguments.
  322. * Four and Five Arguments:: @code{@@xref} with four and five arguments.
  323. Marking Words and Phrases
  324. * Indicating:: How to indicate definitions, files, etc.
  325. * Emphasis:: How to emphasize text.
  326. Indicating Definitions, Commands, etc.
  327. * Useful Highlighting:: Highlighting provides useful information.
  328. * code:: How to indicate code.
  329. * kbd:: How to show keyboard input.
  330. * key:: How to specify keys.
  331. * samp:: How to show a literal sequence of characters.
  332. * var:: How to indicate a metasyntactic variable.
  333. * file:: How to indicate the name of a file.
  334. * dfn:: How to specify a definition.
  335. * cite:: How to refer to a book that is not in Info.
  336. Emphasizing Text
  337. * emph & strong:: How to emphasize text in Texinfo.
  338. * Smallcaps:: How to use the small caps font.
  339. * Fonts:: Various font commands for printed output.
  340. * Customized Highlighting:: How to define highlighting commands.
  341. Quotations and Examples
  342. * Block Enclosing Commands:: Use different constructs for
  343. different purposes.
  344. * quotation:: How to write a quotation.
  345. * example:: How to write an example in a fixed-width font.
  346. * noindent:: How to prevent paragraph indentation.
  347. * Lisp Example:: How to illustrate Lisp code.
  348. * smallexample & smalllisp:: Forms for the @code{@@smallbook} option.
  349. * display:: How to write an example in the current font.
  350. * format:: How to write an example that does not narrow
  351. the margins.
  352. * exdent:: How to undo the indentation of a line.
  353. * flushleft & flushright:: How to push text flushleft or flushright.
  354. * cartouche:: How to draw cartouches around examples.
  355. Making Lists and Tables
  356. * Introducing Lists:: Texinfo formats lists for you.
  357. * itemize:: How to construct a simple list.
  358. * enumerate:: How to construct a numbered list.
  359. * Two-column Tables:: How to construct a two-column table.
  360. Making a Two-column Table
  361. * table:: How to construct a two-column table.
  362. * ftable vtable:: How to construct a two-column table
  363. with automatic indexing.
  364. * itemx:: How to put more entries in the first column.
  365. Creating Indices
  366. * Index Entries:: Choose different words for index entries.
  367. * Predefined Indices:: Use different indices for different kinds
  368. of entry.
  369. * Indexing Commands:: How to make an index entry.
  370. * Combining Indices:: How to combine indices.
  371. * New Indices:: How to define your own indices.
  372. Combining Indices
  373. * syncodeindex:: How to merge two indices, using @code{@@code}
  374. font for the merged-from index.
  375. * synindex:: How to merge two indices, using the
  376. default font of the merged-to index.
  377. Special Insertions
  378. * Braces Atsigns Periods:: How to insert braces, @samp{@@} and periods.
  379. * dmn:: How to format a dimension.
  380. * Dots Bullets:: How to insert dots and bullets.
  381. * TeX and copyright:: How to insert the @TeX{} logo
  382. and the copyright symbol.
  383. * minus:: How to insert a minus sign.
  384. * math:: How to format a mathematical expression.
  385. Inserting @samp{@@}, Braces, and Periods
  386. * Inserting An Atsign::
  387. * Inserting Braces:: How to insert @samp{@{} and @samp{@}}
  388. * Controlling Spacing:: How to insert the right amount of space
  389. after punctuation within a sentence.
  390. Inserting Ellipsis, Dots, and Bullets
  391. * dots:: How to insert dots @dots{}
  392. * bullet:: How to insert a bullet.
  393. Inserting @TeX{} and the Copyright Symbol
  394. * tex:: How to insert the @TeX{} logo.
  395. * copyright symbol:: How to use @code{@@copyright}@{@}.
  396. Glyphs for Examples
  397. * Glyphs Summary::
  398. * result:: How to show the result of expression.
  399. * expansion:: How to indicate an expansion.
  400. * Print Glyph:: How to indicate printed output.
  401. * Error Glyph:: How to indicate an error message.
  402. * Equivalence:: How to indicate equivalence.
  403. * Point Glyph:: How to indicate the location of point.
  404. Making and Preventing Breaks
  405. * Break Commands:: Cause and prevent splits.
  406. * Line Breaks:: How to force a single line to use two lines.
  407. * w:: How to prevent unwanted line breaks.
  408. * sp:: How to insert blank lines.
  409. * page:: How to force the start of a new page.
  410. * group:: How to prevent unwanted page breaks.
  411. * need:: Another way to prevent unwanted page breaks.
  412. Definition Commands
  413. * Def Cmd Template:: How to structure a description using a
  414. definition command.
  415. * Optional Arguments:: How to handle optional and repeated arguments.
  416. * deffnx:: How to group two or more `first' lines.
  417. * Def Cmds in Detail:: All the definition commands.
  418. * Def Cmd Conventions:: Conventions for writing definitions.
  419. * Sample Function Definition::
  420. The Definition Commands
  421. * Functions Commands:: Commands for functions and similar entities.
  422. * Variables Commands:: Commands for variables and similar entities.
  423. * Typed Functions:: Commands for functions in typed languages.
  424. * Typed Variables:: Commands for variables in typed languages.
  425. * Abstract Objects:: Commands for object-oriented programming.
  426. * Data Types:: The definition command for data types.
  427. Footnotes
  428. * Footnote Commands:: How to write a footnote in Texinfo.
  429. * Footnote Styles:: Controlling how footnotes appear in Info.
  430. Conditionally Visible Text
  431. * Conditional Commands:: How to specify text for Info or @TeX{}.
  432. * Using Ordinary TeX Commands:: You can use any and all @TeX{} commands.
  433. * set clear value:: How to designate which text to format (for
  434. both Info and @TeX{}); and how to set a
  435. flag to a string that you can insert.
  436. @code{@@set}, @code{@@clear}, and @code{@@value}
  437. * ifset ifclear:: Format a region if a flag is set.
  438. * value:: Replace a flag with a string.
  439. * value Example:: An easy way to update edition information.
  440. Format and Print Hardcopy
  441. * Use TeX:: Use @TeX{} to format for hardcopy.
  442. * Format with tex/texindex:: How to format in a shell.
  443. * Format with texi2dvi:: A simpler way to use the shell.
  444. * Print with lpr:: How to print.
  445. * Within Emacs:: How to format and print from an Emacs shell.
  446. * Texinfo Mode Printing:: How to format and print in Texinfo mode.
  447. * Compile-Command:: How to print using Emacs's compile command.
  448. * Requirements Summary:: @TeX{} formatting requirements summary.
  449. * Preparing for TeX:: What you need to do to use @TeX{}.
  450. * Overfull hboxes:: What are and what to do with overfull hboxes.
  451. * smallbook:: How to print small format books and manuals.
  452. * A4 Paper:: How to print on European A4 paper.
  453. * Cropmarks and Magnification:: How to print marks to indicate the size
  454. of pages and how to print scaled up output.
  455. Creating an Info File
  456. * makeinfo advantages:: @code{makeinfo} provides better error checking.
  457. * Invoking makeinfo:: How to run @code{makeinfo} from a shell.
  458. * makeinfo options:: Specify fill-column and other options.
  459. * Pointer Validation:: How to check that pointers point somewhere.
  460. * makeinfo in Emacs:: How to run @code{makeinfo} from Emacs.
  461. * texinfo-format commands:: Two Info formatting commands written
  462. in Emacs Lisp are an alternative
  463. to @code{makeinfo}.
  464. * Batch Formatting:: How to format for Info in Emacs Batch mode.
  465. * Tag and Split Files:: How tagged and split files help Info
  466. to run better.
  467. Installing an Info File
  468. * Directory file:: The top level menu for all Info files.
  469. * New Info File:: Listing a new info file.
  470. * Other Info Directories:: How to specify Info files that are
  471. located in other directories.
  472. Sample Permissions
  473. * Inserting Permissions:: How to put permissions in your document.
  474. * ifinfo Permissions:: Sample @samp{ifinfo} copying permissions.
  475. * Titlepage Permissions:: Sample Titlepage copying permissions.
  476. Include Files
  477. * Using Include Files:: How to use the @code{@@include} command.
  478. * texinfo-multiple-files-update:: How to create and update nodes and
  479. menus when using included files.
  480. * Include File Requirements:: What @code{texinfo-multiple-files-update} expects.
  481. * Sample Include File:: A sample outer file with included files
  482. within it; and a sample included file.
  483. * Include Files Evolution:: How use of the @code{@@include} command
  484. has changed over time.
  485. Page Headings
  486. * Headings Introduced:: Conventions for using page headings.
  487. * Heading Format:: Standard page heading formats.
  488. * Heading Choice:: How to specify the type of page heading.
  489. * Custom Headings:: How to create your own headings and footings.
  490. Formatting Mistakes
  491. * makeinfo preferred:: @code{makeinfo} finds errors.
  492. * Debugging with Info:: How to catch errors with Info formatting.
  493. * Debugging with TeX:: How to catch errors with @TeX{} formatting.
  494. * Using texinfo-show-structure:: How to use @code{texinfo-show-structure}.
  495. * Using occur:: How to list all lines containing a pattern.
  496. * Running Info-Validate:: How to find badly referenced nodes.
  497. Finding Badly Referenced Nodes
  498. * Using Info-validate:: How to run @code{Info-validate}.
  499. * Unsplit:: How to create an unsplit file.
  500. * Tagifying:: How to tagify a file.
  501. * Splitting:: How to split a file manually.
  502. Second Edition Features
  503. * New Texinfo Mode Commands:: The updating commands are especially useful.
  504. * New Commands:: Many newly described @@-commands.
  505. @end menu
  506. @node Copying, Overview, Top, Top
  507. @comment node-name, next, previous, up
  508. @unnumbered Texinfo Copying Conditions
  509. @cindex Copying conditions
  510. @cindex Conditions for copying Texinfo
  511. The programs currently being distributed that relate to Texinfo include
  512. portions of GNU Emacs, plus other separate programs (including
  513. @code{makeinfo}, @code{info}, @code{texindex}, and @file{texinfo.tex}).
  514. These programs are @dfn{free}; this means that everyone is free to use
  515. them and free to redistribute them on a free basis. The Texinfo-related
  516. programs are not in the public domain; they are copyrighted and there
  517. are restrictions on their distribution, but these restrictions are
  518. designed to permit everything that a good cooperating citizen would want
  519. to do. What is not allowed is to try to prevent others from further
  520. sharing any version of these programs that they might get from
  521. you.@refill
  522. Specifically, we want to make sure that you have the right to give
  523. away copies of the programs that relate to Texinfo, that you receive
  524. source code or else can get it if you want it, that you can change these
  525. programs or use pieces of them in new free programs, and that you know
  526. you can do these things.@refill
  527. To make sure that everyone has such rights, we have to forbid you to
  528. deprive anyone else of these rights. For example, if you distribute
  529. copies of the Texinfo related programs, you must give the recipients all
  530. the rights that you have. You must make sure that they, too, receive or
  531. can get the source code. And you must tell them their rights.@refill
  532. Also, for our own protection, we must make certain that everyone finds
  533. out that there is no warranty for the programs that relate to Texinfo.
  534. If these programs are modified by someone else and passed on, we want
  535. their recipients to know that what they have is not what we distributed,
  536. so that any problems introduced by others will not reflect on our
  537. reputation.@refill
  538. The precise conditions of the licenses for the programs currently
  539. being distributed that relate to Texinfo are found in the General Public
  540. Licenses that accompany them.@refill
  541. @node Overview, Texinfo Mode, Copying, Top
  542. @comment node-name, next, previous, up
  543. @chapter Overview of Texinfo
  544. @cindex Overview of Texinfo
  545. @cindex Texinfo overview
  546. @dfn{Texinfo}@footnote{Note that the first syllable of ``Texinfo'' is
  547. pronounced like ``speck'', not ``hex''. This odd pronunciation is
  548. derived from, but is not the same as, the pronunciation of @TeX{}. In
  549. the word @TeX{}, the @samp{X} is actually the Greek letter ``chi''
  550. rather than the English letter ``ex''. Pronounce @TeX{} as if the
  551. @samp{X} were the last sound in the name `Bach'; but pronounce Texinfo
  552. as if the @samp{x} were a `k'. Spell ``Texinfo'' with a capital ``T''
  553. and write the other letters in lower case.}
  554. is a documentation system that uses a single source file to produce both
  555. on-line information and printed output. This means that instead of
  556. writing two different documents, one for the on-line help or other on-line
  557. information and the other for a typeset manual or other printed work, you
  558. need write only one document. When the work is revised, you need revise
  559. only one document. (You can read the on-line information, known as an
  560. @dfn{Info file}, with an Info documentation-reading program.)@refill
  561. @menu
  562. * Using Texinfo:: Create a conventional printed book
  563. or an Info file.
  564. * Info Files:: What is an Info file?
  565. * Printed Books:: Characteristics of a printed book or manual.
  566. * Formatting Commands:: @@-commands are used for formatting.
  567. * Conventions:: General rules for writing a Texinfo file.
  568. * Comments:: How to write comments and mark regions that
  569. the formatting commands will ignore.
  570. * Minimum:: What a Texinfo file must have.
  571. * Six Parts:: Usually, a Texinfo file has six parts.
  572. * Short Sample:: A short sample Texinfo file.
  573. * Acknowledgements::
  574. @end menu
  575. @c ************************************************************************
  576. \input texinfo @c -*-texinfo-*-
  577. @c %**start of header
  578. @setfilename psim.info
  579. @settitle PSIM
  580. @setchapternewpage odd
  581. @c %**end of header
  582. @ifinfo
  583. This file documents the program PSIM.
  584. Copyright (C) 1994-1996, Andrew Cagney.
  585. Permission is granted to make and distribute verbatim copies of
  586. this manual provided the copyright notice and this permission notice
  587. are preserved on all copies.
  588. @ignore
  589. Permission is granted to process this file through Tex and print the
  590. results, provided the printed document carries copying permission
  591. notice identical to this one except for the removal of this paragraph
  592. (this paragraph not being relevant to the printed manual).
  593. @end ignore
  594. Permission is granted to copy and distribute modified versions of this
  595. manual under the conditions for verbatim copying, subject to the terms
  596. of the GNU General Public License, which includes the provision that the
  597. entire resulting derived work is distributed under the terms of a
  598. permission notice identical to this one.
  599. Permission is granted to copy and distribute translations of this manual
  600. into another language, under the above conditions for modified versions.
  601. @end ifinfo
  602. @titlepage
  603. @title PSIM
  604. @subtitle Model of the PowerPC Environments
  605. @author Andrew Cagney
  606. @page
  607. @vskip Opt plus ifill
  608. Copyright @copyright{} 1994-1996, Andrew Cagney
  609. This is the first edition of the PSIM manual and is consistent with PSIM
  610. version 1.0.
  611. Permission is granted to make and distribute verbatim copies of
  612. this manual provided the copyright notice and this permission notice
  613. are preserved on all copies.
  614. Permission is granted to copy and distribute modified versions of this
  615. manual under the conditions for verbatim copying, subject to the terms
  616. of the GNU General Public License, which includes the provision that the
  617. entire resulting derived work is distributed under the terms of a
  618. permission notice identical to this one.
  619. Permission is granted to copy and distribute translations of this manual
  620. into another language, under the above conditions for modified versions.
  621. @end titlepage
  622. @menu
  623. * Copying:: Your rights and freedoms.
  624. * First Chappeter:: Getting started ....
  625. * Second Chapter:: Getting finished ....
  626. @end menu
  627. PSIM is a program written in extended ANSI-C that implements an
  628. instruction level simulation of the PowerPC environment. It is freely
  629. available in source code form under the terms of the GNU General
  630. Public License (version 3 or later).
  631. The PowerPC Architecture is described as having three levels of
  632. compliance:
  633. UEA - User Environment Architecture
  634. VEA - Virtual Environment Architecture
  635. OEA - Operating Environment Architecture
  636. PSIM both implements all three levels of the PowerPC and includes (for
  637. each level) a corresponding simulated run-time environment.
  638. In addition, PSIM, to the execution unit level, models the performance
  639. of most of the current PowerPC implementations (contributed by Michael
  640. Meissner). This detailed performance monitoring (unlike many other
  641. simulators) resulting in only a relatively marginal reduction in the
  642. simulators performance.
  643. A description of how to build PSIM is contained in the file:
  644. ftp://ftp.ci.com.au/pub/psim/INSTALL
  645. or ftp://cambridge.cygnus.com/pub/psim/INSTALL
  646. while an overview of how to use PSIM is in:
  647. ftp://ftp.ci.com.au/pub/psim/RUN
  648. or ftp://cambridge.cygnus.com/pub/psim/RUN
  649. This file is found in:
  650. ftp://ftp.ci.com.au/pub/psim/README
  651. or ftp://cambridge.cygnus.com/pub/psim/README
  652. Thanks goes firstly to:
  653. Corinthian Engineering Pty Ltd
  654. Cygnus Support
  655. Highland Logic Pty Ltd
  656. who provided the resources needed for making this software available
  657. on the Internet.
  658. More importantly I'd like to thank the following individuals who each
  659. contributed in their own unique way:
  660. Allen Briggs, Bett Koch, David Edelsohn, Gordon Irlam,
  661. Michael Meissner, Bob Mercier, Richard Perini, Dale Rahn,
  662. Richard Stallman, Mitchele Walker
  663. Andrew Cagney
  664. Feb, 1995
  665. ----------------------------------------------------------------------
  666. What features does PSIM include?
  667. Monitoring and modeling
  668. PSIM includes (thanks to Michael Meissner)
  669. a detailed model of most of the PowerPC
  670. implementations to the functional unit level.
  671. SMP
  672. The PowerPC ISA defines SMP synchronizing instructions.
  673. This simulator implements a limited, but functional,
  674. subset of the PowerPC synchronization instructions
  675. behaviour. Programs that restrict their synchronization
  676. primitives to those that work with this functional
  677. sub-set (eg P() and V()) are able to run on the SMP
  678. version of PSIM.
  679. People intending to use this system should study
  680. the code implementing the lwarx instruction.
  681. ENDIAN SUPPORT
  682. PSIM implements the PowerPC's big and little (xor
  683. endian) modes and correctly simulates code that
  684. switches between these two modes.
  685. In addition, psim can model a true little-endian
  686. machine.
  687. ISA (Instruction Set Architecture) models
  688. PSIM includes a model of the UEA, VEA and OEA. This
  689. includes the time base registers (VEA) and HTAB
  690. and BATS (OEA).
  691. In addition, a preliminary model of the 64 bit
  692. PowerPC architecture is implemented.
  693. IO Hardware
  694. PSIM's internals are based around the concept
  695. of a Device Tree. This tree intentionally
  696. resembles that of the Device Tree found in
  697. OpenBoot firmware. PSIM is flexible enough
  698. to allow the user to fully configure this device
  699. tree (and consequently the hardware model) at
  700. run time.
  701. Run-time environments:
  702. PSIM's UEA model includes emulation for BSD
  703. based UNIX system calls.
  704. PSIM's OEA model includes emulation of either:
  705. o OpenBoot client interface
  706. o MOTO's BUG interface.
  707. Floating point
  708. Preliminary support for floating point is included.
  709. Who would be interested in PSIM?
  710. o the curious
  711. Using psim, gdb, gcc and binutils the curious
  712. user can construct an environment that allows
  713. them to play with PowerPC Environment without
  714. the need for real hardware.
  715. o the analyst
  716. PSIM includes many (contributed) monitoring
  717. features which (unlike many other simulators)
  718. do not come with a great penalty in performance.
  719. Thus the performance analyst is able to use
  720. this simulator to analyse the performance of
  721. the system under test.
  722. If PSIM doesn't monitor a components of interest,
  723. the source code is freely available, and hence
  724. there is no hinderance to changing things
  725. to meet a specific analysts needs.
  726. o the serious SW developer
  727. PSIM models all three levels of the PowerPC
  728. Architecture: UEA, VEA and OEA. Further,
  729. the internal design is such that PSIM can
  730. be extended to support additional requirements.
  731. What performance analysis measurements can PSIM perform?
  732. Below is the output from a recent analysis run
  733. (contributed by Michael Meissner):
  734. For the following program:
  735. long
  736. simple_rand ()
  737. {
  738. static unsigned long seed = 47114711;
  739. unsigned long this = seed * 1103515245 + 12345;
  740. seed = this;
  741. /* cut-cut-cut - see the file RUN.psim */
  742. }
  743. Here is the current output generated with the -I switch on a P90
  744. (the compiler used is the development version of GCC with a new
  745. scheduler replacing the old one):
  746. CPU #1 executed 41,994 AND instructions.
  747. CPU #1 executed 519,785 AND Immediate instructions.
  748. .
  749. .
  750. .
  751. CPU #1 executed 1 System Call instruction.
  752. CPU #1 executed 207,746 XOR instructions.
  753. CPU #1 executed 23,740,856 cycles.
  754. CPU #1 executed 10,242,780 stalls waiting for data.
  755. CPU #1 executed 1 stall waiting for a function unit.
  756. .
  757. .
  758. .
  759. CPU #1 executed 3,136,229 branch functional unit instructions.
  760. CPU #1 executed 16,949,396 instructions that were accounted for in timing info.
  761. CPU #1 executed 871,920 data reads.
  762. CPU #1 executed 971,926 data writes.
  763. CPU #1 executed 221 icache misses.
  764. CPU #1 executed 16,949,396 instructions in total.
  765. Simulator speed was 250,731 instructions/second
  766. What motivated PSIM?
  767. As an idea, psim was first discussed seriously during mid
  768. 1994. At that time its main objectives were:
  769. o good performance
  770. Many simulators loose out by only providing
  771. a binary interface to the internals. This
  772. interface eventually becomes a bottle neck
  773. in the simulators performance.
  774. It was intended that PSIM would avoid this
  775. problem by giving the user access to the
  776. full source code.
  777. Further, by exploiting the power of modern
  778. compilers it was hoped that PSIM would achieve
  779. good performance with out having to compromise
  780. its internal design.
  781. o practical portability
  782. Rather than try to be portable to every
  783. C compiler on every platform, it was decided
  784. that PSIM would restrict its self to supporting
  785. ANSI compilers that included the extension
  786. of a long long type.
  787. GCC is one such compiler, consequently PSIM
  788. should be portable to any machine running GCC.
  789. o flexibility in its design
  790. PSIM should allow the user to select the
  791. features required and customise the build
  792. accordingly. By having the source code,
  793. the compiler is able to eliminate any un
  794. used features of the simulator.
  795. After all, let the compiler do the work.
  796. o SMP
  797. A model that allowed the simulation of
  798. SMP platforms with out the large overhead
  799. often encountered with such models.
  800. PSIM achieves each of these objectives.
  801. Is PSIM PowerPC Platform (PPCP) (nee CHRP) Compliant?
  802. No.
  803. Among other things it does not have an Apple ROM socket.
  804. Could PSIM be extended so that it models a CHRP machine?
  805. Yes.
  806. PSIM has been designed with the CHRP spec in mind. To model
  807. a CHRP desktop the following would need to be added:
  808. o An apple ROM socket :-)
  809. o Model of each of the desktop IO devices
  810. o An OpenPIC device.
  811. o RTAS (Run Time Abstraction Services).
  812. o A fully populated device tree.
  813. Is the source code available?
  814. Yes.
  815. The source code to PSIM is available under the terms of
  816. the GNU Public Licence. This allows you to distribute
  817. the source code for free but with certain conditions.
  818. See the file:
  819. ftp://archie.au/gnu/COPYING
  820. For details of the terms and conditions.
  821. Where do I send bugs or report problems?
  822. There is a mailing list (subscribe through majordomo@ci.com.au) at:
  823. powerpc-psim@ci.com.au
  824. If I get the ftp archive updated I post a note to that mailing list.
  825. In addition your welcome to send bugs or problems either to me or to
  826. that e-mail list.
  827. This list currently averages zero articles a day.
  828. Does PSIM have any limitations or problems?
  829. PSIM can't run rs6000/AIX binaries - At present PSIM can only
  830. simulate static executables. Since an AIX executable is
  831. never static, PSIM is unable to simulate its execution.
  832. PSIM is still under development - consequently there are going
  833. to be bugs.
  834. See the file BUGS (included in the distribution) for any
  835. other outstanding issues.