Enviado em 29/07/2017 - 08:55h
Olá Pessoal !//------------------------------------------------------------------- // // Um simples "Hello World" com BOOT: // // ARQUIVO: // hello.s // // ############################################## // // COMPILA O BINARIO: // // cd /temp/hello_boot // // gcc -s -c hello.s -o hello.o -Wall // ld hello.o -o hello.bin -T link.ld // objcopy -O binary hello.bin bkernel // // GERA UM CD BOOTAVEL: // mkdosfs -C hello.flp 1440 || exit // dd status=noxfer conv=notrunc if=bkernel of=hello.flp || exit // mkisofs -R -b hello.flp -o /temp/hello_boot.iso /temp/hello_boot // // ############################################## // // LIMITACAO: // Programa maximo com 510 bytes. // // VANTAGEM: // MODO REAL(16 bits): Pode-se usar interrupcao a vontade ... // // FONTES DO SCRIPT CD-ROM BOOT: // // Projeto MikeOS ( OS 16 bits ), arquivo ( build-linux.sh ) // // https://github.com/mig-hub/mikeOS // // POR: // Francisco - gokernel@hotmail.com // //------------------------------------------------------------------- // .code16 .text .globl _start; _start: jmp _boot nop _boot: // Display: "Hello" // mov $0xe,%ah mov $72,%al int $0x10 mov $101,%al int $0x10 mov $108,%al int $0x10 int $0x10 mov $111,%al int $0x10 label_forever: hlt jmp label_forever msgHello: .asciz "Hello World - CD BOOT MINI OS" //----------------------------------------------- //---------- ESSENCIAL: nao mudar aqui ---------- //----------------------------------------------- . = _start + 510 .word 0xaa55 //-----------------------------------------------
SECTIONS { . = 0x7c00; .text : { _ftext = .; } = 0 }
qemu -cdrom hello_boot.iso
Enviado em 29/07/2017 - 12:28h
Cara esse projeto parece ser legal, tenta fazer um shell proprio para assim deixar o bash, tenta postar no github o trabalho para dar uma testada.Enviado em 29/07/2017 - 15:57h
Olá "AndrewUser" !Enviado em 30/07/2017 - 07:17h
Enviado em 30/07/2017 - 09:34h
"Paulo1205" escreveu:Enviado em 30/07/2017 - 18:04h
Caramba!, passei praticamente a tarde toda tentando fazer esse funcionar corretamente no ( WINDOWS com GCC )://------------------------------------------------------------------- // ARQUIVO: // stage0.s // // COMPILE: // gcc -c -Wall -Werror stage0.s -o stage0.o // ld stage0.o -o stage0.elf -T stage0.ld // objcopy -R .pdr -R .comment -R.note -S -O binary stage0.elf stage0_kernel // // Author: // Ashakiran Bhatter // https://www.codeproject.com/KB/cpp/737545/sourcecode.rar // // USAGE: // qemu stage0_kernel // // stage0.ld: //----------------------------------------------- // SECTIONS // { // . = 0x7c00; // .text : // { // _ftext = .; // } = 0 // } // //----------------------------------------------- // //------------------------------------------------------------------- // .code16 .text .globl _start; _start: jmp _boot nop /*bios parameter block description of each entity value datatype width(in bytes) */ /*-------------------- -------------------------- ----- -------- --------------- */ .byte 0x6b,0x69,0x72,0x55,0x58,0x30,0x2e,0x31 /* oem label : kirUX0.1 , type: string , length: 8 */ .byte 0x00,0x02 /* total bytes per sector : 512 , type: word , length: 4 */ .byte 0x01 /* total sectors per cluster : 1 , type: byte , length: 1 */ .byte 0x01,0x00 /* total reserved sectors : 1 , type: word , length: 4 */ .byte 0x02 /* total fat tables : 2 , type: byte , length: 1 */ .byte 0xe0,0x00 /* total directory entries : 224 , type: word , length: 4 */ .byte 0x40,0x0b /* total sectors : 2880 , type: word , length: 4 */ .byte 0xf0 /* media description : 0xf0 , type: byte , length: 1 */ .byte 0x09,0x00 /* size in sectors of each fat table : 9 , type: word , length: 4 */ .byte 0x02,0x01 /* total sectors per track : 18 , type: word , length: 4 */ .byte 0x02,0x00 /* total heads per cylinder : 2 , type: word , length: 4 */ .byte 0x00,0x00, 0x00, 0x00 /* total hidden sectors : 0 , type: double word , length: 4 */ .byte 0x00,0x00, 0x00, 0x00 /* total big sectors : 0 , type: double word , length: 4 */ .byte 0x00 /* boot drive identifier : 0 , type: byte , length: 4 */ .byte 0x00 /* total unused sectors : 0 , type: byte , length: 4 */ .byte 0x29 /* external boot signature : 0x29 , type: byte , length: 4 */ .byte 0x22,0x62,0x79,0x20 /* serial number : "by , type: string , length: 4 */ .byte 0x41,0x53,0x48,0x41,0x4b,0x49 /* volume label first 6 bytes of 11 : ASHAKI , type: string , length: 6 */ .byte 0x52,0x41,0x4e,0x20,0x42 /* volume label second 5 bytes of 11 : RAN B , type: string , length: 5 */ .byte 0x48,0x41,0x54,0x54,0x45,0x52,0x22 /* file system type : HATTER" , type: string , length: 8 */ //----------------------------------------------- // MACROS: //----------------------------------------------- // .macro initEnvironment call _initEnvironment .endm .macro writeString message pushw \message call _writeString addw $0x02, %sp .endm //----------------------------------------------- // inicio real: //----------------------------------------------- _boot: // initialize the environment initEnvironment writeString $msgHello label_forever: hlt jmp label_forever /* user-defined routines */ /* this function is used to set-up the */ /* registers and stack as required */ /* parameter(s): none */ _initEnvironment: pushw %bp movw %sp, %bp _initEnvironmentIn: cli movw %cs, %ax movw %ax, %ds movw %ax, %es movw %ax, %ss movw $0x7c00, %sp sti _initEnvironmentOut: movw %bp, %sp popw %bp ret /* this function is used to display a string */ /* onto the screen */ /* parameter(s): input string */ _writeString: pushw %bp movw %sp , %bp movw 4(%bp) , %si jmp _writeStringCheckByte _writeStringIn: movb $0x000e, %ah movb $0x0000, %bh int $0x0010 incw %si _writeStringCheckByte: movb (%si) , %al orb %al , %al jnz _writeStringIn _writeStringOut: movw %bp , %sp popw %bp ret // user-defined variables bootDrive : .byte 0x0000 msgHello : .asciz "Hello World - BOOT CD-ROM MINIOS" msgAbort : .asciz "* * * F A T A L E R R O R * * *" #fileStage2: .ascii "STAGE2 BIN" fileStage2: .ascii "KERNEL BIN" clusterID : .word 0x0000 //----------------------------------------------- //---------- ESSENCIAL: nao mudar aqui ---------- //----------------------------------------------- . = _start + 510 .word 0xaa55 //-----------------------------------------------
Descritores de Arquivos e Swappiness
tux-gpt - Assistente de IA para o Terminal
Instalação e configuração do Chrony
Programa IRPF - Guia de Instalação e Resolução de alguns Problemas
Como instalar no Linux Jogos da Steam só para Windows
Instalando o Team Viewer no Debian Trixie - problema no Policykit
O Que Fazer Após Instalar Ubuntu 25.04
O que você está ouvindo agora? [2] (175)
Copiar Layout do Teclado para aplicar em outra Distribuição (10)
Autenticação necessária. um aplicativo quer acesso ao chaveiro (2)