From: John Tsiombikas Date: Tue, 5 Jul 2022 05:04:29 +0000 (+0300) Subject: it works! (on some machines, let's investigate further) X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=efitest3;a=commitdiff_plain;h=2dd595122e5ef1aca0e050acea929560c54dc7aa it works! (on some machines, let's investigate further) --- diff --git a/Makefile b/Makefile index 5f0c29f..11d2bd2 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,6 @@ +.PHONY: all +all: disk.img + bootx64.efi: efitest.bin hdr.asm nasm -o $@ -f bin hdr.asm diff --git a/efitest.asm b/efitest.asm index 333b095..0feb61d 100644 --- a/efitest.asm +++ b/efitest.asm @@ -142,13 +142,39 @@ start16: mov ax, 13h int 10h + ; setup palette + mov dx, 3c8h + xor al, al + out dx, al + inc dx + xor cl, cl +.pal: mov al, cl + out dx, al + xor al, al + out dx, al + mov al, cl + not al + out dx, al + inc cl + jnz .pal + + ; fill framebuffer with xor pattern mov ax, 0a000h mov es, ax xor di, di - mov cx, 32000 - mov ax, 6767h - rep stosw - + xor cx, cx +.yloop: xor dx, dx +.xloop: mov ax, dx + xor ax, cx + stosb + inc dx + cmp dx, 320 + jnz .xloop + inc cx + cmp cx, 200 + jnz .yloop + + ; halt for ever .hang: hlt jmp .hang