libcurl keeps crashing on post requests if i free the post data after the request, even when i use curlopt_copypostfields. help.
Name:
Hello2011-09-26 5:34
So I'm writing this program in assembly, which is supposed to boot from my first hard disk, and when it's done, simulate a boot from my second hard disk, on which I've got an OS. So I load the boot sector to 0:7c00, reset all registers to their appropriate values, and jmp. The problem is that no matter how I tweak the state of CPU before I transfer control to the OS loader, it always gives me some bullshit like "Failed to load operating system." or "Invalid operating system.", i.e. it fails to load the kernel for some reason. Here's my current boot simulation code: ; read boot sector from 81h
mov ah, 2
; where from
mov dl, 081h
mov dh, 0
mov ch, 0
mov cl, 1
; how much
mov al, 1
; where to
xor bx, bx
mov es, bx
mov bx, 07c00h
; read it
int 013h
; reset shit
xor ax, ax
mov ds, ax
mov ss, ax
mov es, ax
mov ax, 0aa55h
mov bx, 10
mov cx, 1
mov dx, 081h
mov sp, 28452
xor bp, bp
xor si, si
xor di, di
; interrupts should be enabled i guess
sti
; go!
jmp 00000h:07c00h
So, I'm assuming I'm setting some registers wrong or that I need to modify something in the System Information Area or whatever, but I have no clue what I need to do. Any help is greatly appreciated!