can read character from keyboard now

This commit is contained in:
2024-12-04 17:17:53 +09:00
parent f18775bfdd
commit 4580d576a8
25 changed files with 729 additions and 371 deletions

View File

@@ -1,19 +1,24 @@
PROG=mbr
SRCS=$(wildcard *.S)
OBJS=$(SRCS:.S=.o)
SDIR ?= ../
BDIR ?= ./
LDFLAGS = -Ttext 0 -e 0
CPPFLAGS = -I $(IDIR)
PROG = mbr
SRCS = mbr.S
OBJS = mbr.o
include $(SDIR)/Makefile.inc
CFLAGS += -c -fno-pie
LDFLAGS += -Ttext 0 -e 0
CPPFLAGS += -DBOOTSEG=$(BOOTSEG) -DBOOTRELOCSEG=$(BOOTRELOCSEG) -DMBRSTACKOFF=$(MBRSTACKOFF)
CPPFLAGS += -I $(SDIR)/
${PROG}: $(OBJS)
@rm -f $(PROG)
$(LD) $(LDFLAGS) -o $(PROG) $(OBJS)
objcopy -O binary mbr mbr.new
dd if=mbr.new of=mbr bs=512 count=1
rm -rf mbr.new
mv $(PROG) $(BDIR)
objcopy -S -O binary mbr mbr.new
dd if=mbr.new of=$(BDIR)/mbr bs=512 count=1
rm -f mbr.new
$(OBJS): ../def.h
$(OBJS): $(SDIR)/Makefile.inc $(SDIR)/btld_conf.h
clean:
rm -f *.o *.bin $(PROG)
rm -f $(OBJS) $(PROG)