diff --git a/Makefile b/Makefile index 68fb208..e21197f 100644 --- a/Makefile +++ b/Makefile @@ -69,7 +69,7 @@ dev: dev-image ## Launch a dev container .PHONY: binaries -binaries: ## Build all binaries +binaries: ## Build all small binaries docker build --build-arg TARGET=readfloppy.bin -o . --target=export . docker build --build-arg TARGET=writefloppy.bin -o . --target=export . docker build --build-arg TARGET=crc16.bin -o . --target=export . @@ -77,11 +77,9 @@ binaries: ## Build all binaries docker build --build-arg TARGET=hello.bin -o . --target=export . docker build --build-arg TARGET=copy.bin -o . --target=export . docker build --build-arg TARGET=call.bin -o . --target=export . - docker build --build-arg TARGET=debug.bin -o . --target=export . - docker build --build-arg TARGET=dosdbt.bin -o . --target=export . docker build --build-arg TARGET=format.bin -o . --target=export . - docker build --build-arg TARGET=polmon.com -o . --target=export . - docker build --build-arg TARGET=fat12boot.bin -o . --target=export . + docker build --build-arg TARGET=readio.bin -o . --target=export . + docker build --build-arg TARGET=writeio.bin -o . --target=export . .PHONY: floppy floppy: ## Make a bootable floppy image diff --git a/readio.asm b/readio.asm new file mode 100644 index 0000000..618a1e5 --- /dev/null +++ b/readio.asm @@ -0,0 +1,10 @@ +BITS 16 +CPU 8086 + +_start: + mov bp, sp + mov si, [bp+4] + mov dx, [si] + xor ax, ax + in al, dx + retf 2 diff --git a/writeio.asm b/writeio.asm new file mode 100644 index 0000000..799eec5 --- /dev/null +++ b/writeio.asm @@ -0,0 +1,12 @@ +BITS 16 +CPU 8086 + +_start: + mov bp, sp + mov si, [bp+6] + mov dx, [si] + xor ax, ax + mov si, [bp+4] + mov al, [si] + out dx, al + retf 4