Search Results

Search found 5 results on 1 pages for '0x7c00'.

Page 1/1 | 1 

  • Why is my boot loader's stack segment at 0x3FF (end of Real Mode IVT)?

    - by Laurimann
    Title says it all. "address 0x500 is the last one used by the BIOS" - en.wikipedia.org/wiki/Master_boot_record "00000000-000003FF Real Mode IVT (Interrupt Vector Table)" - wiki.osdev.org/Memory_Map_%28x86%29 So can you tell me why NASM places my .com file's stack pointer to 0x3FF while my instruction pointer starts at 0x7c00? To me the most intuitive place for SP would be right below 0x7c00. Thanks.

    Read the article

  • Apache2 alias in virtual host

    - by 0x7c00
    I have multiple virtual host in one server and plan to has some alias setup in one virtualhost. So I add the Alias /foo/ /path/to/foo/ in virtualhost directive,but it has no effect. request of host1/foo/ will return 404. But if I add this to /etc/apache2/mods-available/alias.conf, it works. But the problem is host2 will also share this alias. Is there a way to make the alias work only for host1? B.T.W, I use apache2ctl -l, there's no mod_alias.c listed, weird.

    Read the article

  • How to run boot loader in VMWare?

    - by Asim Haroon
    I am using Ubuntu as a virtual machine in VMWare. I have used this code to write a boot loader which would write Hello world on the screen. [BITS 16] [ORG 0x7C00] MOV SI, HelloString CALL PrintString JMP $ PrintCharacter: MOV AH, 0x0E MOV BH, 0x00 MOV BL, 0x07 INT 0x10 RET PrintString: next_character: MOV AL, [SI] INC SI OR AL, AL JZ exit_function CALL PrintCharacter JMP next_character exit_function: RET HelloString db 'Hello World', 0 TIMES 510 - ($ - $$) db 0 DW 0xAA55 I wrote this code in the text editor in Ubuntu and saved the file as Boot.asm Then I compiled the Boot.asm to boot.bin file by using this command nasm -f bin -o boot.bin Boot.asm and it didn't gave me any errors. After that I copied the boot.bin file to my usb and took it to my Windows OS. After this I burned the boot.bin file to boot.img and boot.iso files. Then I created a new virtual machine and named it booter, when it asked for the .iso file of the OS I want to run I gave it the boot.iso file, about which I told above, then I powered on that virtual machine but it gave me this error PXE-M0F: No boot filename received PXE-M0F: Exiting Intel PXE ROM Operating System not found Please tell me what is the main problem and how can I overcome that problem.

    Read the article

  • PC boot: dl register and drive number

    - by kikou
    I read somewhere in the internet that, before jumping to 0x7c00, the BIOS loads into %dl the "drive number" of the booted device. But what is this "drive number"? Each device attached to the computer is assigned a number by the BIOS? If so, how can I know which number is a given device assigned to? Reading GRUB's source code I found when %dl has bits 0x80 and 0x70 set, it overwrites the whole register with 0x80. Why is that? Here is the code: jmp 3f /* grub-setup may overwrite this jump */ testb $0x80, %dl jz 2f 3: /* Ignore %dl different from 0-0x0f and 0x80-0x8f. */ testb $0x70, %dl jz 1f 2: movb $0x80, %dl 1: By the way. Is there any detailed resource on the boot process of PC's in the web? Specially about what the BIOS does before giving the control to the bootloader and also the standard codes used to communicate with it (like that "drive numer"). I was hoping to write my own bootloader and everything I found is a bit too vague, not technical enough to the point of informing of the exact state of the computer when my bootloader starts to run.

    Read the article

  • What is required to use LODSB in assembly?

    - by Harvey
    What is the minimum set of steps required to use LODSB to load a relative address to a string in my code? I have the following test program that I'm using PXE to boot. I boot it two ways: via pxelinux.0 and directly. If I boot it directly, my program prints both strings. If I boot via pxelinux.0, it only prints the first string. Why? Working technique (for both): Set the direction flag to increment, cld Set ds to cs Put the address (from start) of string in si Add the starting offset to si Non-working technique (just for pxelinux): Calculate a new segment address based on (((cs << 4) + offset) >> 4) Set ds to that. (either A000 or 07C0) text here to fix bug in markdown // Note: If you try this code, don't forget to set // the "#if 0" below appropriately! .text .globl start, _start start: _start: _start1: .code16 jmp real_start . = _start1 + 0x1fe .byte 0x55, 0xAA // Next sector . = _start1 + 0x200 jmp real_start test1_str: .asciz "\r\nTest: 9020:fe00" test2_str: .asciz "\r\nTest: a000:0000" real_start: cld // Make sure %si gets incremented. #if 0 // When loaded by pxelinux, we're here: // 9020:fe00 ==> a000:0000 // This works. movw $0x9020, %bx movw %bx, %ds movw $(test1_str - _start1), %si addw $0xfe00, %si call print_message // This does not. movw $0xA000, %bx movw %bx, %ds movw $(test2_str - _start1), %si call print_message #else // If we are loaded directly without pxelinux, we're here: // 0000:7c00 ==> 07c0:0000 // This works. movw $0x0000, %bx movw %bx, %ds movw $(test1_str - _start1), %si addw $0x7c00, %si call print_message // This does, too. movw $0x07c0, %bx movw %bx, %ds movw $(test2_str - _start1), %si call print_message #endif // Hang the computer sti 1: jmp 1b // Prints string DS:SI (modifies AX BX SI) print_message: pushw %ax jmp 2f 3: movb $0x0e, %ah /* print char in AL */ int $0x10 /* via TTY mode */ 2: lodsb (%si), %al /* get token */ cmpb $0, %al /* end of string? */ jne 3b popw %ax ret .balign 0x200 Here's the compilation: /usr/bin/ccache gcc -Os -fno-stack-protector -fno-builtin -nostdinc -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1 -DSUPPORT_GRAPHICS=1 -DHAVE_CONFIG_H -I. -Wall -ggdb3 -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -falign-jumps=1 -falign-loops=1 -falign-functions=1 -Wundef -g -c -o ds_teststart_exec-ds_teststart.o ds_test.S /usr/bin/ccache gcc -g -o ds_teststart.exec -nostdlib -Wl,-N -Wl,-Ttext -Wl,8000 ds_teststart_exec-ds_teststart.o objcopy -O binary ds_teststart.exec ds_teststart

    Read the article

1