From e1a431897164473f7027a7f7d91eaf41abe67fbf Mon Sep 17 00:00:00 2001 From: Imanol-Mikel Barba Sabariego Date: Sun, 30 Mar 2014 19:59:14 +0000 Subject: [PATCH] --- floppy.img | Bin 1474560 -> 0 bytes second_binary.asm | 26 ++++++++++++++++++++++++++ second_binary.bin | Bin 510 -> 0 bytes usb.img | Bin 1474560 -> 0 bytes 4 files changed, 26 insertions(+), 0 deletions(-) diff --git a/floppy.img b/floppy.img index 0c49e79..ca94662 100644 Binary files a/floppy.img and b/floppy.img differ diff --git a/second_binary.asm b/second_binary.asm index d689006..71f5104 100644 --- a/second_binary.asm +++ b/second_binary.asm @@ -21,6 +21,27 @@ print_char: INT 0x10 ; Signal video interrupt to BIOS RETN +execute_sector: + PUSH ebp + MOV ebp, esp + PUSH ax + PUSH bx + PUSH cx + PUSH dx + MOV ax, [10 + ebp] ; base address + MOV es, ax + MOV al, [8 + ebp] ; num + MOV cl, [6 + ebp] ; offset + MOV ah, 2 ; Function read + XOR ch, ch ; cylinder + XOR dh, dh ; head + MOV dl, 0x81 ; drive + INT 0x13 + XOR si, si + PUSH es + PUSH bx + RETF + Start: XOR ax, ax MOV ds, ax @@ -30,6 +51,11 @@ XOR bx, bx for_start_0: MOV si, str CALL print_string + PUSH 0x7c0; Base address, offset is 0 + PUSH 1 ; num + PUSH 1 ; offset + XOR bx, bx; + ;CALL execute_sector ;JMP for_start_0 JMP $ diff --git a/second_binary.bin b/second_binary.bin index 143300a..1764079 100644 Binary files a/second_binary.bin and b/second_binary.bin differ diff --git a/usb.img b/usb.img index fd45395..287edde 100644 Binary files a/usb.img and b/usb.img differ -- libgit2 0.22.2