i have tried with code from tutorials and compiled like this;
Code: Select all
; -> a.asm
[bits 16] ; real-mode
[org 0x7C00]
entry:
mov ax, cs ; cs = 7c00
mov ds, ax
mov ss, ax
mov sp, 0x9C00
cli ; turn off interrupts
jmp 0x0000:start
start:
mov ax, 0x1112
mov bl, 0x00
int 0x10
load:
xor ax, ax
int 0x13
jc load
xor ax, ax
mov es,ax
mov bx, 0x1000
mov ax,0x0207
mov cx,0x0002
mov dx,0x0000
int 0x13
jc load
jmp $
times 510-($-$$) db 0
dw 0AA55h
; b.asm
[bits 16]
[org 0x1000]
mov ax, 0xb800
mov es, ax
xor di, di
mov byte [es:di], "K"
Code: Select all
nasm a.asm -o a.bin
nasm b.asm -o b.bin
Code: Select all
dd if=/dev/zero of=floppy.img count=2880 bs=512
dd if=a.bin count=1 bs=512 of=floppy.img
dd if=b.bin seek=1 bs=512 of=floppy.img
someone please explain or guide me to some working tutorial without grub, using dd.