home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 8 / CDACTUAL8.iso / docs / mini / assembly < prev    next >
Encoding:
Text File  |  1996-07-11  |  21.6 KB  |  666 lines

  1. Assembly HOWTO
  2.     aka *Free* 32-bit x86 Assembly FAQ
  3.     aka Linux x86 Assembly HOWTO
  4.  
  5. Francois-Rene Rideau rideau@ens.fr
  6. v0.2, 2 May 1996
  7.  
  8.  
  9. HOWTO program in x86 assembly using only *FREE* programming tools.
  10.  
  11.  
  12. Keywords: assembly, assembler, free, macroprocessor, preprocessor,
  13. asm, inline asm, 32-bit, x86, i386, gas, as86, nasm
  14.  
  15.  
  16.  
  17. LEGAL BLURP:
  18.  
  19. Copyright (C) 1996 Francois-Rene Rideau.
  20.   You can freely distribute this document,
  21.   provided no modification is done to the text,
  22.   but annotations that are clearly indicated as such.
  23.   You can freely ask me to distribute the document otherwise.
  24.   The Linux Documentation Project maintainers
  25.   are free to do anything with this document,
  26.   that all other LDP documents simultaneously allow,
  27.   which they can understand optimistically as for a fix-point meaning.
  28.  
  29.  
  30. IMPORTANT NOTE:
  31.  
  32. This is still a *VERY PRELIMINARY* version for this document.
  33.    You (hey, that's *you* I'm talking to, so please listen!)
  34. are especially invited
  35. to ask questions,
  36. to answer to questions,
  37. to correct given answers,
  38. to add new FAQ answers,
  39. to give pointers to other software,
  40. to insult the current maintainer (me),
  41. and TO TAKE OVER THE MAINTENANCE OF THE FAQ in his place (mine),
  42. because I have other things to do...
  43.    For any of these, please contact me (rideau@ens.fr).
  44. Perhaps we can convince Raymond Moon to add a section to his FAQ
  45. for comp.lang.asm.x86... ?
  46.  
  47.  
  48. 1. INTRODUCTION.
  49.  
  50. This document aims at answering frequently asked questions of people
  51. who program or want to program 32-bit x86 assembly using *free* assemblers,
  52. particularly under the Linux operating system.
  53. It may also point to other documents about
  54. non-free, non-x86, or non-32-bit assemblers,
  55. though it is not its primary goal.
  56.  
  57. Because the main interest of assembly programming is to build to write
  58. the guts of operating systems, languages, and games,
  59. where a C compiler fails to provide the needed expressivity
  60. (performance is more and more seldom an issue),
  61. we stress on development of such software.
  62.  
  63.  
  64. 1.1 How to use this document
  65.  
  66. This document contains answers to some frequently asked questions.
  67. At many places, Universal Resource Locators (URL) are given for some
  68. software or documentation repository.
  69. Please see that the most useful repositories are mirrored,
  70. and that by accessing a nearer mirror site,
  71. you relieve the whole Internet from unneeded network traffic,
  72. while saving your own precious time.
  73. Particularly, there are large repositories all over the world,
  74. that mirror other popular repositories.
  75. You should learn and note what are those places near you (networkwise).
  76. Sometimes, the list of mirrors is listed in a file,
  77. or in a login message. Please heed the advice.
  78. Else, you should ask archie about the software you're looking for...
  79.  
  80. The most recent version for this documents sits in
  81. URL: http://www.eleves.ens.fr:8080/home/rideau/Assembly
  82. but what's in Linux HOWTO repositories *should* be fairly up to date, too
  83. (I can't know).
  84.  
  85.  
  86. 1.2 Other related documents
  87.  
  88. * If you don't know what *free* software is,
  89. please do read *carefully* the GNU General Public License,
  90. which is used in a lot of free software, and a model for most;
  91. it generally comes in a file named "COPYING",
  92. with a library version in a file named "COPYING.LIB".
  93.  
  94. * Particularly, the interesting kind of free software
  95. comes with sources that you can consult and correct,
  96. or sometimes even borrow from.
  97. Read your particular license carefully, and do comply to it.
  98.  
  99. * There is a FAQ for comp.lang.asm.x86 that answers generic questions
  100. about x86 assembly programming, and questions about some commercial
  101. assemblers in a 16-bit DOS environment.
  102. Some of it apply to free 32-bit asm programming, so you may want
  103. to read this FAQ...
  104.  
  105. * FAQs and docs exist about programming on your favorite platform,
  106. whichever it is, that you should consult for platform-specific issues
  107. not directly related to programming in assembler.
  108.  
  109.  
  110. 2. ASSEMBLERS.
  111.  
  112.  
  113. 2.1 GCC Inline Assembly
  114.  
  115. The well-known GNU C/C++ Compiler (GCC),
  116. an optimizing 32-bit compiler at the heart of the GNU project,
  117. supports the x86 architecture quite well,
  118. and includes the ability to insert assembly code in C programs,
  119. in such a way that register allocation can be either specified or left to GCC.
  120. GCC works on most available platforms,
  121. notably Linux, *BSD, VSTa, OS/2, *DOS, Win*, etc.
  122.  
  123.  
  124. 2.1.1 Where to find GCC
  125.  
  126. The original GCC site is ftp://prep.ai.mit.edu/pub/gnu/
  127. together with all the released application software from the GNU project.
  128.  
  129. However, sources adapted to your favorite OS, and binaries precompiled for it,
  130. should be found at your usual 
  131. Particularly, note that the DOS port of GCC is named DJGPP,
  132. and found in directories of such name,
  133. while the thing to make it run under OS/2 is called EMX.
  134.  
  135. For Linux, see around http://www.linux.org.uk/
  136. For DOS, see around ftp://ftp.funet.fi/pub/msdos/djgpp/ (?)
  137.  
  138.  
  139. 2.1.2 Where to find docs for GCC Inline Asm
  140.  
  141. The documentation of GCC includes documentation files in texinfo format,
  142. that you can convert to tex, compile (with tex), and print,
  143. convert to interactive emacs .info format and browse,
  144. convert (with the right tools) to whatever you like,
  145. or just read as is.
  146. The .info files are generally found on any good installation for GCC.
  147.  
  148. The right section to look for is:
  149.     "C Extensions::Extended Asm::"
  150.  
  151. Section "Invoking GCC::Submodel Options::i386 Options::"
  152. might help too. Particularly, it gives the i386 specific constraint
  153. names for registers:
  154. abcdSDB correspond to %eax, %ebx, %ecx, %edx, %esi, %edi, %ebp
  155. respectively.
  156.  
  157. A URL for this document and section, as converted in HTML format, is
  158.     "http://www.cygnus.com/doc/usegcc_89.html#SEC92"
  159.  
  160. I've been told about this page:
  161.     "http://www.rt66.com/~brennan/djgpp/djgpp_asm.html"
  162.  
  163. GCC depends on GAS for assembling, and follow its syntax;
  164. do mind that inline asm needs percent characters to be quoted
  165. so they be passed to GAS.
  166. See the section about GAS below.
  167.  
  168. Find *lots* of useful examples in the linux/include/asm-i386/
  169. subdirectory of the sources for the free Linux OS.
  170.  
  171.  
  172. 2.1.3 How should I invoke GCC for it to properly inline my assembly code ?
  173.  
  174. Be sure to invoke GCC with the "-O" flag,
  175. to enable optimizations and inline assembly.
  176. If you don't, your code may compile, but not run properly!!!
  177.  
  178. More generally, good compile flags for GCC on the x86 platform are
  179.     "gcc -O2 -fomit-frame-pointer -m386"
  180.  
  181. -O2 is the good optimization level. Optimizing besides it yields
  182. code that is a lot larger, but only a bit faster;
  183. such overoptimizationn might be useful for tight loops only (if any),
  184. which you may be doing in assembly anyway;
  185. if you need that, do it just for the few routines that need it.
  186.  
  187. -fomit-frame-pointer allows generated code to skip the stupid
  188. frame pointer maintenance, which makes code smaller and faster,
  189. and frees a register for further optimizations.
  190. It precludes the easy use of debugging tools (gdb), but when you use these,
  191. you just don't care about size and speed anymore anyway.
  192.  
  193. -m386 yields more compact code, without any measurable slowdown,
  194. (note that small code also means less disk I/O and faster execution)
  195. but perhaps on the above-mentioned tight loops.
  196.  
  197. To optimize even more, option -mregparm=2 and/or corresponding function
  198. attribute might help, but might pose lots of problems
  199. when linking to foreign code...
  200.  
  201.  
  202. 2.2 GAS
  203.  
  204. GAS is the GNU Assembler, that GCC relies upon,
  205. with 
  206.  
  207.  
  208. 2.2.1 Where to find it
  209.  
  210. Find it at the same place where you found GCC,
  211. in a package named binutils.
  212.  
  213.  
  214. 2.2.2 What is this AT&T syntax
  215.  
  216. Because GAS was invented to support a 32-bit unix compiler,
  217. it uses standard "AT&T" syntax,
  218. which resembles a lot the syntax for standard 680x0 assemblers.
  219. This syntax is no worse, no better than the "Intel" syntax.
  220. It's just different.
  221. When you get used to it,
  222. you find it much more regular than the Intel syntax.
  223.  
  224. A file gas.doc or as.doc
  225. (still around the same place as you found GAS,
  226. if not in the GAS source package itself)
  227. describes the syntax.
  228.  
  229. One place for it is in FTP directory
  230. ftp://sunsite.unc.edu/pub/linux/GCC/
  231.  
  232. Again, the sources for the Linux OS come in as good examples;
  233. see under linux/arch/i386, the following files:
  234. kernel/entry.S, kernel/head.S, boot/compressed/head.S, mathemu/*.S
  235.  
  236.  
  237. 2.2.3 Limited 16-bit mode
  238.  
  239. GAS is a 32-bit assembler, meant to support a 32-bit compiler.
  240. It currently has only limited support for 16-bit mode,
  241. which consists in prepending the 32-bit prefixes to instructions,
  242. so you write 32-bit code that runs in 16-bit mode.
  243. In both modes, it supports 16-bit register usage,
  244. but what is unsupported is 16-bit addressing.
  245. Feel free to add full 16-bit support if you think you need it.
  246.  
  247.  
  248.  
  249. 2.3 GASP
  250.  
  251. GASP is the GAS Preprocessor.
  252. It adds macros and some nice syntax to GAS.
  253.  
  254.  
  255. 2.3.1 Where to find GASP
  256.  
  257. I don't know exactly. See at the GNU repository (prep.ai.mit.edu & mirrors).
  258. Perhaps together with GAS in the binutils package ?
  259.  
  260.  
  261. 2.3.2 How it works
  262.  
  263. I have no idea, but it comes with its own texinfo documentation,
  264. so just print them, or browse the .info files...
  265. Looks like a regular macro-assembler to me.
  266.  
  267.  
  268.  
  269. 2.4 AS86
  270.  
  271. AS86 is a 80x86 assembler, both 16-bit and 32-bit,
  272. part of Bruce Evans' C Compiler (BCC).
  273. It has mostly Intel-syntax, though it differs slightly as for addressing modes.
  274.  
  275.  
  276. 2.4.1 Where to get AS86
  277.  
  278. A completely outdated version of AS86 is distributed by HJLu
  279. just to compile the Linux kernel,
  280. in a package named bin86 (current version 0.3),
  281. available in any Linux GCC repository.
  282. But I advise no one to use it for anything else but compiling Linux.
  283. This version supports only a hacked minix object file format,
  284. and has a few bugs in 32-bit mode, so you better keep it only for
  285. compiling Linux.
  286.  
  287. The most recent versions are published together with the FreeBSD distribution.
  288. I got it from
  289. ftp://ftp.ibp.fr/pub/FreeBSD/packages-2.1/development/bcc-95.3.12.tgz
  290. But your mirror may vary, and the version may evolve.
  291. Among other things, it supports Linux GNU a.out format,
  292. so you can link you code to Linux programs, and/or use the usual
  293. tools from the GNU binutil package to manipulate your data.
  294. This version can co-exist without any harm with the previous one
  295. (see question 2.4.4 below).
  296.  
  297. BCC from 12 march 1995 and earlier version has a misfeature
  298. that makes all segment pushing/popping 16-bit, which is quite
  299. annoying when programming in 32-bit mode.
  300. A patch is published in the Tunes project
  301. http://www.eleves.ens.fr:8080/home/rideau/Tunes/files/tunes.0.0.0.25.src.tgz
  302. in unpacked subdirectory LLL/i386/
  303. Bruce Evans accepted this patch, so if there is a more recent version of
  304. bcc somewhere, the patch should have been included...
  305.  
  306.  
  307. 2.4.2 Where to find docs
  308.  
  309. The docs are what is included in the bcc package.
  310. Man pages are also available somewhere on the FreeBSD site.
  311. When in doubt, the sources themselves are often a good docs:
  312. it's not very well commented, but the programming style is clear.
  313.  
  314.  
  315. 2.4.3 How to invoke the assembler ?
  316.  
  317. Here's the GNU Makefile entry for using bcc to transform
  318. .s asm into GNU a.out .o object and .l listing:
  319.  
  320. %.o %.l:        %.s
  321.         bcc -3 -G -c -A-d -A-l -A$*.l -o $*.o $<
  322.  
  323. Remove the "%.l", "-A-l", and "-A$*.l", if you don't want any listing.
  324. If you want something else than GNU a.out,
  325. you can see the docs of bcc about the other supported formats,
  326. and/or use the objcopy utility from the GNU binutils package.
  327.  
  328.  
  329. 2.4.3 What if I can't compile Linux anymore with this new version ?
  330.  
  331. Linus is buried alive in mail, and my patch for compiling Linux
  332. with a Linux a.out as86 didn't make it to him (!).
  333. Now, this shouldn't matter: just keep your as86 from the bin86 package
  334. in /usr/bin, and put the good as86 as /usr/local/libexec/i386/bcc/as
  335. where it should be. You never need explicitly call this "good" as86,
  336. because bcc does everything right, including conversion to Linux a.out,
  337. when invoked with the right options, so assemble files with bcc, not as86.
  338.  
  339.  
  340.  
  341. 2.5 OTHER ASSEMBLERS
  342.  
  343. These are other, non-regular, options,
  344. in case the previous didn't satisfy you (why ?),
  345. that I don't recommend in the usual (?) case,
  346. but that could be useful if the assembler is part
  347. of what you're designing (i.e. an OS or development environment).
  348.  
  349.  
  350. 2.5.1 Win32Forth assembler
  351.  
  352. Win32Forth is a *free* 32-bit FORTH system
  353. that successfully runs under Win32s, Win95, Win/NT.
  354. It includes a free 32-bit assembler (either prefix or postfix syntax)
  355. integrated to the assembler.
  356. Macro processing is done by the full power of the reflective FORTH language,
  357. but the only supported input and output contexts is Win32For itself.
  358. Find it at
  359. ftp://ftp.forth.org/pub/Forth/win32for/
  360.  
  361.  
  362. 2.5.2 NASM
  363.  
  364. The Netwide Assembler project tries to produce yet another assembler,
  365. written in C, that would be modular enough
  366. to eventually support all known syntaxes and object formats.
  367.  
  368. Current version runs just fine,
  369. but only some very simple syntax, and plain binary output.
  370. No integrated macroprocessing.
  371.  
  372. URL: http://www.dcs.warwick.ac.uk/~jules/nasm1.html
  373.  
  374.  
  375. 2.5.3 Tunes
  376.  
  377. The Tunes OS project is developping its own assembler
  378. as an extension to the Scheme language,
  379. as part of its development process.
  380. It doesn't run at all yet, though help is welcome.
  381.  
  382. The assembler manipulates symbolic syntax trees,
  383. so it could equally serve as the basis for a assembly syntax translator,
  384. a disassembler, a common assembler/compiler back-end, etc.
  385. Also, the full power of a real languae, Scheme,
  386. make it unchallenged as for macroprocessing/metaprograming
  387. URL: http://www.eleves.ens.fr:8080/home/rideau/Tunes/
  388.  
  389.  
  390. 2.5.4 Non-free, Non-32bit x86 assemblers.
  391.  
  392. You may find more about them,
  393. together with the basics of x86 assembly programming,
  394. in Raymond Moon's FAQ for comp.lang.asm.x86
  395. URL: http://www2.dgsys.com/~raymoon/faq/asmfaq.zip
  396.  
  397.  
  398.  
  399.  
  400. 3. METAPROGRAMMING/MACROPROCESSING
  401.  
  402. Assembly programming is a bore,
  403. but for critical parts of programs.
  404. Often, one wants some patterns to be automatically reused,
  405. which allows safer programming, easier modification, etc.
  406. Thus, a "plain" assembler is often not enough,
  407. even when one is doing only small routines to link with C.
  408.  
  409.  
  410. 3.1 What's integrated into the above
  411.  
  412.  
  413. 3.1.1 GCC
  414.  
  415. GCC allows (and requires) you to specify register constraints
  416. in your "inline assembly" code, so the optimizer always know about it;
  417. thus, inline assembly code is really made of patterns,
  418. not forcibly exact code.
  419.  
  420. Then, you can make put your assembly into CPP macros,
  421. so anyone can use it in as any C function/macro.
  422. Lastly, you can put it in a C inline function, which resembles
  423. macros very much, but are sometimes cleaner to use.
  424. Beware that in those cases, code will be duplicated,
  425. so only local labels (of "1:" style) should be defined in that asm code.
  426. However, a macro would allow the name for a non local defined label
  427. to be passed.
  428.  
  429. Lastly, the C language may be considered as a good abstraction to assembly
  430. programming, which relieves you from most of the trouble of assembling.
  431.  
  432. Beware that some optimizations that involve passing arguments to functions
  433. through registers may make those functions unsuitable to be called from
  434. assembly in the standard way, least you give them the attribute asmlinkage.
  435. See the linux kernel sources for examples.
  436.  
  437.  
  438. 3.1.2 GAS
  439.  
  440. GAS has absolutely NO macro capability included.
  441. However, GCC and passes .S files through CPP before to feed them to GAS.
  442. .s files are the generated ones, and passed directly to GAS.
  443. Again and again, see linux sources for examples.
  444.  
  445.  
  446. 3.1.3 GASP
  447.  
  448. It adds all the usual macroassembly tricks to GAS.
  449. See its texinfo docs.
  450.  
  451.  
  452. 3.1.4 AS86
  453.  
  454. It has some simple macro support, but I couldn't find docs.
  455. If you need more than the basics, you should use an external filter
  456. (see below in section 3.2)
  457.  
  458.  
  459. 3.1.5 OTHER ASSEMBLERS
  460.  
  461. Win32FORTH:
  462. CODE and END-CODE are macros that do not change the current interpreting mode,
  463. so you have access to the full power of FORTH words, immediate or not,
  464. while assembling.
  465.  
  466. NASM:
  467. no macro support yet, see about external filters below.
  468.  
  469. TUNES:
  470. it doesn't work yet, but the Scheme language is a real high-level language
  471. that allows arbitrary meta-programming.
  472.  
  473.  
  474.  
  475. 3.2 EXTERNAL FILTERS
  476.  
  477. Whatever is the macro support from your assembler,
  478. or whatever language you use (even C !),
  479. if the language is not expressive enough to you,
  480. you can have files passed through an external filter
  481. with a Makefile rule like that:
  482.  
  483. %.s:    %.S other_dependencies
  484.         $(FILTER) $(FILTER_OPTIONS) < $< > $@
  485.  
  486.  
  487. 3.2.1 CPP
  488.  
  489. CPP is truely not very expressive, but it's enough for easy things,
  490. it's standard, and called transparently by GCC.
  491.  
  492. As an example of its limitations, you can't declare objects so that
  493. destructors are automatically called at the end of the declaring block,
  494. you can't co-declared data and the code to process it, etc.
  495.  
  496. CPP came with your C compiler. If you could make it without one,
  497. don't bother fetching any (though I wonder how you could).
  498. GCC (see above) is a free C compiler you could have fetched.
  499.  
  500.  
  501. 3.2.2 M4
  502.  
  503. M4 gives you the full power of macroprocessing,
  504. with a Turing equivalent language, recursion, regular expressions, etc.
  505. You can do with it everything that CPP cannot.
  506.  
  507. See macro4th/This4th from
  508. URL: ftp://ftp.forth.org/pub/Forth/ in Reviewed/ ANS/ (?),
  509. or the Tunes 0.0.0.25 sources as examples
  510. of advanced macroprogramming using m4.
  511.  
  512. However, its fucked up quoting semantics force you to use
  513. explicit continuation-passing tail-recursive macro style if
  514. you want to do *advanced* macro programming
  515. (which is remindful of TeX -- BTW, has anyone tried to use TeX as
  516. a macroprocessor for anything else than typesetting ?).
  517.  
  518. The right version of m4 to get is GNU m4 1.4 (or later if exists),
  519. which has the most features and the least bugs or limitations of all.
  520.  
  521.  
  522. 3.2.3 Macroprocessing with yer own filter
  523.  
  524. You can write your own simple macro-expansion filter
  525. with the usual tools: perl, awk, sed, etc.
  526. That's quick to do, and you control everything.
  527. But of course, any power in macroprocessing must be earned the hard way.
  528.  
  529.  
  530. 3.2.4 Metaprogramming
  531.  
  532. Instead of using an external filter that expands macros,
  533. one way to do things is to write programs that write part
  534. or all of other programs.
  535.  
  536. For instance, you could generate the sine/cosine lookup tables
  537. of a FFT from a C program,
  538. extract source-form representations of raw data from files,
  539. compile your bitmaps into fast display routines,
  540. extract initialization routines or documentation from the normal code files,
  541. generate your code from a perl/shell/scheme script
  542. that does arbitrary processing,
  543. (particularly useful when some kind of data must be mirrored at
  544. into many cross-referencing tables and code chunks).
  545. etc.
  546.  
  547. Think about it !
  548.  
  549.  
  550.  
  551. 4. CALLING CONVENTIONS
  552.  
  553.  
  554. 4.1 Linux
  555.  
  556.  
  557. 4.1.1 Linking to GCC
  558.  
  559. That's the preferred way.
  560.  
  561. 32-bit arguments are pushed on stack in reverse order
  562. (hence popped in the right order)
  563. above the 32-bit near return address.
  564. %ebp,%esi,%edi,%ebx are preserved,
  565. %eax holds the result,
  566. %ecx,%edx are destroyed.
  567.  
  568. FP stack: I'm not sure.
  569. I think it's result in st(0), whole stack callee-save.
  570.  
  571. Beware that the asmlinkage attribute may be required when
  572. declaring functions for GCC to follow these standard conventions.
  573.  
  574.  
  575. 4.1.2 ELF vs a.out problems
  576.  
  577. Some C compilers prepend an underscore before every symbol,
  578. while others do not.
  579.  
  580. Particularly, Linux a.out GCC does such prepending,
  581. while Linux ELF GCC does not.
  582. See how the Linux source tree manages that itself
  583. (linux/include/linux/linkage.h).
  584.  
  585. Note that the utility objcopy, from the binutils package,
  586. should allow you to transform your a.out objects into ELF objects,
  587. and perhaps the contrary too, in some cases.
  588.  
  589.  
  590. 4.1.3 Direct Linux syscalls
  591.  
  592. This is NOT recommended, because it may change, it's not portable,
  593. AND it precludes libc fixes and extensions, like, for instance zlibc
  594. (that does on-the-fly transparent decompression of gzip-compressed files).
  595. The standard, recommended way to call Linux system services is to
  596. go through the libc.
  597.  
  598. Now, if you don't want to link to the libc,
  599. you should see how linux-eforth-1.0c.tgz does it
  600. URL: ftp://ftp.forth.org/pub/Forth/Linux/
  601. The linux sources come in handy, too
  602. (particularly the header files about SYSCALL numbers,
  603. and syscall-from-C macros).
  604.  
  605. Basically, you issue an int $0x80,
  606. with SYSCALL number (from linux header files) in %eax,
  607. parameters (up to five) in %ebx, %ecx, %edx, %esi, %edi.
  608. Result is in %eax, with a negative result being an error.
  609. The user-stack is not touched, so you needn't have a valid one
  610. when doing a syscall.
  611.  
  612.  
  613. 4.2 DOS
  614.  
  615. Most DOS extenders come with some interface to DOS services.
  616. Read their docs about that,
  617. but often, they just simulate int 0x21 and such,
  618. so you do "as if" you were in real mode
  619. (I doubt they have stubs to have things work with 32-bit operands
  620. by calling 16-bit DOS services as needed).
  621.  
  622. Docs about DPMI and such can be found on
  623. ftp://x2ftp.oulu.fi/pub/msdos/programming/
  624.  
  625. DJGPP comes with its own (limited) libc replacement, too.
  626.  
  627. It is possible to cross-compile from Linux to DOS,
  628. but the existing patches were written for a.out GCC.
  629. Perhaps recent ELF GCCs need no patch,
  630. perhaps they need new patches; I just dunno.
  631.  
  632.  
  633.  
  634. 4.3 YOUR OWN OS
  635. [That's what many asm programmers talk about]
  636.  
  637. 4.3.1 Boot loader code & getting into 32-bit mode
  638. 4.3.2 The basics about protection
  639. 4.3.3 Handling Interrupts
  640. 4.3.4 V86/R86 mode for using 16-bit system services.
  641. 4.3.5 Where to find info about it all.
  642.  
  643. [Please add pointers to other documents to this section]
  644.  
  645. The main source for information is sources of existing OSes.
  646. Lots of pointers lie in the following WWW page:
  647. http://www.eleves.ens.fr:8080/home/rideau/Tunes/Review/OSes.html
  648.  
  649.  
  650. 5. TODO
  651. * fill incomplete sections
  652. * add more pointers to software...
  653. * add simple examples from real life to illustrate the syntax, power,
  654. and limitations of each proposed solution.
  655.  
  656.  
  657.  
  658. Authors' .sig:
  659. --    ,                                         ,           _ v    ~  ^  --
  660. -- Fare -- rideau@clipper.ens.fr -- Francois-Rene Rideau -- +)ang-Vu Ban --
  661. --                                      '                   / .          --
  662. Join the TUNES project for a computing system based on computing freedom !
  663.                  TUNES is a Useful, Not Expedient System
  664. WWW page at URL: "http://www.eleves.ens.fr:8080/home/rideau/Tunes/"
  665.  
  666.