1This is poke.info, produced by makeinfo version 6.3 from poke.texi. 2 3This manual describes GNU poke (version 1.0, 25 February 2021). 4 5 Copyright (C) 2019-2021 The poke authors. 6 7 Permission is granted to copy, distribute and/or modify this 8 document under the terms of the GNU Free Documentation License, 9 Version 1.3 or any later version published by the Free Software 10 Foundation; with no Invariant Sections, no Front-Cover Texts, and 11 no Back-Cover Texts. A copy of the license is included in the 12 section entitled "GNU Free Documentation License". 13INFO-DIR-SECTION Editors 14START-INFO-DIR-ENTRY 15* poke: (poke). Interactive editor for binary files. 16END-INFO-DIR-ENTRY 17 18 19Indirect: 20poke.info-1: 698 21poke.info-2: 300833 22 23Tag Table: 24(Indirect) 25Node: Top698 26Node: Introduction7985 27Node: Motivation8291 28Node: Decode-Compute-Encode9069 29Node: Describe-Compute12296 30Node: Nomenclature14313 31Node: Invoking poke15773 32Node: Commanding poke17570 33Node: The REPL18156 34Node: Evaluation19520 35Node: Commands and Dot-Commands20736 36Node: Command Files24101 37Node: Scripts25441 38Node: Basic Editing26381 39Node: Binary Files27627 40Node: Files as IO Spaces30009 41Node: Dumping File Contents33404 42Ref: Dumping File Contents-Footnote-141113 43Ref: Dumping File Contents-Footnote-241347 44Node: Poking Bytes41557 45Node: Values and Variables45912 46Node: From Bytes to Integers48510 47Ref: From Bytes to Integers-Footnote-154018 48Node: Big and Little Endians54255 49Ref: Big and Little Endians-Footnote-160437 50Node: Negative Integers60492 51Node: Weird Integers63995 52Node: Unaligned Integers72868 53Node: Integers of Different Sizes76997 54Node: Offsets and Sizes77557 55Ref: Offsets and Sizes-Footnote-184084 56Ref: Offsets and Sizes-Footnote-284197 57Node: Buffers as IO Spaces84235 58Node: Copying Bytes86431 59Node: Saving Buffers in Files88762 60Node: Character Sets90011 61Node: From Bytes to Characters92399 62Node: ASCII Strings95509 63Node: From Strings to Characters100436 64Node: Structuring Data101188 65Node: The SBM Format102272 66Node: Poking a SBM Image106278 67Node: Modifying SBM Images119434 68Ref: Modifying SBM Images-Footnote-1134137 69Node: Defining Types134175 70Node: Pickles137614 71Node: Poking Structs144291 72Node: How Structs are Built147652 73Node: Variables in Structs150886 74Node: Functions in Structs153133 75Node: Struct Methods155688 76Node: Dealing with Alternatives162000 77Ref: Dealing with Alternatives-Footnote-1167878 78Node: Structured Integers167916 79Node: Maps and Map-files173216 80Node: Editing using Variables174134 81Node: poke Maps178554 82Node: Loading Maps182020 83Node: Multiple Maps186514 84Node: Auto-map188946 85Node: Constructing Maps190086 86Node: Predefined Maps191667 87Node: Writing Pickles191969 88Node: Pretty-printers193237 89Node: Setters and Getters198632 90Node: Configuration201194 91Node: pokerc201471 92Ref: pokerc-Footnote-1202538 93Node: Load Path202624 94Node: Styling203705 95Node: Time203808 96Node: POSIX Time204047 97Node: Colors204506 98Node: The Color Registry204862 99Node: RGB24 Encoding206731 100Node: Audio207666 101Node: MP3207804 102Node: ID3V1 Tags207911 103Node: Object Formats210637 104Node: ELF211006 105Node: Dwarf211096 106Node: Programs211190 107Node: argp211464 108Node: Dot-Commands214753 109Node: load command215573 110Node: source command216243 111Node: file command216563 112Node: mem command217448 113Node: nbd command217929 114Node: ios command218835 115Node: close command219200 116Node: doc command219467 117Node: editor command220490 118Node: info command221050 119Node: set command222427 120Node: vm command224558 121Node: .vm disassemble225011 122Node: .vm profile225952 123Node: exit command226441 124Node: quit command226762 125Node: Commands226945 126Node: dump227277 127Node: Information dump shows229136 128Node: Presentation options for dump230871 129Node: copy232656 130Node: save233560 131Node: extract234897 132Node: scrabble235378 133Node: The Poke Language236737 134Node: Integers237868 135Node: Integer Literals239013 136Ref: Integer Literals-Footnote-1241859 137Node: Characters242004 138Node: Booleans242746 139Node: Integer Types243045 140Node: Casting Integers244702 141Node: Relational Operators246282 142Node: Arithmetic Operators246921 143Node: Bitwise Operators248011 144Node: Boolean Operators249177 145Node: Integer Attributes249615 146Node: Offsets250301 147Node: Offset Literals250805 148Node: Offset Units251731 149Node: Offset Types254553 150Node: Casting Offsets255597 151Node: Offset Operations256214 152Node: Offset Attributes258511 153Node: Strings259266 154Node: String Literals259928 155Node: String Types260807 156Node: String Indexing260999 157Node: String Concatenation261737 158Node: String Attributes262961 159Node: Arrays263628 160Node: Array Literals264261 161Node: Array Types265843 162Node: Array Constructors270517 163Node: Array Comparison271656 164Node: Array Indexing272062 165Node: Array Trimming272846 166Node: Array Elements274521 167Node: Array Concatenation274895 168Node: Array Attributes275359 169Node: Structs276275 170Node: Struct Types277515 171Node: Struct Constructors278552 172Node: Struct Comparison280604 173Node: Field Endianness281027 174Node: Accessing Fields281658 175Node: Field Constraints282188 176Node: Field Initializers283731 177Node: Field Labels286218 178Node: Pinned Structs287875 179Node: The OFFSET variable288601 180Node: Integral Structs289555 181Node: Unions289712 182Node: Union Constructors290523 183Node: Optional Fields291991 184Node: Casting Structs293345 185Node: Declarations in Structs294774 186Node: Methods294949 187Node: Struct Attributes295094 188Node: Types296258 189Node: type296492 190Node: The any Type297237 191Node: The isa Operator298033 192Node: Assignments298395 193Node: Compound Statements299158 194Node: Conditionals299765 195Node: if-else300833 196Node: Conditional Expression301303 197Node: Loops301730 198Node: while302116 199Node: for302811 200Node: for-in303196 201Node: Expression Statements304147 202Node: Functions304703 203Node: Function Declarations305247 204Node: Optional Arguments306591 205Node: Variadic Functions307369 206Node: Calling Functions307764 207Node: Function Types309091 208Node: Lambdas309881 209Node: Function Attributes310508 210Node: Endianness310754 211Node: set endian311406 212Node: Endian in Fields312293 213Node: Endian built-ins312561 214Node: Mapping316920 215Node: IO Spaces317636 216Node: open318286 217Node: close320221 218Node: flush320679 219Node: get_ios321354 220Node: set_ios321799 221Node: iosize322347 222Node: The Map Operator322694 223Node: Mapping Simple Types325878 224Node: Mapping Structs326320 225Node: Mapping Arrays326483 226Node: Array maps bounded by number of elements326922 227Node: Array maps bounded by size328196 228Node: Unbounded array maps331505 229Node: Mapped bounds in bounded arrays332987 230Node: Non-strict Mapping334520 231Node: Unmapping335285 232Node: Exception Handling335830 233Node: Exceptions336372 234Node: try-catch339130 235Node: try-until340133 236Node: raise341001 237Node: assert341544 238Node: Terminal342065 239Node: Terminal Colors342594 240Node: Terminal Styling343770 241Node: Terminal Hyperlinks344950 242Node: Printing345532 243Node: print345840 244Node: printf346312 245Node: Comments349751 246Node: Multi-line comments350143 247Node: Single line comments350425 248Node: Vertical separator350785 249Node: Modules351121 250Node: System352807 251Node: getenv353127 252Node: rand353475 253Node: Debugging354014 254Node: __LINE__ and __FILE__354248 255Node: strace354862 256Node: The Standard Library355175 257Node: Standard Integral Types356060 258Node: Standard Offset Types356731 259Node: Standard Units357080 260Node: Conversion Functions357725 261Node: catos358183 262Node: stoca358823 263Node: atoi359416 264Node: ltos360064 265Node: Array Functions360336 266Node: reverse360647 267Node: String Functions360888 268Node: ltrim361268 269Node: rtrim361604 270Node: strchr361956 271Node: Sorting Functions362363 272Node: qsort362581 273Node: CRC Functions363273 274Node: Dates and Times363928 275Node: Offset Functions365628 276Node: alignto365842 277Node: The Machine-Interface366141 278Node: MI overview366855 279Node: Running poke in MI mode368158 280Node: MI transport369075 281Node: MI protocol369605 282Node: MI Requests370091 283Node: Request EXIT370253 284Node: MI Responses370429 285Node: Response EXIT370622 286Node: MI Events371005 287Node: Event INITIALIZE371174 288Node: The Poke Virtual Machine371664 289Node: PVM Instructions371904 290Node: VM instructions372862 291Node: Instruction canary373541 292Node: Instruction exit373942 293Node: Instruction pushend374288 294Node: Instruction popend374620 295Node: Instruction pushob375009 296Node: Instruction popob375403 297Node: Instruction pushom375934 298Node: Instruction popom376348 299Node: Instruction pushoo376899 300Node: Instruction popoo377287 301Node: Instruction pushoi377712 302Node: Instruction popoi378195 303Node: Instruction pushod378691 304Node: Instruction popod379040 305Node: Instruction pushoac379410 306Node: Instruction popoac379823 307Node: Instruction pushopp380241 308Node: Instruction popopp380612 309Node: Instruction pushoc381014 310Node: Instruction popoc381324 311Node: Instruction pushobc381655 312Node: Instruction popobc381980 313Node: Instruction sync382324 314Node: IOS related instructions382765 315Node: Instruction open383161 316Node: Instruction close383907 317Node: Instruction flush384349 318Node: Instruction pushios384834 319Node: Instruction popios385244 320Node: Instruction iosize385673 321Node: Instruction iogetb386146 322Node: Instruction iosetb386748 323Node: Function management instructions387328 324Node: Instruction call387635 325Node: Instruction prolog388058 326Node: Instruction return388474 327Node: Environment instructions388764 328Node: Instruction pushf389165 329Node: Instruction popf389566 330Node: Instruction pushvar389818 331Node: Instruction pushtopvar390246 332Node: Instruction popvar390772 333Node: Instruction regvar391183 334Node: Instruction duc391526 335Node: Instruction pec391823 336Node: Printing Instructions392101 337Node: Instruction printind392787 338Node: Instruction printi393215 339Node: Instruction printiu393558 340Node: Instruction printl393906 341Node: Instruction printlu394239 342Node: Instruction prints394585 343Node: Instruction beghl394864 344Node: Instruction endhl395155 345Node: Instruction begsc395529 346Node: Instruction endsc395934 347Node: Main stack manipulation instructions396269 348Node: Instruction push396935 349Node: Instruction drop397209 350Node: Instruction drop2397510 351Node: Instruction drop3397826 352Node: Instruction drop4398149 353Node: Instruction swap398469 354Node: Instruction nip398763 355Node: Instruction nip2399057 356Node: Instruction nip3399361 357Node: Instruction dup399669 358Node: Instruction over399966 359Node: Instruction rot400275 360Node: Instruction nrot400589 361Node: Instruction tuck400909 362Node: Instruction quake401229 363Node: Instruction revn401535 364Node: Instruction pushhi401840 365Node: Instruction pushlo402296 366Node: Instruction push32402750 367Node: Registers manipulation instructions403184 368Node: Instruction pushr403523 369Node: Instruction popr403801 370Node: Instruction setr404121 371Node: Return stack manipulation instructions404413 372Node: Instruction saver404790 373Node: Instruction restorer405101 374Node: Instruction tor405465 375Node: Instruction fromr405794 376Node: Instruction atr406123 377Node: Arithmetic instructions406411 378Node: Instruction addi407300 379Node: Instruction addiu407685 380Node: Instruction addlu408245 381Node: Instruction subi408577 382Node: Instruction subiu408895 383Node: Instruction subl409229 384Node: Instruction sublu409549 385Node: Instruction muli409885 386Node: Instruction muliu410203 387Node: Instruction mull410537 388Node: Instruction mullu410859 389Node: Instruction divi411197 390Node: Instruction diviu411619 391Node: Instruction divl412057 392Node: Instruction divlu412481 393Node: Instruction modi412921 394Node: Instruction modiu413334 395Node: Instruction modl413763 396Node: Instruction modlu414178 397Node: Instruction negi414609 398Node: Instruction negiu414920 399Node: Instruction negl415250 400Node: Instruction neglu415561 401Node: Instruction powi415886 402Node: Instruction powiu416310 403Node: Instruction powl416749 404Node: Instruction powlu417173 405Node: Relational instructions417587 406Node: Instruction eqi418454 407Node: Instruction eqiu418764 408Node: Instruction eql419115 409Node: Instruction eqlu419451 410Node: Instruction eqs419802 411Node: Instruction nei420135 412Node: Instruction neiu420473 413Node: Instruction nel420827 414Node: Instruction nelu421167 415Node: Instruction nes421522 416Node: Instruction nn421860 417Node: Instruction nnn422181 418Node: Instruction lti422505 419Node: Instruction ltiu422855 420Node: Instruction ltl423229 421Node: Instruction ltlu423578 422Node: Instruction lei423951 423Node: Instruction leiu424311 424Node: Instruction lel424695 425Node: Instruction lelu425053 426Node: Instruction gti425435 427Node: Instruction gtiu425789 428Node: Instruction gtl426167 429Node: Instruction gtlu426519 430Node: Instruction gei426891 431Node: Instruction geiu427254 432Node: Instruction gel427641 433Node: Instruction gelu428002 434Node: Instruction lts428387 435Node: Instruction gts428759 436Node: Instruction ges429133 437Node: Instruction les429516 438Node: Concatenation instructions429872 439Node: Instruction sconc430113 440Node: Logical instructions430390 441Node: Instruction and430653 442Node: Instruction or430930 443Node: Instruction not431227 444Node: Bitwise instructions431491 445Node: Instruction bxori432043 446Node: Instruction bxoriu432341 447Node: Instruction bxorl432682 448Node: Instruction bxorlu433009 449Node: Instruction bori433351 450Node: Instruction boriu433661 451Node: Instruction borl433986 452Node: Instruction borlu434297 453Node: Instruction bandi434616 454Node: Instruction bandiu434931 455Node: Instruction bandl435265 456Node: Instruction bandlu435585 457Node: Instruction bnoti435921 458Node: Instruction bnotiu436230 459Node: Instruction bnotl436549 460Node: Instruction bnotlu436854 461Node: Shift instructions437147 462Node: Instruction bsli437519 463Node: Instruction bsliu438009 464Node: Instruction bsll438539 465Node: Instruction bslu439054 466Node: Instruction bsri439580 467Node: Instruction bsriu439950 468Node: Instruction bsrl440335 469Node: Instruction bsrlu440706 470Node: Compare-and-swap instructions441066 471Node: Instruction swapgti441386 472Node: Instruction swapgtiu441742 473Node: Instruction swapgtl442142 474Node: Instruction swapgtlu442528 475Node: Branch instructions442901 476Node: Instruction ba443334 477Node: Instruction bn443569 478Node: Instruction bnn443869 479Node: Instruction bzi444177 480Node: Instruction bziu444481 481Node: Instruction bzl444799 482Node: Instruction bzlu445103 483Node: Instruction bzni445421 484Node: Instruction bnziu445734 485Node: Instruction bnzl446061 486Node: Instruction bnzlu446376 487Node: Conversion instructions446679 488Node: Instruction ctos447257 489Node: Instruction itoi447595 490Node: Instruction itoiu447961 491Node: Instruction itol448340 492Node: Instruction itolu448704 493Node: Instruction iutoi449082 494Node: Instruction iutoiu449465 495Node: Instruction iutol449861 496Node: Instruction iutolu450242 497Node: Instruction ltoi450635 498Node: Instruction ltoiu451004 499Node: Instruction ltol451384 500Node: Instruction ltolu451749 501Node: Instruction lutoi452128 502Node: Instruction lutoiu452512 503Node: Instruction lutol452909 504Node: Instruction lutolu453249 505Node: String instructions453576 506Node: Instruction strref453839 507Node: Instruction substr454406 508Node: Instruction muls455029 509Node: Array instructions455526 510Node: Instruction mka455865 511Node: Instruction ains456416 512Node: Instruction arem457195 513Node: Instruction aset457661 514Node: Instruction aref458243 515Node: Instruction arefo458709 516Node: Instruction asettb459181 517Node: Struct instructions459576 518Node: Instruction mksct459991 519Node: Instruction sset460683 520Node: Instruction sref461113 521Node: Instruction srefo461614 522Node: Instruction srefmnt462110 523Node: Instruction srefnt462543 524Node: Instruction srefi463014 525Node: Instruction srefia463502 526Node: Instruction srefio464014 527Node: Instruction smodi464507 528Node: Offset Instructions464980 529Node: Instruction mko465299 530Node: Instruction ogetm465620 531Node: Instruction osetm465911 532Node: Instruction ogetu466229 533Node: Instruction ogetbt466520 534Node: Instructions to handle mapped values466791 535Node: Instruction mm467467 536Node: Instruction map467761 537Node: Instruction unmap468127 538Node: Instruction reloc468477 539Node: Instruction ureloc469002 540Node: Instruction mgets469410 541Node: Instruction msets469798 542Node: Instruction mgeto470191 543Node: Instruction mseto470583 544Node: Instruction mgetios470976 545Node: Instruction msetios471367 546Node: Instruction mgetm471852 547Node: Instruction msetm472231 548Node: Instruction mgetw472614 549Node: Instruction msetw472991 550Node: Instruction mgetsel473376 551Node: Instruction msetsel473917 552Node: Instruction mgetsiz474426 553Node: Instruction msetsiz474924 554Node: Type related instructions475368 555Node: Instruction isa475931 556Node: Instruction typof476252 557Node: Instruction tyisc476539 558Node: Instruction tyissct476860 559Node: Instruction mktyv477186 560Node: Instruction mktyany477474 561Node: Instruction mktyi477766 562Node: Instruction mktys478203 563Node: Instruction mktyo478474 564Node: Instruction mktya478919 565Node: Instruction tyagett479367 566Node: Instruction tyagetb479692 567Node: Instruction mktyc480010 568Node: Instruction mktysct480393 569Node: Instruction tysctn480895 570Node: IO instructions481219 571Node: Instruction write481853 572Node: Instruction peeki482221 573Node: Instruction peekiu482653 574Node: Instruction peekl483069 575Node: Instruction peeklu483499 576Node: Instruction peekdi483915 577Node: Instruction peekdiu484299 578Node: Instruction peekdl484674 579Node: Instruction peekdlu485056 580Node: Instruction pokei485428 581Node: Instruction pokeiu485851 582Node: Instruction pokel486257 583Node: Instruction pokelu486676 584Node: Instruction pokedi487082 585Node: Instruction pokediu487460 586Node: Instruction pokedl487829 587Node: Instruction pokedlu488205 588Node: Instruction peeks488571 589Node: Instruction pokes488869 590Node: Exceptions handling instructions489143 591Node: Instruction pushe489439 592Node: Instruction pope489783 593Node: Instruction raise490119 594Node: Debugging Instructions490399 595Node: Instruction strace490692 596Node: Instruction disas491076 597Node: Instruction note491406 598Node: System Interaction Instructions491800 599Node: Instruction getenv492062 600Node: Miscellaneous Instructions492486 601Node: Instruction nop492786 602Node: Instruction rand492997 603Node: Instruction time493405 604Node: Instruction siz493789 605Node: Instruction sel494072 606Node: Table of ASCII Codes494575 607Node: GNU Free Documentation License498799 608Node: Concept Index523971 609 610End Tag Table 611