initial commit

This commit is contained in:
sam 2024-03-02 16:17:28 +13:00
commit 423ae0e642
8 changed files with 102 additions and 0 deletions

BIN
key Normal file

Binary file not shown.

11
key.asm Normal file
View file

@ -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

BIN
test Normal file

Binary file not shown.

35
test.asm Normal file
View file

@ -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

BIN
vesa Normal file

Binary file not shown.

8
vesa.asm Normal file
View file

@ -0,0 +1,8 @@
org 0x7c00
mov ax, 0x4f02
mov bx, 0x118
int 0x10
times 510 - ($-$$) db 0
db 0x55, 0xaa

BIN
vga Normal file

Binary file not shown.

48
vga.asm Normal file
View file

@ -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