Forgot about transparency
This commit is contained in:
parent
83c6f1e7b3
commit
dba4644ee7
4 changed files with 22 additions and 11 deletions
2
boot.asm
2
boot.asm
|
@ -7,7 +7,7 @@ OS_SEGMENT equ 0x100
|
|||
boot:
|
||||
; Load from disk
|
||||
mov ah, 0x02 ; read
|
||||
mov al, 0x02 ; No of sectors (1)
|
||||
mov al, 0x02 ; No of sectors (2)
|
||||
mov cl, 0x02 ; Sector start (1 = boot sector, 2 = OS)
|
||||
mov ch, 0x00 ; Cylinder 0
|
||||
mov dh, 0x00 ; Head 0
|
||||
|
|
|
@ -79,7 +79,7 @@ gfx_rect:
|
|||
ret
|
||||
|
||||
|
||||
; di = y*32+x
|
||||
; di = y*320+x
|
||||
; si = source color data
|
||||
; ax = width
|
||||
; bl = height
|
||||
|
@ -104,7 +104,10 @@ _gfx_blit0:
|
|||
add cx, 1
|
||||
|
||||
mov dh, [si]
|
||||
cmp dh, 0xFF
|
||||
jz .ncp
|
||||
mov [es:di], dh
|
||||
.ncp:
|
||||
add di, 1
|
||||
add si, 1
|
||||
|
||||
|
|
21
main.asm
21
main.asm
|
@ -18,9 +18,7 @@ section KERNEL follows=BOOTSECTOR vstart=1000h
|
|||
%endmacro
|
||||
|
||||
main:
|
||||
; Video mode
|
||||
mov ax, 0x13
|
||||
int 0x10
|
||||
call gfx_init_vga13
|
||||
|
||||
; Important for mouse stuff definitely
|
||||
jmp 0x000:.setcs
|
||||
|
@ -31,18 +29,25 @@ main:
|
|||
|
||||
lp:
|
||||
|
||||
; mov cx, 0
|
||||
; mov al, 0
|
||||
; mov dx, 320
|
||||
; mov bl, 200
|
||||
; mov bh, 0
|
||||
|
||||
;call gfx_rect
|
||||
|
||||
cli
|
||||
mov bx, [mouseX]
|
||||
mov ax, [mouseY]
|
||||
sti
|
||||
|
||||
mov dx, 0
|
||||
mov cx, 320
|
||||
mul cx
|
||||
add ax, bx
|
||||
mov dx, 0
|
||||
mov cx, 320
|
||||
mul cx
|
||||
add ax, bx
|
||||
|
||||
mov di, ax
|
||||
mov di, ax
|
||||
mov si, gfxd_cursor
|
||||
mov ax, 11
|
||||
mov bl, 18
|
||||
|
|
5
run.sh
5
run.sh
|
@ -1,2 +1,5 @@
|
|||
nasm -f bin main.asm -o main.bin
|
||||
qemu-system-x86_64 main.bin
|
||||
qemu-system-x86_64 main.bin
|
||||
|
||||
|
||||
dfkjjgodifjgodifj
|
Loading…
Add table
Reference in a new issue