bootloader

How to move cursor with mouse?

流过昼夜 提交于 2019-12-13 07:51:10
问题 I am developing a realmode operating system in x86 assembly. I managed to move cursor with keyboard, but I want to move the cursor with mouse. I don't know how. I found int 33h deals with the mouse, but I can't seem to move the cursor using int 33h. 回答1: Interrupts int 10h to int 1Fh are BIOS interrupts; they can be used before the OS is booted. Interrupts int 20h to int 2Fh are DOS interrupts; they can only be used when DOS has already been loaded. Other interrupts (e.g. int 33h ) are

cannot jump into arduino boot loader

怎甘沉沦 提交于 2019-12-13 07:08:14
问题 I want to jump from my application to the bootloader ( I load via bluetooth and have an application command to jump to the boot loader). the following work : void* bl = (void *) 0x3c00; goto *bl; or asm volatile { jmp BOOTL ::} asm volatile { .org 0x3c00 BOOTL: } (but code size grows to 0x3c00) BUT, the most obvious option asm volatile { jmp 0x3c00 ::} does not (seems it does not even produce code } Any idea why ? 回答1: The question as stated is not clear, as to what is working and what is

Bootloader memory location

穿精又带淫゛_ 提交于 2019-12-13 06:17:17
问题 This is a part of a bootloader that I am studying from `[ORG 0x00] [BITS 16] SECTION .text jmp 0x07c0:START ; set CS(segment register) to 0x07C0 and jump to START label. TOTALSECTORCOUNT: dw 0x02 KERNEL32SECTORCOUNT: dw 0x02 START: mov ax, 0x07c0 mov ds, ax ; set DS(segment register) to the address of the bootloader. mov ax, 0xb800 mov es, ax ; set ES(segment register) to the address of the video memory starting address. ; stack initialization mov ax, 0x0000 mov ss, ax mov sp, 0xfffe mov bp,

Finding the start of the Root Directory BootLoader

回眸只為那壹抹淺笑 提交于 2019-12-13 02:48:33
问题 I am creating a BootLoader that boots from a CD and I am having trouble discovering how to find the start of the root Directory on the Disk here is my boot code: BITS 16 ORG 0x00 Start: jmp main ;Colors for text %DEFINE TEAL 0x03 %DEFINE RED 0x04 %DEFINE PURPLE 0x05 COL: db 0 ROW: db 0 ;macro for print %macro Print 2 pusha xor ax, ax xor dx, dx mov dh, BYTE[ROW];puts the row into the dh register mov dl, BYTE[COL] xor bx, bx mov bl, %2 mov si, %1 call cPrint mov BYTE[COL], dl ;saves the rows

Android firmware image components explanation

走远了吗. 提交于 2019-12-13 00:23:07
问题 Consider unpacking an android firmware image made for a Media box using for example the C code in this post or by 'Amlogic customization tool'. When I use the compiled C code with an android 7.1 image, I get these files: _aml_dtb.PARTITION aml_sdc_burn.ini aml_sdc_burn.UBOOT boot.PARTITION bootloader.PARTITION DDR.USB logo.PARTITION manifest.xml mesonl.dtb platform.conf recovery.PARTITION system.PARTITION UBOOT.USB Excluding some minor config files here, I know each of these images are a

Stack segment in the MikeOS bootloader

谁说胖子不能爱 提交于 2019-12-12 07:48:50
问题 I don't understand this piece of code: mov ax, 07C0h ; Set up 4K of stack space above buffer add ax, 544 ; 8k buffer = 512 paragraphs + 32 paragraphs (loader) cli ; Disable interrupts while changing stack mov ss, ax mov sp, 4096 sti ; Restore interrupts mov ax, 07C0h - here BIOS loads our code. But what is '4K'? Kilobytes? I didn't get it :) add ax, 544 - Why again '8K'? And why we add 544? Why not 512? mov sp, 4096 - Here we set stack pointer. What for do we do all these manipulations,

Explanation of a few lines in Assembly

旧城冷巷雨未停 提交于 2019-12-12 05:49:44
问题 bits 16 org 0x7c00 start: jmp loader ;******; ; OEM Parameter block ;********; TIMES 0Bh-$+start DB 0; THIS LINE bpbBytesPerSector: DW 512 bpbSectorsPerCluster: DB 1 bpbReservedSectors: DW 1 bpbNumberOfFATs: DB 2 bpbRootEntries: DW 224 bpbTotalSectors: DW 2880 bpbMedia: DB 0xF0 bpbSectorsPerFAT: DW 9 bpbSectorsPerTrack: DW 18 bpbHeadsPerCylinder: DW 2 bpbHiddenSectors: DD 0 bpbTotalSectorsBig: DD 0 bsDriveNumber: DB 0 bsUnused: DB 0 bsExtBootSignature: DB 0x29 bsSerialNumber: DD 0xa0a1a2a3

Execute C program at bootloader level via Assembler

家住魔仙堡 提交于 2019-12-12 05:29:10
问题 I wrote a custom (VERY basic "Hello world!") bootloader in Assembler and I would like to execute a C program in that. Would the C program work, or fail due to a lost stdio.h file? And how could I bundle the C program along with the bootloader into a single .bin file to dd to a flash drive/CD? 回答1: I'm not sure what you mean by "lost stdio.h ", but many C runtime functions, including those prototyped in stdio.h , are implemented using system calls. Without an OS running, those system calls won

NASM far jump / far call in real mode and ASM code conventions

隐身守侯 提交于 2019-12-12 03:35:31
问题 I tried to make a bootloader the last few days and this is the result: BITS 16 ;CONSTANTS BOOTSEG equ 07C0h STACKSEG equ 1BC0h ; BOOTSEG + 512 Byte (bootloader) + 512 Byte (second stage) + 4096 Byte (buffer) = 1BC0h STACKSIZE equ 0400h ; 1KB stack ; INIT mov AX, BOOTSEG mov DS, AX ; set data segment to adress where bootloader will be loaded to mov AX, STACKSEG cli ; disable interrupts while set up stack mov SS, AX mov SP, STACKSIZE ; set up stack sti ; restore interrupts mov [bootdev], DL ;

Why does address range 0xC0000000 ~ 0xFFFFFFFF always give 0x00 or 0xFF after switching to protected mode before enabling paging?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 19:09:14
问题 I'm making a custom boot loader, and currently in the stage of enabling paging after switching to protected mode. I tried to check all memory range is usable from 0x00000000 to 0xFFFFFFFF to make sure my kernel has full control over memories. Checking is done by copying value to the memory address and printing the value through video memory(0xB8000). But the address range from 0xC0000000 to 0xFFFFFFFF always contains 0x00(if executed by QEMU) or 0xFF(if executed in real hardware through