22 | | You can use [wiki:TracAdmin trac-admin] to configure |
23 | | [http://trac.edgewall.org/ Trac] to better fit your project, especially in |
24 | | regard to ''components'', ''versions'' and ''milestones''. |
| 11 | {{{ |
| 12 | bits 16 ; 16 bit real mode |
| 13 | org 0x7C00 ; origine indirizzo 0000:7C00 |
| 14 | |
| 15 | start: |
| 16 | mov ax, 0xb800 ; text video memory |
| 17 | mov ds, ax |
| 18 | mov eax, 10 |
| 19 | write: |
| 20 | cmp eax, 0 |
| 21 | jz end |
| 22 | mov byte [eax], 'm' |
| 23 | mov byte [eax+1], 0x0F ; attrib = white on black |
| 24 | sub eax, 2 |
| 25 | jmp write |
| 26 | end: |
| 27 | hlt |
| 28 | |
| 29 | times 510-($-$$) db 0 ; 0-padding |
| 30 | dw 0xAA55 |
| 31 | }}} |
| 32 | |
| 33 | {{{ |
| 34 | #!sh |
| 35 | nasm -l mioboot-nobios-simple.lst -o mioboot-nobios-simple.img mioboot-nobios-simple.asm |
| 36 | qemu mioboot-nobios-simple.img |
| 37 | }}} |
34 | | * TracGuide -- Built-in Documentation |
35 | | * [http://trac.edgewall.org/ The Trac project] -- Trac Open Source Project |
36 | | * [http://trac.edgewall.org/wiki/TracFaq Trac FAQ] -- Frequently Asked Questions |
37 | | * TracSupport -- Trac Support |
| 57 | message: |
| 58 | lodsb ; carica un byte da [DS:SI] in AL e inc SI |
| 59 | cmp al, 0 |
| 60 | jz done |
| 61 | mov ah, 0x0E ; write char to screen in text mode |
| 62 | mov bx, 0 ; BH page number BL foreground color |
| 63 | int 0x10 ; write AL to screen (BIOS) |
| 64 | jmp message |
| 65 | done: ret |
39 | | For a complete list of local wiki pages, see TitleIndex. |
| 67 | boot: db "Loading unuseful system...." , 10, 13, 0 |
| 68 | work: db "I've done my unuseful stuff!" , 10, 13, 0 |
| 69 | cont: db "Hit ENTER to continue...", 10, 13, 0 |
| 70 | wow: db "Great! Hello world!" , 10, 13, 0 |
| 71 | |
| 72 | waitenter: mov si, cont |
| 73 | call message |
| 74 | mov ah, 0 |
| 75 | int 0x16 ; Wait for keypress (BIOS) |
| 76 | cmp al, 'm' |
| 77 | jz egg |
| 78 | cmp al, 'b' |
| 79 | jz basic |
| 80 | cmp al, 13 |
| 81 | jnz waitenter |
| 82 | ret |
| 83 | egg: mov si, wow |
| 84 | call message |
| 85 | jmp waitenter |
| 86 | basic: int 0x18 ; basic (BIOS) |
| 87 | hlt |
| 88 | |
| 89 | times 510-($-$$) db 0 |
| 90 | dw 0xAA55 |
| 91 | }}} |
| 92 | |
| 93 | {{{ |
| 94 | #!sh |
| 95 | nasm -l mioboot.lst -o mioboot.img mioboot.asm |
| 96 | qemu mioboot.img |
| 97 | }}} |
| 98 | |
| 99 | |
| 100 | === Link === |
| 101 | |
| 102 | * [http://nasm.sourceforge.org NASM ] |
| 103 | * [http://www.drpaulcarter.com/pcasm/ PC Assembly Language, by Paul A. Carter] |
| 104 | * [http://fabrice.bellard.free.fr/qemu QEmu] |
| 105 | * [http://www.intel.com/products/processor/manuals/ Manuali Intel] |
| 106 | |