bootgame1

changeset 0:81facff3a8ae

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 07 Jun 2017 08:56:42 +0300
parents
children 48755f08211a
files .hgignore Makefile boot.asm
diffstat 3 files changed, 31 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/.hgignore	Wed Jun 07 08:56:42 2017 +0300
     1.3 @@ -0,0 +1,3 @@
     1.4 +\.o$
     1.5 +\.swp$
     1.6 +\.bin$
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/Makefile	Wed Jun 07 08:56:42 2017 +0300
     2.3 @@ -0,0 +1,12 @@
     2.4 +bin = boot.bin
     2.5 +
     2.6 +$(bin): boot.asm
     2.7 +	nasm -f bin -o $@ $<
     2.8 +
     2.9 +.PHONY: clean
    2.10 +clean:
    2.11 +	rm -f $(bin)
    2.12 +
    2.13 +.PHONY: run
    2.14 +run: $(bin)
    2.15 +	qemu-system-i386 -fda $< -net none
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/boot.asm	Wed Jun 07 08:56:42 2017 +0300
     3.3 @@ -0,0 +1,16 @@
     3.4 +start:
     3.5 +	mov ax, 0x13
     3.6 +	int 0x10
     3.7 +	push word 0xa000
     3.8 +	pop es
     3.9 +
    3.10 +mainloop:
    3.11 +	xor di, di
    3.12 +	mov ax, 0x0202
    3.13 +	mov cx, 32000
    3.14 +	rep stosw
    3.15 +
    3.16 +	jmp mainloop
    3.17 +
    3.18 +	resb 510 - ($ - start)
    3.19 +	db 0x55, 0xaa