Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %ifndef __MONITOR_LIB__
- %define __MONITOR_LIB__
- SystemName db "SimpleOS", 0
- BackWidth dw 0000h
- BackHeight dw 0000h
- BackColor db 52
- Pagination db 0
- CursorX db 15
- CursorY db 12
- VGA.SetVideoMode:
- mov ah, 00h
- mov al, 13h
- int 10h
- mov ax, 320
- mov word[BackWidth], ax
- mov ax, 200
- mov word[BackHeight], ax
- call DrawPixelConfig
- ret
- DrawPixelConfig:
- mov ah, 0Ch
- mov al, [BackColor]
- mov cx, 0 ; Coluna (X)
- mov dx, 0 ; Linha (Y)
- ret
- ; Pinta fundo da tela
- DrawBackground:
- int 10h
- inc cx
- cmp cx, word[BackWidth]
- jne DrawBackground
- mov cx, 0
- inc dx
- cmp dx, word[BackHeight]
- jne DrawBackground
- mov dx, 0
- ret
- PrintMainString:
- mov ah, 09h
- mov bh, [Pagination]
- mov bl, 44
- mov cx, 1
- mov al, [si]
- print:
- int 10h
- inc si
- call MoveCursor
- mov ah, 09h
- mov al, [si]
- cmp al, 0
- jne print
- ret
- MoveCursor:
- mov ah, 02h
- mov bh, [Pagination]
- inc dl
- int 10h
- ret
- EffectInit:
- start:
- mov dh, [CursorY]
- mov dl, [CursorX]
- call MoveCursor
- mov si, SystemName
- call PrintMainString
- ret
- %endif
Add Comment
Please, Sign In to add comment