commit 423ae0e642d3392075fb7f059083f0d71ff7ed3a Author: sam Date: Sat Mar 2 16:17:28 2024 +1300 initial commit diff --git a/key b/key new file mode 100644 index 0000000..332c832 Binary files /dev/null and b/key differ diff --git a/key.asm b/key.asm new file mode 100644 index 0000000..056a64c --- /dev/null +++ b/key.asm @@ -0,0 +1,11 @@ +org 0x7c00 + +main: + mov ah, 0 + int 0x16 + mov ah, 0x0e + int 0x10 + jmp main + +times 510 - ($-$$) db 0 +db 0x55, 0xaa diff --git a/test b/test new file mode 100644 index 0000000..5fba7b3 Binary files /dev/null and b/test differ diff --git a/test.asm b/test.asm new file mode 100644 index 0000000..db0cab2 --- /dev/null +++ b/test.asm @@ -0,0 +1,35 @@ +org 0x7c00 + +main: + mov ax, hello + call puts + + cli +.loop: + hlt + jmp .loop + +puts: + push bx + push di + + mov bx, ax + + mov ah, 0x0e + mov di, 0 +.loop: + mov al, [bx + di] + cmp al, 0 + je .exit + int 0x10 + inc di + jmp .loop +.exit: + pop di + pop bx + ret + +hello: db "i love you bb!!! ", 0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0 + +times 510 - ($-$$) db 0 +db 0x55, 0xaa diff --git a/vesa b/vesa new file mode 100644 index 0000000..98a754a Binary files /dev/null and b/vesa differ diff --git a/vesa.asm b/vesa.asm new file mode 100644 index 0000000..6ef4dfa --- /dev/null +++ b/vesa.asm @@ -0,0 +1,8 @@ +org 0x7c00 + +mov ax, 0x4f02 +mov bx, 0x118 +int 0x10 + +times 510 - ($-$$) db 0 +db 0x55, 0xaa diff --git a/vga b/vga new file mode 100644 index 0000000..6214b5c Binary files /dev/null and b/vga differ diff --git a/vga.asm b/vga.asm new file mode 100644 index 0000000..397e51a --- /dev/null +++ b/vga.asm @@ -0,0 +1,48 @@ +org 0x7c00 + +main: + mov ah, 0 + mov al, 0x13 ; 320x200x8 + int 0x10 + + mov ax, 0 ; x + mov bx, 0 ; y + mov cl, 0 ; color +.horiz_loop: + call putpixel + inc ax + inc cl + cmp ax, 16 + jl .horiz_loop + mov ax, 0 + inc bx + cmp bx, 16 + jl .horiz_loop + + cli +.loop: + hlt + jmp .loop + +putpixel: + push ax + push bx + push es + push di + + imul bx, 320 + add bx, ax + mov di, bx + mov ax, 0xA000 + mov es, ax + mov [es:di], cl + + pop di + pop es + pop bx + pop ax + + ret + +times 510 - ($-$$) db 0 +db 0x55, 0xaa