%!PS %%Version: 3.3.2 %%DocumentFonts: (atend) %%Pages: (atend) %%EndComments % % Version 3.3.2 prologue for troff files. % /#copies 1 store /aspectratio 1 def /formsperpage 1 def /landscape false def /linewidth .3 def /magnification 1 def /margin 0 def /orientation 0 def /resolution 720 def /rotation 1 def /xoffset 0 def /yoffset 0 def /roundpage true def /useclippath true def /pagebbox [0 0 612 792] def /R /Times-Roman def /I /Times-Italic def /B /Times-Bold def /BI /Times-BoldItalic def /H /Helvetica def /HI /Helvetica-Oblique def /HB /Helvetica-Bold def /HX /Helvetica-BoldOblique def /CW /Courier def /CO /Courier def /CI /Courier-Oblique def /CB /Courier-Bold def /CX /Courier-BoldOblique def /PA /Palatino-Roman def /PI /Palatino-Italic def /PB /Palatino-Bold def /PX /Palatino-BoldItalic def /Hr /Helvetica-Narrow def /Hi /Helvetica-Narrow-Oblique def /Hb /Helvetica-Narrow-Bold def /Hx /Helvetica-Narrow-BoldOblique def /KR /Bookman-Light def /KI /Bookman-LightItalic def /KB /Bookman-Demi def /KX /Bookman-DemiItalic def /AR /AvantGarde-Book def /AI /AvantGarde-BookOblique def /AB /AvantGarde-Demi def /AX /AvantGarde-DemiOblique def /NR /NewCenturySchlbk-Roman def /NI /NewCenturySchlbk-Italic def /NB /NewCenturySchlbk-Bold def /NX /NewCenturySchlbk-BoldItalic def /ZD /ZapfDingbats def /ZI /ZapfChancery-MediumItalic def /S /S def /S1 /S1 def /GR /Symbol def /inch {72 mul} bind def /min {2 copy gt {exch} if pop} bind def /show {show} bind def % so later references don't bind /widthshow {widthshow} bind def /stringwidth {stringwidth} bind def /setup { counttomark 2 idiv {def} repeat pop landscape {/orientation 90 orientation add def} if /scaling 72 resolution div def linewidth setlinewidth 1 setlinecap pagedimensions xcenter ycenter translate orientation rotation mul rotate width 2 div neg height 2 div translate xoffset inch yoffset inch neg translate margin 2 div dup neg translate magnification dup aspectratio mul scale scaling scaling scale addmetrics 0 0 moveto } def /pagedimensions { useclippath userdict /gotpagebbox known not and { /pagebbox [clippath pathbbox newpath] def roundpage currentdict /roundpagebbox known and {roundpagebbox} if } if pagebbox aload pop 4 -1 roll exch 4 1 roll 4 copy landscape {4 2 roll} if sub /width exch def sub /height exch def add 2 div /xcenter exch def add 2 div /ycenter exch def userdict /gotpagebbox true put } def /addmetrics { /Symbol /S null Sdefs cf /Times-Roman /S1 StandardEncoding dup length array copy S1defs cf } def /pagesetup { /page exch def currentdict /pagedict known currentdict page known and { page load pagedict exch get cvx exec } if } def /decodingdefs [ {counttomark 2 idiv {y moveto show} repeat} {neg /y exch def counttomark 2 idiv {y moveto show} repeat} {neg moveto {2 index stringwidth pop sub exch div 0 32 4 -1 roll widthshow} repeat} {neg moveto {spacewidth sub 0.0 32 4 -1 roll widthshow} repeat} {counttomark 2 idiv {y moveto show} repeat} {neg setfunnytext} ] def /setdecoding {/t decodingdefs 3 -1 roll get bind def} bind def /w {neg moveto show} bind def /m {neg dup /y exch def moveto} bind def /done {/lastpage where {pop lastpage} if} def /f { dup /font exch def findfont exch dup /ptsize exch def scaling div dup /size exch def scalefont setfont linewidth ptsize mul scaling 10 mul div setlinewidth /spacewidth ( ) stringwidth pop def } bind def /changefont { /fontheight exch def /fontslant exch def currentfont [ 1 0 fontheight ptsize div fontslant sin mul fontslant cos div fontheight ptsize div 0 0 ] makefont setfont } bind def /sf {f} bind def /cf { dup length 2 idiv /entries exch def /chtab exch def /newencoding exch def /newfont exch def findfont dup length 1 add dict /newdict exch def {1 index /FID ne {newdict 3 1 roll put}{pop pop} ifelse} forall newencoding type /arraytype eq {newdict /Encoding newencoding put} if newdict /Metrics entries dict put newdict /Metrics get begin chtab aload pop 1 1 entries {pop def} for newfont newdict definefont pop end } bind def % % A few arrays used to adjust reference points and character widths in some % of the printer resident fonts. If square roots are too high try changing % the lines describing /radical and /radicalex to, % % /radical [0 -75 550 0] % /radicalex [-50 -75 500 0] % % Move braceleftbt a bit - default PostScript character is off a bit. % /Sdefs [ /bracketlefttp [201 500] /bracketleftbt [201 500] /bracketrighttp [-81 380] /bracketrightbt [-83 380] /braceleftbt [203 490] /bracketrightex [220 -125 500 0] /radical [0 0 550 0] /radicalex [-50 0 500 0] /parenleftex [-20 -170 0 0] /integral [100 -50 500 0] /infinity [10 -75 730 0] ] def /S1defs [ /underscore [0 80 500 0] /endash [7 90 650 0] ] def % % Tries to round clipping path dimensions, as stored in array pagebbox, so they % match one of the known sizes in the papersizes array. Lower left coordinates % are always set to 0. % /roundpagebbox { 7 dict begin /papersizes [8.5 inch 11 inch 14 inch 17 inch] def /mappapersize { /val exch def /slop .5 inch def /diff slop def /j 0 def 0 1 papersizes length 1 sub { /i exch def papersizes i get val sub abs dup diff le {/diff exch def /j i def} {pop} ifelse } for diff slop lt {papersizes j get} {val} ifelse } def pagebbox 0 0 put pagebbox 1 0 put pagebbox dup 2 get mappapersize 2 exch put pagebbox dup 3 get mappapersize 3 exch put end } bind def %%EndProlog %%BeginSetup mark /linewidth 0.5 def /#copies 1 store /landscape false def /resolution 720 def % % Encoding vector and redefinition of findfont for the ISO Latin1 standard. % The 18 characters missing from ROM based fonts on older printers are noted % below. % /ISOLatin1Encoding [ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent /dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron /space /exclamdown /cent /sterling /currency /yen /brokenbar % missing /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree % missing /plusminus % missing /twosuperior % missing /threesuperior % missing /acute /mu % missing /paragraph /periodcentered /cedilla /onesuperior % missing /ordmasculine /guillemotright /onequarter % missing /onehalf % missing /threequarters % missing /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth % missing /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply % missing /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute % missing /Thorn % missing /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth % missing /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide % missing /oslash /ugrave /uacute /ucircumflex /udieresis /yacute % missing /thorn % missing /ydieresis ] def /NewFontDirectory FontDirectory maxlength dict def % % Apparently no guarantee findfont is defined in systemdict so the obvious % % systemdict /findfont get exec % % can generate an error. So far the only exception is a VT600 (version 48.0). % userdict /@RealFindfont known not { userdict begin /@RealFindfont systemdict begin /findfont load end def end } if /findfont { dup NewFontDirectory exch known not { dup %dup systemdict /findfont get exec % not always in systemdict dup userdict /@RealFindfont get exec dup /Encoding get StandardEncoding eq { dup length dict begin {1 index /FID ne {def}{pop pop} ifelse} forall /Encoding ISOLatin1Encoding def currentdict end /DummyFontName exch definefont } if NewFontDirectory 3 1 roll put } if NewFontDirectory exch get } bind def setup 2 setdecoding %%EndSetup %%Page: 1 1 /saveobj save def mark 1 pagesetup 12 B f (A manual for the Plan 9 assembler)6 1775 1 1992 1220 t 10 I f (Rob Pike)1 363 1 2698 1480 t 10 B f (Disclaimer)720 2140 w 10 R f ( some of the assembler's strange properties but I am not responsible)11 2759(I wrote this manual to document)5 1311 2 970 2296 t (for any of them.)3 643 1 720 2416 t 10 B f (Machines)720 2656 w 10 R f ( the MIPS 3000, SPARC, Intel 386, Intel 960, AT&T Hobbit, and)11 2711(There is an assembler for each of)6 1359 2 970 2812 t ( 68020 assembler,)2 734( The)1 210(Motorola 68020.)1 677 3 720 2932 t 10 CW f (2a)2371 2932 w 10 R f ( keep things)2 491( To)1 165(, is the oldest and in many ways the prototype.)9 1893 3 2491 2932 t ( the end is a brief description of the)8 1422( At)1 151( specifically about the 68020.)4 1183(concrete, the first part of this manual is)7 1564 4 720 3052 t (differences among the other assemblers.)4 1604 1 720 3172 t 10 B f (Registers)720 3412 w 10 R f ( registers are)2 519( Data)1 243(All pre\255defined symbols in the assembler are upper\255case.)7 2307 3 970 3568 t 10 CW f (R0)4069 3568 w 10 R f (through)4220 3568 w 10 CW f (R7)4562 3568 w 10 R f (; address)1 358 1 4682 3568 t (registers are)1 484 1 720 3688 t 10 CW f (A0)1229 3688 w 10 R f (through)1374 3688 w 10 CW f (A7)1710 3688 w 10 R f (; floating\255point registers are)3 1112 1 1830 3688 t 10 CW f (F0)2967 3688 w 10 R f (through)3112 3688 w 10 CW f (F7)3448 3688 w 10 R f (.)3568 3688 w (A pointer in)2 491 1 970 3844 t 10 CW f (A6)1490 3844 w 10 R f ( to be used more)4 680(is used by the C compiler to point to data, enabling short addresses)12 2721 2 1639 3844 t ( value of)2 371(often. The)1 446 2 720 3964 t 10 CW f (A6)1573 3964 w 10 R f ( and must be set during C program initialization to the address of the)13 2875(is constant)1 436 2 1729 3964 t (externally\255defined symbol)1 1051 1 720 4084 t 10 CW f (a6base)1796 4084 w 10 R f (.)2156 4084 w ( the assembler; their meaning should be obvious)7 2062(The following hardware registers are defined in)6 2008 2 970 4240 t (given a 68020 manual:)3 913 1 720 4360 t 10 CW f (CAAR)1658 4360 w 10 R f (,)1898 4360 w 10 CW f (CACR)1948 4360 w 10 R f (,)2188 4360 w 10 CW f (CCR)2238 4360 w 10 R f (,)2418 4360 w 10 CW f (DFC)2468 4360 w 10 R f (,)2648 4360 w 10 CW f (ISP)2698 4360 w 10 R f (,)2878 4360 w 10 CW f (MSP)2928 4360 w 10 R f (,)3108 4360 w 10 CW f (SFC)3158 4360 w 10 R f (,)3338 4360 w 10 CW f (SR)3388 4360 w 10 R f (,)3508 4360 w 10 CW f (USP)3558 4360 w 10 R f (and)3763 4360 w 10 CW f (VBR)3932 4360 w 10 R f (.)4112 4360 w ( stack:)1 262(The assembler also defines several pseudo\255registers that manipulate the)8 2879 2 970 4516 t 10 CW f (FP)4140 4516 w 10 R f (,)4260 4516 w 10 CW f (SP)4314 4516 w 10 R f (, and)1 198 1 4434 4516 t 10 CW f (TOS)4661 4516 w 10 R f (.)4841 4516 w 10 CW f (FP)4920 4516 w 10 R f ( frame pointer, so)3 710(is the)1 217 2 720 4636 t 10 CW f (0\(FP\))1674 4636 w 10 R f (is the first argument,)3 833 1 2001 4636 t 10 CW f (4\(FP\))2861 4636 w 10 R f (is the second, and so on.)5 984 1 3188 4636 t 10 CW f (SP)4224 4636 w 10 R f (is the local stack)3 669 1 4371 4636 t (pointer, where automatic variables are held;)5 1786 1 720 4756 t 10 CW f (0\(SP\))2538 4756 w 10 R f ( automatic, and so on as with)6 1211(is the first)2 414 2 2870 4756 t 10 CW f (FP)4528 4756 w 10 R f (. Finally,)1 392 1 4648 4756 t 10 CW f (TOS)720 4876 w 10 R f ( procedures, saving temporary values, and)5 1717(is the top\255of\255stack register, used for pushing parameters to)8 2390 2 933 4876 t (so on.)1 239 1 720 4996 t ( track these pseudo\255registers so the above statements are true regardless of)11 3033(The assembler and loader)3 1037 2 970 5152 t ( by)1 129(what has been pushed on the hardware stack, pointed to)9 2268 2 720 5272 t 10 CW f (A7)3146 5272 w 10 R f ( name)1 245(. The)1 234 2 3266 5272 t 10 CW f (A7)3774 5272 w 10 R f (refers to the hardware stack)4 1117 1 3923 5272 t (pointer, but beware of mixed use of)6 1428 1 720 5392 t 10 CW f (A7)2174 5392 w 10 R f ( pseudo\255registers, which will cause trou\255)5 1629(and the above stack\255related)3 1091 2 2320 5392 t ( too, that the)3 524(ble. Note,)1 425 2 720 5512 t 10 CW f (PEA)1702 5512 w 10 R f (instruction is observed by the loader to alter SP and thus will insert a corre\255)14 3125 1 1915 5512 t ( be attached to)3 585( assembler accepts a label\255like name to)6 1563( The)1 206(sponding pop before all returns.)4 1277 4 720 5632 t 10 CW f (FP)4378 5632 w 10 R f (and)4525 5632 w 10 CW f (SP)4696 5632 w 10 R f (uses,)4843 5632 w (such as)1 294 1 720 5752 t 10 CW f (p+0\(FP\))1042 5752 w 10 R f (to help document that)3 878 1 1490 5752 t 10 CW f (p)2396 5752 w 10 R f ( name goes in the symbol)5 1029( The)1 207( first argument to a routine.)5 1103(is the)1 217 4 2484 5752 t (table but has no significance to the result of the program.)10 2277 1 720 5872 t 10 B f (Referring to data)2 737 1 720 6112 t 10 R f (All external references must be made relative to some pseudo\255register, either)10 3087 1 970 6268 t 10 CW f (PC)4084 6268 w 10 R f ( program)1 366(\(the virtual)1 443 2 4231 6268 t (counter\) or)1 455 1 720 6388 t 10 CW f (SB)1215 6388 w 10 R f (\(the ``static base'' register\).)3 1152 1 1375 6388 t 10 CW f (PC)2592 6388 w 10 R f ( example, to)2 519( For)1 203(counts instructions, not bytes of data.)5 1566 3 2752 6388 t (branch to the second following instruction, that is, to skip one instruction, one may write)14 3545 1 720 6508 t 9 CW f (BRA 2\(PC\))1 702 1 1440 6678 t 10 R f (Labels are also allowed, as in)5 1175 1 720 6858 t cleartomark showpage saveobj restore %%EndPage: 1 1 %%Page: 2 2 /saveobj save def mark 2 pagesetup 10 R f (\255 2 \255)2 166 1 2797 480 t 9 CW f (BRA return)1 756 1 1440 830 t (NOP)1440 940 w (return:)1008 1050 w (RTS)1440 1160 w 10 R f (When using labels, there is no)5 1204 1 720 1340 t 10 CW f (\(PC\))1949 1340 w 10 R f (annotation.)2214 1340 w (The pseudo\255register)1 796 1 970 1496 t 10 CW f (SB)1792 1496 w 10 R f ( references)1 435( Thus,)1 277(refers to the beginning of the address space of the program.)10 2389 3 1939 1496 t (to global data and procedures are written as offsets to)9 2131 1 720 1616 t 10 CW f (SB)2876 1616 w 10 R f (, as in)2 236 1 2996 1616 t 9 CW f ( TOS)1 216(MOVL $array\(SB\),)1 1026 2 1440 1786 t 10 R f (to push the address of a global array on the stack, or)11 2079 1 720 1966 t 9 CW f ( TOS)1 216(MOVL array+4\(SB\),)1 1080 2 1440 2136 t 10 R f ( the complete list of addressing)5 1271( the use of an offset;)5 832( Note)1 248(to push the second \(4\255byte\) element of the array.)8 1969 4 720 2316 t ( subroutine calls must use)4 1033( Similarly,)1 448(modes is given below.)3 894 3 720 2436 t 10 CW f (SB)3120 2436 w 10 R f (:)3240 2436 w 9 CW f (BSR exit\(SB\))1 864 1 1440 2606 t 10 R f (File\255static variables have syntax)3 1284 1 720 2786 t 9 CW f (local<>+4\(SB\))1440 2956 w 10 R f (The)720 3136 w 10 CW f (<>)900 3136 w 10 R f (will be filled in at load time by a unique integer.)10 1929 1 1045 3136 t (When a program starts, it must execute)6 1561 1 970 3292 t 9 CW f ( A6)1 162(MOVL $a6base\(SB\),)1 1080 2 1440 3462 t 10 R f ( machines such as the MIPS and SPARC that cannot load a register)12 2764( \(On)1 211(before accessing any global data.)4 1345 3 720 3642 t ( loader recognizes code that)4 1113( The)1 205( base register.)2 551(in a single instruction, constants are loaded through the static)9 2451 4 720 3762 t ( must be careful, however, not to load large)8 1815( You)1 232( static base register and treats it specially.)7 1728(initializes the)1 545 4 720 3882 t (constants on such machines when the static base register is not set up, such as early in interrupt routines.\))18 4205 1 720 4002 t 10 B f (Expressions)720 4242 w 10 R f ( an offset or a constant is expected, a primary)9 1848( Where)1 319( expect.)1 314(Expressions are mostly what one might)5 1589 4 970 4398 t ( general C constant expression is allowed in parentheses.)8 2271( A)1 122(expression with unary operators is allowed.)5 1736 3 720 4518 t (Source files are preprocessed exactly as in the C compiler, so)10 2447 1 970 4674 t 10 CW f (#define)3442 4674 w 10 R f (and)3887 4674 w 10 CW f (#include)4056 4674 w 10 R f (work.)4561 4674 w 10 B f (Laying down data)2 774 1 720 4914 t 10 R f ( the instruction stream, say for interrupt vectors, is easy: the pseudo\255instructions)11 3210(Placing data in)2 594 2 970 5070 t 10 CW f (LONG)4800 5070 w 10 R f (and)720 5190 w 10 CW f (WORD)892 5190 w 10 R f (\(but not)1 317 1 1160 5190 t 10 CW f (BYTE)1505 5190 w 10 R f ( the appropriate size, as if it were)7 1338(\) lay down the value of their single argument, of)9 1957 2 1745 5190 t (an instruction:)1 575 1 720 5310 t 9 CW f (LONG $12345)1 756 1 1440 5480 t 10 R f ( all machines except the 68020, the only such)8 1825( \(On)1 206( the instruction stream.)3 919(places the long 12345 \(base 10\) in)6 1370 4 720 5660 t (operator is)1 424 1 720 5780 t 10 CW f (WORD)1169 5780 w 10 R f (and it lays down 32\255bit quantities.\))5 1394 1 1434 5780 t ( pseudo\255instruction)1 771( The)1 207(Placing information in the data section is more painful.)8 2209 3 970 5936 t 10 CW f (DATA)4184 5936 w 10 R f (does the work,)2 589 1 4451 5936 t ( address at which to place the item, including its size, and the value to place there.)16 3323(given two arguments: an)3 997 2 720 6056 t (For example, to define a character array)6 1591 1 720 6176 t 10 CW f (array)2336 6176 w 10 R f (containing the characters)2 997 1 2661 6176 t 10 CW f (abc)3683 6176 w 10 R f (and a terminating null:)3 908 1 3888 6176 t 9 CW f ( $'a')1 270(DATA array+0\(SB\)/1,)1 1188 2 1440 6346 t ( $'b')1 270(DATA array+1\(SB\)/1,)1 1188 2 1440 6456 t ( $'c')1 270(DATA array+2\(SB\)/1,)1 1188 2 1440 6566 t ( $4)1 162(GLOBL array\(SB\),)1 972 2 1440 6676 t 10 R f (Here, the)1 367 1 720 6856 t 10 CW f (/1)1114 6856 w 10 R f (defines the number of bytes to define,)6 1523 1 1261 6856 t 10 CW f (GLOBL)2811 6856 w 10 R f (makes the symbol global, and the)5 1353 1 3139 6856 t 10 CW f ($4)4520 6856 w 10 R f (says how)1 372 1 4668 6856 t ( data is zeroed automatically.)4 1167( Uninitialized)1 572(many bytes the symbol occupies.)4 1324 3 720 6976 t cleartomark showpage saveobj restore %%EndPage: 2 2 %%Page: 3 3 /saveobj save def mark 3 pagesetup 10 R f (\255 3 \255)2 166 1 2797 480 t 10 B f (Defining a procedure)2 905 1 720 840 t 10 R f (Entry points are defined by the pseudo\255operation)6 2006 1 970 996 t 10 CW f (TEXT)3010 996 w 10 R f ( of the)2 275(, which takes as arguments the name)6 1515 2 3250 996 t (procedure \(including the ubiquitous)3 1438 1 720 1116 t 10 CW f (\(SB\))2186 1116 w 10 R f ( automatic storage to pre\255allocate on)5 1465(\) and the number of bytes of)6 1149 2 2426 1116 t ( is a complete proce\255)4 839( Here)1 245( when writing assembly language programs.)5 1774(the stack, which will usually be zero)6 1462 4 720 1236 t (dure that returns the sum of its two arguments:)8 1865 1 720 1356 t 9 CW f ( $0)1 162(TEXT sum\(SB\),)1 864 2 1008 1526 t ( R0)1 162(MOVL arg1+0\(FP\),)1 1026 2 1440 1636 t ( R0)1 162(ADDL arg2+4\(FP\),)1 1026 2 1440 1746 t (RTS)1440 1856 w 10 R f (An optional middle argument to the)5 1445 1 720 2036 t 10 CW f (TEXT)2193 2036 w 10 R f ( loader)1 278(pseudo\255op causes the)2 854 2 2461 2036 t 10 I f (not)3622 2036 w 10 R f (to insert profiling code into the)5 1261 1 3779 2036 t (subroutine, if it has the value)5 1160 1 720 2156 t 10 CW f (1)1905 2156 w 10 R f ( example,)1 388(. For)1 214 2 1965 2156 t 9 CW f ( 1, $0)2 324(TEXT sum\(SB\),)1 864 2 1008 2326 t ( R0)1 162(MOVL arg1+0\(FP\),)1 1026 2 1440 2436 t ( R0)1 162(ADDL arg2+4\(FP\),)1 1026 2 1440 2546 t (RTS)1440 2656 w 10 R f ( peculiar state, such as system call)6 1403( with)1 208( Subroutines)1 533(will not be profiled; the first version above would be.)9 2176 4 720 2836 t (routines, should not be profiled.)4 1277 1 720 2956 t (Subroutines to be called from C should place their result in)10 2479 1 970 3112 t 10 CW f (R0)3486 3112 w 10 R f ( Floating)1 397(, even if it is an address.)6 1037 2 3606 3112 t (point values are returned in)4 1104 1 720 3232 t 10 CW f (F0)1852 3232 w 10 R f ( argu\255)1 237( that return a structure to a C program receive as their first)12 2358(. Functions)1 473 3 1972 3232 t ( of the location to store the result;)7 1353(ment the address)2 671 2 720 3352 t 10 CW f (R0)2770 3352 w 10 R f (is unused in the calling protocol for such procedures.)8 2124 1 2916 3352 t ( use any registers without)4 1053(A subroutine is responsible for saving its own registers, and therefore is free to)13 3267 2 720 3472 t (saving them \(``caller saves''\).)3 1196 1 720 3592 t 10 CW f (A6)1966 3592 w 10 R f (and)2111 3592 w 10 CW f (A7)2280 3592 w 10 R f (are the exceptions as described above.)5 1523 1 2425 3592 t 10 B f (When in doubt)2 641 1 720 3832 t 10 R f (If you get confused, try using the)6 1371 1 970 3988 t 10 CW f (\255S)2374 3988 w 10 R f (option to)1 367 1 2527 3988 t 10 CW f (2c)2927 3988 w 10 R f ( standard)1 372( The)1 214( sample program.)2 714(and compiling a)2 660 4 3080 3988 t (output is valid input to the assembler.)6 1503 1 720 4108 t 10 B f (Instructions)720 4348 w 10 R f ( is chosen to match what)5 990( It)1 112( the assembler is not identical to that of the machine.)10 2116(The instruction set of)3 852 4 970 4504 t ( example,)1 401( For)1 202( augmented slightly by specific needs of the operating system.)9 2603(the compiler generates,)2 956 4 720 4624 t 10 CW f (2a)4920 4624 w 10 R f ( forms of)2 410(does not distinguish between the various)5 1729 2 720 4744 t 10 CW f (MOVE)2906 4744 w 10 R f (instruction: move quick, move address, etc.)5 1847 1 3193 4744 t ( example,)1 388( For)1 189(Instead the context does the job.)5 1287 3 720 4864 t 9 CW f ( R1)1 162(MOVL $1,)1 594 2 1440 5034 t ( R2)1 162(MOVL A0,)1 594 2 1440 5144 t ( R3)1 162(MOVW SR,)1 594 2 1440 5254 t 10 R f (generates official)1 701 1 720 5434 t 10 CW f (MOVEQ)1458 5434 w 10 R f (,)1758 5434 w 10 CW f (MOVEA)1820 5434 w 10 R f (, and)1 206 1 2120 5434 t 10 CW f (MOVESR)2363 5434 w 10 R f ( have the)2 386( number of instructions do not)5 1268(instructions. A)1 626 3 2760 5434 t ( mul\255)1 214( examples are the bitfield instructions, the)6 1679( Notable)1 367(syntax necessary to specify their entire capabilities.)6 2060 4 720 5554 t ( a complete set of generated instruction names \(in)8 2065( For)1 199( divide instructions, etc.)3 988(tiply and)1 362 4 720 5674 t 10 CW f (2a)4369 5674 w 10 R f (notation, not)1 516 1 4524 5674 t (Motorola's\) see the file)3 937 1 720 5794 t 10 CW f (/sys/src/cmd/2c/2.out.h)1683 5794 w 10 R f ( contains an enumera\255)3 878( its name, this file)4 718(. Despite)1 381 3 3063 5794 t ( by the compiler, which correspond)5 1469(tion of the instructions that appear in the intermediate files generated)10 2851 2 720 5914 t (exactly to lines of assembly language.)5 1520 1 720 6034 t 10 B f (Addressing modes)1 781 1 720 6274 t 10 R f (In this table,)2 515 1 970 6430 t 10 CW f (o)1519 6430 w 10 R f ( have the same)3 620( of the modes listed)4 819( Many)1 292(is an offset, which if zero may be elided.)8 1696 4 1613 6430 t ( instance, indexed mode with no)5 1313( For)1 194(name; scrutiny of the format will show what default is being applied.)11 2813 3 720 6550 t ( "offset" read "displace\255)3 974( For)1 195( as though a zero\255valued register were used.)7 1792(address register supplied operates)3 1359 4 720 6670 t ( ")1 72(ment." For)1 461 2 720 6790 t 10 CW f (.s)1253 6790 w 10 R f (" read one of)3 532 1 1373 6790 t 10 CW f (.L)1936 6790 w 10 R f (, or)1 139 1 2056 6790 t 10 CW f (.W)2226 6790 w 10 R f (followed by)1 485 1 2376 6790 t 10 CW f (*1)2891 6790 w 10 R f (,)3011 6790 w 10 CW f (*2)3066 6790 w 10 R f (,)3186 6790 w 10 CW f (*4)3241 6790 w 10 R f (, or)1 138 1 3361 6790 t 10 CW f (*8)3529 6790 w 10 R f (to indicate the size and scaling of)6 1361 1 3679 6790 t (the data.)1 338 1 720 6910 t (data register)1 490 1 720 7090 t 10 CW f (R0)2139 7090 w 10 R f (address register)1 623 1 720 7210 t 10 CW f (A0)2139 7210 w cleartomark showpage saveobj restore %%EndPage: 3 3 %%Page: 4 4 /saveobj save def mark 4 pagesetup 10 R f (\255 4 \255)2 166 1 2797 480 t (floating\255point register)1 874 1 720 840 t 10 CW f (F0)2139 840 w 10 R f (special names)1 557 1 720 960 t 10 CW f (CAAR, CACR, etc.)2 960 1 2139 960 t 10 R f (constant)720 1080 w 10 CW f ($con)2139 1080 w 10 R f (floating point constant)2 900 1 720 1200 t 10 CW f ($fcon)2139 1200 w 10 R f (external symbol)1 641 1 720 1320 t 10 CW f (name+o\(SB\))2139 1320 w 10 R f (local symbol)1 514 1 720 1440 t 10 CW f (name<>+o\(SB\))2139 1440 w 10 R f (automatic symbol)1 714 1 720 1560 t 10 CW f (name+o\(SP\))2139 1560 w 10 R f (argument)720 1680 w 10 CW f (name+o\(FP\))2139 1680 w 10 R f (address of external)2 753 1 720 1800 t 10 CW f ($name+o\(SB\))2139 1800 w 10 R f (address of local)2 626 1 720 1920 t 10 CW f ($name<>+o\(SB\))2139 1920 w 10 R f (indirect post\255increment)1 929 1 720 2040 t 10 CW f (\(A0\)+)2139 2040 w 10 R f (indirect pre\255decrement)1 905 1 720 2160 t 10 CW f (\255\(A0\))2139 2160 w 10 R f (indirect with offset)2 760 1 720 2280 t 10 CW f (o\(A0\))2139 2280 w 10 R f (indexed with offset)2 771 1 720 2400 t 10 CW f (o\(\)\(R0.s\))2139 2400 w 10 R f (indexed with offset)2 771 1 720 2520 t 10 CW f (o\(A0\)\(R0.s\))2139 2520 w 10 R f (external indexed)1 662 1 720 2640 t 10 CW f (name+o\(SB\)\(R0.s\))2139 2640 w 10 R f (local indexed)1 535 1 720 2760 t 10 CW f (name<>+o\(SB\)\(R0.s\))2139 2760 w 10 R f (automatic indexed)1 735 1 720 2880 t 10 CW f (name+o\(SP\)\(R0.s\))2139 2880 w 10 R f (parameter indexed)1 739 1 720 3000 t 10 CW f (name+o\(FP\)\(R0.s\))2139 3000 w 10 R f (offset indirect post\255indexed)2 1098 1 720 3120 t 10 CW f (d\(o\(\)\)\(R0.s\))2139 3120 w 10 R f (offset indirect post\255indexed)2 1098 1 720 3240 t 10 CW f (d\(o\(A0\)\)\(R0.s\))2139 3240 w 10 R f (external indirect post\255indexed)2 1192 1 720 3360 t 10 CW f (d\(name+o\(SB\)\)\(R0.s\))2139 3360 w 10 R f (local indirect post\255indexed)2 1065 1 720 3480 t 10 CW f (d\(name<>+o\(SB\)\)\(R0.s\))2139 3480 w 10 R f (automatic indirect post\255indexed)2 1265 1 720 3600 t 10 CW f (d\(name+o\(SP\)\)\(R0.s\))2139 3600 w 10 R f (parameter indirect post\255indexed)2 1269 1 720 3720 t 10 CW f (d\(name+o\(FP\)\)\(R0.s\))2139 3720 w 10 R f (offset indirect pre\255indexed)2 1058 1 720 3840 t 10 CW f (d\(o\(\)\(R0.s\)\))2139 3840 w 10 R f (offset indirect pre\255indexed)2 1058 1 720 3960 t 10 CW f (d\(o\(A0\)\))2139 3960 w 10 R f (offset indirect pre\255indexed)2 1058 1 720 4080 t 10 CW f (d\(o\(A0\)\(R0.s\)\))2139 4080 w 10 R f (external indirect pre\255indexed)2 1152 1 720 4200 t 10 CW f (d\(name+o\(SB\)\))2139 4200 w 10 R f (external indirect pre\255indexed)2 1152 1 720 4320 t 10 CW f (d\(name+o\(SB\)\(R0.s\)\))2139 4320 w 10 R f (local indirect pre\255indexed)2 1025 1 720 4440 t 10 CW f (d\(name<>+o\(SB\)\))2139 4440 w 10 R f (local indirect pre\255indexed)2 1025 1 720 4560 t 10 CW f (d\(name<>+o\(SB\)\(R0.s\)\))2139 4560 w 10 R f (automatic indirect pre\255indexed)2 1225 1 720 4680 t 10 CW f (d\(name+o\(SP\)\))2139 4680 w 10 R f (automatic indirect pre\255indexed)2 1225 1 720 4800 t 10 CW f (d\(name+o\(SP\)\(R0.s\)\))2139 4800 w 10 R f (parameter indirect pre\255indexed)2 1229 1 720 4920 t 10 CW f (d\(name+o\(FP\)\))2139 4920 w 10 R f (parameter indirect pre\255indexed)2 1229 1 720 5040 t 10 CW f (d\(name+o\(FP\)\(R0.s\)\))2139 5040 w 10 B f (MIPS)720 5340 w 10 R f (The registers are only addressed by number:)6 1786 1 970 5496 t 10 CW f (R0)2784 5496 w 10 R f (through)2932 5496 w 10 CW f (R31)3271 5496 w 10 R f (.)3451 5496 w 10 CW f (R29)3529 5496 w 10 R f (is the stack pointer;)3 789 1 3737 5496 t 10 CW f (R30)4554 5496 w 10 R f (is used)1 278 1 4762 5496 t (as the static base pointer, the analogue of)7 1697 1 720 5616 t 10 CW f (A6)2450 5616 w 10 R f ( global symbol)2 609( value is the address of the)6 1107( Its)1 158(on the 68020.)2 563 4 2603 5616 t 10 CW f (setR30\(SB\))720 5736 w 10 R f ( values from subroutines is)4 1117( register holding returned)3 1039(. The)1 239 3 1320 5736 t 10 CW f (R1)3750 5736 w 10 R f ( a function is called,)4 847(. When)1 323 2 3870 5736 t (space for the first argument is reserved at)7 1648 1 720 5856 t 10 CW f (0\(FP\))2393 5856 w 10 R f (but the value is actually passed in)6 1343 1 2718 5856 t 10 CW f (R1.)4086 5856 w 10 R f (The loader uses)2 640 1 970 6012 t 10 CW f (R28)1642 6012 w 10 R f ( system uses)2 514( The)1 212(as a temporary.)2 626 3 1854 6012 t 10 CW f (R26)3238 6012 w 10 R f (and)3450 6012 w 10 CW f (R27)3627 6012 w 10 R f (as interrupt\255time temporaries.)2 1200 1 3840 6012 t (None of these registers should therefore be used in user code.)10 2452 1 720 6132 t ( they are numbered registers)4 1170( Instead)1 347(The control registers are not known to the assembler.)8 2193 3 970 6288 t 10 CW f (M0)4715 6288 w 10 R f (,)4835 6288 w 10 CW f (M1)4895 6288 w 10 R f (,)5015 6288 w ( this trick to access, say,)5 968(etc. Use)1 346 2 720 6408 t 10 CW f (TLBVIRT)2059 6408 w 10 R f (:)2479 6408 w 9 CW f (#define TLBVIRT 10)2 972 1 1008 6578 t ( R1)1 162(MOVW M\(TLBVIRT\),)1 1026 2 1440 6688 t 10 R f (Floating point registers are called)4 1373 1 970 6904 t 10 CW f (F0)2377 6904 w 10 R f (through)2531 6904 w 10 CW f (F31)2876 6904 w 10 R f ( convention,)1 504(. By)1 201 2 3056 6904 t 10 CW f (F24)3796 6904 w 10 R f (must be initialized to the)4 1029 1 4011 6904 t (value 0.0,)1 391 1 720 7024 t 10 CW f (F26)1136 7024 w 10 R f (to 0.5,)1 253 1 1341 7024 t 10 CW f (F28)1619 7024 w 10 R f (to 1.0, and)2 422 1 1824 7024 t 10 CW f (F30)2271 7024 w 10 R f (to 2.0.)1 253 1 2476 7024 t ( are no)2 273( There)1 283(The instructions are quite different from the book.)7 2009 3 970 7180 t 10 CW f (lui)3561 7180 w 10 R f (and kin; instead there are)4 1007 1 3767 7180 t 10 CW f (MOVW)4800 7180 w 10 R f (\(move word\),)1 567 1 720 7300 t 10 CW f (MOVH)1336 7300 w 10 R f (\(move halfword\), and)2 915 1 1625 7300 t 10 CW f (MOVB)2589 7300 w 10 R f ( is)1 115( the operand)2 541( If)1 140(\(move byte\) pseudo\255instructions.)2 1366 4 2878 7300 t cleartomark showpage saveobj restore %%EndPage: 4 4 %%Page: 5 5 /saveobj save def mark 5 pagesetup 10 R f (\255 5 \255)2 166 1 2797 480 t (unsigned, the instructions are)3 1189 1 720 840 t 10 CW f (MOVHU)1940 840 w 10 R f (and)2271 840 w 10 CW f (MOVBU)2446 840 w 10 R f ( is from left to right in dataflow)7 1312( order of operands)3 746(. The)1 236 3 2746 840 t ( means that the)3 632( This)1 238( as on the 68020 but not as in the book.)10 1669(order, just)1 416 4 720 960 t 10 CW f (Bcond)3710 960 w 10 R f (instructions are reversed)2 995 1 4045 960 t (with respect to the book; for example, a)7 1586 1 720 1080 t 10 CW f (va BGTZ)1 385 1 2331 1080 t 10 R f (generates a MIPS)2 704 1 2741 1080 t 10 CW f (bltz)3470 1080 w 10 R f (instruction.)3735 1080 w ( as you would if there)5 923( the instructions down)3 916( Place)1 276(Instruction scheduling is handled by the loader.)6 1955 4 970 1236 t ( the problem is not pub\255)5 1003(were no such things as delay slots, except that, because the information to solve)13 3317 2 720 1356 t ( exactly)1 313( Use)1 205(lished, you must insert your own NOOPS after instructions that modify control registers.)12 3548 3 720 1476 t 9 CW f ( R0, R0)2 378(NOR R0,)1 594 2 1440 1646 t 10 R f (as a no\255op.)2 435 1 720 1826 t 10 B f (SPARC)720 2066 w 10 R f ( have numeri\255)2 558( Registers)1 424( for the MIPS, the SPARC is familiar.)7 1534(Once you understand the Plan 9 model)6 1554 4 970 2222 t (cal names only:)2 655 1 720 2342 t 10 CW f (R0)1414 2342 w 10 R f (through)1573 2342 w 10 CW f (R31)1923 2342 w 10 R f ( The)1 218( doesn't use them at all.)5 1014( 9)1 89( Plan)1 242( about register windows.)3 1024(. Forget)1 350 6 2103 2342 t ( period.)1 314(machine has 32 global registers,)4 1316 2 720 2462 t 10 CW f (R1)2409 2462 w 10 R f (\(sic\) is the stack pointer.)4 1015 1 2563 2462 t 10 CW f (R2)3637 2462 w 10 R f (is the static base register, with)5 1249 1 3791 2462 t (value the address of)3 804 1 720 2582 t 10 CW f (setSB\(SB\))1552 2582 w 10 R f (.)2092 2582 w 10 CW f (R7)2170 2582 w 10 R f ( holding the first argument)4 1074(is the return register and also the register)7 1648 2 2318 2582 t (to a function, again with space reserved at)7 1679 1 720 2702 t 10 CW f (0\(FP\))2424 2702 w 10 R f (.)2724 2702 w 10 CW f (R14)2799 2702 w 10 R f (is the loader temporary.)3 948 1 3004 2702 t (Floating\255point registers are exactly as on the MIPS.)7 2059 1 970 2858 t (The control registers are known by names such as)8 2006 1 970 3014 t 10 CW f (FSR)3003 3014 w 10 R f ( instructions to access these registers are)6 1625(. The)1 232 2 3183 3014 t 10 CW f (MOVW)720 3134 w 10 R f (instructions, for example)2 996 1 985 3134 t 9 CW f ( R8)1 162(MOVW Y,)1 540 2 1440 3304 t 10 R f (for the Sparc instruction)3 968 1 720 3484 t 9 CW f (rdy %r8)1 594 1 1440 3654 t 10 R f ( are similar to those on the MIPS: pseudo\255operations that turn into appropriate)12 3329(Move instructions)1 741 2 970 3870 t (sequences of)1 513 1 720 3990 t 10 CW f (sethi)1259 3990 w 10 R f ( are)1 146( the arguments)2 590( Because)1 383( read from left to right.)5 920( Instructions)1 523(instructions, adds, etc.)2 893 6 1585 3990 t (flipped to)1 386 1 720 4110 t 10 CW f (SUBCC)1131 4110 w 10 R f (, the condition codes are not inverted as on the MIPS.)10 2142 1 1431 4110 t (The syntax for the ASI stuff is, for example to move a word from ASI 2:)15 2901 1 970 4266 t 9 CW f ( 2\), R8)2 378(MOVW \(R7,)1 648 2 1440 4436 t 10 R f (The syntax for double indexing is)5 1346 1 720 4616 t 9 CW f ( R9)1 162(MOVW \(R7+R8\),)1 864 2 1440 4786 t 10 R f ( down instructions; the loader will do the)7 1788(Again, ignore scheduling and delay slots when laying)7 2282 2 970 5002 t (scheduling.)720 5122 w 10 B f (i960)720 5362 w 10 R f (Registers are numbered)2 958 1 970 5518 t 10 CW f (R0)1961 5518 w 10 R f (through)2114 5518 w 10 CW f (R31)2458 5518 w 10 R f ( pointer is)2 416(. Stack)1 305 2 2638 5518 t 10 CW f (R29)3392 5518 w 10 R f (; return register is)3 731 1 3572 5518 t 10 CW f (R4)4336 5518 w 10 R f ( base is)2 312(; static)1 272 2 4456 5518 t 10 CW f (R28)720 5638 w 10 R f (; it is initialized to the address of)7 1343 1 900 5638 t 10 CW f (setSB\(SB\))2273 5638 w 10 R f (.)2813 5638 w 10 CW f (R3)2893 5638 w 10 R f ( manually early)2 629(must be zero; this should be done)6 1368 2 3043 5638 t (in execution by)2 616 1 720 5758 t 9 CW f ( R3)1 162(SUBO R3,)1 594 2 1440 5928 t 10 CW f (R27)720 6108 w 10 R f (is the loader temporary.)3 948 1 925 6108 t (There is no support for floating point.)6 1507 1 970 6264 t ( cannot be used; use)4 832(The Intel calling convention is not supported and)7 2004 2 970 6420 t 10 CW f (BAL)3838 6420 w 10 R f ( are)1 153(instead. Instructions)1 837 2 4050 6420 t ( that)1 185( major change is)3 690( The)1 216(mostly as in the book.)4 925 4 720 6540 t 10 CW f (LOAD)2771 6540 w 10 R f (and)3046 6540 w 10 CW f (STORE)3225 6540 w 10 R f (are both called)2 607 1 3560 6540 t 10 CW f (MOV)4202 6540 w 10 R f ( extension)1 418(. The)1 240 2 4382 6540 t (character for)1 505 1 720 6660 t 10 CW f (MOV)1250 6660 w 10 R f (is as in the manual:)4 772 1 1455 6660 t 10 CW f (O)2252 6660 w 10 R f (for ordinal,)1 449 1 2337 6660 t 10 CW f (W)2811 6660 w 10 R f (for signed, etc.)2 593 1 2896 6660 t cleartomark showpage saveobj restore %%EndPage: 5 5 %%Page: 6 6 /saveobj save def mark 6 pagesetup 10 R f (\255 6 \255)2 166 1 2797 480 t 10 B f (i386)720 840 w 10 R f ( are)1 150( register names)2 610( The)1 208(The assembler assumes 32\255bit protected mode.)5 1884 4 970 996 t 10 CW f (SP)3851 996 w 10 R f (,)3971 996 w 10 CW f (AX)4025 996 w 10 R f (,)4145 996 w 10 CW f (BX)4199 996 w 10 R f (,)4319 996 w 10 CW f (CX)4373 996 w 10 R f (,)4493 996 w 10 CW f (DX)4547 996 w 10 R f (,)4667 996 w 10 CW f (BP)4721 996 w 10 R f (,)4841 996 w 10 CW f (DI)4895 996 w 10 R f (,)5015 996 w (and)720 1116 w 10 CW f (SI)890 1116 w 10 R f ( stack pointer is)3 633(. The)1 231 2 1010 1116 t 10 CW f (SP)1900 1116 w 10 R f (and the return register is)4 974 1 2046 1116 t 10 CW f (AX)3046 1116 w 10 R f ( is no physical frame pointer but, as for)8 1567(. There)1 307 2 3166 1116 t (the 68020,)1 422 1 720 1236 t 10 CW f (FP)1167 1236 w 10 R f (is a pseudo\255register that acts as a floating frame pointer.)9 2234 1 1312 1236 t ( the Intel manual with an)5 1011(Opcode names are mostly the same as those listed in)9 2118 2 970 1392 t 10 CW f (L)4127 1392 w 10 R f (,)4187 1392 w 10 CW f (W)4240 1392 w 10 R f (, or)1 136 1 4300 1392 t 10 CW f (B)4464 1392 w 10 R f (appended to)1 488 1 4552 1392 t ( load)1 207( All)1 188( exceptions are loads, stores, and conditionals.)6 1916( The)1 216(identify 32\255bit, 16\255bit, and 8\255bit operations.)5 1793 5 720 1512 t ( special registers \(such as)4 1018(and store opcodes to and from general registers,)7 1912 2 720 1632 t 10 CW f (CR0, CR3, GDTR, IDTR, SS,)4 1364 1 3676 1632 t (CS, DS, ES, FS,)3 795 1 720 1752 t 10 R f (and)1540 1752 w 10 CW f (GS)1709 1752 w 10 R f (\) or memory are written as)5 1061 1 1829 1752 t 9 CW f (MOV)1440 1922 w 9 I f (x)1602 1922 w 9 CW f (src,dst)1872 1922 w 10 R f (where)720 2102 w 10 I f (x)990 2102 w 10 R f (is)1061 2102 w 10 CW f (L)1155 2102 w 10 R f (,)1215 2102 w 10 CW f (W)1267 2102 w 10 R f (, or)1 135 1 1327 2102 t 10 CW f (B)1489 2102 w 10 R f ( to get)2 254(. Thus)1 277 2 1549 2102 t 10 CW f (AL)2107 2102 w 10 R f (use a)1 205 1 2255 2102 t 10 CW f (MOVB)2488 2102 w 10 R f ( you need to access)4 782(instruction. If)1 572 2 2756 2102 t 10 CW f (AH)4138 2102 w 10 R f (, you must mention)3 782 1 4258 2102 t (it explicitly in a)3 631 1 720 2222 t 10 CW f (MOVB)1376 2222 w 10 R f (:)1616 2222 w 9 CW f ( BX)1 162(MOVB AH,)1 594 2 1440 2392 t 10 R f (There are many examples of illegal moves, for example)8 2225 1 720 2572 t 9 CW f ( DI)1 162(MOVB BP,)1 594 2 1440 2742 t 10 R f (that the loader actually implements as psuedo\255operations.)6 2294 1 720 2922 t ( \()1 61(The names of conditions in all conditional instructions)7 2194 2 970 3078 t 10 CW f (J)3225 3078 w 10 R f (,)3285 3078 w 10 CW f (SET)3338 3078 w 10 R f (\) follow the conventions of the 68020)6 1522 1 3518 3078 t (instead of those of the Intel assembler:)6 1548 1 720 3198 t 10 CW f (JOS)2294 3198 w 10 R f (,)2474 3198 w 10 CW f (JOC)2525 3198 w 10 R f (,)2705 3198 w 10 CW f (JCS)2756 3198 w 10 R f (,)2936 3198 w 10 CW f (JCC)2987 3198 w 10 R f (,)3167 3198 w 10 CW f (JEQ)3218 3198 w 10 R f (,)3398 3198 w 10 CW f (JNE)3449 3198 w 10 R f (,)3629 3198 w 10 CW f (JLS)3680 3198 w 10 R f (,)3860 3198 w 10 CW f (JHI)3911 3198 w 10 R f (,)4091 3198 w 10 CW f (JMI)4142 3198 w 10 R f (,)4322 3198 w 10 CW f (JPL)4373 3198 w 10 R f (,)4553 3198 w 10 CW f (JPS)4604 3198 w 10 R f (,)4784 3198 w 10 CW f (JPC)4835 3198 w 10 R f (,)5015 3198 w 10 CW f (JLT)720 3318 w 10 R f (,)900 3318 w 10 CW f (JGE)959 3318 w 10 R f (,)1139 3318 w 10 CW f (JLE)1198 3318 w 10 R f (, and)1 203 1 1378 3318 t 10 CW f (JGT)1615 3318 w 10 R f (instead of)1 400 1 1829 3318 t 10 CW f (JO)2263 3318 w 10 R f (,)2383 3318 w 10 CW f (JNO)2442 3318 w 10 R f (,)2622 3318 w 10 CW f (JB)2681 3318 w 10 R f (,)2801 3318 w 10 CW f (JNB)2860 3318 w 10 R f (,)3040 3318 w 10 CW f (JZ)3099 3318 w 10 R f (,)3219 3318 w 10 CW f (JNZ)3278 3318 w 10 R f (,)3458 3318 w 10 CW f (JBE)3517 3318 w 10 R f (,)3697 3318 w 10 CW f (JNBE)3756 3318 w 10 R f (,)3996 3318 w 10 CW f (JS)4055 3318 w 10 R f (,)4175 3318 w 10 CW f (JNS)4235 3318 w 10 R f (,)4415 3318 w 10 CW f (JP)4475 3318 w 10 R f (,)4595 3318 w 10 CW f (JNP)4655 3318 w 10 R f (,)4835 3318 w 10 CW f (JL)4895 3318 w 10 R f (,)5015 3318 w 10 CW f (JNL)720 3438 w 10 R f (,)900 3438 w 10 CW f (JLE)950 3438 w 10 R f (, and)1 194 1 1130 3438 t 10 CW f (JNLE)1349 3438 w 10 R f (.)1589 3438 w (The addressing modes have syntax like)5 1587 1 970 3594 t 10 CW f (AX)2586 3594 w 10 R f (,)2706 3594 w 10 CW f (\(AX\))2760 3594 w 10 R f (,)3000 3594 w 10 CW f (\(AX\)\(BX*4\))3054 3594 w 10 R f (,)3654 3594 w 10 CW f (10\(AX\))3708 3594 w 10 R f (, and)1 198 1 4068 3594 t 10 CW f (10\(AX\)\(BX*4\))4295 3594 w 10 R f (.)5015 3594 w (The offsets from)2 741 1 720 3714 t 10 CW f (AX)1524 3714 w 10 R f (can be replaced by offsets from)5 1444 1 1707 3714 t 10 CW f (FP)3214 3714 w 10 R f (or)3397 3714 w 10 CW f (SB)3543 3714 w 10 R f (to access names, for example)4 1314 1 3726 3714 t 10 CW f (extern+5\(SB\)\(AX*2\))720 3834 w 10 R f (.)1800 3834 w (Other notes: Non\255relative)2 1032 1 970 3990 t 10 CW f (JMP)2033 3990 w 10 R f (and)2244 3990 w 10 CW f (CALL)2419 3990 w 10 R f (have a)1 263 1 2690 3990 t 10 CW f (*)2984 3990 w 10 R f ( Only)1 257( syntax.)1 318(added to the)2 500 3 3075 3990 t 10 CW f (LOOP)4182 3990 w 10 R f (,)4422 3990 w 10 CW f (LOOPEQ)4479 3990 w 10 R f (, and)1 201 1 4839 3990 t 10 CW f (LOOPNE)720 4110 w 10 R f ( Only)1 251(are legal loop instructions.)3 1063 2 1106 4110 t 10 CW f (REP)2446 4110 w 10 R f (and)2652 4110 w 10 CW f (REPN)2822 4110 w 10 R f ( are not prefixes,)3 670( These)1 288(are recognized repeaters.)2 994 3 3088 4110 t (but rather standalone opcodes that precede the strings, for example)9 2666 1 720 4230 t 9 CW f (CLD; REP; MOVSL)2 810 1 1440 4400 t 10 B f (Hobbit)720 4700 w 10 R f ( between)1 361(The Hobbit book and data sheet are actually based on this assembler, so the correspondence)14 3709 2 970 4856 t ( no static base regis\255)4 827( is)1 96( There)1 286(the hardware and the assembler is much closer than with the other machines.)12 3111 4 720 4976 t (ter.)720 5096 w ( is that data operand suffices use a colon in the book, but a period in the)16 2929(The one syntactic difference)3 1141 2 970 5252 t (assembler:)720 5372 w 9 CW f ( R4.UB)1 324(MOV $0,)1 594 2 1440 5542 t 10 R f (Unlike the other assemblers, these suffices are applied to the operands rather than the instructions.)14 3920 1 720 5722 t cleartomark showpage saveobj restore %%EndPage: 6 6 %%Trailer done %%Pages: 6 %%DocumentFonts: Times-Bold Times-Italic Times-Roman Courier