File tree Expand file tree Collapse file tree 3 files changed +49
-0
lines changed
Expand file tree Collapse file tree 3 files changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ * ~
2+ * .o
3+ * .bin
4+ * .dat
5+ * .img
Original file line number Diff line number Diff line change 1+ AS = as
2+
3+ .s.o :
4+ $(AS ) -o $* .o $<
5+
6+ all : fd.img
7+
8+ fd.img : hello.o signature.dat
9+ objcopy -O binary hello.o hello.bin
10+ dd if=/dev/zero of=zero.dat bs=1 count=$$((510 - $$(stat -c%s hello.bin ) ) )
11+ cat hello.bin zero.dat signature.dat > fd.img
12+
13+ hello.o : hello.s
14+
15+ signature.dat :
16+ bash -c ' echo -en "\x55\xaa" > signature.dat'
17+
18+ clean :
19+ rm -f * ~ * .o * .bin * .dat * .img
20+
21+ run : fd.img
22+ qemu -fda fd.img
Original file line number Diff line number Diff line change 1+ .code16
2+
3+ / * ビデオモード設定(画面クリア) * /
4+ movw $ 0x0000 , % ax
5+ int $ 0x10
6+
7+ / * 文字列出力 * /
8+ BOOTSEG = 0x07c0
9+ movw $ 0x0000 , % dx
10+ movw $ 5 , % cx
11+ movw $ 0x0007 , % bx
12+ movw $ BOOTSEG , % ax
13+ movw % ax , % es
14+ movw $ msg , % bp
15+ movw $ 0x1301 , % ax
16+ int $ 0x10
17+
18+ end:
19+ jmp end
20+
21+ msg:
22+ .ascii "Hello"
You can’t perform that action at this time.
0 commit comments