bootloader

Assembly text colors

瘦欲@ 提交于 2019-12-01 19:32:26
I'm doing an iso file in assembly and I want to add color to the text (in this case: red). Does anyone know how to do it? [BITS 16] [ORG 0x7C00] jmp main main: mov si, string ; si=string call printstr jmp $ printstr: lodsb ; al=&si[0] cmp al,0 ;FLAGS = 0 jnz print ret print: mov ah,0Eh int 10h jmp printstr string db "HELLO WORLD!",13,10,0 times 510 - ($-$$) db 0 dw 0xAA55 As a preliminary advice, always setup the segment registers that your bootloader depends on. Here, because of lodsb together with [ORG 0x7C00] , you must set DS=0 . Best also make sure the direction flag DF is in a known

Grub bootloader with shared library support

不问归期 提交于 2019-12-01 16:16:52
I'd like to load a shared library (closed-source binary user-space library) at boot stage with grub boot-loader. Are there any chances for this or I must write a custom-elf-loader (grub module) to do it? 29/08/2014: For more detail, this is a programming problem in which I want to customize or add some new features to Grub boot-loader project. Thank you for your all supporting! So, you don't make it crystal clear what you are trying to do, but: Loading a userspace (assuming Linux SysV ELF type) shared library straight into GRUB is not possible. GRUB modules are indeed in ELF format, but they

Atmel SAM3X8E dual bank switching for booting different behaviour

烂漫一生 提交于 2019-12-01 13:11:06
I’m currently working with an Arduino Due board which has an Atmel SAM3X8E processor embedded. I’m programming it using the Atmel Studio (version 7.0.1645) and the provided Atmel Software Framework (version 3.28.1). The purpose of the program running on the SAM is to gain reprogramming functionality. Therefore the program gets the image from a host PC, flashes it block by block in the unused flash bank and verifies the image. All that is working fine, but I’m running into the same issue as this post ( Atmel SAM3X dual bank switching not working ). The Atmel SAM3X8E has two 256-kByte flash

Why is kernel boot too late?

拈花ヽ惹草 提交于 2019-12-01 12:06:27
问题 I have zynq-microzed board and my log messages are following... [Mon Jun 09 19:28:38.231 2014] SF: Detected S25FL129P_64K/S25FL128S_64K with page size 64 KiB, total 16 MiB [Mon Jun 09 19:28:38.446 2014] SF: 1245184 bytes @ 0x520000 Read: OK [Mon Jun 09 19:28:38.446 2014] ## Loading kernel from FIT Image at 01000000 ... [Mon Jun 09 19:28:38.446 2014] Using 'conf@1' configuration [Mon Jun 09 19:28:38.446 2014] Trying 'kernel@1' kernel subimage [Mon Jun 09 19:28:38.446 2014] Description:

Atmel SAM3X8E dual bank switching for booting different behaviour

陌路散爱 提交于 2019-12-01 11:26:15
问题 I’m currently working with an Arduino Due board which has an Atmel SAM3X8E processor embedded. I’m programming it using the Atmel Studio (version 7.0.1645) and the provided Atmel Software Framework (version 3.28.1). The purpose of the program running on the SAM is to gain reprogramming functionality. Therefore the program gets the image from a host PC, flashes it block by block in the unused flash bank and verifies the image. All that is working fine, but I’m running into the same issue as

What is the name for a program running directly without an OS?

时光毁灭记忆、已成空白 提交于 2019-12-01 11:10:37
I'm having a lot of trouble expressing my questions properly when I'm trying to ask other questions on this topic, so what is the proper name for a program running directly on the machine in question? A term that could describe both a kernel, and a bootloader in the sense that they are being executed directly without an operating system? The C standard calls that a "free standing environment", which strikes me as about as good a term to use as most others I've seen. I would just use the term "standalone" because that's essentially what it's doing. Standing alone, without the benefit of an

What is the name for a program running directly without an OS?

ⅰ亾dé卋堺 提交于 2019-12-01 09:34:04
问题 I'm having a lot of trouble expressing my questions properly when I'm trying to ask other questions on this topic, so what is the proper name for a program running directly on the machine in question? A term that could describe both a kernel, and a bootloader in the sense that they are being executed directly without an operating system? 回答1: The C standard calls that a "free standing environment", which strikes me as about as good a term to use as most others I've seen. 回答2: I would just use

VirtualBox - No bootable medium found

天涯浪子 提交于 2019-12-01 07:47:58
There are a lot of question on stackoverflow with the similar title. I read all of them, but none of them answers my problem. This is why I opened this question. I am creating an operating system in assembler and C. I found that I must compile C code to binary format, extract text section and save it as a file, then convert it to ISO, then mount it to virtual optical dive of diskete and then load my OS in VirtualBox. So, that is a lot of work I want to avoid. I don't want to convert my binary file to ISO every time. So, I decided to put the binary machine code of my OS to virtual hard drive (

Which value should be used for SP for booting process?

﹥>﹥吖頭↗ 提交于 2019-12-01 07:09:35
问题 The bootstrap sequence in the BIOS will load the first valid MBR that it finds into the computer's physical memory at address 0x7C00. Which value should be used for SP for booting process? org 7c00h ; set location counter. mov ax, XXX ; What is XXX? mov sp, ax ; Now PUSH an POP are safe 回答1: Any value of SS:SP such that there's enough stack space for your code AND interrupt service routines is OK. And, of course, your stack shouldn't collide with any of your code or other data or run into ROM

How to step over interrupt calls when debugging a bootloader/bios with gdb and QEMU?

▼魔方 西西 提交于 2019-12-01 05:42:11
For educational purposes, I have adapted this bootloader from mikeos.berlios.de/write-your-own-os.html rewriting it to specifically load at address 0x7c00. The final code is this: [BITS 16] ; Tells nasm to build 16 bits code [ORG 0x7C00] ; The address the code will start start: mov ax, 0 ; Reserves 4Kbytes after the bootloader add ax, 288 ; (4096 + 512)/ 16 bytes per paragraph mov ss, ax mov sp, 4096 mov ax, 0 ; Sets the data segment mov ds, ax mov si, texto ; Sets the text position call imprime ; Calls the printing routine jmp $ ; Infinite loop texto db 'It works! :-D', 0 imprime: ; Prints