From 423ae0e642d3392075fb7f059083f0d71ff7ed3a Mon Sep 17 00:00:00 2001 From: sam Date: Sat, 2 Mar 2024 16:17:28 +1300 Subject: [PATCH] initial commit --- key | Bin 0 -> 512 bytes key.asm | 11 +++++++++++ test | Bin 0 -> 512 bytes test.asm | 35 +++++++++++++++++++++++++++++++++++ vesa | Bin 0 -> 512 bytes vesa.asm | 8 ++++++++ vga | Bin 0 -> 512 bytes vga.asm | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 102 insertions(+) create mode 100644 key create mode 100644 key.asm create mode 100644 test create mode 100644 test.asm create mode 100644 vesa create mode 100644 vesa.asm create mode 100644 vga create mode 100644 vga.asm diff --git a/key b/key new file mode 100644 index 0000000000000000000000000000000000000000..332c832afd02eb900ea23f66e68a2c11a4fa8daa GIT binary patch literal 512 ZcmdnOa8_&!-&ujz-xx;0hzo(xRR9;f1{VMT literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..5fba7b36209994e39d19ee41fc5f3c8f3f97c18c GIT binary patch literal 512 zcmdm?So4B~;n$bfe}lt24{zby&%n^dXv0v#dRD;w_1F05!`DLjJmHDL#NlA)| RiVDn7z%UAidVhu5V{HgZz}`3 literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..6214b5c1b0bbd3846522fc96063dab3b9ebf60b2 GIT binary patch literal 512 zcmdnOutE5&zzzn6-3$yH8D5AoIQ%=<{6nDTD^SR}`L{sLn_pjE{|yLc3(vgmz{q&G b^ZpKo1$_t9I(XyRqazM8jDn#Y0->t_(O4ZN literal 0 HcmV?d00001 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